diff options
Diffstat (limited to 'doc/emacs/custom.texi')
-rw-r--r-- | doc/emacs/custom.texi | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index ccf5f1932f9..999234e6d33 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -388,15 +388,15 @@ file. For example: Emacs versions, like this: @example -(cond ((< emacs-major-version 22) - ;; @r{Emacs 21 customization.} - (setq custom-file "~/.config/custom-21.el")) - ((and (= emacs-major-version 22) +(cond ((< emacs-major-version 28) + ;; @r{Emacs 27 customization.} + (setq custom-file "~/.config/custom-27.el")) + ((and (= emacs-major-version 26) (< emacs-minor-version 3)) - ;; @r{Emacs 22 customization, before version 22.3.} - (setq custom-file "~/.config/custom-22.el")) + ;; @r{Emacs 26 customization, before version 26.3.} + (setq custom-file "~/.config/custom-26.el")) (t - ;; @r{Emacs version 22.3 or later.} + ;; @r{Emacs version 28.1 or later.} (setq custom-file "~/.config/emacs-custom.el"))) (load custom-file) @@ -519,12 +519,9 @@ Set up a customization buffer for all the settings and groups that match @var{regexp}. @item M-x customize-changed @key{RET} @var{version} @key{RET} -Set up a customization buffer with all the settings and groups -whose meaning has changed since Emacs version @var{version}. - -@item M-x customize-changed-options @key{RET} @var{version} @key{RET} -Set up a customization buffer with all the options whose meaning or -default values have changed since Emacs version @var{version}. +Set up a customization buffer with all the user options, faces and +groups whose meaning has changed since (or been added after) Emacs +version @var{version}. @item M-x customize-saved Set up a customization buffer containing all settings that you @@ -626,7 +623,7 @@ button. the theme file and asks if you really want to load it. Because loading a Custom theme can execute arbitrary Lisp code, you should only say yes if you know that the theme is safe; in that case, Emacs -offers to remember in the future that the theme is safe (this is done +offers to remember in the future that the theme is safe(this is done by saving the theme file's SHA-256 hash to the variable @code{custom-safe-themes}; if you want to treat all themes as safe, change its value to @code{t}). Themes that come with Emacs (in the @@ -1274,7 +1271,13 @@ confirmation prompt. When Emacs encounters these variable/value pairs subsequently, in the same file or others, it will assume they are safe. + You can also tell Emacs to permanently ignore all the variable/value +pairs in the file, by typing @kbd{i} at the confirmation prompt -- +these pairs will thereafter be ignored in this file and in all other +files. + @vindex safe-local-variable-values +@vindex ignored-local-variable-values @cindex risky variable Some variables, such as @code{load-path}, are considered particularly @dfn{risky}: there is seldom any reason to specify them @@ -1286,6 +1289,8 @@ can enter @kbd{!} at the prompt. It applies all the variables, but only marks the non-risky ones as safe for the future. If you really want to record safe values for risky variables, do it directly by customizing @samp{safe-local-variable-values} (@pxref{Easy Customization}). +Similarly, if you want to record values of risky variables that should +be permanently ignored, customize @code{ignored-local-variable-values}. @vindex enable-local-variables The variable @code{enable-local-variables} allows you to change the @@ -1410,6 +1415,16 @@ meanings as they would have in file local variables. @code{coding} cannot be specified as a directory local variable. @xref{File Variables}. +The special key @code{auto-mode-alist} in a @file{.dir-locals.el} lets +you set a file's major mode. It works much like the variable +@code{auto-mode-alist} (@pxref{Choosing Modes}). For example, here is +how you can tell Emacs that @file{.def} source files in this directory +should be in C mode: + +@example +((auto-mode-alist . (("\\.def\\'" . c-mode)))) +@end example + @findex add-dir-local-variable @findex delete-dir-local-variable @findex copy-file-locals-to-dir-locals |