Function: gnus-search-query-next-expr
gnus-search-query-next-expr is a byte-compiled function defined in
gnus-search.el.gz.
Signature
(gnus-search-query-next-expr &optional COUNT HALT)
Documentation
Return the next expression from the current buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-search.el.gz
(defun gnus-search-query-next-expr (&optional count halt)
"Return the next expression from the current buffer."
(let ((term (gnus-search-query-next-term count))
(next (gnus-search-query-peek-symbol)))
;; Deal with top-level expressions. And, or, not, near... What
;; else? Notmuch also provides xor and adj. It also provides a
;; "nearness" parameter for near and adj.
(cond
;; Handle 'expr or expr'
((and (eq next 'or)
(null halt))
(list 'or term (gnus-search-query-next-expr 2)))
;; Handle 'near operator.
((eq next 'near)
(let ((near-next (gnus-search-query-next-expr 2)))
(if (and (stringp term)
(stringp near-next))
(list 'near term near-next)
(signal 'gnus-search-parse-error
(list "\"Near\" keyword must appear between two plain strings.")))))
;; Anything else
(t term))))