瀏覽代碼

Add minibuffer-line idle timer

master
10sr 6 年之前
父節點
當前提交
b9fd4258c5
簽署人: 10sr GPG Key ID: 7BEC428194130EB2
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. +16
    -0
      emacs.el

+ 16
- 0
emacs.el 查看文件

@@ -456,6 +456,22 @@ found, otherwise returns nil."
(set-face-underline 'minibuffer-line nil)
(set-variable 'minibuffer-line-refresh-interval
25)

;; Set idle timer
(defvar my-minibuffer-line--idle-timer nil)
(defvar minibuffer-line-mode)
(add-hook 'minibuffer-line-mode-hook
(lambda ()
(when my-minibuffer-line--idle-timer
(cancel-timer my-minibuffer-line--idle-timer)
(setq my-minibuffer-line--idle-timer nil))
(when minibuffer-line-mode
(setq my-minibuffer-line--idle-timer
(run-with-idle-timer 0.5
t
'minibuffer-line--update)))))


(set-variable 'minibuffer-line-format
`(,(concat user-login-name
"@"


Loading…
取消
儲存