]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/inf-lisp.el
Convert consecutive FSF copyright years to ranges.
[gnu-emacs] / lisp / progmodes / inf-lisp.el
index 41ce378e96647557ed52532a4f06c4f9ecf62fa3..5391c8d90918df95696117e3d6c65deab37f023f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; inf-lisp.el --- an inferior-lisp mode
 
-;; Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 1988, 1993-1994, 2001-2011
 ;; Free Software Foundation, Inc.
 
 ;; Author: Olin Shivers <shivers@cs.cmu.edu>
@@ -216,7 +216,7 @@ buffer with \\[set-variable].")
 
 (put 'inferior-lisp-mode 'mode-class 'special)
 
-(defun inferior-lisp-mode ()
+(define-derived-mode inferior-lisp-mode comint-mode "Inferior Lisp"
   "Major mode for interacting with an inferior Lisp process.
 Runs a Lisp interpreter as a subprocess of Emacs, with Lisp I/O through an
 Emacs buffer.  Variable `inferior-lisp-program' controls which Lisp interpreter
@@ -263,18 +263,11 @@ If `comint-use-prompt-regexp' is nil (the default), \\[comint-insert-input] on o
 Paragraphs are separated only by blank lines.  Semicolons start comments.
 If you accidentally suspend your process, use \\[comint-continue-subjob]
 to continue it."
-  (interactive)
-  (delay-mode-hooks
-    (comint-mode))
   (setq comint-prompt-regexp inferior-lisp-prompt)
-  (setq major-mode 'inferior-lisp-mode)
-  (setq mode-name "Inferior Lisp")
   (setq mode-line-process '(":%s"))
   (lisp-mode-variables t)
-  (use-local-map inferior-lisp-mode-map)    ;c-c c-k for "kompile" file
   (setq comint-get-old-input (function lisp-get-old-input))
-  (setq comint-input-filter (function lisp-input-filter))
-  (run-mode-hooks 'inferior-lisp-mode-hook))
+  (setq comint-input-filter (function lisp-input-filter)))
 
 (defun lisp-get-old-input ()
   "Return a string containing the sexp ending at point."
@@ -600,7 +593,7 @@ See variable `lisp-describe-sym-command'."
 ;;  "Returns the current inferior Lisp process.
 ;; See variable `inferior-lisp-buffer'."
 (defun inferior-lisp-proc ()
-  (let ((proc (get-buffer-process (if (eq major-mode 'inferior-lisp-mode)
+  (let ((proc (get-buffer-process (if (derived-mode-p 'inferior-lisp-mode)
                                      (current-buffer)
                                    inferior-lisp-buffer))))
     (or proc
@@ -660,5 +653,4 @@ See variable `lisp-describe-sym-command'."
 
 (provide 'inf-lisp)
 
-;; arch-tag: 5b74abc3-a085-4b91-8ab8-8da6899d3b92
 ;;; inf-lisp.el ends here