From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Yue Wu" Newsgroups: gmane.emacs.help Subject: Re: How to disable mouse click on modeline? Date: Sun, 12 Jun 2011 10:05:48 +0800 Organization: China Pharmaceutical University Message-ID: References: <837h8sbxlb.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Trace: dough.gmane.org 1307844445 32039 80.91.229.12 (12 Jun 2011 02:07:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2011 02:07:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 12 04:07:21 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QVa5B-0002kI-Du for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jun 2011 04:07:21 +0200 Original-Received: from localhost ([::1]:45852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVa5A-0005nm-Ho for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Jun 2011 22:07:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVa3v-0005nd-P5 for help-gnu-emacs@gnu.org; Sat, 11 Jun 2011 22:06:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVa3u-0003TD-Nd for help-gnu-emacs@gnu.org; Sat, 11 Jun 2011 22:06:03 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:39371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVa3u-0003T3-I7 for help-gnu-emacs@gnu.org; Sat, 11 Jun 2011 22:06:02 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QVa3t-0002WF-JG for help-gnu-emacs@gnu.org; Sun, 12 Jun 2011 04:06:01 +0200 Original-Received: from 221.226.175.140 ([221.226.175.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Jun 2011 04:06:01 +0200 Original-Received: from vanopen by 221.226.175.140 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Jun 2011 04:06:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 221.226.175.140 User-Agent: Opera Mail/11.11 (Win32) X-Antivirus: avast! (VPS 110611-1, 06/12/2011), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81334 Archived-At: On Sat, 11 Jun 2011 16:07:12 +0800, Eli Zaretskii wrote: >> From: "Yue Wu" >> 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 buffe= r = name/infos on the modeline still has effects, maybe I have to redefine t= he = 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(=E4=B8=AD=E5=9C=8B=E8=97=A5=E7=A7=91=E5=A4= =A7=E5=AD=B8) No.24, Tongjia Xiang Street, Nanjing 210009, China