bugcolor-theme - Bugs: bug #28737, Unable to use...

 
 

bug #28737: Unable to use color-theme-directory unless color-theme-load-all-themes false

Submitter:  Michael Carland <mcarland>
Submitted:  Tue 26 Jan 2010 04:02:27 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  General error Status:  None
Assigned to:  None Open/Closed:  Open
Reproducibility:  Every Time
Step by step reproducibility:  *

OS X
GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0)
color-theme 6.6.0

Create themes directory with two theme files.

In .emacs:

       (setq color-theme-directory "~/.emacs.el/themes")
       (require 'color-theme)
       (color-theme-initialize)

After the (push ...), color-theme-libraries would look like:

(("/Users/mcarland/.emacs.el/themes/color-theme-theme2.el") "/Applications/Emacs.app/Contents/Resources/site-lisp/color-theme/themes/color-theme-example.el" "/Applications/Emacs.app/Contents/Resources/site-lisp/color-theme/themes/color-theme-example.elc" "/Applications/Emacs.app/Contents/Resources/site-lisp/color-theme/themes/color-theme-library.el" "/Applications/Emacs.app/Contents/Resources/site-lisp/color-theme/themes/color-theme-library.elc")

where color-theme-theme1.el is missing (cdr?) and all but the first theme from color-theme-directory would be in a sublist (push instead of append?).

* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 26 Jan 2010 04:02:27 AM UTC, original submission:  

I was unable to set color-theme-directory unless I disabled color-theme-load-add-themes.

I am a very green with elisp, so this may be my mistake.

I was able to work around this by modifying color-theme.el to the following:

(defun color-theme-initialize ()
  "Initialize the color theme package by loading color-theme-libraries."
  (interactive)

  (cond ((and (not color-theme-load-all-themes)
              color-theme-directory)
         (setq color-theme-libraries
               (directory-files color-theme-directory t "^color-theme")))
(color-theme-directory
(setq color-theme-libraries
       (append color-theme-libraries
       (directory-files color-theme-directory t "^color-theme")
       ))))
;;        (color-theme-directory
;;         (push (cdr (directory-files color-theme-directory t "^color-theme"))
;;               color-theme-libraries)))
  (dolist (library color-theme-libraries)
    (load library)))

(when nil
  (setq color-theme-directory "themes/"
        color-theme-load-all-themes nil)
  (color-theme-initialize)
)


Michael Carland <mcarland>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mcarland (Submitted the item)
  • -email is unavailable- added by mcarland
  •  

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-01-26 mcarland Carbon-Copy- Added mcarland

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code