Function: doctor-subjsearch
doctor-subjsearch is a byte-compiled function defined in doctor.el.gz.
Signature
(doctor-subjsearch SENT KEY TYPE)
Documentation
Search for the subject of a sentence SENT, looking for the noun closest
to and preceding KEY by at least TYPE words. Set global variable doctor-subj
to the subject noun, and return the portion of the sentence following it.
Source Code
;; Defined in /usr/src/emacs/lisp/play/doctor.el.gz
(defun doctor-subjsearch (sent key type)
"Search for the subject of a sentence SENT, looking for the noun closest
to and preceding KEY by at least TYPE words. Set global variable `doctor-subj'
to the subject noun, and return the portion of the sentence following it."
(let ((i (- (length sent) (length (memq key sent)) type)))
(while (and (> i -1) (not (doctor-nounp (nth i sent))))
(setq i (1- i)))
(cond ((> i -1)
(setq doctor-subj (nth i sent))
(nthcdr (1+ i) sent))
(t
(setq doctor-subj 'you)
nil))))