Questions tagged [minor-mode]
20 questions
122
votes
6 answers
How do you list the active minor modes in emacs?
How do you list the active minor modes in emacs?

readonly
- 343,444
- 107
- 203
- 205
15
votes
3 answers
How to create keybindings for a custom minor mode in Emacs
Question:
How do I create custom keybindings for minor modes? Something like this.
Here is what I have so far. I'm trying to get just one custom keybinding to work:
(define-minor-mode num-mode
"Toggle the Num pad keys.
With no argument,…

Peter Ajtai
- 56,972
- 13
- 121
- 140
8
votes
1 answer
How to disable global minor mode in a specified major mode
I use Prelude, I want enable hs-minor-mode in all prog-modes, except web-mode. I wrote
(add-hook 'prog-mode-hook #'hs-minor-mode)
(make-variable-buffer-local 'hs-minor-mode)
(add-hook 'web-mode-hook (lambda () (setq…

zwb
- 739
- 1
- 7
- 17
4
votes
1 answer
Override minor mode keybinding in emacs
I am using paredit (a lisp minor mode) in emacs.
Paredit binds C- and to barf and slurp sexp which I don't like.
I am trying to set back the keybindings to left-word and right-word
If I evaluate in a buffer (that uses paredit mode)…

raduw
- 1,008
- 1
- 9
- 19
4
votes
1 answer
Emacs: How to enable a mode globally?
I just have a mode from an addon which I want to enable globally. In order to turn on it by hand I need to enter M-x highlight-indentation-mode. So, below is a list of what I have tried yet: (highlight-indentation-mode t),…

Hi-Angel
- 4,933
- 8
- 63
- 86
3
votes
3 answers
Emacs minor mode programming: cancel toggle-off procedure?
I am programming my own Emacs minor mode using the idioms and macros similar to this minimal example:
(define-minor-mode foo-mode
"Toggle Foo mode."
:init-value nil
:lighter " Foo"
:group 'foo
(if foo-mode
(do-enable-foo)
…

Linda
- 131
- 1
- 4
3
votes
2 answers
How to define keymap for minor mode correctly
I'd like to define custom mode for improvements that suits to any program mode. And I need to define key-bindings for all this modes. I choose to use define-minor-mode with :keymap to declare key bindings with minimum effort.
I'd like to bind…

ayvango
- 5,867
- 3
- 34
- 73
2
votes
1 answer
Permanently disable a global minor for a major mode in Emacs
Since doc-view-mode is very slow with the enabled linum-mode, I am trying to disable it for that mode. The same question has been answered almost 6 years ago:
automatically disable a global minor mode for a specific major mode
Following the answer…

honey_badger
- 472
- 3
- 10
2
votes
1 answer
Almost-global Emacs minor mode
I'm working on an Emacs minor mode, and I'd like it to apply only when the major mode is a certain mode (i.e. js-mode). In other words, when I activate my-super-mode, I'd like the keymap it defines to be available in all JS buffers (like it was…

mishoo
- 2,415
- 1
- 18
- 12
1
vote
2 answers
How to use the same file extension with different modes?
I have files with a .new extension that contain LaTeX code (they are the output of a program that does things on the original .tex source).
In order to check them I need that they have the LaTeX syntax highlighted and that they can be opened in…

Onner Irotsab
- 125
- 4
1
vote
1 answer
emacs : a minor mode to show numbers in all kinds of radix
I'm looking for an Emacs package that can recognise numbers and their radix.
I would like it to be interactive (to give the value of the number selected or at point).
The returned values could be printed to the minibuffer (then messages buffer) or…

windrg00
- 457
- 3
- 9
1
vote
1 answer
What is the meaning of adoc mode?
The adoc minor mode automatically appear whenever I open Common Lisp extension file *.lsp.
I have done a search on Google, as well on Emacs help itself, but could not find my wanted information. Thank for any help ;)

Cảnh Toàn Nguyễn
- 479
- 6
- 12
1
vote
1 answer
Emacs Minor Mode Sticky Control
Is there a minor mode in emacs that attaches a Control Key to every keystroke representing a single character? I wanted to get something similar to action mode in Vim. I've seen Viper, but would prefer not to spend the time to relearn all of the…

invisible
- 13
- 2
0
votes
0 answers
emacs minor-mode failing upon call to require
I am making a minor mode that is split into a number of files.
In my .emacs I have done
(add-to-list 'load-path "~/bin/tika")
(require 'tika)
(tika-tools)
In tika.el resides the function
(defun tika-tools ()
(require 'tika-hgstyle)
(setq…

Dilna
- 405
- 1
- 6
0
votes
1 answer
Invalid Keymap error when byte compiling minor-mode key bindings
The code below from my .emacs works fine normally but gives me an "Invalid keymap my-keys-mode-map" error when I try to byte compile it.
(eval-and-compile
(defvar my-keys-mode-map (make-sparse-keymap) "my-keys-mode keymap.")
(define-minor-mode…

RNP
- 27
- 6