summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2011-06-25 20:08:41 +0200
committerJuanma Barranquero <lekktu@gmail.com>2011-06-25 20:08:41 +0200
commit74f53697495eeb2caaa73d100d19591c0ee7bfaf (patch)
treee9efa4081f5ae85fa64216c056dcc9a3cbeaaaa5
parent18a4ce5ea1b06bd077e87fd1ac8966b19b10ee8c (diff)
downloademacs-74f53697495eeb2caaa73d100d19591c0ee7bfaf.tar.gz
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 @@
+2011-06-25 Juanma Barranquero <lekktu@gmail.com>
+
+ * allout.el (allout-unload-function): Pass -1 to `allout-mode'.
+
+ * ses.el (ses-unload-function):
+ * emacs-lisp/re-builder.el (re-builder-unload-function): Simplify.
+
+ * proced.el (proced-unload-function):
+ * progmodes/cperl-mode.el (cperl-mode-unload-function): Remove.
+
2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
* 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."
(save-current-buffer
(dolist (buffer (buffer-list))
(set-buffer buffer)
- (when (allout-mode-p) (allout-mode))))
+ (when (allout-mode-p) (allout-mode -1))))
;; continue standard unloading
nil)
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."
(remove-hook 'after-change-functions 'reb-auto-update t)
(remove-hook 'kill-buffer-hook 'reb-kill-buffer t)
(when (reb-mode-buffer-p)
- (reb-delete-overlays)
- (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
+ (reb-delete-overlays))))
;; continue standard unloading
nil)
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."
(message "Change in Proced buffer undone.
Killed processes cannot be recovered by Emacs."))
-(defun proced-unload-function ()
- "Unload the Proced library."
- (save-current-buffer
- (dolist (buf (buffer-list))
- (set-buffer buf)
- (when (eq major-mode 'proced-mode)
- (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
- ;; continue standard unloading
- nil)
-
(provide 'proced)
;;; 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'."
(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)
;;; 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."
(dolist (fun '(copy-region-as-kill yank))
(ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun))))
(ad-update fun))
- (save-current-buffer
- (dolist (buf (buffer-list))
- (set-buffer buf)
- (when (eq major-mode 'ses-mode)
- (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
;; continue standard unloading
nil)