]> code.delx.au - gnu-emacs/blobdiff - lisp/bindings.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / bindings.el
index 27d27946122193512550c7e4f5560117e310a5d4..77c0423e157631ab02bf49736b5af10baae66835 100644 (file)
@@ -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'.")