Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
108281:cc30c752cec3 | 108282:d951d5810160 |
---|---|
8978 (let ((v "Revision: 6.2")) | 8978 (let ((v "Revision: 6.2")) |
8979 (string-match ":\\s *\\([0-9.]+\\)" v) | 8979 (string-match ":\\s *\\([0-9.]+\\)" v) |
8980 (substring v (match-beginning 1) (match-end 1))) | 8980 (substring v (match-beginning 1) (match-end 1))) |
8981 "Version of IZ-supported CPerl package this file is based on.") | 8981 "Version of IZ-supported CPerl package this file is based on.") |
8982 | 8982 |
8983 (defun cperl-mode-unload-function () | |
8984 "Unload the Cperl mode library." | |
8985 (let ((new-mode (if (eq (symbol-function 'perl-mode) 'cperl-mode) | |
8986 'fundamental-mode | |
8987 'perl-mode))) | |
8988 (dolist (buf (buffer-list)) | |
8989 (with-current-buffer buf | |
8990 (when (eq major-mode 'cperl-mode) | |
8991 (funcall new-mode))))) | |
8992 ;; continue standard unloading | |
8993 nil) | |
8994 | |
8983 (provide 'cperl-mode) | 8995 (provide 'cperl-mode) |
8984 | 8996 |
8985 ;; arch-tag: 42e5b19b-e187-4537-929f-1a7408980ce6 | 8997 ;; arch-tag: 42e5b19b-e187-4537-929f-1a7408980ce6 |
8986 ;;; cperl-mode.el ends here | 8998 ;;; cperl-mode.el ends here |