help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: complete-tag at the end of a buffer


From: Dmitry Gutov
Subject: Re: complete-tag at the end of a buffer
Date: Sat, 09 Feb 2013 16:47:27 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Sarah Weissman <address@hidden> writes:

> I thought I could implement general tab completion using tags in a
> custom mode by following the advice found here:
> http://emacsblog.org/2007/03/12/tab-completion-everywhere/
> and simply replacing the call to dabbrev-expand with a call to
> complete-tag. This worked fine, except when trying to do completion at
> the end of the buffer, which generates an end-of-buffer error. This
> seems to be because tags-completion-at-point-function (called by
> complete-tags) is using forward-char without checking that it might go
> past the end. To get around this I wrote my own version of
> tags-completion-at-point-function, just to add in the extra check
> around each call to forward char, and my own version of complete-tag
> to call this function, but this seems kind of silly. Am I using the
> wrong entry point for completing tags in a normal buffer? Or is this a
> bug? Below I've included the original version and my version for
> tags-completion-at-point-function, for reference.

I'm pretty sure it's a bug.
It should be able to complete anywhere in the buffer.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]