[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 466fc43: Reference `tramp-theme' in GNU ELPA.
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 466fc43: Reference `tramp-theme' in GNU ELPA. |
Date: |
Thu, 18 Feb 2016 12:58:53 +0000 |
branch: master
commit 466fc43182d1677c107856d4752ef4b6812baefe
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Reference `tramp-theme' in GNU ELPA.
* doc/misc/tramp.texi (Frequently Asked Questions):
Reference `tramp-theme' in GNU ELPA.
---
doc/misc/tramp.texi | 69 ++++----------------------------------------------
1 files changed, 6 insertions(+), 63 deletions(-)
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 294a3a9..0eb7334 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2913,70 +2913,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:
-
address@hidden
-(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)
address@hidden lisp
-
-
address@hidden
-How to get host indication in the mode line?
-
-The following code (tested with Emacs 22.1) in @file{~/.emacs} file
-shows it:
-
address@hidden
-(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)))
address@hidden 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:
-
address@hidden
- '(: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)))
address@hidden 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
address@hidden
@item
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 466fc43: Reference `tramp-theme' in GNU ELPA.,
Michael Albinus <=