David Kastrup <[EMAIL PROTECTED]> writes:

> Ralf Angeli <[EMAIL PROTECTED]> writes:
>
>> * David Kastrup (2006-03-21) writes:
>
>>> By the way: the latter don't seem to respond to mouse-3 anymore.
>>
>> In my Emacs build from the third of March mouse-3 is working fine.
>> On XEmacs I obviously cannot check because there are no "TeX"
>> icons.
>
> Weird.  For me it works on the preview images themselves, but not on
> the icons you see when opening an image.  But my copy is not
> pristine: it contains some stuff around follow-link that is not
> working.  Maybe that interferes.

Pffffrzzzzt.

I should go recheck my brain.  The "not pristine" looks like the
following:

--- prv-emacs.el	11 Jul 2005 23:44:29 +0200	1.65
+++ prv-emacs.el	31 Dec 2005 02:19:02 +0100	
@@ -148,8 +148,8 @@
     (setcdr (car img) (cdar replacement))
     (setcdr img (cdr replacement))))
 
-(defvar preview-button-1 [mouse-2])
-(defvar preview-button-2 [mouse-3])
+(defvar preview-button-1 'mouse-2)
+(defvar preview-button-2 'down-mouse-3)
 
 (defmacro preview-make-clickable (&optional map glyph helpstring click1 click2)
   "Generate a clickable string or keymap.
@@ -161,9 +161,9 @@
 are functions to call on preview's clicks."
   `(let ((resmap ,(or map '(make-sparse-keymap))))
      ,@(if click1
-           `((define-key resmap preview-button-1 ,click1)))
+           `((define-key resmap [,preview-button-1] ,click1)))
      ,@(if click2
-           `((define-key resmap preview-button-2 ,click2)))
+           `((define-key resmap [,preview-button-2] ,click2)))
      ,(if glyph
 	  `(propertize
 	    "x"
@@ -171,8 +171,10 @@
 	    'mouse-face 'highlight
 	    'help-echo
 	    ,(if (stringp helpstring)
-		 (format helpstring preview-button-1 preview-button-2)
-	       `(format ,helpstring preview-button-1 preview-button-2))
+		 (format helpstring preview-button-1
+			 (event-basic-type preview-button-2))
+	       `(format ,helpstring preview-button-1
+			(event-basic-type preview-button-2)))
 	    'keymap resmap)
 	'resmap)))
 
So in short, it looks like I was trying to achieve that the menu pops
open already on mouse-down, so that you can select a choice by
_releasing_ the mouse button on the appropriate entry again.

And it would seem like I did not manage to get this to work.
Suggestions for fixing this welcome.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
_______________________________________________
auctex-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to