refactor(lib): use feature checks for backports

Instead of imprecise version checks.

Fix: #6489
This commit is contained in:
Henrik Lissner 2022-06-21 21:28:07 +02:00
parent 00c75eddf8
commit 681d40ab58
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

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