comparison lisp/custom.el @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children 943eaba38521
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
394 (defmacro deftheme (theme &rest body) 394 (defmacro deftheme (theme &rest body)
395 "(deftheme THEME &optional DOC &key KEYWORDS) 395 "(deftheme THEME &optional DOC &key KEYWORDS)
396 396
397 Define a theme labeled by SYMBOL THEME. The optional argument DOC is a 397 Define a theme labeled by SYMBOL THEME. The optional argument DOC is a
398 doc string describing the theme. It is optionally followed by the 398 doc string describing the theme. It is optionally followed by the
399 following keyboard arguments 399 following keyword arguments
400 400
401 :short-description DESC 401 :short-description DESC
402 DESC is a short (one line) description of the theme. If not given DOC 402 DESC is a short (one line) description of the theme. If not given DOC
403 is used. 403 is used.
404 :immediate FLAG 404 :immediate FLAG
421 (defsubst custom-theme-p (theme) 421 (defsubst custom-theme-p (theme)
422 "Non-nil when THEME has been defined." 422 "Non-nil when THEME has been defined."
423 (memq theme custom-known-themes)) 423 (memq theme custom-known-themes))
424 424
425 (defsubst custom-check-theme (theme) 425 (defsubst custom-check-theme (theme)
426 "Check whether THEME is valid and signal an error if NOT" 426 "Check whether THEME is valid and signal an error if NOT."
427 (unless (custom-theme-p theme) 427 (unless (custom-theme-p theme)
428 (error "Unknown theme `%s'" theme))) 428 (error "Unknown theme `%s'" theme)))
429 429
430 430
431 ; #### do we need to deftheme 'user and/or 'standard here to make the 431 ; #### do we need to deftheme 'user and/or 'standard here to make the
563 563
564 564
565 565
566 566
567 (defsubst copy-upto-last (elt list) 567 (defsubst copy-upto-last (elt list)
568 "Copy all the elements of the list upto the last occurrence of elt" 568 "Copy all the elements of the list upto the last occurrence of elt."
569 ;; Is it faster to do more work in C than to do less in elisp? 569 ;; Is it faster to do more work in C than to do less in elisp?
570 (nreverse (cdr (member elt (reverse list))))) 570 (nreverse (cdr (member elt (reverse list)))))
571 571
572 (defun custom-theme-value (theme theme-spec-list) 572 (defun custom-theme-value (theme theme-spec-list)
573 "Determine the value for THEME defined by THEME-SPEC-LIST. 573 "Determine the value for THEME defined by THEME-SPEC-LIST.