comparison lisp/custom.el @ 223:2c611d1463a6 r20-4b10

Import from CVS: tag r20-4b10
author cvs
date Mon, 13 Aug 2007 10:10:54 +0200
parents d44af0c54775
children 0e522484dd2a
comparison
equal deleted inserted replaced
222:aae4c8b01452 223:2c611d1463a6
320 (defun custom-handle-keyword (symbol keyword value type) 320 (defun custom-handle-keyword (symbol keyword value type)
321 "For customization option SYMBOL, handle KEYWORD with VALUE. 321 "For customization option SYMBOL, handle KEYWORD with VALUE.
322 Fourth argument TYPE is the custom option type." 322 Fourth argument TYPE is the custom option type."
323 (cond ((eq keyword :group) 323 (cond ((eq keyword :group)
324 (custom-add-to-group value symbol type)) 324 (custom-add-to-group value symbol type))
325 ((eq keyword :version)
326 (custom-add-version symbol value))
325 ((eq keyword :link) 327 ((eq keyword :link)
326 (custom-add-link symbol value)) 328 (custom-add-link symbol value))
327 ((eq keyword :load) 329 ((eq keyword :load)
328 (custom-add-load symbol value)) 330 (custom-add-load symbol value))
329 ((eq keyword :tag) 331 ((eq keyword :tag)
344 "To the custom option SYMBOL add the link WIDGET." 346 "To the custom option SYMBOL add the link WIDGET."
345 (let ((links (get symbol 'custom-links))) 347 (let ((links (get symbol 'custom-links)))
346 (unless (member widget links) 348 (unless (member widget links)
347 (put symbol 'custom-links (cons widget links))))) 349 (put symbol 'custom-links (cons widget links)))))
348 350
351 (defun custom-add-version (symbol version)
352 "To the custom option SYMBOL add the version VERSION."
353 (put symbol 'custom-version version))
354
349 (defun custom-add-load (symbol load) 355 (defun custom-add-load (symbol load)
350 "To the custom option SYMBOL add the dependency LOAD. 356 "To the custom option SYMBOL add the dependency LOAD.
351 LOAD should be either a library file name, or a feature name." 357 LOAD should be either a library file name, or a feature name."
358 (puthash symbol t custom-group-hash-table)
352 (let ((loads (get symbol 'custom-loads))) 359 (let ((loads (get symbol 'custom-loads)))
353 (unless (member load loads) 360 (unless (member load loads)
354 (put symbol 'custom-loads (cons load loads))))) 361 (put symbol 'custom-loads (cons load loads)))))
355 362
356 ;;; Initializing. 363 ;;; Initializing.