I am a little new to emacs and have managed to get the color theme to my liking. However, I want to be able to use the same theme on a different machine and have been struggling to get it to work.
I used M-x color-theme-print, to extract the current theme settings, saved the file, moved it to the new computer, placed it under ~/.emacs.d/name-theme.el
Now, when I try M-x color-theme-select, my theme is not in the list, but when I go into M-x customize-themes, and try to select my new theme I get the error: "Undefined Custom theme". But now when I try, M-x color-theme-select, I can see my theme and can select it!
I would very much appreciate some help with getting this fixed and setting up my emacs so I can load this theme at start up. Thanks in advance.
Here is the code to my color theme:
(eval-when-compile (require 'color-theme)) (defun my-color-theme () "Color theme by JS, created 2017-01-27." (interactive) (color-theme-install '(my-color-theme ((background-color . "black") (background-mode . dark) (cursor-color . "thistle") (foreground-color . "wheat")) ((list-matching-lines-buffer-name-face . underline) (list-matching-lines-face . match) (list-matching-lines-prefix-face . shadow) (widget-mouse-face . highlight)) (default ((t (:stipple nil :background "black" :foreground "wheat" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 1 :width normal :foundry "default" :family "default")))) (bold ((t (:bold t :weight bold)))) (bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) (border ((t (nil)))) (buffer-menu-buffer ((t (:bold t :weight bold)))) (button ((t (:underline t :foreground "cyan")))) (comint-highlight-input ((t (:bold t :weight bold)))) (comint-highlight-prompt ((t (:foreground "cyan")))) (completions-annotations ((t (:italic t :slant italic)))) (completions-common-part ((t (nil)))) (completions-first-difference ((t (:bold t :weight bold)))) (cursor ((t (:background "thistle")))) (error ((t (:foreground "salmon1")))) (escape-glyph ((t (:foreground "cyan")))) (file-name-shadow ((t (:foreground "grey70")))) (fixed-pitch ((t (:family "Monospace")))) (font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) (font-lock-comment-delimiter-face ((t (:foreground "SpringGreen3")))) (font-lock-comment-face ((t (:foreground "SpringGreen3")))) (font-lock-constant-face ((t (:foreground "turquoise")))) (font-lock-doc-face ((t (:foreground "dark khaki")))) (font-lock-function-name-face ((t (:foreground "pale green")))) (font-lock-keyword-face ((t (:foreground "white")))) (font-lock-negation-char-face ((t (nil)))) (font-lock-preprocessor-face ((t (:foreground "LightSteelBlue")))) (font-lock-regexp-grouping-backslash ((t (:bold t :weight bold)))) (font-lock-regexp-grouping-construct ((t (:bold t :weight bold)))) (font-lock-string-face ((t (:foreground "dark khaki")))) (font-lock-type-face ((t (:foreground "aquamarine")))) (font-lock-variable-name-face ((t (:foreground "yellow green")))) (font-lock-warning-face ((t (:foreground "salmon1")))) (fringe ((t (:background "grey10")))) (glyphless-char ((t (:underline t)))) (header-line ((t (:box (:line-width -1 :style released-button) :foreground "black" :background "grey75" :inverse-video nil :underline t)))) (help-argument-name ((t (:italic t :slant italic)))) (highlight ((t (:background "dark green" :foreground "white")))) (isearch ((t (:background "dark goldenrod" :foreground "white")))) (isearch-fail ((t (:background "red4")))) (italic ((t (:italic t :slant italic)))) (lazy-highlight ((t (:background "gray25")))) (link ((t (:foreground "cyan" :underline t)))) (link-visited ((t (:foreground "dark cyan" :underline t)))) (match ((t (:background "RoyalBlue3")))) (menu ((t (nil)))) (message-cited-text ((t (:foreground "SpringGreen3")))) (message-header-cc ((t (:foreground "yellow green")))) (message-header-name ((t (:foreground "dark turquoise")))) (message-header-newsgroups ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) (message-header-other ((t (:foreground "dark khaki")))) (message-header-subject ((t (:foreground "pale turquoise")))) (message-header-to ((t (:foreground "pale green")))) (message-header-xheader ((t (:foreground "DeepSkyBlue1")))) (message-mml ((t (:foreground "MediumSpringGreen")))) (message-separator ((t (:foreground "deep sky blue")))) (minibuffer-prompt ((t (:foreground "cyan")))) (mm-command-output ((t (:foreground "ForestGreen")))) (mode-line ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) (mode-line-buffer-id ((t (:bold t :weight bold)))) (mode-line-emphasis ((t (:bold t :weight bold)))) (mode-line-highlight ((t (:box (:line-width 2 :color "grey40" :style released-button))))) (mode-line-inactive ((t (:background "grey30" :foreground "grey80" :box (:line-width -1 :color "grey40" :style nil) :weight light)))) (mouse ((t (nil)))) (next-error ((t (:foreground "white" :background "dark green")))) (nobreak-space ((t (:foreground "cyan" :underline t)))) (pp^L-highlight ((t (nil)))) (query-replace ((t (:foreground "white" :background "dark goldenrod")))) (region ((t (:background "dark green" :foreground "white")))) (scroll-bar ((t (nil)))) (secondary-selection ((t (:background "dark slate gray")))) (shadow ((t (:foreground "grey70")))) (show-paren-match ((t (:background "steelblue3")))) (show-paren-mismatch ((t (:background "purple" :foreground "white")))) (success ((t (:foreground "yellow green")))) (tool-bar ((t (:foreground "black" :box (:line-width 1 :style released-button))))) (tooltip ((t (:family "Sans Serif" :background "lightyellow" :foreground "black")))) (trailing-whitespace ((t (:background "red1")))) (tty-menu-disabled-face ((t (:background "blue" :foreground "lightgray")))) (tty-menu-enabled-face ((t (:bold t :background "blue" :foreground "yellow" :weight bold)))) (tty-menu-selected-face ((t (:background "red")))) (underline ((t (:underline t)))) (variable-pitch ((t (:family "Sans Serif")))) (vertical-border ((t (:weight light :box (:line-width -1 :color "grey40" :style nil) :foreground "grey80" :background "grey30")))) (warning ((t (:foreground "orange")))) (widget-button ((t (:bold t :weight bold)))) (widget-button-pressed ((t (:foreground "red1")))) (widget-documentation ((t (:foreground "lime green")))) (widget-field ((t (:background "yellow3" :foreground "black")))) (widget-inactive ((t (:foreground "grey70")))) (widget-single-line-field ((t (:background "green3" :foreground "black")))) (window-divider ((t (:foreground "gray60")))) (window-divider-first-pixel ((t (:foreground "gray80")))) (window-divider-last-pixel ((t (:foreground "gray40"))))))) (add-to-list 'color-themes '(my-color-theme "JS" "JS"))