From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16671: 24.3; cl-lib from ELPA defadvices cl-position into infinite loop Date: Wed, 19 Feb 2014 14:37:53 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392838755 25686 80.91.229.3 (19 Feb 2014 19:39:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Feb 2014 19:39:15 +0000 (UTC) Cc: 16671@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 19 20:39:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WGCzJ-00056X-UA for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Feb 2014 20:39:22 +0100 Original-Received: from localhost ([::1]:33409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGCzJ-00076C-Bp for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Feb 2014 14:39:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGCz8-00073s-TP for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 14:39:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGCz1-0003gc-F9 for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 14:39:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGCz1-0003gW-C3 for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 14:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGCz0-0006X7-T6 for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 14:39:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 19:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16671 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16671-submit@debbugs.gnu.org id=B16671.139283868525031 (code B ref 16671); Wed, 19 Feb 2014 19:39:02 +0000 Original-Received: (at 16671) by debbugs.gnu.org; 19 Feb 2014 19:38:05 +0000 Original-Received: from localhost ([127.0.0.1]:60632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGCy4-0006Vf-EL for submit@debbugs.gnu.org; Wed, 19 Feb 2014 14:38:04 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:63581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGCxz-0006V6-TC for 16671@debbugs.gnu.org; Wed, 19 Feb 2014 14:38:00 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48164181" Original-Received: from 75-119-255-3.dsl.teksavvy.com (HELO pastel.home) ([75.119.255.3]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Feb 2014 14:37:53 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9F9D0615DA; Wed, 19 Feb 2014 14:37:53 -0500 (EST) In-Reply-To: (Noam Postavsky's message of "Thu, 6 Feb 2014 12:44:18 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85908 Archived-At: > 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))