diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-10 21:08:34 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-10 21:08:34 +0200 |
commit | 56598777f2c0a50ca78065d284f2d9c8a9c4fb98 (patch) | |
tree | 8bd7c2f55e5d1455e946878b7fc7e66498ed4563 | |
parent | 26929de58ec387bcdac0010067c310dbc6ff0d2a (diff) | |
download | geiser-chez-56598777f2c0a50ca78065d284f2d9c8a9c4fb98.tar.gz geiser-chez-56598777f2c0a50ca78065d284f2d9c8a9c4fb98.tar.bz2 |
Share scheme-indent-function tweaks across implementations.
-rw-r--r-- | elisp/geiser-base.el | 5 | ||||
-rw-r--r-- | elisp/geiser-plt.el | 44 | ||||
-rw-r--r-- | elisp/geiser-syntax.el | 51 |
3 files changed, 46 insertions, 54 deletions
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el index 4133245..362930d 100644 --- a/elisp/geiser-base.el +++ b/elisp/geiser-base.el @@ -97,11 +97,6 @@ (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 e60a576..44312b9 100644 --- a/elisp/geiser-plt.el +++ b/elisp/geiser-plt.el @@ -138,49 +138,5 @@ This function uses `geiser-plt-init-file' if it exists." (string-equal (file-name-extension (buffer-file-name)) "ss"))) -;;; Emacs tweaks for PLT scheme code: - -(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) - (match defun) - (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)) - - (provide 'geiser-plt) ;;; geiser-plt.el ends here diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 264687a..472a4e5 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -32,11 +32,52 @@ ;;; Indentation: -(defun geiser-syntax--setup-scheme-indent () - (let ((defuns '(catch))) - (mapc (lambda (d) (put d 'scheme-indent-function 'defun)) defuns))) - -(geiser-syntax--setup-scheme-indent) +(defmacro geiser-syntax--scheme-indent (&rest pairs) + `(progn ,@(mapcar (lambda (p) + `(put ',(car p) 'scheme-indent-function ',(cadr p))) + pairs))) + +(geiser-syntax--scheme-indent + (begin0 1) + (c-declare 0) + (c-lambda 2) + (case-lambda 0) + (catch defun) + (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) + (match defun) + (mixin 2) + (module defun) + (opt-lambda 1) + (parameterize 1) + (parameterize-break 1) + (parameterize* 1) + (pmatch defun) + (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)) ;;; Code parsing: |