aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/custom.texi53
-rw-r--r--doc/emacs/maintaining.texi16
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi29
-rw-r--r--doc/lispref/customize.texi13
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/files.texi3
-rw-r--r--doc/lispref/frames.texi16
-rw-r--r--doc/lispref/help.texi9
-rw-r--r--doc/lispref/tips.texi84
-rw-r--r--doc/misc/tramp.texi39
10 files changed, 228 insertions, 35 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index bf137ef946b..77fff25b7b2 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -868,13 +868,20 @@ otherwise stated, affects only the current Emacs session. The only
868way to alter the variable in future sessions is to put something in 868way to alter the variable in future sessions is to put something in
869your initialization file (@pxref{Init File}). 869your initialization file (@pxref{Init File}).
870 870
871 If you're setting a customizable variable in your initialization
872file, and you don't want to use the Customize interface, you can use
873the @code{setopt} macro. For instance:
874
875@findex setopt 871@findex setopt
872 If you're setting a customizable variable, and you don't want to use
873the Customize interface, you can use the @code{setopt} macro. For
874instance:
875
876@example 876@example
877(setopt fill-column 75) 877 M-: (setopt fill-column 75) @key{RET}
878@end example
879
880@noindent
881Or, if you want to do this in your initialization file:
882
883@example
884 (setopt fill-column 75)
878@end example 885@end example
879 886
880This works the same as @code{setq}, but if the variable has any 887This works the same as @code{setq}, but if the variable has any
@@ -883,6 +890,34 @@ special setter functions, they will be run automatically when using
883non-customizable variables, but this is less efficient than using 890non-customizable variables, but this is less efficient than using
884@code{setq}. 891@code{setq}.
885 892
893@findex setopt-local
894 There is also a buffer-local version of @code{setopt}, called
895@code{setopt-local}, that you can use to set buffer specific values for
896customizable options, for example, in mode hooks (@pxref{Hooks}).
897
898This works the same as @code{setq-local}, but if the variable has any
899special setter functions, they will be run automatically when using
900@code{setopt-local}. You can also use @code{setopt-local} on other,
901non-customizable variables, but this is less efficient than using
902@code{setq-local}.
903
904 If you want to change the value of a customizable variable only in
905your current buffer, you can use the @code{setopt-local} macro. For
906instance:
907
908@example
909 M-: (setopt-local fill-column 75) @key{RET}
910@end example
911
912@noindent
913Or, if you want to do this in your initialization file, use the
914following inside a mode hook so this variable will be automatically
915customized in buffers of that mode (@pxref{Hooks}):
916
917@example
918 (setopt-local fill-column 75)
919@end example
920
886@node Hooks 921@node Hooks
887@subsection Hooks 922@subsection Hooks
888@cindex hook 923@cindex hook
@@ -3262,7 +3297,7 @@ acquainted with conventions from other programs.
3262 The functionality enabled by the @code{newcomers-presets} theme will 3297 The functionality enabled by the @code{newcomers-presets} theme will
3263change between releases of Emacs. We may add new functionality, and 3298change between releases of Emacs. We may add new functionality, and
3264also remove old functionality that we think has been superseded. 3299also remove old functionality that we think has been superseded.
3265Therefore, if you get used to the newcomers' presets, consider copying 3300Therefore, if you get used to the newcomers' presets, you should copy
3266them into your own configuration and then disabling the theme again. 3301them into your own configuration and then disable the theme again. You
3267You can use the command @code{copy-theme-options} (@pxref{Custom 3302can use the command @code{copy-theme-options} (@pxref{Custom Themes}) to
3268Themes}) to do this. 3303do this.
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 4aee5e1045d..697a13dbe7b 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -2764,10 +2764,10 @@ Table}.)
2764@node Xref Commands 2764@node Xref Commands
2765@subsubsection Commands Available in the @file{*xref*} Buffer 2765@subsubsection Commands Available in the @file{*xref*} Buffer
2766@cindex commands in @file{*xref*} buffers 2766@cindex commands in @file{*xref*} buffers
2767@cindex XREF mode 2767@cindex Xref mode
2768 2768
2769 The following commands are provided in the @file{*xref*} buffer by 2769 The following commands are provided in the @file{*xref*} buffer by
2770the special XREF mode: 2770the special Xref mode:
2771 2771
2772@table @kbd 2772@table @kbd
2773@item @key{RET} 2773@item @key{RET}
@@ -2880,7 +2880,7 @@ prompt always, customize the value of the variable
2880to prompt only if there's no usable identifier at point.) The command 2880to prompt only if there's no usable identifier at point.) The command
2881then presents the @file{*xref*} buffer with all the references to the 2881then presents the @file{*xref*} buffer with all the references to the
2882identifier, showing the file name and the line where the identifier is 2882identifier, showing the file name and the line where the identifier is
2883referenced. The XREF mode commands are available in this buffer, see 2883referenced. The Xref mode commands are available in this buffer, see
2884@ref{Xref Commands}. 2884@ref{Xref Commands}.
2885 2885
2886When invoked in a buffer whose major mode uses the @code{etags} backend, 2886When invoked in a buffer whose major mode uses the @code{etags} backend,
@@ -2926,6 +2926,16 @@ matches of that regexp in the names of the identifiers with
2926@code{xref-query-replace-in-results}, but is more convenient when you 2926@code{xref-query-replace-in-results}, but is more convenient when you
2927want to rename a single identifier specified by its name @var{from}. 2927want to rename a single identifier specified by its name @var{from}.
2928 2928
2929@findex xref-change-to-xref-edit-mode
2930@cindex Xref Edit mode
2931@cindex mode, Xref Edit
2932 Typing @kbd{e} in the @file{*xref*} buffer makes the buffer writable
2933and enters the Xref Edit mode. Similar to Occur Edit mode (@pxref{Other
2934Repeating Search}), you can edit the matching lines reported by
2935Xref backend and have those changes reflected in the buffer visiting the
2936originating file. Type @kbd{C-c C-c} to leave the Xref Edit mode and
2937return to the Xref mode.
2938
2929@findex tags-search 2939@findex tags-search
2930 @kbd{M-x tags-search} reads a regexp using the minibuffer, then 2940 @kbd{M-x tags-search} reads a regexp using the minibuffer, then
2931searches for matches in all the files in the selected tags table, one 2941searches for matches in all the files in the selected tags table, one
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 1497a9906bd..a712b3a1b46 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -14660,9 +14660,9 @@ beginning of the file. The function definition looks like this:
14660@smallexample 14660@smallexample
14661@group 14661@group
14662(defun lengths-list-file (filename) 14662(defun lengths-list-file (filename)
14663 "Return list of definitions' lengths within FILE. 14663 "Return list of definitions' lengths within the file named FILENAME.
14664The returned list is a list of numbers. 14664The returned list is a list of numbers.
14665Each number is the number of words or 14665Each number in the list is the number of words or
14666symbols in one function definition." 14666symbols in one function definition."
14667@end group 14667@end group
14668@group 14668@group
@@ -14683,10 +14683,10 @@ symbols in one function definition."
14683@end smallexample 14683@end smallexample
14684 14684
14685@noindent 14685@noindent
14686The function is passed one argument, the name of the file on which it 14686The function is passed one argument @var{filename}, the name of the file
14687will work. It has four lines of documentation, but no interactive 14687on which it will work. It has four lines of documentation, but no
14688specification. Since people worry that a computer is broken if they 14688interactive specification. Since people worry that a computer is broken
14689don't see anything going on, the first line of the body is a 14689if they don't see anything going on, the first line of the body is a
14690message. 14690message.
14691 14691
14692The next line contains a @code{save-excursion} that returns Emacs's 14692The next line contains a @code{save-excursion} that returns Emacs's
@@ -14730,8 +14730,8 @@ definition and constructs a lengths' list containing the information.
14730Emacs kills the buffer after working through it. This is to save 14730Emacs kills the buffer after working through it. This is to save
14731space inside of Emacs. My version of GNU Emacs 19 contained over 300 14731space inside of Emacs. My version of GNU Emacs 19 contained over 300
14732source files of interest; GNU Emacs 22 contains over a thousand source 14732source files of interest; GNU Emacs 22 contains over a thousand source
14733files. Another function will apply @code{lengths-list-file} to each 14733files, and Emacs 30.2 more than 1600. Another function will apply
14734of the files. 14734@code{lengths-list-file} to each of the files.
14735 14735
14736Finally, the last expression within the @code{let} expression is the 14736Finally, the last expression within the @code{let} expression is the
14737@code{lengths-list} variable; its value is returned as the value of 14737@code{lengths-list} variable; its value is returned as the value of
@@ -14744,13 +14744,13 @@ C-e} (@code{eval-last-sexp}).
14744@c !!! 22.1.1 lisp sources location here 14744@c !!! 22.1.1 lisp sources location here
14745@smallexample 14745@smallexample
14746(lengths-list-file 14746(lengths-list-file
14747 "/usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el") 14747 "/usr/local/share/emacs/30.2/lisp/emacs-lisp/debug.el")
14748@end smallexample 14748@end smallexample
14749 14749
14750@noindent 14750@noindent
14751You may need to change the pathname of the file; the one here is for 14751You may need to change the name of the file; the one here is for default
14752GNU Emacs version 22.1. To change the expression, copy it to 14752installation tree of GNU Emacs version 30.2. To change the expression,
14753the @file{*scratch*} buffer and edit it. 14753copy it to the @file{*scratch*} buffer and edit it.
14754 14754
14755@need 1200 14755@need 1200
14756@noindent 14756@noindent
@@ -14768,10 +14768,11 @@ Then evaluate the @code{lengths-list-file} expression.)
14768 14768
14769@need 1200 14769@need 1200
14770The lengths' list for @file{debug.el} takes less than a second to 14770The lengths' list for @file{debug.el} takes less than a second to
14771produce and looks like this in GNU Emacs 22: 14771produce and looks like this in GNU Emacs 30.2:
14772 14772
14773@smallexample 14773@smallexample
14774(83 113 105 144 289 22 30 97 48 89 25 52 52 88 28 29 77 49 43 290 232 587) 14774(79 26 140 34 17 112 81 24 155 54 43 102 21 36 36 117 28 29 102 49 43
14775 208 101 28 22 728 15 27)
14775@end smallexample 14776@end smallexample
14776 14777
14777@need 1500 14778@need 1500
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index 364edf63031..705af15e4e2 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -372,12 +372,15 @@ added by calls to @code{custom-add-frequent-value} (see below).
372@item :set @var{setfunction} 372@item :set @var{setfunction}
373Specify @var{setfunction} as the way to change the value of this 373Specify @var{setfunction} as the way to change the value of this
374option when using the Customize interface. The function 374option when using the Customize interface. The function
375@var{setfunction} should take two arguments, a symbol (the option 375@var{setfunction} should take two or three arguments, a symbol (the option
376name) and the new value, and should do whatever is necessary to update 376name), the new value, and an optional @var{buffer-local} indicator.
377@var{setfunction} should do whatever is necessary to update
377the value properly for this option (which may not mean simply setting 378the value properly for this option (which may not mean simply setting
378the option as a Lisp variable); preferably, though, it should not 379the option as a Lisp variable); preferably, though, it should not
379modify its value argument destructively. The default for 380modify its value argument destructively. If optional @var{buffer-local}
380@var{setfunction} is @code{set-default-toplevel-value}. 381is non-nil, the new value should be set buffer locally and not affect its
382global or default values. The default for @var{setfunction} is
383@code{set-default-toplevel-value}.
381 384
382If defined, @var{setfunction} will also be called when evaluating a 385If defined, @var{setfunction} will also be called when evaluating a
383@code{defcustom} form with @kbd{C-M-x} in Emacs Lisp mode and when the 386@code{defcustom} form with @kbd{C-M-x} in Emacs Lisp mode and when the
@@ -387,7 +390,7 @@ If defined, @var{setfunction} will also be called when evaluating a
387If you specify this keyword, the variable's documentation string 390If you specify this keyword, the variable's documentation string
388should describe how to do the same job in hand-written Lisp code, 391should describe how to do the same job in hand-written Lisp code,
389either by invoking @var{setfunction} directly or by using 392either by invoking @var{setfunction} directly or by using
390@code{setopt}. 393@code{setopt} or @code{setopt-local}.
391 394
392@kindex get@r{, @code{defcustom} keyword} 395@kindex get@r{, @code{defcustom} keyword}
393@item :get @var{getfunction} 396@item :get @var{getfunction}
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 656a422cf6e..9115b3a4691 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1661,6 +1661,7 @@ Tips and Conventions
1661* Compilation Tips:: Making compiled code run fast. 1661* Compilation Tips:: Making compiled code run fast.
1662* Warning Tips:: Turning off compiler warnings. 1662* Warning Tips:: Turning off compiler warnings.
1663* Documentation Tips:: Writing readable documentation strings. 1663* Documentation Tips:: Writing readable documentation strings.
1664* Documentation Group Tips:: Writing useful documentation groups.
1664* Comment Tips:: Conventions for writing comments. 1665* Comment Tips:: Conventions for writing comments.
1665* Library Headers:: Standard headers for library packages. 1666* Library Headers:: Standard headers for library packages.
1666 1667
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 049e8ac3e84..f86a18fd896 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2777,6 +2777,9 @@ the end of the file name.
2777 2777
2778If @var{text} is a string, @code{make-temp-file} inserts it in the file. 2778If @var{text} is a string, @code{make-temp-file} inserts it in the file.
2779 2779
2780On Posix systems, Emacs creates the file with permissions that limit its
2781access to the current user.
2782
2780To prevent conflicts among different libraries running in the same 2783To prevent conflicts among different libraries running in the same
2781Emacs, each Lisp program that uses @code{make-temp-file} should have its 2784Emacs, each Lisp program that uses @code{make-temp-file} should have its
2782own @var{prefix}. The number added to the end of @var{prefix} 2785own @var{prefix}. The number added to the end of @var{prefix}
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index d57d643e922..c50619a2de0 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -89,6 +89,20 @@ displayed on that terminal; the list of possible values is the same as
89for @code{framep} above. 89for @code{framep} above.
90@end defun 90@end defun
91 91
92@defun frame-initial-p &optional frame
93This predicate returns non-@code{nil} if @var{frame} is or holds the
94initial text frame that is used internally during daemon mode
95(@pxref{Initial Options, daemon,, emacs, The GNU Emacs Manual}), batch
96mode (@pxref{Batch Mode}), and the early stages of startup
97(@pxref{Startup Summary}). Interactive and graphical programs, for
98instance, can use this predicate to avoid operating on the initial
99frame, which is never displayed.
100
101If @var{frame} is a terminal, this function returns non-@code{nil} if
102@var{frame} holds the initial frame. If @var{frame} is omitted or
103@code{nil}, it defaults to the selected one.
104@end defun
105
92@cindex top-level frame 106@cindex top-level frame
93On a graphical terminal we distinguish two types of frames: A normal 107On a graphical terminal we distinguish two types of frames: A normal
94@dfn{top-level frame} is a frame whose window-system window is a child 108@dfn{top-level frame} is a frame whose window-system window is a child
@@ -3029,7 +3043,7 @@ direction.
3029 See also @code{next-window} and @code{previous-window}, in @ref{Cyclic 3043 See also @code{next-window} and @code{previous-window}, in @ref{Cyclic
3030Window Ordering}. 3044Window Ordering}.
3031 3045
3032 Some Lisp programs need to find one or more frames that satisfy a 3046 Some Lisp programs need to find one or more frames that satisfy
3033given criteria. The function @code{filtered-frame-list} is provided for 3047given criteria. The function @code{filtered-frame-list} is provided for
3034this purpose. 3048this purpose.
3035 3049
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 3261cf838f7..a9bc9221912 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -828,14 +828,16 @@ if the user types the help character again.
828@cindex documentation groups 828@cindex documentation groups
829@cindex groups of functions 829@cindex groups of functions
830@cindex function groups 830@cindex function groups
831@cindex shortdoc groups
831 832
832Emacs can list functions based on various groupings. For instance, 833Emacs can list functions based on various groupings. For instance,
833@code{string-trim} and @code{mapconcat} are ``string'' functions, so 834@code{string-trim} and @code{mapconcat} are ``string'' functions, so
834@kbd{M-x shortdoc RET string RET} will give an overview 835@kbd{M-x shortdoc RET string RET} will give an overview of these and
835of functions that operate on strings. 836other functions that operate on strings.
836 837
837The documentation groups are created with the 838The documentation groups are created with the
838@code{define-short-documentation-group} macro. 839@code{define-short-documentation-group} macro. @xref{Documentation
840Group Tips}, for how to write good documentation groups.
839 841
840@defmac define-short-documentation-group group &rest functions 842@defmac define-short-documentation-group group &rest functions
841Define @var{group} as a group of functions, and provide short 843Define @var{group} as a group of functions, and provide short
@@ -846,6 +848,7 @@ summaries of using those functions. The optional argument
846(@var{func} [@var{keyword} @var{val}]@dots{}) 848(@var{func} [@var{keyword} @var{val}]@dots{})
847@end lisp 849@end lisp
848 850
851@cindex documentation group keywords
849The following keywords are recognized: 852The following keywords are recognized:
850 853
851@table @code 854@table @code
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 7f22dc06ef2..2fbac9508d6 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -35,6 +35,7 @@ in batch mode, e.g., with a command run by @kbd{@w{M-x compile
35* Compilation Tips:: Making compiled code run fast. 35* Compilation Tips:: Making compiled code run fast.
36* Warning Tips:: Turning off compiler warnings. 36* Warning Tips:: Turning off compiler warnings.
37* Documentation Tips:: Writing readable documentation strings. 37* Documentation Tips:: Writing readable documentation strings.
38* Documentation Group Tips:: Writing useful documentation groups.
38* Comment Tips:: Conventions for writing comments. 39* Comment Tips:: Conventions for writing comments.
39* Library Headers:: Standard headers for library packages. 40* Library Headers:: Standard headers for library packages.
40@end menu 41@end menu
@@ -934,6 +935,89 @@ If you do not anticipate anyone editing your code with older Emacs
934versions, there is no need for this work-around. 935versions, there is no need for this work-around.
935@end itemize 936@end itemize
936 937
938@node Documentation Group Tips
939@section Tips for Documentation Groups
940@cindex documentation groups, tips
941@cindex tips for documentation groups
942
943@cindex documentation groups, compatibility
944 Documentation groups, available since Emacs 28, are useful to document
945functions of Lisp packages based on various groupings
946(@pxref{Documentation Groups}). This section gives some tips on how you
947can define documentation groups in your Lisp package in a way such that
948users of different Emacs versions can equally well use these groups.
949
950@itemize @bullet
951@item
952To define documentation groups for your own Lisp package across
953different Emacs versions, you can use a boilerplate template along the
954lines of the following to make your package compile and load without
955errors:
956
957@smallexample
958@group
959;;; well-doc.el --- a well-documented package -*- lexical-binding: t; -*-
960
961@dots{} package header and contents @dots{}
962@end group
963
964@group
965;; Explicitly require shortdoc for Emacs 28, which does not have an
966;; autoload for macro `define-short-documentation-group'. And for
967;; Emacs 30, so that we can redefine `shortdoc--check' later.
968(require 'shortdoc nil t)
969
970(eval-when-compile
971
972 ;; Default macro `define-short-documentation-group' for Emacs 27
973 ;; and older, which do not have the shortdoc feature at all.
974 (unless (fboundp 'define-short-documentation-group)
975 (defmacro define-short-documentation-group (&rest _)))
976
977 ;; Disable too rigid shortdoc checks for Emacs 30, which let it
978 ;; error out on newer shortdoc keywords.
979 (when (eq emacs-major-version 30)
980 (fset 'shortdoc--check #'ignore)))
981@end group
982
983@group
984(define-short-documentation-group well-doc
985 @dots{})
986
987;;; well-doc.el ends here
988@end group
989@end smallexample
990
991@findex define-short-documentation-group
992If you do not intend to support some of the Emacs versions mentioned
993above, you can safely omit the corresponding forms from the template.
994If you intend to support only Emacs 31 and newer, you do not need any
995of the above and can just use @code{define-short-documentation-group}.
996
997@item
998@cindex documentation group keywords, compatibility
999Newer Emacs versions might introduce newer documentation group features
1000and keywords. However, these features or keywords will never break the
1001display of a documentation group in older Emacs versions. Suppose you
1002use a hypothetical group keyword @code{:super-pretty-print}, available
1003in some future Emacs version, like this in your Lisp package
1004@file{well-doc.el}:
1005
1006@smallexample
1007@group
1008(define-short-documentation-group well-doc
1009 (well-doc-foo
1010 :eval (well-doc-foo)
1011 :super-pretty-print t))
1012@end group
1013@end smallexample
1014
1015That future Emacs version will then supposedly super-pretty-print the
1016example for function @code{well-doc-foo}. Older Emacs versions will
1017silently ignore keyword @code{:super-pretty-print} and show the example
1018according to their regular display rules.
1019@end itemize
1020
937@node Comment Tips 1021@node Comment Tips
938@section Tips on Writing Comments 1022@section Tips on Writing Comments
939@cindex comments, Lisp convention for 1023@cindex comments, Lisp convention for
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index b75a037f78b..23b6dce2ec6 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -6728,6 +6728,45 @@ See the docstring of variable @code{tramp-methods} for possible
6728@code{foo-tramp-executable} in this example would be a Lisp constant, 6728@code{foo-tramp-executable} in this example would be a Lisp constant,
6729which is the program name of @command{foo}. 6729which is the program name of @command{foo}.
6730 6730
6731If a parameter doesn't have a static value but must be computed at
6732runtime, a format specifier can be used, like @t{"%h"} in the example
6733above. See the docstring of @code{tramp-methods}, which patterns are
6734expanded in which parameter. Furthermore, other format specifiers can
6735be added via the variable @code{tramp-extra-expand-args}.
6736
6737The following parameters expand format specifiers for the
6738@code{tramp-sh} backend: @code{tramp-copy-args},
6739@code{tramp-copy-env}, @code{tramp-copy-file-name},
6740@code{tramp-login-args}, @code{tramp-login-program},
6741@code{tramp-remote-copy-args}.
6742
6743The example above could use
6744
6745@lisp
6746(tramp-login-program "%1")
6747@end lisp
6748
6749And you could set @code{tramp-extra-expand-args} as connection-local value:
6750
6751@lisp
6752@group
6753(defun foo-tramp-get-login-program (vec)
6754 "Return connection-local value of `tramp-login-program'."
6755 @dots{})
6756@end group
6757
6758@group
6759(connection-local-set-profile-variables
6760 'foo-tramp-connection-local-default-profile
6761 '((tramp-extra-expand-args
6762 ?1 (foo-tramp-get-login-program (car tramp-current-connection)))))
6763
6764(connection-local-set-profiles
6765 '(:application tramp :protocol "foo")
6766 foo-tramp-connection-local-default-profile)
6767@end group
6768@end lisp
6769
6731Another initialization could tell @value{tramp} which are the default 6770Another initialization could tell @value{tramp} which are the default
6732user and host name for method @option{foo}. This is done by calling 6771user and host name for method @option{foo}. This is done by calling
6733@code{tramp-set-completion-function}: 6772@code{tramp-set-completion-function}: