I've looked at the documentation, but I can't seem to figure out how to do it.
Interactively:
M-x lisp-interaction-mode
RET
For a single file, make the first line of that file:
;; -*- mode: lisp-interaction; -*-
For all files, add to your init file:
(add-to-list 'auto-mode-alist '("\\.el\\'" . lisp-interaction-mode))
-
I'm somewhat new to elisp. Where would I enter this line of code? With the M-x and the RET, where do I enter that? Is there some specific way to do this? – Frederick Noe Apr 27 '17 at 19:01
-
Definitely follow JeanPierre's advice to follow the built-in tutorial.
M-x
is standard Emacs notation meaning "Hold the META modifier key and press thex
key" (on modern keyboards the key labelled ALT is typically the META key).RET
is the Return/Enter key. – phils Apr 27 '17 at 22:26 -
This will make it so much easier compared to running everything in a scratch buffer or C-x C-e. I understand that you on stackexchange get a lot of ridiculous questions from people who haven't looked through the tutorial or the guide for the language or any documentation, or are asking for the answer toa homework problem; and whenever I ask a question here I try to explain as well as possible that I've put some effort into finding the solution to my problem, and am not just asking others to solve my coding problems for me. ;) – Frederick Noe Apr 28 '17 at 1:15
*.el
file you want the major mode to be Lisp-interaction mode? (In that case, seeauto-mode-alist
.) – Drew Apr 26 '17 at 13:54emacs-lisp-mode
andlisp-interaction-mode
will be almost identical unless you've made some major customizations. – Dan♦ Apr 26 '17 at 17:49*scratch*
buffer and use it in the same way after reloading. OP: you could put;; -*- mode: lisp-interaction -*-
at the top of the buffer for the files you are interested in editing. You probably don't want to use interaction mode when opening someone else's files. – wvxvw Apr 26 '17 at 18:08C-h t
ie pressControl
andh
, thent
). In particular the first few lines explain theM-x
thing. – JeanPierre Apr 27 '17 at 19:57