diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2010-05-07 05:21:06 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2010-05-07 05:21:06 +0200 |
commit | 40ab7974b58fe90e6aa1087453b213e28a89a51d (patch) | |
tree | 28911e413a2133868cd3f22ea4baf43475c176f0 | |
parent | 03ffa46daa2acfb4227661855c1159aeb077ad56 (diff) | |
download | emacs-40ab7974b58fe90e6aa1087453b213e28a89a51d.tar.gz emacs-40ab7974b58fe90e6aa1087453b213e28a89a51d.tar.bz2 emacs-40ab7974b58fe90e6aa1087453b213e28a89a51d.zip |
* progmodes/cperl-mode.el (cperl-mode-unload-function): New function.
-rw-r--r-- | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/progmodes/cperl-mode.el | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b3852bc3d5..a7343b2d1b4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2010-05-07 Juanma Barranquero <lekktu@gmail.com> + * progmodes/cperl-mode.el (cperl-mode-unload-function): New function. + Fix use of `filter-buffer-substring' (4th arg NOPROPS removed). * emulation/cua-base.el (cua-repeat-replace-region): * emulation/cua-gmrk.el (cua-copy-region-to-global-mark) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 2f751f2a0dc..d69cce76faa 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -8980,6 +8980,18 @@ do extra unwind via `cperl-unwind-to-safe'." (substring v (match-beginning 1) (match-end 1))) "Version of IZ-supported CPerl package this file is based on.") +(defun cperl-mode-unload-function () + "Unload the Cperl mode library." + (let ((new-mode (if (eq (symbol-function 'perl-mode) 'cperl-mode) + 'fundamental-mode + 'perl-mode))) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (when (eq major-mode 'cperl-mode) + (funcall new-mode))))) + ;; continue standard unloading + nil) + (provide 'cperl-mode) ;; arch-tag: 42e5b19b-e187-4537-929f-1a7408980ce6 |