Browse Source

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

* lisp/org.el (org-back-to-heading): Use `user-error'.
Bastien 5 năm trước cách đây
mục cha
commit
081d571a3d
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -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.