Function: ghostel--defer

ghostel--defer is a natively compiled function defined in ghostel.el.

Signature

(ghostel--defer FUNCTION &rest ARGS)

Documentation

Run FUNCTION with ARGS soon, using the current buffer when it fires.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--defer (function &rest args)
  "Run FUNCTION with ARGS soon, using the current buffer when it fires."
  (let ((buffer (current-buffer)))
    (run-at-time
     0 nil
     (lambda ()
       (when (buffer-live-p buffer)
         (with-current-buffer buffer
           (apply function args)))))))