summaryrefslogtreecommitdiff
path: root/lisp/rlogin.el
diff options
context:
space:
mode:
authorNoah Friedman <friedman@splode.com>1996-06-20 17:30:41 +0000
committerNoah Friedman <friedman@splode.com>1996-06-20 17:30:41 +0000
commit1d16e70ebb94b9b95973e406199c5cd566b4a661 (patch)
treea5ab740b63a5c27f98d6e24bc27da1451ba714e9 /lisp/rlogin.el
parentee40e10c3eec4797614dfdd7341d12d39bd66d2e (diff)
downloademacs-1d16e70ebb94b9b95973e406199c5cd566b4a661.tar.gz
(rlogin): make comint-output-filter-functions local before adding hooks.
Diffstat (limited to 'lisp/rlogin.el')
-rw-r--r--lisp/rlogin.el32
1 files changed, 19 insertions, 13 deletions
diff --git a/lisp/rlogin.el b/lisp/rlogin.el
index dace9412e29..f6053abe28d 100644
--- a/lisp/rlogin.el
+++ b/lisp/rlogin.el
@@ -23,7 +23,7 @@
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-;; $Id: rlogin.el,v 1.32 1996/05/08 00:52:30 friedman Exp rms $
+;; $Id: rlogin.el,v 1.33 1996/06/14 21:30:41 rms Exp friedman $
;;; Commentary:
@@ -187,7 +187,12 @@ variable."
;; comint-output-filter-functions is just like a hook, except that the
;; functions in that list are passed arguments. add-hook serves well
;; enough for modifying it.
- (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter)
+ ;; comint-output-filter-functions should already have a
+ ;; permanent-local property, at least in emacs 19.27 or later.
+ (if (fboundp 'make-local-hook)
+ (make-local-hook 'comint-output-filter-functions)
+ (make-local-variable 'comint-output-filter-functions))
+ (add-hook 'comint-output-filter-functions 'ftelnet-carriage-filter)
(rlogin-mode)
@@ -196,17 +201,18 @@ variable."
(make-local-variable 'rlogin-remote-user)
(setq rlogin-remote-user user)
- (cond
- ((eq rlogin-directory-tracking-mode t)
- ;; Do this here, rather than calling the tracking mode function, to
- ;; avoid a gratuitous resync check; the default should be the
- ;; user's home directory, be it local or remote.
- (setq comint-file-name-prefix
- (concat "/" rlogin-remote-user "@" rlogin-host ":"))
- (cd-absolute comint-file-name-prefix))
- ((null rlogin-directory-tracking-mode))
- (t
- (cd-absolute (concat comint-file-name-prefix "~/"))))))))
+ (condition-case ()
+ (cond ((eq rlogin-directory-tracking-mode t)
+ ;; Do this here, rather than calling the tracking mode
+ ;; function, to avoid a gratuitous resync check; the default
+ ;; should be the user's home directory, be it local or remote.
+ (setq comint-file-name-prefix
+ (concat "/" rlogin-remote-user "@" rlogin-host ":"))
+ (cd-absolute comint-file-name-prefix))
+ ((null rlogin-directory-tracking-mode))
+ (t
+ (cd-absolute (concat comint-file-name-prefix "~/"))))
+ (error nil))))))
(defun rlogin-mode ()
"Set major-mode for rlogin sessions.