diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2018-04-14 00:15:15 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2018-04-14 00:15:15 +0200 |
commit | 3ba07bfc3ec43aa10d8e2d06a8f36f7022287573 (patch) | |
tree | 605dfe8d532d1291fe7913799f5151505bdc0f92 /lisp/gnus/mm-decode.el | |
parent | e442879b5a963a6eb37403fe09f476e7ee8e0f55 (diff) | |
download | emacs-3ba07bfc3ec43aa10d8e2d06a8f36f7022287573.tar.gz |
Move utility function to mm-util.el
* lisp/gnus/mm-util.el (mm-images-in-region-p): Move from
mm-decode.el and renamed, since it is generally useful.
Diffstat (limited to 'lisp/gnus/mm-decode.el')
-rw-r--r-- | lisp/gnus/mm-decode.el | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index d8753e5a1d5..69fc770ec72 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1856,7 +1856,7 @@ text/html;\\s-*charset=\\([^\t\n\r \"'>]+\\)[^>]*>" nil t) 'url-link start end :help-echo (get-text-property start 'help-echo) :keymap (setq keymap (copy-keymap - (if (mm--images-in-region-p start end) + (if (mm-images-in-region-p start end) shr-image-map shr-map))) (get-text-property start 'shr-url)) @@ -1874,19 +1874,6 @@ text/html;\\s-*charset=\\([^\t\n\r \"'>]+\\)[^>]*>" nil t) (overlay-put overlay 'face nil)) (setq start end))))) -(defun mm--images-in-region-p (start end) - (let ((found nil)) - (save-excursion - (goto-char start) - (while (and (not found) - (< (point) end)) - (let ((display (get-text-property (point) 'display))) - (when (and (consp display) - (eq (car display) 'image)) - (setq found t))) - (forward-char 1))) - found)) - (defun mm-handle-filename (handle) "Return filename of HANDLE if any." (or (mail-content-type-get (mm-handle-type handle) |