Mercurial > emacs
changeset 82042:422bb10d6d88
(mode-line-remote): New variable.
(help-echo): Add to default values of mode-line-format.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Sun, 22 Jul 2007 23:10:30 +0000 |
parents | cf652d32b662 |
children | 7620cd626c41 |
files | lisp/bindings.el |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/bindings.el Sun Jul 22 23:09:08 2007 +0000 +++ b/lisp/bindings.el Sun Jul 22 23:10:30 2007 +0000 @@ -248,6 +248,22 @@ (make-variable-buffer-local 'mode-line-modified) +(defvar mode-line-remote + (list (propertize + "%1R" + 'help-echo (purecopy (lambda (window object point) + (format "%s" + (save-selected-window + (select-window window) + (concat + (if (file-remote-p default-directory) + "Remote: " + "Local: ") + default-directory))))))) + "Mode-line flag to show if default-directory for current buffer is remote.") + +(make-variable-buffer-local 'mode-line-remote) + ;; Actual initialization is below. (defvar mode-line-position nil "Mode-line control for displaying the position in the buffer. @@ -287,6 +303,7 @@ (propertize "-" 'help-echo help-echo) 'mode-line-mule-info 'mode-line-modified + 'mode-line-remote 'mode-line-frame-identification 'mode-line-buffer-identification (propertize " " 'help-echo help-echo)