aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorPo Lu2024-07-24 11:41:58 +0800
committerPo Lu2024-07-24 11:41:58 +0800
commitdb40b65825f311aaa908f7c169ff6ad3ec5a40e6 (patch)
tree68b0a176342f33f7248a72168457c4e06e40201a /doc/misc
parenta793305d166939f26e6fb5418186bb11e65f0e0b (diff)
parent1ee8579eb7d7aae9405f33099559ac8205a59be2 (diff)
downloademacs-db40b65825f311aaa908f7c169ff6ad3ec5a40e6.tar.gz
emacs-db40b65825f311aaa908f7c169ff6ad3ec5a40e6.zip
Merge from savannah/emacs-30
1ee8579eb7d Fix bug#72255 05629d3af0a Delete redundant "a.k.a." in use-package.texi c7609464f70 Document (use-package 'emacs) declarations de9f9add138 Improve 'emacs-news-view-mode' menus and bindings 7588e1f8a9f ; * src/xdisp.c (Fformat_mode_line): Doc fix. 2074e94c3b1 Fix disappearing bar cursor on Hebrew text (bug#72230) 1aaadc8aec5 Fix DocView with DVI files c1382257aa8 ; Fix typo in use-package.texi caf7426f0ca FIx spurious fontification of variable in Java Mode 9b426e15abd Correctly typeset nil and t in texinfo f050b9c5033 Fix Tramp IPv6 handling in tests 46b192c04b1 Update to Org 9.7.8-5-gfdf0e0 87f41b937bc Fix Ftreesit_parser_create
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/gnus-faq.texi11
-rw-r--r--doc/misc/use-package.texi43
2 files changed, 41 insertions, 13 deletions
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index a773d48417c..c21f19cc784 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -1173,12 +1173,11 @@ to postings you send to the gmane hierarchy, use
1173send to groups containing the string binaries in their 1173send to groups containing the string binaries in their
1174name etc. 1174name etc.
1175 1175
1176You can instead of specifying a regexp specify a function 1176You can instead of specifying a regexp specify a function which is
1177which is evaluated, only if it returns true, the 1177evaluated, only if it returns true, the corresponding settings take
1178corresponding settings take effect. Two interesting 1178effect. Two interesting candidates for this are @code{message-news-p}
1179candidates for this are message-news-p which returns t if 1179which returns @code{t} if the current Group is a newsgroup and the
1180the current Group is a newsgroup and the corresponding 1180corresponding @code{message-mail-p}.
1181message-mail-p.
1182 1181
1183Note that all forms that match are applied, that means in 1182Note that all forms that match are applied, that means in
1184the example below, when I post to 1183the example below, when I post to
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index 99348398550..8a7af5bc6f6 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -177,13 +177,13 @@ loading actually occurs. As you might expect, you can use
177@end group 177@end group
178@end lisp 178@end lisp
179 179
180The above declarations will load the @samp{foo} package 180The above declarations will load the @samp{foo} package immediately. In
181immediately. In most cases, this is not necessary or desirable, as 181most cases, this is not necessary or desirable, as that will slow down
182that will slow down Emacs startup. Instead, you should try to set 182Emacs startup. Instead, you should try to set things up so that
183things up so that packages are only loaded when they are actually 183packages are only loaded when they are actually needed
184needed (a.k.a. ``autoloading''). If you have installed a package from 184(``autoloading''). If you have installed a package from @acronym{GNU}
185@acronym{GNU} @acronym{ELPA} that provides it's own autoloads, it is often 185@acronym{ELPA} that provides its own autoloads, it is often enough to
186enough to say: 186say:
187 187
188@lisp 188@lisp
189@group 189@group
@@ -252,6 +252,7 @@ on Emacs start. @xref{Installing packages}, for details.
252* Forcing loading:: Loading packages immediately. 252* Forcing loading:: Loading packages immediately.
253* Conditional loading:: Loading packages conditionally. 253* Conditional loading:: Loading packages conditionally.
254* Loading sequentially:: Loading packages in sequence. 254* Loading sequentially:: Loading packages in sequence.
255* The @code{emacs} package:: Customizing built-in variables.
255* Load dependencies:: Don't load without dependencies. 256* Load dependencies:: Don't load without dependencies.
256* Manual installation:: Loading manually installed packages. 257* Manual installation:: Loading manually installed packages.
257@end menu 258@end menu
@@ -567,6 +568,34 @@ registers autoloads, such as @code{:bind} or @code{:hook}
567it is possible that your package will never be loaded if you do not 568it is possible that your package will never be loaded if you do not
568add @code{:demand t} to those declarations. 569add @code{:demand t} to those declarations.
569 570
571@node The @code{emacs} package
572@section Customizing built-in variables
573@cindex customizing built-in variables
574
575Some users want to put all their customizations in use-package
576declarations, even for variables, hooks, and options that are always
577available, without loading any package.@footnote{In other words, they
578are either preloaded in Emacs or defined in Emacs' C sources.}
579
580For that purpose, you can use the no-op @samp{emacs} package:
581
582@lisp
583@group
584(use-package emacs
585 :init
586 (setq custom-file "~/.emacs.d/emacs-custom.el")
587 (load custom-file)
588 (setq frame-title-format "%b")
589 :custom
590 (use-short-answers t))
591@end group
592@end lisp
593
594This declaration takes advantage of the fact that @w{@code{(featurep
595'emacs)}} always returns true, and has no special meaning beyond that.
596It simply provides a way to organize your customizations, without
597loading anything.
598
570@node Load dependencies 599@node Load dependencies
571@section Prevent loading if dependencies are missing 600@section Prevent loading if dependencies are missing
572@cindex prevent loading package if dependencies are missing 601@cindex prevent loading package if dependencies are missing