compat: Support Mes.
* gash/compat.scm (if-guile-version-below) [mes]: Do nothing. (when-mes): New syntax. * .dir-locals.el: Tell Emacs how to indent it.
This commit is contained in:
parent
a3123ab02a
commit
ead347128a
|
@ -7,6 +7,7 @@
|
|||
".dir-locals.el")))
|
||||
(add-to-list 'geiser-guile-load-path top))))
|
||||
(eval . (put 'if-guile-version-below 'scheme-indent-function 1))
|
||||
(eval . (put 'when-mes 'scheme-indent-function 0))
|
||||
(eval . (put '<sh-case> 'scheme-indent-function 1))
|
||||
(eval . (put '<sh-defun> 'scheme-indent-function 1))
|
||||
(eval . (put '<sh-exec-let> 'scheme-indent-function 1))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; Gash -- Guile As SHell
|
||||
;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
|
||||
;;; Copyright © 2019, 2022 Timothy Sample <samplet@ngyro.com>
|
||||
;;;
|
||||
;;; This file is part of Gash.
|
||||
;;;
|
||||
|
@ -18,7 +18,8 @@
|
|||
|
||||
(define-module (gash compat)
|
||||
#:use-module (ice-9 match)
|
||||
#:export (if-guile-version-below))
|
||||
#:export (if-guile-version-below
|
||||
when-mes))
|
||||
|
||||
;;; Commentary:
|
||||
;;;
|
||||
|
@ -27,6 +28,8 @@
|
|||
;;;
|
||||
;;; Code:
|
||||
|
||||
(cond-expand
|
||||
(guile
|
||||
(define-syntax if-guile-version-below
|
||||
(lambda (x)
|
||||
(define (guile-version<? major minor micro)
|
||||
|
@ -51,6 +54,12 @@
|
|||
#'(if-guile-version-below (maj min mic)
|
||||
consequent
|
||||
(if #f #t))))))
|
||||
(define-syntax-rule (when-mes . forms) (if #f #t)))
|
||||
(mes
|
||||
(define-macro (if-guile-version-below . forms)
|
||||
'(begin))
|
||||
(define-macro (when-mes . forms)
|
||||
`(begin ,@forms))))
|
||||
|
||||
(if-guile-version-below (2 0 10)
|
||||
(begin
|
||||
|
|
Loading…
Reference in New Issue