2007-03-27 Mike Sperber <mike(a)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\...".
Index: cmuscheme.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/scheme/cmuscheme.el,v
retrieving revision 1.3
diff -u -c -r1.3 cmuscheme.el
*** cmuscheme.el 9 Jul 1999 07:51:02 -0000 1.3
--- cmuscheme.el 27 Mar 2007 10:03:31 -0000
***************
*** 182,192 ****
(scheme-args-to-list (substring string pos
(length string)))))))))
(defvar scheme-program-name "scheme"
"*Program invoked by the run-scheme command")
;;; *don't* ;;;###autoload in XEmacs, since xscheme.el is our default.
! (defun run-scheme (cmd)
"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
--- 182,205 ----
(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 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,208 ****
(interactive (list (if current-prefix-arg
(read-string "Run Scheme: " scheme-program-name)
! scheme-program-name)))
(if (not (comint-check-proc "*scheme*"))
! (let ((cmdlist (scheme-args-to-list cmd)))
! (set-buffer (apply 'make-comint "scheme" (car cmdlist)
! nil (cdr cmdlist)))
(inferior-scheme-mode)))
(setq scheme-program-name cmd)
(setq scheme-buffer "*scheme*")
(pop-to-buffer "*scheme*"))
;;; *don't* ;;;###autoload (add-hook 'same-window-buffer-names
"*scheme*")
--- 209,227 ----
(interactive (list (if current-prefix-arg
(read-string "Run Scheme: " 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*"))
! (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*")
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches