From 741286e6b94fbbda876e26689aeb7b42a3e1c2f2 Mon Sep 17 00:00:00 2001 From: "Peder O. Klingenberg" Date: Tue, 30 Dec 2014 10:00:25 +0100 Subject: [PATCH] mm-decode.el: Make non-string display methods work. * mm-decode.el (mm-display-part): Make non-string methods work. Non-string methods are funcalled and work just fine, the test was bogus. Signed-off-by: Peder O. Klingenberg --- lisp/ChangeLog | 6 ++++++ lisp/mm-decode.el | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 786ee1b..2dfe657 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-12-30 Peder O. Klingenberg + + * mm-decode.el (mm-display-part): Make non-string methods work. + Non-string methods are funcalled and work just fine, the test was + bogus. + 2014-12-20 Katsumi Yamaoka * registry.el (cl-remf, cl-loop, cl-subseq): diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index f5b4d7c..1b5ca9a 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -833,18 +833,18 @@ external if displayed external." 'inline) (setq external (and method ;; If nil, we always use "save". - (stringp method) ;; 'mailcap-save-binary-file (or (eq mm-enable-external t) (and (eq mm-enable-external 'ask) (y-or-n-p (concat "Display part (" type - ") using external program" - ;; Can non-string method ever happen? + ") " (if (stringp method) (concat - " \"" (format method filename) "\"") - "") + "using external program \"" + (format method filename) "\"") + (format + "by calling `%s' on the contents)" method)) "? ")))))) (if external (mm-display-external -- 1.9.1