Mercurial > emacs
diff lisp/proced.el @ 95286:3680efd5ada2
(proced-header-line): Use the :align-to 0 feature
rather than computing the corresponding position manually.
(proced-update): Don't hardcode point-min==1.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 24 May 2008 20:41:55 +0000 |
parents | a031e38a88d4 |
children | cf89ac5d2869 |
line wrap: on
line diff
--- a/lisp/proced.el Sat May 24 19:27:54 2008 +0000 +++ b/lisp/proced.el Sat May 24 20:41:55 2008 +0000 @@ -484,10 +484,7 @@ ;; 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 @@ (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)))