[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat b1d8a7f77d 14/14: Minor simplification, remove a
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat b1d8a7f77d 14/14: Minor simplification, remove advice remnants |
Date: |
Tue, 3 Jan 2023 10:57:28 -0500 (EST) |
branch: externals/compat
commit b1d8a7f77d3f47b34fc8c0f43c3470d611a473b3
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Minor simplification, remove advice remnants
---
compat-macs.el | 45 +++++++++++++++++++--------------------------
1 file changed, 19 insertions(+), 26 deletions(-)
diff --git a/compat-macs.el b/compat-macs.el
index 8c81b4dfc2..f18bb1f3b2 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -17,8 +17,7 @@
;;; Commentary:
-;; These macros are used to define compatibility functions, macros and
-;; advice.
+;; These macros are used to define compatibility functions and macros.
;;; Code:
@@ -27,8 +26,6 @@
(defmacro compat-declare-version (version)
"Set the Emacs version that is currently being handled to VERSION."
- ;; FIXME: Avoid setting the version for any definition that might
- ;; follow, but try to restrict it to the current file/buffer.
(setq compat--current-version version)
nil)
@@ -153,34 +150,30 @@ attributes (see `compat-generate-common')."
name
(lambda (realname version)
`(,(cond
- ((memq type '(func advice)) 'defun)
+ ((eq type 'function) 'defun)
((eq type 'macro) 'defmacro)
((error "Unknown type")))
,realname ,arglist
;; Prepend compatibility notice to the actual
;; documentation string.
- ,(let ((type (cond
- ((eq type 'func) "function")
- ((eq type 'macro) "macro")
- ((error "Unknown type")))))
- (with-temp-buffer
- (insert docstring)
- (newline 2)
- (insert
- "[Compatibility "
- (if version
- (format
- "%s for `%S', defined in Emacs %s. \
+ ,(with-temp-buffer
+ (insert docstring)
+ (newline 2)
+ (insert
+ "[Compatibility "
+ (if version
+ (format
+ "%s for `%S', defined in Emacs %s. \
If this is not documented on your system, you can check \
`(compat) Emacs %s' for more details."
- type oldname version version)
- (format
- "code %s for `%S'"
- type oldname))
- "]")
- (let ((fill-column 80))
- (fill-region (point-min) (point-max)))
- (buffer-string)))
+ type oldname version version)
+ (format
+ "code %s for `%S'"
+ type oldname))
+ "]")
+ (let ((fill-column 80))
+ (fill-region (point-min) (point-max)))
+ (buffer-string))
,@body))
(lambda (realname _version)
;; Functions and macros are installed by aliasing the name of the
@@ -205,7 +198,7 @@ attribute, is greater than the current Emacs version."
[&rest keywordp sexp]
def-body))
(doc-string 3) (indent 2))
- (compat--define-function 'func name arglist docstring rest))
+ (compat--define-function 'function name arglist docstring rest))
(defmacro compat-defmacro (name arglist docstring &rest rest)
"Define NAME with arguments ARGLIST as a compatibility macro.
- [elpa] externals/compat updated (d4624d9aed -> b1d8a7f77d), ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9842d683d8 01/14: Declare version only at compile time, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 8e17e784de 04/14: Avoid duplicating the package information in the header, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9bcc02a8ef 05/14: Make some compat-macs functions private, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 68de8de839 08/14: compact-macs: Remove the advice mechanism, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 6b32c2058b 02/14: Rename compat-current-version to compat--current-version, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 38e0066caf 07/14: Drop support for 24.3, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 42710e3e67 06/14: Remove compat--ignore, ELPA Syncer, 2023/01/03
- [elpa] externals/compat e332b6a6b0 10/14: Update NEWS, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 7e797daa30 13/14: Test json-insert, ELPA Syncer, 2023/01/03
- [elpa] externals/compat b1d8a7f77d 14/14: Minor simplification, remove advice remnants,
ELPA Syncer <=
- [elpa] externals/compat 6b37982680 11/14: Deprecate compat-help and compat-font-lock, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 3dba9cd612 03/14: Revert "Declare version only at compile time", ELPA Syncer, 2023/01/03
- [elpa] externals/compat da9d92c288 12/14: Remove :note support, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 3d436c9e81 09/14: Quiet tests, ELPA Syncer, 2023/01/03