# HG changeset patch # User Juanma Barranquero # Date 1273202466 -7200 # Node ID d951d58101603e913c04303b43c1aefb3a15a712 # Parent cc30c752cec3880ea5ae116e8af332b0a0900eff * progmodes/cperl-mode.el (cperl-mode-unload-function): New function. diff -r cc30c752cec3 -r d951d5810160 lisp/ChangeLog --- a/lisp/ChangeLog Fri May 07 05:11:56 2010 +0200 +++ b/lisp/ChangeLog Fri May 07 05:21:06 2010 +0200 @@ -1,5 +1,7 @@ 2010-05-07 Juanma Barranquero + * 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 -r cc30c752cec3 -r d951d5810160 lisp/progmodes/cperl-mode.el --- 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