GNU bug report logs - #9164
23.2; Scheme mode should recognize R6RS libraries

Previous Next

Package: emacs;

Reported by: Denis Washington <denis <at> dwashington.fritz.box>

Date: Sun, 24 Jul 2011 22:47:02 UTC

Severity: normal

Tags: patch

Found in version 23.2

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9164 in the body.
You can then email your comments to 9164 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9164; Package emacs. (Sun, 24 Jul 2011 22:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Denis Washington <denis <at> dwashington.fritz.box>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 24 Jul 2011 22:47:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis Washington <denis <at> dwashington.fritz.box>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2; Scheme mode should recognize R6RS libraries
Date: Sun, 24 Jul 2011 20:51:25 +0200
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9164; Package emacs. (Fri, 14 Jun 2013 15:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 9164 <at> debbugs.gnu.org (full text, mbox):

From: simenheg <at> ifi.uio.no (Simen Heggestøyl)
To: 9164 <at> debbugs.gnu.org
Subject: Re: bug#9164: 23.2; Scheme mode should recognize R6RS libraries
Date: Fri, 14 Jun 2013 17:09:22 +0200
This patch fixes bug #9164, by indenting R6RS `library' forms correctly,
and highlighting them (consistent with how Guile modules are
highlighted).

Denis Washington <denis <at> 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 <at> 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)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9164; Package emacs. (Sat, 15 Jun 2013 00:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 9164 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: simenheg <at> ifi.uio.no (Simen Heggestøyl)
Cc: denis <at> dwashington.fritz.box, 9164 <at> debbugs.gnu.org
Subject: Re: bug#9164: 23.2; Scheme mode should recognize R6RS libraries
Date: Fri, 14 Jun 2013 20:38:45 -0400
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.




bug marked as fixed in version 24.4, send any further explanations to 9164 <at> debbugs.gnu.org and Denis Washington <denis <at> dwashington.fritz.box> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 15 Jun 2013 00:40:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 13 Jul 2013 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.