(macroexp-let2* nil ((start from) (end to))
(funcall do `(substring ,getter ,start ,end)
(lambda (v)
- (funcall setter `(cl--set-substring
- ,getter ,start ,end ,v))))))))
+ (macroexp-let2 nil v v
+ `(progn
+ ,(funcall setter `(cl--set-substring
+ ,getter ,start ,end ,v))
+ ,v))))))))
@end example
@end defmac
(macroexp-let2* nil ((start from) (end to))
(funcall do `(substring ,getter ,start ,end)
(lambda (v)
- (funcall setter `(cl--set-substring
- ,getter ,start ,end ,v))))))))
+ (macroexp-let2 nil v v
+ `(progn
+ ,(funcall setter `(cl--set-substring
+ ,getter ,start ,end ,v))
+ ,v))))))))
;;; Miscellaneous.
(gv-letplace (dgetter dsetter) d
(funcall do
`(cons ,agetter ,dgetter)
- (lambda (v) `(progn
- ,(funcall asetter `(car ,v))
- ,(funcall dsetter `(cdr ,v)))))))))
+ (lambda (v)
+ (macroexp-let2 nil v v
+ `(progn
+ ,(funcall asetter `(car ,v))
+ ,(funcall dsetter `(cdr ,v))
+ ,v))))))))
(put 'logand 'gv-expander
(lambda (do place &rest masks)
(funcall
do `(logand ,getter ,mask)
(lambda (v)
- (funcall setter
- `(logior (logand ,v ,mask)
- (logand ,getter (lognot ,mask))))))))))
+ (macroexp-let2 nil v v
+ `(progn
+ ,(funcall setter
+ `(logior (logand ,v ,mask)
+ (logand ,getter (lognot ,mask))))
+ ,v))))))))
;;; References