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

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

[elpa] externals/cl-lib ea67fad: * cl-lib.el (gv-define-setter): Add for


From: Stefan Monnier
Subject: [elpa] externals/cl-lib ea67fad: * cl-lib.el (gv-define-setter): Add forward compatibility
Date: Tue, 20 Apr 2021 18:34:33 -0400 (EDT)

branch: externals/cl-lib
commit ea67fadd364af760abea733c694b7ae6966174a7
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * cl-lib.el (gv-define-setter): Add forward compatibility
---
 cl-lib.el | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/cl-lib.el b/cl-lib.el
index 0f05c3e..5c98325 100644
--- a/cl-lib.el
+++ b/cl-lib.el
@@ -1,10 +1,10 @@
 ;;; cl-lib.el --- Forward cl-lib compatibility library for Emacs<24.3  -*- 
coding: utf-8 -*-
 
-;; Copyright (C) 2012-2019  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2021  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; vcomment: Emacs-24.3's version is 1.0 so this has to stay below.
-;; Version: 0.6.1
+;; Version: 0.7
 ;; Y-Package-Requires: ((emacs "21")) ¡`emacs' package only exists in Emacs≥24!
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,11 @@
 ;; This code is largely copied from Emacs-24.3's cl.el, with the alias bindings
 ;; simply reversed.
 
+;;; News:
+
+;; Since v0.7:
+;; - Provides `gv-define-setter'.
+
 ;;; Code:
 
 ;; We need to handle the situation where this package is used with an Emacs
@@ -372,5 +377,9 @@
       (message "This `cl-labels' requires `lexical-binding' to be non-nil"))
     `(labels ,@args)))
 
+(unless (fboundp 'gv-define-setter)
+  (defmacro gv-define-setter (name arglist &rest body)
+    `(defsetf ,name ,(cdr arglist) (,(car arglist)) ,@body)))
+
 (provide 'cl-lib)
 ;;; cl-lib.el ends here



reply via email to

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