emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 32d1813: Fix description of (move-to-column <n> t


From: Alan Mackenzie
Subject: [Emacs-diffs] emacs-26 32d1813: Fix description of (move-to-column <n> t) when column <n> is inside a tab
Date: Thu, 9 May 2019 12:29:09 -0400 (EDT)

branch: emacs-26
commit 32d181326a752375ce31796556017b94878d2d2b
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    Fix description of (move-to-column <n> t) when column <n> is inside a tab
    
    This fixes bug #35647.  State that when indent-tabs-mode is non-nil, spaces
    are inserted before the tab rather than the tab being replaced by spaces.
    
    * doc/lispref/text.texi (columns)
    * src/indent.c (move-to-column): Make the above documentation amendment.
---
 doc/lispref/text.texi | 8 +++++---
 src/indent.c          | 7 ++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 73312bb..f3d222b 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -2245,9 +2245,11 @@ If it is impossible to move to column @var{column} 
because that is in
 the middle of a multicolumn character such as a tab, point moves to the
 end of that character.  However, if @var{force} is address@hidden, and
 @var{column} is in the middle of a tab, then @code{move-to-column}
-converts the tab into spaces so that it can move precisely to column
address@hidden  Other multicolumn characters can cause anomalies despite
address@hidden, since there is no way to split them.
+either converts the tab into spaces (when @code{indent-tabs-mode} is
address@hidden), or inserts enough spaces before it (otherwise), so that
+point can move precisely to column @var{column}.  Other multicolumn
+characters can cause anomalies despite @var{force}, since there is no
+way to split them.
 
 The argument @var{force} also has an effect if the line isn't long
 enough to reach column @var{column}; if it is @code{t}, that means to
diff --git a/src/indent.c b/src/indent.c
index 5e3a7e0..53f998d 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -983,9 +983,10 @@ If specified column is within a character, point goes 
after that character.
 If it's past end of line, point goes to end of line.
 
 Optional second argument FORCE non-nil means if COLUMN is in the
-middle of a tab character, change it to spaces.
-In addition, if FORCE is t, and the line is too short to reach
-COLUMN, add spaces/tabs to get there.
+middle of a tab character, either change it to spaces (when
+`indent-tabs-mode' is nil), or insert enough spaces before it to reach
+COLUMN (otherwise).  In addition, if FORCE is t, and the line is too short
+to reach COLUMN, add spaces/tabs to get there.
 
 The return value is the current column.  */)
   (Lisp_Object column, Lisp_Object force)



reply via email to

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