aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-05-29 20:22:45 -0700
committerGlenn Morris2013-05-29 20:22:45 -0700
commitceca95b18eea3d3be1ac46df15b98ad846eaa770 (patch)
tree26299637739b7cdfb56839386b87ecee8c6efe0f
parentee9f1acc30541c2d8790e22826c2bfd3e1e9a132 (diff)
downloademacs-ceca95b18eea3d3be1ac46df15b98ad846eaa770.tar.gz
emacs-ceca95b18eea3d3be1ac46df15b98ad846eaa770.zip
rlogin.el tiny cleanup
* net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh. (rlogin-process-connection-type): Tweak default. Add set-after. (rlogin-host): Doc fix. (rlogin): Tweak prompt. (rlogin-tab-or-complete): Use completion-at-point rather than alias.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/rlogin.el27
2 files changed, 25 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 03204c92df5..7c702f0aa4b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12013-05-30 Glenn Morris <rgm@gnu.org> 12013-05-30 Glenn Morris <rgm@gnu.org>
2 2
3 * net/rlogin.el (rlogin-program, rlogin-explicit-args): Default to ssh.
4 (rlogin-process-connection-type): Tweak default. Add set-after.
5 (rlogin-host): Doc fix.
6 (rlogin): Tweak prompt.
7 (rlogin-tab-or-complete): Use completion-at-point rather than alias.
8
3 * net/net-utils.el (nslookup-mode-map, ftp-mode-map): 9 * net/net-utils.el (nslookup-mode-map, ftp-mode-map):
4 * progmodes/tcl.el (inferior-tcl-mode-map): 10 * progmodes/tcl.el (inferior-tcl-mode-map):
5 Use completion-at-point rather than obsolete alias. 11 Use completion-at-point rather than obsolete alias.
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index 9ad79d694f8..e8d13254557 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -36,6 +36,11 @@
36 36
37;;; Code: 37;;; Code:
38 38
39;; FIXME?
40;; Maybe this file should be obsolete.
41;; http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00517.html
42;; It only adds rlogin-directory-tracking-mode. Is that useful?
43
39(require 'comint) 44(require 'comint)
40(require 'shell) 45(require 'shell)
41 46
@@ -44,13 +49,15 @@
44 :group 'processes 49 :group 'processes
45 :group 'unix) 50 :group 'unix)
46 51
47(defcustom rlogin-program "rlogin" 52(defcustom rlogin-program "ssh"
48 "Name of program to invoke rlogin" 53 "Name of program to invoke remote login."
54 :version "24.4" ; rlogin -> ssh
49 :type 'string 55 :type 'string
50 :group 'rlogin) 56 :group 'rlogin)
51 57
52(defcustom rlogin-explicit-args nil 58(defcustom rlogin-explicit-args '("-t" "-t")
53 "List of arguments to pass to rlogin on the command line." 59 "List of arguments to pass to `rlogin-program' on the command line."
60 :version "24.4" ; nil -> -t -t
54 :type '(repeat (string :tag "Argument")) 61 :type '(repeat (string :tag "Argument"))
55 :group 'rlogin) 62 :group 'rlogin)
56 63
@@ -62,13 +69,15 @@
62(defcustom rlogin-process-connection-type 69(defcustom rlogin-process-connection-type
63 ;; Solaris 2.x `rlogin' will spew a bunch of ioctl error messages if 70 ;; Solaris 2.x `rlogin' will spew a bunch of ioctl error messages if
64 ;; stdin isn't a tty. 71 ;; stdin isn't a tty.
65 (and (string-match-p "-solaris2" system-configuration) t) 72 (and (string-match "rlogin" rlogin-program)
73 (string-match-p "-solaris2" system-configuration) t)
66 "If non-nil, use a pty for the local rlogin process. 74 "If non-nil, use a pty for the local rlogin process.
67If nil, use a pipe (if pipes are supported on the local system). 75If nil, use a pipe (if pipes are supported on the local system).
68 76
69Generally it is better not to waste ptys on systems which have a static 77Generally it is better not to waste ptys on systems which have a static
70number of them. On the other hand, some implementations of `rlogin' assume 78number of them. On the other hand, some implementations of `rlogin' assume
71a pty is being used, and errors will result from using a pipe instead." 79a pty is being used, and errors will result from using a pipe instead."
80 :set-after '(rlogin-program)
72 :type '(choice (const :tag "pipes" nil) 81 :type '(choice (const :tag "pipes" nil)
73 (other :tag "ptys" t)) 82 (other :tag "ptys" t))
74 :group 'rlogin) 83 :group 'rlogin)
@@ -98,7 +107,7 @@ re-synching of directories."
98(make-variable-buffer-local 'rlogin-directory-tracking-mode) 107(make-variable-buffer-local 'rlogin-directory-tracking-mode)
99 108
100(defcustom rlogin-host nil 109(defcustom rlogin-host nil
101 "The name of the remote host. This variable is buffer-local." 110 "The name of the default remote host. This variable is buffer-local."
102 :type '(choice (const nil) string) 111 :type '(choice (const nil) string)
103 :group 'rlogin) 112 :group 'rlogin)
104 113
@@ -165,7 +174,9 @@ If you wish to change directory tracking styles during a session, use the
165function `rlogin-directory-tracking-mode' rather than simply setting the 174function `rlogin-directory-tracking-mode' rather than simply setting the
166variable." 175variable."
167 (interactive (list 176 (interactive (list
168 (read-from-minibuffer "rlogin arguments (hostname first): " 177 (read-from-minibuffer (format
178 "Arguments for `%s' (hostname first): "
179 (file-name-nondirectory rlogin-program))
169 nil nil nil 'rlogin-history) 180 nil nil nil 'rlogin-history)
170 current-prefix-arg)) 181 current-prefix-arg))
171 (let* ((process-connection-type rlogin-process-connection-type) 182 (let* ((process-connection-type rlogin-process-connection-type)
@@ -297,7 +308,7 @@ local one share the same directories (e.g. through NFS)."
297 "Complete file name if doing directory tracking, or just insert TAB." 308 "Complete file name if doing directory tracking, or just insert TAB."
298 (interactive) 309 (interactive)
299 (if rlogin-directory-tracking-mode 310 (if rlogin-directory-tracking-mode
300 (comint-dynamic-complete) 311 (completion-at-point)
301 (insert "\C-i"))) 312 (insert "\C-i")))
302 313
303(provide 'rlogin) 314(provide 'rlogin)