dabbrev-completion doc string
The last sentence of the doc string should be removed, IMO: With no prefix argument, it reuses an old completion list if there is a suitable one already. This is a user command, and (IIUC) the last sentence means nothing to users (it just documents the implementation). If I misunderstand the importance of the last sentence, then please consider rephrasing it in user terms. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
RE: dabbrev-completion doc string
The last sentence of the doc string should be removed, IMO: With no prefix argument, it reuses an old completion list if there is a suitable one already. It would seem very odd to explain in detail what happens if you use various prefix arguments and not say anything whatsoever about what is going to happen if you use no prefix argument. I agree. I should have said replaced, not removed. With no prefix argument, it reuses an old completion list if there is a suitable one already. This is a user command, and (IIUC) the last sentence means nothing to users (it just documents the implementation). If I misunderstand the importance of the last sentence, then please consider rephrasing it in user terms. Unless I am the one misunderstanding the last sentence, the sentence you quoted and want to delete seems completely self-explanatory. How can it be phrased more clearly? Without a prefix argument, if there is already a completion list, `dabbrev-completion' just uses it without trying to update it (meaning it may not be up to date). Again, it's quite possible I misunderstand the sentence. I would expect it to say something about the set of buffers that are searched to come with the candidate completions, which is what the two non-nil ARG cases explain. IIUC, a nil ARG means to search only the current buffer. If that is the case, then the ARG might be better called BUFFERS, as it indicates which buffer(s) to search. I don't see why a user would care whether or not an existing completion list (whatever that might mean) is reused. Does that mean that it uses the same set of completions that the user saw last time? What if the user used a prefix arg last time? Perhaps this all hinges on the meaning of if there is a suitable one already - just what does that mean? I suspect that explaining what suitable means here, in user terms, would mean explaining that only the current buffer is to be searched. But I could be wrong. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
Re: dabbrev-completion doc string
Resending, since I got an invalid address error for emacs-pretest-bug the first time. Drew Adams wrote: IIUC, a nil ARG means to search only the current buffer. I apparently did not read the docstring carefully enough. The first paragraph says exactly that. Perhaps this all hinges on the meaning of if there is a suitable one already - just what does that mean? I suspect that explaining what suitable means here, in user terms, would mean explaining that only the current buffer is to be searched. But I could be wrong. On reading through the source code, I am the one who is confused now. Whether the old list is suitable or not is determined by an `and' expression. But that `and' expression includes `dabbrev--last-abbreviation' and this happens after `dabbrev--reset-global-variables' got called which always sets `dabbrev--last-abbreviation' to nil. The way I understand it, the `and' expression _always_ returns nil and the old completion list is _never_ suitable. I must be misunderstanding something. I tried to CC the listed maintainer, but that apparently resulted in an invalid address error. Sincerely, Luc. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
RE: dabbrev-completion doc string
IIUC, a nil ARG means to search only the current buffer. I apparently did not read the docstring carefully enough. The first paragraph says exactly that. I don't see that. I'm looking at a June CVS snapshot. Here is the whole doc string: Completion on current word. Like \\[dabbrev-expand] but finds all expansions in the current buffer and presents suggestions for completion. With a prefix argument, it searches all buffers accepted by the function pointed out by `dabbrev-friend-buffer-function' to find the completions. If the prefix argument is 16 (which comes from C-u C-u), then it searches *all* buffers. With no prefix argument, it reuses an old completion list if there is a suitable one already. It's true that the second line mentions the current buffer, but the contrast with the non-nil ARG case is not made explicitly. The main point of the second sentence is to contrast the behavior with that of `dabbrev-expand' - namely, `dabbrev-completion' uses the *Completions* buffer (it also does not let you cycle candidates - which is not mentioned, BTW). I originally thought that no-prefix arg part was clear enough, but now I think it might help to explicitly say that nil searches only the current buffer, even if that is suggested by the second sentence. I also think it might be good to point out that `dabbrev-expand' lets you cycle among completion candidates (by repeating `M-/', whereas you cannot do that with `dabbrev-completion'. The advantage of `dabbrev-completion' is to show you the candidate list and let you choose a candidate directly (random access, with the mouse). Perhaps this all hinges on the meaning of if there is a suitable one already - just what does that mean? I suspect that explaining what suitable means here, in user terms, would mean explaining that only the current buffer is to be searched. But I could be wrong. On reading through the source code, I am the one who is confused now. Whether the old list is suitable or not is determined by an `and' expression. But that `and' expression includes `dabbrev--last-abbreviation' and this happens after `dabbrev--reset-global-variables' got called which always sets `dabbrev--last-abbreviation' to nil. The way I understand it, the `and' expression _always_ returns nil and the old completion list is _never_ suitable. I think you're right. I must be misunderstanding something. I Cc-ed the listed maintainer. Thanks, Drew ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
completion.el: 1) has unnecessary macro code, 2) has no way to turn it off (?)
1) IIUC, all of the calls to macro `cmpl-statistics-block' should be removed from this library. The macro does nothing, and most of the args passed to it (which are ignored) are undefined anyway. The comment introducing the macro says that the functionality is defined in library `completion-stats.el', which no longer exists, AFAICT. 1) IIUC, once you call `dynamic-completion-mode' to turn on completion, there is no way to turn it off. This should be made into a proper minor mode. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug