From: Lars Ingebrigtsen Date: Sat, 24 Sep 2022 10:44:44 +0000 (+0200) Subject: Rename file-name-directory X-Git-Tag: emacs-29.0.90~1856^2~270 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bbd7059da4555586ecedd091cf8a223086bd6201;p=emacs.git Rename file-name-directory * lisp/emacs-lisp/shortdoc.el (file-name): * doc/lispref/files.texi (Directory Names): Adjust. * lisp/files.el (file-name-parent-directory): Rename from `file-name-directory' (bug#58039). --- diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 986fb22c75b..e1aa2de523c 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -2445,7 +2445,7 @@ You can use this function for directory names and for file names, because it recognizes abbreviations even as part of the name. @end defun -@defun file-parent-directory filename +@defun file-name-parent-directory filename This function returns the directory name of the parent directory of @var{filename}. If @var{filename} is at the root directory of the filesystem, it returns @code{nil}. A relative @var{filename} is diff --git a/etc/NEWS b/etc/NEWS index 0d69e87907e..ff97c2350f2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -482,7 +482,7 @@ user option 'global-text-scale-adjust-resizes-frames' controls whether the frames are resized when the font size is changed. +++ -** New function 'file-parent-directory'. +** New function 'file-name-parent-directory'. Get the parent directory of a file. ** New config variable 'syntax-wholeline-max' to reduce the cost of long lines. diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index fe4f2ae3acf..d07d1019b4d 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -355,11 +355,11 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'), (abbreviate-file-name :no-eval (abbreviate-file-name "/home/some-user") :eg-result "~some-user") - (file-parent-directory - :eval (file-parent-directory "/foo/bar") - :eval (file-parent-directory "/foo/") - :eval (file-parent-directory "foo/bar") - :eval (file-parent-directory "foo")) + (file-name-parent-directory + :eval (file-name-parent-directory "/foo/bar") + :eval (file-name-parent-directory "/foo/") + :eval (file-name-parent-directory "foo/bar") + :eval (file-name-parent-directory "foo")) "Quoted File Names" (file-name-quote :args (name) diff --git a/lisp/files.el b/lisp/files.el index 7fde8720fa7..1e1ec6127de 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5173,7 +5173,7 @@ On most systems, this will be true: (setq filename nil)))) components)) -(defun file-parent-directory (filename) +(defun file-name-parent-directory (filename) "Return the directory name of the parent directory of FILENAME. If FILENAME is at the root of the filesystem, return nil. If FILENAME is relative, it is interpreted to be relative