]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/simple.el (completion-setup-function): Use file-name-directory.
authorJuri Linkov <juri@linkov.net>
Wed, 1 Jun 2022 19:12:12 +0000 (22:12 +0300)
committerJuri Linkov <juri@linkov.net>
Wed, 1 Jun 2022 19:12:12 +0000 (22:12 +0300)
Replace file-name-as-directory with file-name-directory,
because file-name-as-directory returns a nonexistent dir
e.g. "/dir/prefix/" when completing "/dir/prefix".
OTOH, file-name-directory returns "/dir/" in such cases (bug#55743).

lisp/simple.el

index 24c61b5bee00928234a538dbeea7ee5d4646b702..a22df8025b3d5cecad4a9ed85a7bb374fe32de29 100644 (file)
@@ -9802,7 +9802,7 @@ Called from `temp-buffer-show-hook'."
           ;; - With fancy completion styles, the code below will not always
           ;;   find the right base directory.
           (if minibuffer-completing-file-name
-              (file-name-as-directory
+              (file-name-directory
                (expand-file-name
                 (buffer-substring (minibuffer-prompt-end) (point)))))))
     (with-current-buffer standard-output