浏览代码

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

* lisp/org.el (org-back-to-heading): Use `user-error'.
Bastien 5 年之前
父节点
当前提交
081d571a3d
共有 1 个文件被更改,包括 3 次插入2 次删除
  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.