summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorColin Walters <walters@gnu.org>2002-06-08 20:44:42 +0000
committerColin Walters <walters@gnu.org>2002-06-08 20:44:42 +0000
commit506a6d7e1b11796ab8f6666a990fb3c377e35cc5 (patch)
tree40b72702aa9774f9c35dcc14d010373ee2e68fff /lisp/replace.el
parent2a3f98a15ac9332cba206165a8538d9536477c61 (diff)
downloademacs-506a6d7e1b11796ab8f6666a990fb3c377e35cc5.tar.gz
(occur-mode): Don't set up categories.
(occur-1): Pass `list-matching-lines-face' and `list-matching-lines-buffer-name-face'. (occur-engine): Use `font-lock-face' instead of categories.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el20
1 files changed, 7 insertions, 13 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 82942bc311f..a07c93e5c64 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -471,9 +471,6 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
(setq major-mode 'occur-mode)
(setq mode-name "Occur")
(make-local-variable 'revert-buffer-function)
- (set (make-local-variable 'font-lock-category-alist)
- `((,(make-symbol "occur-match") . bold)
- (,(make-symbol "occur-title") . underline)))
(set (make-local-variable 'revert-buffer-function) 'occur-revert-function)
(make-local-variable 'occur-revert-arguments)
(run-hooks 'occur-mode-hook))
@@ -706,7 +703,8 @@ See also `multi-occur'."
(or nlines list-matching-lines-default-context-lines)
(and case-fold-search
(isearch-no-upper-case-p regexp t))
- nil nil nil nil)))
+ list-matching-lines-buffer-name-face
+ nil list-matching-lines-face nil)))
(let* ((diff (- (length bufs) (length active-bufs)))
(bufcount (- (length bufs) diff))
(msg (concat
@@ -780,8 +778,6 @@ See also `multi-occur'."
;; Depropertize the string, and maybe
;; highlight the matches
(let ((len (length curstring))
- (match-category (with-current-buffer out-buf
- (car (nth 0 font-lock-category-alist))))
(start 0))
(unless keep-props
(set-text-properties 0 len nil curstring))
@@ -790,9 +786,9 @@ See also `multi-occur'."
(add-text-properties (match-beginning 0)
(match-end 0)
(append
- `(occur-match t category ,match-category)
+ `(occur-match t)
(when match-face
- `(face ,match-face)))
+ `(font-lock-face ,match-face)))
curstring)
(setq start (match-end 0))))
;; Generate the string to insert for this match
@@ -801,7 +797,7 @@ See also `multi-occur'."
(apply #'propertize (format "%6d:" lines)
(append
(when prefix-face
- `(face prefix-face))
+ `(font-lock-face prefix-face))
'(occur-prefix t)))
curstring
"\n"))
@@ -848,10 +844,8 @@ See also `multi-occur'."
(add-text-properties beg end
(append
(when title-face
- `(face ,title-face))
- `(occur-title
- ,buf category
- ,(car (nth 1 font-lock-category-alist))))))
+ `(font-lock-face ,title-face))
+ `(occur-title ,buf))))
(goto-char (point-min)))))))
;; Return the number of matches
globalcount)))