X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/048e6895c62b338e5f80d84cd4a75cfb7e98bf88..6e0f362cb0a10f1a71fcc10ca8c979de4673217c:/lisp/hi-lock.el diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 81c7296760..14920cf93c 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -1,6 +1,7 @@ ;;; hi-lock.el --- minor mode for interactive automatic highlighting -;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, +;; 2005 Free Software Foundation, Inc. ;; Author: David M. Koppelman, koppel@ee.lsu.edu ;; Keywords: faces, minor-mode, matching, display @@ -19,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; @@ -119,7 +120,10 @@ calls." :group 'hi-lock-interactive-text-highlighting) (defface hi-yellow - '((((background dark)) (:background "yellow" :foreground "black")) + '((((min-colors 88) (background dark)) + (:background "yellow1" :foreground "black")) + (((background dark)) (:background "yellow" :foreground "black")) + (((min-colors 88)) (:background "yellow1")) (t (:background "yellow"))) "Default face for hi-lock mode." :group 'hi-lock-faces) @@ -131,7 +135,10 @@ calls." :group 'hi-lock-faces) (defface hi-green - '((((background dark)) (:background "green" :foreground "black")) + '((((min-colors 88) (background dark)) + (:background "green1" :foreground "black")) + (((background dark)) (:background "green" :foreground "black")) + (((min-colors 88)) (:background "green1")) (t (:background "green"))) "Face for hi-lock mode." :group 'hi-lock-faces) @@ -148,17 +155,20 @@ calls." :group 'hi-lock-faces) (defface hi-blue-b - '((t (:weight bold :foreground "blue"))) + '((((min-colors 88)) (:weight bold :foreground "blue1")) + (t (:weight bold :foreground "blue"))) "Face for hi-lock mode." :group 'hi-lock-faces) (defface hi-green-b - '((t (:weight bold :foreground "green"))) + '((((min-colors 88)) (:weight bold :foreground "green1")) + (t (:weight bold :foreground "green"))) "Face for hi-lock mode." :group 'hi-lock-faces) (defface hi-red-b - '((t (:weight bold :foreground "red"))) + '((((min-colors 88)) (:weight bold :foreground "red1")) + (t (:weight bold :foreground "red"))) "Face for hi-lock mode." :group 'hi-lock-faces) @@ -292,7 +302,7 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." (> (prefix-numeric-value arg) 0))) ;; Turned on. (when (and (not hi-lock-mode-prev) hi-lock-mode) - (add-hook 'find-file-hooks 'hi-lock-find-file-hook) + (add-hook 'find-file-hook 'hi-lock-find-file-hook) (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook) (when (eq nil font-lock-defaults) (setq font-lock-defaults '(nil))) @@ -313,7 +323,7 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." hi-lock-file-patterns nil) (when font-lock-mode (hi-lock-refontify))))) (define-key-after menu-bar-edit-menu [hi-lock] nil) - (remove-hook 'find-file-hooks 'hi-lock-find-file-hook) + (remove-hook 'find-file-hook 'hi-lock-find-file-hook) (remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook)))) @@ -548,14 +558,10 @@ Optional argument END is maximum excursion." (beginning-of-line) (while (and (re-search-forward target-regexp (+ (point) 100) t) (not (looking-at "\\s-*end"))) - (let ((patterns - (condition-case nil - (read (current-buffer)) - (error (message - (format "Could not read expression at %d" - (hi-lock-current-line))) nil)))) - (if patterns - (setq all-patterns (append patterns all-patterns))))))) + (condition-case nil + (setq all-patterns (append (read (current-buffer)) all-patterns)) + (error (message "Invalid pattern list expression at %d" + (hi-lock-current-line))))))) (when hi-lock-mode (hi-lock-set-file-patterns all-patterns)) (if (interactive-p) (message (format "Hi-lock added %d patterns." (length all-patterns))))))) @@ -568,5 +574,5 @@ Optional argument END is maximum excursion." (provide 'hi-lock) -;;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066 +;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066 ;;; hi-lock.el ends here