diff options
| author | Chong Yidong | 2005-11-29 22:28:59 +0000 |
|---|---|---|
| committer | Chong Yidong | 2005-11-29 22:28:59 +0000 |
| commit | 597767dac7a956634df23884ae828b8a7dcdeb12 (patch) | |
| tree | e6c99e765deb5c937057adadbf1c4ab770393e0c /lisp | |
| parent | 13ea43e96a9fed928c892a7f56b1dacfb5487d1c (diff) | |
| download | emacs-597767dac7a956634df23884ae828b8a7dcdeb12.tar.gz emacs-597767dac7a956634df23884ae828b8a7dcdeb12.zip | |
* hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use hi-yellow face.
(hi-lock-write-interactive-patterns): Use comment-region.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/hi-lock.el | 23 |
2 files changed, 17 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 881f78f1fd5..3bec02e90ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2005-11-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer) | ||
| 4 | (hi-lock-face-phrase-buffer): Use hi-yellow face. | ||
| 5 | (hi-lock-write-interactive-patterns): Use comment-region. | ||
| 6 | |||
| 1 | 2005-11-29 Reiner Steib <Reiner.Steib@gmx.de> | 7 | 2005-11-29 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 8 | ||
| 3 | * international/latexenc.el (latex-inputenc-coding-alist): Reword | 9 | * international/latexenc.el (latex-inputenc-coding-alist): Reword |
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index aa40ad2ae5e..4c61be5529e 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el | |||
| @@ -331,7 +331,7 @@ list maintained for regexps, global history maintained for faces. | |||
| 331 | (cons (or (car hi-lock-regexp-history) "") 1 ) | 331 | (cons (or (car hi-lock-regexp-history) "") 1 ) |
| 332 | nil nil 'hi-lock-regexp-history)) | 332 | nil nil 'hi-lock-regexp-history)) |
| 333 | (hi-lock-read-face-name))) | 333 | (hi-lock-read-face-name))) |
| 334 | (or (facep face) (setq face 'rwl-yellow)) | 334 | (or (facep face) (setq face 'hi-yellow)) |
| 335 | (unless hi-lock-buffer-mode (hi-lock-buffer-mode 1)) | 335 | (unless hi-lock-buffer-mode (hi-lock-buffer-mode 1)) |
| 336 | (hi-lock-set-pattern | 336 | (hi-lock-set-pattern |
| 337 | ;; The \\(?:...\\) grouping construct ensures that a leading ^, +, * or ? | 337 | ;; The \\(?:...\\) grouping construct ensures that a leading ^, +, * or ? |
| @@ -356,7 +356,7 @@ list maintained for regexps, global history maintained for faces. | |||
| 356 | (cons (or (car hi-lock-regexp-history) "") 1 ) | 356 | (cons (or (car hi-lock-regexp-history) "") 1 ) |
| 357 | nil nil 'hi-lock-regexp-history)) | 357 | nil nil 'hi-lock-regexp-history)) |
| 358 | (hi-lock-read-face-name))) | 358 | (hi-lock-read-face-name))) |
| 359 | (or (facep face) (setq face 'rwl-yellow)) | 359 | (or (facep face) (setq face 'hi-yellow)) |
| 360 | (unless hi-lock-buffer-mode (hi-lock-buffer-mode 1)) | 360 | (unless hi-lock-buffer-mode (hi-lock-buffer-mode 1)) |
| 361 | (hi-lock-set-pattern regexp face)) | 361 | (hi-lock-set-pattern regexp face)) |
| 362 | 362 | ||
| @@ -376,7 +376,7 @@ lower-case letters made case insensitive." | |||
| 376 | (cons (or (car hi-lock-regexp-history) "") 1 ) | 376 | (cons (or (car hi-lock-regexp-history) "") 1 ) |
| 377 | nil nil 'hi-lock-regexp-history))) | 377 | nil nil 'hi-lock-regexp-history))) |
| 378 | (hi-lock-read-face-name))) | 378 | (hi-lock-read-face-name))) |
| 379 | (or (facep face) (setq face 'rwl-yellow)) | 379 | (or (facep face) (setq face 'hi-yellow)) |
| 380 | (unless hi-lock-buffer-mode (hi-lock-buffer-mode 1)) | 380 | (unless hi-lock-buffer-mode (hi-lock-buffer-mode 1)) |
| 381 | (hi-lock-set-pattern regexp face)) | 381 | (hi-lock-set-pattern regexp face)) |
| 382 | 382 | ||
| @@ -440,17 +440,16 @@ Interactively added patterns are those normally specified using | |||
| 440 | `highlight-regexp' and `highlight-lines-matching-regexp'; they can | 440 | `highlight-regexp' and `highlight-lines-matching-regexp'; they can |
| 441 | be found in variable `hi-lock-interactive-patterns'." | 441 | be found in variable `hi-lock-interactive-patterns'." |
| 442 | (interactive) | 442 | (interactive) |
| 443 | (let ((prefix (format "%s %s:" (or comment-start "") "Hi-lock"))) | 443 | (if (null hi-lock-interactive-patterns) |
| 444 | (when (> (+ (point) (length prefix)) hi-lock-file-patterns-range) | 444 | (error "There are no interactive patterns")) |
| 445 | (beep) | 445 | (let ((beg (point))) |
| 446 | (message | ||
| 447 | "Warning, inserted keywords not close enough to top of file.")) | ||
| 448 | (mapcar | 446 | (mapcar |
| 449 | (lambda (pattern) | 447 | (lambda (pattern) |
| 450 | (insert (format "%s (%s) %s\n" | 448 | (insert (format "Hi-lock: (%s)\n" (prin1-to-string pattern)))) |
| 451 | prefix (prin1-to-string pattern) (or comment-end "")))) | 449 | hi-lock-interactive-patterns) |
| 452 | hi-lock-interactive-patterns))) | 450 | (comment-region beg (point))) |
| 453 | 451 | (when (> (point) hi-lock-file-patterns-range) | |
| 452 | (warn "Inserted keywords not close enough to top of file"))) | ||
| 454 | 453 | ||
| 455 | ;; Implementation Functions | 454 | ;; Implementation Functions |
| 456 | 455 | ||