diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-03-01 04:24:21 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-03-01 04:24:21 +0100 |
commit | b4162eba221b6123950df60e156f208b9b017830 (patch) | |
tree | c8617b17a4c7b8c4c6f5dca7dfabf7daf2bd575a /elisp | |
parent | 825fd89ac5222c3ac0a4e4e854f518ed3accab94 (diff) | |
download | geiser-b4162eba221b6123950df60e156f208b9b017830.tar.gz geiser-b4162eba221b6123950df60e156f208b9b017830.tar.bz2 |
Configurable keyword case sensitivity
By default, keywords are now not fontified in Scheme buffers unless
they have the correct (lower) case. This behaviour can be altered by
new, per-implementation customization variables.
Thanks to Diogo F. S. Ramos for pointing this out.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-impl.el | 5 | ||||
-rw-r--r-- | elisp/geiser-syntax.el | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el index 9e03251..38d22fa 100644 --- a/elisp/geiser-impl.el +++ b/elisp/geiser-impl.el @@ -1,6 +1,6 @@ ;; geiser-impl.el -- generic support for scheme implementations -;; Copyright (C) 2009, 2010, 2012 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2012, 2013 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -200,7 +200,8 @@ Here's how a typical call to this macro looks like: (display-error geiser-guile--display-error) (display-help) (check-buffer geiser-guile--guess) - (keywords geiser-guile--keywords)) + (keywords geiser-guile--keywords) + (case-sensitive geiser-guile-case-sensitive-p)) This macro also defines a runner function (run-NAME) and a switcher (switch-to-NAME), and provides geiser-NAME." diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 46374a2..42e265e 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -1,6 +1,6 @@ ;;; geiser-syntax.el -- utilities for parsing scheme syntax -;; Copyright (C) 2009, 2010, 2011, 2012 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -61,10 +61,15 @@ "A variable (or thunk returning a value) giving additional, implementation-specific entries for font-lock-keywords.") +(geiser-impl--define-caller geiser-syntax--case-sensitive case-sensitive () + "A flag saying whether keywords are case sensitive.") + (defun geiser-syntax--add-kws () (when (not (and (boundp 'quack-mode) quack-mode)) - (let ((kw (geiser-syntax--impl-kws geiser-impl--implementation))) - (when kw (font-lock-add-keywords nil kw))))) + (let ((kw (geiser-syntax--impl-kws geiser-impl--implementation)) + (cs (geiser-syntax--case-sensitive geiser-impl--implementation))) + (when kw (font-lock-add-keywords nil kw)) + (setq font-lock-keywords-case-fold-search (not cs))))) ;;; A simple scheme reader |