Function: mh-index-add-implicit-ops
mh-index-add-implicit-ops is a byte-compiled function defined in
mh-search.el.gz.
Signature
(mh-index-add-implicit-ops TOKENS)
Documentation
Add implicit operators in the list TOKENS.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
(defun mh-index-add-implicit-ops (tokens)
"Add implicit operators in the list TOKENS."
(let ((result ())
(literal-seen nil)
current)
(while tokens
(setq current (pop tokens))
(cond ((or (equal current ")") (equal current "and") (equal current "or"))
(setq literal-seen nil)
(push current result))
((and literal-seen
(push "and" result)
(setq literal-seen nil)
nil))
(t
(push current result)
(unless (or (equal current "(") (equal current "not"))
(setq literal-seen t)))))
(nreverse result)))