* lisp/emacs-lisp/gv.el (error): Add gv-expander
This fixes incorrect expansion of (setf (case-exhaustive ..) ..), as found for example in `elpa-admin.el`.
This commit is contained in:
parent
db2d6aac30
commit
b0b968d9af
1 changed files with 7 additions and 0 deletions
|
@ -639,6 +639,13 @@ REF must have been previously obtained with `gv-ref'."
|
|||
|
||||
;;; Generalized variables.
|
||||
|
||||
;; You'd think noone would write `(setf (error ...) ..)' but it
|
||||
;; appears naturally as the result of macroexpansion of things like
|
||||
;; (setf (case-exhaustive ...)).
|
||||
;; We could generalize this to `throw' and `signal', but it seems
|
||||
;; preferable to wait until there's a concrete need.
|
||||
(gv-define-expander error (lambda (_do &rest args) `(error . ,args)))
|
||||
|
||||
;; Some Emacs-related place types.
|
||||
(gv-define-simple-setter buffer-file-name set-visited-file-name t)
|
||||
(make-obsolete-generalized-variable
|
||||
|
|
Loading…
Add table
Reference in a new issue