diff options
| author | Juanma Barranquero | 2006-12-05 14:20:57 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2006-12-05 14:20:57 +0000 |
| commit | 003585953efe92f4aebec06dbb50d944d4066928 (patch) | |
| tree | 24f68cb6f41a1cda112198284d4ac35500f5d516 | |
| parent | 771ff2236fe5c9806cbb78d5d345f41529d55a50 (diff) | |
| download | emacs-003585953efe92f4aebec06dbb50d944d4066928.tar.gz emacs-003585953efe92f4aebec06dbb50d944d4066928.zip | |
(run-scheme, scheme-start-file): Search the start file in ~/.emacs.d
as `init_SCHEMENAME.scm' instead.
| -rw-r--r-- | lisp/cmuscheme.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 585504172c2..3a0c73f040d 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el | |||
| @@ -244,7 +244,8 @@ Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters." | |||
| 244 | If there is a process already running in `*scheme*', switch to that buffer. | 244 | If there is a process already running in `*scheme*', switch to that buffer. |
| 245 | With argument, allows you to edit the command line (default is value | 245 | With argument, allows you to edit the command line (default is value |
| 246 | of `scheme-program-name'). | 246 | of `scheme-program-name'). |
| 247 | If a file `~/.emacs_SCHEMENAME' exists, it is given as initial input. | 247 | If the file `~/.emacs_SCHEMENAME' or `~/.emacs.d/init_SCHEMENAME.scm' exists, |
| 248 | it is given as initial input. | ||
| 248 | Note that this may lose due to a timing error if the Scheme processor | 249 | Note that this may lose due to a timing error if the Scheme processor |
| 249 | discards input when it starts up. | 250 | discards input when it starts up. |
| 250 | Runs the hook `inferior-scheme-mode-hook' \(after the `comint-mode-hook' | 251 | Runs the hook `inferior-scheme-mode-hook' \(after the `comint-mode-hook' |
| @@ -268,12 +269,12 @@ is run). | |||
| 268 | "Return the name of the start file corresponding to PROG. | 269 | "Return the name of the start file corresponding to PROG. |
| 269 | Search in the directories \"~\" and \"~/.emacs.d\", in this | 270 | Search in the directories \"~\" and \"~/.emacs.d\", in this |
| 270 | order. Return nil if no start file found." | 271 | order. Return nil if no start file found." |
| 271 | (let* ((name (concat ".emacs_" (file-name-nondirectory prog))) | 272 | (let ((progname (file-name-nondirectory prog)) |
| 272 | (start-file (concat "~/" name))) | 273 | (start-file (concat "~/.emacs_" progname)) |
| 274 | (alt-start-file (concat "~/.emacs.d/init_" progname ".scm"))) | ||
| 273 | (if (file-exists-p start-file) | 275 | (if (file-exists-p start-file) |
| 274 | start-file | 276 | start-file |
| 275 | (let ((start-file (concat "~/.emacs.d/" name))) | 277 | (and (file-exists-p alt-start-file) alt-start-file)))) |
| 276 | (and (file-exists-p start-file) start-file))))) | ||
| 277 | 278 | ||
| 278 | (defun scheme-send-region (start end) | 279 | (defun scheme-send-region (start end) |
| 279 | "Send the current region to the inferior Scheme process." | 280 | "Send the current region to the inferior Scheme process." |