From: Yuji Minejima
Subject: cldoc.el 1.3 --- show Common Lisp function arglist in echo area
Date: 
Message-ID: <pan.2004.09.16.06.38.00.41479@nifty.ne.jp>
Hi, all.

This is an eldoc.el clone adapted for Common Lisp which works on Emacs
editor. 

cldoc.el automatically displays the function arguments and the macro
syntax rule of the one which you are currently editing.  For example, when
you enter `(getf <-!>', the following line should appear in the Emacs's
echo area, "getf: (PLIST INDICATOR &OPTIONAL DEFAULT) => VALUE".


This package is still at a pre alpha stage.  What I've done so far is just
writing an operator signature table and changing a display function. 
Currently almost all the code is from eldocl.el. But I think it's already
usefull.

Write the following code snippet in your .emacs file.
(autoload 'turn-on-cldoc-mode "cldoc" nil t)
(add-hook 'lisp-mode-hook 'turn-on-cldoc-mode)
(add-hook 'ilisp-mode-hook 'turn-on-cldoc-mode)
(add-hook 'slime-repl-mode-hook 'turn-on-cldoc-mode)
Slime users might want to change a binding of SPACE key.

The current signature table contains entries of CLHS dictionary pages of
conses, sequences, arrays, strings, types and classes, data and control
flow, and iteration.

I'll notify this thread of a new version release.
Any comments, ideas and patches are welcome.

You can find the latest cldoc.el at
http://homepage1.nifty.com/bmonkey/emacs/elisp/cldoc.el

Yuji.

From: Peter Seibel
Subject: Re: cldoc.el 1.3 --- show Common Lisp function arglist in echo area
Date: 
Message-ID: <m37jqucdok.fsf@javamonkey.com>
Yuji Minejima <········@nifty.ne.jp> writes:

> Hi, all.
>
> This is an eldoc.el clone adapted for Common Lisp which works on Emacs
> editor. 
>
> cldoc.el automatically displays the function arguments and the macro
> syntax rule of the one which you are currently editing.  For example, when
> you enter `(getf <-!>', the following line should appear in the Emacs's
> echo area, "getf: (PLIST INDICATOR &OPTIONAL DEFAULT) => VALUE".

How is this different from the similar functionality already built
into SLIME?

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp
From: R. Mattes
Subject: Re: cldoc.el 1.3 --- show Common Lisp function arglist in echo area
Date: 
Message-ID: <pan.2004.09.16.22.06.57.442455@mh-freiburg.de>
On Thu, 16 Sep 2004 17:47:55 +0000, Peter Seibel wrote:

> Yuji Minejima <········@nifty.ne.jp> writes:
> 
>> Hi, all.
>>
>> This is an eldoc.el clone adapted for Common Lisp which works on Emacs
>> editor. 
>>
>> cldoc.el automatically displays the function arguments and the macro
>> syntax rule of the one which you are currently editing.  For example, when
>> you enter `(getf <-!>', the following line should appear in the Emacs's
>> echo area, "getf: (PLIST INDICATOR &OPTIONAL DEFAULT) => VALUE".
> 
> How is this different from the similar functionality already built
> into SLIME?

Well, i assume it doesn't need a running lisp process :-)

 RalfD 
 
> -Peter
From: Yuji Minejima
Subject: Re: cldoc.el 1.3 --- show Common Lisp function arglist in echo area
Date: 
Message-ID: <pan.2004.09.16.23.18.14.601625@nifty.ne.jp>
On Thu, 16 Sep 2004 17:47:55 +0000, Peter Seibel wrote:

> How is this different from the similar functionality already built
> into SLIME?

* cldoc doesn't need a running lisp process as R. Mattes has already
  pointed out. Even if you have a running lisp process, parameter
  names of some implementations(e.g. GNU CLISP) are too terse to be
  informative.

* cldoc doesn't need to be taught when to display the information.
  the slime's functionality (slime-space) displays the information only
  when you enter the space key. When reading someone else's code like the
  following,
  (subtypep type1 type2)
  with cldoc, moving the point inside the form (probably by clicking a
  mouse botton) will triger cldoc to display the following information.
  "subtypep: (SUBTYPE TYPE &optional ENVIRONMENT) => SUBTYPE-P, VALID-P"
  and you'll learn type1 is supposed to be a subtype.

* cldoc displays the information on functions' return values.
  "gethash: (KEY HASH-TABLE &optional DEFAULT => VALUE, PRESENT-P"
  I think this is useful when you write multiple-value-bind form to
  receive the results.

* cldoc can display syntax rules.
  cldoc: "throw: tag-form result-form =>|"
  slime-space with cmucl: "(throw &rest stuff)"
  By using the term TAG-FORM, programmers will know a tag symbol should be
  quoted.

* cldoc and slime-space are not mutually exclusive.
  cldoc can pass the task to slime-space when it encounters an unknown
  function.  I intend to write such code when I finish the signature
  table.

Regards,

Yuji.
From: Yuji Minejima
Subject: Re: cldoc.el 1.3 --- show Common Lisp function arglist in echo area
Date: 
Message-ID: <pan.2004.09.17.04.05.13.338757@nifty.ne.jp>
On Fri, 17 Sep 2004 08:18:15 +0900, Yuji Minejima wrote:

> * cldoc doesn't need to be taught when to display the information.
>   ...
Oops! I didn't notice slime-autodoc-mode. So this point doesn't hold.


> cldoc can pass the task to slime-space when it encounters an unknown
> function.  I intend to write such code when I finish the signature
> table.
I just implemented this for slime.
I also wrote some code for ilisp but it needs some polishing up, so it's
disabled now.


I guess code for interaction with slime-autodoc-mode would be nice
(e.g. displaying the value of a global-variable)


I wonder whether ilisp's development is still continuing.
I still use ilisp with no good reason (actually there is one but it's
too trivial).  I use clisp most of the time.  Any suggestions?

Any comments or wishes are welcome.

cldoc.el version 1.4
http://homepage1.nifty.com/bmonkey/emacs/elisp/cldoc.el
From: Yuji Minejima
Subject: Re: cldoc.el 1.6 --- show Common Lisp operators' information in echo area
Date: 
Message-ID: <pan.2004.09.17.06.40.54.104171@nifty.ne.jp>
On Thu, 16 Sep 2004 15:38:00 +0900, Yuji Minejima wrote:

The signature table is completed. Now it contains all the entries of CLHS
dictionary pages (only operators, not variables and constants).

Experimentally, multiple line syntax rules are used for handler-case,
defpackage, etc. Tell me how you feel about it.
Also, how about a long parameter name like the one in
"find-package: (STRING-DESIGNATOR-OR-PACKAGE) => PACKAGE" ?

I'll touch up the entries when I find a more appropriate name or format.

To slime users, please tell me how to disable slime-space binding
and restore the normal space binding cleanly. I'd like to write about
it in the documentation.

You can find the latest cldoc.el at
http://homepage1.nifty.com/bmonkey/emacs/elisp/cldoc.el
 
Yuji.
From: Yuji Minejima
Subject: Re: cldoc.el 1.10 --- show Common Lisp operators and variables information in echo area
Date: 
Message-ID: <pan.2004.09.18.03.27.23.526774@nifty.ne.jp>
I enhanced the interaction with slime.

Now, cldoc uses slime's code to display information on unknown
functions and global variables.

I expect cldoc surpasses the functionality of slime-autodoc-mode with this
enhancement in the slime environment.  Please tell me if it's not.

You can find the latest cldoc.el at
http://homepage1.nifty.com/bmonkey/emacs/elisp/cldoc.el
  
Yuji.
From: Stefan Monnier
Subject: Re: cldoc.el 1.3 --- show Common Lisp function arglist in echo area
Date: 
Message-ID: <jwv3c1gzr7d.fsf-monnier+gnu.emacs.sources@gnu.org>
> Currently almost all the code is from eldocl.el. But I think it's already
> useful.

I recent versions of eldoc.el, you can use:

(defvar eldoc-print-current-symbol-info-function nil
  "If non-nil, function to call to return doc string.
The function of no args should return a one-line string for displaying
doc about a function etc. appropriate to the context around point.
It should return nil if there's no doc appropriate for the context.
Typically doc is returned if point is on a function-like name or in its
arg list.

This variable is expected to be made buffer-local by modes (other than
Emacs Lisp mode) that support Eldoc.")


        Stefan
From: Yuji Minejima
Subject: Re: cldoc.el 1.3 --- show Common Lisp function arglist in echo area
Date: 
Message-ID: <5c5533cb.0409181828.42071013@posting.google.com>
Stefan Monnier <·······@iro.umontreal.ca> wrote in message news:<·········································@gnu.org>...
> > Currently almost all the code is from eldocl.el. But I think it's already
> > useful.
> 
> I recent versions of eldoc.el, you can use:
> 
> (defvar eldoc-print-current-symbol-info-function nil
>   "If non-nil, function to call to return doc string.
> The function of no args should return a one-line string for displaying
> doc about a function etc. appropriate to the context around point.
> It should return nil if there's no doc appropriate for the context.
> Typically doc is returned if point is on a function-like name or in its
> arg list.
> 
> This variable is expected to be made buffer-local by modes (other than
> Emacs Lisp mode) that support Eldoc.")
> 
> 
>         Stefan

Thanks for the information. eldoc.el version 1.18 which I inherited
the code from seems not to have that.  I'll check to see if this
facility is general enough to support what I want to do in cldoc.el.

Yuji.