unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* #:keyword font locking for scheme.el
@ 2003-09-29  0:12 Thien-Thi Nguyen
  2003-09-29  7:17 ` Neil Jerram
  2003-09-29 23:19 ` Rob Browning
  0 siblings, 2 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2003-09-29  0:12 UTC (permalink / raw)


any objections to this change (patch below) to scheme.el?
it enables font locking for both

	:this-style

as well as

	#:this-style

keywords.  currently for the latter, the hash is left unfontified,
which i suppose could be aesthetically pleasing to some...

a related-elisp question: i notice imenu has a similar init string as
the one changed for `font-lock-defaults'.  should that be changed, too?

passing note: guile allows both styles to be recognized as keywords,
depending on an option that affects `read'.  because of lack of hash
fontification back when i was getting into scheme programming (when i
finally tried using emacs under X w/ hilit19, that is ;-), a lot of my
code avoided "#:key" to use ":key" because it was prettier.  silly
programmer.

thi


____________________________________________________
*** scheme.el.~1.45.~	Sun Sep  7 11:24:10 2003
--- scheme.el	Mon Sep 29 01:46:57 2003
***************
*** 165,171 ****
    (setq font-lock-defaults
          '((scheme-font-lock-keywords
             scheme-font-lock-keywords-1 scheme-font-lock-keywords-2)
!           nil t (("+-*/.<>=!?$%_&~^:" . "w")) beginning-of-defun
            (font-lock-mark-block-function . mark-defun)
            (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function))))
  
--- 165,171 ----
    (setq font-lock-defaults
          '((scheme-font-lock-keywords
             scheme-font-lock-keywords-1 scheme-font-lock-keywords-2)
!           nil t (("+-*/.<>=!?$%_&~^:#" . "w")) beginning-of-defun
            (font-lock-mark-block-function . mark-defun)
            (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function))))
  
***************
*** 337,344 ****
        ;; David Fox <fox@graphics.cs.nyu.edu> for SOS/STklos class specifiers.
        '("\\<<\\sw+>\\>" . font-lock-type-face)
        ;;
!       ;; Scheme `:' keywords as builtins.
!       '("\\<:\\sw+\\>" . font-lock-builtin-face)
        )))
    "Gaudy expressions to highlight in Scheme modes.")
  
--- 337,344 ----
        ;; David Fox <fox@graphics.cs.nyu.edu> for SOS/STklos class specifiers.
        '("\\<<\\sw+>\\>" . font-lock-type-face)
        ;;
!       ;; Scheme `:' and `#:' keywords as builtins.
!       '("\\<#*:\\sw+\\>" . font-lock-builtin-face)
        )))
    "Gaudy expressions to highlight in Scheme modes.")
  


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: #:keyword font locking for scheme.el
  2003-09-29  0:12 #:keyword font locking for scheme.el Thien-Thi Nguyen
@ 2003-09-29  7:17 ` Neil Jerram
  2003-09-29 12:13   ` Thien-Thi Nguyen
  2003-09-29 23:19 ` Rob Browning
  1 sibling, 1 reply; 4+ messages in thread
From: Neil Jerram @ 2003-09-29  7:17 UTC (permalink / raw)
  Cc: guile-devel

>>>>> "thi" == Thien-Thi Nguyen <ttn@surf.glug.org> writes:

    thi> any objections to this change (patch below) to scheme.el?

Sounds like a desirable change to me.  Implementation-wise, wouldn't
`#?' be more precise than `#*' ?

    thi> a related-elisp question: i notice imenu has a similar init
    thi> string as the one changed for `font-lock-defaults'.  should
    thi> that be changed, too?

Not sure I understand; I presume not, as elisp doesn't have the
#:keyword syntax.

Regards,
        Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: #:keyword font locking for scheme.el
  2003-09-29  7:17 ` Neil Jerram
@ 2003-09-29 12:13   ` Thien-Thi Nguyen
  0 siblings, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2003-09-29 12:13 UTC (permalink / raw)
  Cc: guile-devel

oops, wrong list.  anyway...

   From: Neil Jerram <neil@ossau.uklinux.net>
   Date: 29 Sep 2003 08:17:42 +0100

   Sounds like a desirable change to me.  Implementation-wise, wouldn't
   `#?' be more precise than `#*' ?

yes, thanks for reminding me of the `?' operator.

thi


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: #:keyword font locking for scheme.el
  2003-09-29  0:12 #:keyword font locking for scheme.el Thien-Thi Nguyen
  2003-09-29  7:17 ` Neil Jerram
@ 2003-09-29 23:19 ` Rob Browning
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Browning @ 2003-09-29 23:19 UTC (permalink / raw)
  Cc: guile-devel

Thien-Thi Nguyen <ttn@surf.glug.org> writes:

> any objections to this change (patch below) to scheme.el?
> it enables font locking for both
>
> 	:this-style
>
> as well as
>
> 	#:this-style

Might also consider contacting Neil about quack if it doesn't handle
this and perhaps should...

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

end of thread, other threads:[~2003-09-29 23:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-29  0:12 #:keyword font locking for scheme.el Thien-Thi Nguyen
2003-09-29  7:17 ` Neil Jerram
2003-09-29 12:13   ` Thien-Thi Nguyen
2003-09-29 23:19 ` Rob Browning

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