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

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

bug#27819: invoking `artist-mouse-choose-operation' gives "if: Wrong typ


From: Stephen Berman
Subject: bug#27819: invoking `artist-mouse-choose-operation' gives "if: Wrong type argument: listp, 110"
Date: Tue, 25 Jul 2017 14:25:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Tue, 25 Jul 2017 18:49:08 +0800 Shiyao Ma <i@introo.me> wrote:

> Hi,
>
> I am on macOS emacs25, and using artist-mode.
>
> when invoking `artist-mouse-choose-operation', I got this error message: if:
> Wrong type argument: listp.

I can reproduce the error by invoking the command like this:
`M-x artist-mouse-choose-operation'.

The command is intended to be invoked with down-mouse-2 (that's what
it's bound to in artist-mode-map).  

> How to solve this?

This is one way:

diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index 596570ca4e..cdc2af4a7a 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -4889,7 +4889,7 @@ artist-mouse-choose-operation
      (select-window (posn-window (event-start last-input-event)))
      (list last-input-event
           (if (display-popup-menus-p)
-              (x-popup-menu last-nonmenu-event artist-popup-menu-table)
+              (x-popup-menu t artist-popup-menu-table)
             'no-popup-menus))))
 
   (if (eq op 'no-popup-menus)


A possible disadvantage of this fix is that typing `M-x
artist-mouse-choose-operation' will pop up the menu wherever the mouse
pointer is, which on a graphical display could be anywhere on the
screen, not necessarily within the Emacs window or even frame displaying
the artist-mode buffer.

Steve Berman





reply via email to

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