Simplify unloading functions after 2011-06-25T17:42:18Z!lekktu@gmail.com.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 25 Jun 2011 18:08:41 +0000 (20:08 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 25 Jun 2011 18:08:41 +0000 (20:08 +0200)
* 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.

lisp/ChangeLog
lisp/allout.el
lisp/emacs-lisp/re-builder.el
lisp/proced.el
lisp/progmodes/cperl-mode.el
lisp/ses.el

index bccbe93..39a428a 100644 (file)
@@ -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.
index 8cdf241..1d4d4a2 100644 (file)
@@ -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)
 
index 5ce18d0..ebbd6ff 100644 (file)
@@ -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)
 
index 4436129..11598d7 100644 (file)
@@ -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
index 2cce5e1..8eb2d01 100644 (file)
@@ -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
index 2fc85d2..b52d3e2 100644 (file)
@@ -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)