X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/7be1c21aedb2f8e7b7831d494e065a31afe13146..aaf34461ff5804e5cebe163b31e535da72e81d87:/lisp/bindings.el diff --git a/lisp/bindings.el b/lisp/bindings.el index 27d2794612..77c0423e15 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -254,6 +254,22 @@ Normally nil in most modes, since there is no process to display.") (make-variable-buffer-local 'mode-line-modified) +(defvar mode-line-remote + (list (propertize + "%1@" + '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. @@ -294,6 +310,7 @@ Keymap to display on minor modes.") 'mode-line-mule-info 'mode-line-client 'mode-line-modified + 'mode-line-remote 'mode-line-frame-identification 'mode-line-buffer-identification (propertize " " 'help-echo help-echo) @@ -484,7 +501,7 @@ Menu of mode operations in the mode line.") (defvar minor-mode-alist nil "\ Alist saying how to show minor modes in the mode line. Each element looks like (VARIABLE STRING); -STRING is included in the mode line iff VARIABLE's value is non-nil. +STRING is included in the mode line if VARIABLE's value is non-nil. Actually, STRING need not be a string; any possible mode-line element is okay. See `mode-line-format'.")