From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3647: 23.1.50; defun* generates incorrect code for handling arglist keyword lookup Date: Mon, 22 Jun 2009 15:45:29 +0900 Message-ID: Reply-To: Miles Bader , 3647@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1245654300 3018 80.91.229.12 (22 Jun 2009 07:05:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2009 07:05:00 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 22 09:04:57 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MIdaK-0006e8-I7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2009 09:04:57 +0200 Original-Received: from localhost ([127.0.0.1]:54060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIdaJ-0003L3-Vp for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2009 03:04:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIdaF-0003Ko-T4 for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 03:04:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIdaA-0003Ka-FD for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 03:04:50 -0400 Original-Received: from [199.232.76.173] (port=51331 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIdaA-0003KM-7O for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 03:04:46 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:52733) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIda9-0004vS-Gk for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 03:04:45 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MIda8-0006un-QO for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 03:04:45 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5M6vMVT022835; Sun, 21 Jun 2009 23:57:22 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5M6o4AT021383; Sun, 21 Jun 2009 23:50:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Miles Bader Original-Sender: miles.bader@necel.com Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 22 Jun 2009 06:50:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 3647 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124565314721162 (code B ref -1); Mon, 22 Jun 2009 06:50:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jun 2009 06:45:47 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5M6jeSY021119 for ; Sun, 21 Jun 2009 23:45:42 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:43194 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MIdHf-0003J5-Lw for emacs-pretest-bug@gnu.org; Mon, 22 Jun 2009 02:45:39 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MIdHd-00022R-5n for emacs-pretest-bug@gnu.org; Mon, 22 Jun 2009 02:45:39 -0400 Original-Received: from tyo202.gate.nec.co.jp ([202.32.8.206]:47375) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIdHc-00021Z-9G; Mon, 22 Jun 2009 02:45:37 -0400 Original-Received: from relay31.aps.necel.com ([10.29.19.54]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id n5M6jUs8014828; Mon, 22 Jun 2009 15:45:30 +0900 (JST) Original-Received: from relay31.aps.necel.com ([10.29.19.20] [10.29.19.20]) by relay31.aps.necel.com with ESMTP; Mon, 22 Jun 2009 15:45:30 +0900 Original-Received: from dhlpc061 ([10.114.113.45] [10.114.113.45]) by relay31.aps.necel.com with ESMTP; Mon, 22 Jun 2009 15:45:30 +0900 Original-Received: by dhlpc061 (Postfix, from userid 31295) id 6428952E1E2; Mon, 22 Jun 2009 15:45:30 +0900 (JST) System-Type: x86_64-unknown-linux-gnu Blat: Foop Original-Lines: 117 X-detected-operating-system: by monty-python.gnu.org: Solaris 8 (1) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Mon, 22 Jun 2009 03:04:50 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28894 gmane.emacs.pretest.bugs:24671 Archived-At: Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Given the following code: (require 'cl) (defun* oink (&key a b) (list a b)) then evaluating: (oink :b :a :a 42) => (:a :a) ... which is incorrect. The correct answer is (42 :A). Looking at the macro-expansion of the above defun* form, the reason is obvious: the generated code uses (car (cdr (memq KEYWORD ARGLIST))) to look up keyword argument values, which is obviously bogus if a preceding argument value is the same as a keyword. It would be more correct to use (plist-get ARGUMENT KEYWORD), and that's what common-lisp systems I tested return for this test. However, the code in cl.el that generates keyword handling code is so confusing, I'm not really sure how to fix this; presumably something in `cl-do-arglist'? Thanks, -Miles If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/23.1.50/etc/DEBUG for instructions. In GNU Emacs 23.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.2) of 2009-06-22 on dhlpc061 Windowing system distributor `The X.Org Foundation', version 11.0.10601901 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ja_JP.UTF-8 value of $XMODIFIERS: @im=SCIM locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t diff-auto-refine-mode: t show-paren-mode: t recentf-mode: t rcirc-track-minor-mode: t minibuffer-electric-default-mode: t display-time-mode: t desktop-save-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t temp-buffer-resize-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-p C-n C-u C-p C-u C-p n i n n n n n n n n n n n n n n SPC n n n n n c y M-v C-u C-u C-p C-u C-p C-u C-p C-u C-p C-u C-p C-u C-p C-n C-n C-n C-n C-n C-n C-n = C-e C-a C-x C-v C-g C-g C-g C-x C-v $ % e l s e / m a s t e r / l i s p / e m a c s - l i e m c l - m a C-s C-s m e C-a C-s m e m q C-s C-s C-s C-s C-s C-s C-s C-a C-s k e y w o C-s C-a C-s m e m q C-s C-s C-s C-s C-s C-s C-M-u C-M-u C-M-u C-M-a C-s ( c d r SPC ( C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a C-s k e y w o r d C-s C-s C-s C-s C-s C-x 2 C-x b * s c SPC ( > ( r e q u i r e SPC ' c l ) C-j C-y C-a C-M-f C-a M-f * C-e C-j C-p C-e C-j C-x n C-a C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-e C-b C-b C-b C-b C-a C-s ' e m e m C-a C-v C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a C-s l o o k C-s C-s C-a C-x 1 C-x b x r e p o r t - e m SPC Recent messages: Quit x*DING* [2 times] Mark saved where search started [3 times] Mark set x*DING* Mark saved where search started [2 times] Mark set [3 times] Mark saved where search started x*DING* Mark saved where search started [2 times] -- Pray, v. To ask that the laws of the universe be annulled in behalf of a single petitioner confessedly unworthy.