diff options
| author | Noah Friedman | 1996-06-20 17:30:41 +0000 |
|---|---|---|
| committer | Noah Friedman | 1996-06-20 17:30:41 +0000 |
| commit | fb7741f544e0cc7196263e08e36afcafef859482 (patch) | |
| tree | 9693a546d8d4cd4fdd9bf0da5f2de5098b635d07 | |
| parent | ca8a0685e0ebffb316d5d42658906da44d57a547 (diff) | |
| download | emacs-fb7741f544e0cc7196263e08e36afcafef859482.tar.gz emacs-fb7741f544e0cc7196263e08e36afcafef859482.zip | |
(rlogin): make comint-output-filter-functions local before adding hooks.
| -rw-r--r-- | lisp/rlogin.el | 32 |
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 @@ | |||
| 23 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 23 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 24 | ;; Boston, MA 02111-1307, USA. | 24 | ;; Boston, MA 02111-1307, USA. |
| 25 | 25 | ||
| 26 | ;; $Id: rlogin.el,v 1.32 1996/05/08 00:52:30 friedman Exp rms $ | 26 | ;; $Id: rlogin.el,v 1.33 1996/06/14 21:30:41 rms Exp friedman $ |
| 27 | 27 | ||
| 28 | ;;; Commentary: | 28 | ;;; Commentary: |
| 29 | 29 | ||
| @@ -187,7 +187,12 @@ variable." | |||
| 187 | ;; comint-output-filter-functions is just like a hook, except that the | 187 | ;; comint-output-filter-functions is just like a hook, except that the |
| 188 | ;; functions in that list are passed arguments. add-hook serves well | 188 | ;; functions in that list are passed arguments. add-hook serves well |
| 189 | ;; enough for modifying it. | 189 | ;; enough for modifying it. |
| 190 | (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter) | 190 | ;; comint-output-filter-functions should already have a |
| 191 | ;; permanent-local property, at least in emacs 19.27 or later. | ||
| 192 | (if (fboundp 'make-local-hook) | ||
| 193 | (make-local-hook 'comint-output-filter-functions) | ||
| 194 | (make-local-variable 'comint-output-filter-functions)) | ||
| 195 | (add-hook 'comint-output-filter-functions 'ftelnet-carriage-filter) | ||
| 191 | 196 | ||
| 192 | (rlogin-mode) | 197 | (rlogin-mode) |
| 193 | 198 | ||
| @@ -196,17 +201,18 @@ variable." | |||
| 196 | (make-local-variable 'rlogin-remote-user) | 201 | (make-local-variable 'rlogin-remote-user) |
| 197 | (setq rlogin-remote-user user) | 202 | (setq rlogin-remote-user user) |
| 198 | 203 | ||
| 199 | (cond | 204 | (condition-case () |
| 200 | ((eq rlogin-directory-tracking-mode t) | 205 | (cond ((eq rlogin-directory-tracking-mode t) |
| 201 | ;; Do this here, rather than calling the tracking mode function, to | 206 | ;; Do this here, rather than calling the tracking mode |
| 202 | ;; avoid a gratuitous resync check; the default should be the | 207 | ;; function, to avoid a gratuitous resync check; the default |
| 203 | ;; user's home directory, be it local or remote. | 208 | ;; should be the user's home directory, be it local or remote. |
| 204 | (setq comint-file-name-prefix | 209 | (setq comint-file-name-prefix |
| 205 | (concat "/" rlogin-remote-user "@" rlogin-host ":")) | 210 | (concat "/" rlogin-remote-user "@" rlogin-host ":")) |
| 206 | (cd-absolute comint-file-name-prefix)) | 211 | (cd-absolute comint-file-name-prefix)) |
| 207 | ((null rlogin-directory-tracking-mode)) | 212 | ((null rlogin-directory-tracking-mode)) |
| 208 | (t | 213 | (t |
| 209 | (cd-absolute (concat comint-file-name-prefix "~/")))))))) | 214 | (cd-absolute (concat comint-file-name-prefix "~/")))) |
| 215 | (error nil)))))) | ||
| 210 | 216 | ||
| 211 | (defun rlogin-mode () | 217 | (defun rlogin-mode () |
| 212 | "Set major-mode for rlogin sessions. | 218 | "Set major-mode for rlogin sessions. |