Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 5350

Emacs Lisp macros enable you to define new control constructs and other language features. A macro is defined much like a function, but instead of telling how to compute a value, it tells how to compute another Lisp expression, which in turn is evaluated to compute the value. We call this expression the "expansion" of the macro call. The macro call is first expanded and then evaluated, returning the value of that evaluation.

4 votes
1 answer
327 views

Macro with optional paramaters that checks for whether an optional paramater is defined?

Due to my lazy nature, I made something like this: (defmacro iλ (x) `(lambda () (interactive) ,x)) (defmacro iλd (x y) `(lambda () ,x (interactive) ,y)) (global-set-key (kbd "<f8>") (iλ (mes …
Leo Ufimtsev's user avatar
  • 4,588
4 votes
1 answer
507 views

idefun : a macro to turn defun into an 'interactive' defun?

I have a pattern like this scattered all over my .emacs: (defun my/function () (interactive) (....stuff) ) I would like to write a idefun macro so I could write as following instead: (idefun …
Leo Ufimtsev's user avatar
  • 4,588