unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13975: 24.3; scheme-mode: Treat Greek letter `λ' as `lambda'
@ 2013-03-16 12:50 Simen Heggestøyl
  2013-03-16 13:12 ` Leo Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Simen Heggestøyl @ 2013-03-16 12:50 UTC (permalink / raw)
  To: 13975

It would be convenient if scheme-mode had the same indentation rules and
font face for `lambda' and the Greek letter `λ'.

I.e., we want this:

    (lambda (x)
      (* x x))

and this:

    (λ (x)
      (* x x))

Instead of this:

    (λ (x)
       (* x x))

Popular Schemes has had λ support for some time now:

  * Racket supports λ (since March 2005)
  * Guile supports λ (since February 2011)
  * Geiser has a key binding for inserting λ (since February 2013)





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

* bug#13975: 24.3; scheme-mode: Treat Greek letter `λ' as `lambda'
  2013-03-16 12:50 bug#13975: 24.3; scheme-mode: Treat Greek letter `λ' as `lambda' Simen Heggestøyl
@ 2013-03-16 13:12 ` Leo Liu
  2013-03-16 13:51   ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Liu @ 2013-03-16 13:12 UTC (permalink / raw)
  To: Simen Heggestøyl; +Cc: 13975

On 2013-03-16 20:50 +0800, Simen Heggestøyl wrote:
>     (λ (x)
>       (* x x))

I check drracket and the default indentation is as the above. I think we
should teach emacs to do it too.

diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index a7dbc411..9dce5e6b 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -410,6 +410,7 @@ (put 'with-mode 'scheme-indent-function 1)
 (put 'make 'scheme-indent-function 1)
 (put 'style 'scheme-indent-function 1)
 (put 'root 'scheme-indent-function 1)
+(put 'λ 'scheme-indent-function 1)
 
 (defvar dsssl-font-lock-keywords
   (eval-when-compile





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

* bug#13975: 24.3; scheme-mode: Treat Greek letter `λ' as `lambda'
  2013-03-16 13:12 ` Leo Liu
@ 2013-03-16 13:51   ` Stefan Monnier
  2013-03-16 14:41     ` Simen Heggestøyl
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-03-16 13:51 UTC (permalink / raw)
  To: Leo Liu; +Cc: 13975, Simen Heggestøyl

> +(put 'λ 'scheme-indent-function 1)
 
Go for it,


        Stefan





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

* bug#13975: 24.3; scheme-mode: Treat Greek letter `λ' as `lambda'
  2013-03-16 13:51   ` Stefan Monnier
@ 2013-03-16 14:41     ` Simen Heggestøyl
  2013-03-16 15:28       ` Leo Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Simen Heggestøyl @ 2013-03-16 14:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: sdl.web, 13975

Can we do this for syntax highlighting as well?

diff --git a/tmp/scheme.el b/tmp/emacs-24.3/lisp/progmodes/scheme.el
index bfcf44b..a7dbc41 100644
--- a/tmp/scheme.el
+++ b/tmp/emacs-24.3/lisp/progmodes/scheme.el
@@ -310,7 +310,7 @@ See `run-hooks'."
 	"(" (regexp-opt
 	     '("begin" "call-with-current-continuation" "call/cc"
 	       "call-with-input-file" "call-with-output-file" "case" "cond"
-	       "do" "else" "for-each" "if" "lambda" "λ"
+	       "do" "else" "for-each" "if" "lambda"
 	       "let" "let*" "let-syntax" "letrec" "letrec-syntax"
 	       ;; SRFI 11 usage comes up often enough.
 	       "let-values" "let*-values"

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> +(put 'λ 'scheme-indent-function 1)
>  
> Go for it,
>
>
>         Stefan





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

* bug#13975: 24.3; scheme-mode: Treat Greek letter `λ' as `lambda'
  2013-03-16 14:41     ` Simen Heggestøyl
@ 2013-03-16 15:28       ` Leo Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Liu @ 2013-03-16 15:28 UTC (permalink / raw)
  To: Simen Heggestøyl; +Cc: 13975-done

Fixed in emacs-24.

Leo





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

end of thread, other threads:[~2013-03-16 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 12:50 bug#13975: 24.3; scheme-mode: Treat Greek letter `λ' as `lambda' Simen Heggestøyl
2013-03-16 13:12 ` Leo Liu
2013-03-16 13:51   ` Stefan Monnier
2013-03-16 14:41     ` Simen Heggestøyl
2013-03-16 15:28       ` Leo Liu

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).