Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0b87142f
Commit
0b87142f
authored
Feb 13, 2014
by
Daniel Colascione
Browse files
Fix flymake in narrowed buffers
parent
e2607667
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
23 deletions
+31
-23
lisp/ChangeLog
lisp/ChangeLog
+6
-0
lisp/progmodes/flymake.el
lisp/progmodes/flymake.el
+25
-23
No files found.
lisp/ChangeLog
View file @
0b87142f
2014-02-13 Daniel Colascione <dancol@dancol.org>
* progmodes/flymake.el (flymake-post-syntax-check): Widen buffer
when adding overlays so that line numbers from compiler match line
numbers we use.
2014-02-13 Glenn Morris <rgm@gnu.org>
* mail/rmail.el (rmail-probe): Be less strict. (Bug#16743)
...
...
lisp/progmodes/flymake.el
View file @
0b87142f
...
...
@@ -555,29 +555,31 @@ It's flymake process filter."
(
setq
flymake-is-running
nil
))))))))
(
defun
flymake-post-syntax-check
(
exit-status
command
)
(
setq
flymake-err-info
flymake-new-err-info
)
(
setq
flymake-new-err-info
nil
)
(
setq
flymake-err-info
(
flymake-fix-line-numbers
flymake-err-info
1
(
count-lines
(
point-min
)
(
point-max
))))
(
flymake-delete-own-overlays
)
(
flymake-highlight-err-lines
flymake-err-info
)
(
let
(
err-count
warn-count
)
(
setq
err-count
(
flymake-get-err-count
flymake-err-info
"e"
))
(
setq
warn-count
(
flymake-get-err-count
flymake-err-info
"w"
))
(
flymake-log
2
"%s: %d error(s), %d warning(s) in %.2f second(s)"
(
buffer-name
)
err-count
warn-count
(
-
(
float-time
)
flymake-check-start-time
))
(
setq
flymake-check-start-time
nil
)
(
if
(
and
(
equal
0
err-count
)
(
equal
0
warn-count
))
(
if
(
equal
0
exit-status
)
(
flymake-report-status
""
""
)
; PASSED
(
if
(
not
flymake-check-was-interrupted
)
(
flymake-report-fatal-status
"CFGERR"
(
format
"Configuration error has occurred while running %s"
command
))
(
flymake-report-status
nil
""
)))
; "STOPPED"
(
flymake-report-status
(
format
"%d/%d"
err-count
warn-count
)
""
))))
(
save-restriction
(
widen
)
(
setq
flymake-err-info
flymake-new-err-info
)
(
setq
flymake-new-err-info
nil
)
(
setq
flymake-err-info
(
flymake-fix-line-numbers
flymake-err-info
1
(
count-lines
(
point-min
)
(
point-max
))))
(
flymake-delete-own-overlays
)
(
flymake-highlight-err-lines
flymake-err-info
)
(
let
(
err-count
warn-count
)
(
setq
err-count
(
flymake-get-err-count
flymake-err-info
"e"
))
(
setq
warn-count
(
flymake-get-err-count
flymake-err-info
"w"
))
(
flymake-log
2
"%s: %d error(s), %d warning(s) in %.2f second(s)"
(
buffer-name
)
err-count
warn-count
(
-
(
float-time
)
flymake-check-start-time
))
(
setq
flymake-check-start-time
nil
)
(
if
(
and
(
equal
0
err-count
)
(
equal
0
warn-count
))
(
if
(
equal
0
exit-status
)
(
flymake-report-status
""
""
)
; PASSED
(
if
(
not
flymake-check-was-interrupted
)
(
flymake-report-fatal-status
"CFGERR"
(
format
"Configuration error has occurred while running %s"
command
))
(
flymake-report-status
nil
""
)))
; "STOPPED"
(
flymake-report-status
(
format
"%d/%d"
err-count
warn-count
)
""
)))))
(
defun
flymake-parse-output-and-residual
(
output
)
"Split OUTPUT into lines, merge in residual if necessary."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment