forked from mirrors/org-mode
Address Emacs 27 warnings
* lisp/org-entities.el (seq): Require seq.el - it is not preloaded in Emacs <28. * lisp/org.el (org--image-yank-media-handler): Suppress warning and throw an error about `file-name-with-extension'. This function is not supposed to be called in older Emacs.
This commit is contained in:
parent
25a51bad2c
commit
8651c83991
|
@ -29,6 +29,7 @@
|
|||
|
||||
(require 'org-macs)
|
||||
(org-assert-version)
|
||||
(require 'seq) ; Emacs 27 does not preload seq.el; for `seq-every-p'.
|
||||
|
||||
(declare-function org-mode "org" ())
|
||||
(declare-function org-toggle-pretty-entities "org" ())
|
||||
|
|
|
@ -20580,11 +20580,13 @@ It is saved as per `org-yank-image-save-method'. The name for the
|
|||
image is prompted and the extension is automatically added to the
|
||||
end."
|
||||
(cl-assert (fboundp 'mailcap-mime-type-to-extension)) ; Emacs >=29
|
||||
(cl-assert (fboundp 'file-name-with-extension)) ; Emacs >=28
|
||||
(let* ((ext (symbol-name
|
||||
(with-no-warnings ; Suppress warning in Emacs <29
|
||||
(mailcap-mime-type-to-extension mimetype))))
|
||||
(iname (funcall org-yank-image-file-name-function))
|
||||
(filename (file-name-with-extension iname ext))
|
||||
(filename (with-no-warnings ; Suppress warning in Emacs <28
|
||||
(file-name-with-extension iname ext)))
|
||||
(absname (expand-file-name
|
||||
filename
|
||||
(if (eq org-yank-image-save-method 'attach)
|
||||
|
|
Loading…
Reference in New Issue