summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-28 02:08:01 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-28 02:08:01 +0100
commit5e55181bae7bc30a428854f2bde5cd03c9ff6717 (patch)
tree2c7f8ff8edf4c42333a111027bfaa49cd902c915 /elisp/geiser-repl.el
parentaf446e1e0783e3b560baa8bc6134eb6e5d282f06 (diff)
downloadgeiser-5e55181bae7bc30a428854f2bde5cd03c9ff6717.tar.gz
geiser-5e55181bae7bc30a428854f2bde5cd03c9ff6717.tar.bz2
Autodoc working in the REPL (again).
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index ff1f920..e4617e1 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -185,6 +185,12 @@ REPL buffer."
(interactive)
(when (= (point) (comint-bol)) (beginning-of-line)))
+(defun geiser-repl--beginning-of-defun ()
+ (let ((p (point)))
+ (comint-bol)
+ (when (not (eq (char-after (point)) ?\())
+ (skip-syntax-forward "^(" p))))
+
(define-derived-mode geiser-repl-mode comint-mode "Geiser REPL"
"Major mode for interacting with an inferior Guile repl process.
\\{geiser-repl-mode-map}"
@@ -192,6 +198,8 @@ REPL buffer."
(set (make-local-variable 'comint-prompt-regexp) geiser-repl--prompt-regex)
(set (make-local-variable 'comint-use-prompt-regexp) t)
(set (make-local-variable 'comint-prompt-read-only) t)
+ (set (make-local-variable 'beginning-of-defun-function)
+ 'geiser-repl--beginning-of-defun)
(set-syntax-table scheme-mode-syntax-table)
(when geiser-repl-autodoc-p (geiser-autodoc-mode 1)))