1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Make it easier to enable Abbrev mode by default

* lisp/cus-start.el: Make 'abbrev-mode' customizable.
* doc/emacs/abbrevs.texi (Abbrev Concepts):
* etc/NEWS:
* src/buffer.c (syms_of_buffer): <abbrev-mode>: Document
enabling Abbrev mode by default in all buffers by customizing
'abbrev-mode' to a non-nil value.
This commit is contained in:
Sean Whitton 2025-11-25 22:08:19 +00:00
parent 158bf5da77
commit 47aec3cbc9
4 changed files with 25 additions and 7 deletions

View file

@ -49,11 +49,13 @@ insert @samp{find outer otter.}.
@cindex Abbrev mode @cindex Abbrev mode
@cindex mode, Abbrev @cindex mode, Abbrev
Abbrevs expand only when Abbrev mode, a buffer-local minor mode, is Abbrevs expand only when Abbrev mode, a buffer-local minor mode, is
enabled. Disabling Abbrev mode does not cause abbrev definitions to enabled. Disabling Abbrev mode does not cause abbrev definitions to be
be forgotten, but they do not expand until Abbrev mode is enabled forgotten, but they do not expand until Abbrev mode is enabled again.
again. The command @kbd{M-x abbrev-mode} toggles Abbrev mode; with a The command @kbd{M-x abbrev-mode} toggles Abbrev mode in the current
numeric argument, it turns Abbrev mode on if the argument is positive, buffer; with a numeric argument, it turns Abbrev mode on if the argument
off otherwise. @xref{Minor Modes}. is positive, off otherwise (@pxref{Minor Modes}). To enable Abbrev mode
by default in all buffers, customize the variable @code{abbrev-mode} to
a non-@code{nil} value (@pxref{Easy Customization}).
Abbrevs can have @dfn{mode-specific} definitions, active only in one major Abbrevs can have @dfn{mode-specific} definitions, active only in one major
mode. Abbrevs can also have @dfn{global} definitions that are active in mode. Abbrevs can also have @dfn{global} definitions that are active in

View file

@ -3102,6 +3102,13 @@ contains an encrypted file, is an empty buffer, is a hidden buffer, or
is the "*scratch*" buffer. If it cannot locate any acceptable buffers, is the "*scratch*" buffer. If it cannot locate any acceptable buffers,
it will begrudgingly use the scratch buffer. it will begrudgingly use the scratch buffer.
** Abbrev mode
+++
*** You can now enable Abbrev mode by default using Easy Customization.
Customize the variable 'abbrev-mode' to non-nil to enable Abbrev mode by
default in all buffers.
* New Modes and Packages in Emacs 31.1 * New Modes and Packages in Emacs 31.1

View file

@ -173,6 +173,13 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
"24.1") "24.1")
(delete-auto-save-files auto-save boolean) (delete-auto-save-files auto-save boolean)
(kill-buffer-delete-auto-save-files auto-save boolean "28.1") (kill-buffer-delete-auto-save-files auto-save boolean "28.1")
(abbrev-mode abbrev boolean nil
;; Not `custom-set-minor-mode' because it is a
;; buffer-local minor mode. Customizing it to
;; non-nil means enabling the mode in all
;; buffers which don't locally disable it.
:initialize custom-initialize-default
:set custom-set-default)
;; callint.c ;; callint.c
(mark-even-if-inactive editing-basics boolean) (mark-even-if-inactive editing-basics boolean)
;; callproc.c ;; callproc.c

View file

@ -5218,8 +5218,10 @@ Format with `format-mode-line' to produce a string value. */);
doc: /* Local (mode-specific) abbrev table of current buffer. */); doc: /* Local (mode-specific) abbrev table of current buffer. */);
DEFVAR_PER_BUFFER ("abbrev-mode", &BVAR (current_buffer, abbrev_mode), Qnil, DEFVAR_PER_BUFFER ("abbrev-mode", &BVAR (current_buffer, abbrev_mode), Qnil,
doc: /* Non-nil if Abbrev mode is enabled. doc: /* Non-nil if Abbrev mode is enabled.
Use the command `abbrev-mode' to change this variable. */); Use the command `abbrev-mode' to change the value of this variable in
the current buffer. Customize this variable to non-nil to enable Abbrev
mode by default in all buffers. */);
DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column), DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
Qintegerp, Qintegerp,