commit:     62d199e66f2adc2a71950162cf76c370f0a9947e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  7 08:32:24 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Oct  7 10:48:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62d199e6

app-emacs/color-theme: Fix package for Emacs 29

Update to EAPI 8.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-emacs/color-theme/color-theme-6.6.0-r3.ebuild  |  37 +++++++
 .../files/50color-theme-gentoo-6.6.0-r3.el         | 119 +++++++++++++++++++++
 .../files/color-theme-6.6.0-emacs-29.patch         | 114 ++++++++++++++++++++
 3 files changed, 270 insertions(+)

diff --git a/app-emacs/color-theme/color-theme-6.6.0-r3.ebuild 
b/app-emacs/color-theme/color-theme-6.6.0-r3.ebuild
new file mode 100644
index 000000000000..41b2cc7a1c60
--- /dev/null
+++ b/app-emacs/color-theme/color-theme-6.6.0-r3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-replace-in-string.patch
+       "${FILESDIR}"/${P}-emacs-26.patch
+       "${FILESDIR}"/${P}-emacs-29.patch
+)
+ELISP_REMOVE="color-theme-autoloads.*"
+SITEFILE="50${PN}-gentoo-6.6.0-r3.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
+
+       local 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/50color-theme-gentoo-6.6.0-r3.el 
b/app-emacs/color-theme/files/50color-theme-gentoo-6.6.0-r3.el
new file mode 100644
index 000000000000..b516108fdf9b
--- /dev/null
+++ b/app-emacs/color-theme/files/50color-theme-gentoo-6.6.0-r3.el
@@ -0,0 +1,119 @@
+(add-to-list 'load-path "@SITELISP@")
+
+(autoload 'color-theme-select "color-theme" "\
+Displays a special buffer for selecting and installing a color theme.
+With optional prefix ARG, this buffer will include color theme libraries
+as well.  A color theme library is in itself not complete, it must be
+used as part of another color theme to be useful.  Thus, color theme
+libraries are mainly useful for color theme authors.
+
+\(fn &optional ARG)" t)
+
+(autoload 'color-theme-describe "color-theme" "\
+Describe color theme listed at point.
+This shows the documentation of the value of text-property color-theme
+at point.  The text-property color-theme should be a color theme
+function.  See `color-themes'." t)
+
+(autoload 'color-theme-install-at-mouse "color-theme" "\
+Install color theme clicked upon using the mouse.
+First argument EVENT is used to set point.  Then
+`color-theme-install-at-point' is called.
+
+\(fn EVENT)" t)
+
+(autoload 'color-theme-install-at-point-for-current-frame "color-theme" "\
+Install color theme at point for current frame only.
+Binds `color-theme-is-global' to nil and calls
+`color-theme-install-at-point'." t)
+
+(autoload 'color-theme-print "color-theme" "\
+Print the current color theme function.
+
+You can contribute this function to <URL:news:gnu.emacs.sources> or
+paste it into your .emacs file and call it.  That should recreate all
+the settings necessary for your color theme.
+
+Example:
+
+    (require \\='color-theme)
+    (defun my-color-theme ()
+      \"Color theme by Alex Schroeder, created 2000-05-17.\"
+      (interactive)
+      (color-theme-install
+       \\='(...
+        ...
+        ...)))
+    (my-color-theme)
+
+If you want to use a specific color theme function, you can call the
+color theme function in your .emacs directly.
+
+Example:
+
+    (require \\='color-theme)
+    (color-theme-gnome2)
+
+\(fn &optional BUF)" t)
+
+(autoload 'color-theme-analyze-defun "color-theme" "\
+Once you have a color-theme printed, check for missing faces.
+This is used by maintainers who receive a color-theme submission
+and want to make sure it follows the guidelines by the color-theme
+author." t)
+
+(autoload 'color-theme-make-snapshot "color-theme" "\
+Return the definition of the current color-theme.
+The function returned will recreate the color-theme in use at the moment.")
+
+(autoload 'color-theme-compare "color-theme" "\
+Compare two color themes.
+This will print the differences between installing THEME-A and
+installing THEME-B.  Note that the order is important: If a face is
+defined in THEME-A and not in THEME-B, then this will not show up as a
+difference, because there is no reset before installing THEME-B.  If a
+face is defined in THEME-B and not in THEME-A, then this will show up as
+a difference.
+
+\(fn THEME-A THEME-B)" t)
+
+(autoload 'color-theme-install "color-theme" "\
+Install a color theme defined by frame parameters, variables and faces.
+
+The theme is installed for all present and future frames; any missing
+faces are created.  See `color-theme-install-faces'.
+
+THEME is a color theme definition.  See below for more information.
+
+If you want to install a color theme from your .emacs, use the output
+generated by `color-theme-print'.  This produces color theme function
+which you can copy to your .emacs.
+
+A color theme definition is a list:
+\([FUNCTION] FRAME-PARAMETERS VARIABLE-SETTINGS FACE-DEFINITIONS)
+
+FUNCTION is the color theme function which called `color-theme-install'.
+This is no longer used.  There was a time when this package supported
+automatic factoring of color themes.  This has been abandoned.
+
+FRAME-PARAMETERS is an alist of frame parameters.  These are installed
+with `color-theme-install-frame-params'.  These are installed last such
+that any changes to the default face can be changed by the frame
+parameters.
+
+VARIABLE-DEFINITIONS is an alist of variable settings.  These are
+installed with `color-theme-install-variables'.
+
+FACE-DEFINITIONS is an alist of face definitions.  These are installed
+with `color-theme-install-faces'.
+
+If `color-theme-is-cumulative' is nil, a color theme will undo face and
+frame-parameter settings of previous color themes.
+
+\(fn THEME)")
+
+(autoload 'color-theme-submit "color-theme" "\
+Submit your color-theme to the maintainer." t)
+
+(autoload 'color-theme-initialize "color-theme" "\
+Initialize the color theme package by loading color-theme-libraries." t)

diff --git a/app-emacs/color-theme/files/color-theme-6.6.0-emacs-29.patch 
b/app-emacs/color-theme/files/color-theme-6.6.0-emacs-29.patch
new file mode 100644
index 000000000000..7b2e601e39cf
--- /dev/null
+++ b/app-emacs/color-theme/files/color-theme-6.6.0-emacs-29.patch
@@ -0,0 +1,114 @@
+--- color-theme-6.6.0/color-theme.el
++++ color-theme-6.6.0/color-theme.el
+@@ -50,7 +50,7 @@
+   (require 'reporter)
+   (require 'sendmail))
+ 
+-(require 'cl); set-difference is a function...
++(require 'cl-seq); cl-set-difference is a function...
+ 
+ ;; for custom-face-attributes-get or face-custom-attributes-get
+ (require 'cus-face)
+@@ -143,7 +143,7 @@
+   "Regexp that matches variable names.
+ Only variables that match this regexp can be changed as part of a color
+ theme.  In addition to matching this name, the variables have to be user
+-variables (see function `user-variable-p')."
++variables (see function `custom-variable-p')."
+   :type 'regexp
+   :group 'color-theme)
+ 
+@@ -174,7 +174,7 @@
+ frames with different color themes.
+ 
+ setup:
+-    \(require 'color-theme)
++    \(require \\='color-theme)
+     ;; set default color theme
+     \(color-theme-blue-sea)
+     ;; create some frames with different color themes
+@@ -430,7 +430,7 @@
+ If you defined your own color theme and want to add it to this list,
+ use something like this:
+ 
+-  (add-to-list 'color-themes '(color-theme-gnome2 \"Gnome2\" \"Alex\"))")
++  (add-to-list \\='color-themes \\='(color-theme-gnome2 \"Gnome2\" 
\"Alex\"))")
+ 
+ ;;; Functions
+ 
+@@ -513,7 +513,7 @@
+ If you want to install the color theme permanently, put the call to the
+ color theme function into your ~/.emacs:
+ 
+-    \(require 'color-theme)
++    \(require \\='color-theme)
+     \(color-theme-gnome2)
+ 
+ If you worry about the size of color-theme.el: You are right.  Use
+@@ -607,7 +607,7 @@
+ 
+ If the optional argument EXCLUDE is non-nil, then the sense is
+ reversed: only non-matching elements will be retained."
+-  (let (elem new-list)
++  (let (elem new-list name)
+     (dolist (elem old-list)
+       (setq name (symbol-name (if (listp elem) (car elem) elem)))
+       (when (or (and (not exclude)
+@@ -861,12 +861,12 @@
+   "Return a list of variable settings usable in a color theme.
+ Such an alist may be installed by `color-theme-install-variables'.
+ The variable names must match `color-theme-legal-variables', and the
+-variable must be a user variable according to `user-variable-p'."
++variable must be a user variable according to `custom-variable-p'."
+   (let ((vars)
+       (val))
+     (mapatoms (lambda (v)
+               (and (boundp v)
+-                   (user-variable-p v)
++                   (custom-variable-p v)
+                    (string-match color-theme-legal-variables
+                                  (symbol-name v))
+                    (setq val (eval v))
+@@ -952,12 +952,12 @@
+ 
+ Example:
+ 
+-    \(require 'color-theme)
++    \(require \\='color-theme)
+     \(defun my-color-theme ()
+       \"Color theme by Alex Schroeder, created 2000-05-17.\"
+       \(interactive)
+       \(color-theme-install
+-       '(...
++       \\='(...
+        ...
+        ...)))
+     \(my-color-theme)
+@@ -967,7 +967,7 @@
+ 
+ Example:
+ 
+-    \(require 'color-theme)
++    \(require \\='color-theme)
+     \(color-theme-gnome2)"
+   (interactive)
+   (message "Pretty printing current color theme function...")
+@@ -1495,15 +1495,15 @@
+                       (color-theme-get-vars)
+                       (color-theme-get-face-definitions)))
+     (delete-frame))
+-  (let ((params (set-difference
++  (let ((params (cl-set-difference
+                (color-theme-frame-params theme-b)
+                (color-theme-frame-params theme-a)
+                :test 'equal))
+-      (vars (set-difference
++      (vars (cl-set-difference
+              (color-theme-variables theme-b)
+              (color-theme-variables theme-a)
+              :test 'equal))
+-      (faces (set-difference
++      (faces (cl-set-difference
+               (color-theme-faces theme-b)
+               (color-theme-faces theme-a)
+               :test 'equal)))

Reply via email to