diff options
author | Sean Allred <code@seanallred.com> | 2015-01-07 19:46:21 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-01-07 19:46:21 -0500 |
commit | 27136e435bc6928161df2e16e3e8528227eae014 (patch) | |
tree | d77fd3b7f4bcd932f9918039175153c342a8f70e /sx-babel.el | |
parent | 95e9f6069ba328249c0e8ac86efdc888437ac187 (diff) | |
parent | c54fba393ee1b8fa62708c27f7ea1940d90d1859 (diff) |
Merge pull request #219 from vermiculus/more-major-modes
Add latex-mode and c-mode
Diffstat (limited to 'sx-babel.el')
-rw-r--r-- | sx-babel.el | 6 |
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 |