Subject: bug#636 closed by Chong Yidong <[email-masked]> (Re: bug#636: Please fix before the release of 23.1)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#636: 23.0.60; Read syntax error while byte-compiling

It has been closed by Chong Yidong <[email-masked]>.

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 Chong Yidong <[email-masked]> by
replying to this email.

-- 
636: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=636
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Mon Aug 11 14:42:00 2008
From: Chong Yidong <[email-masked]>
To: Alan Mackenzie <[email-masked]>
Cc: Ulrich Mueller <[email-masked]>, [email-masked],
        [email-masked], Glenn Morris <[email-masked]>,
        Michael Olson <[email-masked]>
Subject: Re: bug#636: Please fix before the release of 23.1
Date: Mon, 11 Aug 2008 17:42:22 -0400

Alan Mackenzie <[email-masked]> 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 [email-masked] Fri Aug  1 00:44:27 2008
From: Dmitry Dzhus <[email-masked]>
To: [email-masked]
Subject: 23.0.60; Read syntax error while byte-compiling
Date: Fri, 01 Aug 2008 11:43:43 +0400

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