--- Begin Message ---
Subject: |
Documentation and implementation of (move-to-column <n> t) differ. |
Date: |
Thu, 9 May 2019 10:48:50 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Emacs.
In (move-to-column <n> t), the t argument, FORCE, "replaces the tab with
spaces" if it needs to do so to get exactly to column <n> which is in
the middle of a tab.
At least, that's what the documentation says.
In the implementation, when indent-tabs-mode is non-nil, Emacs _inserts_
spaces before the tab to get to column <n>, rather than replacing the
tab with spaces.
This discrepancy is a bug.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
What the code in Fmove_to_column actually does is to delete the tab,
insert enough spaces to get to column <n>, then calls Findent_to to
finish the indentation to <n>. Findent_to uses a tab when
indent-tabs-mode is non-nil.
My feeling here is that the documentation rather than the code should be
amended. To amend the code would make it more difficult for
uncomment-region to restore a tab character which has been earlier
manipulated by comment-region. (See also bug #35600.)
--
Alan Mackenzie (Nuremberg, Germany).
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#35647: Documentation and implementation of (move-to-column <n> t) differ. |
Date: |
Thu, 9 May 2019 16:32:57 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Eli.
On Thu, May 09, 2019 at 18:43:06 +0300, Eli Zaretskii wrote:
> > Date: Thu, 9 May 2019 15:05:37 +0000
> > Cc: address@hidden
> > From: Alan Mackenzie <address@hidden>
> > > Would you mind preparing a documentation patch for this issue?
> > How about:
> Fine with me, thanks.
:-)
> Please push to the emacs-26 branch.
DONE.
I'm closing the bug.
--
Alan Mackenzie (Nuremberg, Germany).
--- End Message ---