

Github GitHub - joewreschnig/auto-minor-mode: Enable Emacs minor modes by buffer...
source link: https://github.com/joewreschnig/auto-minor-mode
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

auto-minor-mode
This package lets you enable minor modes based on file name and
contents. To find the right modes, it checks filenames against
patterns in auto-minor-mode-alist
and file contents against
auto-minor-mode-magic-alist
. These work like the built-in Emacs
variables auto-mode-alist
and magic-mode-alist
.
Unlike major modes, all matching minor modes are enabled, not only the first match.
A reason you might want to use it:
(add-to-list 'auto-minor-mode-alist '("-theme\\.el\\'" . rainbow-mode))
There's intentionally no equivalent of interpreter-mode-alist
.
Interpreters should determine the major mode. Relevant minor modes can
then be enabled by major mode hooks.
Minor modes are set whenever set-auto-mode
, the built-in function
responsible for handling automatic major modes, is called.
use-package Integration
If you also use use-package, two new keywords are added, :minor
and :magic-minor
, which register entries in these alists. You must
load (and not defer) auto-minor-mode
before using these keywords.
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Recommend
-
151
Irony-Mode A C/C++ minor mode powered by libclang irony-mode is an Emacs minor-mode that aims at i...
-
153
IMPORTANT This package is not maintained anymore. User should go and checkout weirdNox/org-noter as an alternative. Interleaved Textbooks? Some history, w...
-
41
diminish.el Introduction When we diminish a mode, we are saying we want it to continue doing its work for us, but we no longer want to be reminded of it. It becomes a night worker, like a janitor; it becomes an invi...
-
66
-
29
with-current-buffer does not move point By using our site, you acknowledge that you have read and unders...
-
21
hide-mode-line Provides hide-mode-line-mode. A minor mode that hides (or masks) the mode-line in your current buffer. It can be used to toggle an alternative mode-line, toggle its visibility, or simply disable the mode-l...
-
18
gorepl-mode A minor emacs mode for Go REPL. Synopsis gorepl-mode is a Go REPL interaction library for Emacs. It's built on top of gore. Gorepl pack...
-
18
Side Hustle Hustle through a buffer's Imenu in a side window in GNU Emacs. Side Hustle spawns a side window linked to the current buffer, which allows working with multiple buffers simultaneously. See
-
24
yard-mode Rudimentary support for fontifying YARD tags and directives in ruby comments. Installation Use MELPA: M-x package-install yard-mode. Ad...
-
7
README HALP With Halp, one keystroke executes all...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK