[Top][All Lists]

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

Re: doc-view support for bookmark.el

From: Stefan Monnier
Subject: Re: doc-view support for bookmark.el
Date: Tue, 01 Jan 2008 21:18:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>>>> cleanest thing would probably be an association list:
>>>> '((buffer BUFFER) (point POINT))
>>> If you decide to change this, please use a plist, as in
>>> '(:buffer BUFFER :point POINT ...)
>> Why?

> Alists certainly are more generally useful and versatile, but for this
> kind of values, I find plists + keywords much simpler to use and
> understand than alists.

> E.g. it's trivial to make such a value:

>      (list :buffer (current-buffer) :point (point))

> However, if you decide an alist is better, shouldn't it be:

>  '((buffer . BUFFER) (point . POINT))

> using conses rather than lists as values ?

Yes, but the lists here are generated by Lisp code, not hard-coded, so
the extra " . " and the extra parentheses don't matter.

I consider plists to be an unfortunate accident in Lisp's life.


reply via email to

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