From c54fba393ee1b8fa62708c27f7ea1940d90d1859 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 7 Jan 2015 22:33:55 -0200 Subject: Add latex-mode and c-mode --- sx-babel.el | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3