Mercurial > emacs
annotate lisp/net/tramp-util.el @ 70259:58edc69a1813
(grep-read-files): Use buffer-name if no buffer-file-name.
Default to *.ext if no alias matches.
No default if no extension.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 28 Apr 2006 23:39:02 +0000 |
parents | 118ceefc8263 |
children | e3694f1cb928 5b7d410e31f9 |
rev | line source |
---|---|
51603
978e262c8f3a
Version 2.0.35 of Tramp released.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
48973
diff
changeset
|
1 ;;; -*- coding: iso-2022-7bit; -*- |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
2 ;;; tramp-util.el --- Misc utility functions to use with Tramp |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
3 |
68335
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
4 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
5 ;; 2006 Free Software Foundation, Inc. |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
6 |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
7 ;; Author: kai.grossjohann@gmx.net |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
8 ;; Keywords: comm, extensions, processes |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
9 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
10 ;; This file is free software; you can redistribute it and/or modify |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
11 ;; it under the terms of the GNU General Public License as published by |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
12 ;; the Free Software Foundation; either version 2, or (at your option) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
13 ;; any later version. |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
14 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
15 ;; This file is distributed in the hope that it will be useful, |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
18 ;; GNU General Public License for more details. |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
19 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to |
64085 | 22 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 ;; Boston, MA 02110-1301, USA. | |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
24 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
25 ;;; Commentary: |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
26 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
27 ;; Some misc. utility functions that might go nicely with Tramp. |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
28 ;; Mostly, these are kluges awaiting real solutions later on. |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
29 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
30 ;;; Code: |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
31 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
32 (eval-when-compile (require 'cl)) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
33 (require 'compile) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
34 (require 'tramp) |
68335
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
35 (add-hook 'tramp-util-unload-hook |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
36 '(lambda () |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
37 (when (featurep 'tramp) |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
38 (unload-feature 'tramp 'force)))) |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
39 |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
40 ;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
41 ;; specific functions, like compilation. |
60763
3ba8f94e9cfa
Sync with Tramp 2.0.48.
Michael Albinus <michael.albinus@gmx.de>
parents:
59996
diff
changeset
|
42 ;; The key remapping works since Emacs 22 only. Unknown for XEmacs. |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
43 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
44 ;; Pacify byte-compiler |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
45 (eval-when-compile |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
46 (unless (fboundp 'define-minor-mode) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
47 (defalias 'define-minor-mode 'identity) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
48 (defvar tramp-minor-mode)) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
49 (unless (featurep 'xemacs) |
68335
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
50 (defalias 'add-menu-button 'ignore))) |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
51 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
52 (defvar tramp-minor-mode-map (make-sparse-keymap) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
53 "Keymap for Tramp minor mode.") |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
54 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
55 (define-minor-mode tramp-minor-mode "Tramp minor mode for utility functions." |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
56 :group 'tramp |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
57 :global nil |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
58 :init-value nil |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
59 :lighter " Tramp" |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
60 :keymap tramp-minor-mode-map |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
61 (setq tramp-minor-mode |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
62 (and tramp-minor-mode (tramp-tramp-file-p default-directory)))) |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
63 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
64 (add-hook 'find-file-hooks 'tramp-minor-mode t) |
68335
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
65 (add-hook 'tramp-util-unload-hook |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
66 '(lambda () |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
67 (remove-hook 'find-file-hooks 'tramp-minor-mode))) |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
68 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
69 (add-hook 'dired-mode-hook 'tramp-minor-mode t) |
68335
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
70 (add-hook 'tramp-util-unload-hook |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
71 '(lambda () |
118ceefc8263
Sync with Tramp 2.0.52.
Michael Albinus <michael.albinus@gmx.de>
parents:
66850
diff
changeset
|
72 (remove-hook 'dired-mode-hook 'tramp-minor-mode))) |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
73 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
74 (defun tramp-remap-command (old-command new-command) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
75 "Replaces bindings of OLD-COMMAND by NEW-COMMAND. |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
76 If remapping functionality for keymaps is defined, this happens for all |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
77 bindings. Otherwise, only bindings active during invocation are taken |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
78 into account. XEmacs menubar bindings are not changed by this." |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
79 (if (functionp 'command-remapping) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
80 ;; Emacs 22 |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
81 (eval |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
82 `(define-key tramp-minor-mode-map [remap ,old-command] new-command)) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
83 ;; previous Emacs versions. |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
84 (mapcar |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
85 '(lambda (x) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
86 (define-key tramp-minor-mode-map x new-command)) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
87 (where-is-internal old-command)))) |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
88 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
89 (tramp-remap-command 'compile 'tramp-compile) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
90 (tramp-remap-command 'recompile 'tramp-recompile) |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
91 |
66850
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
92 ;; XEmacs has an own mimic for menu entries |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
93 (when (fboundp 'add-menu-button) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
94 (funcall 'add-menu-button |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
95 '("Tools" "Compile") |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
96 ["Compile..." |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
97 (command-execute (if tramp-minor-mode 'tramp-compile 'compile)) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
98 :active (fboundp 'compile)]) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
99 (funcall 'add-menu-button |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
100 '("Tools" "Compile") |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
101 ["Repeat Compilation" |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
102 (command-execute (if tramp-minor-mode 'tramp-recompile 'recompile)) |
abf023447afb
* net/tramp-util.el (top): Fix compilation warning.
Michael Albinus <michael.albinus@gmx.de>
parents:
64085
diff
changeset
|
103 :active (fboundp 'compile)])) |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
104 |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
105 ;; Utility functions. |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
106 |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
107 (defun tramp-compile (command) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
108 "Compile on remote host." |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
109 (interactive |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
110 (if (or compilation-read-command current-prefix-arg) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
111 (list (read-from-minibuffer "Compile command: " |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
112 compile-command nil nil |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
113 '(compile-history . 1))) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
114 (list compile-command))) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
115 (setq compile-command command) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
116 (save-some-buffers (not compilation-ask-about-save) nil) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
117 (let ((d default-directory)) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
118 (save-excursion |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
119 (pop-to-buffer (get-buffer-create "*Compilation*") t) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
120 (erase-buffer) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
121 (setq default-directory d))) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
122 (tramp-handle-shell-command command (get-buffer "*Compilation*")) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
123 (pop-to-buffer (get-buffer "*Compilation*")) |
59582
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
124 (tramp-minor-mode 1) |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
125 (compilation-minor-mode 1)) |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
126 |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
127 (defun tramp-recompile () |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
128 "Re-compile on remote host." |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
129 (interactive) |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
130 (save-some-buffers (not compilation-ask-about-save) nil) |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
131 (tramp-handle-shell-command compile-command (get-buffer "*Compilation*")) |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
132 (pop-to-buffer (get-buffer "*Compilation*")) |
92796330257a
Sync with Tramp 2.0.47.
Michael Albinus <michael.albinus@gmx.de>
parents:
52401
diff
changeset
|
133 (tramp-minor-mode 1) |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
134 (compilation-minor-mode 1)) |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
135 |
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
136 (provide 'tramp-util) |
52401 | 137 |
138 ;;; arch-tag: 500f9992-a44e-46d0-83a7-980799251808 | |
48973
09acf3f65bb5
* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
diff
changeset
|
139 ;;; tramp-util.el ends here |