Function: org-require-package

org-require-package is a macro defined in org-macs.el.gz.

Signature

(org-require-package SYMBOL &optional NAME NOERROR)

Documentation

Try to load library SYMBOL and display error otherwise.

With optional parameter NAME, use NAME as package name instead of SYMBOL. Show warning instead of error when NOERROR is non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-macs.el.gz
;;; Macros

(defmacro org-require-package (symbol &optional name noerror)
  "Try to load library SYMBOL and display error otherwise.
With optional parameter NAME, use NAME as package name instead of
SYMBOL.  Show warning instead of error when NOERROR is non-nil."
  `(unless (require ,symbol nil t)
     (,(if noerror 'warn 'user-error)
      "`%s' failed to load required package \"%s\""
      this-command ,(or name symbol))))