1. xemacs
  2. os-utils

Source

os-utils / ssh.el

Diff from to

File ssh.el

  • Ignore whitespace
 ;;; ssh.el --- remote login interface
 
-;; Copyright (C) 1996, 1997 Noah S. Friedman
+;; Copyright (C) 1996, 1997, 1998 Noah S. Friedman
 
-;; Author: Noah Friedman <friedman@prep.ai.mit.edu>
-;; Maintainer: friedman@prep.ai.mit.edu
+;; Author: Noah Friedman <friedman@splode.com>
+;; Maintainer: friedman@splode.com
 ;; Keywords: unix, comm
 ;; Created: 1996-07-03
 
       ;; buffer from a previous exited process.
       (set-marker (process-mark proc) (point-max))
 
-      ;; 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.
+      ;; comint-output-filter-functions is treated like a hook: it is
+      ;; processed via run-hooks or run-hooks-with-args in later versions
+      ;; of emacs.
       ;; 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 'ssh-carriage-filter)
+      (cond
+       ((fboundp 'make-local-hook)
+        (make-local-hook 'comint-output-filter-functions)
+        (add-hook 'comint-output-filter-functions 'ssh-carriage-filter nil t))
+       (t
+        (make-local-variable 'comint-output-filter-functions)
+        (add-hook 'comint-output-filter-functions 'ssh-carriage-filter)))
 
       (ssh-mode)
 
       (comint-dynamic-complete)
     (insert "\C-i")))
 
+(provide 'ssh)
+
 ;;; ssh.el ends here