1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00

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).
This commit is contained in:
Lars Ingebrigtsen 2022-09-24 12:44:44 +02:00
parent 6403ede201
commit bbd7059da4
4 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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.

View File

@ -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)

View File

@ -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