emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110403: * lisp/hi-lock.el (hi-lock-process-phrase): Try to make it less fragile.
Date: Sat, 06 Oct 2012 17:27:31 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110403
fixes bug: http://debbugs.gnu.org/7161
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2012-10-06 17:27:31 -0700
message:
  * lisp/hi-lock.el (hi-lock-process-phrase): Try to make it less fragile.
modified:
  lisp/ChangeLog
  lisp/hi-lock.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-07 00:07:03 +0000
+++ b/lisp/ChangeLog    2012-10-07 00:27:31 +0000
@@ -1,5 +1,8 @@
 2012-10-07  Glenn Morris  <address@hidden>
 
+       * hi-lock.el (hi-lock-process-phrase):
+       Try to make it less fragile.  (Bug#7161)
+
        * hi-lock.el (hi-lock-face-phrase-buffer): Doc fix.
 
 2012-10-06  Glenn Morris  <address@hidden>

=== modified file 'lisp/hi-lock.el'
--- a/lisp/hi-lock.el   2012-10-07 00:07:03 +0000
+++ b/lisp/hi-lock.el   2012-10-07 00:27:31 +0000
@@ -547,7 +547,11 @@
     ;; 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))
+           "\\(^\\|\\s-\\)\\([a-z]\\)"
+           (lambda (m) (format "%s[%s%s]"
+                               (match-string 1 m)
+                               (upcase (match-string 2 m))
+                               (match-string 2 m))) phrase))
     ;; FIXME fragile; better to use search-spaces-regexp?
     (setq mod-phrase
           (replace-regexp-in-string


reply via email to

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