]> git.eshelyaron.com Git - emacs.git/commitdiff
Add comment on fido-mode's file-sorting semantics
authorJoão Távora <joaotavora@gmail.com>
Thu, 9 Jan 2020 10:07:45 +0000 (10:07 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 9 Jan 2020 10:08:44 +0000 (10:08 +0000)
* lisp/icomplete.el (icomplete--sorted-completions): Add comment.

lisp/icomplete.el

index ceff11f9bd6a972b99433b864ffa2cd0c218b816..a1a67e2330ab7962f31a97877bb77944f326e457 100644 (file)
@@ -463,6 +463,12 @@ Usually run by inclusion in `minibuffer-setup-hook'."
                        ((and fido-mode
                              (not minibuffer-default)
                              (eq (icomplete--category) 'file))
+                        ;; `fido-mode' has some extra file-sorting
+                        ;; semantics even if there isn't a default,
+                        ;; which is to bubble "./" to the top if it
+                        ;; exists.  This makes M-x dired RET RET go to
+                        ;; the directory of current file, which is
+                        ;; what vanilla Emacs and `ido-mode' both do.
                         `(,(lambda (comp)
                              (string= "./" comp)))))
        thereis (cl-loop