unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* What is wrong with this doc comment
@ 2011-06-08  4:47 Ben Key
  2011-06-08  6:47 ` Eli Zaretskii
  2011-06-08  8:35 ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Key @ 2011-06-08  4:47 UTC (permalink / raw)
  To: Emacs Development

Hello,

The following is the doc comment I am using for my new
ns-keychain-create-item function.  It does not yield the expected
results.

doc: /* Create a new item in KEYCHAIN with label ITEM and password PASSWORD.
The remaining arguments are optional.  They specify attributes for the keychain
item in the form of key-value pairs.  The keys are keyword symbols, starting
with a colon.

Example:
  \(secrets-create-item \"Tramp collection\" \"item\" \"geheim\"
   :method \"sudo\" :user \"joe\" :host \"remote-host\"\)

The object path of the created item is returned. */

The resulting help message is as follows.

ns-keychain-create-item is a built-in function in `C source code'.

(ns-keychain-create-item ARG1 ARG2 ARG3 &rest REST)

Create a new item in KEYCHAIN with label ITEM and password PASSWORD.
The remaining arguments are optional.  They specify attributes for the keychain
item in the form of key-value pairs.  The keys are keyword symbols, starting
with a colon.

Example:
  (secrets-create-item "Tramp collection" "item" "geheim"
   :method "sudo" :user "joe" :host "remote-host")

The object path of the created item is returned.


Why does the help message have ARG1 ARG2 ARG3 &rest REST instead of
KEYCHAIN ITEM PASSWORD?

Thanks.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is wrong with this doc comment
  2011-06-08  4:47 What is wrong with this doc comment Ben Key
@ 2011-06-08  6:47 ` Eli Zaretskii
  2011-06-08  8:35 ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2011-06-08  6:47 UTC (permalink / raw)
  To: Ben Key; +Cc: Emacs-devel

> From: Ben Key <bkey76@gmail.com>
> Date: Tue, 7 Jun 2011 23:47:07 -0500
> 
> Why does the help message have ARG1 ARG2 ARG3 &rest REST instead of
> KEYCHAIN ITEM PASSWORD?

The doc string alone is not enough to answer that.  Please show the
beginning of your DEFUN form, up to and including the argument list.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is wrong with this doc comment
  2011-06-08  4:47 What is wrong with this doc comment Ben Key
  2011-06-08  6:47 ` Eli Zaretskii
@ 2011-06-08  8:35 ` Andreas Schwab
  2011-06-08 15:48   ` Ben Key
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2011-06-08  8:35 UTC (permalink / raw)
  To: Ben Key; +Cc: Emacs Development

Ben Key <bkey76@gmail.com> writes:

> Why does the help message have ARG1 ARG2 ARG3 &rest REST instead of
> KEYCHAIN ITEM PASSWORD?

Because you didn't declare the names.  See widget-apply for an example.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is wrong with this doc comment
  2011-06-08  8:35 ` Andreas Schwab
@ 2011-06-08 15:48   ` Ben Key
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Key @ 2011-06-08 15:48 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Emacs Development

On Wed, Jun 8, 2011 at 3:35 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Because you didn't declare the names.  See widget-apply for an example.

Thanks.  You gave me the clue I needed to figure it out.  I needed to
add something like the following to my doc comment.

usage: (ns-keychain-create-item COLLECTION ITEM PASSWORD &rest ATTRIBUTES)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-08 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-08  4:47 What is wrong with this doc comment Ben Key
2011-06-08  6:47 ` Eli Zaretskii
2011-06-08  8:35 ` Andreas Schwab
2011-06-08 15:48   ` Ben Key

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).