;; 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,
(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.
'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)
(define-key ctl-x-map "rw" 'window-configuration-to-register)
(define-key ctl-x-map "rf" 'frame-configuration-to-register)
-;; These key bindings are deprecated; use the above C-x r map instead.
-;; We use these aliases so \[...] will show the C-x r bindings instead.
-(defalias 'point-to-register-compatibility-binding 'point-to-register)
-(defalias 'jump-to-register-compatibility-binding 'jump-to-register)
-(defalias 'copy-to-register-compatibility-binding 'copy-to-register)
-(defalias 'insert-register-compatibility-binding 'insert-register)
-(define-key ctl-x-map "/" 'point-to-register-compatibility-binding)
-(define-key ctl-x-map "j" 'jump-to-register-compatibility-binding)
-(define-key ctl-x-map "x" 'copy-to-register-compatibility-binding)
-(define-key ctl-x-map "g" 'insert-register-compatibility-binding)
-;; (define-key ctl-x-map "r" 'copy-rectangle-to-register)
-
(define-key esc-map "q" 'fill-paragraph)
;; (define-key esc-map "g" 'fill-region)
(define-key ctl-x-map "." 'set-fill-prefix)