From 73fcbe07f5091c2129ab3515b1fa016223f419e3 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 4 Oct 2005 13:56:47 +0000 Subject: [PATCH] Revision: miles@gnu.org--gnu-2005/gnus--devo--0--patch-225 Merge from gnus--rel--5.10 Patches applied: * emacs--cvs-trunk--0 (patch 564, 566, 569, 572) - Merge from gnus--rel--5.10 - Update from CVS * gnus--rel--5.10 (patch 131) - Merge from emacs--cvs-trunk--0 2005-09-30 Stefan Monnier * lisp/mm-decode.el (mm-inline-media-tests): Check presence of the diff-mode function rather than the diff-mode.el package. (mm-display-external): Use with-current-buffer. (mm-viewer-completion-map, mm-viewer-completion-map): Move initialization inside declaration. --- lisp/ChangeLog | 31 +++++++++++++++++++------------ lisp/mm-decode.el | 22 ++++++++++++---------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 09c3f38f3..bf3eddf37 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -17,6 +17,14 @@ * time-date.el: Autoload parse-time-string, XEmacs needs it. +2005-09-30 Stefan Monnier + + * mm-decode.el (mm-inline-media-tests): Check presence of the diff-mode + function rather than the diff-mode.el package. + (mm-display-external): Use with-current-buffer. + (mm-viewer-completion-map, mm-viewer-completion-map): + Move initialization inside declaration. + 2005-09-29 Simon Josefsson * spam.el: Load hashcash when compiling, to avoid warnings. Don't @@ -45,15 +53,14 @@ * mm-uu.el (mm-uu-emacs-sources-regexp): Make variable customizable. Change default value. (mm-uu-diff-groups-regexp): Change default value. - (mm-uu-type-alist): Added doc string. - (mm-uu-configure): Added doc string. Make it interactive. + (mm-uu-type-alist): Add doc string. + (mm-uu-configure): Add doc string. Make it interactive. (mm-uu-tex-groups-regexp): New variable. (mm-uu-latex-extract, mm-uu-latex-test): New functions. - (mm-uu-type-alist): Added LaTeX documents. + (mm-uu-type-alist): Add LaTeX documents. (mm-uu-verbatim-marks-extract): Use "text/x-gnus-verbatim" instead - of "text/verbatim".. - (mm-uu-diff-groups-regexp): Fix missing quotes from previous - commit. + of "text/verbatim". + (mm-uu-diff-groups-regexp): Fix missing quotes from previous commit. * mm-decode.el (mm-automatic-display): Use "text/x-gnus-verbatim" instead of "text/verbatim". @@ -119,8 +126,8 @@ 2005-09-22 Reiner Steib - * spam-report.el (spam-report-url-ping-plain): Use - gnus-extended-version as User-Agent. + * spam-report.el (spam-report-url-ping-plain): + Use gnus-extended-version as User-Agent. * gnus-agent.el (gnus-agent-synchronize-flags): Explain why the default value is nil. @@ -196,7 +203,7 @@ * gnus-srvr.el (gnus-server-mode-map): Bind it to 'z'. * gnus-srvr.el (gnus-server-make-menu-bar): Add an entry for it. -2005-09-18 D Goel +2005-09-18 Deepak Goel * sieve.el (sieve-help): Fix `message' call: first arg should be a format spec. @@ -258,9 +265,9 @@ 2005-09-07 Reiner Steib * spam-report.el (spam-report-gmane): Make it work without - X-Report-Spam header. Gmane now only provides Archived-At. This - is only used if `spam-report-gmane-use-article-number' is nil. - (spam-report-gmane-spam-header): Removed. Not used anymore. + X-Report-Spam header. Gmane now only provides Archived-At. + This is only used if `spam-report-gmane-use-article-number' is nil. + (spam-report-gmane-spam-header): Remove. Not used anymore. * gnus-sum.el (gnus-thread-sort-by-recipient): New function to make `gnus-summary-sort-by-recipient' work with threading. diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index e96e3367e..921c10877 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -221,7 +221,12 @@ before the external MIME handler is invoked." ("text/richtext" mm-inline-text identity) ("text/x-patch" mm-display-patch-inline (lambda (handle) - (locate-library "diff-mode"))) + ;; If the diff-mode.el package is installed, the function is + ;; autoloaded. Checking (locate-library "diff-mode") would be trying + ;; to cater to broken installations. OTOH checking the function + ;; makes it possible to install another package which provides an + ;; alternative implementation of diff-mode. --Stef + (fboundp 'diff-mode))) ("application/emacs-lisp" mm-display-elisp-inline identity) ("application/x-emacs-lisp" mm-display-elisp-inline identity) ("text/dns" mm-display-dns-inline identity) @@ -452,21 +457,19 @@ If not set, `default-directory' will be used." (defvar mm-viewer-completion-map (let ((map (make-sparse-keymap 'mm-viewer-completion-map))) (set-keymap-parent map minibuffer-local-completion-map) + ;; Should we bind other key to minibuffer-complete-word? + (define-key map " " 'self-insert-command) map) "Keymap for input viewer with completion.") -;; Should we bind other key to minibuffer-complete-word? -(define-key mm-viewer-completion-map " " 'self-insert-command) - (defvar mm-viewer-completion-map (let ((map (make-sparse-keymap 'mm-viewer-completion-map))) (set-keymap-parent map minibuffer-local-completion-map) + ;; Should we bind other key to minibuffer-complete-word? + (define-key map " " 'self-insert-command) map) "Keymap for input viewer with completion.") -;; Should we bind other key to minibuffer-complete-word? -(define-key mm-viewer-completion-map " " 'self-insert-command) - ;;; The functions. (defun mm-alist-to-plist (alist) @@ -561,7 +564,7 @@ Postpone undisplaying of viewers for types in ;; what really needs to be done here is a way to link a ;; MIME handle back to it's parent MIME handle (in a multilevel ;; MIME article). That would probably require changing - ;; the mm-handle API so we simply store the multipart buffert + ;; the mm-handle API so we simply store the multipart buffer ;; name as a text property of the "multipart/whatever" string. (add-text-properties 0 (length (car ctl)) (list 'buffer (mm-copy-to-buffer) @@ -802,8 +805,7 @@ external if displayed external." (mm-mailcap-command method file (mm-handle-type handle))) (if (buffer-live-p buffer) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (buffer-string)))) (progn (ignore-errors (delete-file file)) -- 2.34.1