diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-24 20:41:55 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-24 20:41:55 +0000 |
commit | 82305b1a29e884185a4693209258ff29eebdcd36 (patch) | |
tree | b36c5ba78aebd7bf5b68512ab5a0f33223ff9821 /lisp/proced.el | |
parent | 14b63de7a978419a36fc96eb08a86f99f9796f66 (diff) | |
download | emacs-82305b1a29e884185a4693209258ff29eebdcd36.tar.gz |
(proced-header-line): Use the :align-to 0 feature
rather than computing the corresponding position manually.
(proced-update): Don't hardcode point-min==1.
Diffstat (limited to 'lisp/proced.el')
-rw-r--r-- | lisp/proced.el | 10 |
1 files changed, 4 insertions, 6 deletions
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." ;; header line: code inspired by `ruler-mode-ruler' (defun proced-header-line () "Return header line for Proced buffer." - (list "" (if (eq 'left (car (window-current-scroll-bars))) - (proced-header-space 'scroll-bar)) - (proced-header-space 'left-fringe) - (proced-header-space 'left-margin) + (list (propertize " " 'display '(space :align-to 0)) (replace-regexp-in-string "%" "%%" (substring proced-header-line (window-hscroll))))) @@ -530,8 +527,9 @@ Returns count of hidden lines." (while (re-search-forward "\\([^ \t\n]+\\)[ \t]*\\($\\)?" lep t) (push (list (match-string-no-properties 1) ;; take the column number starting from zero - (1- (match-beginning 0)) (or (not (not (match-beginning 2))) - (1- (match-end 0))) + (- (match-beginning 0) (point-min)) + (or (not (not (match-beginning 2))) + (- (match-end 0) (point-min))) 'left) proced-header-alist))) (let ((temp (regexp-opt (mapcar 'car proced-header-alist) t))) |