From: Colin Walters Date: Sat, 8 Jun 2002 20:44:42 +0000 (+0000) Subject: (occur-mode): Don't set up categories. X-Git-Tag: ttn-vms-21-2-B4~14726 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=506a6d7e1b11796ab8f6666a990fb3c377e35cc5;p=emacs.git (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. --- 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)))