/[emacs]/emacs/lisp/hi-lock.el
ViewVC logotype

Diff of /emacs/lisp/hi-lock.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by eliz, Fri Aug 31 17:51:52 2001 UTC revision 1.16 by monnier, Fri Feb 1 19:30:23 2002 UTC
# Line 537  Optional argument END is maximum excursi Line 537  Optional argument END is maximum excursi
537      (let ((all-patterns nil)      (let ((all-patterns nil)
538            (target-regexp (concat "\\<" hi-lock-file-patterns-prefix ":")))            (target-regexp (concat "\\<" hi-lock-file-patterns-prefix ":")))
539        (save-excursion        (save-excursion
540          (widen)          (save-restriction
541          (goto-char (point-min))            (widen)
542          (re-search-forward target-regexp            (goto-char (point-min))
543                             (+ (point) hi-lock-file-patterns-range) t)            (re-search-forward target-regexp
544          (beginning-of-line)                               (+ (point) hi-lock-file-patterns-range) t)
545          (while (and (re-search-forward target-regexp (+ (point) 100) t)            (beginning-of-line)
546                      (not (looking-at "\\s-*end")))            (while (and (re-search-forward target-regexp (+ (point) 100) t)
547            (let ((patterns                        (not (looking-at "\\s-*end")))
548                   (condition-case nil              (let ((patterns
549                       (read (current-buffer))                     (condition-case nil
550                     (error  (message                         (read (current-buffer))
551                              (format "Could not read expression at %d"                       (error  (message
552                                      (hi-lock-current-line))) nil))))                                (format "Could not read expression at %d"
553              (if patterns                                        (hi-lock-current-line))) nil))))
554                  (setq all-patterns (append patterns all-patterns))))))                (if patterns
555                      (setq all-patterns (append patterns all-patterns)))))))
556        (when hi-lock-mode (hi-lock-set-file-patterns all-patterns))        (when hi-lock-mode (hi-lock-set-file-patterns all-patterns))
557        (if (interactive-p)        (if (interactive-p)
558          (message (format "Hi-lock added %d patterns." (length all-patterns)))))))          (message (format "Hi-lock added %d patterns." (length all-patterns)))))))

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26