[Top][All Lists]

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

Re: `overlay-arrow-position' should be automatically buffer-local

From: Ryan Yeske
Subject: Re: `overlay-arrow-position' should be automatically buffer-local
Date: Tue, 18 Oct 2005 23:34:03 -0700

   I think you've always been able to make overlay-arrow-position buffer-local.
   The problem arises when two arrows try to display in the _same_ buffer, then
   the local value masks the global value.  Perhaps this will never happen in
   Gnus, but in case it does, a good way is to use overlay-arrow-variable-list
   (which _is_ new to to Emacs 22):

Well, the following doesn't work in 21.3 but does in recent cvs
versions (I get an arrow in each buffer in the latter):

  (switch-to-buffer "buf1")
  (make-variable-buffer-local 'overlay-arrow-position)
  (setq overlay-arrow-position (make-marker))
  (set-marker overlay-arrow-position (point-min))
  (with-current-buffer (pop-to-buffer "buf2")
    (make-variable-buffer-local 'overlay-arrow-position)
    (setq overlay-arrow-position (make-marker))
    (set-marker overlay-arrow-position (point-min))))

Maybe I'm missing something, but I don't see why you need to use
`overlay-arrow-variable-list' since you can just make
`overlay-arrow-position' buffer local where you need it and get a
local arrow that way.  Or is that abusing `overlay-arrow-position'
which might be intended to be a single global arrow?

reply via email to

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