unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* common-lisp-indent'ation of def*
@ 2006-10-23 11:24 Juanma Barranquero
  2006-10-25 18:03 ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Juanma Barranquero @ 2006-10-23 11:24 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-10-28 22:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-23 11:24 common-lisp-indent'ation of def* Juanma Barranquero
2006-10-25 18:03 ` Richard Stallman
2006-10-26 20:42   ` Chong Yidong
2006-10-26 22:10     ` Juanma Barranquero
2006-10-27  0:53       ` Chong Yidong
2006-10-27  8:15         ` Juanma Barranquero
2006-10-27 13:31           ` Stefan Monnier
2006-10-27 14:23             ` Juanma Barranquero
2006-10-28 18:13               ` Richard Stallman
2006-10-28 20:00                 ` Juanma Barranquero
2006-10-28 22:34                   ` David Kastrup

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).