I'll add some simple Lisp programming notes that are unrelated to your discussion. I hope you don't mind. :-) Emanuel Berg [2015-12-29 02:32:38+01] wrote: > (let ((modes '( > ))) > (setq auto-mode-alist (append modes auto-mode-alist)) ) There you create a list MODES and then APPEND copies the whole list and joins it to AUTO-MODE-ALIST. The original list is discarded. No problem, it's just a configuration code. But in some other situation it might be good idea to construct the list only once and use NCONC which only traverses the lists through and modifies last conses to join it to the next list: (let ((modes (list '(a . b) ;; ... ))) (setq auto-mode-alist (nconc modes auto-mode-alist))) Or: (setq auto-mode-alist (nconc (list '(a . b) ;; ... ) auto-mode-alist)) I used LIST function because, at least in Common Lisp, literal objects (like lists created with QUOTE ' or literal strings) shouldn't be modified. Consequences are undefined. > (setq magic-mode-alist '(("# spec.in" . (lambda () (interactive) (progn (sh-mode) (sh-set-shell "rpm")))))) The PROGN is redundant because LAMBDA has an implicit PROGN: (lambda () (interactive) (sh-mode) (sh-set-shell "rpm")) -- /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///