GNU bug report logs - #1012
calculate-lisp-indent

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Markus Sauermann <markus <at> sauermann-consulting.de>; Keywords: patch; dated Sun, 21 Sep 2008 17:45:03 UTC; Maintainer for emacs is bug-gnu-emacs <at> gnu.org.
Added tag(s) patch. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. Full text available.
bug reopened, originator not changed. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-2.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 1012) by emacsbugs.donarmstrong.com; 1 Oct 2008 20:21:28 +0000
Received: from smtp1.bitpoint.de (smtp1.bitpoint.de [80.67.224.9])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m91KLMmU023701
	for <1012 <at> emacsbugs.donarmstrong.com>; Wed, 1 Oct 2008 13:21:24 -0700
Received: from p54994748.dip.t-dialin.net ([84.153.71.72])
	by smtp1.bitpoint.de with esmtpa (Exim 4.67 (FreeBSD))
	(envelope-from <markus <at> sauermann-consulting.de>)
	id 1Kl8CF-0007MQ-OV
	for 1012 <at> emacsbugs.donarmstrong.com; Wed, 01 Oct 2008 22:21:20 +0200
Message-ID: <48E3DBB7.9060709 <at> sauermann-consulting.de>
Date: Wed, 01 Oct 2008 22:21:11 +0200
From: Markus Sauermann <markus <at> sauermann-consulting.de>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: 1012 <at> debbugs.gnu.org
Subject: Re: bug#1012: Indentation of constant symbols
References: <48D9F761.1000805 <at> gmx.at> <48D68650.1040907 <at> sauermann-consulting.de> <handler.1012.D1012.12222446017991.notifdone <at> emacsbugs.donarmstrong.com>
In-Reply-To: <handler.1012.D1012.12222446017991.notifdone <at> emacsbugs.donarmstrong.com>
X-Enigmail-Version: 0.95.7
Content-Type: multipart/mixed;
 boundary="------------010308050807050500050004"

This is a multi-part message in MIME format.
--------------010308050807050500050004
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

Hello,

my bug fix was not farsighted enough. Basically I fixed a part of the
source code, which does nothing at all.
I dug a bit deeper and noticed, that the following "source code 1" of
the function calculate-lisp-indent in lisp-mode.el is a little bugged.

--- BEGIN source code 1 ---
                ;; If the function has no special alignment
		;; or it does not apply to this argument,
		;; try to align a constant-symbol under the last
                ;; preceding constant symbol, if there is such one of
                ;; the last 2 preceding symbols, in the previous
                ;; uncommented line.
                (and (save-excursion
                       (goto-char indent-point)
                       (skip-chars-forward " \t")
                       (looking-at ":"))
                     ;; The last sexp may not be at the indentation
                     ;; where it begins, so find that one, instead.
                     (save-excursion
                       (goto-char calculate-lisp-indent-last-sexp)
		       ;; Handle prefix characters and whitespace
		       ;; following an open paren.  (Bug#1012)
                       (backward-prefix-chars)
                       (while (and (not (looking-back "^[ \t]*\\|([ \t]+"))
                                   (or (not containing-sexp)
                                       (< (1+ containing-sexp) (point))))
                         (forward-sexp -1)
                         (backward-prefix-chars))
                       (setq calculate-lisp-indent-last-sexp (point)))
                     (> calculate-lisp-indent-last-sexp
                        (save-excursion
                          (goto-char (1+ containing-sexp))
                          (parse-partial-sexp (point)
calculate-lisp-indent-last-sexp 0 t)
                          (point)))
                     (let ((parse-sexp-ignore-comments t)
                           indent)
                       (goto-char calculate-lisp-indent-last-sexp)
                       (or (and (looking-at ":")
                                (setq indent (current-column)))
                           (and (< (save-excursion (beginning-of-line)
(point))
                                   (prog2 (backward-sexp) (point)))
                                (looking-at ":")
                                (setq indent (current-column))))
                       indent))
--- END source code 1 ---

One part of that code implements the functionality as described in the
comment at the beginning of the code. The other part tries to fix a
problem, that is caused by this functionality, which is denoted in
example 1, where :baz should be aligned under :foo and not under :foo2.

--- BEGIN example 1 ---
(:foo bar :foo2 bar2
          :baz ar)
--- END example 1 ---

But this other part makes constant symbols to be indented in the same
way as the usual indentation does. So discarding the whole code does not
change any indentation except in some rare, mostly unused cases. See
examples 2 for code snippets that are indented in the same way with or
without this code.

--- BEGIN examples 2 ---
(:foo bar
      :baz)

(foo bar :baz
     :foo2)

(foo bar :baz bor
     :foo2)

(:foo bar (:bar baz
                :asd))
--- END examples 2 ---

These examples also contradict the description of the source code. I
even think that the description of the code is not what the special
handling of constant symbols should be like, as it causes the
indentation described in example 1.

So I suggest to treat constant symbols in the following way:

If the sexp, preceding the constant symbol, begins in the same line as
the containing sexp, then align it under the first appearance of a
constant symbol between the beginning of the containing sexp and
the the begin of the preceding sexp.

If the sexp, preceding the constant symbol, does not begin in the same
line as the containing sexp, then special treatment is not necessary,
because it is handled by the usual indentation.

Do not treat a constant symbol in a special way, if the containing sexp
is a vector, since this would cause indentations in unwanted places.

After applying "patch-1.txt", which implements this suggestions, the
code in examples 2 is indented as shown in examples 3.

--- BEGIN examples 3 ---
(:foo bar
 :baz)

(foo bar :baz
         :foo2)

(foo bar :baz bor
         :foo2)

(:foo bar (:bar baz
           :asd))
--- END examples 3 ---

This implementation still has shortcomings in several unusual
conditions, as examples 4 show, but I think this patch covers all common
usages.

--- BEGIN examples 4 ---
(:foo cons :foo2
      (bar baz :asd asd)
      :sad)

(:foo (:bar baz
       :asd asd) :con con2
       :sad)
--- END examples 4 ---



Regards,
Markus Sauermann

--------------010308050807050500050004
Content-Type: text/plain;
 name="patch-1.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-1.txt"

Index: lisp-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/lisp-mode.el,v
retrieving revision 1.228
diff -c -r1.228 lisp-mode.el
*** lisp-mode.el	23 Sep 2008 17:59:28 -0000	1.228
--- lisp-mode.el	1 Oct 2008 19:10:51 -0000
***************
*** 1014,1055 ****
                       (not retry)
                       (funcall lisp-indent-function indent-point state))
                  ;; If the function has no special alignment
! 		;; or it does not apply to this argument,
! 		;; try to align a constant-symbol under the last
!                 ;; preceding constant symbol, if there is such one of
!                 ;; the last 2 preceding symbols, in the previous
!                 ;; uncommented line.
                  (and (save-excursion
                         (goto-char indent-point)
                         (skip-chars-forward " \t")
                         (looking-at ":"))
!                      ;; The last sexp may not be at the indentation
!                      ;; where it begins, so find that one, instead.
!                      (save-excursion
!                        (goto-char calculate-lisp-indent-last-sexp)
! 		       ;; Handle prefix characters and whitespace
! 		       ;; following an open paren.  (Bug#1012)
!                        (backward-prefix-chars)
!                        (while (and (not (looking-back "^[ \t]*\\|([ \t]+"))
!                                    (or (not containing-sexp)
!                                        (< (1+ containing-sexp) (point))))
!                          (forward-sexp -1)
!                          (backward-prefix-chars))
!                        (setq calculate-lisp-indent-last-sexp (point)))
!                      (> calculate-lisp-indent-last-sexp
!                         (save-excursion
!                           (goto-char (1+ containing-sexp))
!                           (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
!                           (point)))
                       (let ((parse-sexp-ignore-comments t)
                             indent)
!                        (goto-char calculate-lisp-indent-last-sexp)
!                        (or (and (looking-at ":")
!                                 (setq indent (current-column)))
!                            (and (< (save-excursion (beginning-of-line) (point))
!                                    (prog2 (backward-sexp) (point)))
!                                 (looking-at ":")
!                                 (setq indent (current-column))))
                         indent))
                  ;; another symbols or constants not preceded by a constant
                  ;; as defined above.
--- 1014,1046 ----
                       (not retry)
                       (funcall lisp-indent-function indent-point state))
                  ;; If the function has no special alignment
!                 ;; or it does not apply to this argument,
!                 ;; try to treat a constant symbol in a special way.
                  (and (save-excursion
                         (goto-char indent-point)
                         (skip-chars-forward " \t")
                         (looking-at ":"))
!                      ;; Treat it only special, if the sexp preceding it begins
!                      ;; in the same line as the containing sexp
!                      (< calculate-lisp-indent-last-sexp
!                         (save-excursion (goto-char containing-sexp)
!                                         (end-of-line) (point)))
!                      ;; Don't treat it special, if the containing sexp is a
!                      ;; vector
!                      (save-excursion (goto-char containing-sexp)
!                                      (not (looking-at "\\[")))
!                      ;; Align it under the first constant symbol, if any,
!                      ;; between the beginning of the containing sexp and
!                      ;; the preceding sexp
                       (let ((parse-sexp-ignore-comments t)
                             indent)
!                        (goto-char (1+ containing-sexp))
!                        (while (and (<= (point) calculate-lisp-indent-last-sexp)
!                                    (not indent))
!                          (skip-syntax-forward "-")
!                          (if (looking-at ":")
!                              (setq indent (current-column))
!                            (forward-sexp)))
                         indent))
                  ;; another symbols or constants not preceded by a constant
                  ;; as defined above.


--------------010308050807050500050004--




Acknowledgement sent to Markus Sauermann <markus <at> sauermann-consulting.de>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text available.
Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1012; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 1012-done) by emacsbugs.donarmstrong.com; 24 Sep 2008 08:23:21 +0000
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8O8NEk2007982
	for <1012-done <at> emacsbugs.donarmstrong.com>; Wed, 24 Sep 2008 01:23:15 -0700
Received: (qmail invoked by alias); 24 Sep 2008 08:23:08 -0000
Received: from 62-47-41-49.adsl.highway.telekom.at (EHLO [62.47.41.49]) [62.47.41.49]
  by mail.gmx.net (mp042) with SMTP; 24 Sep 2008 10:23:08 +0200
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX18qZ/kSu3Yqxwog3yXQ6TEu5RqmMi1EKFQsP+HgJf
	XIDyDRYAn8HM+k
Message-ID: <48D9F761.1000805 <at> gmx.at>
Date: Wed, 24 Sep 2008 10:16:33 +0200
From: martin rudalics <rudalics <at> gmx.at>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: 1012-done <at> debbugs.gnu.org
CC: Markus Sauermann <markus <at> sauermann-consulting.de>
Subject: Re: bug#1012: calculate-lisp-indent
References: <48D895C4.6020901 <at> gmx.at>
In-Reply-To: <48D895C4.6020901 <at> gmx.at>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.73

Fixed as:

2008-09-23  Markus Sauermann <markus <at> sauermann-consulting.de>  (tiny change)

	* emacs-lisp/emacslisp-mode.el (calculate-lisp-indent): Fix
	indentation problem with keyword symbols when a list starts with
	,@ or spaces.  (Bug#1012)

Thanks for the patch, martin





Notification sent to Markus Sauermann <markus <at> sauermann-consulting.de>:
bug acknowledged by developer. Full text available.
Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 1012) by emacsbugs.donarmstrong.com; 23 Sep 2008 07:10:43 +0000
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8N7Ad6h021663
	for <1012 <at> emacsbugs.donarmstrong.com>; Tue, 23 Sep 2008 00:10:41 -0700
Received: (qmail invoked by alias); 23 Sep 2008 07:10:34 -0000
Received: from 62-47-58-101.adsl.highway.telekom.at (EHLO [62.47.58.101]) [62.47.58.101]
  by mail.gmx.net (mp009) with SMTP; 23 Sep 2008 09:10:34 +0200
X-Authenticated: #14592706
X-Provags-ID: V01U2FsdGVkX19eBIkg0VheqBDEtKrASRvAhACZ2dEyKdLqGXlv5F
	a9FnC/WOgD55iD
Message-ID: <48D895C4.6020901 <at> gmx.at>
Date: Tue, 23 Sep 2008 09:07:48 +0200
From: martin rudalics <rudalics <at> gmx.at>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: 1012 <at> debbugs.gnu.org
CC: Markus Sauermann <markus <at> sauermann-consulting.de>
Subject: Re: bug#1012: calculate-lisp-indent
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.72

 > In this E-Mail I included a patch, that solves the problems for me, and
 > was created with the command
 >
 > mhoram <at> revelstone:~/emacs/trunk/emacs/lisp$ cvs diff -c >
 > ~/emacs-bugreport.txt
 >
 > The patch works for scenario 1 by an additional call of the
 > (backward-prefix-chars) function, which sets point back to the beginning
 > of ",@".
 > For scenario 2 the addition of "\\|([ \t]+" solves the problem, by not
 > entering the while-loop (and thus calling the function (forward-sexp
 > -1)), if there are only spaces between the "(" and the first object.

Thank you, applied.

martin




Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text available.
Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1012; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=4.0 tests=BAYES_00,FOURLA,MIXEDBDN,
	MURPHY_DRUGS_REL8,ONEWORD autolearn=no
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 21 Sep 2008 17:37:38 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8LHbVfl022425
	for <submit <at> emacsbugs.donarmstrong.com>; Sun, 21 Sep 2008 10:37:34 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KhSsE-00080Q-Pj
	for bug-gnu-emacs <at> gnu.org; Sun, 21 Sep 2008 13:37:30 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KhSsD-00080A-Ho
	for bug-gnu-emacs <at> gnu.org; Sun, 21 Sep 2008 13:37:30 -0400
Received: from [199.232.76.173] (port=36735 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KhSsD-0007zz-6J
	for bug-gnu-emacs <at> gnu.org; Sun, 21 Sep 2008 13:37:29 -0400
Received: from smtp1.bitpoint.de ([80.67.224.9]:52803)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <markus <at> sauermann-consulting.de>)
	id 1KhSsC-0006ud-1I
	for bug-gnu-emacs <at> gnu.org; Sun, 21 Sep 2008 13:37:28 -0400
Received: from p5499706c.dip.t-dialin.net ([84.153.112.108])
	by smtp1.bitpoint.de with esmtpa (Exim 4.67 (FreeBSD))
	(envelope-from <markus <at> sauermann-consulting.de>)
	id 1KhSs1-0009FM-1z
	for bug-gnu-emacs <at> gnu.org; Sun, 21 Sep 2008 19:37:17 +0200
Message-ID: <48D68650.1040907 <at> sauermann-consulting.de>
Date: Sun, 21 Sep 2008 19:37:20 +0200
From: Markus Sauermann <markus <at> sauermann-consulting.de>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: bug-gnu-emacs <at> gnu.org
Subject: calculate-lisp-indent
X-Enigmail-Version: 0.95.7
Content-Type: multipart/mixed;
 boundary="------------070203090003050805040103"
X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1)

This is a multi-part message in MIME format.
--------------070203090003050805040103
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

Hello,

I found a bug concerning the function calculate-lisp-indent in lisp-mode.el.
It is triggered in the following scenarios (-!- marks the point):

---begin scenario 1 buffer *scratch*---
(,@foo
 :bar)-!-
---end scenario 1 buffer *scratch*---

---begin scenario 2 buffer *scratch*---
( foo
 :bar)-!-
---end scenario 2 buffer *scratch*---

Using <tab> (bound to the function lisp-indent-line) triggers the
following error in both scenarios:

---begin error---
forward-sexp: Scan error: "Containing expression ends prematurely", 192, 192
---end error---



I traced this bug to the function calculate-lisp-indent.

As far as I understand the code, the characters ",@" in scenario 1 and
the spaces in scenario 2 are not treated correctly.

In this E-Mail I included a patch, that solves the problems for me, and
was created with the command

mhoram <at> revelstone:~/emacs/trunk/emacs/lisp$ cvs diff -c >
~/emacs-bugreport.txt



The patch works for scenario 1 by an additional call of the
(backward-prefix-chars) function, which sets point back to the beginning
of ",@".
For scenario 2 the addition of "\\|([ \t]+" solves the problem, by not
entering the while-loop (and thus calling the function (forward-sexp
-1)), if there are only spaces between the "(" and the first object.



Regards,
Markus Sauermann



In GNU Emacs 22.3.1 (i386-mingw-nt6.0.6001)
 of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 6.0.6001
configured using `configure --with-gcc (3.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: DEU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> q (
, @ f o o <return> <tab> : b a r ) <tab> M-x r e p
o r t <tab> <return>

Recent messages:
("D:\\Uninstalled\\emacs-22.3\\bin\\emacs.exe" "-q")
Loading encoded-kb...done
For information about GNU Emacs and the GNU system, type C-h C-a.
forward-sexp: Scan error: "Containing expression ends prematurely", 192, 192
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done


-- 
Markus Sauermann      E-Mail: info <at> sauermann-consulting.de
Clemensstr. 55 Rgb.   Web: http://www.sauermann-consulting.de
80803 München         Tel: 089/337707, 0179/9879005, Fax: 089/38476434


--------------070203090003050805040103
Content-Type: text/plain;
 name="emacs-bugreport.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="emacs-bugreport.txt"

Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.14493
diff -c -r1.14493 ChangeLog
*** ChangeLog	20 Sep 2008 22:09:39 -0000	1.14493
--- ChangeLog	21 Sep 2008 17:08:59 -0000
***************
*** 1,3 ****
--- 1,9 ----
+ 2008-09-21  Markus Sauermann <markus <at> sauermann-consulting.de>
+ 
+ 	* emacs-lisp/lisp-mode.el (calculate-lisp-indent):
+ 	Fix indentation problem with keyword symbols when a list starts
+ 	with ,@ or spaces.
+ 
  2008-09-20  Vincent Belaïche  <vincent.b.1 <at> hotmail.fr>
  
  	* calc/calc-vec.el (calcFunc-venum): Properly handle intervals.
Index: emacs-lisp/lisp-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/lisp-mode.el,v
retrieving revision 1.226
diff -c -r1.226 lisp-mode.el
*** emacs-lisp/lisp-mode.el	20 Sep 2008 21:54:44 -0000	1.226
--- emacs-lisp/lisp-mode.el	21 Sep 2008 17:09:04 -0000
***************
*** 1027,1033 ****
                       ;; where it begins, so find that one, instead.
                       (save-excursion
                         (goto-char calculate-lisp-indent-last-sexp)
!                        (while (and (not (looking-back "^[ \t]*"))
                                     (or (not containing-sexp)
                                         (< (1+ containing-sexp) (point))))
                           (forward-sexp -1)
--- 1027,1034 ----
                       ;; where it begins, so find that one, instead.
                       (save-excursion
                         (goto-char calculate-lisp-indent-last-sexp)
!                        (backward-prefix-chars)
!                        (while (and (not (looking-back "^[ \t]*\\|([ \t]+"))
                                     (or (not containing-sexp)
                                         (< (1+ containing-sexp) (point))))
                           (forward-sexp -1)

--------------070203090003050805040103--





Acknowledgement sent to Markus Sauermann <markus <at> sauermann-consulting.de>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text available.
Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1012; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 20 Sep 2011 19:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.