[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: |
Sat, 09 Dec 2017 10:19:06 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> It _is_ hypothetical. The question that bothers me is specifically
> whether we should flatly disallow those hypothetical cases, just
> because we "cannot imagine" them.
They can still call indent-line-function, and the extra work that
indent-according-to-mode does isn't that much, so if it's *really*
indispensable to do "all that indent-according-to-mode does except
widen", then you can do it with something like
(let* ((ilf indent-line-function)
(res (list (point-min) (point-max)))
(indent-line-function
(lambda (&rest args)
(apply #'narrow-to-region res)
(apply ilf args))))
(indent-according-to-mode))
-- 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