diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-24 17:22:43 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-24 17:22:43 +0200 |
commit | b4543dfa9e72deeee607ffa9396a680c51a00968 (patch) | |
tree | 09493193d03f4961a8007c709f1b8a8598ac26d6 /doc/lispref | |
parent | 8cd66a3170b4117d3cbcdce7a09837e3c2ea0e43 (diff) | |
download | emacs-b4543dfa9e72deeee607ffa9396a680c51a00968.tar.gz emacs-b4543dfa9e72deeee607ffa9396a680c51a00968.tar.bz2 emacs-b4543dfa9e72deeee607ffa9396a680c51a00968.zip |
Extend directory-append to take an arbitrary number of components
* doc/lispref/files.texi (Directory Names): Document it.
* lisp/emacs-lisp/shortdoc.el (file-name): Add new example.
* src/fileio.c (Fdirectory_append): Change the function to take an
arbitrary number of components.
Diffstat (limited to 'doc/lispref')
-rw-r--r-- | doc/lispref/files.texi | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index ec8a2525ed9..a624c2eb937 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -2343,9 +2343,10 @@ entirely of directory separators. @end example @end defun -@defun directory-append directory filename -Combine @var{filename} with @var{directory} by optionally putting a -slash in the middle. +@defun directory-append directory &rest components +Concatenate @var{components} to @var{directory}, inserting a slash +before the components if @var{directory} or the preceding component +didn't end with a slash. @example @group @@ -2354,9 +2355,9 @@ slash in the middle. @end group @end example -This is almost the same as using @code{concat}, but @var{dirname} may -or may not end with a slash character, and this function will not -double that character. +This is almost the same as using @code{concat}, but @var{dirname} (and +the non-final components) may or may not end with slash characters, +and this function will not double those characters. @end defun To convert a directory name to its abbreviation, use this |