summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2015-09-30 02:27:13 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2015-09-30 02:27:13 +0200
commit7ae1d4b3e6464f0a8b3416f6689c8b44ceb5bc42 (patch)
treea142c85a1fc7a4789d9a58c898e7bda4d742700a /elisp
parent424553e017718c54e219212b27a32b341ec6bd28 (diff)
parentccfd1fbab2f246d60b9efb804516db5ab88be6ab (diff)
downloadgeiser-guile-7ae1d4b3e6464f0a8b3416f6689c8b44ceb5bc42.tar.gz
geiser-guile-7ae1d4b3e6464f0a8b3416f6689c8b44ceb5bc42.tar.bz2
Merge remote-tracking branch 'dleslie/master'
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-chicken.el32
1 files changed, 21 insertions, 11 deletions
diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index 65b494f..2a8c082 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -58,6 +58,7 @@
"use"
"with-input-from-pipe"))
+
;;; Customization:
(defgroup geiser-chicken nil
@@ -114,7 +115,7 @@ this variable to t."
:type 'boolean
:group 'geiser-chicken)
-
+
;;; REPL support:
(defun geiser-chicken--binary ()
@@ -136,6 +137,7 @@ This function uses `geiser-chicken-init-file' if it exists."
(defconst geiser-chicken--prompt-regexp "#[^;]*;[^:0-9]*:?[0-9]+> ")
+
;;; Evaluation support:
(defun geiser-chicken--geiser-procedure (proc &rest args)
@@ -189,16 +191,20 @@ This function uses `geiser-chicken-init-file' if it exists."
(defun geiser-chicken--exit-command () ",q")
(defun geiser-chicken--symbol-begin (module)
- (apply
- 'max
- (append
- (list (save-excursion (beginning-of-line) (point))
- (save-excursion (skip-syntax-backward "^-()>") (point)))
- (mapcar
- (lambda (match-string)
- (save-excursion (skip-chars-backward match-string) (point)))
- geiser-chicken-prefix-delimiters))))
-
+ (let ((distance-to-beginning-of-line (- (point) (line-beginning-position))))
+ (apply
+ 'max
+ (append
+ (list (save-excursion (beginning-of-line) (point))
+ (save-excursion (skip-syntax-backward "^-()>" distance-to-beginning-of-line)
+ (point)))
+ (mapcar
+ (lambda (match-string)
+ (save-excursion (skip-chars-backward match-string distance-to-beginning-of-line)
+ (point)))
+ geiser-chicken-prefix-delimiters)))))
+
+
;;; Error display
(defun geiser-chicken--display-error (module key msg)
@@ -208,6 +214,7 @@ This function uses `geiser-chicken-init-file' if it exists."
(geiser-edit--buttonize-files))
(and (not key) msg (not (zerop (length msg)))))
+
;;; Trying to ascertain whether a buffer is Chicken Scheme:
(defconst geiser-chicken--guess-re
@@ -222,6 +229,7 @@ This function uses `geiser-chicken-init-file' if it exists."
"Loads chicken doc into a buffer"
(browse-url (format "http://api.call-cc.org/cdoc?q=%s&query-name=Look+up" id)))
+
;;; Keywords and syntax
(defun geiser-chicken--keywords ()
@@ -260,6 +268,7 @@ This function uses `geiser-chicken-init-file' if it exists."
(with-input-from-pipe 1)
(with-output-to-pipe 1))
+
;;; REPL startup
(defconst geiser-chicken-minimum-version "4.8.0.0")
@@ -299,6 +308,7 @@ This function uses `geiser-chicken-init-file' if it exists."
(compilation-setup t)
(geiser-chicken--compile-or-load (not geiser-chicken-compile-geiser-p)))
+
;;; Implementation definition:
(define-geiser-implementation chicken