]> git.eshelyaron.com Git - emacs.git/commit
pcomplete.el: Fix part of bug#50470
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 5 Jun 2022 23:51:29 +0000 (19:51 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 5 Jun 2022 23:51:29 +0000 (19:51 -0400)
commit0a36671f415bd681ddca0bad8612aca031fd407d
tree6a51c6df72dffcf2aa73458b7f3f9775a11a7c51
parentf5e8e7a7b9db94092503e35be3a3501905798ed5
pcomplete.el: Fix part of bug#50470

Try and handle the case where `pcomplete-parse-arguments-function`
directly returns a list of completions.

* lisp/pcomplete.el (pcomplete-parse-arguments): Don't modify the
buffer if we're not allowed to.  Instead use the buffer's current
content as the "pattern to be completed" and return the list
of completions as is.  Also, use `try-completions` to simplify the
previous code.
lisp/pcomplete.el