diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-03 18:44:56 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-03 18:44:56 +0100 |
| commit | 494da3f7dcf92d2945c08af5dd4f657b853677a3 (patch) | |
| tree | ee3c369025837076e497fc7a04b5849c5612545c /compat-25.el | |
| parent | 438d683afd6f92c77acbb91763520ee80d68ac12 (diff) | |
Disallow :realname to equal compat--<name>
I plan to use the naming convention compat--<name> for the compat-funcall and
compat-function macros in the future. Intentionally use ugly compat--internal-*
names. I hope we can remove some of those.
Diffstat (limited to 'compat-25.el')
| -rw-r--r-- | compat-25.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compat-25.el b/compat-25.el index 891ebfa..5398d59 100644 --- a/compat-25.el +++ b/compat-25.el @@ -79,7 +79,7 @@ This implementation is equivalent to `format'." (compat-defun directory-name-p (name) "Return non-nil if NAME ends with a directory separator character." - :realname compat--directory-name-p + :realname compat--internal-directory-name-p (eq (eval-when-compile (if (memq system-type '(cygwin windows-nt ms-dos)) ?\\ ?/)) @@ -296,7 +296,7 @@ subdirectory is to be descended into). If FOLLOW-SYMLINKS is non-nil, symbolic links that point to directories are followed. Note that this can lead to infinite recursion." - :realname compat--directory-files-recursively + :realname compat--internal-directory-files-recursively (let* ((result nil) (files nil) (dir (directory-file-name dir)) @@ -306,7 +306,7 @@ recursion." (dolist (file (sort (file-name-all-completions "" dir) 'string<)) (unless (member file '("./" "../")) - (if (compat--directory-name-p file) + (if (compat--internal-directory-name-p file) (let* ((leaf (substring file 0 (1- (length file)))) (full-file (concat dir "/" leaf))) ;; Don't follow symlinks to other directories. @@ -320,11 +320,11 @@ recursion." (let ((sub-files (if (eq predicate t) (condition-case nil - (compat--directory-files-recursively + (compat--internal-directory-files-recursively full-file regexp include-directories predicate follow-symlinks) (file-error nil)) - (compat--directory-files-recursively + (compat--internal-directory-files-recursively full-file regexp include-directories predicate follow-symlinks)))) (setq result (nconc result sub-files)))) |
