New answers tagged

0 votes
Accepted

Toggle minor modes in all current and future buffers derived from specific major mode

You can use a "globalized" minor mode, which is the pairing of a buffer local minor mode with a global mode which controls the state of that buffer-local minor mode en-masse in selected ...
phils's user avatar
  • 51.2k
0 votes

Toggle minor modes in all current and future buffers derived from specific major mode

Here comes derived-mode-p function to your rescue. (defun my-unset-minor-modes-hook () (when (derived-mode-p 'prog-mode 'text-mode 'conf-mode 'dired-mode) (hl-line-mode -1) (display-line-...
Saravana's user avatar
  • 2,071
0 votes
Accepted

before-save-hook not working with use-package and custom mode

This needs to be configured via kage-mode-hook. This is the fixed mode: (define-derived-mode kage-mode go-mode "Kage shader script" "Kage mode is a major mode for editing Ebitengine ...
Tom's user avatar
  • 45

Top 50 recent answers are included