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:
Ihor Radchenko 2024-02-27 13:29:00 +03:00
parent 87c9f9b5db
commit 25a51bad2c
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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