Lines Matching defs:pt
1 ;;; help-at-pt.el --- local help through the keyboard
35 ;; variable `help-at-pt-display-when-idle'.
53 (defgroup help-at-pt nil
59 (defun help-at-pt-string (&optional kbd)
75 (defun help-at-pt-kbd-string ()
80 (let ((kbd (help-at-pt-string t))
81 (echo (help-at-pt-string)))
96 (let ((help (help-at-pt-kbd-string)))
101 (defvar help-at-pt-timer nil
105 internally to enable `help-at-pt-display-when-idle'. Do not set it
108 (defcustom help-at-pt-timer-delay 1
110 This is used if `help-at-pt-display-when-idle' is enabled.
115 first call `help-at-pt-cancel-timer' and then set a new timer
116 with `help-at-pt-set-timer'. Alternatively, you can set this
120 :group 'help-at-pt
125 (and (boundp 'help-at-pt-timer)
126 help-at-pt-timer
127 (timer-set-idle-time help-at-pt-timer value t))))
130 (defun help-at-pt-cancel-timer ()
131 "Cancel any timer set by `help-at-pt-set-timer'.
132 This disables `help-at-pt-display-when-idle'."
135 (when help-at-pt-timer
136 (cancel-timer help-at-pt-timer)
137 (setq help-at-pt-timer nil))))
140 (defun help-at-pt-set-timer ()
141 "Enable `help-at-pt-display-when-idle'.
144 (unless help-at-pt-timer
145 (setq help-at-pt-timer
147 help-at-pt-timer-delay t #'help-at-pt-maybe-display))))
150 (defcustom help-at-pt-display-when-idle 'never
163 `help-at-pt-set-timer'. The help gets printed after Emacs has
164 been idle for `help-at-pt-timer-delay' seconds. You can call
165 `help-at-pt-cancel-timer' to cancel the timer set by, and the
166 effect of, `help-at-pt-set-timer'.
168 When this variable is set through Custom, `help-at-pt-set-timer'
170 case `help-at-pt-cancel-timer' is called. Specifying an empty
176 :group 'help-at-pt
220 timer will be set. Call `help-at-pt-set-timer' after choosing
228 (help-at-pt-cancel-timer)
229 (help-at-pt-set-timer)))
230 :set-after '(help-at-pt-timer-delay)
231 :require 'help-at-pt)
233 ;; Function for use in `help-at-pt-set-timer'.
234 (defun help-at-pt-maybe-display ()
235 (and (or (eq help-at-pt-display-when-idle t)
236 (and (consp help-at-pt-display-when-idle)
238 (dolist (prop help-at-pt-display-when-idle)
353 (add-hook 'help-at-pt-unload-hook 'help-at-pt-cancel-timer)
355 (provide 'help-at-pt)
358 ;;; help-at-pt.el ends here