[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

momentary-string-display is broken (patch included)

From: Christopher Genovese
Subject: momentary-string-display is broken (patch included)
Date: Mon, 9 Feb 2015 23:45:11 -0500

Specifically, it eats every following key, including those not equal to
EXIT-CHAR, contrary to the intended behavior. The problem is that

   (append (this-single-command-raw-keys))

gives a vector. This messes up unread-command-events, which
is not cleared subsequently. The patch below fixes the problem.


   (append (this-single-command-raw-keys) nil)

would work, I did

   (append (this-single-command-raw-keys) unread-command-events)

in case the function is used in a context where other events
were added to unread-command-events earlier.

Here's the patch, through the ^L:

--- subr.el    2015-02-09 21:49:34.000000000 -0500
+++ subr-modified.el    2015-02-09 21:50:38.000000000 -0500
@@ -2430,7 +2430,8 @@
         (or (eq event exit-char)
         (eq event (event-convert-list exit-char))
         (setq unread-command-events
-                      (append (this-single-command-raw-keys))))))
+                      (append (this-single-command-raw-keys)
+                              unread-command-events)))))
       (delete-overlay ol))))

For reference, this is with GNU Emacs 24.4.1 on Mac OS X 10.7.5.

Thanks, Chris

reply via email to

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