summaryrefslogtreecommitdiff
path: root/elisp
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
commitb9b36421ff83a12b1ef9e645be7d23f68d703912 (patch)
treea6895235ca82cfe430c5e882e481f83e682a5cf1 /elisp
parent05c2c94f9a29e24139c591d994a225d9de416767 (diff)
downloadgeiser-chez-b9b36421ff83a12b1ef9e645be7d23f68d703912.tar.gz
geiser-chez-b9b36421ff83a12b1ef9e645be7d23f68d703912.tar.bz2
Smart tab is not enabled by default; module completion bound to C-.
Diffstat (limited to 'elisp')
-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
4 files changed, 18 insertions, 14 deletions
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)