I have set the emacs scratch to open in scheme-mode, I am running xscheme which means that when I run the command M-x run-scheme I can use the scratch buffer to evaluate scheme and not elisp.

;;(setq initial-scratch-message "")
(setq initial-major-mode 'scheme-mode)
(require 'xscheme)

;;(add-hook '**CAN I ADD A HOOK HERE?**-hook
;;    (lambda ()
;;      (run-scheme)))

I would like to automatically run-scheme on startup instead of having to type it in, but my attempts so far have not got me fo far.

Am I going in the right direction?

share|improve this question
    
Does it work to simply put (run-scheme) at the top level of your .emacs? – Jon O. May 9 '13 at 10:50
    
@JonO It thows an error and has trouble opening the init file. – beoliver May 9 '13 at 10:55
up vote 2 down vote accepted

Completely un-tested:

(add-hook 'after-init-hook 'my-scratch-run-scheme)
(defun my-scratch-run-scheme ()
  (with-current-buffer "*scratch*"
    (run-scheme))) ;; or perhaps (call-interactively 'run-scheme)
share|improve this answer
    
Thats the ticket! -- call-interactively. – beoliver May 9 '13 at 11:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.