unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Built-in Functions and Special Forms
@ 2003-02-26 20:50 Artist
  2003-02-26 21:08 ` Barry Margolin
  2003-02-27  1:38 ` Pascal Bourguignon
  0 siblings, 2 replies; 8+ messages in thread
From: Artist @ 2003-02-26 20:50 UTC (permalink / raw)


Hi,
 I have been using emacs now for over an year.
 and now I like to know how I can do some work with lisp.
 
 How I can find the built-in functions for lisp:

 command-index for emacs or C-h f TAB won't work here cause it will
also give me the function defined in .el or .elc files.

 I am looking more like  more or less like:

(nth N LIST)
(eq OBJ1 OBJ2)
(> NUM1 NUM2)
(% X Y)

Similary for Special Forms:

 I am seeking the list like:

(defun NAME ARGLIST [DOCSTRING] BODY...)
(let VARLIST BODY...)
(if COND THEN ELSE...)
(setq SYM VAL SYM VAL ...)
(while TEST BODY...)
(function ARG)
(quote ARG)
(progn BODY ...)

Thanks for help in advance.

Artist.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Built-in Functions and Special Forms
@ 2003-02-27  4:02 Greg Hill
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Hill @ 2003-02-27  4:02 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 521 bytes --]

>At 2:38 AM +0100 2/27/03, Pascal Bourguignon wrote:
>>I've not found any predicate to distinguish between built-in functions
>>and special forms.
>
>In Emacs-21, the documentation is consistent enough that this seems 
>to always work.
>
>(defun special-form-p (symbol)
>     (string-match "\\.\\.\\.\\|&rest" (documentation symbol)))

Of course that should really be:

(defun special-form-p (symbol)
     (and (subrp (symbol-function symbol))
          (string-match "\\.\\.\\.\\|&rest" (documentation symbol))))

--Greg

[-- Attachment #1.2: Type: text/html, Size: 1399 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <mailman.2511.1046318512.21513.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2003-02-28 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-26 20:50 Built-in Functions and Special Forms Artist
2003-02-26 21:08 ` Barry Margolin
2003-02-27  0:02   ` Unknown
2003-02-27  1:38 ` Pascal Bourguignon
2003-02-27  3:42   ` Greg Hill
2003-02-27  7:31   ` Miles Bader
  -- strict thread matches above, loose matches on Subject: below --
2003-02-27  4:02 Greg Hill
     [not found] <mailman.2511.1046318512.21513.help-gnu-emacs@gnu.org>
2003-02-28 18:51 ` Artist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).