[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm d1a510f012: Fix compat for helm-ff-octal-permissions
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm d1a510f012: Fix compat for helm-ff-octal-permissions as |
Date: |
Wed, 22 Feb 2023 02:59:30 -0500 (EST) |
branch: elpa/helm
commit d1a510f012a7d8b42ad4cc55112911fb22279402
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix compat for helm-ff-octal-permissions as
file-modes-symbolic-to-number is much older (2007) than
file-modes-number-to-symbolic (2021).
---
helm-utils.el | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/helm-utils.el b/helm-utils.el
index 3269011888..0f82c5b170 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -800,31 +800,9 @@ If STRING is non--nil return instead a space separated
string."
(defun helm-ff-octal-permissions (perms)
"Return the numeric representation of PERMS.
PERMS is the list of permissions for owner, group and others."
- (if (fboundp 'file-modes-symbolic-to-number)
- (helm-ff-octal-permissions-1 perms)
- (helm-ff-octal-permissions-2 perms)))
-
-(defun helm-ff-octal-permissions-1 (perms)
(let ((modes (apply 'format "u=%s,g=%s,o=%s" perms)))
(format "%o" (file-modes-symbolic-to-number modes))))
-(defun helm-ff-octal-permissions-2 (perms)
- "Return the numeric representation of PERMS.
-PERMS is the list of permissions for owner, group and others."
- (cl-flet ((string-to-octal (str)
- (cl-loop for c across str
- sum (pcase c
- (?r 4)
- (?w 2)
- (?x 1)
- (_ 0)))))
- (cl-loop with sb = ""
- for str in perms
- when (string-match "t" str)
- do (setq sb "1")
- concat (number-to-string (string-to-octal str)) into modes
- finally return (concat sb modes))))
-
(defun helm-format-columns-of-files (files)
"Same as `dired-format-columns-of-files'.
Inlined here for compatibility."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/helm d1a510f012: Fix compat for helm-ff-octal-permissions as,
ELPA Syncer <=