diff options
| author | Juanma Barranquero <lekktu@gmail.com> | 2014-02-21 20:01:19 +0100 |
|---|---|---|
| committer | Juanma Barranquero <lekktu@gmail.com> | 2014-02-21 20:01:19 +0100 |
| commit | f35affb60fe64b0c840133ffbf3c6868a0e7f400 (patch) | |
| tree | 5d508ee2c9dfc0cf9cdb4c1bf9b37db4b542323c /lisp | |
| parent | 3d136b1b7246eae2a86b4444904f02b77dc8951d (diff) | |
| download | emacs-f35affb60fe64b0c840133ffbf3c6868a0e7f400.tar.gz | |
lisp/emacs-lisp/gv.el: Avoid duplicating entries of defun-declaration-alist.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/gv.el | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 58bdb6534d5..6fb588381fe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-02-21 Juanma Barranquero <lekktu@gmail.com> + + * emacs-lisp/gv.el: Avoid duplicating gv-expander and gv-setter in + defun-declarations-alist. + 2014-02-21 Stefan Monnier <monnier@iro.umontreal.ca> * emacs-lisp/cl-macs.el (cl-define-compiler-macro): Add indent rule diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 4f68274e266..66241897536 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -157,11 +157,13 @@ arguments as NAME. DO is a function as defined in `gv-get'." (_ (message "Unknown %s declaration %S" symbol handler) nil)))) ;;;###autoload -(push `(gv-expander ,(apply-partially #'gv--defun-declaration 'gv-expander)) - defun-declarations-alist) +(or (assq 'gv-expander defun-declarations-alist) + (push `(gv-expander ,(apply-partially #'gv--defun-declaration 'gv-expander)) + defun-declarations-alist)) ;;;###autoload -(push `(gv-setter ,(apply-partially #'gv--defun-declaration 'gv-setter)) - defun-declarations-alist) +(or (assq 'gv-setter defun-declarations-alist) + (push `(gv-setter ,(apply-partially #'gv--defun-declaration 'gv-setter)) + defun-declarations-alist)) ;; (defmacro gv-define-expand (name expander) ;; "Use EXPANDER to handle NAME as a generalized var. |
