unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: bruce.connor.am@gmail.com, 21747@debbugs.gnu.org, storm@cua.dk
Subject: bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook
Date: Mon, 26 Oct 2015 07:57:41 +0100	[thread overview]
Message-ID: <87twpem80q.fsf@gnu.org> (raw)
In-Reply-To: <jwveggi4snv.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Sun, 25 Oct 2015 16:10:26 -0400")

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> But I'm really not sure if that's the right thing to do.  Maybe it's
>> better to fix sh-smie-sh-forward-token so that it doesn't return ";"
>> when actually no movement did occur because we already started out at
>> EOB.  That would be this:
>
> Sounds right.

Ok, great.  Then I'll commit that.

>> -        (let ((semi (sh-smie--newline-semi-p)))
>> -          (forward-line 1)
>> -          (if (or semi (eobp)) ";"
>> -            (sh-smie-sh-forward-token))))
>> +        (unless (eobp)
>> +          (let ((semi (sh-smie--newline-semi-p)))
>> +            (forward-line 1)
>> +            (if (or semi (eobp)) ";"
>> +              (sh-smie-sh-forward-token)))))
>
> Another option might be to fix sh-smie--newline-semi-p so it returns
> nil when at EOB.  I haven't looked at the code recently, so I can't
> remember if that would be better or not.

No, that already returns nil in this scenario where the buffer contents
is just "if".  When it is called with point being at EOB, it'll scan
backwards over the if, and since that's a grammar token with a numeric
RIGHT-LEVEL it returns nil anyway.

Bye,
Tassilo





  reply	other threads:[~2015-10-26  6:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24  7:42 bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook Tassilo Horn
2015-10-24  8:02 ` Eli Zaretskii
2015-10-24  8:53   ` Tassilo Horn
2015-10-24  9:14     ` Eli Zaretskii
2015-10-24  9:49       ` Tassilo Horn
2015-10-24 10:30         ` Artur Malabarba
2015-10-24 10:52           ` Eli Zaretskii
2015-10-24 12:13             ` Tassilo Horn
2015-10-24 12:45               ` Eli Zaretskii
2015-10-24 13:30                 ` Tassilo Horn
2015-10-24 13:57                   ` Artur Malabarba
2015-10-24 14:06                     ` Eli Zaretskii
2015-10-24 14:05                   ` Eli Zaretskii
2015-10-25  7:19                     ` Tassilo Horn
2015-10-25  8:10                       ` Tassilo Horn
2015-10-25  9:25                         ` Tassilo Horn
2015-10-25 18:45                           ` Eli Zaretskii
2015-10-25 18:49                             ` Tassilo Horn
2015-10-25 20:10                           ` Stefan Monnier
2015-10-26  6:57                             ` Tassilo Horn [this message]
2015-10-25 18:43                       ` Eli Zaretskii
2015-10-24 12:46               ` Tassilo Horn
2015-10-25 14:43             ` Artur Malabarba
2015-10-25 18:50               ` Eli Zaretskii
2015-10-26  0:27                 ` Artur Malabarba
2015-10-26  3:32                   ` Eli Zaretskii
2015-10-26 13:43                     ` Tassilo Horn
2015-10-24 10:35         ` Eli Zaretskii

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=87twpem80q.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=21747@debbugs.gnu.org \
    --cc=bruce.connor.am@gmail.com \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=storm@cua.dk \
    /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).