summaryrefslogtreecommitdiff
path: root/lisp/hi-lock.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-10-06 17:07:03 -0700
committerGlenn Morris <rgm@gnu.org>2012-10-06 17:07:03 -0700
commit82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb (patch)
treeba4cabcd3486c5530d9a9e3bef73d809afaca9c7 /lisp/hi-lock.el
parent32939005d60a106798ebc8bdd3c4a6180e19902d (diff)
downloademacs-82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb.tar.gz
* lisp/hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
Diffstat (limited to 'lisp/hi-lock.el')
-rw-r--r--lisp/hi-lock.el6
1 files changed, 4 insertions, 2 deletions
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."
;;;###autoload
(defun hi-lock-face-phrase-buffer (regexp &optional face)
"Set face of each match of phrase REGEXP to FACE.
-Whitespace in REGEXP converted to arbitrary whitespace and initial
-lower-case letters made case insensitive.
+If called interactively, replaces whitespace in REGEXP with
+arbitrary whitespace and makes initial lower-case letters case-insensitive.
If Font Lock mode is enabled in the buffer, it is used to
highlight REGEXP. If Font Lock mode is disabled, overlays are
@@ -544,9 +544,11 @@ be found in variable `hi-lock-interactive-patterns'."
Blanks in PHRASE replaced by regexp that matches arbitrary whitespace
and initial lower-case letters made case insensitive."
(let ((mod-phrase nil))
+ ;; FIXME fragile; better to just bind case-fold-search? (Bug#7161)
(setq mod-phrase
(replace-regexp-in-string
"\\<[a-z]" (lambda (m) (format "[%s%s]" (upcase m) m)) phrase))
+ ;; FIXME fragile; better to use search-spaces-regexp?
(setq mod-phrase
(replace-regexp-in-string
"\\s-+" "[ \t\n]+" mod-phrase nil t))))