all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: lenst@lysator.liu.se
Cc: emacs-devel@gnu.org
Subject: Re: Bug in lisp indentation
Date: Sat, 14 Jul 2007 22:06:40 +0200	[thread overview]
Message-ID: <87fy3qeomn.fsf@ambire.localdomain> (raw)
In-Reply-To: <E1I9luf-0006vC-LO@fencepost.gnu.org> (Richard Stallman's message of "Sat\, 14 Jul 2007 14\:00\:13 -0400")

oops, upon further testing i see the first try was buggy.
below is try #2.  please discard try #1.

thi

____________________________________________
diff -c -r1.202 lisp-mode.el
*** lisp-mode.el	6 Jul 2007 17:26:29 -0000	1.202
--- lisp-mode.el	14 Jul 2007 20:03:25 -0000
***************
*** 855,860 ****
--- 855,869 ----
          (setq retry nil)
          (setq calculate-lisp-indent-last-sexp (elt state 2))
          (setq containing-sexp (elt state 1))
+         ;; The last sexp may not be the first sexp on the line
+         ;; where it begins, so find that one, instead.
+         (when calculate-lisp-indent-last-sexp
+           (goto-char calculate-lisp-indent-last-sexp)
+           (when (and containing-sexp
+                      (< containing-sexp (line-beginning-position)))
+             (beginning-of-line)
+             (skip-chars-forward " \t")
+             (setq calculate-lisp-indent-last-sexp (point))))
          ;; Position following last unclosed open.
          (goto-char (1+ containing-sexp))
          ;; Is there a complete sexp since then?

  parent reply	other threads:[~2007-07-14 20:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-14 18:00 [lenst@lysator.liu.se: Bug in lisp indentation] Richard Stallman
2007-07-14 19:53 ` Bug in lisp indentation Thien-Thi Nguyen
2007-07-14 20:04   ` Stefan Monnier
2007-07-14 20:46     ` Thien-Thi Nguyen
2007-07-15 14:43   ` Lennart Staflin
2007-07-15 17:23     ` Thien-Thi Nguyen
2007-07-16 14:04       ` Lennart Staflin
2007-07-16 14:59         ` Thien-Thi Nguyen
2007-07-14 20:06 ` Thien-Thi Nguyen [this message]
2007-07-16  1:49 ` Fwd: " Stefan Monnier
2007-07-17  3:34   ` Richard Stallman
2007-07-17  8:27     ` David Kastrup
2007-07-17 17:00       ` Stefan Monnier
2007-07-18  4:42       ` Richard Stallman
2007-07-18 18:49         ` Stefan Monnier
2007-07-20 13:42           ` Richard Stallman

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=87fy3qeomn.fsf@ambire.localdomain \
    --to=ttn@gnuvola.org \
    --cc=emacs-devel@gnu.org \
    --cc=lenst@lysator.liu.se \
    /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.