]> git.eshelyaron.com Git - emacs.git/commit
(insert-directory): Remove `ls-lisp` advice
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Dec 2023 04:45:56 +0000 (23:45 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 10 Dec 2023 04:45:56 +0000 (23:45 -0500)
commit29957969e5199bdab5612af68e33b3989e4bbbd2
tree6f23a222835492c8332bbde55ed1ba3724b30c33
parentf7cf85c3879c6857e8478bef41cce25a94759fb8
(insert-directory): Remove `ls-lisp` advice

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".
lisp/dired.el
lisp/files.el
lisp/ls-lisp.el