Skip to content

Commit

Permalink
Make overduep a defsubst instead of defmacro (#56)
Browse files Browse the repository at this point in the history
There is no reason for this to be a macro, but it could well be a
defsubst for increased compiled efficiency.
  • Loading branch information
andersjohansson authored Nov 30, 2021
1 parent 7ec1ec0 commit 434b98b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mini-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ Set this to the minimal value that doesn't cause truncation."
(goto-char (point-max))
(insert (apply #'format args))))))

(defmacro mini-modeline--overduep (since duration)
(defsubst mini-modeline--overduep (since duration)
"Check if time already pass DURATION from SINCE."
`(>= (float-time (time-since ,since)) ,duration))
(>= (float-time (time-since since)) duration))

(defvar mini-modeline--minibuffer nil)
(defun mini-modeline-display (&optional arg)
Expand Down

0 comments on commit 434b98b

Please sign in to comment.