1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-04 22:50:59 -08:00
emacs/doc
Stefan Monnier 287fb2fbad (custom-initialize-after-file): New function
Some global minor modes require initialization.  Those that are preloaded
currently abuse `custom-initialize-delay` for that, but it's suboptimal
and doesn't help those that aren't preloaded.
So introduce a new function to fill that need.
While at it, make `define-globalized-minor-mode` use it
automatically when useful.

* lisp/custom.el (custom-initialize-after-file-load): New function.
* lisp/tooltip.el (tooltip-mode):
* lisp/paren.el (show-paren-mode):
* lisp/rfn-eshadow.el (file-name-shadow-mode):
* lisp/epa-hook.el (auto-encryption-mode):
* lisp/minibuffer.el (minibuffer-regexp-mode, minibuffer-nonselected-mode):
* lisp/electric.el (electric-indent-mode): Use it instead of
`custom-initialize-delay` since the value does not depend on the
runtime context.
(electric-quote-mode): Don't use `custom-initialize-delay` since
the default value is nil anyway.

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Automatically add `:initialize` if needed.
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Remove `:initialize`,
now provided automatically.

* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/modes.texi (Defining Minor Modes): Document and Suggest
`custom-initialize-after-file-load` instead of `custom-initialize-delay`.
2025-10-22 17:12:10 -04:00
..
emacs Improve Dired handling of file names with newlines (bug#79528) 2025-10-22 00:06:03 +02:00
lispintro ; Fix file name in "Loading Files" doc. 2025-07-24 22:13:47 -07:00
lispref (custom-initialize-after-file): New function 2025-10-22 17:12:10 -04:00
man Manual pages: use a showcase time-stamp-pattern 2025-10-16 17:29:01 -07:00
misc Tramp cleanup 2025-10-20 14:42:12 +02:00
translations Update copyright year to 2025 2025-01-02 18:39:42 +01:00