From: Nick Roberts <nickrob@snap.net.nz>
Subject: put goto-line on modeline
Date: Mon, 17 Jan 2005 14:53:21 +1300 [thread overview]
Message-ID: <16875.6801.853047.943117@farnswood.snap.net.nz> (raw)
This patch allows the user to invoke goto-line by clicking on the line number
in the modeline.
Are there any objections to me installing it?
Nick
*** /home/nick/emacs/lisp/bindings.el.~1.137.~ 2004-12-14 09:34:21.000000000 +1300
--- /home/nick/emacs/lisp/bindings.el 2005-01-17 14:45:41.000000000 +1300
***************
*** 83,88 ****
--- 83,98 ----
(force-mode-line-update)))
+ (defun mode-line-goto-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)))
+
+
(defun mode-line-abbrev-mode (event)
"Turn off `abbrev-mode' from the mode-line."
(interactive "e")
***************
*** 321,327 ****
(line-number-mode
((column-number-mode
(10 ,(propertize " (%l,%c)" 'help-echo help-echo))
! (6 ,(propertize " L%l" 'help-echo help-echo))))
((column-number-mode
(5 ,(propertize " C%c" 'help-echo help-echo))))))))
--- 331,340 ----
(line-number-mode
((column-number-mode
(10 ,(propertize " (%l,%c)" 'help-echo help-echo))
! (6 ,(propertize " L%l" 'help-echo "mouse-3: go to line"
! 'local-map (purecopy (make-mode-line-mouse-map
! 'mouse-3
! #'mode-line-goto-line))))))
((column-number-mode
(5 ,(propertize " C%c" 'help-echo help-echo))))))))
next reply other threads:[~2005-01-17 1:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-17 1:53 Nick Roberts [this message]
2005-01-17 16:10 ` put goto-line on modeline Stefan Monnier
2005-01-17 20:36 ` Nick Roberts
2005-01-17 23:43 ` Richard Stallman
2005-01-18 4:43 ` Masatake YAMATO
2005-01-18 6:54 ` Drew Adams
2005-01-18 9:29 ` David Kastrup
2005-01-19 0:49 ` Richard Stallman
2005-01-19 10:14 ` David Kastrup
2005-01-18 5:02 ` Masatake YAMATO
2005-01-18 6:55 ` Drew Adams
2005-01-19 0:51 ` Richard Stallman
2005-01-19 4:40 ` Masatake YAMATO
2005-01-19 10:17 ` David Kastrup
2005-01-20 21:31 ` Richard Stallman
2005-01-20 22:23 ` David Kastrup
2005-01-21 1:59 ` Nick Roberts
2005-01-21 9:06 ` David Kastrup
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16875.6801.853047.943117@farnswood.snap.net.nz \
--to=nickrob@snap.net.nz \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).