]> git.eshelyaron.com Git - emacs.git/commit
Simplify dir-watching strategy of w/didchangewatchedfiles
authorJoão Távora <joaotavora@gmail.com>
Wed, 3 Feb 2021 10:41:40 +0000 (10:41 +0000)
committerJoão Távora <joaotavora@gmail.com>
Wed, 3 Feb 2021 10:41:40 +0000 (10:41 +0000)
commite6fac3807870cc46ed2c2b97447265d1cb4c0cb0
treeff1dc6ec126272c47068289b43d9e2b214a8eba3
parent14d901c58880f50712585951163bcd7a6567d718
Simplify dir-watching strategy of w/didchangewatchedfiles

Instead of massaging the globPattern to match directories instead of
files, which is fragile, gather the list of directoris to watch by
matching the globPattern against every file recursively (except hidden
files and dirs).

This is still not 100% correct, but should do the right thing is most
cases.  Notably, if the correct dirs are being watched, the glob
pattern is matched against all existing and new files in those
directories, which does include hidden files.

* eglot.el (eglot-register-capability): match file globs against
files only.
(eglot--files-recursively): Rename from eglot--directories-recursively.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/602
lisp/progmodes/eglot.el