From: shuhei-k Date: Wed, 24 Jun 1998 13:45:08 +0000 (+0000) Subject: (mime-preview-play-current-entity): Use optional arg of `interactive'. X-Git-Tag: remi-1_8_0~10 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99bd314f843b406309936815097b5cd8be07696a;p=elisp%2Fsemi.git (mime-preview-play-current-entity): Use optional arg of `interactive'. (mime-view-message/external-anon-ftp): Renamed from `mime-view-message/external-ftp'. (mime-raw-browse-url-function): New variable. (mime-view-message/external-url): New function. --- diff --git a/mime-play.el b/mime-play.el index d2e2f61..f9834bd 100644 --- a/mime-play.el +++ b/mime-play.el @@ -34,8 +34,8 @@ (require 'mime-text) (condition-case nil (require 'bbdb) - (error (defvar bbdb-buffer-name nil)) - )) + (error (defvar bbdb-buffer-name nil))) + ) (defvar mime-acting-situation-examples nil) @@ -73,9 +73,7 @@ It decodes current entity to call internal or external method. The method is selected from variable `mime-acting-condition'. If MODE is specified, play as it. Default MODE is \"play\"." - (interactive) - (or mode - (setq mode "play")) + (interactive (list "play")) (let ((entity (get-text-property (point) 'mime-view-entity))) (if entity (let ((the-buf (current-buffer)) @@ -577,17 +575,24 @@ saved as binary. Otherwise the region is saved by `write-region'." (dired dir) )) -(defun mime-view-message/external-ftp (entity cal) +(defun mime-view-message/external-anon-ftp (entity cal) (let* ((site (cdr (assoc "site" cal))) (directory (cdr (assoc "directory" cal))) (name (cdr (assoc "name" cal))) (pathname (concat "/anonymous@" site ":" directory))) - (message (concat "Accessing " (expand-file-name name pathname) "...")) + (message (concat "Accessing " (expand-file-name name pathname) " ...")) (funcall mime-raw-dired-function pathname) (goto-char (point-min)) (search-forward name) )) +(defvar mime-raw-browse-url-function (function mime-browse-url)) + +(defun mime-view-message/external-url (entity cal) + (let ((url (cdr (assoc "url" cal)))) + (message (concat "Accessing " url " ...")) + (funcall mime-raw-browse-url-function url))) + ;;; @ rot13-47 ;;;