emacs-devel
[Top][All Lists]
Advanced

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

Re: C-u prefix behavior of TAB broken


From: Stefan Monnier
Subject: Re: C-u prefix behavior of TAB broken
Date: Sat, 22 Dec 2007 19:55:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>> Can't indent-for-tab-command simply, if there's a prefix argument given,
>> rigidly indent the following sexp by the change in indentation?  That
>> doesn't seem hard at all, and matches the behavior I remember (perhaps
>> there are corner cases where it would differ, but I don't think I know
>> about them...).

> For `tab-always-indent' t it might make sense to do `beginning-of-line'
> before the `forward-sexp'.  Otherwise it should work wherever
> `forward-sexp' behaves reasonably.  BTW, isn't

>    ((memq indent-line-function '(indent-relative indent-relative-maybe))
>     (funcall indent-line-function))
>    ;; Indent the line.
>    (t
>     (indent-according-to-mode))

> semantically equivalent to

>    (t
>     (funcall indent-line-function))

No, it's not: check the definition of indent-according-to-mode.

The difference is to distinguish between the case where the user hits
TAB (and hence wants some kind of effect) as opposed to when
line-indentation is done non-interactively (e.g. by skeleton).


        Stefan




reply via email to

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