Xue Fuqiao <xfq.free@gmail.com> writes:
In `yank-pop', there is an sexp about `funcall':
(funcall (or yank-undo-function 'delete-region) (point) (mark t))
IIRC the first argument for `funcall' should be a function, so I'm
confused with this usage. Can somebody explain it to me? Thanks.
`or' returns the first argument that is not nil, or nil when all the
arguments are nil.
(defmacro .or (&rest args)
(if (null args)
'nil
(let ((var (gensym)))
`(let ((,var ,(first args)))
(if ,var
,var
(.or ,@(rest args)))))))
(macroexpand '(.or a b))
--> (let ((#1=#:G90861 a)) (if #1# #1# (\.or b)))--