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

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

bug#14785: 24.3.50; isearchb.el; char-to-string and last-command-event


From: Juri Linkov
Subject: bug#14785: 24.3.50; isearchb.el; char-to-string and last-command-event
Date: Thu, 04 Jul 2013 02:37:25 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

After loading isearchb.el, evaluating (isearchb-set-keybindings 'super)
and typing `s-a', it fails with the error

  Wrong type argument: characterp, 8388721

This patch seems to fix the bug:

=== modified file 'lisp/isearchb.el'
--- lisp/isearchb.el    2013-01-01 09:11:05 +0000
+++ lisp/isearchb.el    2013-07-03 23:36:20 +0000
@@ -139,7 +139,8 @@ (defun isearchb ()
   (if last-command-event
       (setq iswitchb-rescan t
            iswitchb-text (concat iswitchb-text
-                                 (char-to-string last-command-event))))
+                                 (char-to-string
+                                  (event-basic-type last-command-event)))))
   (iswitchb-set-matches)
   (let* ((match (car iswitchb-matches))
         (buf (and match (get-buffer match))))


PS: I wonder whether other similar places should be fixed too?
Grepping for `char-to-string' and `last-command-event':

./calc/calc-aent.el:282:     (calc-alg-entry (and auto (char-to-string 
last-command-event))))))
./calc/calc-aent.el:457:         (t (char-to-string last-command-event)))))
./calc/calc-misc.el:591:  (if (keymapp (key-binding (char-to-string 
last-command-event)))
./calc/calc.el:2438:      (insert (char-to-string last-command-event))
./emulation/vi.el:987:      (setq this-command (lookup-key vi-com-map 
(char-to-string last-command-event)))
./emulation/vi.el:992:  (setq this-command (lookup-key vi-com-map 
(char-to-string last-command-event))))
./eshell/esh-mode.el:477:   (char-to-string (if (symbolp last-command-event)
./international/quail.el:1599:  (concat quail-current-key (char-to-string 
last-command-event)))
./wdired.el:771:      (let ((new-bit (char-to-string last-command-event))

Maybe they don't fail when `last-command-event' is expected to be only
a character event.  But I don't know how to test most of these functions
to verify whether they fail or not.





reply via email to

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