;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Version:
-;; $Id: mime-text.el,v 0.6 1997-02-25 07:35:02 tmorioka Exp $
+;; $Id: mime-text.el,v 0.10 1997-02-27 06:37:05 tmorioka Exp $
;; Keywords: text, MIME, multimedia, mail, news
;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
;;; @ for URL
;;;
+(require 'browse-url)
+
(defvar mime-text-url-regexp
"\\(http\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]"
"*Regexp to match URL in text/plain body.")
-(defvar browse-url-browser-function nil)
-
-(defun tm:browse-url (&optional url)
+(defun mime-text-browse-url (&optional url)
(if (fboundp browse-url-browser-function)
(if url
(funcall browse-url-browser-function url)
(call-interactively browse-url-browser-function))
- (if (fboundp tm:mother-button-dispatcher)
- (call-interactively tm:mother-button-dispatcher)
+ (if (fboundp mime-button-mother-dispatcher)
+ (call-interactively mime-button-mother-dispatcher)
)
))
(while (re-search-forward mime-text-url-regexp nil t)
(let ((beg (match-beginning 0))
(end (match-end 0)))
- (tm:add-button beg end
- (function tm:browse-url)
- (list (buffer-substring beg end))))
+ (mime-add-button beg end
+ (function mime-text-browse-url)
+ (list (buffer-substring beg end))))
)))
(run-hooks 'mime-view-plain-text-preview-hook)
)