diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-04-30 00:03:22 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-04-30 00:03:22 +0200 |
commit | 62a12ad5d23520d93a30c38db083bdbfd248b77e (patch) | |
tree | 0784350c9c18cdfd0d23479475cb9a65890ac8f7 | |
parent | fbd809ff8c48f12d1b13caae70810421aaa0aef4 (diff) | |
download | geiser-chez-62a12ad5d23520d93a30c38db083bdbfd248b77e.tar.gz geiser-chez-62a12ad5d23520d93a30c38db083bdbfd248b77e.tar.bz2 |
PLT: Help fix.
-rw-r--r-- | elisp/geiser-base.el | 5 | ||||
-rw-r--r-- | elisp/geiser-plt.el | 80 | ||||
-rw-r--r-- | scheme/plt/geiser.ss | 1 |
3 files changed, 46 insertions, 40 deletions
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el index 362930d..4133245 100644 --- a/elisp/geiser-base.el +++ b/elisp/geiser-base.el @@ -97,6 +97,11 @@ (insert str) (put-text-property p (point) 'face face))) +(defmacro geiser--scheme-indent (&rest pairs) + `(progn ,@(mapcar (lambda (p) + `(put ',(car p) 'scheme-indent-function ',(cadr p))) + pairs))) + (provide 'geiser-base) ;;; geiser-base.el ends here diff --git a/elisp/geiser-plt.el b/elisp/geiser-plt.el index a410e19..6526ae6 100644 --- a/elisp/geiser-plt.el +++ b/elisp/geiser-plt.el @@ -105,7 +105,7 @@ This function uses `geiser-plt-init-file' if it exists." ;;; External help (defun geiser-plt-external-help (symbol module) (message "Requesting help for '%s'..." symbol) - (geiser-eval--send/wait `(:eval (help ,symbol) 'geiser))) + (geiser-eval--send/wait `(:eval (help ,symbol) scheme/help))) ;;; Trying to ascertain whether a buffer is mzscheme scheme: @@ -120,45 +120,45 @@ This function uses `geiser-plt-init-file' if it exists." ;;; Emacs tweaks for PLT scheme code: -(put 'begin0 'scheme-indent-function 1) -(put 'c-declare 'scheme-indent-function 0) -(put 'c-lambda 'scheme-indent-function 2) -(put 'case-lambda 'scheme-indent-function 0) -(put 'catch 'scheme-indent-function 1) -(put 'chicken-setup 'scheme-indent-function 1) -(put 'class 'scheme-indent-function 'defun) -(put 'class* 'scheme-indent-function 'defun) -(put 'compound-unit/sig 'scheme-indent-function 0) -(put 'dynamic-wind 'scheme-indent-function 0) -(put 'for/fold 'scheme-indent-function 2) -(put 'instantiate 'scheme-indent-function 2) -(put 'interface 'scheme-indent-function 1) -(put 'lambda/kw 'scheme-indent-function 1) -(put 'let*-values 'scheme-indent-function 1) -(put 'let+ 'scheme-indent-function 1) -(put 'let-values 'scheme-indent-function 1) -(put 'let/ec 'scheme-indent-function 1) -(put 'mixin 'scheme-indent-function 2) -(put 'module 'scheme-indent-function 'defun) -(put 'opt-lambda 'scheme-indent-function 1) -(put 'parameterize 'scheme-indent-function 1) -(put 'parameterize-break 'scheme-indent-function 1) -(put 'parameterize* 'scheme-indent-function 1) -(put 'quasisyntax/loc 'scheme-indent-function 1) -(put 'receive 'scheme-indent-function 2) -(put 'send* 'scheme-indent-function 1) -(put 'sigaction 'scheme-indent-function 1) -(put 'syntax-case 'scheme-indent-function 2) -(put 'syntax/loc 'scheme-indent-function 1) -(put 'type-case 'scheme-indent-function 'defun) -(put 'unit 'scheme-indent-function 'defun) -(put 'unit/sig 'scheme-indent-function 2) -(put 'unless 'scheme-indent-function 1) -(put 'when 'scheme-indent-function 1) -(put 'while 'scheme-indent-function 1) -(put 'with-handlers 'scheme-indent-function 1) -(put 'with-method 'scheme-indent-function 1) -(put 'with-syntax 'scheme-indent-function 1) +(geiser--scheme-indent + (begin0 1) + (c-declare 0) + (c-lambda 2) + (case-lambda 0) + (catch 1) + (class defun) + (class* defun) + (compound-unit/sig 0) + (dynamic-wind 0) + (for/fold 2) + (instantiate 2) + (interface 1) + (lambda/kw 1) + (let*-values 1) + (let+ 1) + (let-values 1) + (let/ec 1) + (mixin 2) + (module defun) + (opt-lambda 1) + (parameterize 1) + (parameterize-break 1) + (parameterize* 1) + (quasisyntax/loc 1) + (receive 2) + (send* 1) + (sigaction 1) + (syntax-case 2) + (syntax/loc 1) + (type-case defun) + (unit defun) + (unit/sig 2) + (unless 1) + (when 1) + (while 1) + (with-handlers 1) + (with-method 1) + (with-syntax 1)) ;;; Register this implementation: diff --git a/scheme/plt/geiser.ss b/scheme/plt/geiser.ss index 3972a24..9f99641 100644 --- a/scheme/plt/geiser.ss +++ b/scheme/plt/geiser.ss @@ -53,6 +53,7 @@ (display (prompt)) (builtin-reader)))) +(require scheme/help) (require 'geiser) (current-prompt-read |