From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 16671@debbugs.gnu.org
Subject: bug#16671: 24.3; cl-lib from ELPA defadvices cl-position into infinite loop
Date: Wed, 19 Feb 2014 14:37:53 -0500 [thread overview]
Message-ID: <jwvbny2q4i3.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CAM-tV--3bExforf06LU4Uc_kSoxqhkLSyC_=UfkxyE8EzrH3cg@mail.gmail.com> (Noam Postavsky's message of "Thu, 6 Feb 2014 12:44:18 -0500")
> emacs -Q --eval "(progn (package-initialize t) (package-install
> 'cl-lib) (require 'cl) (position 1 '(1)))"
> *Messages* buffer contains
> apply: Variable binding depth exceeds max-specpdl-size
Indeed. Could you try the patch below and confirm if it fixes the
problem for you?
Stefan
diff --git a/packages/cl-lib/cl-lib.el b/packages/cl-lib/cl-lib.el
index 1ea22e0..cf13c56 100644
--- a/packages/cl-lib/cl-lib.el
+++ b/packages/cl-lib/cl-lib.el
@@ -318,25 +327,27 @@
(message "%S already defined, not rebinding" new))
(defalias new fun))))
-(autoload 'cl-position "cl-seq")
-(defadvice cl-position (around cl-lib (cl-item cl-seq &rest cl-keys) activate)
+(unless (symbolp (symbol-function 'position))
+ (autoload 'cl-position "cl-seq")
+ (defadvice cl-position (around cl-lib (cl-item cl-seq &rest cl-keys) activate)
(let ((argk (ad-get-args 2)))
(if (or (null argk) (keywordp (car argk)))
;; This is a call to cl-lib's `cl-position'.
(setq ad-return-value
(apply #'position (ad-get-arg 0) (ad-get-arg 1) argk))
;; Must be a call to cl's old `cl-position'.
- ad-do-it)))
+ ad-do-it))))
-(autoload 'cl-delete-duplicates "cl-seq")
-(defadvice cl-delete-duplicates (around cl-lib (cl-seq &rest cl-keys) activate)
+(unless (symbolp (symbol-function 'delete-duplicates))
+ (autoload 'cl-delete-duplicates "cl-seq")
+ (defadvice cl-delete-duplicates (around cl-lib (cl-seq &rest cl-keys) activate)
(let ((argk (ad-get-args 1)))
(if (or (null argk) (keywordp (car argk)))
;; This is a call to cl-lib's `cl-delete-duplicates'.
(setq ad-return-value
(apply #'delete-duplicates (ad-get-arg 0) argk))
;; Must be a call to cl's old `cl-delete-duplicates'.
- ad-do-it)))
+ ad-do-it))))
(when (or (not (fboundp 'cl-member))
(eq (symbol-function 'cl-member) #'memq))
next prev parent reply other threads:[~2014-02-19 19:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 17:44 bug#16671: 24.3; cl-lib from ELPA defadvices cl-position into infinite loop Noam Postavsky
2014-02-19 19:37 ` Stefan Monnier [this message]
2014-02-22 19:52 ` Noam Postavsky
2014-02-25 21:43 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvbny2q4i3.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=16671@debbugs.gnu.org \
--cc=npostavs@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.