emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: fringe arrow conflict between compile and gud?


From: Juri Linkov
Subject: Re: fringe arrow conflict between compile and gud?
Date: Thu, 31 Mar 2005 09:54:32 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux)

> Compilation mode uses local variables but I see that Gnus uses the global
> value. It might be a good idea (after the release?) to remove the variable
> overlay-arrow-position and initialise overlay-arrow-variable-list to nil.
> That way everyone would be forced to create their own overlay-arrow.

I see no problem with the fringe arrow in the compilation buffer,
because other packages don't try to set their own arrows here,
so there are no conflicts in the compilation buffer.

As for the next-error arrow, the patch below uses its own arrow
for next-error highlighting:

Index: lisp/progmodes/compile.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.348
diff -u -r1.348 compile.el
--- lisp/progmodes/compile.el   29 Mar 2005 04:56:44 -0000      1.348
+++ lisp/progmodes/compile.el   31 Mar 2005 06:17:30 -0000
@@ -1233,6 +1233,8 @@
   (make-local-variable 'compilation-messages-start)
   (make-local-variable 'compilation-error-screen-columns)
   (make-local-variable 'overlay-arrow-position)
+  (setq next-error-overlay-arrow nil)
+  (add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow)
   ;; Note that compilation-next-error-function is for interfacing
   ;; with the next-error function in simple.el, and it's only
   ;; coincidentally named similarly to compilation-next-error.
@@ -1641,8 +1643,9 @@
                         (numberp next-error-highlight)))
                (delete-overlay compilation-highlight-overlay))))))
     (when (and (eq next-error-highlight 'fringe-arrow))
-      (set (make-local-variable 'overlay-arrow-position)
-          (copy-marker (line-beginning-position))))))
+      (setq next-error-overlay-arrow
+           (copy-marker (line-beginning-position))))))
+
 
 (defun compilation-find-file (marker filename dir &rest formats)
   "Find a buffer for file FILENAME.

Index: lisp/simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.705
diff -u -r1.705 simple.el
--- lisp/simple.el      29 Mar 2005 23:17:30 -0000      1.705
+++ lisp/simple.el      31 Mar 2005 06:19:09 -0000
@@ -114,6 +114,8 @@
 
 (defvar next-error-highlight-timer nil)
 
+(defvar next-error-overlay-arrow nil)
+
 (defvar next-error-last-buffer nil
   "The most recent next-error buffer.
 A buffer becomes most recent when its compilation, grep, or

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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