;;; proced.el --- operate on system processes like dired
-;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
;; Author: Roland Winkler <winkler@gnu.org>
;; Keywords: Processes, Unix
:group 'proced-faces)
(defface proced-marked
- '((t (:inherit font-lock-warning-face)))
+ '((t (:inherit error)))
"Face used for marked processes."
:group 'proced-faces)
(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))
(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)
(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): ")
(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))))
(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
;;; proced.el ends here