Function: org-priority-valid-value-p
org-priority-valid-value-p is a byte-compiled function defined in
org.el.gz.
Signature
(org-priority-valid-value-p PRIORITY &optional IGNORE-USER-BOUNDS)
Documentation
Return t if the PRIORITY is a valid priority value (0-64, A-Z), nil otherwise.
Also validate that the priority value is within the current bounds of
org-priority-lowest and org-priority-highest unless IGNORE-USER-BOUNDS is
non-nil.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-priority-valid-value-p (priority &optional ignore-user-bounds)
"Return t if the PRIORITY is a valid priority value (0-64, A-Z), nil otherwise.
Also validate that the priority value is within the current bounds of
`org-priority-lowest' and `org-priority-highest' unless IGNORE-USER-BOUNDS is
non-nil."
;; Although we can have either numeric or alphabetic priorities,
;; we simplify here by treating everything as integers because the ASCII
;; alphabetic range also fits in an integer range.
(and (integerp priority)
;; validate that the value is within valid ranges
(or (<= 0 priority 64)
(<= ?A priority ?Z))
;; more specifically, validate within the current high/low ranges
;; unless the caller is ignoring the range
(or ignore-user-bounds
(>= org-priority-lowest priority org-priority-highest))))