]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/iimage.el (iimage-mode-buffer): Handle multiple regexps.
authorLensPlaysGames <lensplaysgames@gmail.com>
Wed, 8 Feb 2023 18:56:48 +0000 (20:56 +0200)
committerJuri Linkov <juri@linkov.net>
Wed, 8 Feb 2023 18:56:48 +0000 (20:56 +0200)
Go to the beginning of the buffer before searching every regexp in
iimage-mode-image-regex-alist.

Copyright-paperwork-exempt: yes

lisp/iimage.el

index d7026331440fc139cef18ab40f8c843f9f8a255a..b4c175a7b63aad593f3c04485ee034bbe524bec4 100644 (file)
@@ -118,8 +118,8 @@ Examples of image filename patterns to match:
        file)
     (with-silent-modifications
       (save-excursion
-        (goto-char (point-min))
         (dolist (pair iimage-mode-image-regex-alist)
+          (goto-char (point-min))
           (while (re-search-forward (car pair) nil t)
             (when (and (setq file (match-string (cdr pair)))
                        (setq file (locate-file file image-path)))