[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DWIM for the TAB key
From: |
Oliver Scholz |
Subject: |
Re: DWIM for the TAB key |
Date: |
Thu, 17 Feb 2005 14:16:38 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
"rbielaws@i1.net" <rbielaws@i1.net> writes:
> Oliver Scholz wrote:
[...]
>> (defun egoge-tab-dwim ()
>> "Indent or complete depending on the context.
>> If point is at the beginning of a line or if all characters
>> between point and the beginning of the line are whitespace
>> characters, indent that line. Otherwise complete the symbol at
>> point."
>> (interactive)
>
> This code doesn't seem to do what the comments say it should.
Right. The code just checks for a single whitespace character. I wrote
the doc string before the body of the function and changed my mind
when writing the latter. I don't know yet what's better: check whether
everything before point is blank or whether there is a single blank
before point, i.e. whether this is a bug or a doc-bug. Of course
completion is rather pointless if there is no symbol at point ...
Oliver
--
29 Pluviôse an 213 de la Révolution
Liberté, Egalité, Fraternité!