Procházet zdrojové kódy

org-eldoc: Handle source blocks with empty language

* contrib/lisp/org-eldoc.el (org-eldoc-get-src-header): When inserting
  a new src block, the language may not yet be chosen when this is
  called.
Fabrice Popineau před 8 roky
rodič
revize
ebe7aa6692
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      contrib/lisp/org-eldoc.el

+ 1 - 1
contrib/lisp/org-eldoc.el

@@ -70,7 +70,7 @@
       (save-match-data
         (when (looking-at "^[ \t]*#\\+\\(begin\\|end\\)_src")
           (setq info (org-babel-get-src-block-info 'light)
-                lang (propertize (nth 0 info) 'face 'font-lock-string-face)
+                lang (propertize (or (nth 0 info) "no lang") 'face 'font-lock-string-face)
                 hdr-args (nth 2 info))
           (concat
            lang