]> code.delx.au - gnu-emacs/blobdiff - lisp/proced.el
Simplify url handling in rcirc-mode
[gnu-emacs] / lisp / proced.el
index ce3ad08598c59bbc3b94d720d0f96f0e35f85238..94ea579ebd84617f2bdd3318452363c8a7923591 100644 (file)
@@ -1676,7 +1676,7 @@ After updating a displayed Proced buffer run the normal hook
         (message (if revert "Updating process information...done."
                    "Updating process display...done.")))))
 
-(defun proced-revert (&rest args)
+(defun proced-revert (&rest _args)
   "Reevaluate the process listing based on the currently running processes.
 Preserves point and marks."
   (proced-update t))
@@ -1724,7 +1724,9 @@ After sending the signal, this command runs the normal hook
             (buffer-disable-undo)
             (setq buffer-read-only t)
             (dolist (process process-alist)
-              (insert "  " (cdr process) "\n")))
+              (insert "  " (cdr process) "\n"))
+            (delete-char -1)
+            (goto-char (point-min)))
           (save-window-excursion
             ;; Analogous to `dired-pop-to-buffer'
             ;; Don't split window horizontally.  (Bug#1806)
@@ -1735,8 +1737,9 @@ After sending the signal, this command runs the normal hook
                    (pnum (if (= 1 (length process-alist))
                              "1 process"
                            (format "%d processes" (length process-alist))))
-                   (completion-annotate-function
-                    (lambda (s) (cdr (assoc s proced-signal-list)))))
+                   (completion-extra-properties
+                    '(:annotation-function
+                      (lambda (s) (cdr (assoc s proced-signal-list))))))
               (setq signal
                     (completing-read (concat "Send signal [" pnum
                                              "] (default TERM): ")
@@ -1770,7 +1773,7 @@ After sending the signal, this command runs the normal hook
                                       (number-to-string signal) signal))))
           (dolist (process process-alist)
             (with-temp-buffer
-              (condition-case err
+              (condition-case nil
                   (if (zerop (call-process
                               proced-signal-function nil t nil
                               signal (number-to-string (car process))))
@@ -1868,16 +1871,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