summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorDan Leslie <dan@ironoxide.ca>2015-10-03 12:39:05 -0700
committerDan Leslie <dan@ironoxide.ca>2015-10-03 12:44:04 -0700
commit57d6934beb882c6dcd7119f7a2ebe04ab977b9c5 (patch)
tree7da2cbe82250c6daa5012b47b96883e27fa5d351 /elisp
parentd109d97c262e1e20de62bfdd74f421f911494405 (diff)
downloadgeiser-guile-57d6934beb882c6dcd7119f7a2ebe04ab977b9c5.tar.gz
geiser-guile-57d6934beb882c6dcd7119f7a2ebe04ab977b9c5.tar.bz2
Converts toplevel methods to prefixed methods
This seems to improve speed; in a large environment I witnessed a regular 100ms increase in speed for autodoc.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-chicken.el34
1 files changed, 14 insertions, 20 deletions
diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index fc28e63..d3e4b4e 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -141,20 +141,17 @@ This function uses `geiser-chicken-init-file' if it exists."
;;; Evaluation support:
(defun geiser-chicken--geiser-procedure (proc &rest args)
- (let ((fmt
- (case proc
- ((eval compile)
- (let ((form (mapconcat 'identity (cdr args) " ")))
- (format ",geiser-eval %s %s" (or (car args) "#f") form)))
- ((load-file compile-file)
- (format ",geiser-load-file %s" (car args)))
- ((no-values)
- ",geiser-no-values")
- (t
- (let ((form (mapconcat 'identity args " ")))
- (format "(geiser-%s %s)" proc form))))))
- ;;(message fmt)
- fmt))
+ (case proc
+ ((eval compile)
+ (let ((form (mapconcat 'identity (cdr args) " ")))
+ (format "(geiser-eval %s '%s)" (or (car args) "#f") form)))
+ ((load-file compile-file)
+ (format "(geiser-load-file %s)" (car args)))
+ ((no-values)
+ "(geiser-no-values)")
+ (t
+ (let ((form (mapconcat 'identity args " ")))
+ (format "(geiser-%s %s)" proc form)))))
(defconst geiser-chicken--module-re
"( *module +\\(([^)]+)\\|[^ ]+\\)\\|( *define-library +\\(([^)]+)\\|[^ ]+\\)")
@@ -195,14 +192,11 @@ This function uses `geiser-chicken-init-file' if it exists."
(apply
'max
(append
- (list (save-excursion (beginning-of-line) (point))
- (save-excursion (skip-syntax-backward "^'-()>"
- distance-to-beginning-of-line)
+ (list (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)
+ (save-excursion (skip-chars-backward match-string distance-to-beginning-of-line)
(point)))
geiser-chicken-prefix-delimiters)))))
@@ -297,7 +291,7 @@ This function uses `geiser-chicken-init-file' if it exists."
(let ((load-sequence
(cond
(force-load
- (format "(load \"%s\")\n" source))
+ (format "(load \"%s\")\n(import geiser)\n" source))
((file-exists-p target)
(format "%s(load \"%s\")(import geiser)%s\n"
suppression-prefix target suppression-postfix))