bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: (doc) bug for menu-bar-mode


From: Andreas Schwab
Subject: Re: (doc) bug for menu-bar-mode
Date: 10 Dec 2001 22:36:08 +0100
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.1.30

"Chris F.A. Johnson" <address@hidden> writes:

|> On Sun, 9 Dec 2001, Eli Zaretskii wrote:
|> 
|> >
|> > On 8 Dec 2001, Allan Gottlieb wrote:
|> >
|> > > The doc for menu-bar-mode
|> > >
|> > >     menu-bar-mode is an interactive compiled Lisp function in `menu-bar'.
|> > >     (menu-bar-mode FLAG)
|> > >
|> > >     Toggle display of a menu bar on each frame.
|> > >     This command applies to all frames that exist and frames to be
|> > >     created in the future.
|> > >     With a numeric argument, if the argument is positive,
|> > >     turn on menu bars; otherwise, turn off menu bars.
|> > >
|> > > suggests that (menu-bar-mode) is a toggle, i.e. that FLAG is
|> > > optional.
|> >
|> > I don't see where the doc string suggests that the FLAG argument is
|> > optional.  Could you please point out what confused you into thinking
|> > that?
|> 
|> It's implied in two places:
|> 
|>      1. Toggle refers to changing the state, in which case
|>         there is no need for an argument.
|>      2. "With a numeric argument", particularly after using the word
|>         "toggle", implies that it can be used either with a non-numeric
|>         argument, or without an argument.

In which way is this different from, say, overwrite-mode?

|> Also, the behaviour when called with 'M-x menu-bar-mode' is that of a
|> toggle, and it takes no argument.
|> 
|> The doc string should make it clear that, when used interactively, it is a
|> toggle which takes no argument; when evaluated as a lisp expression, it
|> requires a numeric argument.

It does not require a _numeric_ argument, you can just pass nil, to get
the same behaviour as if called interactively.

Andreas.

-- 
Andreas Schwab                                  "And now for something
address@hidden                          completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5



reply via email to

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