From xemacs-m  Tue Jun  3 17:48:18 1997
Received: from gwa.ericsson.com (gwa.ericsson.com [198.215.127.2])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA24950
	for <xemacs-beta@xemacs.org>; Tue, 3 Jun 1997 17:48:17 -0500 (CDT)
Received: from mr1.exu.ericsson.se (mr1.exu.ericsson.com [138.85.147.11]) by gwa.ericsson.com (8.8.2/8.8.2) with ESMTP id RAA07287 for <xemacs-beta@xemacs.org>; Tue, 3 Jun 1997 17:47:49 -0500 (CDT)
Received: from screamer.rtp.ericsson.se (screamer.rtp.ericsson.se [147.117.133.13]) by mr1.exu.ericsson.se (8.7.1/NAHUB-MR1.1) with SMTP id RAA27404 for <xemacs-beta@xemacs.org>; Tue, 3 Jun 1997 17:47:48 -0500 (CDT)
Received: from rcur (rcur18.rtp.ericsson.se [147.117.133.138]) by screamer.rtp.ericsson.se (8.6.12/8.6.4) with ESMTP id SAA25817 for <xemacs-beta@xemacs.org>; Tue, 3 Jun 1997 18:47:47 -0400
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Bug in func-menu in TeX mode
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Date: Tue, 03 Jun 1997 18:47:47 -0400
Message-ID: <6114.865378067@rtp.ericsson.se>
From: Raymond Toy <toy@rtp.ericsson.se>


Here is an easily reproducible bug in func-menu in a TeX (or LaTeX)
buffer.  I found this in 20.2, but I suspect it's also in 20.3-betas
(haven't had time to download the betas yet).

Load func-menu and turn it on in any TeX-mode buffer.  From the
Function menu, select Rescan Buffer.  This first menu has all of the
major sections/chapters numbered correctly.  After rescanning, all of
the section numbers have been incremented up.  Thus, if there are
sections 1-5, the rescan will now number the sections 6-10.  This also
means you can no longer get to those sections.

The problem is easy to see:  rescan doesn't reset the sections numbers 
to zero.  Unfortunately, while func-menu has a hook to reset these
numbers, it seems to be called only on loading a new TeX file.  I
don't quite see how to get this reset to happen when rescanning the
buffer. :-(

Ray




