[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] /srv/bzr/emacs/elpa r401: * cl-lib.el (cl-labels): Demote e
From: |
Stefan Monnier |
Subject: |
[ELPA-diffs] /srv/bzr/emacs/elpa r401: * cl-lib.el (cl-labels): Demote error to message and improve it. |
Date: |
Wed, 22 May 2013 18:44:22 -0400 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 401
committer: Stefan Monnier <address@hidden>
branch nick: elpa
timestamp: Wed 2013-05-22 18:44:22 -0400
message:
* cl-lib.el (cl-labels): Demote error to message and improve it.
modified:
packages/cl-lib/cl-lib.el
=== modified file 'packages/cl-lib/cl-lib.el'
--- a/packages/cl-lib/cl-lib.el 2012-11-30 18:27:44 +0000
+++ b/packages/cl-lib/cl-lib.el 2013-05-22 22:44:22 +0000
@@ -1,10 +1,10 @@
;;; cl-lib.el --- Properly prefixed CL functions and macros -*- coding: utf-8
-*-
-;; Copyright (C) 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2013 Free Software Foundation, Inc.
;; Author: Stefan Monnier <address@hidden>
;; vcomment: Emacs-24.3's version is 1.0 so this has to stay below.
-;; Version: 0.2
+;; Version: 0.3
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -309,9 +309,14 @@
(unless (fboundp 'cl-labels)
(defmacro cl-labels (&rest args)
- (if (and (boundp 'lexical-binding) lexical-binding)
- `(labels ,@args)
- (error "`cl-labels' with dynamic scoping is not implemented"))))
+ (unless (and (boundp 'lexical-binding) lexical-binding)
+ ;; We used to signal an error rather than a message, but in many uses of
+ ;; cl-labels, the value of lexical-binding doesn't actually matter.
+ ;; More importantly, the value of `lexical-binding' here is unreliable
+ ;; (it does not necessarily reflect faithfully whether the output of this
+ ;; macro will be interpreted as lexically bound code or not).
+ (message "This `cl-labels' requires `lexical-binding' to be non-nil"))
+ `(labels ,@args)))
(provide 'cl-lib)
;;; cl-lib.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ELPA-diffs] /srv/bzr/emacs/elpa r401: * cl-lib.el (cl-labels): Demote error to message and improve it.,
Stefan Monnier <=