From: LensPlaysGames Date: Wed, 8 Feb 2023 18:56:48 +0000 (+0200) Subject: * lisp/iimage.el (iimage-mode-buffer): Handle multiple regexps. X-Git-Tag: emacs-29.0.90~469 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0ec0a610ed2;p=emacs.git * lisp/iimage.el (iimage-mode-buffer): Handle multiple regexps. Go to the beginning of the buffer before searching every regexp in iimage-mode-image-regex-alist. Copyright-paperwork-exempt: yes --- diff --git a/lisp/iimage.el b/lisp/iimage.el index d7026331440..b4c175a7b63 100644 --- a/lisp/iimage.el +++ b/lisp/iimage.el @@ -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)))