diff options
| author | Lars Ingebrigtsen | 2022-09-24 12:44:44 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-09-24 12:44:44 +0200 |
| commit | bbd7059da4555586ecedd091cf8a223086bd6201 (patch) | |
| tree | 7a6274ebf1a220ec8053e4439d0b0762fe715bb6 | |
| parent | 6403ede2016d0d16a487d759ef45745c3d4ac24b (diff) | |
| download | emacs-bbd7059da4555586ecedd091cf8a223086bd6201.tar.gz emacs-bbd7059da4555586ecedd091cf8a223086bd6201.zip | |
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).
| -rw-r--r-- | doc/lispref/files.texi | 2 | ||||
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 10 | ||||
| -rw-r--r-- | lisp/files.el | 2 |
4 files changed, 8 insertions, 8 deletions
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, | |||
| 2445 | because it recognizes abbreviations even as part of the name. | 2445 | because it recognizes abbreviations even as part of the name. |
| 2446 | @end defun | 2446 | @end defun |
| 2447 | 2447 | ||
| 2448 | @defun file-parent-directory filename | 2448 | @defun file-name-parent-directory filename |
| 2449 | This function returns the directory name of the parent directory of | 2449 | This function returns the directory name of the parent directory of |
| 2450 | @var{filename}. If @var{filename} is at the root directory of the | 2450 | @var{filename}. If @var{filename} is at the root directory of the |
| 2451 | filesystem, it returns @code{nil}. A relative @var{filename} is | 2451 | filesystem, it returns @code{nil}. A relative @var{filename} is |
| @@ -482,7 +482,7 @@ user option 'global-text-scale-adjust-resizes-frames' controls whether | |||
| 482 | the frames are resized when the font size is changed. | 482 | the frames are resized when the font size is changed. |
| 483 | 483 | ||
| 484 | +++ | 484 | +++ |
| 485 | ** New function 'file-parent-directory'. | 485 | ** New function 'file-name-parent-directory'. |
| 486 | Get the parent directory of a file. | 486 | Get the parent directory of a file. |
| 487 | 487 | ||
| 488 | ** New config variable 'syntax-wholeline-max' to reduce the cost of long lines. | 488 | ** 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'), | |||
| 355 | (abbreviate-file-name | 355 | (abbreviate-file-name |
| 356 | :no-eval (abbreviate-file-name "/home/some-user") | 356 | :no-eval (abbreviate-file-name "/home/some-user") |
| 357 | :eg-result "~some-user") | 357 | :eg-result "~some-user") |
| 358 | (file-parent-directory | 358 | (file-name-parent-directory |
| 359 | :eval (file-parent-directory "/foo/bar") | 359 | :eval (file-name-parent-directory "/foo/bar") |
| 360 | :eval (file-parent-directory "/foo/") | 360 | :eval (file-name-parent-directory "/foo/") |
| 361 | :eval (file-parent-directory "foo/bar") | 361 | :eval (file-name-parent-directory "foo/bar") |
| 362 | :eval (file-parent-directory "foo")) | 362 | :eval (file-name-parent-directory "foo")) |
| 363 | "Quoted File Names" | 363 | "Quoted File Names" |
| 364 | (file-name-quote | 364 | (file-name-quote |
| 365 | :args (name) | 365 | :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: | |||
| 5173 | (setq filename nil)))) | 5173 | (setq filename nil)))) |
| 5174 | components)) | 5174 | components)) |
| 5175 | 5175 | ||
| 5176 | (defun file-parent-directory (filename) | 5176 | (defun file-name-parent-directory (filename) |
| 5177 | "Return the directory name of the parent directory of FILENAME. | 5177 | "Return the directory name of the parent directory of FILENAME. |
| 5178 | If FILENAME is at the root of the filesystem, return nil. | 5178 | If FILENAME is at the root of the filesystem, return nil. |
| 5179 | If FILENAME is relative, it is interpreted to be relative | 5179 | If FILENAME is relative, it is interpreted to be relative |