;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:35 2007 ;;; from file /home/cyd/emacs/lisp/cus-theme.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`cus-theme.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require widget cus-edit] 2) #@37 Keymap for `custom-new-theme-mode'. (defvar custom-new-theme-mode-map (byte-code "\302 \303 \"\210\304!\210\305\306\307#\210\305\310\311#\210)\207" [map widget-keymap make-keymap set-keymap-parent suppress-keymap define-key "n" widget-forward "p" widget-backward] 4) (#$ . 634)) (byte-code "\302\303N\204\f\304\302\303\305#\210\306\307!\204\304\307\310\311#\210\307B\312\307!\204(\313\307\314 \"\210\306\315!\2044\304\315\310\311#\210\315B\312\315!\204D\313\315\316 \"\210\304\301\310\311#\210\301B\312\301!\204^\313\301\317\301\320\"\210 \"\210\304\311\321\320#\207" [current-load-list custom-new-theme-mode-abbrev-table custom-new-theme-mode-hook variable-documentation put "Hook run when entering New-Theme mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp custom-new-theme-mode-map definition-name custom-new-theme-mode default-boundp set-default make-sparse-keymap custom-new-theme-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent] 5) #@295 Major mode for the buffer created by `customize-create-theme'. Do not call this mode function yourself. It is only meant for internal use by `customize-create-theme'. This mode runs the hook `custom-new-theme-mode-hook', as the final step during initialization. \{custom-new-theme-mode-map} (defalias 'custom-new-theme-mode #[nil "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 \313 !\210\315 \316\317#\210\306\320!\210\321\306\322!\210\306\323!\210 \306\324!\210!\"\203b\306\325!\210\326\306\327!\210\326\306\330!\210\326\306\331!\210\326)\332\333!\203m\333\334!\207\335\334!\207" [delay-mode-hooks major-mode mode-name custom-new-theme-mode-map custom-new-theme-mode-syntax-table custom-new-theme-mode-abbrev-table make-local-variable t kill-all-local-variables custom-new-theme-mode "New-Theme" use-local-map set-syntax-table define-key [mouse-1] widget-move-and-invoke widget-documentation-face custom-documentation widget-button-face widget-button-pressed-face widget-mouse-face widget-push-button-prefix "" widget-push-button-suffix widget-link-prefix widget-link-suffix fboundp run-mode-hooks custom-new-theme-mode-hook run-hooks local-abbrev-table custom-button custom-button-pressed custom-button-mouse custom-raised-buttons] 4 (#$ . 1722) nil]) (byte-code "\301\302\303\304#\210\305B\306\305!\204\307\305\310\"\210\311B\306\311!\204$\307\311\310\"\210\312B\306\312!\2043\307\312\310\"\210\310\207" [current-load-list put custom-new-theme-mode mode-class special custom-theme-name default-boundp set-default nil custom-theme-variables custom-theme-faces] 4) #@24 Create a custom theme. (defalias 'customize-create-theme #[nil "\306\307\310!!\210\311\312 \210)\313 \210\314\303!\210\314\315!\210\314\316!\210\314\304!\210\314\305!\210\314\317!\210\320\321 \322#\210\323\324\325\326\327\330\331\332&\210\320\333!\210\323\324\325\334\327\335\331\336&\210\320\333!\210\323\324\337\340\341$\210\320\333!\210\323\324\337\342\343$\210\320\344!\210\320\345!\210\323\346\347\350\n$\320\351!\210\323\352\353\354\355!#\320\344!\210\323\324\325\356\327\357\331\360&\210\320\344!\210\361 \320\344!\210\323\324\325\362\327\363\331\364&\210\320\344!\210\361 \320\344!\210\323\324\337\365\341$\210\320\333!\210\323\324\337\342\343$\210\320\344!\210\366 \210eb\210\367\370!\207" [inhibit-read-only custom-theme-directory user-login-name custom-theme-name custom-theme-description custom-theme-insert-variable-marker switch-to-buffer generate-new-buffer "*New Custom Theme*" t erase-buffer custom-new-theme-mode make-local-variable custom-theme-variables custom-theme-faces custom-theme-insert-face-marker widget-insert "This buffer helps you write a custom theme elisp file.\nThis will help you share your customizations with other people.\n\nInsert the names of all variables and faces you want the theme to include.\nInvoke \"Save Theme\" to save the theme. The theme file will be saved to\nthe directory " "\n\n" widget-create push-button :tag "Visit Theme" :help-echo "Insert the settings of a pre-defined theme." :action #[(widget &optional event) "\300\301!\207" [call-interactively custom-theme-visit-theme] 2] " " "Merge Theme" "Merge in the settings of a pre-defined theme." #[(widget &optional event) "\300\301!\207" [call-interactively custom-theme-merge-theme] 2] :notify #[(&rest ignore) "\300\301!\205\f\302p!\210\303 \207" [y-or-n-p "Discard current changes? " kill-buffer customize-create-theme] 2] "Reset Buffer" custom-theme-write "Save Theme" "\n" "\n\nTheme name: " editable-field :size 10 "\n\nDocumentation:\n" text :value format-time-string "Created %Y-%m-%d." "Insert Variable" "Add another variable to this theme." #[(widget &optional event) "\300\301!\207" [call-interactively custom-theme-add-variable] 2] point-marker "Insert Face" "Add another face to this theme." #[(widget &optional event) "\300\301!\207" [call-interactively custom-theme-add-face] 2] #[(&rest ignore) "\300\301!\205\f\302p!\210\303 \207" [y-or-n-p "Discard current changes? " kill-buffer customize-create-theme] 2] widget-setup message ""] 8 (#$ . 3345) nil]) (defalias 'custom-theme-add-variable #[(symbol) " \236\203 \304\305\306!\"\207\307!\204\304\310\306!\"\207\311=\203$\304\312!\207\212\nb\210\313\314!\210\315\316\317\320!\321\322\323\324\325\326\327&  B B\330 !\210)\331 )\207" [symbol custom-theme-variables custom-theme-insert-variable-marker widget message "%s is already in the theme" symbol-name boundp "%s is not defined as a variable" custom-enabled-themes "Custom theme cannot contain `custom-enabled-themes'" widget-insert "\n" widget-create custom-variable :tag custom-unlispify-tag-name :custom-level 0 :action custom-theme-variable-action :custom-state unknown :value custom-magic-reset widget-setup] 12 nil "vVariable name: "]) #@118 Alist of actions for the `custom-variable' widget in Custom Theme Mode. See the documentation for `custom-variable'. (defvar custom-theme-variable-menu '(("Reset to Current" custom-redraw (lambda (widget) (and (boundp (widget-value widget)) (memq (widget-get widget :custom-state) '(themed modified changed))))) ("Reset to Theme Value" custom-variable-reset-theme (lambda (widget) (let ((theme (intern (widget-value custom-theme-name))) (symbol (widget-value widget)) found) (and (custom-theme-p theme) (dolist (setting (get theme 'theme-settings) found) (if (and (eq (cadr setting) symbol) (eq (car setting) 'theme-value)) (setq found t))))))) ("---" ignore ignore) ("Delete" custom-theme-delete-variable nil)) (#$ . 6549)) #@110 Show the Custom Theme Mode menu for a `custom-variable' widget. Optional EVENT is the location for the menu. (defalias 'custom-theme-variable-action #[(widget &optional event) "\304\n \")\207" [custom-theme-variable-menu custom-variable-menu widget event custom-variable-action] 3 (#$ . 7281)]) #@59 Reset WIDGET to its value for the currently edited theme. (defalias 'custom-variable-reset-theme #[(widget) "\306\307!!\307 !\310\211\311N\310\211\2039@\211\211A@) =\2030 @\312=\2030 A\211\204*\313\314 \315\"@\316\n8\"\210+\317 \320\321#\210\322 !\210\323 \207" [custom-theme-name widget found symbol theme setting intern widget-value nil theme-settings theme-value widget-value-set widget-get :children 3 widget-put :custom-state themed custom-redraw-magic widget-setup #1=#:--cl-dolist-temp-- x] 5 (#$ . 7584)]) (defalias 'custom-theme-delete-variable #[(widget) "\302\303! \"\304!\207" [widget custom-theme-variables assq-delete-all widget-value widget-delete] 3]) (defalias 'custom-theme-add-face #[(symbol) " \236\203 \304\305\306!\"\207\307!\204\304\310\306!\"\207\212\nb\210\311\312!\210\313\314\315\316!\317\320\321\322\323\324\325&  B B\326 !\210\327 *\207" [symbol custom-theme-faces custom-theme-insert-face-marker widget message "%s is already in the theme" symbol-name facep "%s is not defined as a face" widget-insert "\n" widget-create custom-face :tag custom-unlispify-tag-name :custom-level 0 :action custom-theme-face-action :custom-state unknown :value custom-magic-reset widget-setup] 12 nil (list (read-face-name "Face name" nil nil))]) #@118 Alist of actions for the `custom-variable' widget in Custom Theme Mode. See the documentation for `custom-variable'. (defvar custom-theme-face-menu '(("Reset to Theme Value" custom-face-reset-theme (lambda (widget) (let ((theme (intern (widget-value custom-theme-name))) (symbol (widget-value widget)) found) (and (custom-theme-p theme) (dolist (setting (get theme 'theme-settings) found) (if (and (eq (cadr setting) symbol) (eq (car setting) 'theme-face)) (setq found t))))))) ("---" ignore ignore) ("Delete" custom-theme-delete-face nil)) (#$ . 8886)) #@106 Show the Custom Theme Mode menu for a `custom-face' widget. Optional EVENT is the location for the menu. (defalias 'custom-theme-face-action #[(widget &optional event) "\304\n \")\207" [custom-theme-face-menu custom-face-menu widget event custom-face-action] 3 (#$ . 9447)]) #@59 Reset WIDGET to its value for the currently edited theme. (defalias 'custom-face-reset-theme #[(widget) "\306\307!!\307 !\310\211\311N\310\211\2039@\211\211A@) =\2030 @\312=\2030 A\211\204*\313\314 \315\"@\316\n8\"\210+\317 \320\321#\210\322 !\210\323 \207" [custom-theme-name widget found symbol theme setting intern widget-value nil theme-settings theme-face widget-value-set widget-get :children 3 widget-put :custom-state themed custom-redraw-magic widget-setup #1=#:--cl-dolist-temp-- x] 5 (#$ . 9730)]) (defalias 'custom-theme-delete-face #[(widget) "\302\303! \"\304!\207" [widget custom-theme-faces assq-delete-all widget-value widget-delete] 3]) (defalias 'custom-theme-visit-theme #[nil "\203 \304\305!\205.\306 \210\307\310!\211\311=\204\312\n\313 !\"\210\312 \314N\206)\315\316!\"\210\317 )\207" [custom-theme-variables theme custom-theme-name custom-theme-description y-or-n-p "Discard current changes? " customize-create-theme call-interactively custom-theme-merge-theme user widget-value-set symbol-name theme-documentation format-time-string "Created %Y-%m-%d." widget-setup] 5 nil nil]) (defalias 'custom-theme-merge-theme #[(theme) "\305=\204\n\306!\210\307N\211\310\211\203< @\211@\311=\203,\312\n\211A@)!\210\2025\313\n\211A@)!\210 A\211\204+\314!\210\207" [theme settings setting #1=#:--cl-dolist-temp-- x user load-theme theme-settings nil theme-value custom-theme-add-variable custom-theme-add-face disable-theme] 4 nil "SCustom theme name: "]) (defalias 'custom-theme-write #[(&rest ignore) "\306!\307 \310P\n\"\306\f!+,-. \311\230\204) \312\230\204) \313\230\2031\314\315 \"\210\202R\316\317 \"\203?\314\320!\210\202R\321 !\203R\322\323\324 \"!\204R\314\325!\210\326\327!/\330\216r/q\210\331 \210\321\n!\204n\332\333\n!\334\"\210 0\335 \210\336 \261\210 \203\203\337 \340\261\210\341c\210\342 ,\"\210\343 .\"\210\344 \341\261\210\345 \210+,\3461\2112\203\3032@1\3471A\350\351#\210\3521A!\2102A\2112\204\247*.\3463\2114\203\3534@3\3473A\350\351#\210\3523A!\2104A\2114\204\317.\346\207" [custom-theme-name name custom-theme-directory filename custom-theme-description doc widget-value expand-file-name "-theme.el" "" "user" "changed" error "Custom themes cannot be named `%s'" string-match " " "Custom theme names should not contain spaces" file-exists-p y-or-n-p format "File %s exists. Overwrite? " "Aborted" generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) emacs-lisp-mode make-directory file-name-as-directory t erase-buffer "(deftheme " "\n \"" "\"" ")\n" custom-theme-write-variables custom-theme-write-faces "\n(provide-theme '" save-buffer nil widget-put :custom-state saved custom-redraw-magic custom-theme-variables vars custom-theme-faces faces #1# buffer-file-name var #2=#:--cl-dolist-temp-- face #3=#:--cl-dolist-temp--] 5]) #@97 Write a `custom-theme-set-variables' command for THEME. It includes all variables in list VARS. (defalias 'custom-theme-write-variables #[(theme vars) "\2052p\303\304!\210\303\305!\210\303\n!\210\303\306!\210\307\310\"\210n\203#\303\311!\210\303\312!\210\313\306!?\2051\303\306!)\207" [vars standard-output theme princ "\n(custom-theme-set-variables\n" " '" "\n" mapc #[(spec) "@\304A\305\"\242\211\203\306\n!\202 \307N\310 !\205;n\204&\311\312!\210\311\313!\210\314 !\210\311\315!\210\314\316 !!\210\311\317!+\207" [spec symbol child value widget-get :children widget-value standard-value boundp princ "\n" " '(" prin1 " " custom-quote ")"] 4] " " ")" looking-at] 3 (#$ . 12674)]) #@90 Write a `custom-theme-set-faces' command for THEME. It includes all faces in list FACES. (defalias 'custom-theme-write-faces #[(theme faces) "\2052p\303\304!\210\303\305!\210\303\n!\210\303\306!\210\307\310\"\210n\203#\303\311!\210\303\312!\210\313\306!?\2051\303\306!)\207" [faces standard-output theme princ "\n(custom-theme-set-faces\n" " '" "\n" mapc #[(spec) "@\304A\305\"\242\211\205\306\n!\307 !\2057\n\2057n\204$\310\311!\210\310\312!\210\313 !\210\310\314!\210\313 !\210\310\315!+\207" [spec symbol child value widget-get :children widget-value facep princ "\n" " '(" prin1 " " ")"] 4] " " ")" looking-at] 3 (#$ . 13379)])