Re: What does the argument list in C-h f delete-duplicates mean?

Aidan Kehoe <[email protected]>
Newsgroups gmane.emacs.xemacs.beta
Message-ID <[email protected]>
Hello Alan,

 Ar an cúigiú lá de mí Meitheamh, scríobh Alan Mackenzie: 

 > When I do C-h f delete-duplicates, the resulting text starts off:
 > 
 > `delete-duplicates' is a built-in function
 >   -- loaded from "/home/acm/emacs/xemacs.hg/xemacs/src/sequence.c"
 > (delete-duplicates SEQUENCE &key (TEST #'eql) (KEY #'identity) (START 0) END FROM-END TEST-NOT)
 > 
 > .  What does this mean?  In particular, I have never seen parenthesised
 > expressions, such as "(TEST #'eql)" inside an argument list before.  The
 > XEmacs manual (page "Name Help") doesn't explain this.  Are TEST, KEY
 > and START some sort of optional parameters, or what?

Yes, they’re optional keyword parameters, as also used, for example, by
#'make-hash-table. The docstring for defun* goes into more detail on the
syntax.

I have been considering moving the extra functionality offered by defun* into
defun, but there are possible bootstrapping complications; if I do it I’ll
move the relevant documentation into the defun docstring, if I don’t I’ll add
a cross-reference to all the C functions that use keywords. Thanks for
pointing out the weakness in our docs!

Best,

Aidan

-- 
‘Tramadol is further fed to cattle […] when working them […] (as draft
animals) so that the animals do not get tired quickly. …’
	— Angewandte Chemie, Sept 2014, describing the social context of
	(synthetic) tramadol having been found in Cameroon tree roots.

_______________________________________________
XEmacs-Beta mailing list
[email protected]
http://lists.xemacs.org/mailman/listinfo/xemacs-beta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.