[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lifting all buffer restrictions in indentation functions
From: |
Stefan Monnier |
Subject: |
Re: Lifting all buffer restrictions in indentation functions |
Date: |
Fri, 08 Dec 2017 15:47:44 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> And I don't think calling indent-line-function directly instead is the
> solution, because indent-according-to-mode, indent-for-tab-command
> etc. are not just trivial wrappers around the call to
> indent-line-function, they have additional functionality (otherwise
> why do we have them at all?).
I can't imagine a scenario where you'd use indent-for-tab-command in
that context. As for indent-according-to-mode, its only difference with
calling indent-line-function is for pseudo-indentation functions
(indent-relative and friends) where it has an ad-hoc hack to "try and do
the right thing", but it's far from clear what would be The Right Thing
to do in such a narrowed scenario anyway (call indent-line-function
directly, use the ad-hoc hack, or do yet something else).
Most cases of calling indent-line-function or indent-according-to-mode
when indent-line-function is one of those pseudo-indentation functions
don't really do the right thing anyway.
So it sounds highly hypothetical, and it's not clear if would be more
often right or more often wrong in those hypothetical cases.
Stefan
Re: Lifting all buffer restrictions in indentation functions, Robert Weiner, 2017/12/08
Re: Lifting all buffer restrictions in indentation functions, Stephen Leake, 2017/12/08