Browse files

Display time information when eval took awhile.

  • Loading branch information...
skeeto committed Nov 13, 2012
1 parent f39004f commit a881d8d0873ad2601026d193b012cfd9911ce75e
Showing with 5 additions and 1 deletion.
  1. +5 −1 skewer-mode.el
@@ -186,7 +186,11 @@ trust. These whitelisted functions are considered safe.")
(defun skewer-post-minibuffer (result)
"Report results in the minibuffer or the error buffer."
(if (skewer-success-p result)
- (message "%s" (cdr (assoc 'value result)))
+ (let ((value (cdr (assoc 'value result)))
+ (time (cdr (assoc 'time result))))
+ (if (> time 1.0)
+ (message "%s (%.3f seconds)" value time)
+ (message "%s" value)))
(with-current-buffer (pop-to-buffer (get-buffer-create "*skewer-error*"))
(let ((inhibit-read-only t)
(error (cdr (assoc 'error result))))

0 comments on commit a881d8d

Please sign in to comment.