summaryrefslogtreecommitdiff
path: root/pygments/lexers/lisp.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/lisp.py')
-rw-r--r--pygments/lexers/lisp.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/pygments/lexers/lisp.py b/pygments/lexers/lisp.py
index 4a1ce137..3bfc83a6 100644
--- a/pygments/lexers/lisp.py
+++ b/pygments/lexers/lisp.py
@@ -139,7 +139,7 @@ class SchemeLexer(RegexLexer):
(r"(?<=#\()" + valid_name, Name.Variable),
# highlight the builtins
- ("(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins),
+ (r"(?<=\()(%s)" % '|'.join(re.escape(entry) + ' ' for entry in builtins),
Name.Builtin),
# the remaining functions
@@ -321,7 +321,7 @@ class CommonLispLexer(RegexLexer):
(r'#\d+#', Operator),
# read-time comment
- (r'#+nil' + terminated + '\s*\(', Comment.Preproc, 'commented-form'),
+ (r'#+nil' + terminated + r'\s*\(', Comment.Preproc, 'commented-form'),
# read-time conditional
(r'#[+-]', Operator),
@@ -333,7 +333,7 @@ class CommonLispLexer(RegexLexer):
(r'(t|nil)' + terminated, Name.Constant),
# functions and variables
- (r'\*' + symbol + '\*', Name.Variable.Global),
+ (r'\*' + symbol + r'\*', Name.Variable.Global),
(symbol, Name.Variable),
# parentheses
@@ -382,7 +382,7 @@ class HyLexer(RegexLexer):
# valid names for identifiers
# well, names can only not consist fully of numbers
# but this should be good enough for now
- valid_name = r'(?!#)[\w!$%*+<=>?/.#-]+'
+ valid_name = r'(?!#)[\w!$%*+<=>?/.#-:]+'
def _multi_escape(entries):
return words(entries, suffix=' ')
@@ -1249,7 +1249,7 @@ class RacketLexer(RegexLexer):
_opening_parenthesis = r'[([{]'
_closing_parenthesis = r'[)\]}]'
_delimiters = r'()[\]{}",\'`;\s'
- _symbol = r'(?u)(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters
+ _symbol = r'(?:\|[^|]*\||\\[\w\W]|[^|\\%s]+)+' % _delimiters
_exact_decimal_prefix = r'(?:#e)?(?:#d)?(?:#e)?'
_exponent = r'(?:[defls][-+]?\d+)'
_inexact_simple_no_hashes = r'(?:\d+(?:/\d+|\.\d*)?|\.\d+)'
@@ -1301,16 +1301,16 @@ class RacketLexer(RegexLexer):
(_inexact_simple, _delimiters), Number.Float, '#pop'),
# #b
- (r'(?i)(#[ei])?#b%s' % _symbol, Number.Bin, '#pop'),
+ (r'(?iu)(#[ei])?#b%s' % _symbol, Number.Bin, '#pop'),
# #o
- (r'(?i)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'),
+ (r'(?iu)(#[ei])?#o%s' % _symbol, Number.Oct, '#pop'),
# #x
- (r'(?i)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'),
+ (r'(?iu)(#[ei])?#x%s' % _symbol, Number.Hex, '#pop'),
# #i is always inexact, i.e. float
- (r'(?i)(#d)?#i%s' % _symbol, Number.Float, '#pop'),
+ (r'(?iu)(#d)?#i%s' % _symbol, Number.Float, '#pop'),
# Strings and characters
(r'#?"', String.Double, ('#pop', 'string')),
@@ -1323,7 +1323,7 @@ class RacketLexer(RegexLexer):
(r'#(true|false|[tTfF])', Name.Constant, '#pop'),
# Keyword argument names (e.g. #:keyword)
- (r'#:%s' % _symbol, Keyword.Declaration, '#pop'),
+ (r'(?u)#:%s' % _symbol, Keyword.Declaration, '#pop'),
# Reader extensions
(r'(#lang |#!)(\S+)',
@@ -1400,7 +1400,7 @@ class RacketLexer(RegexLexer):
class NewLispLexer(RegexLexer):
"""
- For `newLISP. <www.newlisp.org>`_ source code (version 10.3.0).
+ For `newLISP. <http://www.newlisp.org/>`_ source code (version 10.3.0).
.. versionadded:: 1.5
"""
@@ -2154,7 +2154,7 @@ class EmacsLispLexer(RegexLexer):
(r'(t|nil)' + terminated, Name.Constant),
# functions and variables
- (r'\*' + symbol + '\*', Name.Variable.Global),
+ (r'\*' + symbol + r'\*', Name.Variable.Global),
(symbol, Name.Variable),
# parentheses