Skip to main content

Questions tagged [hooks]

Hooks are an important mechanism for customizing Emacs. A hook is a Lisp variable which holds a list of functions, to be called on some well-defined occasion.

0 votes
0 answers
4 views

How can I access, from a mode's hook, the client process(es) that is/are visiting the buffer the mode is being set on? Outside of the context of a hook, I can just access the buffer-local variable ...
Lionel Elie Mamane's user avatar
0 votes
0 answers
84 views

At https://www.gnu.org/software/emacs/manual/html_node/use-package/Hooks.html, the Emacs manual states (use-package company :commands company-mode :init (add-hook 'prog-mode-hook #'company-mode))...
Addlai's user avatar
  • 161
0 votes
0 answers
38 views

I recently added following configuration for auto formatting. (use-package format-all :commands format-all-mode :hook (prog-mode . format-all-mode) ;; <------------------ this ...
Garid's user avatar
  • 864
1 vote
1 answer
114 views

Given: Emacs 28.1 I have two monitors. M-x make-frame-on-monitor I select "DISPLAY2" and new frame open in the second monitor. Nice. But I want to do this when Emacs is launch. I init.el I ...
a_subscriber's user avatar
  • 4,386
1 vote
1 answer
122 views

I have already found the proper hook for when the character is inserted(post-self-insert-hook), but how to hook when a character is deleted? Also, how to get the character that was deleted, I am ...
Stigl's user avatar
  • 49
1 vote
1 answer
114 views

I'm trying to use electric pair mode for backticks in markdown mode. The following code hasn't worked and throws and error whenever I type a backtick. How was it wrong? (defvar markdown-electric-pairs ...
J. Mini's user avatar
  • 265
0 votes
1 answer
129 views

I love using cape in text mode, but I cannot figure out how to stop it from activating in programming modes. Is it possible to either only enable it in certain modes or to disable it in specific modes?...
J. Mini's user avatar
  • 265
0 votes
2 answers
298 views

I wrote a little derived mode for the kage shader language, it's derived from go-mode (syntax is the same). I also like to use gofmt, but it's just not loading the hook. Here's the mode: (define-...
Tom's user avatar
  • 45

15 30 50 per page
1
2 3 4 5
28