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.
(goto-char (point-min))
(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-char (1- coln))
(setq beg (point))
(forward-char (length hole))
(setq end (point)))
((string= (string= (file-truename ofile) (file-truename file)))
(progn
(forward-line (1- line))
(while (eq (char-after) 32) (forward-char))
(skip-chars-forward " ")
(setq beg (point))
(forward-line)
(setq end (1- (point))))
(setq end (1- (point))))))
(t
(setq beg (point))
(forward-line)