diff options
| -rw-r--r-- | lisp/emacs-lisp/gv.el | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index b43e53b9d27..3ab49293e90 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'." | |||
| 166 | ;; (`(expand ,expander) `(gv-define-expand ,name ,expander)) | 166 | ;; (`(expand ,expander) `(gv-define-expand ,name ,expander)) |
| 167 | (_ (message "Unknown %s declaration %S" symbol handler) nil)))) | 167 | (_ (message "Unknown %s declaration %S" symbol handler) nil)))) |
| 168 | 168 | ||
| 169 | ;; Additions for `declare'. We specify the values as named aliases so | ||
| 170 | ;; that `describe-variable' prints something useful; cf. Bug#40491. | ||
| 171 | |||
| 172 | ;;;###autoload | ||
| 173 | (defsubst gv--expander-defun-declaration (&rest args) | ||
| 174 | (apply #'gv--defun-declaration 'gv-expander args)) | ||
| 175 | |||
| 176 | ;;;###autoload | ||
| 177 | (defsubst gv--setter-defun-declaration (&rest args) | ||
| 178 | (apply #'gv--defun-declaration 'gv-setter args)) | ||
| 179 | |||
| 169 | ;;;###autoload | 180 | ;;;###autoload |
| 170 | (or (assq 'gv-expander defun-declarations-alist) | 181 | (or (assq 'gv-expander defun-declarations-alist) |
| 171 | (let ((x `(gv-expander | 182 | (let ((x (list 'gv-expander #'gv--expander-defun-declaration))) |
| 172 | ,(apply-partially #'gv--defun-declaration 'gv-expander)))) | ||
| 173 | (push x macro-declarations-alist) | 183 | (push x macro-declarations-alist) |
| 174 | (push x defun-declarations-alist))) | 184 | (push x defun-declarations-alist))) |
| 175 | ;;;###autoload | 185 | ;;;###autoload |
| 176 | (or (assq 'gv-setter defun-declarations-alist) | 186 | (or (assq 'gv-setter defun-declarations-alist) |
| 177 | (push `(gv-setter ,(apply-partially #'gv--defun-declaration 'gv-setter)) | 187 | (push (list 'gv-setter #'gv--setter-defun-declaration) |
| 178 | defun-declarations-alist)) | 188 | defun-declarations-alist)) |
| 179 | 189 | ||
| 180 | ;; (defmacro gv-define-expand (name expander) | 190 | ;; (defmacro gv-define-expand (name expander) |