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: Bastien Guerry
Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el
Date: 2008年3月07日 17:45:55 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Karl Fogel <address@hidden> writes:
>> (defun bookmark-buffer-name ()
>> "Return the name of the current buffer's file, non-directory.
>> In Info, return the current node."
>
> ...if we're going to have `bookmark-make-name-function' now, shouldn't
> Info mode implement that function just like any other mode would? Why
> have bookmark.el handle Info-related things?
Yes, we should move Info-related code out of bookmark.el.
>> 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!
> 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.
> The overall plan sounds reasonable to me, modulo the above questions.
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...)
> Although I've been guilty earlier in this thread of agreeing to readily
> without looking at the code, I have looked at the code this time, and
> still agree! :-)
Ok, I continue to agree ! Unless told otherwise (Tassilo?) I will
implement the solution with one single variable, and let Info-mode
set this variable accordingly.
-- 
Bastien

reply via email to

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

AltStyle によって変換されたページ (->オリジナル) /