summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnu.org>2014-04-25 00:37:28 +0200
committerThien-Thi Nguyen <ttn@gnu.org>2014-04-25 00:37:28 +0200
commit5e4ab4e4d9a98a44896c80a998111d768e959686 (patch)
tree5b3a4d310e7d4cd707778d97f83911f0d9d303c4
parentd5031a2aa1a37bb4a332bacec34eeda9e1836cc2 (diff)
downloademacs-5e4ab4e4d9a98a44896c80a998111d768e959686.tar.gz
Improve Scheme font-locking for (define ((foo ...) ...) ...).
* lisp/progmodes/scheme.el (scheme-font-lock-keywords-1): To find the declared object, ignore zero or more parens, not zero or one.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/scheme.el4
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6e5ad6ba29b..f1128b0f98d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2014-04-25 Thien-Thi Nguyen <ttn@gnu.org>
+
+ Improve Scheme font-locking for (define ((foo ...) ...) ...).
+
+ * progmodes/scheme.el (scheme-font-lock-keywords-1): To find
+ the declared object, ignore zero or more parens, not zero or one.
+
2014-04-24 Leo Liu <sdl.web@gmail.com>
* progmodes/xscheme.el (xscheme-expressions-ring)
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 67374dd4c6c..14f8dd65083 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -284,7 +284,9 @@ See `run-hooks'."
"\\|-module"
"\\)\\)\\>"
;; Any whitespace and declared object.
- "[ \t]*(?"
+ ;; The "(*" is for curried definitions, e.g.,
+ ;; (define ((sum a) b) (+ a b))
+ "[ \t]*(*"
"\\(\\sw+\\)?")
'(1 font-lock-keyword-face)
'(6 (cond ((match-beginning 3) font-lock-function-name-face)