summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-10-14 10:58:41 +0200
committerUlrich Müller <ulm@gentoo.org>2023-10-14 11:06:43 +0200
commitee4089c376f57979ac2a9ab900bd9294aa37bf6f (patch)
treed3414653d1322d7c28d9f65358813434ccbed92a
parentdev-dotnet/dotnet-sdk-bin: Stabilize 7.0.401-r1 arm64, #915713 (diff)
downloadgentoo-ee4089c376f57979ac2a9ab900bd9294aa37bf6f.tar.gz
gentoo-ee4089c376f57979ac2a9ab900bd9294aa37bf6f.tar.bz2
gentoo-ee4089c376f57979ac2a9ab900bd9294aa37bf6f.zip
app-emacs/gnuserv: Don't advise delete-frame
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--app-emacs/gnuserv/files/gnuserv-3.12.8-advice.patch15
-rw-r--r--app-emacs/gnuserv/files/gnuserv-3.12.8-devices.patch27
-rw-r--r--app-emacs/gnuserv/files/gnuserv-3.12.8-warnings.patch2
-rw-r--r--app-emacs/gnuserv/gnuserv-3.12.8-r8.ebuild (renamed from app-emacs/gnuserv/gnuserv-3.12.8-r7.ebuild)0
4 files changed, 24 insertions, 20 deletions
diff --git a/app-emacs/gnuserv/files/gnuserv-3.12.8-advice.patch b/app-emacs/gnuserv/files/gnuserv-3.12.8-advice.patch
index f4ac28efa662..90d4938751e2 100644
--- a/app-emacs/gnuserv/files/gnuserv-3.12.8-advice.patch
+++ b/app-emacs/gnuserv/files/gnuserv-3.12.8-advice.patch
@@ -2,7 +2,7 @@ defadvice is obsolete in Emacs 30.
--- gnuserv-3.12.8/gnuserv-compat.el
+++ gnuserv-3.12.8/gnuserv-compat.el
-@@ -112,38 +112,35 @@
+@@ -112,28 +112,27 @@
;; can do! If the device doesn't represent a live frame, we create
;; the frame as requested.
@@ -24,19 +24,6 @@ defadvice is obsolete in Emacs 30.
+
+ (advice-add 'make-frame :around #'gnuserv-compat-make-frame)
- ;; Advise `delete-frame' to run `delete-device-hook'. This might be a
- ;; little too hacky, but it seems to work! If someone actually tries
- ;; to do something device specific then it will probably blow up!
-- (defadvice delete-frame (before
-- gnuserv-compat-delete-frame
-- first
-- nil
-- activate)
-+ (defun gnuserv-compat-delete-frame (&optional frame _force)
- (run-hook-with-args 'delete-device-hook frame))
-
-+ (advice-add 'delete-frame :before #'gnuserv-compat-delete-frame)
-+
;; Advise `filtered-frame-list' to ignore the optional device
;; argument. Here we don't follow the mapping of devices to frames.
;; We just assume that any frame satisfying the predicate will do.
diff --git a/app-emacs/gnuserv/files/gnuserv-3.12.8-devices.patch b/app-emacs/gnuserv/files/gnuserv-3.12.8-devices.patch
index 0c509a7cd842..faab53e6da1e 100644
--- a/app-emacs/gnuserv/files/gnuserv-3.12.8-devices.patch
+++ b/app-emacs/gnuserv/files/gnuserv-3.12.8-devices.patch
@@ -2,9 +2,29 @@ Function device-class from devices.el is not used, but collides with
a function of the same name in frame.el of Emacs 29. So, inline what
we need, and drop devices.el altogether.
+Define delete-device-hook as an alias of delete-frame-functions, so we
+need no advice for delete-frame.
+
--- gnuserv-3.12.8/gnuserv-compat.el
+++ gnuserv-3.12.8/gnuserv-compat.el
-@@ -153,9 +153,39 @@
+@@ -125,16 +125,6 @@
+ (setq ad-return-value device))
+ ad-do-it))
+
+- ;; Advise `delete-frame' to run `delete-device-hook'. This might be a
+- ;; little too hacky, but it seems to work! If someone actually tries
+- ;; to do something device specific then it will probably blow up!
+- (defadvice delete-frame (before
+- gnuserv-compat-delete-frame
+- first
+- nil
+- activate)
+- (run-hook-with-args 'delete-device-hook frame))
+-
+ ;; Advise `filtered-frame-list' to ignore the optional device
+ ;; argument. Here we don't follow the mapping of devices to frames.
+ ;; We just assume that any frame satisfying the predicate will do.
+@@ -153,9 +143,36 @@
(if (string-match "XEmacs" (emacs-version))
nil
@@ -14,6 +34,7 @@ we need, and drop devices.el altogether.
+ (defalias 'device-live-p 'frame-live-p)
+ (defalias 'frame-device 'identity)
+ (defalias 'make-tty-device 'ignore)
++ (defvaralias 'delete-device-hook 'delete-frame-functions)
+
+ (defun make-x-device (&optional display)
+ (if display
@@ -26,10 +47,6 @@ we need, and drop devices.el altogether.
+ the toolbar, glyphs, etc."
+ (and (cdr-safe (assq 'display (frame-parameters device))) t))
+
-+ (defvar delete-device-hook nil
-+ "Function or functions to call when a device is deleted.
-+ One argument, the to-be-deleted device.")
-+
+ (defun delete-device (device &optional force)
+ "Delete DEVICE, permanently eliminating it from use.
+ Normally, you cannot delete the last non-minibuffer-only frame (you must
diff --git a/app-emacs/gnuserv/files/gnuserv-3.12.8-warnings.patch b/app-emacs/gnuserv/files/gnuserv-3.12.8-warnings.patch
index 113d7f0f5f37..5310f357621f 100644
--- a/app-emacs/gnuserv/files/gnuserv-3.12.8-warnings.patch
+++ b/app-emacs/gnuserv/files/gnuserv-3.12.8-warnings.patch
@@ -11,7 +11,7 @@ Fix some byte-compiler warnings
nil
;; XEmacs `make-frame' takes an optional device to create the frame
-@@ -150,7 +150,7 @@
+@@ -140,7 +140,7 @@
;; part we use devices.el from the Emacs-W3 distribution. In some
;; places the implementation seems wrong, so we "fix" it!
diff --git a/app-emacs/gnuserv/gnuserv-3.12.8-r7.ebuild b/app-emacs/gnuserv/gnuserv-3.12.8-r8.ebuild
index 4cb5f7e12303..4cb5f7e12303 100644
--- a/app-emacs/gnuserv/gnuserv-3.12.8-r7.ebuild
+++ b/app-emacs/gnuserv/gnuserv-3.12.8-r8.ebuild