all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 16461@debbugs.gnu.org
Subject: bug#16461: 24.3.50; electric eats too much
Date: Fri, 17 Jan 2014 10:05:17 +0200	[thread overview]
Message-ID: <87fvon58zo.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvd2jsqb4d.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Thu, 16 Jan 2014 09:02:59 -0500")

> 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.






  reply	other threads:[~2014-01-17  8:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16  7:51 bug#16461: 24.3.50; electric eats too much Juri Linkov
2014-01-16 14:02 ` Stefan Monnier
2014-01-17  8:05   ` Juri Linkov [this message]
2014-01-17 14:40     ` Stefan Monnier
2014-01-20  8:47       ` Juri Linkov
2014-01-20 14:12         ` Stefan Monnier

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=87fvon58zo.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=16461@debbugs.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.