aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2005-07-07 01:51:48 +0000
committerJuanma Barranquero2005-07-07 01:51:48 +0000
commited6773fa23b9c8e858cbe91642db7251dbe60947 (patch)
tree3d996f0d233613bb0a1ce6017b91e162dc4828a5
parentdc2204be4f5aeee34eba13ea13f36d788cf8b343 (diff)
downloademacs-ed6773fa23b9c8e858cbe91642db7251dbe60947.tar.gz
emacs-ed6773fa23b9c8e858cbe91642db7251dbe60947.zip
(hi-lock-find-patterns): Protect also against invalid values for the pattern
lists which are `read'able but not `append'able (like symbols).
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/hi-lock.el12
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index df7a4b270ea..f1e29e1bdbd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12005-07-07 Juanma Barranquero <lekktu@gmail.com>
2
3 * hi-lock.el (hi-lock-find-patterns): Protect also against invalid
4 values for the pattern lists which are `read'able but not
5 `append'able (like symbols).
6
12005-07-06 Richard M. Stallman <rms@gnu.org> 72005-07-06 Richard M. Stallman <rms@gnu.org>
2 8
3 * progmodes/flymake.el (flymake-float-time): Instead of 9 * progmodes/flymake.el (flymake-float-time): Instead of
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index c649ed8d465..d7aec9112bc 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -557,14 +557,10 @@ Optional argument END is maximum excursion."
557 (beginning-of-line) 557 (beginning-of-line)
558 (while (and (re-search-forward target-regexp (+ (point) 100) t) 558 (while (and (re-search-forward target-regexp (+ (point) 100) t)
559 (not (looking-at "\\s-*end"))) 559 (not (looking-at "\\s-*end")))
560 (let ((patterns 560 (condition-case nil
561 (condition-case nil 561 (setq all-patterns (append (read (current-buffer)) all-patterns))
562 (read (current-buffer)) 562 (error (message "Invalid pattern list expression at %d"
563 (error (message 563 (hi-lock-current-line)))))))
564 (format "Could not read expression at %d"
565 (hi-lock-current-line))) nil))))
566 (if patterns
567 (setq all-patterns (append patterns all-patterns)))))))
568 (when hi-lock-mode (hi-lock-set-file-patterns all-patterns)) 564 (when hi-lock-mode (hi-lock-set-file-patterns all-patterns))
569 (if (interactive-p) 565 (if (interactive-p)
570 (message (format "Hi-lock added %d patterns." (length all-patterns))))))) 566 (message (format "Hi-lock added %d patterns." (length all-patterns)))))))