summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-10 23:29:51 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-10 23:29:51 +0000
commit5d4fbbf34180d3b098b9974f145d5606ac8b7d2d (patch)
tree47989f2aa79d23f2617a6387d184e5be52762911
parentdc84c0462ab6641fad51f236e508e7ab70d0fc45 (diff)
downloademacs-5d4fbbf34180d3b098b9974f145d5606ac8b7d2d.tar.gz
(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'."
(if (< (- (point-max) (point)) goto-address-fontify-maximum-size)
(progn
(while (re-search-forward goto-address-url-regexp nil t)
- (let ((s (match-beginning 0))
- (e (match-end 0)))
+ (let* ((s (match-beginning 0))
+ (e (match-end 0))
+ (this-overlay (make-overlay s e)))
(and goto-address-fontify-p
- (put-text-property s e 'face goto-address-url-face))
- (put-text-property s e 'mouse-face goto-address-url-mouse-face)
- (put-text-property
- s e 'local-map goto-address-highlight-keymap)))
+ (overlay-put this-overlay 'face goto-address-url-face))
+ (overlay-put this-overlay
+ 'mouse-face goto-address-url-mouse-face)
+ (overlay-put this-overlay
+ 'local-map goto-address-highlight-keymap)))
(goto-char (point-min))
(while (re-search-forward goto-address-mail-regexp nil t)
- (let ((s (match-beginning 0))
- (e (match-end 0)))
+ (let* ((s (match-beginning 0))
+ (e (match-end 0))
+ (this-overlay (make-overlay s e)))
(and goto-address-fontify-p
- (put-text-property s e 'face goto-address-mail-face))
- (put-text-property s e 'mouse-face goto-address-mail-mouse-face)
- (put-text-property
- s e 'local-map goto-address-highlight-keymap)))))
+ (overlay-put this-overlay 'face goto-address-mail-face))
+ (overlay-put this-overlay 'mouse-face
+ goto-address-mail-mouse-face)
+ (overlay-put this-overlay
+ 'local-map goto-address-highlight-keymap)))))
(and (buffer-modified-p)
(not modified)
(set-buffer-modified-p nil)))))