[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21747: 25.0.50; while-no-input breaks kbd event handling when called
From: |
Tassilo Horn |
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 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
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
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, (continued)
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Eli Zaretskii, 2015/10/24
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Tassilo Horn, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Tassilo Horn, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Tassilo Horn, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Eli Zaretskii, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Tassilo Horn, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Stefan Monnier, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook,
Tassilo Horn <=
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Eli Zaretskii, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Tassilo Horn, 2015/10/24
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Artur Malabarba, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Eli Zaretskii, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Artur Malabarba, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Eli Zaretskii, 2015/10/25
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Tassilo Horn, 2015/10/26
- bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook, Eli Zaretskii, 2015/10/24