aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-07-13 01:39:55 +0200
committerLars Ingebrigtsen2022-07-13 01:40:58 +0200
commitcbe9a55923601e4dcfd8538488723094cd7a7cac (patch)
tree88b8ab5ddef8e96d50dfb94bbe79f2de006fc2b0
parent3b802f029e89786c17b4bf6af760360f61d14fb9 (diff)
downloademacs-cbe9a55923601e4dcfd8538488723094cd7a7cac.tar.gz
emacs-cbe9a55923601e4dcfd8538488723094cd7a7cac.zip
Autoload image-converter-add-handler
* lisp/image/image-converter.el (image-converter-add-handler): Autoload.
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/image/image-converter.el1
2 files changed, 7 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index c2900b0bc4c..9f302bdfb5f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1709,6 +1709,12 @@ this message for SVG and XPM.
1709*** New commands: 'image-flip-horizontally' and 'image-flip-vertically'. 1709*** New commands: 'image-flip-horizontally' and 'image-flip-vertically'.
1710These commands horizontally and vertically flip the image under point. 1710These commands horizontally and vertically flip the image under point.
1711 1711
1712** Images
1713
1714+++
1715*** Users can now add special image conversion functions.
1716This is done via 'image-converter-add-handler'.
1717
1712** Image-Dired 1718** Image-Dired
1713 1719
1714+++ 1720+++
diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index 0c189af8e5a..ed3ba49071a 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -306,6 +306,7 @@ Only suffixes that map to `image-mode' are returned."
306 "-"))))) 306 "-")))))
307 "ffmpeg error when converting"))) 307 "ffmpeg error when converting")))
308 308
309;;;###autoload
309(defun image-converter-add-handler (suffix converter) 310(defun image-converter-add-handler (suffix converter)
310 "Make Emacs use CONVERTER to parse image files that end with SUFFIX. 311 "Make Emacs use CONVERTER to parse image files that end with SUFFIX.
311CONVERTER is a function with one parameter, the file name. The 312CONVERTER is a function with one parameter, the file name. The