[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

common-lisp-indent'ation of def*

From: Juanma Barranquero
Subject: common-lisp-indent'ation of def*
Date: Mon, 23 Oct 2006 13:24:02 +0200

Drew Adams sent me the following problem with the common-lisp-indent code:

;; evaluate this
  (unless (assoc "cl-indent" load-history)
    (load "cl-indent"))
  (set (make-local-variable '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

`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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]