commit 95d5154feed2bdb15555e3dce14fca377765b54d (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sat Mar 18 08:32:20 2023 +0200 ; * lisp/find-dired.el (find-gnu-find-p): Doc fix. diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 264c6e3082f..db2f5e7d026 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -53,7 +53,7 @@ find-exec-terminator (defvar find-gnu-find-p (eq 0 (ignore-errors (process-file find-program nil nil nil null-device "--version"))) - "T if 'find-program' is a GNU find. NIL otherwise.") + "Non-nil if `find-program' is a GNU Find, nil otherwise.") (defvar find-ls-option-default-ls (cons "-ls" (if find-gnu-find-p "-dilsb" "-dgils"))) commit ec6a73e0d3206255fe422cd248d6be959f50aec9 Author: Manuel Giraud Date: Fri Mar 10 21:54:00 2023 +0100 Fix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096) * lisp/find-dired.el (find-gnu-find-p): New variable to determine if "find" is a GNU find. (find-ls-option-default-ls): Use 'find-gnu-find-p' and adapt to a value that works with the default "find" on *BSD and Darwin/MacOS. Tested on OpenBSD and MacOS. diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 33376ee4ed9..264c6e3082f 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -50,8 +50,13 @@ find-exec-terminator :group 'find-dired :type 'string) +(defvar find-gnu-find-p + (eq 0 (ignore-errors + (process-file find-program nil nil nil null-device "--version"))) + "T if 'find-program' is a GNU find. NIL otherwise.") + (defvar find-ls-option-default-ls - (cons "-ls" (if (eq system-type 'berkeley-unix) "-gilsb" "-dilsb"))) + (cons "-ls" (if find-gnu-find-p "-dilsb" "-dgils"))) (defvar find-ls-option-default-exec (cons (format "-exec ls -ld {} %s" find-exec-terminator) "-ld")) commit 891a37ab36a0782a798841c056a2dd86bd31161a Author: Mattias EngdegÄrd Date: Fri Mar 17 12:13:27 2023 +0100 * lisp/subr.el (string-prefix-p, string-suffix-p): Not pure. The `ignore-case` arguments prevent these functions from being pure. diff --git a/lisp/subr.el b/lisp/subr.el index 8aedce934d1..9ba0acace01 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -5531,7 +5531,7 @@ string-prefix-p "Return non-nil if PREFIX is a prefix of STRING. If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences." - (declare (pure t) (side-effect-free t)) + (declare (side-effect-free t)) (let ((prefix-length (length prefix))) (if (> prefix-length (length string)) nil (eq t (compare-strings prefix 0 prefix-length string @@ -5541,7 +5541,7 @@ string-suffix-p "Return non-nil if SUFFIX is a suffix of STRING. If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences." - (declare (pure t) (side-effect-free t)) + (declare (side-effect-free t)) (let ((start-pos (- (length string) (length suffix)))) (and (>= start-pos 0) (eq t (compare-strings suffix nil nil