]> code.delx.au - gnu-emacs/commitdiff
(compilation-setup):
authorJuri Linkov <juri@jurta.org>
Thu, 7 Apr 2005 15:15:38 +0000 (15:15 +0000)
committerJuri Linkov <juri@jurta.org>
Thu, 7 Apr 2005 15:15:38 +0000 (15:15 +0000)
Set `next-error-overlay-arrow-position' to nil.  Also set it to
nil in the local hook `kill-buffer-hook'.  Make local variable
`overlay-arrow-string' and set it to "=>".
(compilation-goto-locus): Set BOL position to
`next-error-overlay-arrow-position' instead of
`overlay-arrow-position'.

lisp/progmodes/compile.el

index bafc901d3d1ef406fc51af3bc9c87b3e81d5f9b4..bcff4d2f70d5a495f6426f6ba6e7b5147b841d11 100644 (file)
@@ -1233,6 +1233,10 @@ Optional argument MINOR indicates this is called from
   (make-local-variable 'compilation-messages-start)
   (make-local-variable 'compilation-error-screen-columns)
   (make-local-variable 'overlay-arrow-position)
+  (set (make-local-variable 'overlay-arrow-string) "=>")
+  (setq next-error-overlay-arrow-position nil)
+  (add-hook 'kill-buffer-hook
+           (lambda () (setq next-error-overlay-arrow-position nil)) nil t)
   ;; 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 +1645,9 @@ and overlay is highlighted between MK and END-MK."
                         (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-position
+           (copy-marker (line-beginning-position))))))
+
 \f
 (defun compilation-find-file (marker filename dir &rest formats)
   "Find a buffer for file FILENAME.