aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/goto-addr.el37
2 files changed, 12 insertions, 33 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 55214b1b408..bdc88905563 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
11999-02-22 Sam Steingold <sds@goems.com>
2
3 * goto-addr.el (goto-address-at-mouse,
4 goto-address-find-address-at-point): use compose-mail.
5 (goto-address-mail-method): removed variable.
6 (goto-address-send-using-mh-e, goto-address-send-using-mhe,
7 goto-address-send-using-mail): removed functions.
8
11998-11-03 Sam Steingold <sds@goems.com> 91998-11-03 Sam Steingold <sds@goems.com>
2 10
3 * simple.el (backward-delete-char-untabify): 11 * simple.el (backward-delete-char-untabify):
diff --git a/lisp/goto-addr.el b/lisp/goto-addr.el
index 05c55684b45..2cf502bad6a 100644
--- a/lisp/goto-addr.el
+++ b/lisp/goto-addr.el
@@ -36,13 +36,8 @@
36;; 36;;
37;; To use goto-address in a particular mode (for example, while 37;; To use goto-address in a particular mode (for example, while
38;; reading mail in mh-e), add something like this in your .emacs file: 38;; reading mail in mh-e), add something like this in your .emacs file:
39;;
40;; (add-hook 'mh-show-mode-hook 'goto-address)
41;;
42;; By default, goto-address now sends using `mail' instead of `mh-send'.
43;; To use mh-e to send mail, add the following to your .emacs file:
44;; 39;;
45;; (setq goto-address-mail-method 'goto-address-send-using-mh-e) 40;; (add-hook 'mh-show-mode-hook 'goto-address)
46;; 41;;
47;; The mouse click method is bound to [mouse-2] on highlighted URL's or 42;; The mouse click method is bound to [mouse-2] on highlighted URL's or
48;; e-mail addresses only; it functions normally everywhere else. To bind 43;; e-mail addresses only; it functions normally everywhere else. To bind
@@ -106,14 +101,6 @@ But only if `goto-address-highlight-p' is also non-nil."
106 "[-a-zA-Z0-9_=#$@~`%&*+|\\/]") 101 "[-a-zA-Z0-9_=#$@~`%&*+|\\/]")
107 "A regular expression probably matching a URL.") 102 "A regular expression probably matching a URL.")
108 103
109(defcustom goto-address-mail-method
110 'goto-address-send-using-mail
111 "*Function to compose mail.
112Two pre-made functions are `goto-address-send-using-mail' (sendmail);
113and `goto-address-send-using-mh-e' (MH-E)."
114 :type 'function
115 :group 'goto-address)
116
117(defvar goto-address-highlight-keymap 104(defvar goto-address-highlight-keymap
118 (let ((m (make-sparse-keymap))) 105 (let ((m (make-sparse-keymap)))
119 (define-key m [mouse-2] 'goto-address-at-mouse) 106 (define-key m [mouse-2] 'goto-address-at-mouse)
@@ -197,7 +184,7 @@ there, then load the URL at or before the position of the mouse click."
197 (if (string-equal url "") 184 (if (string-equal url "")
198 (error "No e-mail address or URL found") 185 (error "No e-mail address or URL found")
199 (browse-url url))) 186 (browse-url url)))
200 (funcall goto-address-mail-method address)))))) 187 (compose-mail address))))))
201 188
202;;;###autoload 189;;;###autoload
203(defun goto-address-at-point () 190(defun goto-address-at-point ()
@@ -213,7 +200,7 @@ there, then load the URL at or before point."
213 (if (string-equal url "") 200 (if (string-equal url "")
214 (error "No e-mail address or URL found") 201 (error "No e-mail address or URL found")
215 (browse-url url))) 202 (browse-url url)))
216 (funcall goto-address-mail-method address))))) 203 (compose-mail address)))))
217 204
218(defun goto-address-find-address-at-point () 205(defun goto-address-find-address-at-point ()
219 "Find e-mail address around or before point. 206 "Find e-mail address around or before point.
@@ -226,23 +213,7 @@ address. If no e-mail address found, return the empty string."
226 (and (re-search-forward goto-address-mail-regexp eol 'lim) 213 (and (re-search-forward goto-address-mail-regexp eol 'lim)
227 (goto-char (match-beginning 0))))) 214 (goto-char (match-beginning 0)))))
228 (buffer-substring (match-beginning 0) (match-end 0)) 215 (buffer-substring (match-beginning 0) (match-end 0))
229 ""))) 216 "")))m
230
231(defun goto-address-send-using-mh-e (to)
232 (require 'mh-comp)
233 (mh-find-path)
234 (let ((cc (mh-read-address "Cc: "))
235 (subject (read-string "Subject: "))
236 (config (current-window-configuration)))
237 (delete-other-windows)
238 (mh-send-sub to cc subject config)))
239
240(fset 'goto-address-send-using-mhe 'goto-address-send-using-mh-e)
241
242(defun goto-address-send-using-mail (to)
243 (mail-other-window nil to)
244 (and (goto-char (point-min))
245 (end-of-line 2)))
246 217
247;;;###autoload 218;;;###autoload
248(defun goto-address () 219(defun goto-address ()