1 ;;; tramp-util.el --- Misc utility functions to use with Tramp
3 ;; Copyright (C) 2001 Free Software Foundation, Inc.
5 ;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
6 ;; Keywords: comm, extensions, processes
8 ;; This file is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; This file is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU Emacs; see the file COPYING. If not, write to
20 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 ;; Boston, MA 02111-1307, USA.
25 ;; Some misc. utility functions that might go nicely with Tramp.
26 ;; Mostly, these are kluges awaiting real solutions later on.
30 (eval-when-compile (require 'cl
))
34 (defun tramp-compile (command)
35 "Compile on remote host."
37 (if (or compilation-read-command current-prefix-arg
)
38 (list (read-from-minibuffer "Compile command: "
39 compile-command nil nil
40 '(compile-history .
1)))
41 (list compile-command
)))
42 (setq compile-command command
)
43 (save-some-buffers (not compilation-ask-about-save
) nil
)
44 (let ((d default-directory
))
46 (pop-to-buffer (get-buffer-create "*Compilation*") t
)
48 (setq default-directory d
)))
49 (tramp-handle-shell-command command
(get-buffer "*Compilation*"))
50 (pop-to-buffer (get-buffer "*Compilation*"))
51 (compilation-minor-mode 1))
54 ;;; tramp-util.el ends here