[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bookmark.el and lisp/gnus/gnus-bookmark.el
From: |
Stefan Monnier |
Subject: |
Re: bookmark.el and lisp/gnus/gnus-bookmark.el |
Date: |
Fri, 07 Mar 2008 16:51:54 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>> 2. Use `bookmark-make-name-function' function in `bookmark-set' instead
>>> of `bookmark-make-record-function':
>> You mean for making it buffer-local, right?
> Right!
I do not understand. Bookmark.el shouldn't make any of those variables
buffer-local, AFAICT.
>> But wouldn't we need to make them *both* buffer-local? External code
>> will still need to call `bookmark-make-record-function' too.
> Yes, they should be both buffer-local.
Let the modes that use them call make-local-variable.
> 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.
> For example, the function for text files would look like:
> (defun bookmark-make-record-for-text-file (annotation &optional name)
> "Return the record.
> If optional arg NAME is non-nil, just return the default name for
> this bookmark."
> ...)
> I think it's easier. Each mode should have to worry about one
> buffer-local variable (and each dev would only read one docstring...)
This might work, tho I'd throw away the `name' arg. Let the
buffer-local function build a bookmark record (i.e. a cons cell of the
form (NAME . ALIST)) with any name it chooses, and then change the name
according to the user's choice. I.e. make the bookmark record before
even prompting the user for a name.
Stefan
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, (continued)
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Tassilo Horn, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Tassilo Horn, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien Guerry, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien Guerry, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el,
Stefan Monnier <=
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/07
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Bastien, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Stefan Monnier, 2008/03/08
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Karl Fogel, 2008/03/09
- Re: bookmark.el and lisp/gnus/gnus-bookmark.el, Reiner Steib, 2008/03/08