Function: mh-index-evaluate
mh-index-evaluate is a byte-compiled function defined in
mh-search.el.gz.
Signature
(mh-index-evaluate OP-STACK OPERAND-STACK)
Documentation
Read expression till starting paren based on OP-STACK and OPERAND-STACK.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
(defun mh-index-evaluate (op-stack operand-stack)
"Read expression till starting paren based on OP-STACK and OPERAND-STACK."
(cl-block mh-index-evaluate
(let (op oper1)
(while op-stack
(setq op (pop op-stack))
(cond ((eq op 'paren)
(cl-return-from mh-index-evaluate (list op-stack operand-stack)))
((eq op 'not)
(push `(not ,(pop operand-stack)) operand-stack))
((or (eq op 'and) (eq op 'or))
(setq oper1 (pop operand-stack))
(push `(,op ,(pop operand-stack) ,oper1) operand-stack))))
(error "Ran out of tokens"))))