[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 9d8202b: Add Emacs 27 compatibility hack
From: |
Dmitry Gutov |
Subject: |
emacs-28 9d8202b: Add Emacs 27 compatibility hack |
Date: |
Thu, 7 Oct 2021 22:23:35 -0400 (EDT) |
branch: emacs-28
commit 9d8202b45e6beae31f2952d653c0ba7b788c4975
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Add Emacs 27 compatibility hack
* lisp/progmodes/xref.el: Add Emacs 27 compatibility hack, for the
standalone version of this package.
---
lisp/progmodes/xref.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 1feb6ef..d6e20c5 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -74,6 +74,20 @@
(require 'ring)
(require 'project)
+(eval-and-compile
+ (when (version< emacs-version "28")
+ ;; etags.el in Emacs 26 and 27 uses EIEIO, and its location type
+ ;; inherits from `xref-location'.
+ (require 'eieio)
+
+ ;; Suppressing byte-compilation warnings (in Emacs 28+) about
+ ;; `defclass' not being defined, which happens because the
+ ;; `require' statement above is not evaluated either.
+ ;; FIXME: Use `with-suppressed-warnings' when we stop supporting Emacs 26.
+ (with-no-warnings
+ (defclass xref-location () ()
+ :documentation "(Obsolete) location represents a position in a file or
buffer."))))
+
(defgroup xref nil "Cross-referencing commands."
:version "25.1"
:group 'tools)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 9d8202b: Add Emacs 27 compatibility hack,
Dmitry Gutov <=