]> code.delx.au - gnu-emacs/blobdiff - doc/misc/tramp.texi
Merge from origin/emacs-25
[gnu-emacs] / doc / misc / tramp.texi
index 294a3a9ecdf33d43518b2409ab444e0de615e8a1..45518b2ce79401cc31b6a599f0596ed321769356 100644 (file)
@@ -2219,7 +2219,8 @@ shows host names @value{tramp} from @file{/etc/hosts} file, for example.
 @multitable @columnfractions .5 .5
 @c @multitable {@trampfn{telnet,melancholia.danann.net,}} {@trampfn{telnet,192.168.0.1,}}
 @item @trampfn{telnet,127.0.0.1,} @tab @trampfn{telnet,192.168.0.1,}
-@item @trampfn{telnet,@value{ipv6prefix}::1@value{ipv6postfix},} @tab @trampfn{telnet,localhost,}
+@c @item @trampfn{telnet,@value{ipv6prefix}::1@value{ipv6postfix},} @tab @trampfn{telnet,localhost,}
+@item @value{prefix}telnet@value{postfixhop}@value{ipv6prefix}::1@value{ipv6postfix}@value{postfix} @tab @trampfn{telnet,localhost,}
 @item @trampfn{telnet,melancholia.danann.net,} @tab @trampfn{telnet,melancholia,}
 @end multitable
 @end example
@@ -2913,70 +2914,13 @@ the following code in @file{~/.emacs} file.
 
 
 @item
-How to get a Visual Warning when working with @samp{root} privileges
+How to get a Visual Warning when working with @samp{root} privileges?
+Host indication in the mode line?
 
-Get a modeline indication when working with @samp{root} privileges
-with the following code (tested with Emacs 22.1) in @file{~/.emacs}
-file:
-
-@lisp
-(defun my-mode-line-function ()
-  (when (string-match "^/su\\(do\\)?:" default-directory)
-    (setq mode-line-format
-          (format-mode-line mode-line-format 'font-lock-warning-face))))
-
-(add-hook 'find-file-hook 'my-mode-line-function)
-(add-hook 'dired-mode-hook 'my-mode-line-function)
-@end lisp
-
-
-@item
-How to get host indication in the mode line?
-
-The following code (tested with Emacs 22.1) in @file{~/.emacs} file
-shows it:
-
-@lisp
-(defconst my-mode-line-buffer-identification
-  (list
-   '(:eval
-     (let ((host-name
-            (if (file-remote-p default-directory)
-                (tramp-file-name-host
-                 (tramp-dissect-file-name default-directory))
-              (system-name))))
-       (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
-           (substring host-name 0 (match-beginning 1))
-         host-name)))
-   ": %12b"))
-
-(setq-default
- mode-line-buffer-identification
- my-mode-line-buffer-identification)
-
-(add-hook
- 'dired-mode-hook
- (lambda ()
-   (setq
-    mode-line-buffer-identification
-    my-mode-line-buffer-identification)))
-@end lisp
-
-The mode line in Emacs 23.1 and later versions now contains an
-indication if @code{default-directory} for the current buffer is on a
-remote host.  Moreover, the corresponding tool-tip shows the remote
-host name.  The above @code{:eval} clause can also be simplified to
-show the host name in the mode line:
-
-@lisp
-   '(:eval
-     (let ((host-name
-            (or (file-remote-p default-directory 'host)
-                (system-name))))
-       (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
-           (substring host-name 0 (match-beginning 1))
-         host-name)))
-@end lisp
+Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager.
+Enable it via @kbd{M-x load-theme @key{RET} tramp}.  Further
+customization is explained in variable
+@code{tramp-theme-face-remapping-alist}.
 
 
 @item