aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-12-10 23:29:51 +0000
committerRichard M. Stallman1996-12-10 23:29:51 +0000
commit79dc9431d8a925a5aa4b4d1023d26c188da9338a (patch)
tree5111e76fa4c6fe0ef0ac38c8718202384dcba8c3
parentb6436d4e83ef84c23bf75d174e89b57e9a6765af (diff)
downloademacs-79dc9431d8a925a5aa4b4d1023d26c188da9338a.tar.gz
emacs-79dc9431d8a925a5aa4b4d1023d26c188da9338a.zip
(goto-address-fontify): Use overlay, not text props.
-rw-r--r--lisp/goto-addr.el28
1 files changed, 16 insertions, 12 deletions
diff --git a/lisp/goto-addr.el b/lisp/goto-addr.el
index 4c40232df42..ecf64b3dcfb 100644
--- a/lisp/goto-addr.el
+++ b/lisp/goto-addr.el
@@ -130,22 +130,26 @@ and `goto-address-fontify-p'."
130 (if (< (- (point-max) (point)) goto-address-fontify-maximum-size) 130 (if (< (- (point-max) (point)) goto-address-fontify-maximum-size)
131 (progn 131 (progn
132 (while (re-search-forward goto-address-url-regexp nil t) 132 (while (re-search-forward goto-address-url-regexp nil t)
133 (let ((s (match-beginning 0)) 133 (let* ((s (match-beginning 0))
134 (e (match-end 0))) 134 (e (match-end 0))
135 (this-overlay (make-overlay s e)))
135 (and goto-address-fontify-p 136 (and goto-address-fontify-p
136 (put-text-property s e 'face goto-address-url-face)) 137 (overlay-put this-overlay 'face goto-address-url-face))
137 (put-text-property s e 'mouse-face goto-address-url-mouse-face) 138 (overlay-put this-overlay
138 (put-text-property 139 'mouse-face goto-address-url-mouse-face)
139 s e 'local-map goto-address-highlight-keymap))) 140 (overlay-put this-overlay
141 'local-map goto-address-highlight-keymap)))
140 (goto-char (point-min)) 142 (goto-char (point-min))
141 (while (re-search-forward goto-address-mail-regexp nil t) 143 (while (re-search-forward goto-address-mail-regexp nil t)
142 (let ((s (match-beginning 0)) 144 (let* ((s (match-beginning 0))
143 (e (match-end 0))) 145 (e (match-end 0))
146 (this-overlay (make-overlay s e)))
144 (and goto-address-fontify-p 147 (and goto-address-fontify-p
145 (put-text-property s e 'face goto-address-mail-face)) 148 (overlay-put this-overlay 'face goto-address-mail-face))
146 (put-text-property s e 'mouse-face goto-address-mail-mouse-face) 149 (overlay-put this-overlay 'mouse-face
147 (put-text-property 150 goto-address-mail-mouse-face)
148 s e 'local-map goto-address-highlight-keymap))))) 151 (overlay-put this-overlay
152 'local-map goto-address-highlight-keymap)))))
149 (and (buffer-modified-p) 153 (and (buffer-modified-p)
150 (not modified) 154 (not modified)
151 (set-buffer-modified-p nil))))) 155 (set-buffer-modified-p nil)))))