summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2005-12-31 13:51:27 +0000
committerEli Zaretskii <eliz@gnu.org>2005-12-31 13:51:27 +0000
commit8c3f3d642df65b2cc00a53054145efbdaa9b7549 (patch)
tree43656417bfd5930aa7ff42b9ef91df8c00144306 /lisp/progmodes
parent913dd16dd1ad759d1bed83beb354a7ea32e3944f (diff)
downloademacs-8c3f3d642df65b2cc00a53054145efbdaa9b7549.tar.gz
(gud-display-line): Support hl-line in the source buffer.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/gud.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a9ccdf38442..e99262dd670 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2735,6 +2735,7 @@ Obeying it means displaying in another window the specified file and line."
(window (and buffer (or (get-buffer-window buffer)
(display-buffer buffer))))
(pos))
+ (message "%s %s" (current-buffer) buffer)
(if buffer
(progn
(with-current-buffer buffer
@@ -2750,7 +2751,15 @@ Obeying it means displaying in another window the specified file and line."
(setq pos (point))
(or gud-overlay-arrow-position
(setq gud-overlay-arrow-position (make-marker)))
- (set-marker gud-overlay-arrow-position (point) (current-buffer)))
+ (set-marker gud-overlay-arrow-position (point) (current-buffer))
+ ;; If they turned on hl-line, move the hl-line highlight to
+ ;; the arrow's line.
+ (when (featurep 'hl-line)
+ (cond
+ (global-hl-line-mode
+ (global-hl-line-highlight))
+ ((and hl-line-mode hl-line-sticky-flag)
+ (hl-line-highlight)))))
(cond ((or (< pos (point-min)) (> pos (point-max)))
(widen)
(goto-char pos))))