> > Kim Storm created a variable overlay-arrow-variable-list to allow
 > > multiple overlay arrows (see info). I have used this for buffers
 > > displaying assembler in gdb-ui.el (gdb-overlay-arrow-position).
 > 
 > I tried to use overlay-arrow-variable-list, but can't display more
 > than one fringe arrow in one buffer.  I tried the code below:

I don't use more than one arrow per buffer.  However, I do think compile
should use overlay-arrow-variable-list instead of making
overlay-arrow-position a local variable. I now can reproduce the conflict that
Juan-Leon reports. GUD and Compile are operating on the same source buffer and
the local variable masks the global one when set in gud-display-line. The
global value is used to set window-point and this remains unchanged (from
nil):

(defun gud-display-line (true-file line)
...
> ***buffer = source buffer***
(with-current-buffer buffer
  (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer)
          (if (yes-or-no-p
               (format "File %s changed on disk.  Reread from disk? "
                       (buffer-name)))
              (revert-buffer t t)
            (setq gud-keep-buffer t)))
  (save-restriction
    (widen)
    (goto-line line)
    (setq pos (point))
    (setq overlay-arrow-string "=>")
    (or overlay-arrow-position
          (setq overlay-arrow-position (make-marker)))
    (set-marker overlay-arrow-position (point) (current-buffer)))
  (cond ((or (< pos (point-min)) (> pos (point-max)))
           (widen)
           (goto-char pos))))
> ***current buffer = GUD buffer***
(if window (set-window-point window overlay-arrow-position))))))

The reason that Kim hasn't seen the same problem when using Gnus and GUD
at the same time is probably because they don't share the same buffers.


Nick


_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to