[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xelb 6d72b50879 1/3: Drop Emacs 24 compatibility code
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/xelb 6d72b50879 1/3: Drop Emacs 24 compatibility code |
|
Date: |
Sat, 13 Jan 2024 16:51:21 -0500 (EST) |
branch: externals/xelb
commit 6d72b50879122063137f5c906df24853873990e0
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Drop Emacs 24 compatibility code
---
el_client.el | 18 ++----------------
xcb-types.el | 18 ------------------
xcb-xkb.el | 12 ------------
3 files changed, 2 insertions(+), 46 deletions(-)
diff --git a/el_client.el b/el_client.el
index 14c35b938b..184f57ddee 100644
--- a/el_client.el
+++ b/el_client.el
@@ -40,7 +40,7 @@
;;; Code:
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
(require 'eieio)
(require 'pp)
@@ -49,9 +49,6 @@
;;;; Variables
-(defconst xelb-excluded-replies<25 '(xcb:xkb:GetKbdByName~reply)
- "Excluded replies for Emacs < 25 (they're too long to load/compile).")
-
(defvar xelb-prefix "xcb:" "Namespace of this module.")
(defvar xelb-error-alist nil "Record X errors in this module.")
@@ -415,12 +412,6 @@ The `combine-adjacent' attribute is simply ignored."
`(cl-defmethod xcb:marshal ((obj ,name)) nil
,@expressions
(cl-call-next-method obj)))
- ,(when (memq reply-name xelb-excluded-replies<25)
- ;; Redefine `defclass' as no-op.
- '(eval-and-compile
- (when (< emacs-major-version 25)
- (fset 'xcb:-defclass (symbol-function 'defclass))
- (defmacro defclass (&rest _args)))))
;; The optional reply body
,(when reply-name
(delq nil reply-contents)
@@ -428,12 +419,7 @@ The `combine-adjacent' attribute is simply ignored."
(setcdr reply-contents (append '((~sequence :type xcb:CARD16)
(length :type xcb:CARD32))
(cdr reply-contents)))
- `(defclass ,reply-name (xcb:-reply) ,reply-contents))
- ,(when (memq reply-name xelb-excluded-replies<25)
- ;; Bring back the original defination of `defclass'.
- '(eval-and-compile
- (when (< emacs-major-version 25)
- (fset 'defclass (symbol-function 'xcb:-defclass)))))))))
+ `(defclass ,reply-name (xcb:-reply) ,reply-contents))))))
(defun xelb-parse-event (node)
"Parse <event>."
diff --git a/xcb-types.el b/xcb-types.el
index facf895685..a6caf98460 100644
--- a/xcb-types.el
+++ b/xcb-types.el
@@ -72,24 +72,6 @@ FORMAT-STRING is a string specifying the message to output,
as in
,@objects)
nil))
-;;;; Fix backward compatibility issues with Emacs 24
-
-(eval-and-compile
- (when (< emacs-major-version 25)
- ;; Copied from Emacs 25 with documentation and comments stripped.
- ;; The version of `with-slots' in Emacs 24 is buggy and inefficient.
- (defmacro with-slots (spec-list object &rest body)
- (declare (indent 2) (debug (sexp sexp def-body)))
- (require 'cl-lib)
- (macroexp-let2 nil object object
- `(cl-symbol-macrolet
- ,(mapcar (lambda (entry)
- (let ((var (if (listp entry) (car entry) entry))
- (slot (if (listp entry) (cadr entry) entry)))
- (list var `(slot-value ,object ',slot))))
- spec-list)
- ,@body)))))
-
;; Backport some functions to Emacs 24
(eval-and-compile
diff --git a/xcb-xkb.el b/xcb-xkb.el
index 3476c8e1ae..0dc184c08c 100644
--- a/xcb-xkb.el
+++ b/xcb-xkb.el
@@ -1719,13 +1719,6 @@
(want :initarg :want :type xcb:CARD16)
(load :initarg :load :type xcb:BOOL)
(pad~0 :initform 1 :type xcb:-pad)))
-(eval-and-compile
- (when
- (< emacs-major-version 25)
- (fset 'xcb:-defclass
- (symbol-function 'defclass))
- (defmacro defclass
- (&rest _args))))
(defclass xcb:xkb:GetKbdByName~reply
(xcb:-reply)
((deviceID :initarg :deviceID :type xcb:CARD8)
@@ -1986,11 +1979,6 @@
(baseColorNdx :initarg :baseColorNdx :type xcb:CARD8)
(labelColorNdx :initarg :labelColorNdx :type xcb:CARD8)
(labelFont :initarg :labelFont :type xcb:xkb:CountedString16)))
-(eval-and-compile
- (when
- (< emacs-major-version 25)
- (fset 'defclass
- (symbol-function 'xcb:-defclass))))
(defclass xcb:xkb:GetDeviceInfo
(xcb:-request)