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>
This commit is contained in:
Nicolas Goaziou 2015-05-19 23:12:17 +02:00
parent ed74e5bb9b
commit de8302c65a
1 changed files with 1 additions and 1 deletions

View File

@ -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")))))