Mercurial > emacs
comparison lisp/hi-lock.el @ 67113:e5cb150b288f
Fix two omissions in last change.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 24 Nov 2005 21:05:33 +0000 |
parents | 146389d32df6 |
children | 440072194b4b |
comparison
equal
deleted
inserted
replaced
67112:146389d32df6 | 67113:e5cb150b288f |
---|---|
295 (font-lock-remove-keywords nil hi-lock-interactive-patterns) | 295 (font-lock-remove-keywords nil hi-lock-interactive-patterns) |
296 (setq hi-lock-interactive-patterns nil)) | 296 (setq hi-lock-interactive-patterns nil)) |
297 (when hi-lock-file-patterns | 297 (when hi-lock-file-patterns |
298 (font-lock-remove-keywords nil hi-lock-file-patterns) | 298 (font-lock-remove-keywords nil hi-lock-file-patterns) |
299 (setq hi-lock-file-patterns nil)) | 299 (setq hi-lock-file-patterns nil)) |
300 (if font-lock-mode (hi-lock-refontify)) | 300 (hi-lock-refontify) |
301 (define-key-after menu-bar-edit-menu [hi-lock] nil) | 301 (define-key-after menu-bar-edit-menu [hi-lock] nil) |
302 (remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook t))) | 302 (remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook t))) |
303 | 303 |
304 ;;;###autoload | 304 ;;;###autoload |
305 (define-global-minor-mode hi-lock-mode | 305 (define-global-minor-mode hi-lock-mode |
514 (hi-lock-refontify))) | 514 (hi-lock-refontify))) |
515 | 515 |
516 (defun hi-lock-refontify () | 516 (defun hi-lock-refontify () |
517 "Unfontify then refontify buffer. Used when hi-lock patterns change." | 517 "Unfontify then refontify buffer. Used when hi-lock patterns change." |
518 (interactive) | 518 (interactive) |
519 (unless font-lock-mode (font-lock-mode 1)) | 519 (if font-lock-mode |
520 (font-lock-fontify-buffer)) | 520 (font-lock-fontify-buffer))) |
521 | 521 |
522 (defun hi-lock-find-patterns () | 522 (defun hi-lock-find-patterns () |
523 "Find patterns in current buffer for hi-lock." | 523 "Find patterns in current buffer for hi-lock." |
524 (interactive) | 524 (interactive) |
525 (unless (memq major-mode hi-lock-exclude-modes) | 525 (unless (memq major-mode hi-lock-exclude-modes) |