3
0
Fork 0
forked from mirrors/nixpkgs

emacs: add "color-theme"

This commit is contained in:
Mathijs Kwik 2012-08-17 08:55:47 +02:00
parent f27f8a1177
commit 5a146e9cff
4 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,26 @@
{stdenv, fetchurl, emacs}:
stdenv.mkDerivation rec {
name = "color-theme-6.6.0";
src = fetchurl {
url = "http://download.savannah.gnu.org/releases/color-theme/${name}.tar.gz";
sha256 = "0yx1ghcjc66s1rl0v3d4r1k88ifw591hf814ly3d73acvh15zlsn";
};
# patches from http://aur.archlinux.org/packages.php?ID=54883
patches = [ ./fix-build.patch ./gnus-bug.diff ];
buildInputs = [ emacs ];
installFlags = [ "ELISPDIR=$(out)/share/emacs/site-lisp" ];
installTargets = "install-bin";
meta = {
description = "An emacs-lisp mode for skinning your emacs.";
homepage = http://www.nongnu.org/color-theme;
license = "GPLv2+";
platforms = stdenv.lib.platforms.all;
};
}

View file

@ -0,0 +1,19 @@
--- a/Makefile 2009-05-15 18:22:49.000000000 +0200
+++ b/Makefile 2009-05-16 08:59:36.000000000 +0200
@@ -15,6 +15,7 @@
TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE))
MANUAL = color-theme
MISC = AUTHORS COPYING ChangeLog Makefile.defs Makefile $(AUTOLOADFILE).in
+LOADPATH = "$(shell pwd)" "$(shell pwd)/themes"
#AUTHORS CREDITS HISTORY NEWS README Makefile ChangeLog \
#ChangeLog.2005 ChangeLog.2004 ChangeLog.2003 ChangeLog.2002 \
#ChangeLog.2001 servers.pl color-theme-auto.in color-theme.texi
@@ -47,7 +48,7 @@
%.elc: %.el
@$(EMACS) $(OPTIONCOMPILE) \
- --eval '(setq load-path (cons "." load-path))' \
+ --eval '(setq load-path (append load-path (list $(LOADPATH))))' \
-f batch-byte-compile $<
%.info: %.texi

View file

@ -0,0 +1,28 @@
diff -Naur color-theme-6.6.0.orig/color-theme.el color-theme-6.6.0.new/color-theme.el
--- color-theme-6.6.0.orig/color-theme.el 2011-11-18 01:17:29.000000000 +0100
+++ color-theme-6.6.0.new/color-theme.el 2011-11-18 01:24:07.000000000 +0100
@@ -73,9 +73,10 @@
"Non-nil if running XEmacs.")
;; Add this since it appears to miss in emacs-2x
-(or (fboundp 'replace-in-string)
- (defun replace-in-string (target old new)
- (replace-regexp-in-string old new target)))
+(if (fboundp 'replace-in-string)
+ (defalias 'color-theme-replace-in-string 'replace-in-string)
+ (defsubst color-theme-replace-in-string (target old new &optional literal)
+ (replace-regexp-in-string old new target nil literal)))
;; face-attr-construct has a problem in Emacs 20.7 and older when
;; dealing with inverse-video faces. Here is a short test to check
@@ -1626,8 +1627,8 @@
(add-to-list 'color-themes
(list ',n
(upcase-initials
- (replace-in-string
- (replace-in-string
+ (color-theme-replace-in-string
+ (color-theme-replace-in-string
(symbol-name ',n) "^color-theme-" "") "-" " "))
,author))
(defun ,n ()

View file

@ -6674,6 +6674,8 @@ let
coffee = callPackage ../applications/editors/emacs-modes/coffee { };
colorTheme = callPackage ../applications/editors/emacs-modes/color-theme { };
cua = callPackage ../applications/editors/emacs-modes/cua { };
ecb = callPackage ../applications/editors/emacs-modes/ecb { };