aboutsummaryrefslogtreecommitdiff
path: root/sx-babel.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-07 20:04:21 -0500
committerSean Allred <code@seanallred.com>2015-01-07 20:04:21 -0500
commit461a0b63529f0185f1bbe86cb07e7f6cd88d2ef7 (patch)
tree80b20de62a65b4c56415f93815bee23ffb2dd108 /sx-babel.el
parent67581dc6879bdbf7b6da9210b092fa7a18d39e4d (diff)
parentab8ac65a7e22874cc4a56863e5aa9442c12cd0ae (diff)
Merge branch 'master' into improve-comments
Conflicts: test/test-printing.el
Diffstat (limited to 'sx-babel.el')
-rw-r--r--sx-babel.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/sx-babel.el b/sx-babel.el
index 31c0924..7f84fe0 100644
--- a/sx-babel.el
+++ b/sx-babel.el
@@ -34,6 +34,12 @@
;; @TODO: Make shell-mode work here. Currently errors because it
;; needs a process. `sh-mode' isn't as nice.
(,(rx (or "$ " "# ")) sh-mode)
+ ;; Not sure if leaving out "[{" might lead to false positives.
+ (,(rx "\\" (+ alnum) (any "[{")) latex-mode)
+ ;; Right now, this will match a lot of stuff. Once we are capable
+ ;; of determining major-mode from tags, site, and comments, this
+ ;; will work as a last case fallback.
+ (,(rx (or (and "int" (+ space) "main" (* space) "("))) c-mode)
)
"List of cons cells determining which major-mode to use when.
Each car is a rule and each cdr is a major-mode. The first rule