all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gareth Rees <gdr@garethrees.org>
To: 13450@debbugs.gnu.org
Subject: bug#13450: 24.2; Manual gives arguments for lisp-indent-function in wrong order
Date: Tue, 15 Jan 2013 13:39:48 +0000	[thread overview]
Message-ID: <6418F4E6-E06B-424B-AEEC-453B59F115EB@garethrees.org> (raw)

In GNU Emacs 24.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.36):

The section "Indenting Macros" in the Emacs Lisp Reference Manual [1] says
that if INDENT-SPEC is a symbol, then 

    SYMBOL should be a function name; that function is called to
    calculate the indentation of a line within this expression.  The
    function receives two arguments:

    STATE
          The value returned by `parse-partial-sexp' (a Lisp primitive
          for indentation and nesting computation) when it parses up to
          the beginning of this line.

    POS
          The position at which the line being indented begins.

However, the function actually receives these arguments in the other
order. In particular, in lisp-indent-function in lisp-mode.el [2] the
INDENT-SPEC method is called like this:

		(funcall method indent-point state)))))))

I suggest that the Emacs Lisp Reference Manual be updated to match the
code.

[1] http://www.gnu.org/software/emacs/manual/html_node/elisp/Indenting-Macros.html
[2] http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/lisp-mode.el#n1215

-- 
Gareth Rees





             reply	other threads:[~2013-01-15 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 13:39 Gareth Rees [this message]
2013-01-16  2:03 ` bug#13450: 24.2; Manual gives arguments for lisp-indent-function in wrong order Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6418F4E6-E06B-424B-AEEC-453B59F115EB@garethrees.org \
    --to=gdr@garethrees.org \
    --cc=13450@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.