bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook
Date: Sun, 25 Oct 2015 16:10:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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

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


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]