emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110402: * lisp/hi-lock.el (hi-lock-f


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110402: * lisp/hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
Date: Sat, 06 Oct 2012 17:07:03 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110402
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2012-10-06 17:07:03 -0700
message:
  * lisp/hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
modified:
  lisp/ChangeLog
  lisp/hi-lock.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-06 23:22:52 +0000
+++ b/lisp/ChangeLog    2012-10-07 00:07:03 +0000
@@ -1,3 +1,7 @@
+2012-10-07  Glenn Morris  <address@hidden>
+
+       * hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
+
 2012-10-06  Glenn Morris  <address@hidden>
 
        * ehelp.el (electric-help-mode): Use help-mode rather than

=== modified file 'lisp/hi-lock.el'
--- a/lisp/hi-lock.el   2012-09-17 05:41:04 +0000
+++ b/lisp/hi-lock.el   2012-10-07 00:07:03 +0000
@@ -444,8 +444,8 @@
 ;;;###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 @@
 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))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]