Skip to content

Commit

Permalink
check whether auto-compile-file-buffer is non-nil before use
Browse files Browse the repository at this point in the history
Auto-Compile isn't the only one triggering compilation.  When
something else does it, then `auto-compile-file-buffer' is nil.
  • Loading branch information
tarsius committed May 21, 2014
1 parent 6f330f2 commit 8dc34dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions auto-compile.el
Expand Up @@ -450,8 +450,9 @@ pretend the byte code file exists.")
(defadvice byte-compile-log-warning
(before auto-compile-count-warnings activate)
;; (STRING &optional FILL LEVEL)
(with-current-buffer auto-compile-file-buffer
(cl-incf auto-compile-warnings)))
(when auto-compile-file-buffer
(with-current-buffer auto-compile-file-buffer
(cl-incf auto-compile-warnings))))

(cl-defun auto-compile-byte-compile (&optional file start)
"Perform byte compilation for Auto-Compile mode."
Expand Down

0 comments on commit 8dc34dd

Please sign in to comment.