1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00

(completion--try-word-completion): Disable partial-completion when

considering the addition of a space or hyphen.
This commit is contained in:
Chong Yidong 2008-08-21 17:28:58 +00:00
parent d7fa495a10
commit 4b6f7dc970

View File

@ -615,14 +615,9 @@ input if confirmed."
(let ((exts '(" " "-"))
(before (substring string 0 point))
(after (substring string point))
;; If the user hasn't entered any text yet, then she
;; presumably hits SPC to see the *completions*, but
;; partial-completion will often find a " " or a "-" to match.
;; So disable partial-completion in that situation.
(completion-styles
(or (and (equal string "")
(remove 'partial-completion completion-styles))
completion-styles))
;; Disable partial-completion for this.
(completion-styles
(remove 'partial-completion completion-styles))
tem)
(while (and exts (not (consp tem)))
(setq tem (completion-try-completion