unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dave Abrahams <dave@boostpro.com>
Cc: 15767@debbugs.gnu.org
Subject: bug#15767: closed (Re: bug#15767: 24.3; [patch] electric-indent-mode bug)
Date: Tue, 05 Nov 2013 10:44:59 -0500	[thread overview]
Message-ID: <jwv7gcmc0vk.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <04CD2009-757D-471D-8338-325882009851@boostpro.com>

> Well, the problem I see is that you left the call to line-beginning-position
> where it was in the original call.  At that point, point may be
> on a different line than it started on, so it’s actually getting information
> about the wrong line.  It’s possible that your patch somehow makes
> everything work out, but leaving the call to line-beginning-position where
> it is seems at best fragile to me.

On the contrary, moving the call like you did was wrong, IMO.  The test
against line-beginning-position is meant to check if pos is on
a previous line, in which case we also need to reindent that previous
line, whereas with your patch it reduces to just check if pos is at
(bolp) which is not as interesting (tho it will often work as well for
the newline case).


        Stefan





  reply	other threads:[~2013-11-05 15:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 23:03 bug#15767: 24.3; [patch] electric-indent-mode bug Dave Abrahams
2013-10-31 17:06 ` Stefan Monnier
2013-11-01  3:27   ` Dave Abrahams
2013-11-04 20:04 ` Stefan Monnier
     [not found] ` <handler.15767.D15767.138359548417885.notifdone@debbugs.gnu.org>
2013-11-05  5:06   ` bug#15767: closed (Re: bug#15767: 24.3; [patch] electric-indent-mode bug) Dave Abrahams
2013-11-05 15:44     ` Stefan Monnier [this message]
2013-11-05 15:54       ` Dave Abrahams

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv7gcmc0vk.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=15767@debbugs.gnu.org \
    --cc=dave@boostpro.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).