diff options
| author | Glenn Morris | 2012-10-06 17:07:03 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-10-06 17:07:03 -0700 |
| commit | 82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb (patch) | |
| tree | ba4cabcd3486c5530d9a9e3bef73d809afaca9c7 | |
| parent | 32939005d60a106798ebc8bdd3c4a6180e19902d (diff) | |
| download | emacs-82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb.tar.gz emacs-82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb.zip | |
* lisp/hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/hi-lock.el | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2453dc2177a..4469c6112f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-10-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * hi-lock.el (hi-lock-face-phrase-buffer): Doc fix. | ||
| 4 | |||
| 1 | 2012-10-06 Glenn Morris <rgm@gnu.org> | 5 | 2012-10-06 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * ehelp.el (electric-help-mode): Use help-mode rather than | 7 | * ehelp.el (electric-help-mode): Use help-mode rather than |
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index f92e2ab0af2..0bbb3150874 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el | |||
| @@ -444,8 +444,8 @@ updated as you type." | |||
| 444 | ;;;###autoload | 444 | ;;;###autoload |
| 445 | (defun hi-lock-face-phrase-buffer (regexp &optional face) | 445 | (defun hi-lock-face-phrase-buffer (regexp &optional face) |
| 446 | "Set face of each match of phrase REGEXP to FACE. | 446 | "Set face of each match of phrase REGEXP to FACE. |
| 447 | Whitespace in REGEXP converted to arbitrary whitespace and initial | 447 | If called interactively, replaces whitespace in REGEXP with |
| 448 | lower-case letters made case insensitive. | 448 | arbitrary whitespace and makes initial lower-case letters case-insensitive. |
| 449 | 449 | ||
| 450 | If Font Lock mode is enabled in the buffer, it is used to | 450 | If Font Lock mode is enabled in the buffer, it is used to |
| 451 | highlight REGEXP. If Font Lock mode is disabled, overlays are | 451 | highlight REGEXP. If Font Lock mode is disabled, overlays are |
| @@ -544,9 +544,11 @@ be found in variable `hi-lock-interactive-patterns'." | |||
| 544 | Blanks in PHRASE replaced by regexp that matches arbitrary whitespace | 544 | Blanks in PHRASE replaced by regexp that matches arbitrary whitespace |
| 545 | and initial lower-case letters made case insensitive." | 545 | and initial lower-case letters made case insensitive." |
| 546 | (let ((mod-phrase nil)) | 546 | (let ((mod-phrase nil)) |
| 547 | ;; FIXME fragile; better to just bind case-fold-search? (Bug#7161) | ||
| 547 | (setq mod-phrase | 548 | (setq mod-phrase |
| 548 | (replace-regexp-in-string | 549 | (replace-regexp-in-string |
| 549 | "\\<[a-z]" (lambda (m) (format "[%s%s]" (upcase m) m)) phrase)) | 550 | "\\<[a-z]" (lambda (m) (format "[%s%s]" (upcase m) m)) phrase)) |
| 551 | ;; FIXME fragile; better to use search-spaces-regexp? | ||
| 550 | (setq mod-phrase | 552 | (setq mod-phrase |
| 551 | (replace-regexp-in-string | 553 | (replace-regexp-in-string |
| 552 | "\\s-+" "[ \t\n]+" mod-phrase nil t)))) | 554 | "\\s-+" "[ \t\n]+" mod-phrase nil t)))) |