Tag Archives: elisp

how to enable Unicode encoding, lexical scope, and CL functions in an Emacs Lisp file

Table of Contents 1. how to enable UTF-8 encoding 2. how to enable lexical scope 3. how to use CL functions I recommend Emacs beginners to enable at least three things in their elisp files (such as dotemacs files, a.k.a. … Continue reading

Posted in Emacs | Tagged , , , | 4 Comments

built-in special variables with simple names in Emacs Lisp

Following is the list of all special variables with names without hyphens (as of Emacs 24.3.1). These should not be used as names of lexically scoped variables. debugger features nil noninteractive obarray The list is obtained with this code: (require … Continue reading

Posted in Emacs | Tagged , | 2 Comments

Living with Emacs Lisp

Table of Contents 1. Living with Emacs Lisp 2. Miscellaneous 3. Miscellaneous 2 4. Proof donation Intro: Why you should learn elisp 1. Living with Emacs Lisp The “Living with Emacs Lisp” series is a collection of articles to help … Continue reading

Posted in Emacs, Lisp | Tagged , | 4 Comments

double pointers and Lisp lists

Table of Contents 1. write a function that returns the result instead 2. write a macro 3. passing a symbol 4. – – – 5. boxing and unboxing 6. which workaround to use 7. now the fourth problem: multiple return … Continue reading

Posted in Lisp | Tagged , , | 2 Comments

how to know which archive an emacs ELPA package is from

The buffer from M-x list-packages doesn’t display which archive each package is from. M-x describe-package doesn’t either. But there is a function for it. The function is package-archive-base. For example, I use two additional ELPA archives: (require ‘package) (add-to-list ‘package-archives … Continue reading

Posted in Emacs | Tagged , , | 2 Comments

using autopair mode in js2-mode

(Update @ 2013 March: This article is now deprecated. With the latest js2-mode from GNU ELPA, autopair works fine with js2-mode without any tweaks. Old js2-mode’s own pairing mode js2-mirror-mode is gone. But now Emacs 24 includes electric-pair-mode which is … Continue reading

Posted in Emacs | Tagged , , , | 1 Comment

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