浏览代码

Backwards compatibility for `user-error´

* lisp/org-compat.el (user-error): Defalias to `error´ for Emacsen
  that don't have it.
Achim Gratz 12 年之前
父节点
当前提交
b9ea74a195
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      lisp/org-compat.el

+ 5 - 0
lisp/org-compat.el

@@ -169,6 +169,11 @@ If DELETE is non-nil, delete all those overlays."
 	(set-buffer-modified-p modified-p))
     (decompose-region beg end)))
 
+(eval-when-compile
+  ; user-error is only available from 24.2.50 on
+  (unless (fboundp 'user-error)
+    (defalias 'user-error 'error)))
+
 ;; Miscellaneous functions
 
 (defun org-add-hook (hook function &optional append local)