emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 66c48f9e46a 02/10: Eglot: define eglot--ensure-list with defalias


From: João Távora
Subject: master 66c48f9e46a 02/10: Eglot: define eglot--ensure-list with defalias
Date: Sun, 2 Apr 2023 19:15:39 -0400 (EDT)

branch: master
commit 66c48f9e46abab869333eaf1de574711bcaf601e
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    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.
---
 lisp/progmodes/eglot.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]