CVS update by michaels packages/xemacs-packages/scheme ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Tue Mar 27 06:03:42 EDT 2007
User: michaels
Date: 07/03/27 12:03:42
Modified: packages/xemacs-packages/scheme ChangeLog cmuscheme.el
Log:
2007-03-27 Mike Sperber <mike at xemacs.org>
* cmuscheme.el (scheme-program-args): Add.
* cmuscheme.el (run-scheme): Ask for the name of the Scheme
program and its arguments separately. Otherwise, we prevent
Windows users from using file names with spaces in them, such as
"c:\Program Files\...".
Revision Changes Path
1.16 +8 -0 XEmacs/packages/xemacs-packages/scheme/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/scheme/ChangeLog,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- ChangeLog 2003/10/28 10:43:57 1.15
+++ ChangeLog 2007/03/27 10:03:40 1.16
@@ -1,3 +1,11 @@
+2007-03-27 Mike Sperber <mike at xemacs.org>
+
+ * cmuscheme.el (scheme-program-args): Add.
+ * cmuscheme.el (run-scheme): Ask for the name of the Scheme
+ program and its arguments separately. Otherwise, we prevent
+ Windows users from using file names with spaces in them, such as
+ "c:\Program Files\...".
+
2003-10-28 Norbert Koch <viteno at xemacs.org>
* Makefile (VERSION): XEmacs package 1.14 released.
1.4 +24 -5 XEmacs/packages/xemacs-packages/scheme/cmuscheme.el
Index: cmuscheme.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/scheme/cmuscheme.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- cmuscheme.el 1999/07/09 07:51:02 1.3
+++ cmuscheme.el 2007/03/27 10:03:40 1.4
@@ -182,11 +182,24 @@ Defaults to a regexp ignoring all inputs
(scheme-args-to-list (substring string pos
(length string)))))))))
+(defun scheme-list-to-args (args)
+ (let* ((str (apply #'concat
+ (mapcar #'(lambda (arg)
+ (concat " " arg))
+ args)))
+ (l (length str)))
+ (if (zerop l)
+ str
+ (substring str 1 (length str)))))
+
(defvar scheme-program-name "scheme"
"*Program invoked by the run-scheme command")
+(defvar scheme-program-args nil
+ "*Command-line arguments to `scheme-program-name'.")
+
;;; *don't* ;;;###autoload in XEmacs, since xscheme.el is our default.
-(defun run-scheme (cmd)
+(defun run-scheme (cmd args)
"Run an inferior Scheme process, input and output via buffer *scheme*.
If there is a process already running in `*scheme*', switch to that buffer.
With argument, allows you to edit the command line (default is value
@@ -196,13 +209,19 @@ of `scheme-program-name'). Runs the hoo
(interactive (list (if current-prefix-arg
(read-string "Run Scheme: " scheme-program-name)
- scheme-program-name)))
+ scheme-program-name)
+ (scheme-args-to-list
+ (if current-prefix-arg
+ (read-string "Command-line arguments: "
+ (scheme-list-to-args scheme-program-args))
+ scheme-program-args))))
(if (not (comint-check-proc "*scheme*"))
- (let ((cmdlist (scheme-args-to-list cmd)))
- (set-buffer (apply 'make-comint "scheme" (car cmdlist)
- nil (cdr cmdlist)))
+ (progn
+ (set-buffer (apply 'make-comint "scheme" cmd
+ nil args))
(inferior-scheme-mode)))
(setq scheme-program-name cmd)
+ (setq scheme-program-args args)
(setq scheme-buffer "*scheme*")
(pop-to-buffer "*scheme*"))
;;; *don't* ;;;###autoload (add-hook 'same-window-buffer-names "*scheme*")
More information about the XEmacs-CVS
mailing list