On 2010-09-04 09:24 +0100, Stefan Monnier wrote: >> I reviewed Leo's updated patch at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6076#47 >> I agree with Leo, we should install this patch and then look into >> improvements using completion in region. > > I mostly agree, but I think the patch should first be restructured into > one or 2 functions suitable for completion-at-point-functions > (i.e. either one that provides the completion data for nicks and > commands, or one for nicks and one for commands), and then an > rcirc-complete command that uses these functions to do the completion > with the desired UI. > > I.e. basically a refactoring of rcirc-complete such that it uses the > same interface between the completion data and the completion UI as the > one used by completion-at-point. > > Then users can choose to use rcirc-complete or completion-at-point, and > when/if completion-at-point (i.e. completion-in-region) gets to the > point of being able to provide the same behavior as rcirc-complete, then > we can get rid of rcirc-complete. > > > Stefan Thanks, Stefan, for the comments. I have recreated the patch against emacs-23 as suggested. I have also briefly tested it. Seems to work as expected. M-TAB in rcirc-mode now uses the new completion at point interface. BTW, I just realise the macro defun-rcirc-command is better named define-rcirc-command. 2010-09-04 Leo * net/rcirc.el (rcirc-server-commands, rcirc-client-commands) (rcirc-completion-start): new variables. (rcirc-nick-completions): rename to rcirc-completions. (rcirc-nick-completion-start-offset): delete. (rcirc-completion-at-point): new function for constructing completion data for both nicks and irc commands. Add to completion-at-point-functions in rcirc mode. (rcirc-complete): use rcirc-completion-at-point. (defun-rcirc-command): update rcirc-client-commands.