GNU bug report logs -
#16461
24.3.50; electric eats too much
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Thu, 16 Jan 2014 08:10:01 UTC
Severity: normal
Found in version 24.3.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 16461 <at> debbugs.gnu.org (full text, mbox):
> But I also think that indent-line-to should *not* eat ^L.
This patch fixes the problem and doesn't eat ^L:
=== modified file 'lisp/indent.el'
--- lisp/indent.el 2014-01-15 08:22:41 +0000
+++ lisp/indent.el 2014-01-17 08:05:10 +0000
@@ -265,7 +265,7 @@ (defun indent-line-to (column)
"Indent current line to COLUMN.
This function removes or adds spaces and tabs at beginning of line
only if necessary. It leaves point at end of indentation."
- (back-to-indentation)
+ (backward-to-indentation 0)
(let ((cur-col (current-column)))
(cond ((< cur-col column)
(if (>= (- column (* (/ cur-col tab-width) tab-width)) tab-width)
@@ -274,7 +274,7 @@ (defun indent-line-to (column)
(indent-to column))
((> cur-col column) ; too far right (after tab?)
(delete-region (progn (move-to-column column t) (point))
- (progn (back-to-indentation) (point)))))))
+ (progn (backward-to-indentation 0) (point)))))))
(defun current-left-margin ()
"Return the left margin to use for this line.
This bug report was last modified 11 years and 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.