[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when l
From: |
Stefan Monnier |
Subject: |
Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded. |
Date: |
Sat, 09 Dec 2023 18:26:22 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> is hard to digest at 11PM, so a comment won't hurt here, I guess. Plus
> it seems to violate the order promise done in the docstring of the
> function ("... sorted in the `string<' order").
Interestingly, this is not directly caused by my patch, it just triggers
an existing bug in the code. E.g.:
ELISP> (file-expand-wildcards "/u*/*m*")
("/usr/games" "/u/dummy" "/u/emma" "/u/monnier" "/u/omnibook-disk")
ELISP> (sort (file-expand-wildcards "/u*/*m*") #'string<)
("/u/dummy" "/u/emma" "/u/monnier" "/u/omnibook-disk" "/usr/games")
AFAICT this can be fixed with the patch below.
Stefan
diff --git a/lisp/files.el b/lisp/files.el
index 1cdcec23b11..a71292ab025 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7544,7 +7567,7 @@ file-expand-wildcards
(directory-file-name dirpart) nil regexp))
(list dirpart)))
contents)
- (dolist (dir dirs)
+ (dolist (dir (nreverse dirs))
(when (or (null dir) ; Possible if DIRPART is not wild.
(file-accessible-directory-p dir))
(let ((this-dir-contents
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., (continued)
Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Jens Schmidt, 2023/12/06
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Stefan Monnier, 2023/12/07
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Jens Schmidt, 2023/12/07
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Stefan Monnier, 2023/12/09
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded.,
Stefan Monnier <=
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Stefan Monnier, 2023/12/10
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Jens Schmidt, 2023/12/12
- Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Stefan Monnier, 2023/12/21
Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded., Richard Stallman, 2023/12/06