summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-24 23:23:58 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-24 23:23:58 +0100
commit73af62cd02e94291c7fc26e5bfbf917ac7021bde (patch)
tree3e0ec4ed539165f3158e2c3e186ebb747a47ac80
parent8f76cb3c116723c11a542035efba6bce56608347 (diff)
downloadgeiser-73af62cd02e94291c7fc26e5bfbf917ac7021bde.tar.gz
geiser-73af62cd02e94291c7fc26e5bfbf917ac7021bde.tar.bz2
Smart tab is not enabled by default; module completion bound to C-.
-rw-r--r--README25
-rw-r--r--elisp/geiser-completion.el6
-rw-r--r--elisp/geiser-debug.el18
-rw-r--r--elisp/geiser-mode.el5
-rw-r--r--elisp/geiser-repl.el3
5 files changed, 29 insertions, 28 deletions
diff --git a/README b/README
index 1db1a4d..41e042c 100644
--- a/README
+++ b/README
@@ -34,18 +34,11 @@
| C-cC-dm | See module documentation |
| C-cC-da | Toggle autodoc mode |
|---------+-------------------------------------------------|
-
- If `geiser-mode-smart-tab-p' is nil
- |----------+-------------------------------|
- | M-TAB | Complete symbol at point |
- | C-uM-TAB | Complete module name at point |
- |----------+-------------------------------|
-
- If `geiser-mode-smart-tab-p' is t
- |-------+-----------------------------------------|
- | TAB | Complete symbol at point or indent |
- | M-TAB | Complete module name at point or indent |
- |-------+-----------------------------------------|
+ | M-TAB | Complete symbol at point |
+ | C-. | Complete module name at point |
+ | TAB | Complete symbol at point or indent |
+ | | (If `geiser-mode-smart-tab-p' is t) |
+ |---------+-------------------------------------------------|
*** In the REPL
@@ -53,8 +46,8 @@
| C-cC-z, C-cz | Start Scheme REPL (if it's not running) |
|--------------+-----------------------------------------|
| M-. | Edit symbol at point |
- | TAB | Complete symbol at point |
- | M-TAB | Complete module name at point |
+ | TAB, M-TAB | Complete symbol at point |
+ | C-. | Complete module name at point |
|--------------+-----------------------------------------|
| M-p, M-n | Prompt history, matching current prefix |
|--------------+-----------------------------------------|
@@ -80,3 +73,7 @@
| C-cz | switch to REPL |
| q | bury buffer |
|-----------+----------------------------------------------|
+
+*** In backtrace (evaluation/compile result) buffers:
+
+ Default error navigation keys used by emacs' compilation mode.
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index accbd3d..0481b17 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -244,13 +244,11 @@ Null prefix argument turns off the mode.
When this mode is enable, TAB will indent if at point is at
beginning of line or after a white space or closing parenthesis,
-and will try completing symbol at point otherwise. In addition,
-M-TAB will try module name completion."
+and will try completing symbol at point otherwise."
:init-value nil
:lighter geiser-smart-tab-mode-string
:group 'geiser-mode
- :keymap `((,(kbd "TAB") . geiser-completion--maybe-complete)
- (,(kbd "M-TAB") . geiser-completion--complete-module)))
+ :keymap `(,(kbd "TAB") geiser-completion--maybe-complete))
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index 1df03ef..c67a6aa 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -53,9 +53,7 @@
(defun geiser-debug--display-retort (what ret)
(let* ((err (geiser-eval--retort-error ret))
(output (geiser-eval--retort-output ret))
- (stack (geiser-eval--retort-stack ret))
- (step 2)
- (indent step))
+ (stack (geiser-eval--retort-stack ret)))
(when err
(geiser-debug--with-buffer
(erase-buffer)
@@ -63,9 +61,7 @@
(newline 2)
(insert (geiser-eval--error-str err) "\n\n")
(when output (insert output "\n\n"))
- (dolist (f (reverse (cdr stack)))
- (geiser-debug--display-stack-frame f indent)
- (setq indent (+ step indent)))
+ (geiser-debug--display-stack stack)
(goto-char (point-min)))
(geiser-debug--pop-to-buffer))))
@@ -76,6 +72,14 @@
(defsubst geiser-debug--frame-source-line (src) (or (cadr src) 1))
(defsubst geiser-debug--frame-source-column (src) (or (caddr src) 0))
+(defun geiser-debug--display-stack (stack)
+ (let* ((frames (cdr stack))
+ (step 2)
+ (indent (* (length frames) step)))
+ (dolist (f frames)
+ (geiser-debug--display-stack-frame f indent)
+ (setq indent (- indent step)))))
+
(defun geiser-debug--display-stack-frame (frame offset)
(let ((procedure (geiser-debug--frame-proc frame))
(source (geiser-debug--frame-source frame))
@@ -84,7 +88,7 @@
(insert (format "In file %s:%s:%s\n"
(geiser-debug--frame-source-file source)
(geiser-debug--frame-source-line source)
- (geiser-debug--frame-source-column source)))
+ (1+ (geiser-debug--frame-source-column source))))
(insert "In expression:\n"))
(insert (format "%s%s\n" (make-string offset ?\ ) description))))
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index e308c07..7a9bdfe 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -48,7 +48,7 @@
:group 'geiser-autodoc
:type 'boolean)
-(defcustom geiser-mode-smart-tab-p t
+(defcustom geiser-mode-smart-tab-p nil
"Whether `geiser-smart-tab-mode' gets enabled by default in Scheme buffers."
:group 'geiser-mode
:type 'boolean)
@@ -126,7 +126,7 @@ With prefix, goes to the REPL buffer afterwards (as
;;; Geiser mode:
(make-variable-buffer-local
- (defvar geiser-mode-string " Geiser"
+ (defvar geiser-mode-string " G"
"Modeline indicator for geiser-mode"))
(defvar geiser-mode-map (make-sparse-keymap)
@@ -162,6 +162,7 @@ interacting with the Geiser REPL is at your disposal.
(define-key geiser-mode-map "\C-c\C-k" 'geiser-compile-current-buffer)
(define-key geiser-mode-map (kbd "M-TAB") 'geiser-completion--complete-symbol)
+(define-key geiser-mode-map (kbd "C-.") 'geiser-completion--complete-module)
(define-key geiser-mode-map "\M-." 'geiser-edit-symbol-at-point)
(define-key geiser-mode-map "\M-," 'geiser-edit-pop-edit-symbol-stack)
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 45cc164..3e02f18 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -167,7 +167,8 @@ REPL buffer."
(define-key geiser-repl-mode-map "\C-c\M-n" 'comint-next-input)
(define-key geiser-repl-mode-map (kbd "TAB") 'geiser-completion--complete-symbol)
-(define-key geiser-repl-mode-map (kbd "M-TAB") 'geiser-completion--complete-module)
+(define-key geiser-repl-mode-map (kbd "M-TAB") 'geiser-completion--complete-symbol)
+(define-key geiser-repl-mode-map (kbd "C-.") 'geiser-completion--complete-module)
(define-key geiser-repl-mode-map "\M-." 'geiser-edit-symbol-at-point)
(define-key geiser-repl-mode-map "\M-," 'geiser-edit-pop-edit-symbol-stack)