2012-10-07 Glenn Morris <rgm@gnu.org>
+ * 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 <rgm@gnu.org>
;; 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