changeset 105571:9325921bfcde

* proced.el (proced-unload-function): New function.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 12 Oct 2009 04:59:04 +0000
parents 90daaeee02f3
children be1e297cc4d5
files lisp/ChangeLog lisp/proced.el
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Oct 12 04:57:46 2009 +0000
+++ b/lisp/ChangeLog	Mon Oct 12 04:59:04 2009 +0000
@@ -1,5 +1,7 @@
 2009-10-12  Juanma Barranquero  <lekktu@gmail.com>
 
+	* proced.el (proced-unload-function): New function.
+
 	* bs.el (bs-mode): Set `revert-buffer-function' to `bs-refresh'.
 	(bs-refresh): Add IGNORED arg for `revert-buffer' compatibility.
 	Doc fix.
--- a/lisp/proced.el	Mon Oct 12 04:57:46 2009 +0000
+++ b/lisp/proced.el	Mon Oct 12 04:59:04 2009 +0000
@@ -1867,6 +1867,16 @@
   (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)
 
 ;; arch-tag: a6e312ad-9032-45aa-972d-31a8cfc545af