Mercurial > emacs
comparison lisp/rlogin.el @ 23237:72418dac2378
(rlogin): If using make-local-hook, pass the 4th arg t to add-hook also to
modify the new local value.
author | Noah Friedman <friedman@splode.com> |
---|---|
date | Fri, 11 Sep 1998 01:22:53 +0000 |
parents | aaf6b0301b95 |
children | e2d1e6562433 |
comparison
equal
deleted
inserted
replaced
23236:d8013246bf0d | 23237:72418dac2378 |
---|---|
1 ;;; rlogin.el --- remote login interface | 1 ;;; rlogin.el --- remote login interface |
2 | 2 |
3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992-1995, 1997, 1998 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Noah Friedman | 5 ;; Author: Noah Friedman |
6 ;; Maintainer: Noah Friedman <friedman@prep.ai.mit.edu> | 6 ;; Maintainer: Noah Friedman <friedman@splode.com> |
7 ;; Keywords: unix, comm | 7 ;; Keywords: unix, comm |
8 | 8 |
9 ;; $Id: rlogin.el,v 1.41 1998/03/14 04:46:55 rms Exp $ | 9 ;; $Id: rlogin.el,v 1.42 1998/06/24 09:23:00 schwab Exp $ |
10 | 10 |
11 ;; This file is part of GNU Emacs. | 11 ;; This file is part of GNU Emacs. |
12 | 12 |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | 13 ;; GNU Emacs is free software; you can redistribute it and/or modify |
14 ;; it under the terms of the GNU General Public License as published by | 14 ;; it under the terms of the GNU General Public License as published by |
44 | 44 |
45 (defgroup rlogin nil | 45 (defgroup rlogin nil |
46 "Remote login interface" | 46 "Remote login interface" |
47 :group 'processes | 47 :group 'processes |
48 :group 'unix) | 48 :group 'unix) |
49 | |
50 | 49 |
51 (defcustom rlogin-program "rlogin" | 50 (defcustom rlogin-program "rlogin" |
52 "*Name of program to invoke rlogin" | 51 "*Name of program to invoke rlogin" |
53 :type 'string | 52 :type 'string |
54 :group 'rlogin) | 53 :group 'rlogin) |
213 (setq proc (get-buffer-process buffer)) | 212 (setq proc (get-buffer-process buffer)) |
214 ;; Set process-mark to point-max in case there is text in the | 213 ;; Set process-mark to point-max in case there is text in the |
215 ;; buffer from a previous exited process. | 214 ;; buffer from a previous exited process. |
216 (set-marker (process-mark proc) (point-max)) | 215 (set-marker (process-mark proc) (point-max)) |
217 | 216 |
218 ;; comint-output-filter-functions is just like a hook, except that the | 217 ;; comint-output-filter-functions is treated like a hook: it is |
219 ;; functions in that list are passed arguments. add-hook serves well | 218 ;; processed via run-hooks or run-hooks-with-args in later versions |
220 ;; enough for modifying it. | 219 ;; of emacs. |
221 ;; comint-output-filter-functions should already have a | 220 ;; comint-output-filter-functions should already have a |
222 ;; permanent-local property, at least in emacs 19.27 or later. | 221 ;; permanent-local property, at least in emacs 19.27 or later. |
223 (if (fboundp 'make-local-hook) | 222 (cond |
224 (make-local-hook 'comint-output-filter-functions) | 223 ((fboundp 'make-local-hook) |
225 (make-local-variable 'comint-output-filter-functions)) | 224 (make-local-hook 'comint-output-filter-functions) |
226 (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter) | 225 (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter |
226 nil t)) | |
227 (t | |
228 (make-local-variable 'comint-output-filter-functions) | |
229 (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter))) | |
227 | 230 |
228 (rlogin-mode) | 231 (rlogin-mode) |
229 | 232 |
230 (make-local-variable 'rlogin-host) | 233 (make-local-variable 'rlogin-host) |
231 (setq rlogin-host host) | 234 (setq rlogin-host host) |