diff options
Diffstat (limited to 'doc/emacs/custom.texi')
-rw-r--r-- | doc/emacs/custom.texi | 74 |
1 files changed, 53 insertions, 21 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 999234e6d33..d9d6a680057 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -195,7 +195,7 @@ the customization buffer: The first line shows that the variable is named @code{kill-ring-max}, formatted as @samp{Kill Ring Max} for easier -viewing. Its value is @samp{60}. The button labeled @samp{[Hide]}, +viewing. Its value is @samp{120}. The button labeled @samp{[Hide]}, if activated, hides the variable's value and state; this is useful to avoid cluttering up the customization buffer with very long values (for this reason, variables that have very long values may start out @@ -1084,8 +1084,9 @@ first line: @noindent You can specify any number of variable/value pairs in this way, each pair with a colon and semicolon. The special variable/value pair -@code{mode: @var{modename};}, if present, specifies a major mode. The -@var{value}s are used literally, and not evaluated. +@code{mode: @var{modename};}, if present, specifies a major mode +(without the ``-mode'' suffix). The @var{value}s are used literally, +and not evaluated. @findex add-file-local-variable-prop-line @findex delete-file-local-variable-prop-line @@ -1473,9 +1474,10 @@ as Dired buffers (@pxref{Dired}). Most of the variables reflect the situation on the local machine. Often, they must use a different value when you operate in buffers -with a remote default directory. Think about the shell to be applied -when calling @code{shell} -- it might be @file{/bin/bash} on your -local machine, and @file{/bin/ksh} on a remote machine. +with a remote default directory. Think about the behavior when +calling @code{shell} -- on your local machine, you might use +@file{/bin/bash} and rely on termcap, but on a remote machine, it may +be @file{/bin/ksh} and terminfo. This can be accomplished with @dfn{connection-local variables}. Directory and file local variables override connection-local @@ -1491,6 +1493,10 @@ variables/value pairs in a @dfn{profile}, using the criteria, identifying a remote machine: @example +(connection-local-set-profile-variables 'remote-terminfo + '((system-uses-terminfo . t) + (comint-terminfo-terminal . "dumb-emacs-ansi"))) + (connection-local-set-profile-variables 'remote-ksh '((shell-file-name . "/bin/ksh") (shell-command-switch . "-c"))) @@ -1500,13 +1506,15 @@ criteria, identifying a remote machine: (shell-command-switch . "-c"))) (connection-local-set-profiles - '(:application tramp :machine "remotemachine") 'remote-ksh) + '(:application tramp :machine "remotemachine") + 'remote-terminfo 'remote-ksh) @end example - This code declares two different profiles, @code{remote-ksh} and -@code{remote-bash}. The profile @code{remote-ksh} is applied to all + This code declares three different profiles, @code{remote-terminfo}, +@code{remote-ksh}, and @code{remote-bash}. The profiles +@code{remote-terminfo} and @code{remote-ksh} are applied to all buffers which have a remote default directory matching the regexp -@code{"remotemachine} as host name. Such a criteria can also +@code{"remotemachine"} as host name. Such a criteria can also discriminate for the properties @code{:protocol} (this is the Tramp method) or @code{:user} (a remote user name). The @code{nil} criteria matches all buffers with a remote default directory. @@ -1721,6 +1729,17 @@ previous ones, but they are specifically for file name completion. They do not bind @key{SPC}. @end itemize +By default, @key{TAB}, @key{SPC} and @key{?} do completion in +@code{minibuffer-local-completion-map}. If you commonly complete over +collections that have elements with space or question mark characters in +them, it may be convenient to disable completion on those keys by +putting this in your init file: + +@lisp +(define-key minibuffer-local-completion-map " " 'self-insert-command) +(define-key minibuffer-local-completion-map "?" 'self-insert-command) +@end lisp + @node Rebinding @subsection Changing Key Bindings Interactively @cindex key rebinding, this session @@ -2355,14 +2374,19 @@ function @code{setq} to set the variable @code{fill-column} (@pxref{Filling}) to 60. You can set any Lisp variable with @code{setq}, but with certain -variables @code{setq} won't do what you probably want in the -init file. Some variables automatically become buffer-local -when set with @code{setq}; what you want in the init file is to set -the default value, using @code{setq-default}. Some customizable minor -mode variables do special things to enable the mode when you set them -with Customize, but ordinary @code{setq} won't do that; to enable the -mode in your init file, call the minor mode command. The -following section has examples of both of these methods. +variables @code{setq} won't do what you probably want in the init +file. Some variables automatically become buffer-local when set with +@code{setq}; what you want in the init file is to set the default +value, using @code{setq-default}. (The following section has examples +of both of these methods.) + +Some customizable minor mode variables do special things to enable the +mode when you set them with Customize, but ordinary @code{setq} won't +do that; to enable the mode in your init file, call the minor mode +command. Finally, a few customizable user options are initialized in +complex ways, and these have to be set either via the customize +interface (@pxref{Customization}) or by using +@code{customize-set-variable} (@pxref{Examining}). The second argument to @code{setq} is an expression for the new value of the variable. This can be a constant, a variable, or a @@ -2511,6 +2535,14 @@ Turn on Auto Fill mode automatically in Text mode and related modes @end example @item +Change the coding system used when using the clipboard +(@pxref{Communication Coding}). + +@example +(customize-set-variable 'selection-coding-system 'utf-8) +@end example + +@item Load the installed Lisp library named @file{foo} (actually a file @file{foo.elc} or @file{foo.el} in a standard Emacs directory). @@ -2783,12 +2815,12 @@ Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}. @cindex early init file Most customizations for Emacs should be put in the normal init file. -@xref{Init File}. However, it is sometimes desirable -to have customizations that take effect during Emacs startup earlier than the +@xref{Init File}. However, it is sometimes necessary +to have customizations take effect during Emacs startup earlier than the normal init file is processed. Such customizations can be put in the early init file, @file{~/.config/emacs/early-init.el} or @file{~/.emacs.d/early-init.el}. This file is loaded before the package system and GUI is initialized, so in it you can customize variables -that affect frame appearance as well as the package initialization process, +that affect the package initialization process, such as @code{package-enable-at-startup}, @code{package-load-list}, and @code{package-user-dir}. Note that variables like @code{package-archives} which only affect the installation of new packages, and not the process of |