Mercurial > emacs
diff lisp/progmodes/cperl-mode.el @ 108282:d951d5810160
* progmodes/cperl-mode.el (cperl-mode-unload-function): New function.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 07 May 2010 05:21:06 +0200 |
parents | 1d1d5d9bd884 |
children | b10051866f51 |
line wrap: on
line diff
--- a/lisp/progmodes/cperl-mode.el Fri May 07 05:11:56 2010 +0200 +++ b/lisp/progmodes/cperl-mode.el Fri May 07 05:21:06 2010 +0200 @@ -8980,6 +8980,18 @@ (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