X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/086add1519b5c5a69a1a35aadbfd4d7cc6a2b294..8248b7cace199410e36858d26436266b2bbd59a5:/lisp/hi-lock.el diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index c649ed8d46..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, 2005 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 @@ -557,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)))))))