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

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

bug#31455: 26.1; last-command bug when selecting region with mouse


From: Noam Postavsky
Subject: bug#31455: 26.1; last-command bug when selecting region with mouse
Date: Wed, 20 Jun 2018 07:50:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

tags 31455 + notabug
quit

Mambo Levis <mambo.levis@gmail.com> writes:

> I am printing the last-command made in emacs. When I select a region
> with the mouse a non common message is shown (see highlighted text
> below)

> last-command: #[257 
> \307!\310!\211\301\242=\204\0\306\300\311\240\210\211@\262\302=\203-\0\312!\203-\0\313\301\242\305#\202Z\0\314
> AA\211?\206X\0\211\303W\203H\0\315\302\303Z\316\301\242$\202X\0\211\304Y\205X\0\315\302\304ZT\316\301\242$\262\207
>  [(mouse-movement
> (#<window 48 on *Bug Help*> 267 (350 . 122) 428906093 nil 267 (43 . 7) nil (6 
> . 10) (8 . 16))) (267) #<window 48 on *Bug Help*> 0 60 0 t event-end
> posn-point mouse-movement integer-or-marker-p mouse--drag-set-mark-and-point 
> mouse-position mouse-scroll-subr nil auto-hscroll-mode] 9
>
> (fn EVENT) e]

I don't think this is a bug, you're seeing the compiled form of this
lambda in mouse-drag-track:

(defun mouse-drag-track (start-event)
   [...]
       (define-key map [mouse-movement]
         (lambda (event) (interactive "e")
           (let* ((end (event-end event))
                  (end-point (posn-point end)))
              [...]

If you use cl-print functions, you can hide the ugly bytecode stuff,
e.g.:

    (defun print-last-command ()
      (message "last-command: %s" (cl-prin1-to-string last-command)))

Produces

    last-command: #f(compiled-function (event) (interactive "e") #<bytecode 
0x4bfd41>)






reply via email to

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