changeset 43915:47fa5e2f85ab

(rlogin-mode): Use `define-derived-mode'.
author Miles Bader <miles@gnu.org>
date Thu, 14 Mar 2002 11:51:47 +0000
parents fed15ed090bc
children d35cb87e616a
files lisp/net/rlogin.el
diffstat 1 files changed, 3 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/rlogin.el	Thu Mar 14 09:13:28 2002 +0000
+++ b/lisp/net/rlogin.el	Thu Mar 14 11:51:47 2002 +0000
@@ -6,7 +6,7 @@
 ;; Maintainer: Noah Friedman <friedman@splode.com>
 ;; Keywords: unix, comm
 
-;; $Id: rlogin.el,v 1.1 2000/03/20 12:52:39 gerd Exp $
+;; $Id: rlogin.el,v 1.2 2002/03/14 08:51:43 miles Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -229,18 +229,9 @@
 
 (put 'rlogin-mode 'mode-class 'special)
 
-(defun rlogin-mode ()
-  "Set major-mode for rlogin sessions.
-If `rlogin-mode-hook' is set, run it."
-  (interactive)
-  (kill-all-local-variables)
-  (shell-mode)
-  (setq major-mode 'rlogin-mode)
-  (setq mode-name "rlogin")
-  (use-local-map rlogin-mode-map)
+(define-derived-mode rlogin-mode shell-mode "Rlogin"
   (setq shell-dirtrackp rlogin-directory-tracking-mode)
-  (make-local-variable 'comint-file-name-prefix)
-  (run-hooks 'rlogin-mode-hook))
+  (make-local-variable 'comint-file-name-prefix))
 
 (defun rlogin-directory-tracking-mode (&optional prefix)
   "Do remote or local directory tracking, or disable entirely.