;;; -*- Mode: Emacs-Lisp -*-
+;;; ILISP mode top level definitions.
;;; This file is part of ILISP.
+;;; Please refer to the file COPYING for copyrights and licensing
+;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
+;;; of present and past contributors.
-;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
-;;; 1993, 1994 Ivan Vasquez
-;;; 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
-;;; 1996-2000 Marco Antoniotti and Rick Campbell
-;;; Other authors' names for which this Copyright notice also holds
-;;; may appear later in this file.
-;;; Send mail to 'email@example.com' to be included in the
-;;; ILISP mailing list. 'firstname.lastname@example.org' is the general ILISP
-;;; mailing list were bugs and improvements are discussed.
-;;; ILISP is freely redistributable under the terms found in the file
-;;; ILISP mode top level definitions.
(ilisp-set-doc 'lisp-mode ilisp-documentation)
-(defun lisp-command-args (string)
- "Break up STRING into (command args ...)."
- (let ((len (length string))
- (while (< position len)
- (if (eq (aref string position) ?\ )
- (setq args (cons (substring string arg position) args)
- (setq position (1+ position)))
- (setq args (reverse (cons (substring string arg position) args)))
+(defun lisp-command-args (command-line)
+ "Break up COMMAND-LINE into (command args ...)"
+ for pos = (string-match "\\S-" command-line start)
+ if (char-equal (aref command-line pos) ?\")
+ collect (let ((str+end-pos (read-from-string command-line pos)))
+ (setq start (cdr str+end-pos))
+ else collect (let ((end-pos (string-match "\\s-" command-line pos)))
+ (substring command-line pos end-pos)))
+ (error (error "Invalid inferior Lisp program command line"))))
(rplaca (car comint-send-queue)
- (run-hooks 'ilisp-init-hook))))
+ (run-hooks 'ilisp-init-hook-))))
(setq ilisp-initialized (delete* ilisp-buffer ilisp-initialized
(unless (member* names ilisp-buffers :key #'car)