From unknown Tue Jun 17 20:18:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#636 <636@debbugs.gnu.org> To: bug#636 <636@debbugs.gnu.org> Subject: Status: 23.0.60; Read syntax error while byte-compiling Reply-To: bug#636 <636@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:18:56 +0000 retitle 636 23.0.60; Read syntax error while byte-compiling reassign 636 emacs submitter 636 Dmitry Dzhus severity 636 normal thanks From dima@sphinx.net.ru Fri Aug 1 00:44:27 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=-4.4 required=4.0 tests=BAYES_00,FOURLA, RCVD_IN_DNSWL_MED,RCVD_IN_NIX1,WWWRU autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 1 Aug 2008 07:44:27 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m717iMdf008018 for ; Fri, 1 Aug 2008 00:44:25 -0700 Received: from mx10.gnu.org ([199.232.76.166]:33163) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KOpIN-0002my-60 for emacs-pretest-bug@gnu.org; Fri, 01 Aug 2008 03:43:27 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KOpJA-0004Zt-C2 for emacs-pretest-bug@gnu.org; Fri, 01 Aug 2008 03:44:20 -0400 Received: from sphinx.net.ru ([82.146.58.194]:60547) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KOpJ9-0004Yn-MZ for emacs-pretest-bug@gnu.org; Fri, 01 Aug 2008 03:44:16 -0400 Received: from blizzard (93-80-221-60.broadband.corbina.ru [93.80.221.60]) (authenticated bits=0) by sphinx.net.ru (8.14.3/8.14.2) with ESMTP id m717i8xb023656 for ; Fri, 1 Aug 2008 11:44:09 +0400 (MSD) (envelope-from dima@sphinx.net.ru) From: Dmitry Dzhus To: emacs-pretest-bug@gnu.org Subject: 23.0.60; Read syntax error while byte-compiling Date: Fri, 01 Aug 2008 11:43:43 +0400 Message-ID: <874p652n9s.fsf@sphinx.net.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) The problem occurs when one tries to byte-compile a file with the following contents (note the newline after `eval-when-compile`): (eval-when-compile (require 'cc-mode)) Using this command: emacs -q --batch -f batch-byte-compile file.el Which fails with error: In toplevel form: test1.el:2:19:Error: Invalid read syntax: ")" Visiting this file in Emacs and attempting to byte-compile it using the `M-x byte-compile-file RET` command results in the same error being shown in *Compile-Log* buffer. =20=20=20=20 In the same time, if there is no newline after `eval-when-compile`, e.g. (eval-when-compile (require 'cc-mode)) Byte-compiling proceeds successfully. The problem occurs only if one requires `cc-mode`. Probably this is somehow related with `cc-bytecomp` module. In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-07-30 on blizzard Windowing system distributor `The X.Org Foundation', version 11.0.10402000 configured using `configure '--prefix=3D/usr' '--host=3Di686-pc-linux-gnu' '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--datadir=3D/usr/share' '--sysconfdir=3D/etc' '--localstatedir=3D/var/lib' '--program-suffix=3D-emacs-23' '--infodir=3D/usr/share/info/emacs-23' '--without-carbon' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--enable-font-backend' '--with-freetype' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=3Dgtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' '--build=3Di686-pc-linux-gnu' 'build_alias=3Di686-pc-linux-gnu' 'host_alias=3Di686-pc-linux-gnu' 'CFLAGS=3D-O2 -march=3Dnative -pipe' 'LDFLAGS=3D-Wl,-O1'' Important settings: value of $LC_ALL:=20 value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: C value of $LC_TIME: nil value of $LANG: ru_RU.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t --=20 Happy Hacking. http://sphinx.net.ru =E3=82=80 From rgm@gnu.org Sun Aug 10 11:56:55 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=-9.8 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 10 Aug 2008 18:56:55 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7AIuqNA009495 for <636@emacsbugs.donarmstrong.com>; Sun, 10 Aug 2008 11:56:53 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KSG4u-00058y-4N; Sun, 10 Aug 2008 14:55:44 -0400 From: Glenn Morris To: 636@debbugs.gnu.org Subject: Re: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> X-Spook: Kennedy Adriatic PGP eavesdropping Compsec emc Guantanamo X-Ran: V#Bs@)'o{B501i+^mHfLTB#{6{!o.*HzJF_8GolJ,MS>wy1W9kp.]cjMU#:igSYS*jC4uK X-Hue: black X-Attribution: GM X-Debbugs-No-Ack: yes Date: Sun, 10 Aug 2008 14:55:44 -0400 In-Reply-To: <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> (Ulrich Mueller's message of "Sun, 10 Aug 2008 11:48:31 +0200") Message-ID: <33alcg0nj.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii More info from http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg00416.html Ulrich Mueller wrote: > The problem goes away if I revert the following change: > > 2008-06-27 Alan Mackenzie > > * progmodes/cc-defs.el (c-emacs-features): New feature > 'argumentative-bod-function. > > --- progmodes/cc-defs.el 6 May 2008 07:18:12 -0000 1.57 > +++ progmodes/cc-defs.el 27 Jun 2008 21:12:46 -0000 1.58 > @@ -1440,6 +1440,14 @@ > '1-bit) > list))) > > + ;; In Emacs >= 23, beginning-of-defun will passes its parameter to > + ;; beginning-of-defun-function. Assume end-of-defun does the same. > + (let ((beginning-of-defun-function > + (lambda (&optional arg) > + (not (eq arg nil))))) > + (if (beginning-of-defun 1) > + (setq list (cons 'argumentative-bod-function list)))) > + > (let ((buf (generate-new-buffer " test")) > parse-sexp-lookup-properties > parse-sexp-ignore-comments > @@ -1539,6 +1547,9 @@ > > '8-bit 8 bit syntax entry flags (XEmacs style). > '1-bit 1 bit syntax entry flags (Emacs style). > +'argumentative-bod-function beginning-of-defun passes ARG through > + to a non-null beginning-of-defun-function. It is assumed > + the end-of-defun does the same thing. > 'syntax-properties It works to override the syntax for specific characters > in the buffer with the 'syntax-table property. It's > always set - CC Mode no longer works in emacsen without From cyd@stupidchicken.com Sun Aug 10 15:15:36 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=-2.2 required=4.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 10 Aug 2008 22:15:36 +0000 Received: from furry (c-24-63-201-57.hsd1.ma.comcast.net [24.63.201.57]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7AMFX6g006432 for <636@emacsbugs.donarmstrong.com>; Sun, 10 Aug 2008 15:15:34 -0700 Received: by furry (Postfix, from userid 1000) id 47063C054; Sun, 10 Aug 2008 18:15:28 -0400 (EDT) From: Chong Yidong To: Ulrich Mueller Cc: 636@debbugs.gnu.org, emacs-devel@gnu.org, Glenn Morris , Michael Olson , Alan Mackenzie Subject: Re: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> Date: Sun, 10 Aug 2008 18:15:28 -0400 In-Reply-To: <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> (Ulrich Mueller's message of "Sun, 10 Aug 2008 11:48:31 +0200") Message-ID: <87ljz45xfj.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Ulrich Mueller writes: >>>>>> On Sun, 10 Aug 2008, I wrote: > >> ,----[ test.el ] >> | (progn >> | (require 'cc-mode)) >> `---- > >> $ emacs -Q test.el >> M-x eval-buffer > >> This will result in an error: Invalid read syntax: ")" > > The problem goes away if I revert the following change: > > 2008-06-27 Alan Mackenzie > > * progmodes/cc-defs.el (c-emacs-features): New feature > 'argumentative-bod-function. Thanks for pinpointing this. In fact, it's apparently not a problem with cc-mode, but with Emacs. Here's a stripped-down recipe: 1. Create a file foo.el in your lisp path with the following contents: (defconst foo (let ((beginning-of-defun-function (lambda (&optional arg) (not (eq arg nil))))) (progn (beginning-of-defun 1)))) (provide 'foo) 2. Byte-compile it (M-x byte-compile-file RET). 3. Create a file test.el with the following contents: (progn (require 'foo)) 4. emacs test.el 5. M-x eval-buffer Debugger entered--Lisp error: (invalid-read-syntax ")") eval-buffer() ; Reading at buffer position 25 call-interactively(eval-buffer t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) I don't know what causes this bug, though. Anyone? From cyd@stupidchicken.com Sun Aug 10 15:18:22 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=-2.2 required=4.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 10 Aug 2008 22:18:22 +0000 Received: from furry (c-24-63-201-57.hsd1.ma.comcast.net [24.63.201.57]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7AMIJ82006632 for <636@emacsbugs.donarmstrong.com>; Sun, 10 Aug 2008 15:18:20 -0700 Received: by furry (Postfix, from userid 1000) id 6F328C056; Sun, 10 Aug 2008 18:18:14 -0400 (EDT) From: Chong Yidong To: Ulrich Mueller Cc: Glenn Morris , Michael Olson , 636@debbugs.gnu.org, Alan Mackenzie , emacs-devel@gnu.org Subject: Re: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> Date: Sun, 10 Aug 2008 18:18:14 -0400 In-Reply-To: <87ljz45xfj.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 10 Aug 2008 18:15:28 -0400") Message-ID: <87abfkv7ix.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Chong Yidong writes: > (defconst foo > (let ((beginning-of-defun-function > (lambda (&optional arg) > (not (eq arg nil))))) > (progn > (beginning-of-defun 1)))) By the way, replacing `progn' with `save-excursion' makes the bug go away (this makes cc-def.el work too). Why? I don't know. From ulm@kph.uni-mainz.de Mon Aug 11 00:18:57 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=-7.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 11 Aug 2008 07:18:57 +0000 Received: from a1iwww1.kph.uni-mainz.de (a1iwww1.kph.uni-mainz.de [134.93.134.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7B7IrSl010554 for <636@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 00:18:55 -0700 Received: from a1ihome1.kph.uni-mainz.de (a1ihome1.kph.uni-mainz.de [134.93.134.75]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id m7B7IlPn024154; Mon, 11 Aug 2008 09:18:47 +0200 Received: from a1ihome1.kph.uni-mainz.de (localhost [127.0.0.1]) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.1) with ESMTP id m7B7Itv6016438; Mon, 11 Aug 2008 09:18:55 +0200 Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id m7B7ItH0016432; Mon, 11 Aug 2008 09:18:55 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> Date: Mon, 11 Aug 2008 09:18:55 +0200 From: Ulrich Mueller To: Chong Yidong Cc: 636@debbugs.gnu.org, emacs-devel@gnu.org, Glenn Morris , Michael Olson , Alan Mackenzie Subject: Re: bug#636: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> X-Mailer: VM 8.0.2-487 under Emacs 22.2.1 (i686-pc-linux-gnu) >>>>> On Sun, 10 Aug 2008, Chong Yidong wrote: > Thanks for pinpointing this. > In fact, it's apparently not a problem with cc-mode, but with Emacs. > Here's a stripped-down recipe: > 1. Create a file foo.el in your lisp path with the following contents: > (defconst foo > (let ((beginning-of-defun-function > (lambda (&optional arg) > (not (eq arg nil))))) > (progn > (beginning-of-defun 1)))) > (provide 'foo) Calling beginning-of-defun will move point, right? And since beginning-of-defun-function is essentially defined as a no-op, point will just be moved to the beginning-of-line. (In fact, eval-buffer on foo.el results in an infinite loop.) > By the way, replacing `progn' with `save-excursion' makes the bug go > away (this makes cc-def.el work too). Why? I don't know. Indeed. If we agree that the bug is in cc-defs.el, then the following patch should fix it: --- progmodes/cc-defs.el 27 Jun 2008 21:12:46 -0000 1.58 +++ progmodes/cc-defs.el 11 Aug 2008 07:11:04 -0000 @@ -1445,7 +1445,7 @@ (let ((beginning-of-defun-function (lambda (&optional arg) (not (eq arg nil))))) - (if (beginning-of-defun 1) + (if (save-excursion (beginning-of-defun 1)) (setq list (cons 'argumentative-bod-function list)))) (let ((buf (generate-new-buffer " test")) Ulrich From acm@muc.de Mon Aug 11 01:45:25 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.7 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 636) by emacsbugs.donarmstrong.com; 11 Aug 2008 08:45:25 +0000 Received: from mail.muc.de (qmailr@colin.muc.de [193.149.48.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7B8jLEj005095 for <636@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 01:45:22 -0700 Received: (qmail 64731 invoked by uid 3782); 11 Aug 2008 08:45:19 -0000 Received: from acm.muc.de (pD9E50E2A.dip.t-dialin.net [217.229.14.42]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 11 Aug 2008 10:45:17 +0200 Received: (qmail 3345 invoked by uid 1000); 11 Aug 2008 08:47:08 -0000 Date: Mon, 11 Aug 2008 08:47:08 +0000 To: Ulrich Mueller Cc: Chong Yidong , Glenn Morris , Michael Olson , 636@debbugs.gnu.org, emacs-devel@gnu.org Subject: Re: bug#636: Please fix before the release of 23.1 Message-ID: <20080811084708.GA3219@muc.de> References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de Hi, Ulrich and Yidong! Thanks for CC'ing me in on this one. On Mon, Aug 11, 2008 at 09:18:55AM +0200, Ulrich Mueller wrote: > >>>>> On Sun, 10 Aug 2008, Chong Yidong wrote: > > In fact, it's apparently not a problem with cc-mode, but with Emacs. > > Here's a stripped-down recipe: > > 1. Create a file foo.el in your lisp path with the following contents: > > (defconst foo > > (let ((beginning-of-defun-function > > (lambda (&optional arg) > > (not (eq arg nil))))) > > (progn > > (beginning-of-defun 1)))) > > (provide 'foo) > Calling beginning-of-defun will move point, right? > And since beginning-of-defun-function is essentially defined as a > no-op, point will just be moved to the beginning-of-line. (In fact, > eval-buffer on foo.el results in an infinite loop.) > > By the way, replacing `progn' with `save-excursion' makes the bug go > > away (this makes cc-def.el work too). Why? I don't know. > Indeed. If we agree that the bug is in cc-defs.el, then the following > patch should fix it: > --- progmodes/cc-defs.el 27 Jun 2008 21:12:46 -0000 1.58 > +++ progmodes/cc-defs.el 11 Aug 2008 07:11:04 -0000 > @@ -1445,7 +1445,7 @@ > (let ((beginning-of-defun-function > (lambda (&optional arg) > (not (eq arg nil))))) > - (if (beginning-of-defun 1) > + (if (save-excursion (beginning-of-defun 1)) > (setq list (cons 'argumentative-bod-function list)))) > (let ((buf (generate-new-buffer " test")) I protest against this "fix". :-) Not against the fix as such (though it is somewhat ugly, and would need some comments), just that the bug it fixes is not understood. Therefore, it is NOT a fix. It is still a bug, which will cause pain somewhere else. > Ulrich -- Alan Mackenzie (Nuremberg, Germany). From schwab@suse.de Mon Aug 11 01:55:05 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=-10.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_HI autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 11 Aug 2008 08:55:06 +0000 Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7B8t1Iw006882 for <636@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 01:55:03 -0700 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 923D8416E8; Mon, 11 Aug 2008 10:55:00 +0200 (CEST) From: Andreas Schwab To: Alan Mackenzie Cc: Ulrich Mueller , Glenn Morris , Chong Yidong , 636@debbugs.gnu.org, Michael Olson , emacs-devel@gnu.org Subject: Re: bug#636: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> <20080811084708.GA3219@muc.de> X-Yow: FEELINGS are cascading over me!!! Date: Mon, 11 Aug 2008 10:54:59 +0200 In-Reply-To: <20080811084708.GA3219@muc.de> (Alan Mackenzie's message of "Mon, 11 Aug 2008 08:47:08 +0000") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Alan Mackenzie writes: > it is somewhat ugly, and would need some comments), just that the bug it > fixes is not understood. It's pretty simple. You are moving point while load/eval-buffer/etc. is reading the buffer, where reading the buffer always means reading from point. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From mwolson@grepfind.mwolson.org Mon Aug 11 08:26:18 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.9 required=4.0 tests=BAYES_00,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 11 Aug 2008 15:26:19 +0000 Received: from deleuze.hcoop.net (Debian-exim@deleuze.hcoop.net [69.90.123.67]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BFQFe9031642 for <636@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 08:26:16 -0700 Received: from cpe-75-84-159-101.socal.res.rr.com ([75.84.159.101] helo=grepfind.mwolson.org) by deleuze.hcoop.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KSZHb-00009U-Fr; Mon, 11 Aug 2008 11:26:07 -0400 Received: from mwolson by grepfind.mwolson.org with local (Exim 4.69) (envelope-from ) id 1KSZHY-0004AF-Rz; Mon, 11 Aug 2008 08:26:04 -0700 From: Michael Olson To: Ulrich Mueller Cc: Chong Yidong , 636@debbugs.gnu.org, emacs-devel@gnu.org, Glenn Morris , Alan Mackenzie Subject: Re: bug#636: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEU1QytIVTlZY0dqc1N6 hGGJl3qZpZCtuKXsjxzFAAACW0lEQVR42l2UXXrqIBCGk67Aoe29Ac4CTPDcGwZ73wLdQDOuQLP9 8wHG9hT1Mc6bb/5jp7Xed92TVrqeCYfKRVc+XdfDbqbJ8TixG1UDu2a3xkf2H+z+A6Qn7Xk71AA8 kdJmZg4xpcTshgr2JQSurAswhwDFYQN9r4yxx1BIQqBTBbvqahw9hxRSLOBdFVA89TTOvgSoMaLf ABTWOg5Z8lLRNyD7x4WSVHU1DZurThn2HI9Oa561JhTSDUWxq64YqRlmrcdhA73y3rmJY1okotDT NzDO2XNGZPnS7A4b6NQ8foQFN2eJmEBR7Du1Q/DRh7R4O50BrGmu0F8i49Iya+ScvtDNqkADB8zD pwU9wTu9c8msdNYOO0JvYYyREd9xBOh7zSNc2WMZUYzIDHOpU0Kxe5o9o0eccsr5mNLcwHhC8DoM SQkJ5wbUxAdlbDELEpDbclc8sT2gV2HJIrj/si7hDgzPpY4sqxTV+pWkgt7EGesDIFWUnGuK7pkn erZoieCVZPGcG3jCJimLwS7IVZY4R3mvoNfzoCfOF0mIG1nna+TadAxzgF5u0b3JTaxcmZtCF1dn WSOv63oNl4U3BQCLXOQKWZIHUBWcUci6iuTL7eMOelVAKfp+NkA0kOElN3BbV26AiGZsXEqfa0EQ NtATvTAKCeHh7AEEi4knM6S3HwB2eo1zeZQ5fDbgNkCpbEwh8HUTqYDqwUhIG2NQ/k2WH+CVB9LK aINy0EeAvgF6KRK0wIaPiX8CioRNpQF7X/8EOnoAPpUvrX8DED7t8B/Bv8ErfnpSfxv4B9rx7BDd lxXRAAAAAElFTkSuQmCC Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUhJgg0OgxRWhNncyOE j0Wjq222uoS9w5PN0azd4MagpfWdAAACYklEQVR42mXTzXOaQBQA8CWkPbOQTCc3WbTT3oTVJN5U FmNurYLisY2K5yYRc61jXK8mpu5/2wcSWNsHOwPv9/aDNwMSQvQppQvOl7d7vmoI8TIS4pdA7xD7 bW+Ww30OYxND1P+DNA1R/gcc/B7nR1DkMb6VwZTA2BTQw3I0CrCP4DSHHT6O/jvcOeYRGGEG8HmU EEmuDvBqAFjUSYZFICz6lMJWz6p14lgOFBDaSOFHsYYO1+Hz7wCkw9qmoWEM9yYBeNIUjDA2tVb1 rKSXkr4AvAFAVkG2rbar5yW9CvAF4BUrAEhTrWqZNiv2SVPBJ58AthghBKieaV696TlqS1EUy43R VkNI0U4QNhVc+ea5qqtAISEpIFRWve83AesPW0ryblOKXohiw84GJSyYDqJavV9C2r0QaGepQ/20 PAmY617Pl9CeEjJfAcTlKWt9vFr09M8P3fVvt/uIsbVLYPQh6hvXy2sSLUP+k9Bn1bkQCYhKNHC7 7A/ZL+uDWqv9eCEaB5g8hPPZ1VblS4dWWnfBVzE6wG4VrjnfnvNVHAfKy0SkAbAfdgGeQz7n67Hx NspB1Pkz33POZ3y9GHIJmkYYxdMoTiBeSNBDNzyLdTyXoI+8LB/DXkICjc1yWMlQ8rppHk7GYxlM 77DWCkYoA/V8qOVT+ENXGxlqQdDJtr+VYcCCwB+m+awfWa+GAIG3SPIbCfbtyAPwQcYDUQCjztQP EmE+m9QK6DPSmQSp+GzmNooZjFwepoDMmPuUg2uVp9MUvCBijG1yIKQzfUyhMwaobTJwCIEpvhd4 bNCrgXRS+Atv5I2WCsjODwAAAABJRU5ErkJggg== X-Hashcash: 1:20:080811:acm@muc.de::99TvYef2KfEvwjP3:00000000rrS X-Hashcash: 1:20:080811:emacs-devel@gnu.org::JpU3DtCDK60Z1d1+:0000000000000000000000000000000000000000000pPb X-Hashcash: 1:20:080811:cyd@stupidchicken.com::kx+jF2f0ChDFN+0v:00000000000000000000000000000000000000000Hrn X-Hashcash: 1:20:080811:ulm@gentoo.org::F8OKm/mahfFzkAUi:0001S8/ X-Hashcash: 1:20:080811:rgm@gnu.org::KU7Vel7jOH4x06Ja:0000006hkK X-Hashcash: 1:20:080811:636@emacsbugs.donarmstrong.com::U5XYjmAvTi+G62wz:000000000000000000000000000000063WJ Date: Mon, 11 Aug 2008 08:26:04 -0700 In-Reply-To: <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> (Ulrich Mueller's message of "Mon, 11 Aug 2008 09:18:55 +0200") Message-ID: <87d4kfy3n7.fsf@grepfind.mwolson.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Ulrich Mueller writes: > Indeed. If we agree that the bug is in cc-defs.el, then the following > patch should fix it: > > --- progmodes/cc-defs.el 27 Jun 2008 21:12:46 -0000 1.58 > +++ progmodes/cc-defs.el 11 Aug 2008 07:11:04 -0000 > @@ -1445,7 +1445,7 @@ > (let ((beginning-of-defun-function > (lambda (&optional arg) > (not (eq arg nil))))) > - (if (beginning-of-defun 1) > + (if (save-excursion (beginning-of-defun 1)) > (setq list (cons 'argumentative-bod-function list)))) > > (let ((buf (generate-new-buffer " test")) This patch fixes the problem for me as well. It's interesting that evaluating a top-level defconst definition can screw up the byte-compiler though ... would it make sense for the byte-compiler to automatically do a save-excursion around the processing of each top-level form in a given file? -- | Michael Olson | FSF Associate Member #652 | | http://mwolson.org/ | Hobbies: Lisp, HCoop | | Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner | `-------------------------------------------------------' From cyd@stupidchicken.com Mon Aug 11 09:29:42 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=-4.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 11 Aug 2008 16:29:43 +0000 Received: from cyd (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BGTdwR018125 for <636@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 09:29:41 -0700 Received: by cyd (Postfix, from userid 1000) id 1E76E57E1CA; Mon, 11 Aug 2008 12:30:04 -0400 (EDT) From: Chong Yidong To: Ulrich Mueller Cc: 636@debbugs.gnu.org, emacs-devel@gnu.org, Glenn Morris , Michael Olson , Alan Mackenzie Subject: Re: bug#636: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> Date: Mon, 11 Aug 2008 12:30:04 -0400 In-Reply-To: <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> (Ulrich Mueller's message of "Mon, 11 Aug 2008 09:18:55 +0200") Message-ID: <87fxpb5xbn.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Ulrich Mueller writes: >> (defconst foo >> (let ((beginning-of-defun-function >> (lambda (&optional arg) >> (not (eq arg nil))))) >> (progn >> (beginning-of-defun 1)))) > >> (provide 'foo) > > Calling beginning-of-defun will move point, right? > > And since beginning-of-defun-function is essentially defined as a > no-op, point will just be moved to the beginning-of-line. (In fact, > eval-buffer on foo.el results in an infinite loop.) Aha, I see. So the question is, should we make the change to cc-defs.el, or (as suggested by Michael Olson) make the byte-compiler wrap around each variable definition with `save-excursion'? Even with the latter solution, incorrectly written elisp in variable definitions can still create problems. For example, `save-excursion' won't save us if the elisp runs `kill-buffer'. This indicates that we fix cc-defs.el, and leave the rest of Emacs alone. From acm@muc.de Mon Aug 11 11:49:07 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.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 11 Aug 2008 18:49:08 +0000 Received: from mail.muc.de (qmailr@colin.muc.de [193.149.48.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BIn3m4028461 for <636@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 11:49:05 -0700 Received: (qmail 73542 invoked by uid 3782); 11 Aug 2008 18:49:02 -0000 Received: from acm.muc.de (pD9E5295F.dip.t-dialin.net [217.229.41.95]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 11 Aug 2008 20:49:00 +0200 Received: (qmail 28408 invoked by uid 1000); 11 Aug 2008 18:50:56 -0000 Date: Mon, 11 Aug 2008 18:50:55 +0000 To: Andreas Schwab Cc: emacs-devel@gnu.org, 636@debbugs.gnu.org Subject: Re: bug#636: Please fix before the release of 23.1 Message-ID: <20080811185055.GA28138@muc.de> References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> <20080811084708.GA3219@muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de Hi, Andreas On Mon, Aug 11, 2008 at 10:54:59AM +0200, Andreas Schwab wrote: > Alan Mackenzie writes: > > it is somewhat ugly, and would need some comments), just that the bug > > it fixes is not understood. > It's pretty simple. You are moving point while load/eval-buffer/etc. > is reading the buffer, where reading the buffer always means reading > from point. Ah! I missed that, because it wasn't me (in the capacity of CC Mode maintainer) that moved point. Thanks! > Andreas. > -- > Andreas Schwab, SuSE Labs, schwab@suse.de > SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany > PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." From acm@muc.de Mon Aug 11 11:59:35 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.8 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636) by emacsbugs.donarmstrong.com; 11 Aug 2008 18:59:35 +0000 Received: from mail.muc.de (qmailr@colin.muc.de [193.149.48.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BIxVDC031444 for <636@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 11:59:33 -0700 Received: (qmail 78898 invoked by uid 3782); 11 Aug 2008 18:59:30 -0000 Received: from acm.muc.de (pD9E5295F.dip.t-dialin.net [217.229.41.95]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 11 Aug 2008 20:59:28 +0200 Received: (qmail 28548 invoked by uid 1000); 11 Aug 2008 19:01:24 -0000 Date: Mon, 11 Aug 2008 19:01:24 +0000 To: Chong Yidong Cc: Ulrich Mueller , 636@debbugs.gnu.org, emacs-devel@gnu.org, Glenn Morris , Michael Olson Subject: Re: bug#636: Please fix before the release of 23.1 Message-ID: <20080811190124.GB28138@muc.de> References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> <87fxpb5xbn.fsf@stupidchicken.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fxpb5xbn.fsf@stupidchicken.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de Hi, everybody! On Mon, Aug 11, 2008 at 12:30:04PM -0400, Chong Yidong wrote: > Ulrich Mueller writes: > >> (defconst foo > >> (let ((beginning-of-defun-function > >> (lambda (&optional arg) > >> (not (eq arg nil))))) > >> (progn > >> (beginning-of-defun 1)))) > >> (provide 'foo) > > Calling beginning-of-defun will move point, right? > > And since beginning-of-defun-function is essentially defined as a > > no-op, point will just be moved to the beginning-of-line. (In fact, > > eval-buffer on foo.el results in an infinite loop.) > Aha, I see. > So the question is, should we make the change to cc-defs.el, or (as > suggested by Michael Olson) make the byte-compiler wrap around each > variable definition with `save-excursion'? The way I see it, it's a bug in `beginning-of-defun'. The docstring says that a non-nil `beginning-of-defun-function' finds the pertinent place, but beginning-of-defun then moves point somewhere else. I HATE things that are ostensibly "helpful", but in reality are dumbing down, and mainly just foul things up. I would be in favour of NOT moving point after a BOD-function has done its work. However, I wouldn't campaign too hard about it, because .... CC Mode should remain compatible with lots of Emacsen, including 21.n. That means I'll have to modify CC Mode anyway. So I will. > Even with the latter solution, incorrectly written elisp in variable > definitions can still create problems. For example, `save-excursion' > won't save us if the elisp runs `kill-buffer'. Hey, that's an idea! ;-) -- Alan Mackenzie (Nuremberg, Germany). From cyd@stupidchicken.com Mon Aug 11 14:42:00 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=-4.8 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636-done) by emacsbugs.donarmstrong.com; 11 Aug 2008 21:42:00 +0000 Received: from cyd (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BLfvSs017523 for <636-done@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 14:41:58 -0700 Received: by cyd (Postfix, from userid 1000) id B7A9A57E2B5; Mon, 11 Aug 2008 17:42:22 -0400 (EDT) From: Chong Yidong To: Alan Mackenzie Cc: Ulrich Mueller , 636-done@debbugs.gnu.org, emacs-devel@gnu.org, Glenn Morris , Michael Olson Subject: Re: bug#636: Please fix before the release of 23.1 References: <877ibp4hh3.fsf@vorlon.ganneff.de> <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> <87fxpb5xbn.fsf@stupidchicken.com> <20080811190124.GB28138@muc.de> Date: Mon, 11 Aug 2008 17:42:22 -0400 In-Reply-To: <20080811190124.GB28138@muc.de> (Alan Mackenzie's message of "Mon, 11 Aug 2008 19:01:24 +0000") Message-ID: <87bpzzfcu9.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Alan Mackenzie writes: > The way I see it, it's a bug in `beginning-of-defun'. The docstring > says that a non-nil `beginning-of-defun-function' finds the pertinent > place, but beginning-of-defun then moves point somewhere else. I HATE > things that are ostensibly "helpful", but in reality are dumbing down, > and mainly just foul things up. This is part of the baggage in beginning-of-defun regarding whether column zero is the beginning of a defun. Changing this now might be unwise, so for the moment I've simply revised the docstring of beginning-of-defun for extra clarity. I've also changed cc-defs.el to use beginning-of-defun-raw, which is a more direct and side-effect free test of beginning-of-defun-function, and added a save-excursion for extra plus safety ;-) [Also, closing bug#636.] From acm@muc.de Wed Aug 13 02:22:57 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=-7.1 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 636-done) by emacsbugs.donarmstrong.com; 13 Aug 2008 09:22:58 +0000 Received: from mail.muc.de (qmailr@colin.muc.de [193.149.48.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7D9MrxC031346 for <636-done@emacsbugs.donarmstrong.com>; Wed, 13 Aug 2008 02:22:55 -0700 Received: (qmail 68755 invoked by uid 3782); 13 Aug 2008 09:22:52 -0000 Received: from acm.muc.de (pD9E23735.dip.t-dialin.net [217.226.55.53]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 13 Aug 2008 11:22:50 +0200 Received: (qmail 3176 invoked by uid 1000); 13 Aug 2008 09:24:55 -0000 Date: Wed, 13 Aug 2008 09:24:55 +0000 To: Chong Yidong Cc: Ulrich Mueller , 636-done@debbugs.gnu.org, emacs-devel@gnu.org, Glenn Morris , Michael Olson Subject: Re: bug#636: Please fix before the release of 23.1 Message-ID: <20080813092455.GB3010@muc.de> References: <871w1xfmsb.fsf@grepfind.mwolson.org> <87ljzj3oad.fsf_-_@grepfind.mwolson.org> <18590.45488.891078.545308@a1ihome1.kph.uni-mainz.de> <18590.47471.82980.734389@a1ihome1.kph.uni-mainz.de> <87ljz45xfj.fsf@stupidchicken.com> <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.de> <87fxpb5xbn.fsf@stupidchicken.com> <20080811190124.GB28138@muc.de> <87bpzzfcu9.fsf@stupidchicken.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bpzzfcu9.fsf@stupidchicken.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de Hi, Yidong! On Mon, Aug 11, 2008 at 05:42:22PM -0400, Chong Yidong wrote: > Alan Mackenzie writes: > > The way I see it, it's a bug in `beginning-of-defun'. The docstring > > says that a non-nil `beginning-of-defun-function' finds the pertinent > > place, but beginning-of-defun then moves point somewhere else. I > > HATE things that are ostensibly "helpful", but in reality are dumbing > > down, and mainly just foul things up. > This is part of the baggage in beginning-of-defun regarding whether > column zero is the beginning of a defun. Changing this now might be > unwise, so for the moment I've simply revised the docstring of > beginning-of-defun for extra clarity. Thanks! > I've also changed cc-defs.el to use beginning-of-defun-raw, which is a > more direct and side-effect free test of beginning-of-defun-function, > and added a save-excursion for extra plus safety ;-) I've just added a bit to bind mark-ring, because BOD adds a mark. I'm not actually convinced that using bod-raw is a good idea, since it feels like using an internal interface (which we might want to refactor away later). But it's not that big a deal, so I've left it. > [Also, closing bug#636.] :-) -- Alan Mackenzie (Nuremberg, Germany). From unknown Tue Jun 17 20:18:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 10 Sep 2008 14:24:07 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator