Browse Source

Fix `org-next-block'

* lisp/org.el (org-next-block): Preserve match data, as specified in
  the docstring.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97707>
Nicolas Goaziou 9 years ago
parent
commit
de8302c65a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -24391,7 +24391,7 @@ Throw an error if no block is found."
 	  (decf count))))
     (if (= count 0)
 	(prog1 (goto-char (org-element-property :post-affiliated last-element))
-	  (org-show-context))
+	  (save-match-data (org-show-context)))
       (goto-char origin)
       (user-error "No %s code blocks" (if backward "previous" "further")))))