forked from mirrors/org-mode
org-compat: Add ensure-list as org-ensure-list
* lisp/org-compat.el (org-ensure-list): Add `ensure-list' from Emacs 28, as `org-ensure-list'.
This commit is contained in:
parent
1ae978f940
commit
c737d6ed77
|
@ -251,6 +251,18 @@ removed."
|
|||
default)))
|
||||
": ")))
|
||||
|
||||
(if (fboundp 'ensure-list)
|
||||
(defalias 'org-ensure-list #'ensure-list)
|
||||
(defun org-ensure-list (object)
|
||||
"Return OBJECT as a list.
|
||||
If OBJECT is already a list, return OBJECT itself. If it's
|
||||
not a list, return a one-element list containing OBJECT.
|
||||
|
||||
Compatability substitute for `ensure-list' in Emacs 28."
|
||||
(if (listp object)
|
||||
object
|
||||
(list object))))
|
||||
|
||||
|
||||
;;; Emacs < 27.1 compatibility
|
||||
|
||||
|
|
Loading…
Reference in New Issue