emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mode-line with Tramp


From: Michael Albinus
Subject: Re: mode-line with Tramp
Date: Sun, 15 Jul 2007 11:20:33 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

Nick Roberts <address@hidden> writes:

> I don't know what typical use is but I was thinking about the occasional user
> who connects to just one other machine.  Perhap there could be a variable like
> "tramp-mode-line" with values 'none, 'minimal, and 'full to give differing
> levels of detail, where the default would be minimal.  This would alert new
> users to remote buffers.  Those using dozens of remote machines in parallel
> would surely know about such a veriable to change it's value.

What about this:

(defvar tramp-minor-mode-map (make-sparse-keymap)
  "Keymap for Tramp minor mode.")

(define-minor-mode tramp-minor-mode "Tramp minor mode."
  :group 'tramp
  :global nil
  :init-value nil
  :lighter " Tramp"
  :keymap tramp-minor-mode-map
  (setq tramp-minor-mode
        (and tramp-minor-mode (tramp-tramp-file-p default-directory))))

(add-hook 'find-file-hooks 'tramp-minor-mode t)

Best regards, Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]