GNU bug report logs -
#13926
24.3.50; doc string of `visual-line-mode'
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13926 in the body.
You can then email your comments to 13926 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13926
; Package
emacs
.
(Mon, 11 Mar 2013 20:21:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 11 Mar 2013 20:21:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The doc string is misleading wrt the argument when called from Lisp.
With a prefix argument ARG, enable Visual Line mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil.
This makes no connection between the interactive prefix arg and the arg
when called from Lisp. In particular, it can also give the incorrect
impression that the mode is enabled ONLY if ARG is omitted or nil.
There is nothing that suggests the behavior of a non-positive or
positive ARG when called from Lisp.
By way of contrast, the doc string of `define-minor-mode' correctly says
what the argument values do when called from Lisp:
When called from Lisp, the mode command toggles the mode if the
argument is `toggle', disables the mode if the argument is a
non-positive integer, and enables the mode otherwise (including
if the argument is omitted or nil or a positive integer).
This kind of careful description should probably be added automatically
to functions defined by `define-minor-mode', to prevent misleading doc
wrt the argument.
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
of 2013-03-04 on ODIEONE
Bzr revision: 111935 yamaoka <at> jpl.org-20130304102733-4qy111z41qwoh2as
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13926
; Package
emacs
.
(Sat, 08 Feb 2014 13:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 13926 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
> The doc string is misleading wrt the argument when called from Lisp.
>
> With a prefix argument ARG, enable Visual Line mode if ARG is
> positive, and disable it otherwise. If called from Lisp, enable
> the mode if ARG is omitted or nil.
>
> This makes no connection between the interactive prefix arg and the arg
> when called from Lisp. In particular, it can also give the incorrect
> impression that the mode is enabled ONLY if ARG is omitted or nil.
> There is nothing that suggests the behavior of a non-positive or
> positive ARG when called from Lisp.
>
> By way of contrast, the doc string of `define-minor-mode' correctly says
> what the argument values do when called from Lisp:
>
> When called from Lisp, the mode command toggles the mode if the
> argument is `toggle', disables the mode if the argument is a
> non-positive integer, and enables the mode otherwise (including
> if the argument is omitted or nil or a positive integer).
>
> This kind of careful description should probably be added automatically
> to functions defined by `define-minor-mode', to prevent misleading doc
> wrt the argument.
Everything defined by `define-minor-mode' follows this model, I think?
Should `define-minor-mode' just append that to the function doc strings
automatically, and then we can remove the half-assed ARG explanations
from all the callers?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 23 Sep 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.