aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/help-at-pt.el27
2 files changed, 24 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 43f98adbef9..01ac54a8815 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12004-10-30 Luc Teirlinck <teirllm@auburn.edu>
2
3 * help-at-pt.el (help-at-pt-timer): Move defvar up to avoid
4 compiler warning.
5 (help-at-pt-timer-delay): Add :initialize and :version keywords.
6 Simplify :set function.
7 (help-at-pt-display-when-idle): Remove autoload. Add :version
8 keyword.
9
12004-10-30 Stefan <monnier@iro.umontreal.ca> 102004-10-30 Stefan <monnier@iro.umontreal.ca>
2 11
3 * makefile.w32-in (custom-deps, autoloads): Fix *-hooks -> *-hook. 12 * makefile.w32-in (custom-deps, autoloads): Fix *-hooks -> *-hook.
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 @@
1;;; help-at-pt.el --- local help through the keyboard 1;;; help-at-pt.el --- local help through the keyboard
2 2
3;; Copyright (C) 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Luc Teirlinck <teirllm@auburn.edu> 5;; Author: Luc Teirlinck <teirllm@auburn.edu>
6;; Keywords: help 6;; Keywords: help
@@ -98,6 +98,13 @@ mainly meant for use from Lisp."
98 (message "%s" help) 98 (message "%s" help)
99 (if (not arg) (message "No local help at point"))))) 99 (if (not arg) (message "No local help at point")))))
100 100
101(defvar help-at-pt-timer nil
102 "Non-nil means that a timer is set that checks for local help.
103If non-nil, this is the value returned by the call of
104`run-with-idle-timer' that set that timer. This variable is used
105internally to enable `help-at-pt-display-when-idle'. Do not set it
106yourself.")
107
101(defcustom help-at-pt-timer-delay 1 108(defcustom help-at-pt-timer-delay 1
102 "*Delay before displaying local help. 109 "*Delay before displaying local help.
103This is used if `help-at-pt-display-when-idle' is enabled. 110This 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
112new value." 119new value."
113 :group 'help-at-pt 120 :group 'help-at-pt
114 :type 'number 121 :type 'number
122 :initialize 'custom-initialize-default
115 :set (lambda (variable value) 123 :set (lambda (variable value)
116 (set-default variable value) 124 (set-default variable value)
117 (when (and (boundp 'help-at-pt-timer) help-at-pt-timer) 125 (and (boundp 'help-at-pt-timer)
118 (timer-set-idle-time help-at-pt-timer value t)))) 126 help-at-pt-timer
119 127 (timer-set-idle-time help-at-pt-timer value t)))
120(defvar help-at-pt-timer nil 128 :version "21.4")
121 "Non-nil means that a timer is set that checks for local help.
122If non-nil, this is the value returned by the call of
123`run-with-idle-timer' that set that timer. This variable is used
124internally to enable `help-at-pt-display-when-idle'. Do not set it
125yourself.")
126 129
127;;;###autoload 130;;;###autoload
128(defun help-at-pt-cancel-timer () 131(defun help-at-pt-cancel-timer ()
@@ -144,7 +147,6 @@ This is done by setting a timer, if none is currently active."
144 (run-with-idle-timer 147 (run-with-idle-timer
145 help-at-pt-timer-delay t #'help-at-pt-maybe-display)))) 148 help-at-pt-timer-delay t #'help-at-pt-maybe-display))))
146 149
147;;;###autoload
148(defcustom help-at-pt-display-when-idle 'never 150(defcustom help-at-pt-display-when-idle 'never
149 "*Automatically show local help on point-over. 151 "*Automatically show local help on point-over.
150If the value is t, the string obtained from any `kbd-help' or 152If the value is t, the string obtained from any `kbd-help' or
@@ -226,7 +228,8 @@ properties, to enable buffer local values."
226 (help-at-pt-cancel-timer) 228 (help-at-pt-cancel-timer)
227 (help-at-pt-set-timer))) 229 (help-at-pt-set-timer)))
228 :set-after '(help-at-pt-timer-delay) 230 :set-after '(help-at-pt-timer-delay)
229 :require 'help-at-pt) 231 :require 'help-at-pt
232 :version "21.4")
230 233
231;; Function for use in `help-at-pt-set-timer'. 234;; Function for use in `help-at-pt-set-timer'.
232(defun help-at-pt-maybe-display () 235(defun help-at-pt-maybe-display ()