summaryrefslogtreecommitdiff
path: root/lisp/help-at-pt.el
diff options
context:
space:
mode:
authorLuc Teirlinck <teirllm@auburn.edu>2004-10-30 19:49:27 +0000
committerLuc Teirlinck <teirllm@auburn.edu>2004-10-30 19:49:27 +0000
commitbe2038369e2df9fe3d6151b3ade7f7fc75e20d7e (patch)
treea324e1040f812fe0a791de2a3e9f7f0e409f096b /lisp/help-at-pt.el
parent5459bcdf38655e39b3762abcef1a5167d873a8e6 (diff)
downloademacs-be2038369e2df9fe3d6151b3ade7f7fc75e20d7e.tar.gz
(help-at-pt-timer): Move defvar up to avoid compiler warning.
(help-at-pt-timer-delay): Add :initialize and :version keywords. Simplify :set function. (help-at-pt-display-when-idle): Remove autoload. Add :version keyword.
Diffstat (limited to 'lisp/help-at-pt.el')
-rw-r--r--lisp/help-at-pt.el27
1 files changed, 15 insertions, 12 deletions
diff --git a/lisp/help-at-pt.el b/lisp/help-at-pt.el
index d6ac6ec3fdc..d55a9a663df 100644
--- a/lisp/help-at-pt.el
+++ b/lisp/help-at-pt.el
@@ -1,6 +1,6 @@
;;; help-at-pt.el --- local help through the keyboard
-;; Copyright (C) 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;; Author: Luc Teirlinck <teirllm@auburn.edu>
;; Keywords: help
@@ -98,6 +98,13 @@ mainly meant for use from Lisp."
(message "%s" help)
(if (not arg) (message "No local help at point")))))
+(defvar help-at-pt-timer nil
+ "Non-nil means that a timer is set that checks for local help.
+If non-nil, this is the value returned by the call of
+`run-with-idle-timer' that set that timer. This variable is used
+internally to enable `help-at-pt-display-when-idle'. Do not set it
+yourself.")
+
(defcustom help-at-pt-timer-delay 1
"*Delay before displaying local help.
This is used if `help-at-pt-display-when-idle' is enabled.
@@ -112,17 +119,13 @@ active, but if one is already active, Custom will make it use the
new value."
:group 'help-at-pt
:type 'number
+ :initialize 'custom-initialize-default
:set (lambda (variable value)
(set-default variable value)
- (when (and (boundp 'help-at-pt-timer) help-at-pt-timer)
- (timer-set-idle-time help-at-pt-timer value t))))
-
-(defvar help-at-pt-timer nil
- "Non-nil means that a timer is set that checks for local help.
-If non-nil, this is the value returned by the call of
-`run-with-idle-timer' that set that timer. This variable is used
-internally to enable `help-at-pt-display-when-idle'. Do not set it
-yourself.")
+ (and (boundp 'help-at-pt-timer)
+ help-at-pt-timer
+ (timer-set-idle-time help-at-pt-timer value t)))
+ :version "21.4")
;;;###autoload
(defun help-at-pt-cancel-timer ()
@@ -144,7 +147,6 @@ This is done by setting a timer, if none is currently active."
(run-with-idle-timer
help-at-pt-timer-delay t #'help-at-pt-maybe-display))))
-;;;###autoload
(defcustom help-at-pt-display-when-idle 'never
"*Automatically show local help on point-over.
If the value is t, the string obtained from any `kbd-help' or
@@ -226,7 +228,8 @@ properties, to enable buffer local values."
(help-at-pt-cancel-timer)
(help-at-pt-set-timer)))
:set-after '(help-at-pt-timer-delay)
- :require 'help-at-pt)
+ :require 'help-at-pt
+ :version "21.4")
;; Function for use in `help-at-pt-set-timer'.
(defun help-at-pt-maybe-display ()