Subject: bug#4565 closed by Glenn Morris <[email-masked]> (Re: Bug#4565; [Patch] The doctor thinks that "family" is an adverb)

From: [email-masked] (Emacs bug Tracking System)
Date: Sat, 17 Oct 2009 03:20:06 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#4565: 23.1.50; [Patch] The doctor thinks that "family" is an adverb

It has been closed by Glenn Morris <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Glenn Morris <[email-masked]> by
replying to this email.

-- 
4565: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4565
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Re: Bug#4565; [Patch] The doctor thinks that "family" is an adverb
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Fri, 16 Oct 2009 23:10:43 -0400

Thanks; applied.

Subject: 23.1.50; [Patch] The doctor thinks that "family" is an adverb
From: Ulrich Mueller <[email-masked]>
To: [email-masked]
Date: Sun, 27 Sep 2009 16:57:56 +0200

When calling "psychoanalyze-pinhead" in Emacs from today's CVS trunk,
but with the yow.lines file restored from Emacs 21, it stops at a
phrase containing the word "family".

To reproduce:
   $ emacs -Q
   M-x doctor RET
   While I'm in LEVITTOWN I thought I'd like to see the NUCLEAR FAMILY!!
   RET RET

Actual behaviour:
   Minibuffer prompt "family what ?" appears.

Expected behaviour:
   Doctor printing an answer like "Tell me something about your family."

The problem is in function doctor-adverbp which recognises all words
ending with "ly" as adverbs. The patch included below fixes it for
some common words.

(Actually, there are many more non-adverbs ending with "ly". I've
limited it to words contained in the list of 850 words of Ogden's
Basic English, or in yow.lines.)

Ulrich

2009-09-27  Ulrich Mueller  <[email-masked]>

	* play/doctor.el (doctor-adverbp): Exclude some common nouns.

--- emacs-orig/lisp/play/doctor.el
+++ emacs/lisp/play/doctor.el
@@ -1190,7 +1190,8 @@
 (defun doctor-adverbp (xx)
   (let ((xxstr (doctor-make-string xx)))
     (and (>= (length xxstr) 2)
-	 (string-equal (substring (doctor-make-string xx) -2) "ly"))))
+	 (string-equal (substring (doctor-make-string xx) -2) "ly")
+	 (not (memq xx '(family fly jelly rally))))))
 
 (defun doctor-articlep (x)
   (memq x '(the a an)))