unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19104: eww.el vs. plist-put documentation (docstring, doc/lispref/lists.texi)
@ 2014-11-19 11:05 Ivan Shmakov
  2014-11-19 17:26 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Ivan Shmakov @ 2014-11-19 11:05 UTC (permalink / raw)
  To: 19104

Package:  emacs
Severity: minor

	The eww.el code currently relies on plist-put modifying the
	property list given.  This mainly concerns eww-data (as of the
	recent changes), but occasionally also other variables.

	This feature is, however, undocumented.  For instance, both the
	docstring (src/fns.c) and the reference (doc/lispref/lists.texi)
	suggest an explicit (setq var (plist-put var prop val)) form
	instead, and lispref/lists.texi in particular clearly omits the
	specific conditions under which the list passed will be modified
	in-place:

    […] It may modify plist destructively, or it may construct a new
    list structure without altering the old.  […]

	Briefly scanning over eww.el, I see no actual bugs that may
	arise from that given the current plist-put implementation
	(which apparently returns a new list if and only if given nil as
	the argument, and modifies the list given otherwise.)  Still, I
	don’t feel it all that nice to rely on such an undocumented
	behavior.

	If this behavior is, however, well-known by now, I guess it
	really deserves to be documented.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A





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

end of thread, other threads:[~2015-12-25  7:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19 11:05 bug#19104: eww.el vs. plist-put documentation (docstring, doc/lispref/lists.texi) Ivan Shmakov
2014-11-19 17:26 ` Lars Magne Ingebrigtsen
2014-11-20  4:31   ` Stefan Monnier
2014-11-21 18:43     ` Lars Magne Ingebrigtsen
2014-11-21 18:47       ` Lars Magne Ingebrigtsen
2014-11-22 16:17         ` Stefan Monnier
2014-11-20  4:47   ` Ivan Shmakov
2015-12-25  7:05   ` Lars Ingebrigtsen

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