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

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

[elpa] externals/compat 3d5d2068d9 5/8: Remove unnecessary declare-funct


From: ELPA Syncer
Subject: [elpa] externals/compat 3d5d2068d9 5/8: Remove unnecessary declare-functions
Date: Thu, 5 Jan 2023 03:57:27 -0500 (EST)

branch: externals/compat
commit 3d5d2068d964a77de314463a42418b8a4191c7f0
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Remove unnecessary declare-functions
---
 compat-25.el |  1 -
 compat-26.el | 33 +++++++++++++++------------------
 compat-27.el |  4 ----
 compat-29.el |  3 ++-
 4 files changed, 17 insertions(+), 24 deletions(-)

diff --git a/compat-25.el b/compat-25.el
index 6161facf0f..323f714beb 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -222,7 +222,6 @@ threading."
 
 ;;;; Defined in macroexp.el
 
-(declare-function macrop nil (object))
 (compat-defun macroexpand-1 (form &optional environment) ;; <OK>
   "Perform (at most) one step of macro expansion."
   :feature macroexp
diff --git a/compat-26.el b/compat-26.el
index af1b337b3f..48261b663d 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -65,7 +65,6 @@ from the absolute start of the buffer, disregarding the 
narrowing."
 
 ;;;; Defined in subr.el
 
-(declare-function alist-get nil (key alist &optional default remove))
 (compat-defun alist-get (key alist &optional default remove testfn) ;; <OK>
   "Handle TESTFN manually."
   :explicit t
@@ -325,23 +324,6 @@ are non-nil, then the result is non-nil."
 
 ;;;; Defined in files.el
 
-(declare-function temporary-file-directory nil)
-
-(compat-defun make-nearby-temp-file (prefix &optional dir-flag suffix) ;; 
<UNTESTED>
-  "Create a temporary file as close as possible to `default-directory'.
-If PREFIX is a relative file name, and `default-directory' is a
-remote file name or located on a mounted file systems, the
-temporary file is created in the directory returned by the
-function `temporary-file-directory'.  Otherwise, the function
-`make-temp-file' is used.  PREFIX, DIR-FLAG and SUFFIX have the
-same meaning as in `make-temp-file'."
-  (let ((handler (find-file-name-handler
-                  default-directory 'make-nearby-temp-file)))
-    (if (and handler (not (file-name-absolute-p default-directory)))
-        (funcall handler 'make-nearby-temp-file prefix dir-flag suffix)
-      (let ((temporary-file-directory (temporary-file-directory)))
-        (make-temp-file prefix dir-flag suffix)))))
-
 (compat-defvar mounted-file-systems
     (eval-when-compile
       (if (memq system-type '(windows-nt cygwin))
@@ -394,6 +376,21 @@ the variable `temporary-file-directory' is returned."
           default-directory
         temporary-file-directory))))
 
+(compat-defun make-nearby-temp-file (prefix &optional dir-flag suffix) ;; 
<UNTESTED>
+  "Create a temporary file as close as possible to `default-directory'.
+If PREFIX is a relative file name, and `default-directory' is a
+remote file name or located on a mounted file systems, the
+temporary file is created in the directory returned by the
+function `temporary-file-directory'.  Otherwise, the function
+`make-temp-file' is used.  PREFIX, DIR-FLAG and SUFFIX have the
+same meaning as in `make-temp-file'."
+  (let ((handler (find-file-name-handler
+                  default-directory 'make-nearby-temp-file)))
+    (if (and handler (not (file-name-absolute-p default-directory)))
+        (funcall handler 'make-nearby-temp-file prefix dir-flag suffix)
+      (let ((temporary-file-directory (temporary-file-directory)))
+        (make-temp-file prefix dir-flag suffix)))))
+
 (compat-defun file-attribute-type (attributes) ;; <OK>
   "The type field in ATTRIBUTES returned by `file-attributes'.
 The value is either t for directory, string (name linked to) for
diff --git a/compat-27.el b/compat-27.el
index 7ce4721777..dd2068d325 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -688,10 +688,6 @@ The return value is a string (or nil in case we can’t find 
it)."
 
 ;;;; Defined in dired.el
 
-(declare-function
- dired-get-marked-files "dired.el"
- (&optional localp arg filter distinguish-one-marked error))
-
 (compat-defun dired-get-marked-files ;; <UNTESTED>
     (&optional localp arg filter distinguish-one-marked error)
   "Return the marked files’ names as list of strings."
diff --git a/compat-29.el b/compat-29.el
index 059921b241..e2d821c444 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -24,7 +24,8 @@
 
 (require 'compat-28)
 (eval-when-compile (load "compat-macs.el" nil t t))
-(compat-declare-version "29.0") ;; TODO Update this to 29.1 before release
+;; TODO Update to 29.1 as soon as the Emacs emacs-29 branch version bumped
+(compat-declare-version "29.0")
 
 ;;;; Defined in xdisp.c
 



reply via email to

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