Mercurial > emacs
comparison lisp/net/goto-addr.el @ 67083:78a5a90bd7ec
(goto-address-fontify): Put `follow-link' property on mail and url overlays.
(goto-address-at-point): Use `posn-set-point' instead of `mouse-set-point'
because the latter is not fbound when configured without X.
author | John Paul Wallington <jpw@pobox.com> |
---|---|
date | Tue, 22 Nov 2005 22:07:15 +0000 |
parents | 0ade01371c2e |
children | f7b57b2971ba |
comparison
equal
deleted
inserted
replaced
67082:835211576809 | 67083:78a5a90bd7ec |
---|---|
172 (and goto-address-fontify-p | 172 (and goto-address-fontify-p |
173 (overlay-put this-overlay 'face goto-address-url-face)) | 173 (overlay-put this-overlay 'face goto-address-url-face)) |
174 (overlay-put this-overlay 'evaporate t) | 174 (overlay-put this-overlay 'evaporate t) |
175 (overlay-put this-overlay | 175 (overlay-put this-overlay |
176 'mouse-face goto-address-url-mouse-face) | 176 'mouse-face goto-address-url-mouse-face) |
177 (overlay-put this-overlay 'follow-link t) | |
177 (overlay-put this-overlay | 178 (overlay-put this-overlay |
178 'help-echo "mouse-2, C-c RET: follow URL") | 179 'help-echo "mouse-2, C-c RET: follow URL") |
179 (overlay-put this-overlay | 180 (overlay-put this-overlay |
180 'keymap goto-address-highlight-keymap) | 181 'keymap goto-address-highlight-keymap) |
181 (overlay-put this-overlay 'goto-address t))) | 182 (overlay-put this-overlay 'goto-address t))) |
187 (and goto-address-fontify-p | 188 (and goto-address-fontify-p |
188 (overlay-put this-overlay 'face goto-address-mail-face)) | 189 (overlay-put this-overlay 'face goto-address-mail-face)) |
189 (overlay-put this-overlay 'evaporate t) | 190 (overlay-put this-overlay 'evaporate t) |
190 (overlay-put this-overlay 'mouse-face | 191 (overlay-put this-overlay 'mouse-face |
191 goto-address-mail-mouse-face) | 192 goto-address-mail-mouse-face) |
193 (overlay-put this-overlay 'follow-link t) | |
192 (overlay-put this-overlay | 194 (overlay-put this-overlay |
193 'help-echo "mouse-2, C-c RET: mail this address") | 195 'help-echo "mouse-2, C-c RET: mail this address") |
194 (overlay-put this-overlay | 196 (overlay-put this-overlay |
195 'keymap goto-address-highlight-keymap) | 197 'keymap goto-address-highlight-keymap) |
196 (overlay-put this-overlay 'goto-address t)))))))) | 198 (overlay-put this-overlay 'goto-address t)))))))) |
208 Send mail to address at point. See documentation for | 210 Send mail to address at point. See documentation for |
209 `goto-address-find-address-at-point'. If no address is found | 211 `goto-address-find-address-at-point'. If no address is found |
210 there, then load the URL at or before point." | 212 there, then load the URL at or before point." |
211 (interactive (list last-input-event)) | 213 (interactive (list last-input-event)) |
212 (save-excursion | 214 (save-excursion |
213 (if event (mouse-set-point event)) | 215 (if event (posn-set-point (event-end event))) |
214 (let ((address (save-excursion (goto-address-find-address-at-point)))) | 216 (let ((address (save-excursion (goto-address-find-address-at-point)))) |
215 (if (and address | 217 (if (and address |
216 (save-excursion | 218 (save-excursion |
217 (goto-char (previous-single-char-property-change | 219 (goto-char (previous-single-char-property-change |
218 (point) 'goto-address nil | 220 (point) 'goto-address nil |