# HG changeset patch # User Richard M. Stallman # Date 850260591 0 # Node ID 22c70a622b6709c50778248dac6178508219957e # Parent 16f2e24baf4212e066e06aadaf92897fcbce4759 (goto-address-fontify): Use overlay, not text props. diff -r 16f2e24baf42 -r 22c70a622b67 lisp/goto-addr.el --- a/lisp/goto-addr.el Tue Dec 10 23:29:00 1996 +0000 +++ b/lisp/goto-addr.el Tue Dec 10 23:29:51 1996 +0000 @@ -130,22 +130,26 @@ (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)))))