Przeglądaj źródła

Merge branch 'maint'

Bastien Guerry 3 lat temu
rodzic
commit
e6d9b642c9
1 zmienionych plików z 2 dodań i 5 usunięć
  1. 2 5
      lisp/org.el

+ 2 - 5
lisp/org.el

@@ -18884,15 +18884,12 @@ ELEMENT."
       ((and
 	(eq org-adapt-indentation 'headline-data)
         (or (memq type '(planning clock node-property property-drawer drawer))
-            ;; FIXME: when storing a note in a LOGBOOK drawer,
+            ;; When storing a note in a LOGBOOK drawer,
             ;; `org-store-log-note' needs to insert a new line before
             ;; the newly inserted note, thus the `type' at point will
             ;; return `paragraph' instead of the expected `drawer', so
             ;; we need to manually detect the drawer.
-            (and (looking-at-p "^$")
-                 (save-excursion
-                   (backward-char)
-                   (looking-back org-drawer-regexp (point-at-bol))))))
+            (eq (org-element-type (car (org-element-lineage element))) 'drawer)))
        (org--get-expected-indentation
 	(org-element-property :parent element) t))
       ((memq type '(headline inlinetask nil))