From 17174d3f77fe6d5103bfe7e858035a0038010522 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 12 Apr 2018 19:18:26 +0200 Subject: [PATCH] nil is no longer an allowed value for mm-inline-text-html * doc/misc/emacs-mime.texi (Display Customization): Remove the doc for the nil case of mm-inline-text-html. * doc/misc/mh-e.texi (HTML): Ditto. * lisp/gnus/mm-view.el (mm-inline-text-html): If no mm-text-html-renderer is specified, just insert the raw text instead of erroring out (bug#30870). --- doc/misc/emacs-mime.texi | 12 ++++++------ doc/misc/gnus.texi | 3 --- doc/misc/mh-e.texi | 7 ------- etc/NEWS | 3 +++ lisp/gnus/gnus-art.el | 3 --- lisp/gnus/gnus-score.el | 3 +-- lisp/gnus/mm-decode.el | 9 +++------ lisp/gnus/mm-view.el | 2 ++ 8 files changed, 15 insertions(+), 27 deletions(-) diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 2c607cc97c5..c0b16f30c4d 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -404,12 +404,12 @@ variable will cause @samp{text/html} parts to be treated as attachments. @item mm-text-html-renderer @vindex mm-text-html-renderer -This selects the function used to render @acronym{HTML}. The predefined -renderers are selected by the symbols @code{shr}, @code{gnus-w3m}, -@code{w3m}@footnote{See @uref{http://emacs-w3m.namazu.org/} for more -information about emacs-w3m}, @code{links}, @code{lynx}, -@code{w3m-standalone} or @code{html2text}. If @code{nil} use an -external viewer. You can also specify a function, which will be +This selects the function used to render @acronym{HTML}. The +predefined renderers are selected by the symbols @code{shr}, +@code{gnus-w3m}, @code{w3m}@footnote{See +@uref{http://emacs-w3m.namazu.org/} for more information about +emacs-w3m}, @code{links}, @code{lynx}, @code{w3m-standalone} or +@code{html2text}. You can also specify a function, which will be called with a @acronym{MIME} handle as the argument. @item mm-html-inhibit-images diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index dd8fde494b2..1a2f6dd09f1 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -9806,9 +9806,6 @@ this command passes the @acronym{HTML} content to the browser without eliminating these ``web bugs'' you should only use it for mails from trusted senders. -If you always want to display @acronym{HTML} parts in the browser, set -@code{mm-text-html-renderer} to @code{nil}. - This command creates temporary files to pass @acronym{HTML} contents including images if any to the browser, and deletes them when exiting the group (if you want). diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index b44e503996b..7ec9aec0166 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -2589,13 +2589,6 @@ centers the output and wraps long lines more than most. It does not always handle special characters like @samp{®} or @samp{–}. It does not download images. @c ------------------------- -@item @samp{nil} -This choice obviously requires an external browser. With this setting, -HTML messages have a button for the body part which you can view with -@kbd{K v} (@code{mh-folder-toggle-mime-part}). Rendering of special -characters and handling of remote images depends on your choice of -browser. -@c ------------------------- @item @samp{shr} @cindex @samp{shr} This choice does not require an external program, but it does require diff --git a/etc/NEWS b/etc/NEWS index e3f05f3e0f5..47c77d1a830 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -194,6 +194,9 @@ has a search engine. *** Splitting mail on common mailing list has been added. See the concept index in the Gnus manual for the `match-list' entry. ++++ +*** nil is no longer an allowed value for `mm-text-html-renderer'. + ** Htmlfontify *** The functions 'hfy-color', 'hfy-color-vals' and diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 595ae58c813..c11cf574a39 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3002,9 +3002,6 @@ articles to verify whether you have read the message. As browser without eliminating these \"web bugs\" you should only use it for mails from trusted senders. -If you always want to display HTML parts in the browser, set -`mm-text-html-renderer' to nil. - This command creates temporary files to pass HTML contents including images if any to the browser, and deletes them when exiting the group \(if you want)." diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 4192381700d..6878aa69c66 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1751,8 +1751,7 @@ score in `gnus-newsgroup-scored' by SCORE." (mm-display-inline handle) (goto-char (point-max)))))) - (let ( ;(mm-text-html-renderer 'w3m-standalone) - (handles (mm-dissect-buffer t))) + (let ((handles (mm-dissect-buffer t))) (save-excursion (article-goto-body) (delete-region (point) (point-max)) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index f55a6af8027..7ab84c0c83d 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -118,8 +118,7 @@ ((executable-find "w3m") 'gnus-w3m) ((executable-find "links") 'links) ((executable-find "lynx") 'lynx) - ((locate-library "html2text") 'html2text) - (t nil)) + ((locate-library "html2text") 'html2text)) "Render of HTML contents. It is one of defined renderer types, or a rendering function. The defined renderer types are: @@ -129,9 +128,8 @@ The defined renderer types are: `w3m-standalone': use plain w3m; `links': use links; `lynx': use lynx; -`html2text': use html2text; -nil : use external viewer (default web browser)." - :version "24.1" +`html2text': use html2text." + :version "27.1" :type '(choice (const shr) (const gnus-w3m) (const w3m :tag "emacs-w3m") @@ -139,7 +137,6 @@ nil : use external viewer (default web browser)." (const links) (const lynx) (const html2text) - (const nil :tag "External viewer") (function)) :group 'mime-display) diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 75786cd71b8..50a927bce23 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -318,6 +318,8 @@ (if entry (setq func (cdr entry))) (cond + ((null func) + (mm-insert-inline handle (mm-get-part handle))) ((functionp func) (funcall func handle)) (t -- 2.39.5