aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/lisp.py
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2023-12-09 00:19:25 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2023-12-09 00:50:41 +0300
commit83b8a2f9228353759e59a093cb3c1270ea2c9d5b (patch)
treea90f4f91780c0613bea19f33ff8af8e93a335e8b /contrib/python/Pygments/py3/pygments/lexers/lisp.py
parent460528e80f26d04487dc242b7333d45bbeb43a4d (diff)
downloadydb-83b8a2f9228353759e59a093cb3c1270ea2c9d5b.tar.gz
Update contrib/python/Pygments/py3 to 2.17.2
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/lisp.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/lisp.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/lisp.py b/contrib/python/Pygments/py3/pygments/lexers/lisp.py
index 5a97a1677a..966b6063ab 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/lisp.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/lisp.py
@@ -471,6 +471,16 @@ class CommonLispLexer(RegexLexer):
],
}
+ def analyse_text(text):
+ """Competes with Visual Prolog on *.cl"""
+ # This is a *really* good indicator (and not conflicting with Visual Prolog)
+ # '(defun ' first on a line
+ # section keyword alone on line e.g. 'clauses'
+ if re.search(r'^\s*\(defun\s', text):
+ return 0.8
+ else:
+ return 0
+
class HyLexer(RegexLexer):
"""