all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs'
@ 2013-09-24 15:13 Drew Adams
  2013-09-24 15:24 ` Drew Adams
  2014-02-10  4:26 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 6+ messages in thread
From: Drew Adams @ 2013-09-24 15:13 UTC (permalink / raw)
  To: 15455

The Value Menu in Customize wrongly give the user no way to specify an
arbitrary predicate, and wrongly gives the impression that the option
value must be one of the two predicates presented (or nil).

The :type spec should provide a third possibility for the menu: an
arbitrary function (which is used as a predicate).

That menu item's :tag should make clear that the function is used as
a predicate: nil means..., non-nil means....

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-09-20 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'





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

* bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs'
  2013-09-24 15:13 bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs' Drew Adams
@ 2013-09-24 15:24 ` Drew Adams
  2014-02-10  4:21   ` Lars Ingebrigtsen
  2014-02-10  4:26 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Drew Adams @ 2013-09-24 15:24 UTC (permalink / raw)
  To: 15455

Also, the doc should not just say that the predicate "should be a
predicate function such as `yes-or-no-p'. That is confusing and not
very meaningful.  What does it mean to be a predicate "such as
`yes-or-no-p'?

It should say that it is a function that is used as a predicate.
It should say what true and false return values mean (what they do).
And it should say that the function must accept at least one argument.





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

* bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs'
  2013-09-24 15:24 ` Drew Adams
@ 2014-02-10  4:21   ` Lars Ingebrigtsen
  2014-02-10  6:00     ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-10  4:21 UTC (permalink / raw)
  To: Drew Adams; +Cc: 15455

Drew Adams <drew.adams@oracle.com> writes:

> Also, the doc should not just say that the predicate "should be a
> predicate function such as `yes-or-no-p'. That is confusing and not
> very meaningful.  What does it mean to be a predicate "such as
> `yes-or-no-p'?

I think examples like that can be helpful, especially with variables
like `confirm-kill-emacs' that non-experienced Emacs users happen upon.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

* bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs'
  2013-09-24 15:13 bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs' Drew Adams
  2013-09-24 15:24 ` Drew Adams
@ 2014-02-10  4:26 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-10  4:26 UTC (permalink / raw)
  To: Drew Adams; +Cc: 15455

Drew Adams <drew.adams@oracle.com> writes:

> The Value Menu in Customize wrongly give the user no way to specify an
> arbitrary predicate, and wrongly gives the impression that the option
> value must be one of the two predicates presented (or nil).
>
> The :type spec should provide a third possibility for the menu: an
> arbitrary function (which is used as a predicate).

Fixed on trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

* bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs'
  2014-02-10  4:21   ` Lars Ingebrigtsen
@ 2014-02-10  6:00     ` Drew Adams
  2014-02-10  6:07       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2014-02-10  6:00 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 15455

> > Also, the doc should not just say that the predicate "should be a
> > predicate function such as `yes-or-no-p'. That is confusing and
> > not very meaningful.  What does it mean to be a predicate "such as
> > `yes-or-no-p'?
> 
> I think examples like that can be helpful, especially with variables
> like `confirm-kill-emacs' that non-experienced Emacs users happen
> upon.

I think what you are suggesting is to correct the language to
say

"If non-nil the value should be a predicate, for example
`yes-or-no-p'."

That would be fine.  The point is that the current language says
that it not only should be a predicate, but a predicate of a
certain kind, namely in some unspecified way similar to
`yes-or-no-p'.  But that is not the case.  The predicate can
check the phase of the moon if you want.





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

* bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs'
  2014-02-10  6:00     ` Drew Adams
@ 2014-02-10  6:07       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-10  6:07 UTC (permalink / raw)
  To: Drew Adams; +Cc: 15455

Drew Adams <drew.adams@oracle.com> writes:

> I think what you are suggesting is to correct the language to
> say
>
> "If non-nil the value should be a predicate, for example
> `yes-or-no-p'."

Yeah, that's better.  Fixed on trunk.
-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

end of thread, other threads:[~2014-02-10  6:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-24 15:13 bug#15455: 24.3.50; wrong defcustom :type for `confirm-kill-emacs' Drew Adams
2013-09-24 15:24 ` Drew Adams
2014-02-10  4:21   ` Lars Ingebrigtsen
2014-02-10  6:00     ` Drew Adams
2014-02-10  6:07       ` Lars Ingebrigtsen
2014-02-10  4:26 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.