diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-02-03 22:33:45 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-02-03 22:33:45 +0100 |
commit | 57f8ffc4072fddd98ee8d94185497bf2798e48e2 (patch) | |
tree | 2f5d5a8f6f5ace33ec0585a10e2b3cab89a2fa69 /elisp | |
parent | dc6d0ed07581f54ee97b9f8006aca85133c531ac (diff) | |
download | geiser-57f8ffc4072fddd98ee8d94185497bf2798e48e2.tar.gz geiser-57f8ffc4072fddd98ee8d94185497bf2798e48e2.tar.bz2 |
New geiser-add-to-load-path, just for Guile right now
As per Andy's request. Adding it to Racket (and to the user manual),
shouldn't be difficult).
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-compile.el | 10 | ||||
-rw-r--r-- | elisp/geiser-mode.el | 3 | ||||
-rw-r--r-- | elisp/geiser-repl.el | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/elisp/geiser-compile.el b/elisp/geiser-compile.el index bc9aace..911de05 100644 --- a/elisp/geiser-compile.el +++ b/elisp/geiser-compile.el @@ -1,6 +1,6 @@ ;; geiser-compile.el -- compile/load scheme files -;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -67,6 +67,14 @@ (interactive) (geiser-load-file (buffer-file-name (current-buffer)))) +(defun geiser-add-to-load-path (path) + "Add a new directory to running Scheme's load path. +When called interactively, this function will ask for the path to +add, defaulting to the current buffer's directory." + (interactive "DDirectory to add: ") + (let* ((c `(:eval (:ge add-to-load-path ,path))) + (r (geiser-eval--send/result c))) + (message "%s" (if r "Added" "Failed!")))) (provide 'geiser-compile) diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el index a28fad5..c0388f0 100644 --- a/elisp/geiser-mode.el +++ b/elisp/geiser-mode.el @@ -1,6 +1,6 @@ ;; geiser-mode.el -- minor mode for scheme buffers -;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -303,6 +303,7 @@ interacting with the Geiser REPL is at your disposal. ("Complete module name" ((kbd "M-`") (kbd "C-.")) geiser-completion--complete-module) ("Edit module" ("\C-c\C-e\C-m" "\C-c\C-em") geiser-edit-module) + ("Add to load path..." ("\C-c\C-e\C-l" "\C-c\C-el") geiser-add-to-load-path) ("Toggle ()/[]" ("\C-c\C-e\C-[" "\C-c\C-e[") geiser-squarify) -- ("Callers" ((kbd "C-c <")) geiser-xref-callers diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 25cb116..3de0a60 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -527,6 +527,7 @@ buffer." -- ("Switch to module..." "\C-c\C-m" switch-to-geiser-module) ("Import module..." "\C-c\C-i" geiser-repl-import-module) + ("Add to load path..." "\C-c\C-r" geiser-add-to-load-path) -- ("Previous matching input" "\M-p" comint-previous-matching-input-from-input "Previous input matching current") |