refactor(lib): use feature checks for backports
Instead of imprecise version checks. Fix: #6489
This commit is contained in:
parent
00c75eddf8
commit
681d40ab58
1 changed files with 5 additions and 3 deletions
|
@ -780,10 +780,12 @@ testing advice (when combined with `rotate-text').
|
||||||
;;
|
;;
|
||||||
;;; Backports
|
;;; Backports
|
||||||
|
|
||||||
(unless EMACS28+
|
;; `format-spec' wasn't autoloaded until 28.1
|
||||||
;; `format-spec' wasn't autoloaded until 28
|
(unless (fboundp 'format-spec)
|
||||||
(autoload #'format-spec "format-spec")
|
(autoload #'format-spec "format-spec"))
|
||||||
|
|
||||||
|
;; Introduced in Emacs 28.1
|
||||||
|
(unless (fboundp 'ensure-list)
|
||||||
(defun ensure-list (object)
|
(defun ensure-list (object)
|
||||||
"Return OBJECT as a list.
|
"Return OBJECT as a list.
|
||||||
If OBJECT is already a list, return OBJECT itself. If it's
|
If OBJECT is already a list, return OBJECT itself. If it's
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue