From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Lifting all buffer restrictions in indentation functions
Date: Fri, 08 Dec 2017 22:02:47 +0200 [thread overview]
Message-ID: <83shclugwo.fsf@gnu.org> (raw)
In-Reply-To: <jwvr2s5tay9.fsf-monnier+gmane.emacs.devel@gnu.org> (message from Stefan Monnier on Fri, 08 Dec 2017 12:03:45 -0500)
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Fri, 08 Dec 2017 12:03:45 -0500
>
> While such code might exist somewhere [tho most likely calling
> indent-according-to-mode instead], the reasons why I think
> breaking such code is the right thing are:
> - it's very rare
> - it should be easy to change this code so it works with the new (and
> the old) convention, by replacing (indent-according-to-mode) with
> (funcall indent-line-function).
> - the reverse problem (i.e. where the restriction is currently obeyed
> while it shouldn't) is much more common.
>
> IOW the change could introduce breakage, but in my opinion, it will
> correct many more situations than it breaks, and those that it breaks
> are easy to fix.
To clarify: I'm not only afraid of breaking some existing code, I'm
also worried by disabling any _future_ code which could call these
functions in a narrowed buffer. This is AFAIU a legitimate usage, so
unconditionally disallowing it sounds gross.
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?).
next prev parent reply other threads:[~2017-12-08 20:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 16:51 Lifting all buffer restrictions in indentation functions Eli Zaretskii
2017-12-08 17:03 ` Stefan Monnier
2017-12-08 20:02 ` Eli Zaretskii [this message]
2017-12-08 20:47 ` Stefan Monnier
2017-12-09 8:24 ` Eli Zaretskii
2017-12-09 15:19 ` Stefan Monnier
2017-12-08 17:38 ` Robert Weiner
2017-12-08 17:50 ` Stefan Monnier
2017-12-08 22:40 ` Stephen Leake
2017-12-08 22:49 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83shclugwo.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.