;ELC   
;;; compiled by rms@mole.gnu.ai.mit.edu on Fri Nov 17 14:11:59 1995
;;; from file /home/fsf/rms/e19/lisp/goto-addr.el
;;; emacs version 19.29.91.3.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`goto-addr.el' was compiled for Emacs 19.29 or later"))


(require (quote browse-url))
#@116 *If t, URL's and e-mail addresses in buffer are fontified.
But only if `goto-address-highlight-p' is also non-nil.
(defvar goto-address-fontify-p t (#$ . -506))
#@62 *If t, URL's and e-mail addresses in buffer are highlighted.
(defvar goto-address-highlight-p t (#$ . -673))
#@67 *Maximum size of file in which to fontify and/or highlight URL's.
(defvar goto-address-fontify-maximum-size 30000 (#$ . -788))
#@59 A regular expression probably matching an e-mail address.
(defvar goto-address-mail-regexp "[-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" (#$ . 921))
#@47 A regular expression probably matching a URL.
(defvar goto-address-url-regexp (concat "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|" "telnet\\|wais\\):\\(//[-a-zA-Z0-9_.]+:" "[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*" "[-a-zA-Z0-9_=#$@~`%&*+|\\/]") (#$ . 1085))
#@140 *Function to compose mail.
Two pre-made functions are `goto-address-send-using-mail' (sendmail);
and `goto-address-send-using-mhe' (MH-E).
(defvar goto-address-mail-method (quote goto-address-send-using-mail) (#$ . -1356))
#@145 Fontify the URL's and e-mail addresses in the current buffer.
This function implements `goto-address-highlight-p'
and `goto-address-fontify-p'.
(defalias 'goto-address-fontify #[nil "ŠÀ‰Á ebˆd`ZWƒd ÆÈÀ#ƒ: É•bˆ\nƒ. ËÉ”É•ÌÍ$ˆËÉ”É•ÎÏ$ˆ‚ ebˆÆÈÀ#ƒd É•bˆ\nƒX ËÉ”É•ÌÑ$ˆËÉ”É•ÎÒ$ˆ‚= Á …q \n?…q ÓÈ!,‡" [t buffer-modified-p modified inhibit-point-motion-hooks inhibit-read-only goto-address-fontify-maximum-size re-search-forward goto-address-url-regexp nil 0 goto-address-fontify-p put-text-property face bold mouse-face highlight goto-address-mail-regexp italic secondary-selection set-buffer-modified-p] 5 (#$ . 1586)])
#@273 Send to the e-mail address or load the URL clicked with the mouse.
Send mail to address at position of mouse click.  See documentation for
`goto-address-find-address-at-point'.  If no address is found
there, then load the URL at or before the position of the mouse click.
(defalias 'goto-address-at-mouse #[(event) "Š‰A@)Â	‰@)!qˆ	‰A@:ƒ! A@@‚$ A@)bˆŠÄ )‰Æ˜ƒK Ç ‰Æ˜ƒB ÉÊ!‚G !)‚O \f!+‡" [event posn window-buffer position goto-address-find-address-at-point address "" browse-url-url-at-point url error "No e-mail address or URL found" browse-url-browser-function goto-address-mail-method] 3 (#$ . 2216) "e"])
#@215 Send to the e-mail address or load the URL at point.
Send mail to address at point.  See documentation for
`goto-address-find-address-at-point'.  If no address is found
there, then load the URL at or before point.
(defalias 'goto-address-at-point #[nil "ŠŠÀ )‰Â˜ƒ# Ã ‰Â˜ƒ ÅÆ!‚ \f!)‚' 	!*‡" [goto-address-find-address-at-point address "" browse-url-url-at-point url error "No e-mail address or URL found" browse-url-browser-function goto-address-mail-method] 3 (#$ . 2845) nil])
#@178 Find e-mail address around or before point.
Then search backwards to beginning of line for the start of an e-mail
address.  If no e-mail address found, return the empty string.
(defalias 'goto-address-find-address-at-point #[nil "ŠÀyˆ`)ÂÃ	Ä#ˆÅ!„- ŠÇˆ`)ÉÄ#…) À”b)ƒ5 À”À•{‚6 Ê)‡" [0 bol re-search-backward "[^-_A-z0-9.@]" lim looking-at goto-address-mail-regexp nil eol re-search-forward ""] 4 (#$ . 3338)])
(defalias 'goto-address-send-using-mhe #[(to) "À ˆÁÂ!ÃÄ!Å É ˆÊ$+‡" [mh-find-path mh-read-address "Cc: " read-string "Subject: " current-window-configuration config subject cc delete-other-windows mh-send-sub to] 5])
(defalias 'goto-address-send-using-mail #[(to) "ÀÁ\n\"ˆeb…\f Ã‡" [mail-other-window nil to 2] 3])
#@326 Sets up goto-address functionality in the current buffer.
Allows user to use mouse/keyboard command to click to go to a URL
or to send e-mail.
By default, goto-address binds to S-mouse-2 and C-c RET.

Also fontifies the buffer appropriately (see `goto-address-fontify-p' and
`goto-address-highlight-p' for more information).
(defalias 'goto-address #[nil "ÀÁÂ\"ˆÀÃÄ\"ˆ… Æ ‡" [local-set-key [S-mouse-2] goto-address-at-mouse "" goto-address-at-point goto-address-highlight-p goto-address-fontify] 3 (#$ . 4090) nil])
(provide (quote goto-addr))
