aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-07 22:33:55 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-07 22:33:55 -0200
commitc54fba393ee1b8fa62708c27f7ea1940d90d1859 (patch)
treed77fd3b7f4bcd932f9918039175153c342a8f70e
parent95e9f6069ba328249c0e8ac86efdc888437ac187 (diff)
Add latex-mode and c-mode
-rw-r--r--sx-babel.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/sx-babel.el b/sx-babel.el
index 4386172..e115817 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