() Emanuel Berg () Sun, 20 Jul 2014 23:28:58 +0200 (defun shortcut-to-file (key-prefix key file-prefix file) "Make shortcut with key KEY-PREFIX KEY to FILE-PREFIX FILE." (global-set-key (format "%s%s" key-prefix key) `(lambda () (interactive) (do-show-file (format "%s%s" ,file-prefix ,file)) ))) Is this correct? It is if it does what the designer desires. :-D I find ‘(format "%s%s" A B)’ unbeautiful, personally. 2. At the 7th, last line, `file-prefix' and `file' appears. Those are preceded by commas so, in combination with the backtick, their values will be inserted - hard-coded. This bypasses the whole problem because it eliminates all evaluation of symbols (it is like Caesar and the Gordian knot). The drawback is that the lambda can't be byte-compiled as it is formally "just" a list. I think using terms "insert" and "hard-coded" is confusing in this context. Also, "eliminated" is imprecise and thus misleading. To bake a cake, do you eliminate the flour? -- Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) => nil