aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-05-24 20:41:55 +0000
committerStefan Monnier2008-05-24 20:41:55 +0000
commit82305b1a29e884185a4693209258ff29eebdcd36 (patch)
treeb36c5ba78aebd7bf5b68512ab5a0f33223ff9821
parent14b63de7a978419a36fc96eb08a86f99f9796f66 (diff)
downloademacs-82305b1a29e884185a4693209258ff29eebdcd36.tar.gz
emacs-82305b1a29e884185a4693209258ff29eebdcd36.zip
(proced-header-line): Use the :align-to 0 feature
rather than computing the corresponding position manually. (proced-update): Don't hardcode point-min==1.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/proced.el10
2 files changed, 10 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6f127f600bb..96f7bfeaee7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12008-05-24 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * proced.el (proced-header-line): Use the :align-to 0 feature
4 rather than computing the corresponding position manually.
5 (proced-update): Don't hardcode point-min==1.
6
12008-05-24 Alan Mackenzie <acm@muc.de> 72008-05-24 Alan Mackenzie <acm@muc.de>
2 8
3 * progmodes/cc-mode.el (c-postprocess-file-styles): Throw an error 9 * progmodes/cc-mode.el (c-postprocess-file-styles): Throw an error
diff --git a/lisp/proced.el b/lisp/proced.el
index 8496b837f81..0a9827dc5eb 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -484,10 +484,7 @@ Returns count of hidden lines."
484;; header line: code inspired by `ruler-mode-ruler' 484;; header line: code inspired by `ruler-mode-ruler'
485(defun proced-header-line () 485(defun proced-header-line ()
486 "Return header line for Proced buffer." 486 "Return header line for Proced buffer."
487 (list "" (if (eq 'left (car (window-current-scroll-bars))) 487 (list (propertize " " 'display '(space :align-to 0))
488 (proced-header-space 'scroll-bar))
489 (proced-header-space 'left-fringe)
490 (proced-header-space 'left-margin)
491 (replace-regexp-in-string 488 (replace-regexp-in-string
492 "%" "%%" (substring proced-header-line (window-hscroll))))) 489 "%" "%%" (substring proced-header-line (window-hscroll)))))
493 490
@@ -530,8 +527,9 @@ Returns count of hidden lines."
530 (while (re-search-forward "\\([^ \t\n]+\\)[ \t]*\\($\\)?" lep t) 527 (while (re-search-forward "\\([^ \t\n]+\\)[ \t]*\\($\\)?" lep t)
531 (push (list (match-string-no-properties 1) 528 (push (list (match-string-no-properties 1)
532 ;; take the column number starting from zero 529 ;; take the column number starting from zero
533 (1- (match-beginning 0)) (or (not (not (match-beginning 2))) 530 (- (match-beginning 0) (point-min))
534 (1- (match-end 0))) 531 (or (not (not (match-beginning 2)))
532 (- (match-end 0) (point-min)))
535 'left) 533 'left)
536 proced-header-alist))) 534 proced-header-alist)))
537 (let ((temp (regexp-opt (mapcar 'car proced-header-alist) t))) 535 (let ((temp (regexp-opt (mapcar 'car proced-header-alist) t)))