> 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)))
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel