Skip to main content
4 votes
Accepted

Please explain the behaviour of this emacs feature. (Lisp Interaction mode, truncate long lines)

The binding C-j runs the command eval-print-last-sexp. Use C-h k C-j to describe the key binding and see the documentation for the corresponding command. In that doc you'll see some relevant ...
glucas's user avatar
  • 20.6k
3 votes
Accepted

Adjusting indenting for lisp if statements

Why is Emacs so weird? Emacs indents lisp code as if it were Emacs Lisp, where if accepts unlimited else forms; unlike in Common Lisp, where if accepts at most 3 arguments. What to do? Tell Emacs ...
sds's user avatar
  • 6,124
2 votes
Accepted

Emacs-Lisp mode indentation problem when doc string contains left parenthesis in first column

TLDR (setq open-paren-in-column-0-is-defun-start nil) The docstring for indent-for-tab-command tells us it calls the function in variable indent-line-function. In emacs-lisp mode this is lisp-indent-...
JeanPierre's user avatar
  • 7,475
2 votes

Why does lisp-interaction-mode exist, and do we ever need it?

Besides the differences mentioned in the other answers, there is a small but major difference between 'lisp-interaction-mode' and 'emacs-lisp-mode', which is that in 'lisp-interaction-mode' lexical ...
dalanicolai's user avatar
  • 7,825
1 vote

Assign an additional character to introduce comments in Emacs Lisp

defalias 🔲 -> ;; This can be done by prettify-symbols-mode: (add-hook 'SOME-mode-hook (lambda () (setq-local prettify-symbols-alist '((";;" . ?🔲))) (prettify-symbols-mode)))
shynur's user avatar
  • 5,318
1 vote
Accepted

Cannot expand yasnippets in .el files

Put them in "emacs-lisp-mode" folder. The Emacs Lisp mode is called emacs-lisp-mode.
Arktik's user avatar
  • 972
1 vote

Change indent for function calls in Emacs Lisp?

Workaround The best I can currently think of is (advice-add #'function-get :around #'my--get-lisp-indent-function) (defun my--get-lisp-indent-function (oldfun symbol propname &rest r) (let ((...
kdb's user avatar
  • 1,561
1 vote
Accepted

how to generate tags and find mark-whole-buffer definition

C-h f mark-whole-buffer tells us that the function is defined in simple.el. If you click on the link in the help buffer to simple.el, it takes you right to the definition of the function.
Fran Burstall's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible