emacs-devel
[Top][All Lists]
Advanced

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

window-dedicated-p's "window's dedicated object"


From: Juanma Barranquero
Subject: window-dedicated-p's "window's dedicated object"
Date: Fri, 25 May 2007 11:06:35 +0200

The Emacs Lisp Reference implies that the second argument for
`set-window-dedicated-p' (and the return value for
`window-dedicated-p') is just a flag. There's no indication that the
value you pass to set the window's dedication state is the one you'll
get back when you ask the window's state.

However, the implementation allows indeed to pass any value as window
dedication flag, and getting it back with window-dedicated-p. The
docstring for that function goes as far as calling the return value
"window's dedicated object".

I don't know what's so special about (set-)window-dedicated-p to merit
this behavior; (set-)buffer-modified-p, for example, treat their
argument as a simple flag:

 (progn
    (set-buffer-modified-p 'my-value)
    (buffer-modified-p))

=> t

and AFAICS, the special status of the dedication flag is used nowhere
in the sources (ffap.el prudently saves and restores it, but it does
not use the fact that it could be anything).

Anyway, I'm not proposing changing it, but if it is supported and
useful behavior (it is?), it should be more clearly stated in the
docstring and the Emacs Lisp Reference, I think.

            Juanma




reply via email to

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