# HG changeset patch # User Nick Roberts # Date 1185145830 0 # Node ID 422bb10d6d8811ec91179aede8dd494c14a60424 # Parent cf652d32b662ff3f5b178b5334d304206572c190 (mode-line-remote): New variable. (help-echo): Add to default values of mode-line-format. diff -r cf652d32b662 -r 422bb10d6d88 lisp/bindings.el --- 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)