]> git.eshelyaron.com Git - emacs.git/commit
Compilation Mode: Fix arrow handling when compilation-context-lines is t
authorAlan Mackenzie <acm@muc.de>
Sun, 17 Nov 2019 14:59:42 +0000 (14:59 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 17 Nov 2019 14:59:42 +0000 (14:59 +0000)
commit7c6335de5e0ac4176911a39bad5344028f39b8ff
treed855e7db70a900230c236ca976858e142d933964
parent58ceb8bac0bcd9907ca8ff8fd37d5a6c2ce282ca
Compilation Mode: Fix arrow handling when compilation-context-lines is t

In particular, fix some exception occurrences, fix handling of a Compilation
Mode buffer being displayed in several windows, and fix the margin when
temporarily displaying a different buffer in a window, then returning to the
compilation mode buffer.  The fix is relevant for frames without fringes,
e.g. tty frames.

* lisp/progmodes/compile.el: (compilation-set-window): Always set point to
(parameter) MK.
(compilation--set-up-margin, compilation--tear-down-margin): New functions.
(compilation--set-up-arrow-spec-in-margins)
(compilation--tear-down-arrow-spec-in-margins): Renamed by introducing -- and
pluralising margin to margins.  Handle the margins in _all_ windows displaying
the pertinent buffer by using get-buffer-window-list.  In ...--set-up-... add
compilation--set-up-margin to window-buffer-change-functions.  In
...--tear-down-... remove the hook functions added in ...--set-up-....
lisp/progmodes/compile.el