Ver código fonte

babel: shorter language names no longer shadow larger names

  Previously "R" could overshadow "Ruby", and "C" could overshadow
  "Clojure", causing blocks of the longer language name to fail to
  load. This issue has now been fixed
Eric Schulte 15 anos atrás
pai
commit
fc28dd538b
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      contrib/babel/lisp/org-babel.el

+ 4 - 1
contrib/babel/lisp/org-babel.el

@@ -153,7 +153,10 @@ can not be resolved.")
   "Add INTERPRETER to `org-babel-interpreters' and update
 `org-babel-src-block-regexp' appropriately."
   (unless (member interpreter org-babel-interpreters)
-    (setq org-babel-interpreters (cons interpreter org-babel-interpreters))
+    (setq org-babel-interpreters
+          (sort (cons interpreter org-babel-interpreters)
+		(lambda (left right)
+		  (> (length left) (length right)))))
     (org-babel-set-interpreters 'org-babel-interpreters org-babel-interpreters)))
 
 (defcustom org-babel-interpreters '()