summaryrefslogtreecommitdiff
path: root/elisp
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
commitadf746b37d1ffa35abe99eb3ae2b85902e8781ce (patch)
tree9d9f3b0f45f81b6aa22dfe6795ebbe38c46f270b /elisp
parentd1fb61738e38b71114d85e8f4f5205908637715b (diff)
downloadgeiser-chez-adf746b37d1ffa35abe99eb3ae2b85902e8781ce.tar.gz
geiser-chez-adf746b37d1ffa35abe99eb3ae2b85902e8781ce.tar.bz2
Autodoc working in the REPL (again).
Diffstat (limited to 'elisp')
-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)))