all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* mouse-face on two adjoin characters
@ 2010-11-12 13:56 Masatake YAMATO
  2010-11-12 14:40 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Masatake YAMATO @ 2010-11-12 13:56 UTC (permalink / raw)
  To: emacs-devel

Hi,

I'd like to insert adjoin characters responding to mouse cursor
separately. How can I do it? (I'm surprised that I cannot answer
this question by myself.)

I tried following code.

    ;; *scratch*
    (progn
      (insert (propertize "X" 'mouse-face 'highlight))
      (insert (propertize "Y" 'mouse-face 'highlight)))

But as explained in elisp info, XY responds to the mouse
cursor together: the both XY are highlighted when 
I move mouse cursor to X. I expected only X was highlighted.

Masatake YAMATO



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mouse-face on two adjoin characters
  2010-11-12 13:56 mouse-face on two adjoin characters Masatake YAMATO
@ 2010-11-12 14:40 ` Stefan Monnier
  2010-11-12 14:48   ` Masatake YAMATO
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2010-11-12 14:40 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel

>     (progn
>       (insert (propertize "X" 'mouse-face 'highlight))
>       (insert (propertize "Y" 'mouse-face 'highlight)))

Try
     (progn
       (insert (propertize "X" 'mouse-face (list 'highlight)))
       (insert (propertize "Y" 'mouse-face (list 'highlight))))

       
-- Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mouse-face on two adjoin characters
  2010-11-12 14:40 ` Stefan Monnier
@ 2010-11-12 14:48   ` Masatake YAMATO
  0 siblings, 0 replies; 3+ messages in thread
From: Masatake YAMATO @ 2010-11-12 14:48 UTC (permalink / raw)
  To: monnier; +Cc: emacs-devel

It works fine! Thanks. 
I'll submit this tips as a patch for lispref.

Masatake YAMATO

>>     (progn
>>       (insert (propertize "X" 'mouse-face 'highlight))
>>       (insert (propertize "Y" 'mouse-face 'highlight)))
> 
> Try
>      (progn
>        (insert (propertize "X" 'mouse-face (list 'highlight)))
>        (insert (propertize "Y" 'mouse-face (list 'highlight))))



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-12 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12 13:56 mouse-face on two adjoin characters Masatake YAMATO
2010-11-12 14:40 ` Stefan Monnier
2010-11-12 14:48   ` Masatake YAMATO

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.