0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 20:37:51 +00:00

org.el: Use user-error' in org-back-to-heading'

* lisp/org.el (org-back-to-heading): Use `user-error'.
This commit is contained in:
Bastien 2020-01-26 17:50:27 +01:00
parent f9c34a7d51
commit 081d571a3d

View file

@ -20576,8 +20576,9 @@ interactive command with similar behavior."
"Call `outline-back-to-heading', but provide a better error message."
(condition-case nil
(outline-back-to-heading invisible-ok)
(error (error "Before first headline at position %d in buffer %s"
(point) (current-buffer)))))
(error
(user-error "Before first headline at position %d in buffer %s"
(point) (current-buffer)))))
(defun org-back-to-heading-or-point-min (&optional invisible-ok)
"Go back to heading or first point in buffer.