Subject: file-name-with-extension: Improve docstring.

From: Damien Cassou <[email-masked]>
Date: Thu, 28 Jul 2022 08:31:24 +0200

Tags: patch

Hi,

I found the docstring of file-name-with-extension very confusing so I
wrote another one.

Best

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
>From dccdf3dec9a82d4ce05e9978b762d9538e11bdfd Mon Sep 17 00:00:00 2001
From: Damien Cassou <[email-masked]>
Date: Thu, 28 Jul 2022 08:27:45 +0200
Subject: [PATCH] ; * lisp/files.el (file-name-with-extension): Improve
 docstring.

---
 lisp/files.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 37ed796a68..39b8586a94 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5119,13 +5119,13 @@ file-name-extension
             "")))))
 
 (defun file-name-with-extension (filename extension)
-  "Set the EXTENSION of a FILENAME.
+  "Return a string resulting from the concatenation of FILENAME and EXTENSION.
 The extension (in a file name) is the part that begins with the last \".\".
 
-Trims a leading dot from the EXTENSION so that either \"foo\" or
-\".foo\" can be given.
+If EXTENSION doesn't start with a \".\", one is inserted anyway
+between FILENAME and EXTENSION.
 
-Errors if the FILENAME or EXTENSION are empty, or if the given
+Signal an error if FILENAME or EXTENSION are empty, or if the given
 FILENAME has the format of a directory.
 
 See also `file-name-sans-extension'."
-- 
2.36.0