Questions tagged [emacs-lisp-mode]
18 questions
20
votes
4 answers
Why does lisp-interaction-mode exist, and do we ever need it?
Q: Why does lisp-interaction-mode exist, and are there any reasons to use it instead of emacs-lisp-mode?
The manual states that emacs-lisp-mode and lisp-interaction-mode are identical except that the latter binds C-j to eval-print-last-sexp. Beyond…

Dan
- 32,584
- 6
- 98
- 168
6
votes
1 answer
How to change lisp mode indentation style
I'm not a lisp programmer. But I'm an emacs user, so I use elisp from times to times to do simple scripting. I'm not familiar with lisp style and I'm quite incompatible with it. Default indents quickly become over 80 whitespaces long making the…

ayvango
- 575
- 4
- 6
4
votes
2 answers
Changing fill-column of elisp docstrings
When I'm writing the docstring for a defun or a defvar, if hit
M-q the paragraph always gets filled to 65 characters, regardless of
the value of
fill-column.
Q. How can I get fill-paragraph to always respect the configured
fill-column
inside…

Malabarba
- 22,878
- 6
- 78
- 163
4
votes
1 answer
Please explain the behaviour of this emacs feature. (Lisp Interaction mode, truncate long lines)
Sometimes when a function or variable outputs a very long line, it ends with ...). When the cursor is on that line and I press return, the line gets longer (probably expanded). I guess this is some sort of folding.
How is this feature called? How…

jue
- 4,476
- 8
- 20
3
votes
1 answer
How to turn off "error" highlighting in emacs-lisp-mode for Emacs 25?
Since the update, a certain style of formatting code is highlighted with font-lock-warning-face:
How do I turn off this behavior?

abo-abo
- 13,943
- 1
- 29
- 43
2
votes
1 answer
Adjusting indenting for lisp if statements
I am learning common lisp and am trying to follow the style guide suggested by lisp-lang.org. In this style guide is an if statement style that I think makes the code more readable:
(if (cond)
(true-branch)
(false-branch))
That is, the…

CL40
- 123
- 3
2
votes
0 answers
Dead keys not working in Emacs-Lisp mode *only*
I've been having a really annoying bug when editing elisp files recently: dead keys do not work, but only when I am in Emacs-Lisp mode. If I type a key that is configured as a dead key (say, '), I get a prompt that says Emacs-Lisp: on my mini…

Arthur Azevedo De Amorim
- 203
- 1
- 6
2
votes
1 answer
How to "copy" Scheme or Lisp code from one window to another window in Emacs?
I saw a teacher in iTunes U doing this: have 2 windows open in Emacs, the top is the Scheme (or Lisp) source code, and the bottom is the Scheme interpreter. He seems to press something on the keyboard and the whole Scheme statement will be copied…

nonopolarity
- 273
- 1
- 7
2
votes
2 answers
How do I edit code in REPL after saving it in Emacs?
Alright I apologize if this has been asked, but I cannot seem to find this problem through searching. I am trying to figure out how to work on code in Emacs and when I come back open it again to edit the code. I was working with Emacs in the REPL…

Exodus5656
- 21
- 2
1
vote
1 answer
Change indent for function calls in Emacs Lisp?
While writing the question I found a viable workaround solution for myself, so I am posting it as Q&A. I am leaving the question open, because my workaround does not allow to set the amount by which things are indented.
By default Emacs indents…

kdb
- 1,561
- 12
- 21
1
vote
1 answer
Unexpected indentation in backquoted list starting with comma function call
When I write a backquotedlist that starts with ,( emacs aligns the remaining items to the parenthesis and not to the comma; e.g.:
(defun kb-test1 ()
`(,(hello)
fdefef
,(fefesd)))
(defparameter *kb-test2*
`(,@(hello)
,@(gkere)
…

Kasper van den Berg
- 111
- 5
1
vote
1 answer
Emacs-Lisp mode indentation problem when doc string contains left parenthesis in first column
Usually when I write Lisp code (in an Emacs-Lisp mode buffer), I can press TAB (bound to indent-for-tab-command) to indent code properly. However, if I write a defun with a docstring (longer than one line) that also contains a left parenthesis (in…

Håkon Hægland
- 3,608
- 1
- 20
- 51
0
votes
1 answer
Assign an additional character to introduce comments in Emacs Lisp
I hope this doesn't sound too crazy. One of the traditions of the Lisp language is that one can create custom languages.
I've customized minor things of Emacs Lisp like creating aliases like: def -> defun.
This way I can run code with functions…

Javier Ortega
- 23
- 4
0
votes
1 answer
Cannot expand yasnippets in .el files
I want to use yasnippet in three modes. I have this in my init.el:
;;; Yasnippet
(use-package yasnippet
:commands yas-minor-mode
:config (yas-reload-all)
:hook ((org-mode text-mode emacs-lisp-mode) . yas-minor-mode))
I can create and…

Edman
- 1,167
- 7
- 13
0
votes
1 answer
How can I disable some warnings about function comments in lisp-mode
I am having a file open with lisp code that has some functions written. The file has elisp-mode as a major mode. Emacs shows highlighting and errors on lines with functions that some function definitions miss or do not have correct comments. I'd…

Yuki
- 111
- 5