projects
/
elisp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
45e3d97
)
Highlight only the full word, not the occurrences as a part.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 13 Jul 2010 10:30:45 +0000
(12:30 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 13 Jul 2010 10:30:45 +0000
(12:30 +0200)
lookup-dict.el
patch
|
blob
|
history
diff --git
a/lookup-dict.el
b/lookup-dict.el
index
134a495
..
97ec375
100644
(file)
--- a/
lookup-dict.el
+++ b/
lookup-dict.el
@@
-98,10
+98,14
@@
argument \\[universal-argument] forces the third."
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^From.*$" nil t)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^From.*$" nil t)
- (add-text-properties (match-beginning 0) (match-end 0) '(face underline)))
+ (add-text-properties (match-beginning 0)
+ (match-end 0)
+ '(face underline)))
(goto-char (point-min))
(goto-char (point-min))
- (while (re-search-forward word nil t)
- (add-text-properties (match-beginning 0) (match-end 0) '(face bold))))
+ (while (re-search-forward (concat "[^a-zA-Z]\\\(" word "\\\)[^a-zA-Z]") nil t)
+ (add-text-properties (match-beginning 1)
+ (match-end 1)
+ '(face bold))))
)
(setq buffer-read-only t)
)
(setq buffer-read-only t)