From 5431a58e86d3f2579c1edf1dc8d7074de73ac694 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 24 Jul 2021 13:30:58 +0200 Subject: Add new function `directory-append' * doc/lispref/files.texi (Directory Names): Document it, and remove the concat-based file concatenation description. * lisp/emacs-lisp/shortdoc.el (file-name): Add. And add more expand-file-name examples. * src/fileio.c (Fdirectory_append): New function. --- lisp/emacs-lisp/shortdoc.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 22439f4c36c..7506d756d19 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -273,8 +273,15 @@ There can be any number of :example/:result elements." :eval (file-relative-name "/tmp/foo" "/tmp")) (make-temp-name :eval (make-temp-name "/tmp/foo-")) + (directory-append + :eval (directory-append "/tmp/" "foo") + :eval (directory-append "/tmp" "foo") + :eval (directory-append "/tmp" "~")) (expand-file-name - :eval (expand-file-name "foo" "/tmp/")) + :eval (expand-file-name "foo" "/tmp/") + :eval (expand-file-name "foo" "/tmp///") + :eval (expand-file-name "foo" "/tmp/foo/.././") + :eval (expand-file-name "~" "/tmp/")) (substitute-in-file-name :eval (substitute-in-file-name "$HOME/foo")) "Directory Functions" -- cgit v1.2.3