unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9164: 23.2; Scheme mode should recognize R6RS libraries
       [not found] <m3tyabwlzm.fsf@dwashington.fritz.box>
@ 2013-06-14 15:09 ` Simen Heggestøyl
  2013-06-15  0:38   ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Simen Heggestøyl @ 2013-06-14 15:09 UTC (permalink / raw)
  To: 9164

This patch fixes bug #9164, by indenting R6RS `library' forms correctly,
and highlighting them (consistent with how Guile modules are
highlighted).

Denis Washington <denis@dwashington.fritz.box> writes:
> Emacs' Scheme mode does not seem to have been updated for
> the language additions of the R6RS standard. Most specifically,
> it does not recognize R6RS "library" forms, which means that:
>
> * "library" is not highlighted, and neither is the defined
>   library name or the "export" and "import" auxiliary
>   keywords.
>
> * Library forms are auto-indented like procedure calls,
>   but should have "define"-style indentation.
>
> This should be fixed in scheme-mode.

=== modified file 'lisp/progmodes/scheme.el'
*** lisp/progmodes/scheme.el	2013-03-16 22:08:22 +0000
--- lisp/progmodes/scheme.el	2013-06-14 13:30:30 +0000
*************** See `run-hooks'."
*** 312,317 ****
--- 312,319 ----
  	       "call-with-input-file" "call-with-output-file" "case" "cond"
  	       "do" "else" "for-each" "if" "lambda" "λ"
  	       "let" "let*" "let-syntax" "letrec" "letrec-syntax"
+                ;; R6RS library subforms.
+                "export" "import"
  	       ;; SRFI 11 usage comes up often enough.
  	       "let-values" "let*-values"
  	       ;; Hannes Haug <hannes.haug@student.uni-tuebingen.de> wants:
*************** See `run-hooks'."
*** 330,335 ****
--- 332,341 ----
        ;;
        ;; Scheme `:' and `#:' keywords as builtins.
        '("\\<#?:\\sw+\\>" . font-lock-builtin-face)
+       ;; R6RS library declarations.
+       '("(\\(\\<library\\>\\)\\s-*(?\\(\\sw+\\)?"
+         (1 font-lock-keyword-face)
+         (2 font-lock-type-face))
        )))
    "Gaudy expressions to highlight in Scheme modes.")
  
*************** indentation."
*** 536,541 ****
--- 542,548 ----
  (put 'letrec-syntax 'scheme-indent-function 1)
  (put 'syntax-rules 'scheme-indent-function 1)
  (put 'syntax-case 'scheme-indent-function 2) ; not r5rs
+ (put 'library 'scheme-indent-function 1) ; R6RS
  
  (put 'call-with-input-file 'scheme-indent-function 1)
  (put 'with-input-from-file 'scheme-indent-function 1)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#9164: 23.2; Scheme mode should recognize R6RS libraries
  2013-06-14 15:09 ` bug#9164: 23.2; Scheme mode should recognize R6RS libraries Simen Heggestøyl
@ 2013-06-15  0:38   ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-06-15  0:38 UTC (permalink / raw)
  To: Simen Heggestøyl; +Cc: denis, 9164

Simen Heggestøyl wrote:

> This patch fixes bug #9164, by indenting R6RS `library' forms correctly,
> and highlighting them (consistent with how Guile modules are
> highlighted).

Thanks for the patch; applied.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-15  0:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m3tyabwlzm.fsf@dwashington.fritz.box>
2013-06-14 15:09 ` bug#9164: 23.2; Scheme mode should recognize R6RS libraries Simen Heggestøyl
2013-06-15  0:38   ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).