summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-07-24 13:30:58 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-07-24 13:30:58 +0200
commit5431a58e86d3f2579c1edf1dc8d7074de73ac694 (patch)
treef33798b55f473cbb7337a84e669b3c07053671d9 /lisp/emacs-lisp
parent9ac6ff53b105925400a773a5088c9d0ec5b095a4 (diff)
downloademacs-5431a58e86d3f2579c1edf1dc8d7074de73ac694.tar.gz
emacs-5431a58e86d3f2579c1edf1dc8d7074de73ac694.tar.bz2
emacs-5431a58e86d3f2579c1edf1dc8d7074de73ac694.zip
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/shortdoc.el9
1 files changed, 8 insertions, 1 deletions
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"