forked from mirrors/org-mode
Address Emacs 28 warnings
* lisp/oc-basic.el (org-cite-basic--shorten-names): Provide third argument for `mapconcat'. It is mandatory in Emacs <29. * lisp/org.el (org--image-yank-media-handler): Suppress warning and throw and error in Emacs <29. (org--dnd-rmc): Do not try to call `use-dialog-box-p' in Emacs <29.
This commit is contained in:
parent
87c9f9b5db
commit
25a51bad2c
|
@ -367,7 +367,7 @@ personal names of the form \"family, given\"."
|
|||
(cond
|
||||
((stringp names) (setq names-string names))
|
||||
((org-element-type-p names 'raw)
|
||||
(setq names-string (mapconcat #'identity (org-element-contents names))
|
||||
(setq names-string (mapconcat #'identity (org-element-contents names) "")
|
||||
raw-p t)))
|
||||
(when names-string
|
||||
(setq names-string
|
||||
|
|
10
lisp/org.el
10
lisp/org.el
|
@ -20579,7 +20579,10 @@ any extension which is used as the filename."
|
|||
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."
|
||||
(let* ((ext (symbol-name (mailcap-mime-type-to-extension mimetype)))
|
||||
(cl-assert (fboundp 'mailcap-mime-type-to-extension)) ; Emacs >=29
|
||||
(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))
|
||||
(absname (expand-file-name
|
||||
|
@ -20652,7 +20655,10 @@ When nil, use `org-attach-method'."
|
|||
(defvar org-attach-method)
|
||||
|
||||
(defun org--dnd-rmc (prompt choices)
|
||||
(if (null (use-dialog-box-p))
|
||||
(if (null (and
|
||||
;; Emacs <=28 does not have `use-dialog-box-p'.
|
||||
(fboundp 'use-dialog-box-p)
|
||||
(use-dialog-box-p)))
|
||||
(caddr (read-multiple-choice prompt choices))
|
||||
(setq choices
|
||||
(mapcar
|
||||
|
|
Loading…
Reference in New Issue