summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-06-24 16:53:55 +0000
committerRichard M. Stallman <rms@gnu.org>1996-06-24 16:53:55 +0000
commit31158b62baf09f5ce7d8ba2f1fd1c3f18e478a04 (patch)
tree96f5a2dab753ab97e691fec370f887d04d7c361f
parent6122fc0beb243783208ed2f439711170412da2ff (diff)
downloademacs-31158b62baf09f5ce7d8ba2f1fd1c3f18e478a04.tar.gz
(goto-address-url-face, goto-address-mail-face)
(goto-address-url-mouse-face): New variables. (goto-address-fontify): Use them.
-rw-r--r--lisp/goto-addr.el24
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/goto-addr.el b/lisp/goto-addr.el
index 30f7eca8137..4c40232df42 100644
--- a/lisp/goto-addr.el
+++ b/lisp/goto-addr.el
@@ -106,6 +106,18 @@ and `goto-address-send-using-mh-e' (MH-E).")
m)
"keymap to hold goto-addr's mouse key defs under highlighted URLs.")
+(defvar goto-address-url-face 'bold
+ "*Face to use for URLs.")
+
+(defvar goto-address-url-mouse-face 'highlight
+ "*Face to use for URLs when the mouse is on them.")
+
+(defvar goto-address-mail-face 'italic
+ "*Face to use for e-mail addresses.")
+
+(defvar goto-address-mail-mouse-face 'secondary-selection
+ "*Face to use for e-mail addresses when the mouse is on them.")
+
(defun goto-address-fontify ()
"Fontify the URL's and e-mail addresses in the current buffer.
This function implements `goto-address-highlight-p'
@@ -120,22 +132,18 @@ and `goto-address-fontify-p'."
(while (re-search-forward goto-address-url-regexp nil t)
(let ((s (match-beginning 0))
(e (match-end 0)))
- (goto-char e)
(and goto-address-fontify-p
- (put-text-property s e 'face 'bold))
- (put-text-property s e 'mouse-face 'highlight)
+ (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)))
(goto-char (point-min))
(while (re-search-forward goto-address-mail-regexp nil t)
(let ((s (match-beginning 0))
(e (match-end 0)))
- (goto-char (match-end 0))
(and goto-address-fontify-p
- (put-text-property (match-beginning 0) (match-end 0)
- 'face 'italic))
- (put-text-property (match-beginning 0) (match-end 0)
- 'mouse-face 'secondary-selection)
+ (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)))))
(and (buffer-modified-p)