all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to disable mouse click on modeline?
@ 2011-06-11  5:22 Yue Wu
  2011-06-11  8:07 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Yue Wu @ 2011-06-11  5:22 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, list,

I want to disable mouse left/middle/right click behaviors on the
modeline, how to do it?


-- 
Regards,
Yue Wu

Key Laboratory of Modern Chinese Medicines
Department of Traditional Chinese Medicine
China Pharmaceutical University(中國藥科大學)
No.24, Tongjia Xiang Street, Nanjing 210009, China




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

* Re: How to disable mouse click on modeline?
  2011-06-11  5:22 How to disable mouse click on modeline? Yue Wu
@ 2011-06-11  8:07 ` Eli Zaretskii
  2011-06-12  2:05   ` Yue Wu
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2011-06-11  8:07 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Yue Wu" <vanopen@gmail.com>
> Date: Sat, 11 Jun 2011 13:22:31 +0800
> 
> I want to disable mouse left/middle/right click behaviors on the
> modeline, how to do it?

Does the below help?

  (global-set-key [mode-line mouse-1] 'ignore)
  (global-set-key [mode-line mouse-2] 'ignore)
  (global-set-key [mode-line mouse-3] 'ignore)

You will still have problems with parts of the mode line that define
their own bindings, though.  If you want to disable those as well, you
will have to redefine mode-line-format without the mouse bindings.



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

* Re: How to disable mouse click on modeline?
  2011-06-11  8:07 ` Eli Zaretskii
@ 2011-06-12  2:05   ` Yue Wu
  2011-06-12  3:01     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Yue Wu @ 2011-06-12  2:05 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, 11 Jun 2011 16:07:12 +0800, Eli Zaretskii wrote:

>> From: "Yue Wu" <vanopen@gmail.com>
>> Date: Sat, 11 Jun 2011 13:22:31 +0800
>>
>> I want to disable mouse left/middle/right click behaviors on the
>> modeline, how to do it?
>
> Does the below help?
>
>   (global-set-key [mode-line mouse-1] 'ignore)
>   (global-set-key [mode-line mouse-2] 'ignore)
>   (global-set-key [mode-line mouse-3] 'ignore)
>
> You will still have problems with parts of the mode line that define
> their own bindings, though.  If you want to disable those as well, you
> will have to redefine mode-line-format without the mouse bindings.
>
>

Thanks for pointing out the way, it works mostly, but click on the buffer  
name/infos on the modeline still has effects, maybe I have to redefine the  
modeline for it, though I don't know elisp at all, an example will be  
appreciated :)

-- 
Regards,
Yue Wu

Key Laboratory of Modern Chinese Medicines
Department of Traditional Chinese Medicine
China Pharmaceutical University(中國藥科大學)
No.24, Tongjia Xiang Street, Nanjing 210009, China




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

* Re: How to disable mouse click on modeline?
  2011-06-12  2:05   ` Yue Wu
@ 2011-06-12  3:01     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2011-06-12  3:01 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Yue Wu" <vanopen@gmail.com>
> Date: Sun, 12 Jun 2011 10:05:48 +0800
> 
> >   (global-set-key [mode-line mouse-1] 'ignore)
> >   (global-set-key [mode-line mouse-2] 'ignore)
> >   (global-set-key [mode-line mouse-3] 'ignore)
> >
> > You will still have problems with parts of the mode line that define
> > their own bindings, though.  If you want to disable those as well, you
> > will have to redefine mode-line-format without the mouse bindings.
> >
> >
> 
> Thanks for pointing out the way, it works mostly, but click on the buffer  
> name/infos on the modeline still has effects, maybe I have to redefine the  
> modeline for it, though I don't know elisp at all, an example will be  
> appreciated :)

The default definition of mode-line-format is in bindings.el, so I
think you will find there all the examples you need.



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

end of thread, other threads:[~2011-06-12  3:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-11  5:22 How to disable mouse click on modeline? Yue Wu
2011-06-11  8:07 ` Eli Zaretskii
2011-06-12  2:05   ` Yue Wu
2011-06-12  3:01     ` Eli Zaretskii

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.