Mercurial > emacs
comparison lisp/replace.el @ 47532:e5d8cf249294
(occur-engine-add-prefix): Use 7 spaces.
(occur-engine): Use 7 digits to align tabs in the data.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 18 Sep 2002 16:03:58 +0000 |
parents | fe8ca2be9fde |
children | b052c0d51fd4 |
comparison
equal
deleted
inserted
replaced
47531:e7f753af9ceb | 47532:e5d8cf249294 |
---|---|
765 (run-hooks 'occur-hook)))) | 765 (run-hooks 'occur-hook)))) |
766 | 766 |
767 (defun occur-engine-add-prefix (lines) | 767 (defun occur-engine-add-prefix (lines) |
768 (mapcar | 768 (mapcar |
769 #'(lambda (line) | 769 #'(lambda (line) |
770 (concat " :" line "\n")) | 770 (concat " :" line "\n")) |
771 lines)) | 771 lines)) |
772 | 772 |
773 (defun occur-engine (regexp buffers out-buf nlines case-fold-search | 773 (defun occur-engine (regexp buffers out-buf nlines case-fold-search |
774 title-face prefix-face match-face keep-props) | 774 title-face prefix-face match-face keep-props) |
775 (with-current-buffer out-buf | 775 (with-current-buffer out-buf |
823 curstring) | 823 curstring) |
824 (setq start (match-end 0)))) | 824 (setq start (match-end 0)))) |
825 ;; Generate the string to insert for this match | 825 ;; Generate the string to insert for this match |
826 (let* ((out-line | 826 (let* ((out-line |
827 (concat | 827 (concat |
828 (apply #'propertize (format "%6d:" lines) | 828 ;; Using 7 digits aligns tabs properly. |
829 (apply #'propertize (format "%7d:" lines) | |
829 (append | 830 (append |
830 (when prefix-face | 831 (when prefix-face |
831 `(font-lock-face prefix-face)) | 832 `(font-lock-face prefix-face)) |
832 '(occur-prefix t))) | 833 '(occur-prefix t))) |
833 curstring | 834 curstring |