[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
23.0.60; Image in before-string of overlay interferes with keymap
From: |
Ralf Angeli |
Subject: |
23.0.60; Image in before-string of overlay interferes with keymap |
Date: |
Wed, 06 Feb 2008 22:30:17 +0100 |
As soon as an image is used in the before-string property of an overlay,
mouse clicks as defined in a keymap for the propertized string are not
recognized anymore.
In order to reproduce this, start Emacs with `emacs -Q', execute the
code snippet included below and click with mouse-1, mouse-2 or mouse-3
on the image in the new buffer. If the `display' property is omitted
from the code below, clicking on the letter "A" after executing the code
will show "Mouse-1", "Mouse-2" or "Mouse-3" in the echo area, depending
on which mouse button was used when clicking on it.
(progn
(pop-to-buffer "*foo*")
(insert "xxx")
(let ((ov (make-overlay 1 4))
(map (make-sparse-keymap)))
(define-key map [mouse-1] (lambda () (interactive) (message "Mouse-1")))
(define-key map [mouse-2] (lambda () (interactive) (message "Mouse-2")))
(define-key map [mouse-3] (lambda () (interactive) (message "Mouse-3")))
(overlay-put ov 'before-string
(propertize
"A"
'keymap map
'display `(image :type xpm
:file ,(concat data-directory
"/images/attach.xpm"))
'mouse-face 'highlight))))
In GNU Emacs 23.0.60.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.7)
of 2008-02-06 on photon
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure '--enable-font-backend''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<mouse-1> <down-mouse-2> <mouse-2> C-_ <down-mouse-3>
<mouse-3> C-x o C-p C-p C-p C-p C-f C-SPC C-n C-n C-n
C-p C-p C-p C-SPC C-SPC C-n C-n C-n M-; C-x 0 C-x k
<return> C-n C-b C-x C-e <down-mouse-1> <mouse-1> <down-mouse-2>
<mouse-2> <down-mouse-3> <mouse-3> C-x 1 M-x r e p
o r t - e m <tab> <return> C-g C-x k <return> C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-a C-SPC C-SPC C-n C-n C-n C-n M-w M-> <return> C-y
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-SPC C-SPC C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
M-w <return> C-y C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-p C-p C-p C-p C-p C-p C-p C-b <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> d i s p l a y C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-b C-x C-e <down-mouse-1>
<mouse-1> <down-mouse-2> <mouse-2> <down-mouse-3> <mouse-3>
C-x k <return> C-x 0 C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-SPC C-SPC C-n C-n C-n M-; C-n C-n C-b C-x C-e <down-mouse-2>
<mouse-2> C-x k <return> C-x 0 C-n C-n C-n C-n C-n
C-n C-n C-n C-SPC M-> C-SPC C-SPC C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-w
C-p C-p C-p C-p C-SPC C-SPC C-n C-n C-n M-; M-< C-SPC
C-M-f M-w M-x r e p o r t - e m a <tab> <return>
Recent messages:
Mouse-3
Mark set
Transient-mark-mode temporarily enabled
#("A" 0 1 (mouse-face highlight display (image :type xpm :file
"/usr/src/emacs/etc//images/attach.xpm") keymap (keymap (mouse-3 lambda nil ...
...) (mouse-2 lambda nil ... ...) (mouse-1 lambda nil ... ...))))
Mouse-2
Mark set [3 times]
Transient-mark-mode temporarily enabled
Mark set
Transient-mark-mode temporarily enabled
Mark set [2 times]
--
Ralf
- 23.0.60; Image in before-string of overlay interferes with keymap,
Ralf Angeli <=