emacs-diffs
[Top][All Lists]
Advanced

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

master aed427e: Also use named functions for the ‘gv’ declare forms (Bu


From: Philipp Stephani
Subject: master aed427e: Also use named functions for the ‘gv’ declare forms (Bug#40491)
Date: Sun, 12 Apr 2020 08:28:04 -0400 (EDT)

branch: master
commit aed427ece5c6e78633e08fd599d0cadeeb3d8d58
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>

    Also use named functions for the ‘gv’ declare forms (Bug#40491)
    
    * lisp/emacs-lisp/gv.el (gv--expander-defun-declaration)
    (gv--setter-defun-declaration): New helper functions; use them.
---
 lisp/emacs-lisp/gv.el | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index b43e53b..3ab4929 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -166,15 +166,25 @@ arguments as NAME.  DO is a function as defined in 
`gv-get'."
         ;; (`(expand ,expander) `(gv-define-expand ,name ,expander))
         (_ (message "Unknown %s declaration %S" symbol handler) nil))))
 
+;; Additions for `declare'.  We specify the values as named aliases so
+;; that `describe-variable' prints something useful; cf. Bug#40491.
+
+;;;###autoload
+(defsubst gv--expander-defun-declaration (&rest args)
+  (apply #'gv--defun-declaration 'gv-expander args))
+
+;;;###autoload
+(defsubst gv--setter-defun-declaration (&rest args)
+  (apply #'gv--defun-declaration 'gv-setter args))
+
 ;;;###autoload
 (or (assq 'gv-expander defun-declarations-alist)
-    (let ((x `(gv-expander
-               ,(apply-partially #'gv--defun-declaration 'gv-expander))))
+    (let ((x (list 'gv-expander #'gv--expander-defun-declaration)))
       (push x macro-declarations-alist)
       (push x defun-declarations-alist)))
 ;;;###autoload
 (or (assq 'gv-setter defun-declarations-alist)
-    (push `(gv-setter ,(apply-partially #'gv--defun-declaration 'gv-setter))
+    (push (list 'gv-setter #'gv--setter-defun-declaration)
          defun-declarations-alist))
 
 ;; (defmacro gv-define-expand (name expander)



reply via email to

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