From adf746b37d1ffa35abe99eb3ae2b85902e8781ce Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 28 Feb 2009 02:08:01 +0100 Subject: Autodoc working in the REPL (again). --- elisp/geiser-repl.el | 8 ++++++++ 1 file changed, 8 insertions(+) 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))) -- cgit v1.2.3