Skip to content

Commit

Permalink
fix timer tick error for Emacs 24.4
Browse files Browse the repository at this point in the history
When in mpages mode but a different buffer, it was erroring on the void
variable by checking if true. boundp seems to be a valid fix. We shall
see.
  • Loading branch information
slevin committed Oct 30, 2014
1 parent bea75e9 commit 588c0af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpages.el
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Increasing this number may improve performance."
(defun mpages-timer-tick ()
"Run update on header with latest values."
;; this check makes sure it only runs update if the timer has been
(if mpages-count-timer
(if (boundp 'mpages-count-timer)
(let ((word-count (count-words 1 (length (buffer-string))))
(time-elapsed (time-subtract (current-time) mpages-start-time)))
(mpages-update-word-count time-elapsed word-count))))
Expand Down

0 comments on commit 588c0af

Please sign in to comment.