summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2021-05-16 10:36:42 +0200
committerBastien <bzg@gnu.org>2021-05-16 10:36:42 +0200
commit4362b93018b9157861c9674a22c63730d406af50 (patch)
tree12aed402b8c563ebcb2abedd7c55b8cc114897b7
parentfdd70728a8486e56df4aafea1ab0d7c08851236c (diff)
parent9802877fbe442a52b4e63782b84921f46cf5d56b (diff)
downloadorg-mode-4362b93018b9157861c9674a22c63730d406af50.tar.gz
Merge branch 'maint'
-rw-r--r--doc/Makefile10
-rw-r--r--lisp/org-element.el4
-rw-r--r--testing/lisp/test-org-element.el3
3 files changed, 11 insertions, 6 deletions
diff --git a/doc/Makefile b/doc/Makefile
index dc68829..da5a07a 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -48,10 +48,10 @@ org-version.tex: orgcard.tex
install: org orgguide
if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
- $(CP) org $(DESTDIR)$(infodir)
- $(CP) orgguide $(DESTDIR)$(infodir)
- $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
- $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) orgguide
+ $(CP) org.info $(DESTDIR)$(infodir)
+ $(CP) orgguide.info $(DESTDIR)$(infodir)
+ $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org.info
+ $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) orgguide.info
clean:
$(RM) org orgguide *.pdf *.html *_letter.tex org-version.inc \
@@ -68,7 +68,7 @@ clean-install:
.SUFFIXES: .texi .tex .txt _letter.tex
%: %.texi org-version.inc
- $(MAKEINFO) --no-split $< -o $@
+ $(MAKEINFO) --no-split $< -o $@.info
# the following two lines work around a bug in some versions of texi2dvi
%.pdf: LC_ALL=C
diff --git a/lisp/org-element.el b/lisp/org-element.el
index a675bf5..ba4f0ea 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -737,7 +737,9 @@ Return a list whose CAR is `drawer' and CDR is a plist containing
Assume point is at beginning of drawer."
(let ((case-fold-search t))
- (if (not (save-excursion (re-search-forward "^[ \t]*:END:[ \t]*$" limit t)))
+ (if (not (save-excursion
+ (goto-char (min limit (line-end-position)))
+ (re-search-forward "^[ \t]*:END:[ \t]*$" limit t)))
;; Incomplete drawer: parse it as a paragraph.
(org-element-paragraph-parser limit affiliated)
(save-excursion
diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index 18991b5..dd91551 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -662,6 +662,9 @@ Some other text
(should-not
(org-test-with-temp-text ":TEST:"
(org-element-map (org-element-parse-buffer) 'drawer 'identity nil t)))
+ (should-not
+ (org-test-with-temp-text ":END:"
+ (org-element-map (org-element-parse-buffer) 'drawer 'identity nil t)))
;; Handle non-empty blank line at the end of buffer.
(should
(org-test-with-temp-text ":TEST:\nC\n:END:\n "