Showing posts from March 15, 2009

Emacs Lisp Mode Syntax Coloring Problem

perm url Emacs Lisp Mode Syntax Coloring Problem.Emacs Lisp Mode Syntax Coloring ProblemXah Lee, 2009-03-16This page gives a description of emacs's emacs-lisp-mode's flaw.Emacs has a mode for editing emacs lisp code. The mode is called emacs-lisp-mode. However, the syntax highlighting in emacs-lisp-mode only support the very minimum of highlighting.For example, these keywords are colored purple by default: defun, lambda, while, if, progn, save-restriction ... etc. while the following built-in keywords are uncolored (black): narrow-to-region, mapc, goto-char, point-min, search-forward, car, nil, replace-match, ..., etc.It appears that this is because only a particular type of elisp keywords are highlighted. Namely, keywords that are technically known as lisp's “special forms” are are colored, while all the others are not (macros, functions, commands, predefined variables ...). Here's a example of a elisp code in emacs-lisp-mode: (defunlisp-complete-symbol (&optiona…