]> code.delx.au - gnu-emacs/blobdiff - lisp/hi-lock.el
(nnmail-active-file-coding-system, gnus-original-article-buffer,
[gnu-emacs] / lisp / hi-lock.el
index a924c89ba376586cd1241c0765c464d5ef584470..14920cf93c2f4d3c8b5a0373defb09f78f729fa6 100644 (file)
@@ -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
@@ -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:
 ;;
@@ -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)))))))