mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-05 07:01:11 -08:00
Fix "C-x C-d" with wildcard arguments
* lisp/files.el (list-directory): Make sure 'default-directory' is set to a valid value if the argument DIRNAME included wildcards. (Bug#55877)
This commit is contained in:
parent
5bf409329b
commit
dc5f6dcee2
1 changed files with 2 additions and 2 deletions
|
|
@ -7406,9 +7406,9 @@ and `list-directory-verbose-switches'."
|
|||
;; Finishing with-output-to-temp-buffer seems to clobber default-directory.
|
||||
(with-current-buffer buffer
|
||||
(setq default-directory
|
||||
(if (file-directory-p dirname)
|
||||
(if (file-accessible-directory-p dirname)
|
||||
(file-name-as-directory dirname)
|
||||
(file-name-directory dirname))))))
|
||||
(file-name-directory (directory-file-name dirname)))))))
|
||||
|
||||
(defun shell-quote-wildcard-pattern (pattern)
|
||||
"Quote characters special to the shell in PATTERN, leave wildcards alone.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue