aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2011-06-25 20:08:41 +0200
committerJuanma Barranquero2011-06-25 20:08:41 +0200
commit74f53697495eeb2caaa73d100d19591c0ee7bfaf (patch)
treee9efa4081f5ae85fa64216c056dcc9a3cbeaaaa5
parent18a4ce5ea1b06bd077e87fd1ac8966b19b10ee8c (diff)
downloademacs-74f53697495eeb2caaa73d100d19591c0ee7bfaf.tar.gz
emacs-74f53697495eeb2caaa73d100d19591c0ee7bfaf.zip
Simplify unloading functions after 2011-06-25T17:42:18Z!lekktu@gmail.com.
* allout.el (allout-unload-function): Pass -1 to `allout-mode'. * proced.el (proced-unload-function): * progmodes/cperl-mode.el (cperl-mode-unload-function): Remove. * ses.el (ses-unload-function): * emacs-lisp/re-builder.el (re-builder-unload-function): Simplify.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/allout.el2
-rw-r--r--lisp/emacs-lisp/re-builder.el3
-rw-r--r--lisp/proced.el10
-rw-r--r--lisp/progmodes/cperl-mode.el12
-rw-r--r--lisp/ses.el5
6 files changed, 12 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bccbe9340b1..39a428a5a28 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12011-06-25 Juanma Barranquero <lekktu@gmail.com>
2
3 * allout.el (allout-unload-function): Pass -1 to `allout-mode'.
4
5 * ses.el (ses-unload-function):
6 * emacs-lisp/re-builder.el (re-builder-unload-function): Simplify.
7
8 * proced.el (proced-unload-function):
9 * progmodes/cperl-mode.el (cperl-mode-unload-function): Remove.
10
12011-06-25 Andreas Rottmann <a.rottmann@gmx.at> 112011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
2 12
3 * server.el (server-create-window-system-frame): Add parameters arg. 13 * server.el (server-create-window-system-frame): Add parameters arg.
diff --git a/lisp/allout.el b/lisp/allout.el
index 8cdf24176b0..1d4d4a20e11 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -2085,7 +2085,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
2085 (save-current-buffer 2085 (save-current-buffer
2086 (dolist (buffer (buffer-list)) 2086 (dolist (buffer (buffer-list))
2087 (set-buffer buffer) 2087 (set-buffer buffer)
2088 (when (allout-mode-p) (allout-mode)))) 2088 (when (allout-mode-p) (allout-mode -1))))
2089 ;; continue standard unloading 2089 ;; continue standard unloading
2090 nil) 2090 nil)
2091 2091
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 5ce18d020c9..ebbd6ff1fdf 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -714,8 +714,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
714 (remove-hook 'after-change-functions 'reb-auto-update t) 714 (remove-hook 'after-change-functions 'reb-auto-update t)
715 (remove-hook 'kill-buffer-hook 'reb-kill-buffer t) 715 (remove-hook 'kill-buffer-hook 'reb-kill-buffer t)
716 (when (reb-mode-buffer-p) 716 (when (reb-mode-buffer-p)
717 (reb-delete-overlays) 717 (reb-delete-overlays))))
718 (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
719 ;; continue standard unloading 718 ;; continue standard unloading
720 nil) 719 nil)
721 720
diff --git a/lisp/proced.el b/lisp/proced.el
index 4436129ce16..11598d7350f 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -1869,16 +1869,6 @@ buffer. You can use it to recover marks."
1869 (message "Change in Proced buffer undone. 1869 (message "Change in Proced buffer undone.
1870Killed processes cannot be recovered by Emacs.")) 1870Killed processes cannot be recovered by Emacs."))
1871 1871
1872(defun proced-unload-function ()
1873 "Unload the Proced library."
1874 (save-current-buffer
1875 (dolist (buf (buffer-list))
1876 (set-buffer buf)
1877 (when (eq major-mode 'proced-mode)
1878 (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
1879 ;; continue standard unloading
1880 nil)
1881
1882(provide 'proced) 1872(provide 'proced)
1883 1873
1884;;; proced.el ends here 1874;;; proced.el ends here
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 2cce5e13fb0..8eb2d01c097 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8971,18 +8971,6 @@ do extra unwind via `cperl-unwind-to-safe'."
8971 (substring v (match-beginning 1) (match-end 1))) 8971 (substring v (match-beginning 1) (match-end 1)))
8972 "Version of IZ-supported CPerl package this file is based on.") 8972 "Version of IZ-supported CPerl package this file is based on.")
8973 8973
8974(defun cperl-mode-unload-function ()
8975 "Unload the Cperl mode library."
8976 (let ((new-mode (if (eq (symbol-function 'perl-mode) 'cperl-mode)
8977 'fundamental-mode
8978 'perl-mode)))
8979 (dolist (buf (buffer-list))
8980 (with-current-buffer buf
8981 (when (eq major-mode 'cperl-mode)
8982 (funcall new-mode)))))
8983 ;; continue standard unloading
8984 nil)
8985
8986(provide 'cperl-mode) 8974(provide 'cperl-mode)
8987 8975
8988;;; cperl-mode.el ends here 8976;;; cperl-mode.el ends here
diff --git a/lisp/ses.el b/lisp/ses.el
index 2fc85d27df9..b52d3e23c73 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3006,11 +3006,6 @@ current column and continues until the next nonblank column."
3006 (dolist (fun '(copy-region-as-kill yank)) 3006 (dolist (fun '(copy-region-as-kill yank))
3007 (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun)))) 3007 (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun))))
3008 (ad-update fun)) 3008 (ad-update fun))
3009 (save-current-buffer
3010 (dolist (buf (buffer-list))
3011 (set-buffer buf)
3012 (when (eq major-mode 'ses-mode)
3013 (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
3014 ;; continue standard unloading 3009 ;; continue standard unloading
3015 nil) 3010 nil)
3016 3011