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.
This commit is contained in:
Lars Ingebrigtsen 2021-07-24 17:22:43 +02:00
parent 8cd66a3170
commit b4543dfa9e
4 changed files with 93 additions and 43 deletions

View file

@ -276,6 +276,7 @@ There can be any number of :example/:result elements."
(directory-append
:eval (directory-append "/tmp/" "foo")
:eval (directory-append "/tmp" "foo")
:eval (directory-append "/tmp" "foo" "bar/" "zot")
:eval (directory-append "/tmp" "~"))
(expand-file-name
:eval (expand-file-name "foo" "/tmp/")