From xemacs-m  Thu Jul 24 21:43:21 1997
Received: from news.smart.net (jmiller@max1p89.smart.net [206.97.127.89])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id VAA00477
	for <xemacs-beta@xemacs.org>; Thu, 24 Jul 1997 21:43:19 -0500 (CDT)
Received: (from jmiller@localhost)
          by news.smart.net (8.8.4/8.8.4)
	  id WAA07461; Thu, 24 Jul 1997 22:45:33 -0400
Date: Thu, 24 Jul 1997 22:45:33 -0400
Message-Id: <199707250245.WAA07461@news.smart.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Jeff Miller <jmiller@smart.net>
To: xemacs-beta@xemacs.org
Subject: Re: hyper apropos showing args in main listing?
In-Reply-To: <m290z2id5y.fsf@altair.xemacs.org>
References: <87hgdrs73j.fsf@bittersweet.inetarena.com>
	<m2vi2773q7.fsf@altair.xemacs.org>
	<199707191644.MAA00363@news.smart.net>
	<m290z2id5y.fsf@altair.xemacs.org>
X-Mailer: VM 6.33 under 20.3 "Vienna" XEmacs  Lucid (beta14)
Reply-to: jmiller@smart.net
X-Face: &vGrMZ?Q&W5~yiCR_#hat=$tgJrK`J=2$se?0Nu9I3G|I<2-\:82zx>kz=l8(yw)G1i&0"D
 <nv_e$^;,ftG6@Hn"did"G5i=X_-Z3Y

>>>>> "sb" == SL Baur <steve@xemacs.org> writes:

>> DEFUN ("defvar", Fdefvar, 1, UNEVALLED, 0, /*
>> (defvar SYMBOL INITVALUE DOCSTRING): define SYMBOL as a variable.
sb>  ...

>> maybe a bug in hyper-apropos.el ?

sb> Nope, it's using the first line of the docstring exactly as it
sb> should.

I've been looking at this stuff for a couple days now.  I tried hacking
make-docfile.c  and did get it to produce the right output. But that sorta 
goofed up the way hyper-apropos got the arguments for those functions that 
are coded in c.  

It is actually much easy to hack hyper-apropos.el to work around this.
There is already a quasi-hack in there to get the argument list.  I
propose doing essentially the same thing.  It seems cleaner and probably
easier to maintain in the long run.

The only problem is the doc string should have it's first char capitalized 
and I couldn't figure out an easy way to do it.   There is probably a
better way to construct that "if statement" as well.

--- lisp/packages/hyper-apropos.el.orig Thu Jul 24 22:35:40 1997
+++ lisp/packages/hyper-apropos.el      Thu Jul 24 22:36:18 1997
@@ -303,6 +303,11 @@
                         (if (natnump l) l 0)))
       (and hyper-apropos-show-brief-docs
           (setq doc (documentation fn))
+          (if  (string-match
+                "^([^\n\t )]+[\t ]*\\([^\n)]+\\)?)\\(:[\t ]*\\|\n?\\'\\)"
+                doc)
+              (setq doc (substring doc (match-end 0) (string-match "\n" doc)))
+            t )
           (insert-face (if doc
                            (concat " - "
                                    (substring doc 0 (string-match "\n" doc)))


