Advertisement
mark-naylor-1701

elisp macros

Oct 4th, 2023 (edited)
2,019
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.49 KB | None | 0 0
  1. (defmacro nor (&rest args)
  2.   "Equivalent to an IC nor gate. Takes multiple inputs. Lazy
  3. evaluation of the args expressions."
  4.   `(not ,(cons 'or args)))
  5.  
  6. (defmacro nand (&rest args)
  7.   "Equivalent to an IC nand gate. Takes multiple inputs. Lazy
  8. evaluation of the args expressions."
  9.   `(not ,(cons 'and args)))
  10.  
  11. (defmacro fsetq (sym body)
  12.   "Similar to `setq', except that it binds the BODY to the SYM
  13. function slot,making it callable as the CAR of an e-expression."
  14.   `(fset (quote ,sym) ,body))
Tags: macro elisp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement