Monthly Archives: December 2011

lexical scoping and dynamic scoping in Emacs Lisp

In this article, I demonstrate: difference between dynamic scoping and lexical scoping in Emacs Lisp what to watch out for with dynamic scoping what you can do with lexical scoping and lexical closures what happens when you mix lexical scoping … Continue reading

Posted in Emacs | Tagged , , , , | 16 Comments

how to check dynamically if lexical scoping is active in Emacs Lisp

The variable lexical-binding specifies whether to use lexical scoping when evaluating code in the current buffer or el file. But checking the value of this variable at a point of code is not a reliable way to check if lexical … Continue reading

Posted in Emacs | Tagged , , | 1 Comment

How to run a new instance of emacs from within emacs

It turns out that ourcomments-util.el, which is bundled with EmacsW32, already contains a command to start a new emacs instance and some variant commands as well. These are the commands: For those of you who do not use ourcomments-util.el, use … Continue reading

Posted in Emacs | Tagged , | Leave a comment