comparison lispref/customize.texi @ 61618:72a73fd3289a

(Variable Definitions): Replace tooltip-mode example with save-place.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 18 Apr 2005 08:21:21 +0000
parents a33defc96586
children 8f1f80a5bd64 e1fbb019c538
comparison
equal deleted inserted replaced
61617:12602d832e37 61618:72a73fd3289a
281 281
282 The @code{:require} option is useful for an option that turns on the 282 The @code{:require} option is useful for an option that turns on the
283 operation of a certain feature. Assuming that the package is coded to 283 operation of a certain feature. Assuming that the package is coded to
284 check the value of the option, you still need to arrange for the package 284 check the value of the option, you still need to arrange for the package
285 to be loaded. You can do that with @code{:require}. @xref{Common 285 to be loaded. You can do that with @code{:require}. @xref{Common
286 Keywords}. Here is an example, from the library @file{tooltip.el}: 286 Keywords}. Here is an example, from the library @file{saveplace.el}:
287 287
288 @example 288 @example
289 (defcustom tooltip-mode nil 289 (defcustom save-place nil
290 "Non-nil if Tooltip mode is enabled..." 290 "*Non-nil means automatically save place in each file..."
291 :set (lambda (symbol value)
292 (tooltip-mode (or value 0)))
293 :initialize 'custom-initialize-default
294 :type 'boolean 291 :type 'boolean
295 :require 'tooltip 292 :require 'saveplace
296 :group 'tooltip) 293 :group 'save-place)
297 @end example 294 @end example
298 295
299 If a customization item has a type such as @code{hook} or @code{alist}, 296 If a customization item has a type such as @code{hook} or @code{alist},
300 which supports @code{:options}, you can add additional options to the 297 which supports @code{:options}, you can add additional options to the
301 item, outside the @code{defcustom} declaration, by calling 298 item, outside the @code{defcustom} declaration, by calling