aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-10-06 17:07:03 -0700
committerGlenn Morris2012-10-06 17:07:03 -0700
commit82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb (patch)
treeba4cabcd3486c5530d9a9e3bef73d809afaca9c7
parent32939005d60a106798ebc8bdd3c4a6180e19902d (diff)
downloademacs-82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb.tar.gz
emacs-82ed3ab40dfa2ac4f9a20b0dd8333058e45e1cfb.zip
* lisp/hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/hi-lock.el6
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 @@
12012-10-07 Glenn Morris <rgm@gnu.org>
2
3 * hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
4
12012-10-06 Glenn Morris <rgm@gnu.org> 52012-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.
447Whitespace in REGEXP converted to arbitrary whitespace and initial 447If called interactively, replaces whitespace in REGEXP with
448lower-case letters made case insensitive. 448arbitrary whitespace and makes initial lower-case letters case-insensitive.
449 449
450If Font Lock mode is enabled in the buffer, it is used to 450If Font Lock mode is enabled in the buffer, it is used to
451highlight REGEXP. If Font Lock mode is disabled, overlays are 451highlight REGEXP. If Font Lock mode is disabled, overlays are
@@ -544,9 +544,11 @@ be found in variable `hi-lock-interactive-patterns'."
544Blanks in PHRASE replaced by regexp that matches arbitrary whitespace 544Blanks in PHRASE replaced by regexp that matches arbitrary whitespace
545and initial lower-case letters made case insensitive." 545and 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))))