Skip to content

Commit

Permalink
change start-timer parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Nov 25, 2023
1 parent 99c347c commit 7c1c4dc
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions extensions/lisp-mode/lisp-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@
(setf (buffer-compilation-notes-timer (current-buffer))
(start-timer (make-idle-timer 'show-compilation-notes :name "lisp-show-compilation-notes")
200
t))
:repeat t))

(add-hook (variable-value 'before-change-functions :buffer (current-buffer))
'remove-compilation-notes-overlay-in-the-changed-point))
Expand Down Expand Up @@ -1115,7 +1115,7 @@
(finalize ()
(stop-timer timer)
(stop-loading-spinner spinner)))
(setf timer (start-timer (make-timer #'interval) 500 t)))))))
(setf timer (start-timer (make-timer #'interval) 500 :repeat t)))))))

(define-command slime (&optional ask-command) ("P")
(let ((command (if ask-command
Expand Down
4 changes: 2 additions & 2 deletions extensions/lsp-mode/lsp-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@
(setf (buffer-diagnostic-idle-timer buffer)
(start-timer (make-idle-timer 'popup-diagnostic :name "lsp-diagnostic")
200
t))))
:repeat t))))

(defun popup-diagnostic ()
(dolist (overlay (buffer-diagnostic-overlays (current-buffer)))
Expand Down Expand Up @@ -1323,7 +1323,7 @@
(start-timer (make-idle-timer #'document-highlight-calls-timer
:name "lsp-document-highlight")
200
t))))
:repeat t))))

(defmethod execute :after ((mode lsp-mode) command argument)
(clear-document-highlight-overlays-if-required))
Expand Down
10 changes: 5 additions & 5 deletions src/common/timer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@
(defun make-timer (function &key name handle-function)
(make-timer-instance 'timer function name handle-function))

(defmethod start-timer ((timer timer) ms &optional repeat-p)
(defmethod start-timer ((timer timer) ms &key repeat)
(setf (timer-ms timer) ms
(timer-repeat-p timer) repeat-p
(timer-repeat-p timer) repeat
(timer-mutex timer)
(bt:make-lock "timer internal mutex"))
(start-timer-thread timer ms repeat-p)
(start-timer-thread timer ms repeat)
timer)

(defmethod stop-timer ((timer timer))
Expand Down Expand Up @@ -202,9 +202,9 @@
(defun make-idle-timer (function &key name handle-function)
(make-timer-instance 'idle-timer function name handle-function))

(defmethod start-timer ((timer idle-timer) ms &optional repeat-p)
(defmethod start-timer ((timer idle-timer) ms &key repeat)
(setf (timer-ms timer) ms)
(setf (timer-repeat-p timer) repeat-p)
(setf (timer-repeat-p timer) repeat)
(when *idle-p*
(setf (timer-last-time timer)
(get-microsecond-time *timer-manager*)))
Expand Down
2 changes: 1 addition & 1 deletion src/ext/auto-save.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
(disable))
:name "autosave")
(* interval 1000)
t))))
:repeat t))))
(add-hook *input-hook* 'count-keys)))

(defun disable ()
Expand Down
2 changes: 1 addition & 1 deletion src/ext/language-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
(pop-up-backtrace condition)
(setf *idle-timer* nil))
:name "language-idle-function")
200 t))))
200 :repeat t))))

(define-key *language-mode-keymap* "C-M-a" 'beginning-of-defun)
(define-key *language-mode-keymap* "C-M-e" 'end-of-defun)
Expand Down
4 changes: 2 additions & 2 deletions src/ext/loading-spinner.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
(let* ((spinner)
(timer (start-timer (make-timer (lambda () (update-spinner-frame spinner)))
+loading-interval+
t)))
:repeat t)))
(setf spinner
(make-instance 'modeline-spinner
:timer timer
Expand Down Expand Up @@ -118,7 +118,7 @@
(when spinner
(update-line-spinner spinner))))
+loading-interval+
t))
:repeat t))
(overlay (make-line-endings-overlay
start
end
Expand Down
2 changes: 1 addition & 1 deletion src/ext/showparen.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
(setf *show-paren-timer*
(start-timer (make-idle-timer 'update-show-paren :name "show paren timer")
1
t))
:repeat t))
t)
(t
(when *show-paren-timer*
Expand Down
2 changes: 1 addition & 1 deletion src/lem.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Options:
(start-timer (make-idle-timer (lambda ()
(syntax-scan-window (current-window)))
:name "syntax-scan")
100 t)
100 :repeat t)
(add-hook *window-scroll-functions*
(lambda (window)
(syntax-scan-window window)))
Expand Down

0 comments on commit 7c1c4dc

Please sign in to comment.