all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: Glenn Morris <rgm@gnu.org>, Chong Yidong <cyd@stupidchicken.com>,
	636@emacsbugs.donarmstrong.com, Michael Olson <mwolson@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: bug#636: Please fix before the release of 23.1
Date: Mon, 11 Aug 2008 08:47:08 +0000	[thread overview]
Message-ID: <20080811084708.GA3219@muc.de> (raw)
In-Reply-To: <18591.59359.40969.641357@a1ihome1.kph.uni-mainz.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).




  parent reply	other threads:[~2008-08-11  8:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <877ibp4hh3.fsf@vorlon.ganneff.de>
2008-07-13 22:21 ` Bug#490722: semantic: invalid read syntax Michael Olson
2008-07-30  5:59   ` Please fix before the release of 23.1 (was: Bug#490722: semantic: invalid read syntax) Michael Olson
2008-08-10  0:55     ` Please fix before the release of 23.1 Glenn Morris
2008-08-10  9:15       ` Ulrich Mueller
2008-08-10  9:48         ` Ulrich Mueller
2008-08-10 18:55           ` bug#636: " Glenn Morris
2008-08-11  1:06             ` OFFICE ZERO
2008-08-10 22:15           ` Chong Yidong
2008-08-10 22:18             ` Chong Yidong
2008-08-11  0:50               ` bug#636: " OFFICE ZERO
     [not found]                 ` <handler.636.B636.121841588021215.ackinfo@emacsbugs.donarmstrong.com>
2008-08-11  1:16                   ` bug#636: Info received (bug#636: Please fix before the release of 23.1) OFFICE ZERO
2008-08-10 22:18             ` bug#636: Please fix before the release of 23.1 Chong Yidong
2008-08-11  0:50             ` OFFICE ZERO
     [not found]               ` <handler.636.B636.121841588221220.ackinfo@emacsbugs.donarmstrong.com>
2008-08-11  1:16                 ` bug#636: Info received (bug#636: Please fix before the release of 23.1) OFFICE ZERO
2008-08-11  7:18             ` bug#636: Please fix before the release of 23.1 Ulrich Mueller
2008-08-11  8:47               ` Alan Mackenzie
2008-08-11  8:47               ` Alan Mackenzie [this message]
2008-08-11  8:54                 ` Andreas Schwab
2008-08-11 18:50                   ` Alan Mackenzie
2008-08-11 18:50                   ` Alan Mackenzie
2008-08-11  8:54                 ` Andreas Schwab
2008-08-11 15:26               ` Michael Olson
2008-08-11 15:26               ` Michael Olson
2008-08-11 16:30               ` Chong Yidong
2008-08-11 19:01                 ` Alan Mackenzie
2008-08-11 19:01                 ` Alan Mackenzie
2008-08-11 21:42                   ` Chong Yidong
2008-08-01  7:43                     ` bug#636: 23.0.60; Read syntax error while byte-compiling Dmitry Dzhus
2008-08-11 21:50                       ` bug#636: marked as done (23.0.60; Read syntax error while byte-compiling) Emacs bug Tracking System
2008-08-13  9:24                     ` bug#636: Please fix before the release of 23.1 Alan Mackenzie
2008-08-11 16:30               ` Chong Yidong
2008-08-11 22:00               ` Johan Bockgård
2008-08-11  7:18             ` Ulrich Mueller
2008-08-10 22:15           ` Chong Yidong
2008-09-05 14:54           ` Stefan Monnier
2008-08-10 18:51         ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080811084708.GA3219@muc.de \
    --to=acm@muc.de \
    --cc=636@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=mwolson@gnu.org \
    --cc=rgm@gnu.org \
    --cc=ulm@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.