From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: Bindings on the mode-line Date: Thu, 15 Sep 2005 16:22:24 +1200 Message-ID: <17192.63232.396828.455702@farnswood.snap.net.nz> References: <17191.62447.650488.109197@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1126759143 32522 80.91.229.2 (15 Sep 2005 04:39:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Sep 2005 04:39:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 15 06:38:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EFlVI-0002YD-5q for ged-emacs-devel@m.gmane.org; Thu, 15 Sep 2005 06:37:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EFlVH-00072V-6g for ged-emacs-devel@m.gmane.org; Thu, 15 Sep 2005 00:37:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EFlUX-0006yk-O5 for emacs-devel@gnu.org; Thu, 15 Sep 2005 00:36:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EFlUV-0006xl-Li for emacs-devel@gnu.org; Thu, 15 Sep 2005 00:36:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EFlUA-0006YG-Co for emacs-devel@gnu.org; Thu, 15 Sep 2005 00:36:34 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EFlGu-0005c7-Ej; Thu, 15 Sep 2005 00:22:52 -0400 Original-Received: from farnswood.snap.net.nz (p24-tnt2.snap.net.nz [202.124.108.24]) by viper.snap.net.nz (Postfix) with ESMTP id E66F76898E3; Thu, 15 Sep 2005 16:22:49 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 3C5A262A99; Thu, 15 Sep 2005 05:22:25 +0100 (BST) Original-To: rms@gnu.org In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.16 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:42947 Archived-At: > Now that mouse-sensitive parts of the mode line look more like buttons, > how about moving mode-line-toggle-read-only, mode-line-toggle-modified > et al from mouse-3 to mouse-1? > > Yes, that would be more consistent. So please make that change, and thanks. Done. Previously I have suggested putting goto-line on the mode line which you didn't like. However, it seems more natural now that it appears as a button and can go on mouse-1. WDYT? Nick (let* ((help-echo "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this") (my-help-echo "mouse-1: go to line, mouse-2: delete others, mouse-3: delete this")) (setq-default mode-line-position `((-3 ,(propertize "%p" 'help-echo help-echo)) (size-indication-mode (8 ,(propertize " of %I" 'help-echo help-echo))) (line-number-mode ((column-number-mode (10 ,(propertize " (%l,%c)" 'help-echo help-echo)) (6 ,(propertize " L%l" 'help-echo my-help-echo 'mouse-face 'mode-line-highlight 'local-map (make-mode-line-mouse-map 'mouse-1 #'mode-line-go-to-line))))) ((column-number-mode (5 ,(propertize " C%c" 'help-echo help-echo)))))))) (defun mode-line-go-to-line (event) "Like `go-to-line', for the mode-line." (interactive "e") (save-selected-window (select-window (posn-window (event-start event))) (let ((arg (read-from-minibuffer "Goto line: "))) (goto-line (string-to-int arg))) (force-mode-line-update)))