emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat 5846fbe 13/99: Pull compatibility definition out


From: ELPA Syncer
Subject: [elpa] externals/compat 5846fbe 13/99: Pull compatibility definition out of eval-after-load block
Date: Sun, 17 Oct 2021 05:57:49 -0400 (EDT)

branch: externals/compat
commit 5846fbead016983aa2b842c6f2b255013b14bb7e
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Pull compatibility definition out of eval-after-load block
---
 compat-macs.el | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index ac093f5..b14f875 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -82,30 +82,30 @@ attributes are handled, all others are ignored:
                              (match-string 1 file)))))
          (realname (or (plist-get attr :realname)
                        (intern (format "compat--%S" name))))
-         (body `(progn
-                  ,(funcall def-fn realname version)
-                  (,@(cond
-                      (force
-                       '(progn))
-                      ((and (or (not version)
-                                (version< emacs-version version))
-                            (or (not min-version)
-                                (version<= min-version emacs-version))
-                            (or (not max-version)
-                                (version<= emacs-version max-version)))
-                       `(unless ,(funcall check-fn realname)))
-                      ('(compat--ignore)))
-                   ,(unless (plist-get attr :no-highlight)
-                      `(font-lock-add-keywords
-                        'emacs-lisp-mode
-                        `((,(concat "\\_<\\("
+         (body `(,@(cond
+                    (force
+                     '(progn))
+                    ((and (or (not version)
+                              (version< emacs-version version))
+                          (or (not min-version)
+                              (version<= min-version emacs-version))
+                          (or (not max-version)
+                              (version<= emacs-version max-version)))
+                     `(unless ,(funcall check-fn realname)))
+                    ('(compat--ignore)))
+                 ,(unless (plist-get attr :no-highlight)
+                    `(font-lock-add-keywords
+                      'emacs-lisp-mode
+                      ',`((,(concat "\\_<\\("
                                     (regexp-quote (symbol-name name))
                                     "\\)\\_>")
                            1 font-lock-preprocessor-face))))
-                   ,(funcall install-fn realname)))))
-    (if (and feature (not compat--disable-defer))
-        `(eval-after-load ',feature (lambda () ,body))
-      body)))
+                 ,(funcall install-fn realname))))
+    `(progn
+       ,(funcall def-fn realname version)
+       ,(if (and feature (not compat--disable-defer))
+            `(eval-after-load ',feature (lambda () ,body))
+          body))))
 
 (defun compat-common-fdefine (type name arglist docstring rest)
   "Generate compatibility code for a function NAME.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]