;ELC   
;;; compiled by rms@psilocin.gnu.ai.mit.edu on Fri Jun 28 05:53:33 1996
;;; from file /home/fsf/rms/e19/lisp/goto-addr.el
;;; emacs version 19.31.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 (#$ . -507))
#@62 *If t, URL's and e-mail addresses in buffer are highlighted.
(defvar goto-address-highlight-p t (#$ . -674))
#@67 *Maximum size of file in which to fontify and/or highlight URL's.
(defvar goto-address-fontify-maximum-size 30000 (#$ . -789))
#@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]+" (#$ . 922))
#@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_=#$@~`%&*+|\\/]") (#$ . 1086))
#@141 *Function to compose mail.
Two pre-made functions are `goto-address-send-using-mail' (sendmail);
and `goto-address-send-using-mh-e' (MH-E).
(defvar goto-address-mail-method (quote goto-address-send-using-mail) (#$ . -1357))
#@67 keymap to hold goto-addr's mouse key defs under highlighted URLs.
(defvar goto-address-highlight-keymap (byte-code "À Â	ÃÄ#ˆ	)‡" [make-sparse-keymap m define-key [mouse-2] goto-address-at-mouse] 4) (#$ . 1587))
#@24 *Face to use for URLs.
(defvar goto-address-url-face (quote bold) (#$ . -1805))
#@50 *Face to use for URLs when the mouse is on them.
(defvar goto-address-url-mouse-face (quote highlight) (#$ . -1891))
#@36 *Face to use for e-mail addresses.
(defvar goto-address-mail-face (quote italic) (#$ . -2014))
#@62 *Face to use for e-mail addresses when the mouse is on them.
(defvar goto-address-mail-mouse-face (quote secondary-selection) (#$ . -2115))
#@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ƒ† ÆÈÀ#ƒK É”É•\n\fƒ3 Í\nÎ$ˆÍ\nÐ$ˆÍ\nÒ$ˆ*‚ ebˆÆÈÀ#ƒ† É”É•\n\fƒn Í\nÎ$ˆÍ\nÐ$ˆÍ\nÒ$ˆ*‚N Á …“ \n?…“ ×È!,‡" [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 e s goto-address-fontify-p put-text-property face goto-address-url-face mouse-face goto-address-url-mouse-face local-map goto-address-highlight-keymap goto-address-mail-regexp goto-address-mail-face goto-address-mail-mouse-face set-buffer-modified-p] 5 (#$ . 2262)])
#@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 (#$ . 3038) "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 (#$ . 3667) 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 (#$ . 4160)])
(defalias 'goto-address-send-using-mh-e #[(to) "ÀÁ!ˆÂ ˆÃÄ!ÅÆ!Ç 	\nË ˆÌ\n	$+‡" [require mh-comp mh-find-path mh-read-address "Cc: " read-string "Subject: " current-window-configuration config subject cc delete-other-windows mh-send-sub to] 5])
(fset (quote goto-address-send-using-mhe) (quote goto-address-send-using-mh-e))
(defalias 'goto-address-send-using-mail #[(to) "ÀÁ\n\"ˆeb…\f Ã‡" [mail-other-window nil to 2] 3])
#@324 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 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 "" goto-address-at-point goto-address-highlight-p goto-address-fontify] 3 (#$ . 5015) nil])
(provide (quote goto-addr))
