From 05da58d8322b54f6c2cb30a08204778da41cfdbe Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 15 Aug 2022 16:41:47 +0530 Subject: Localize conditional in chmod call. * ennum.el (ennum--set-file-modes-recursively): Compute only the mode conditionally, not the whole chmod call. --- ennum.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ennum.el') diff --git a/ennum.el b/ennum.el index a94c246..a8ab1aa 100644 --- a/ennum.el +++ b/ennum.el @@ -91,10 +91,11 @@ the current state of all its variables." (defun ennum--set-file-modes-recursively (directory directory-mode file-mode executable-file-mode) (chmod directory directory-mode) (seq-do (lambda (file) - (cond - ((file-directory-p file) (chmod file directory-mode)) - ((file-executable-p file) (chmod file executable-file-mode)) - (t (chmod file file-mode)))) + (chmod file + (cond + ((file-directory-p file) directory-mode) + ((file-executable-p file) executable-file-mode) + (t file-mode)))) (ennum-directory-files directory t t))) (defmacro ennum-exp (&rest body) -- cgit v1.2.3