[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

doc string of assoc-string

From: Drew Adams
Subject: doc string of assoc-string
Date: Fri, 4 Apr 2008 16:31:04 -0700

This is what C-h f shows:
(assoc-string KEY LIST &optional CASE-FOLD)
 Like `assoc' but specifically for strings (and symbols).
 Symbols are converted to strings, and unibyte strings are converted to
 multibyte for comparison.
 Case is ignored if optional arg CASE-FOLD is non-nil.
 As opposed to `assoc', it will also match an entry consisting of a single
 string rather than a cons cell whose car is a string.
The first line should say something similar to what the first line of
`assoc' says.
The rest needs to say specifically that both the KEY and the alist entries
can be symbols as well as strings, and alist entries can have cars that are
symbols or strings. None of that is obvious.
How about something like this:
 Return the first element in LIST whose key is string equivalent to KEY.
 KEY is a string or a symbol.
  If a symbol, its name is used for comparison.
  If a unibyte string, the equivalent multibyte string is used.
 LIST is an alist whose elements are strings, symbols, or cons cells whose
  cars are strings or symbols.
 Non-nil CASE-FOLD means case is ignored for comparison.
The first matching alist element is returned.
In GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600)
 of 2008-03-26 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]