From unknown Sat Jun 21 03:25:32 2025 X-Loop: don@donarmstrong.com Subject: bug#1012: calculate-lisp-indent Reply-To: Markus Sauermann , 1012@debbugs.gnu.org Resent-From: Markus Sauermann Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 21 Sep 2008 17:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1012 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122201865822431 (code B ref -1); Sun, 21 Sep 2008 17:45:03 +0000 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 ; 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@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@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@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 ) id 1KhSsC-0006ud-1I for bug-gnu-emacs@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 ) id 1KhSs1-0009FM-1z for bug-gnu-emacs@gnu.org; Sun, 21 Sep 2008 19:37:17 +0200 Message-ID: <48D68650.1040907@sauermann-consulting.de> Date: Sun, 21 Sep 2008 19:37:20 +0200 From: Markus Sauermann User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org 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 (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@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: q ( , @ f o o : b a r ) M-x r e p o r t 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@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 + + * 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 * 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-- From unknown Sat Jun 21 03:25:32 2025 X-Loop: don@donarmstrong.com Subject: bug#1012: calculate-lisp-indent Reply-To: martin rudalics , 1012@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 23 Sep 2008 07:20:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1012 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1012-submit@emacsbugs.donarmstrong.com id=B1012.122215384321670 (code B ref 1012); Tue, 23 Sep 2008 07:20:02 +0000 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@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@gmx.at> Date: Tue, 23 Sep 2008 09:07:48 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1012@debbugs.gnu.org CC: Markus Sauermann 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@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 From unknown Sat Jun 21 03:25:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Markus Sauermann Subject: bug#1012 closed by martin rudalics (Re: bug#1012: calculate-lisp-indent) Message-ID: References: <48D9F761.1000805@gmx.at> <48D68650.1040907@sauermann-consulting.de> X-Emacs-PR-Message: they-closed 1012 X-Emacs-PR-Package: emacs Reply-To: 1012@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1222245004-9317-1" This is a multi-part message in MIME format... ------------=_1222245004-9317-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1012: calculate-lisp-indent It has been closed by martin rudalics . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact martin rudalics by replying to this email. --=20 1012: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1012 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1222245004-9317-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From rudalics@gmx.at Wed Sep 24 01:23:21 2008 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@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@gmx.at> Date: Wed, 24 Sep 2008 10:16:33 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1012-done@debbugs.gnu.org CC: Markus Sauermann Subject: Re: bug#1012: calculate-lisp-indent References: <48D895C4.6020901@gmx.at> In-Reply-To: <48D895C4.6020901@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 (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 ------------=_1222245004-9317-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From markus@sauermann-consulting.de Sun Sep 21 10:37:37 2008 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 ; 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@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@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@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 ) id 1KhSsC-0006ud-1I for bug-gnu-emacs@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 ) id 1KhSs1-0009FM-1z for bug-gnu-emacs@gnu.org; Sun, 21 Sep 2008 19:37:17 +0200 Message-ID: <48D68650.1040907@sauermann-consulting.de> Date: Sun, 21 Sep 2008 19:37:20 +0200 From: Markus Sauermann User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: bug-gnu-emacs@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 (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@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: q ( , @ f o o : b a r ) M-x r e p o r t 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@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 + + * 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 * 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-- ------------=_1222245004-9317-1-- From unknown Sat Jun 21 03:25:32 2025 X-Loop: don@donarmstrong.com Subject: bug#1012: Indentation of constant symbols Reply-To: Markus Sauermann , 1012@debbugs.gnu.org Resent-From: Markus Sauermann Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 01 Oct 2008 20:30:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1012 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1012-submit@emacsbugs.donarmstrong.com id=B1012.122289248823707 (code B ref 1012); Wed, 01 Oct 2008 20:30:04 +0000 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@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 ) id 1Kl8CF-0007MQ-OV for 1012@emacsbugs.donarmstrong.com; Wed, 01 Oct 2008 22:21:20 +0200 Message-ID: <48E3DBB7.9060709@sauermann-consulting.de> Date: Wed, 01 Oct 2008 22:21:11 +0200 From: Markus Sauermann User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: 1012@debbugs.gnu.org References: <48D9F761.1000805@gmx.at> <48D68650.1040907@sauermann-consulting.de> In-Reply-To: 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-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 11 13:58:21 2011 Received: (at control) by debbugs.gnu.org; 11 Sep 2011 17:58:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2oIN-0004xm-3e for submit@debbugs.gnu.org; Sun, 11 Sep 2011 13:58:20 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2oIL-0004xe-23 for control@debbugs.gnu.org; Sun, 11 Sep 2011 13:58:17 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R2oE6-0004G5-C2 for control@debbugs.gnu.org; Sun, 11 Sep 2011 19:53:54 +0200 Date: Sun, 11 Sep 2011 19:50:53 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #1012 X-MailScanner-ID: 1R2oE6-0004G5-C2 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316368434.50175@cxJaMf0L6fv70IbfMc60eQ X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 1012 patch From unknown Sat Jun 21 03:25:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1012: calculate-lisp-indent Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 01:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: martin rudalics Cc: 1012@debbugs.gnu.org, Markus Sauermann Received: via spool by 1012-submit@debbugs.gnu.org id=B1012.145143840226254 (code B ref 1012); Wed, 30 Dec 2015 01:21:01 +0000 Received: (at 1012) by debbugs.gnu.org; 30 Dec 2015 01:20:02 +0000 Received: from localhost ([127.0.0.1]:49161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE5Qo-0006pC-4v for submit@debbugs.gnu.org; Tue, 29 Dec 2015 20:20:02 -0500 Received: from mail-qk0-f180.google.com ([209.85.220.180]:33900) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE5Qn-0006or-Bf for 1012@debbugs.gnu.org; Tue, 29 Dec 2015 20:20:01 -0500 Received: by mail-qk0-f180.google.com with SMTP id p187so209294862qkd.1 for <1012@debbugs.gnu.org>; Tue, 29 Dec 2015 17:20:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=5xOd2ZxIJAwAbJesrXxIO7Bu9SVfTRjWwDbP72TM+ik=; b=TvIaSVDhzqudzBed6fs6co4Wdpsm+seiLCqVM/HEq7Da/un58yviSTeRravv1oCy9Y AYZYTT9Q0aKEA9fJoHLPqr2gP46k9dgTuktgUzlCZWvXHaGvv3plKvD4QYLRD3xf4far WlasmyfeXE2Do31NsdrWA5bYgyBoYTi/m6ERdUwtaVZK9QTgmDZA9qRjZbclZy9cc6IB wVmNwNRm0eFRhngGfCLyMvHhZsXmvFvmsF8wQJcoDdtk9wnjcKYJc3jXtpAibUIgyZWL e9ODbzUw34ZIVK9doIbLoXf0oOZtR822/dv+GABDoXF/Uubxyzm3gxO3ViFobH59QsMw fctQ== X-Received: by 10.55.20.196 with SMTP id 65mr80892144qku.67.1451438396004; Tue, 29 Dec 2015 17:19:56 -0800 (PST) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id s131sm30079750qhs.11.2015.12.29.17.19.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Dec 2015 17:19:55 -0800 (PST) From: Andrew Hyatt References: <48D895C4.6020901@gmx.at> Date: Tue, 29 Dec 2015 20:19:54 -0500 In-Reply-To: <48D895C4.6020901@gmx.at> (martin rudalics's message of "Tue, 23 Sep 2008 09:07:48 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: >> In this E-Mail I included a patch, that solves the problems for me, and >> was created with the command >> >> mhoram@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 This bug is still marked open, but I can't reproduce either of the reported issues against Emacs 25. Can either of you still reproduce the issue? If not, I'll close the bug. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 29 21:57:34 2015 Received: (at control) by debbugs.gnu.org; 30 Dec 2015 02:57:34 +0000 Received: from localhost ([127.0.0.1]:49192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE6xC-0000nG-MW for submit@debbugs.gnu.org; Tue, 29 Dec 2015 21:57:34 -0500 Received: from mail-qk0-f172.google.com ([209.85.220.172]:35239) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE6xB-0000n4-3b for control@debbugs.gnu.org; Tue, 29 Dec 2015 21:57:33 -0500 Received: by mail-qk0-f172.google.com with SMTP id n135so90203255qka.2 for ; Tue, 29 Dec 2015 18:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:to:from:subject; bh=Llj0UQW4mBJWLSCV1gvpAgSECjuZpGMV9YU3PbVbMTw=; b=c5KW2/QE8kfXXXU6EqSvsiVWW0QRCxvoOxLDRXEZwW++VL5Jproyoyncx58+oq/w7a IOxKAy90+dPvs3nEtYo+IQtp9gCYrUkSBC9qVb1q8ipgLy0XRoy4/6Ul8SALxdnISDbd umUaCVjnWExC0MqMoBLPT/Uo6dlaprflRpCrtrMZBdQpoxOkzNmYFT5eTCS0lFDb/wyx 6iJYZU+N070pn3E+KdqFPf26HgNomfW/J29KktK4lv03hAZaNlrmOb0JoCaSfUvEaQcY tgyBalXyoJc/vgR7yUB+szh0E+sosmzwDB5PUg5fa/BKQYtYNnGJ6dL0elIpWymObsvU O67w== X-Received: by 10.55.203.20 with SMTP id d20mr82834451qkj.57.1451444247722; Tue, 29 Dec 2015 18:57:27 -0800 (PST) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id o69sm8409240qki.32.2015.12.29.18.57.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Dec 2015 18:57:27 -0800 (PST) Date: Tue, 29 Dec 2015 21:57:26 -0500 Message-Id: To: control@debbugs.gnu.org From: Andrew Hyatt Subject: control message for bug #1012 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 1012 unreproducible From unknown Sat Jun 21 03:25:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1012: calculate-lisp-indent Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 07:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch unreproducible To: Andrew Hyatt Cc: 1012@debbugs.gnu.org, Markus Sauermann Received: via spool by 1012-submit@debbugs.gnu.org id=B1012.145146047321285 (code B ref 1012); Wed, 30 Dec 2015 07:28:02 +0000 Received: (at 1012) by debbugs.gnu.org; 30 Dec 2015 07:27:53 +0000 Received: from localhost ([127.0.0.1]:49307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEBAn-0005XE-AV for submit@debbugs.gnu.org; Wed, 30 Dec 2015 02:27:53 -0500 Received: from mout.gmx.net ([212.227.17.21]:57944) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEBAl-0005X2-T0 for 1012@debbugs.gnu.org; Wed, 30 Dec 2015 02:27:52 -0500 Received: from [192.168.1.100] ([212.95.7.71]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MRGvT-1ah9kF1FHT-00UcBb; Wed, 30 Dec 2015 08:27:44 +0100 Message-ID: <5683876C.8080200@gmx.at> Date: Wed, 30 Dec 2015 08:27:40 +0100 From: martin rudalics MIME-Version: 1.0 References: <48D895C4.6020901@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:H0og+ob/mo8NsyJbNIjdH/+ClNAHBRoCrhSmj0a87CLAKN4kw8w CIVQEmD/heGGeyGZEKzVBM2QL1nbLifqpgerkV2X+F75JvUNPQ0mgcerYQNkAkTr3Dg1bPX H7EXrxBIJzmHvKFsPq4S7TDnDR6EDDgiHdxxZs8NFos+OCG6el8JKNwcfOb78ww0k5CAvGL 6w66umxRGwdOWnirlRK3A== X-UI-Out-Filterresults: notjunk:1;V01:K0:28MAX7TfndY=:Kx8slMkL0OOr+vIryzNJHd ++0kCl7WzNG4i59fgyKCGq8BMG/9uRsbBUUYiPTESA2wtvbDoxdmKZ82Jg8Oq4UM/yBMTm9cM i8SZ0MBFbw8PiV9YRWZjBnLUh6FBlLmSRkZJ3GTw3TO8aKWKkt2K/aW3169QWfRbSflusFt7z FMR0qrm39Qnp9dRK9okSS+h+iZ9aGjp9+MvZo8iaMonDo/9zz3epKKpaMHwGUFUMLiIDMNJ/j rLcT5Siakx+NNN7EUCX1bRHiXnWRMyxraXZYy2X5MsGYiGPC9kulS+KUsAsoyYC+iCp5H1nMA hOMngGsRJXSuMrPl3zPIb4xUgAYXW3uYurhzOVc+cg9Q53yLsE+0iYtaA/Ioaql6o4taTK+Cx K34EaE6J0QCFPKfprWygeXjmti5oWPl3EmGkLRCqXvmA4NB0AtXmDFIZspihU5T/LfH2mfUpr pEumW7FjhTXCdVCq5ecnhLgfn2jEDD7zfkigzYt/UQWvSor5MiJ5yO7PDFs3CW98FVYfJTBJp 8B/ivJXqekT7sUrIRhbWL6t9OhG33Kh2+FhVZlTiNIkvgAtxIrkI6Vm7md0qsmJdgDnfG6rLD Sgsy9Wb8tR8Prs/HumVYNox5pdoY9wlBiA2pCpLfg48iihnfOAK3mj2svKuCJoG81h6VI0P8/ iIeI8K8srgu1n176vGpuJ83+ndNWu+xlENlypry1IA9+QEXe8cC0s340GCtCorIyipRPoFgck JO61mfX9z3553tk3SAlNfJufh7dajJjhxjLAjzOLl6KhOvEv9QXxIYwq3I8A6uhNjY2VMBVJL aL4JtoJJbG0rTsZW97JdaLZko7fLA== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > This bug is still marked open, but I can't reproduce either of the > reported issues against Emacs 25. Can either of you still reproduce the > issue? Did you look into the snippets from Example 2 and Example 3 in the follow-up message? All issues reported by Markus still apply, at least here. Unfortunately, I rarely indent constant symbols, so someone else would have had to chime in. But I suppose nobody really cared. Note also that the second patch is probably too large to qualify as a tiny change and I have no idea whether Markus is still around to do the paperwork. martin From unknown Sat Jun 21 03:25:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Markus Sauermann Subject: bug#1012: closed (Re: bug#1012: calculate-lisp-indent) Message-ID: References: <5683BDEA.9030409@gmx.at> <48D68650.1040907@sauermann-consulting.de> X-Gnu-PR-Message: they-closed 1012 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch unreproducible Reply-To: 1012@debbugs.gnu.org Date: Wed, 30 Dec 2015 11:21:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1451474461-22674-1" This is a multi-part message in MIME format... ------------=_1451474461-22674-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #1012: calculate-lisp-indent which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 1012@debbugs.gnu.org. --=20 1012: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1012 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1451474461-22674-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1012-done) by debbugs.gnu.org; 30 Dec 2015 11:20:22 +0000 Received: from localhost ([127.0.0.1]:49363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEEnm-0005sl-4u for submit@debbugs.gnu.org; Wed, 30 Dec 2015 06:20:22 -0500 Received: from mout.gmx.net ([212.227.17.20]:51159) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEEnk-0005sV-7E for 1012-done@debbugs.gnu.org; Wed, 30 Dec 2015 06:20:20 -0500 Received: from [192.168.1.100] ([212.95.7.50]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Lkwpt-1ZfinI1tJN-00am5e; Wed, 30 Dec 2015 12:20:13 +0100 Message-ID: <5683BDEA.9030409@gmx.at> Date: Wed, 30 Dec 2015 12:20:10 +0100 From: martin rudalics MIME-Version: 1.0 To: Markus Sauermann Subject: Re: bug#1012: calculate-lisp-indent References: <48D895C4.6020901@gmx.at> <5683876C.8080200@gmx.at> <5683B8CC.7070001@sauermann-consulting.de> In-Reply-To: <5683B8CC.7070001@sauermann-consulting.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:cRArcSyrT4GP9JQN08vf97nUk7ymiSeeyct84Rp4blfCeVdtj52 U9PDGjVWqTS74d82oIu1u95pUcvmYeqDLdU+hYLE3mnE2CVu7gIIjU8elFNChWGlh6ynJcu j/Zb5dRtrt6iV/in7Bj0IWUlHGmITnP6UqIx8xjRN5dB/wUDQ0KTanc++at8NXFA8TfIUzq k2L7K0w0yc7kYldVBeGuQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:9YXa1/n8gpU=:U/5i8s0T7TKRNgHOGx4Tmt ztjpHRtYA7BcyLufKzA/viNDoAFzIBt4FsLTqRpm/gmSzy7HgeimeA9dPVHQIQUeJL6TbIIki kS7UVTfdIBIVsDFGvaSPlARYXp1Kkm5VQBoHW0hQ0y95F6ksXj58djg9xx58yGDoUuNC3LiB4 J/JUuI81VvsJTQD+YoBaEjoWQp4+5fXyw+TpeDv4Ptic3kDJGb7WxpVIUe59FJEIJdK9jZaaw z36A2CNrvt8M2oxoTr/o1B8P+b6duTXnZ6GYX7R0xHmB1KD16XO/LNdA9I0u0L3zQGD1gMVb2 R9ycxAezL5juvvhI5v7mRa+bGJ6+wkH+zbLOCpWG/MbFkoKH4L+S2d2UCf4xBDjULNGXP6oDl tD5+DoSjhmbsKLe9hC54ZyI4Srm+6Tg1MYpbSaJtn5Qhs2cCh9peWpWBZWBKYKS5pbr+/XMU/ fApmc70C/uxf0RcnPs9bi1SSzNAti7sfBBJuJBypPkC+MyNVus9quYaPA9I5rlrgjaPdlGofo M2GCiS81EBsYkdVM/WWahaPBlpXCM7jVw5l9z7ndqJTkcQ0+mJxiwLbQPrCrR3pQ9afDmmMgi kf3OGoa9aOM7jBZVbxVrQ1y/L807Bnj/SJQV5nX+VAv1377+1FGTsPlZP5KYNWOSQYgc11+x2 sK4cPwxxZvELyo3IosajHIL6yoo8wAyMakLJyVWk4YKKlhpvmKVPeRMA0cmCdihQejlSYex4M RQUQ6qBzzddy1+IZfyBAPvq2oTt+JzqCKJR5oJQdSLhchWYOWXFqgn87oiU6BAtpOvyLLMscs CM5+9Mb X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 1012-done Cc: 1012-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > still around and still using emacs, That's nice to hear. > but I haven't experienced this issue > during the last 7 years. So I am not very inclined to review my old > patches. Sorry. I close the bug then. Whenever you feel an urge to work on this again, please reopen it. Thanks, martin ------------=_1451474461-22674-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From markus@sauermann-consulting.de Sun Sep 21 10:37:37 2008 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 ; 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@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@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@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 ) id 1KhSsC-0006ud-1I for bug-gnu-emacs@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 ) id 1KhSs1-0009FM-1z for bug-gnu-emacs@gnu.org; Sun, 21 Sep 2008 19:37:17 +0200 Message-ID: <48D68650.1040907@sauermann-consulting.de> Date: Sun, 21 Sep 2008 19:37:20 +0200 From: Markus Sauermann User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: bug-gnu-emacs@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 (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@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: q ( , @ f o o : b a r ) M-x r e p o r t 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@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 + + * 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 * 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-- ------------=_1451474461-22674-1-- From unknown Sat Jun 21 03:25:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1012: calculate-lisp-indent Resent-From: Markus Sauermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 16:53:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch unreproducible To: martin rudalics Cc: 1012@debbugs.gnu.org Received: via spool by 1012-submit@debbugs.gnu.org id=B1012.145149437728729 (code B ref 1012); Wed, 30 Dec 2015 16:53:03 +0000 Received: (at 1012) by debbugs.gnu.org; 30 Dec 2015 16:52:57 +0000 Received: from localhost ([127.0.0.1]:50579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEJzc-0007TJ-IE for submit@debbugs.gnu.org; Wed, 30 Dec 2015 11:52:56 -0500 Received: from smtp3.bitpoint.de ([80.67.224.15]:36146) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEESd-0003h5-Dd for 1012@debbugs.gnu.org; Wed, 30 Dec 2015 05:58:31 -0500 From: Markus Sauermann References: <48D895C4.6020901@gmx.at> <5683876C.8080200@gmx.at> Message-ID: <5683B8CC.7070001@sauermann-consulting.de> Date: Wed, 30 Dec 2015 11:58:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <5683876C.8080200@gmx.at> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Wed, 30 Dec 2015 11:52:55 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi, Am 30.12.2015 um 08:27 schrieb martin rudalics: > Did you look into the snippets from Example 2 and Example 3 in the > follow-up message? All issues reported by Markus still apply, at least > here. Unfortunately, I rarely indent constant symbols, so someone else > would have had to chime in. But I suppose nobody really cared. > > Note also that the second patch is probably too large to qualify as a > tiny change and I have no idea whether Markus is still around to do the > paperwork. still around and still using emacs, but I haven't experienced this issue during the last 7 years. So I am not very inclined to review my old patches. Sorry. Best wishes Markus From unknown Sat Jun 21 03:25:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1012: calculate-lisp-indent Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jan 2016 21:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch unreproducible To: Markus Sauermann Cc: martin rudalics , 1012@debbugs.gnu.org Received: via spool by 1012-submit@debbugs.gnu.org id=B1012.14517704618990 (code B ref 1012); Sat, 02 Jan 2016 21:35:02 +0000 Received: (at 1012) by debbugs.gnu.org; 2 Jan 2016 21:34:21 +0000 Received: from localhost ([127.0.0.1]:35638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aFTob-0002Kv-4n for submit@debbugs.gnu.org; Sat, 02 Jan 2016 16:34:21 -0500 Received: from mail-qk0-f170.google.com ([209.85.220.170]:34221) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aFToZ-0002Ke-F9 for 1012@debbugs.gnu.org; Sat, 02 Jan 2016 16:34:19 -0500 Received: by mail-qk0-f170.google.com with SMTP id p187so237115904qkd.1 for <1012@debbugs.gnu.org>; Sat, 02 Jan 2016 13:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=QYpr23qo+bXlGuNbm8hWGaHfWykcr5onHG3BMMGJCl4=; b=Rv901h5gVwR89liJN8wEOeOZ03vy85BiLZk8iCK23qhLrrIPbzhh1ld4SOGepd/L3F pdqGXZ7NmXpobwQrZqMjy4pr6xNqOgC+q6RlPx+y1GinqITA5/aoKI7uQr50lLAriiOY 3hqf54AErmBjUvobZjSj/p+1B03mAZKBBjIbINMUjwrzi3fPTlCQFSuMzMSn99MDwwyr MsAffgIfpWu5rqpWLsvvbfNBk5EKn47U8t1ugLkqw2ggIkqJQgkvs4QYEOSuGc4PHNoU 2Q98BoZnvczygLRHZ0vLWxo4qNNrt1yeixqzdt6zjp/zbxNmp5qLmtzItLGNLLIFSmdK VgYg== X-Received: by 10.55.82.137 with SMTP id g131mr105294713qkb.66.1451770453954; Sat, 02 Jan 2016 13:34:13 -0800 (PST) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id y199sm36761731qhb.4.2016.01.02.13.34.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Jan 2016 13:34:12 -0800 (PST) From: Andrew Hyatt References: <48D895C4.6020901@gmx.at> <5683876C.8080200@gmx.at> <5683B8CC.7070001@sauermann-consulting.de> Date: Sat, 02 Jan 2016 16:34:08 -0500 In-Reply-To: <5683B8CC.7070001@sauermann-consulting.de> (Markus Sauermann's message of "Wed, 30 Dec 2015 11:58:20 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Markus Sauermann writes: > Hi, > > Am 30.12.2015 um 08:27 schrieb martin rudalics: >> Did you look into the snippets from Example 2 and Example 3 in the >> follow-up message? All issues reported by Markus still apply, at least >> here. Unfortunately, I rarely indent constant symbols, so someone else >> would have had to chime in. But I suppose nobody really cared. >> >> Note also that the second patch is probably too large to qualify as a >> tiny change and I have no idea whether Markus is still around to do the >> paperwork. > > still around and still using emacs, but I haven't experienced this issue > during the last 7 years. So I am not very inclined to review my old > patches. Sorry. > > Best wishes > Markus Thanks for the update. Martin, the original bug was fairly serious - an error while trying to indent. Unless I misunderstand, the followup issues reported were issues of not indenting "properly", which are much less serious. Also, I'm not clear as to what should be a bug here - is there some documentation on how the lisp indenting should work, so that we know how things should ideally indent? In any case, the original bug seems to be fixed. Martin, if you have issues with lisp indenting style, it probably would be best to create a separate bug on it. I'll mark this one as fixed in the meantime. Thanks, everyone!