From: João Távora Date: Fri, 24 Mar 2023 22:16:49 +0000 (+0000) Subject: Eglot: define eglot--ensure-list with defalias X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66c48f9e46abab869333eaf1de574711bcaf601e;p=emacs.git Eglot: define eglot--ensure-list with defalias This avoids annoying obsoletion warnings when compiling the whole buffer. * lisp/progmodes/eglot.el (eglot--ensure-list): define with defalias. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e52a40b7f22..3458fbc7cb2 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1779,9 +1779,9 @@ and just return it. PROMPT shouldn't end with a question mark." (defun eglot--plist-keys (plist) "Get keys of a plist." (cl-loop for (k _v) on plist by #'cddr collect k)) -(defun eglot--ensure-list (x) (if (listp x) x (list x))) -(when (fboundp 'ensure-list) ; Emacs 28 or later - (define-obsolete-function-alias 'eglot--ensure-list #'ensure-list "29.1")) +(defalias 'eglot--ensure-list + (if (fboundp 'ensure-list) #'ensure-list + (lambda (x) (if (listp x) x (list x))))) ;;; Minor modes