emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat 6445814 51/99: Use compatibility functions in fi


From: ELPA Syncer
Subject: [elpa] externals/compat 6445814 51/99: Use compatibility functions in file-name-with-extension definition
Date: Sun, 17 Oct 2021 05:57:55 -0400 (EDT)

branch: externals/compat
commit 6445814abdbb40901ec2f382d6613573f0d9f5cc
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Use compatibility functions in file-name-with-extension definition
---
 compat-28.1.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/compat-28.1.el b/compat-28.1.el
index 489188e..e2c6935 100644
--- a/compat-28.1.el
+++ b/compat-28.1.el
@@ -338,8 +338,6 @@ as the new values of the bound variables in the recursive 
invocation."
 
 ;;;; Defined in files.el
 
-(declare-function string-trim-left nil)
-(declare-function directory-name-p nil)
 (compat-defun file-name-with-extension (filename extension)
   "Set the EXTENSION of a FILENAME.
 The extension (in a file name) is the part that begins with the last \".\".
@@ -351,13 +349,13 @@ Errors if the FILENAME or EXTENSION are empty, or if the 
given
 FILENAME has the format of a directory.
 
 See also `file-name-sans-extension'."
-  (let ((extn (string-trim-left extension "[.]")))
+  (let ((extn (compat--string-trim-left extension "[.]")))
     (cond
      ((string= filename "")
       (error "Empty filename"))
      ((string= extn "")
       (error "Malformed extension: %s" extension))
-     ((directory-name-p filename)
+     ((compat--directory-name-p filename)
       (error "Filename is a directory: %s" filename))
      (t
       (concat (file-name-sans-extension filename) "." extn)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]