emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3ba07bf 2/3: Move utility function to mm-util.el


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 3ba07bf 2/3: Move utility function to mm-util.el
Date: Fri, 13 Apr 2018 18:18:36 -0400 (EDT)

branch: master
commit 3ba07bfc3ec43aa10d8e2d06a8f36f7022287573
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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.
---
 lisp/gnus/mm-decode.el | 15 +--------------
 lisp/gnus/mm-util.el   | 13 +++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index d8753e5..69fc770 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)
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 98f9933..42c2f3a 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -882,6 +882,19 @@ gzip, bzip2, etc. are allowed."
        (when decomp
          (kill-buffer (current-buffer)))))))
 
+(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))
+
 (provide 'mm-util)
 
 ;;; mm-util.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]