aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Winkler2009-02-07 17:07:56 +0000
committerRoland Winkler2009-02-07 17:07:56 +0000
commit016151bb4c1612bf993f2dcfc9b3adfda3f157d9 (patch)
tree690100a3915db9a723970d18c5e2dcbf8a72f822
parent763e01c4cfd6ce0b4e4f43ff5f3fcbf0de84a1c3 (diff)
downloademacs-016151bb4c1612bf993f2dcfc9b3adfda3f157d9.tar.gz
emacs-016151bb4c1612bf993f2dcfc9b3adfda3f157d9.zip
(proced-after-send-signal-hook): Use defcustom.
(proced-header-line): Handle header lines that are shorter than window-hscroll. (proced-send-signal): Rebind split-width-threshold analogous to dired-pop-to-buffer.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/proced.el18
2 files changed, 23 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a15576965b5..42ea49e377b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12009-02-07 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
2
3 * proced.el (proced-after-send-signal-hook): Use defcustom.
4 (proced-header-line): Handle header lines that are shorter than
5 window-hscroll.
6 (proced-send-signal): Rebind split-width-threshold analogous to
7 dired-pop-to-buffer.
8
12009-02-07 Eli Zaretskii <eliz@gnu.org> 92009-02-07 Eli Zaretskii <eliz@gnu.org>
2 10
3 * mail/rmail.el (rmail-redecode-body): Don't encode/decode the 11 * mail/rmail.el (rmail-redecode-body): Don't encode/decode the
diff --git a/lisp/proced.el b/lisp/proced.el
index c6ce2034e0e..fc4d6d01cf9 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -356,6 +356,13 @@ May be used to adapt the window size via `fit-window-to-buffer'."
356 :options '(fit-window-to-buffer) 356 :options '(fit-window-to-buffer)
357 :group 'proced) 357 :group 'proced)
358 358
359(defcustom proced-after-send-signal-hook nil
360 "Normal hook run after sending a signal to processes by `proced-send-signal'.
361May be used to revert the process listing."
362 :type 'hook
363 :options '(proced-revert)
364 :group 'proced)
365
359;; Internal variables 366;; Internal variables
360 367
361(defvar proced-available (not (null (list-system-processes))) 368(defvar proced-available (not (null (list-system-processes)))
@@ -585,8 +592,10 @@ Important: the match ends just after the marker.")
585(defun proced-header-line () 592(defun proced-header-line ()
586 "Return header line for Proced buffer." 593 "Return header line for Proced buffer."
587 (list (propertize " " 'display '(space :align-to 0)) 594 (list (propertize " " 'display '(space :align-to 0))
588 (replace-regexp-in-string ;; preserve text properties 595 (if (<= (window-hscroll) (length proced-header-line))
589 "\\(%\\)" "\\1\\1" (substring proced-header-line (window-hscroll))))) 596 (replace-regexp-in-string ;; preserve text properties
597 "\\(%\\)" "\\1\\1"
598 (substring proced-header-line (window-hscroll))))))
590 599
591(defun proced-pid-at-point () 600(defun proced-pid-at-point ()
592 "Return pid of system process at point. 601 "Return pid of system process at point.
@@ -1711,7 +1720,10 @@ After sending the signal, this command runs the normal hook
1711 (dolist (process process-alist) 1720 (dolist (process process-alist)
1712 (insert " " (cdr process) "\n")) 1721 (insert " " (cdr process) "\n"))
1713 (save-window-excursion 1722 (save-window-excursion
1714 (pop-to-buffer (current-buffer)) 1723 ;; Analogous to `dired-pop-to-buffer'
1724 ;; Don't split window horizontally. (Bug#1806)
1725 (let (split-width-threshold)
1726 (pop-to-buffer (current-buffer)))
1715 (fit-window-to-buffer (get-buffer-window) nil 1) 1727 (fit-window-to-buffer (get-buffer-window) nil 1)
1716 (let* ((completion-ignore-case t) 1728 (let* ((completion-ignore-case t)
1717 (pnum (if (= 1 (length process-alist)) 1729 (pnum (if (= 1 (length process-alist))