`ls-lisp` used to advise `dired` because `dired-insert-directory`
blindly used `insert-directory-program` (together with a shell)
in order to implement the "directory wildcard" expansion.
* lisp/dired.el (dired-insert-directory): Make the "directory wildcard"
code obey `files--use-insert-directory-program-p`, using
`file-expand-wildcards`.
* lisp/ls-lisp.el (ls-lisp--dired, ls-lisp-unload-function): Delete funs.
(dired): Don't advise any more.
Rather than have `ls-lisp` advise `insert-directory`, make
`insert-directory` call `ls-lisp.el` code directly when needed.
* lisp/files.el (files--use-insert-directory-program-p): New function.
(insert-directory): Use it to delegate to `ls-lisp--insert-directory`
when applicable.
* lisp/ls-lisp.el (ls-lisp--insert-directory): Remove `orig-fun` arg.
Don't test `ls-lisp-use-insert-directory-program` or check for a magic
file name handler; it is now the caller's responsibility.
(insert-directory): Don't add advice any more.
* lisp/dired.el (ls-lisp-use-insert-directory-program): Don't declare it.
(dired-insert-directory): Use `files--use-insert-directory-program-p` instead.
(dired-use-ls-dired): Adjust docstring to refer to
`insert-directory-program` rather than "ls".
(dired-insert-directory): Obey `file-list` and `wildcard`
Commit 6f6639d6ed6c's support for wildcards in directories failed
to obey `file-list` and `wildcard` arguments. Fix it.
* lisp/dired.el (dired-insert-directory): Expand directory wildcards
only if `file-list` is nil and `wildcard` is non-nil.
Also, refer back to `dir-wildcard` instead of recomputing it.
(dired-readin-insert): Pass a non-nil `wildcard` when wildcard
expansion might be needed to preserve former behavior.
* lisp/files.el (file-expand-wildcards): Fix sorting of subdirs
E.g. (file-expand-wildcards "/u*/*m*")
returned ("/usr/games" "/u/dummy" "/u/monnier" "/u/omnibook-disk")
instead of ("/u/dummy" "/u/monnier" "/u/omnibook-disk" "/usr/games").
* lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add comment about
`post-text-conversion-hook`.
127de20...
by
Manuel Giraud <email address hidden>
Fix desktop-save for dired buffers (bug#66697)
* lisp/dired.el (dired-desktop-save-p): Move all logic here. Carry on
when 'desktop-files-not-to-save' is nil.
(dired-desktop-buffer-misc-data): Use it.