all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel@gnu.org
Subject: Re: Bindings on the mode-line
Date: Thu, 15 Sep 2005 16:22:24 +1200	[thread overview]
Message-ID: <17192.63232.396828.455702@farnswood.snap.net.nz> (raw)
In-Reply-To: <E1EFjgj-0000hq-Ej@fencepost.gnu.org>

 >     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)))

  reply	other threads:[~2005-09-15  4:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14  9:57 Bindings on the mode-line Nick Roberts
2005-09-14 14:05 ` Masatake YAMATO
2005-09-14 16:34   ` Drew Adams
2005-09-15  2:41 ` Richard M. Stallman
2005-09-15  4:22   ` Nick Roberts [this message]
2005-09-16  1:01     ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17192.63232.396828.455702@farnswood.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.