From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: common-lisp-indent'ation of def* Date: Mon, 23 Oct 2006 13:24:02 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161602679 10791 80.91.229.2 (23 Oct 2006 11:24:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2006 11:24:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 23 13:24:37 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gbxuq-0006nF-H1 for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2006 13:24:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gbxup-0004dx-Pg for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2006 07:24:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GbxuY-0004bN-NZ for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:24:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GbxuW-0004Zr-Vc for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:24:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GbxuW-0004Zo-R0 for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:24:04 -0400 Original-Received: from [64.233.182.191] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GbxuW-0008Hh-Mn for emacs-devel@gnu.org; Mon, 23 Oct 2006 07:24:04 -0400 Original-Received: by nf-out-0910.google.com with SMTP id q29so2714047nfc for ; Mon, 23 Oct 2006 04:24:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PAknLko5w0XYFZpTZvnTiGmkeWDvYiUuuVXqedrO44Je6fA9lgZ+Bei6tpGSnKX5vRrVVaM0WKIgnr+KUMps7XxeP3vpr29ytwwFdhXEViz55C57pL7h47K8FBvkpCrcb1h1sEW+KIj9gva+FDUuGb6mSlun1+0vtUKeAfa04BU= Original-Received: by 10.82.98.13 with SMTP id v13mr1269712bub; Mon, 23 Oct 2006 04:24:02 -0700 (PDT) Original-Received: by 10.82.136.11 with HTTP; Mon, 23 Oct 2006 04:24:02 -0700 (PDT) Original-To: "Emacs Devel" Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61034 Archived-At: Drew Adams sent me the following problem with the common-lisp-indent code: ;; evaluate this (progn (unless (assoc "cl-indent" load-history) (load "cl-indent")) (set (make-local-variable 'lisp-indent-function) 'common-lisp-indent-function) (put 'if 'common-lisp-indent-function '(nil nil &body))) (if () (deffoo bar ()) ;; indent this (foo bar)) => Wrong type argument: number-or-marker-p, (8 241) `lisp-indent-line' fails because `calculate-lisp-indent' is returning a list with '((8 241) 241), which, according to its docstring, it shouldn't. The docstring says that the return value is either an integer, or (COLUMN CONTAINING-SEXP-START). `common-lisp-indent-function-1' is determining that `deffoo' has no *lisp-indent-function property, but as it starts with `def', treats it as a tentative defun, so it sends it to `common-lisp-indent-call-method', which in turns sends it to `lisp-indent-259', which returns the weird value. So, is this a bug in `lisp-indent-line' (and the docstring of `calculate-lisp-indent'), and '((8 241) 241) should be treated as valid? Or, OTOH, it is a bug in `common-lisp-indent-function' and friends? -- /L/e/k/t/u