commit:     a689b61a5714c691f876982cd6789ab5eea9aba3
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 15 08:17:09 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 15 08:38:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a689b61a

app-emacs/color-theme: Fixes for Emacs 26.

Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-emacs/color-theme/color-theme-6.6.0-r2.ebuild  | 36 ++++++++++++++++
 .../files/color-theme-6.6.0-emacs-26.patch         | 48 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/app-emacs/color-theme/color-theme-6.6.0-r2.ebuild 
b/app-emacs/color-theme/color-theme-6.6.0-r2.ebuild
new file mode 100644
index 00000000000..7ddb8a2caf5
--- /dev/null
+++ b/app-emacs/color-theme/color-theme-6.6.0-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit elisp readme.gentoo-r1
+
+DESCRIPTION="Install color themes (includes many themes)"
+HOMEPAGE="http://www.nongnu.org/color-theme/";
+SRC_URI="http://download.savannah.gnu.org/releases-noredirect/${PN}/${P}.tar.gz";
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-replace-in-string.patch
+       "${FILESDIR}"/${P}-emacs-26.patch
+)
+ELISP_REMOVE="color-theme-autoloads.*"
+SITEFILE="50${PN}-gentoo.el"
+
+src_install() {
+       elisp-install ${PN} *.el *.elc
+       elisp-install ${PN}/themes themes/*.el
+       elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+       dodoc AUTHORS BUGS ChangeLog README
+
+       DOC_CONTENTS="To use color-theme non-interactively, initialise it
+               in your ~/.emacs file as in the following example (which is
+               for the \"Blue Sea\" theme):
+               \n
+               \n(color-theme-initialize)
+               \n(color-theme-blue-sea)"
+       readme.gentoo_create_doc
+}

diff --git a/app-emacs/color-theme/files/color-theme-6.6.0-emacs-26.patch 
b/app-emacs/color-theme/files/color-theme-6.6.0-emacs-26.patch
new file mode 100644
index 00000000000..4310733dbf2
--- /dev/null
+++ b/app-emacs/color-theme/files/color-theme-6.6.0-emacs-26.patch
@@ -0,0 +1,48 @@
+Some updates taken from https://www.emacswiki.org/emacs/color-theme.el
+in order to make this work with Emacs 26. EmacsWiki calls this
+version 6.6.1, but doesn't package any other files from the upstream
+tarball.
+
+--- color-theme-6.6.0-orig/color-theme.el
++++ color-theme-6.6.0/color-theme.el
+@@ -1077,13 +1077,11 @@
+   (let ((rules '((font-lock-builtin-face font-lock-reference-face)
+                (font-lock-doc-face font-lock-doc-string-face)
+                (font-lock-constant-face font-lock-preprocessor-face)
+-               ;; In Emacs 21 `modeline' is just an alias for
+-               ;; `mode-line'.  I recommend the use of
+-               ;; `modeline' until further notice.
+-               (modeline mode-line)
+-               (modeline modeline-buffer-id)
+-               (modeline modeline-mousable)
+-               (modeline modeline-mousable-minor-mode)
++               ;; D.ADAMS - Emacs 24.3 made `modeline' obsolete, so I've just 
commented-out these four lines.
++               ;; (modeline mode-line)
++               ;; (modeline modeline-buffer-id)
++               ;; (modeline modeline-mousable)
++               ;; (modeline modeline-mousable-minor-mode)
+                (region primary-selection)
+                (region zmacs-region)
+                (font-lock-string-face dired-face-boring "^dired")
+@@ -1254,7 +1252,9 @@
+          (val (cdr (assq param params)))
+          (frame (if color-theme-is-global nil (selected-frame))))
+       (when val
+-      (set-face-property face prop val frame)))))
++      (if (fboundp 'set-face-property)
++          (set-face-property face prop val frame)
++        (set-face-attribute face frame prop val))))))
+ 
+ (defun color-theme-alist-reduce (old-list)
+   "Reduce OLD-LIST.
+@@ -1332,7 +1332,9 @@
+     (dolist (var vars)
+       (if (or color-theme-is-global color-theme-xemacs-p)
+         (set (car var) (cdr var))
+-      (make-variable-frame-local (car var))
++      ;; DADAMS
++      ;; `make-variable-frame-local' was removed from Emacs C code in Emacs 
26.
++      (when (fboundp 'make-variable-frame-local) (make-variable-frame-local 
(car var)))
+       (modify-frame-parameters (selected-frame) (list var))))))
+ 
+ (defun color-theme-install-faces (faces)

Reply via email to