mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
; Improve documentation of 'file-name-with-extension'
* lisp/files.el (file-name-with-extension): Doc fix. (Bug#56809)
This commit is contained in:
parent
4be938169d
commit
23112f89f9
1 changed files with 7 additions and 5 deletions
|
@ -5033,14 +5033,16 @@ extension, the value is \"\"."
|
||||||
"")))))
|
"")))))
|
||||||
|
|
||||||
(defun file-name-with-extension (filename extension)
|
(defun file-name-with-extension (filename extension)
|
||||||
"Set the EXTENSION of a FILENAME.
|
"Return FILENAME modified to have the specified EXTENSION.
|
||||||
The extension (in a file name) is the part that begins with the last \".\".
|
The extension (in a file name) is the part that begins with the last \".\".
|
||||||
|
This function removes any existing extension from FILENAME, and then
|
||||||
|
appends EXTENSION to it.
|
||||||
|
|
||||||
Trims a leading dot from the EXTENSION so that either \"foo\" or
|
EXTENSION may include the leading dot; if it doesn't, this function
|
||||||
\".foo\" can be given.
|
will provide it.
|
||||||
|
|
||||||
Errors if the FILENAME or EXTENSION are empty, or if the given
|
It is an error if FILENAME or EXTENSION is empty, or if FILENAME
|
||||||
FILENAME has the format of a directory.
|
is in the form of a directory name according to `directory-name-p'.
|
||||||
|
|
||||||
See also `file-name-sans-extension'."
|
See also `file-name-sans-extension'."
|
||||||
(let ((extn (string-trim-left extension "[.]")))
|
(let ((extn (string-trim-left extension "[.]")))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue