emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp proced.el


From: Roland Winkler
Subject: [Emacs-diffs] emacs/lisp proced.el
Date: Sat, 07 Feb 2009 17:06:27 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Roland Winkler <winkler>        09/02/07 17:06:27

Modified files:
        lisp           : proced.el 

Log message:
        (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.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/proced.el?cvsroot=emacs&r1=1.33&r2=1.34

Patches:
Index: proced.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/proced.el,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- proced.el   5 Jan 2009 03:19:40 -0000       1.33
+++ proced.el   7 Feb 2009 17:06:26 -0000       1.34
@@ -356,6 +356,13 @@
   :options '(fit-window-to-buffer)
   :group 'proced)
 
+(defcustom proced-after-send-signal-hook nil
+  "Normal hook run after sending a signal to processes by `proced-send-signal'.
+May be used to revert the process listing."
+  :type 'hook
+  :options '(proced-revert)
+  :group 'proced)
+
 ;; Internal variables
 
 (defvar proced-available (not (null (list-system-processes)))
@@ -585,8 +592,10 @@
 (defun proced-header-line ()
   "Return header line for Proced buffer."
   (list (propertize " " 'display '(space :align-to 0))
+        (if (<= (window-hscroll) (length proced-header-line))
         (replace-regexp-in-string ;; preserve text properties
-         "\\(%\\)" "\\1\\1" (substring proced-header-line (window-hscroll)))))
+             "\\(%\\)" "\\1\\1"
+             (substring proced-header-line (window-hscroll))))))
 
 (defun proced-pid-at-point ()
   "Return pid of system process at point.
@@ -1711,7 +1720,10 @@
           (dolist (process process-alist)
             (insert "  " (cdr process) "\n"))
           (save-window-excursion
-            (pop-to-buffer (current-buffer))
+            ;; Analogous to `dired-pop-to-buffer'
+            ;; Don't split window horizontally.  (Bug#1806)
+            (let (split-width-threshold)
+              (pop-to-buffer (current-buffer)))
             (fit-window-to-buffer (get-buffer-window) nil 1)
             (let* ((completion-ignore-case t)
                    (pnum (if (= 1 (length process-alist))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]