X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=lookup-dict.el;fp=lookup-dict.el;h=97ec375d5f2c7db278165d0c468cd50e4d04e6db;hb=37f3cfd18232581e51131e2ab6dc91f06a91acef;hp=134a4954eeb1dbcd619e3f44b96e9738a8d3bc10;hpb=45e3d9786a0cbc8561fbaf6245b35d801c66e40f;p=elisp.git diff --git a/lookup-dict.el b/lookup-dict.el index 134a495..97ec375 100644 --- 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) - (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)) - (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)