fix and improve ghc-check-highlight-original-buffer

This commit is contained in:
Sergey Vinokurov 2015-05-15 13:42:27 +03:00
parent 133ec67350
commit 05b9445f6e

View File

@ -167,18 +167,20 @@ nil does not display errors/warnings.
;; If this is a bottleneck for a large code, let's fix. ;; If this is a bottleneck for a large code, let's fix.
(goto-char (point-min)) (goto-char (point-min))
(cond (cond
((and (string= (file-truename ofile) (file-truename file)) hole) ((string= (file-truename ofile) (file-truename file))
(if hole
(progn
(forward-line (1- line)) (forward-line (1- line))
(forward-char (1- coln)) (forward-char (1- coln))
(setq beg (point)) (setq beg (point))
(forward-char (length hole)) (forward-char (length hole))
(setq end (point))) (setq end (point)))
((string= (string= (file-truename ofile) (file-truename file))) (progn
(forward-line (1- line)) (forward-line (1- line))
(while (eq (char-after) 32) (forward-char)) (skip-chars-forward " ")
(setq beg (point)) (setq beg (point))
(forward-line) (forward-line)
(setq end (1- (point)))) (setq end (1- (point))))))
(t (t
(setq beg (point)) (setq beg (point))
(forward-line) (forward-line)