mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
* lisp/emacs-lisp/timer.el (timer--time-setter): New function.
(timer--time): Use it as gv-setter. * lisp/emacs-lisp/gv.el (gv-define-simple-setter): Output warning when setter is not a symbol.
This commit is contained in:
parent
5c41e9ffea
commit
5514cc4c84
4 changed files with 32 additions and 23 deletions
|
|
@ -217,13 +217,15 @@ instead the assignment is turned into something equivalent to
|
|||
temp)
|
||||
so as to preserve the semantics of `setf'."
|
||||
(declare (debug (sexp (&or symbolp lambda-expr) &optional sexp)))
|
||||
(when (eq 'lambda (car-safe setter))
|
||||
(message "Use `gv-define-setter' or name %s's setter function" name))
|
||||
`(gv-define-setter ,name (val &rest args)
|
||||
,(if fix-return
|
||||
`(macroexp-let2 nil v val
|
||||
`(progn
|
||||
(,',setter ,@(append args (list v)))
|
||||
(,',setter ,@args ,v)
|
||||
,v))
|
||||
`(cons ',setter (append args (list val))))))
|
||||
``(,',setter ,@args ,val))))
|
||||
|
||||
;;; Typical operations on generalized variables.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue