[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix for bug#34330 breaks makefile target complete in `compile' prompt
From: |
Stephen Leake |
Subject: |
fix for bug#34330 breaks makefile target complete in `compile' prompt |
Date: |
Sun, 15 Sep 2019 02:12:52 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
bug#34330 (now closed) was about completing file names with special
chars in the shell. The fix was to move `pcomplete-completions-at-point'
to last in `shell-dynamic-complete-functions'.
However, that now breaks completing on makefile targets in the prompt
for `compile'.
The problem is that `comint-filename-completion' returns non-nil even
when there are no filename completions for the word at point.
One fix would be to make `comint--complete-file-name-data' return nil if
`try-completion' returns nil.
The real cause for bug#34330 is that pcomplete uses
`pcomplete-default-completion-function' in this case (there is no
pcomplete/ls), and it also returns a non-nil result even when there are
no completions.
The doc string for `completion-at-point-functions' says, in part:
should return either nil, meaning it is not applicable at point,
It's not clear from this if "applicable" means "there are actual
completions", but it appears that it should.
So should these functions be fixed to return nil when there are no completions?
--
-- Stephe
- fix for bug#34330 breaks makefile target complete in `compile' prompt,
Stephen Leake <=