]> code.delx.au - gnu-emacs/commitdiff
Have `compilation-set-window' use right window for getting fringes (Bug#20829)
authorMartin Rudalics <rudalics@gmx.at>
Sat, 4 Jul 2015 08:13:22 +0000 (10:13 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 4 Jul 2015 08:13:22 +0000 (10:13 +0200)
* lisp/progmodes/compile.el (compilation-set-window): Take
`window-fringes' from argument window.  (Bug#20829)

lisp/progmodes/compile.el

index 37d3fe84114040d411283d746ad31e4723b05af1..9a4433595ef9ac7d5ba56332b9df03c61b0746a6 100644 (file)
@@ -2521,9 +2521,9 @@ displays at the top of the window; there is no arrow."
                             (- 1 compilation-context-lines))
                            (point)))
     ;; If there is no left fringe.
-    (if (equal (car (window-fringes)) 0)
-       (set-window-start w (save-excursion
-                             (goto-char mk)
+    (when (equal (car (window-fringes w)) 0)
+      (set-window-start w (save-excursion
+                            (goto-char mk)
                            (beginning-of-line 1)
                            (point)))))
     (set-window-point w mk))