Docs: Update docstrings

To comply with checkdoc.
This commit is contained in:
Adam Porter 2019-07-16 13:49:41 -05:00
parent 04725bb900
commit 42138e2673
2 changed files with 6 additions and 4 deletions

View file

@ -294,7 +294,7 @@ dates in the past, and negative for dates in the future."
(defun org-ql-agenda--format-element (element) (defun org-ql-agenda--format-element (element)
;; This essentially needs to do what `org-agenda-format-item' does, ;; This essentially needs to do what `org-agenda-format-item' does,
;; which is a lot. We are a long way from that, but it's a start. ;; which is a lot. We are a long way from that, but it's a start.
"Return ELEMENT as a string with its text-properties set according to its property list. "Return ELEMENT as a string with text-properties set by its property list.
Its property list should be the second item in the list, as returned by `org-element-parse-buffer'." Its property list should be the second item in the list, as returned by `org-element-parse-buffer'."
(let* ((properties (cadr element)) (let* ((properties (cadr element))
;; Remove the :parent property, which so bloats the size of ;; Remove the :parent property, which so bloats the size of
@ -364,6 +364,7 @@ Its property list should be the second item in the list, as returned by `org-ele
'org-habit-p habit-property)))) 'org-habit-p habit-property))))
(defun org-ql-agenda--add-faces (element) (defun org-ql-agenda--add-faces (element)
"Return ELEMENT with deadline and scheduled faces added."
(->> element (->> element
(org-ql-agenda--add-scheduled-face) (org-ql-agenda--add-scheduled-face)
(org-ql-agenda--add-deadline-face))) (org-ql-agenda--add-deadline-face)))
@ -465,6 +466,7 @@ property."
element)) element))
(defun org-ql-agenda--add-todo-face (keyword) (defun org-ql-agenda--add-todo-face (keyword)
"Return KEYWORD with TODO face added."
(when-let ((face (org-get-todo-face keyword))) (when-let ((face (org-get-todo-face keyword)))
(org-add-props keyword nil 'face face))) (org-add-props keyword nil 'face face)))

View file

@ -355,7 +355,7 @@ from within ELEMENT's buffer."
element)) element))
(defun org-ql--sanity-check-form (form) (defun org-ql--sanity-check-form (form)
"Signal an error if any of the forms in BODY do not have their preconditions met. "Signal error if any forms in FORM do not have preconditions met.
Or, when possible, fix the problem." Or, when possible, fix the problem."
(cl-flet ((check (symbol) (cl-flet ((check (symbol)
(cl-case symbol (cl-case symbol
@ -535,7 +535,7 @@ comparator, PRIORITY should be a priority string."
(org-ql--defpredicate property (property &optional value) (org-ql--defpredicate property (property &optional value)
"Return non-nil if current entry has PROPERTY (a string), and optionally VALUE (a string)." "Return non-nil if current entry has PROPERTY (a string), and optionally VALUE (a string)."
(pcase property (pcase property
('nil (user-error "Property matcher requires a PROPERTY argument.")) ('nil (user-error "Property matcher requires a PROPERTY argument"))
(_ (pcase value (_ (pcase value
('nil ('nil
;; Check that PROPERTY exists ;; Check that PROPERTY exists
@ -860,7 +860,7 @@ A and B are Org headline elements. TYPE should be a symbol like
(org-element-property type b))) (org-element-property type b)))
(defun org-ql--date< (a b) (defun org-ql--date< (a b)
"Return non-nil if A's deadline or scheduled element property is earlier than B's. "Return non-nil if A's deadline or scheduled property is earlier than B's.
Deadline is considered before scheduled." Deadline is considered before scheduled."
(cl-macrolet ((ts (item) (cl-macrolet ((ts (item)
`(or (org-element-property :deadline ,item) `(or (org-element-property :deadline ,item)