/[emacs]/emacs/lisp/play/doctor.el
ViewVC logotype

Diff of /emacs/lisp/play/doctor.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by gerd, Tue Oct 23 16:15:39 2001 UTC revision 1.28 by rms, Mon Sep 9 00:25:09 2002 UTC
# Line 909  Otherwise call the Doctor to parse prece Line 909  Otherwise call the Doctor to parse prece
909                          'sentence 'used 'was                          'sentence 'used 'was
910                          "..."                          "..."
911                          '(// bak))))                          '(// bak))))
912       ((memq (car sent) '(do has have how when where who why))
913        (doctor-type ($ qlist)))
914     ;;   ((eq (car sent) 'forget)     ;;   ((eq (car sent) 'forget)
915     ;;    (set (doctor-cadr sent) nil)     ;;    (set (doctor-cadr sent) nil)
916     ;;    (doctor-type '(($ isee)($ please)     ;;    (doctor-type '(($ isee)($ please)
917     ;;     ($ continue)\.)))     ;;     ($ continue)\.)))
918     (t     (t
919      (if (doctor-defq sent) (doctor-define sent found))      (if (doctor-defq sent) (doctor-define sent found))
920      (if (> (length sent) 12)(doctor-shorten sent))      (if (> (length sent) 12)(setq sent (doctor-shorten sent)))
921      (setq sent (doctor-correct-spelling (doctor-replace sent replist)))      (setq sent (doctor-correct-spelling (doctor-replace sent replist)))
922      (cond ((and (not (memq 'me sent))(not (memq 'i sent))      (cond ((and (not (memq 'me sent))(not (memq 'i sent))
923                  (memq 'am sent))                  (memq 'am sent))
# Line 956  Otherwise call the Doctor to parse prece Line 958  Otherwise call the Doctor to parse prece
958  (defun doctor-shorten (sent)  (defun doctor-shorten (sent)
959    "Make a sentence manageably short using a few hacks."    "Make a sentence manageably short using a few hacks."
960    (let (foo    (let (foo
961          retval          (retval sent)
962          (temp '(because but however besides anyway until          (temp '(because but however besides anyway until
963                      while that except why how)))                      while that except why how)))
964      (while temp      (while temp
965             (setq foo (memq (car temp) sent))             (setq foo (memq (car temp) sent))
966             (if (and foo             (if (and foo
967                      (> (length foo) 3))                      (> (length foo) 3))
968                 (setq sent foo                 (setq retval (doctor-fixup foo)
969                       sent (doctor-fixup sent)                       temp nil)
                      temp nil  
                      retval t)  
970                 (setq temp (cdr temp))))                 (setq temp (cdr temp))))
971      retval))      retval))
972    
# Line 1540  Hack on previous word, setting global va Line 1540  Hack on previous word, setting global va
1540    (doctor-hates1))    (doctor-hates1))
1541    
1542  (defun doctor-hates1 ()  (defun doctor-hates1 ()
1543    (doctor-type '(($ whysay)(list subj verb obj))))    (doctor-type '(($ whysay)(list subj verb obj) \?)))
1544    
1545  (defun doctor-loves ()  (defun doctor-loves ()
1546    (doctor-svo sent found 1 t)    (doctor-svo sent found 1 t)
# Line 1634  Hack on previous word, setting global va Line 1634  Hack on previous word, setting global va
1634    
1635  (defun doctor-chat () (doctor-type ($ chatlst)))  (defun doctor-chat () (doctor-type ($ chatlst)))
1636    
 (defun doctor-strangelove ()  
   (interactive)  
   (insert "Mein fuehrer!!\n")  
   (doctor-read-print))  
   
1637  (provide 'doctor)  (provide 'doctor)
1638    
1639  ;;; doctor.el ends here  ;;; doctor.el ends here

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26