emacs-devel
[Top][All Lists]
Advanced

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

Re: bookmark.el and lisp/gnus/gnus-bookmark.el


From: Karl Fogel
Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el
Date: Fri, 07 Mar 2008 13:08:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Bastien Guerry <address@hidden> writes:
> My single remaining hesitation is this one: having two buffer local
> variables is a bit too much, since each mode would have to set them
> both.  Better use `bookmark-make-record-function' for both purposes:
> returning a name *or* returning a record.

Ick :-).  I don't think having an optional argument change the return
semantics of the function would be a good solution.

Remember, we're already asking external callers to implement two
bookmark functions: the make-record function, and the jump function.
Adding make-name to that is no great burden: clearly, any caller for who
`buffer-file-name' or any of the other default fallbacks won't suffice
is going to have to implement a name generator.  Whether they do that as
a separate function or not doesn't change the burden.

I would suggest writing a `bookmark-initialize' function that sets up
whatever local variables are necessary.  That way, that function's doc
string can remind people what interfaces they have to implement, and
they can go read up more on those interfaces.

> I think it's easier.  Each mode should have to worry about one
> buffer-local variable (and each dev would only read one docstring...)

See above about setting buffer-local and having a doc string.

-Karl




reply via email to

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