GNU bug report logs - #2203
C Mode: C-M-a fails at BOD re_comp, src/regex.c L6534

Previous Next

Packages: cc-mode, emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Thu, 5 Feb 2009 11:25:03 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alan Mackenzie <acm <at> muc.de>
Subject: bug#2203: closed (Re: bug#2203: C Mode:  C-M-a fails at BOD
 re_comp, src/regex.c L6534)
Date: Fri, 22 Jan 2016 23:07:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#2203: C Mode:  C-M-a fails at BOD re_comp, src/regex.c L6534

which was filed against the emacs,cc-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 2203 <at> debbugs.gnu.org.

-- 
2203: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2203
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: 2203-done <at> debbugs.gnu.org
Subject: Re: bug#2203: C Mode:  C-M-a fails at BOD re_comp, src/regex.c L6534
Date: 22 Jan 2016 23:06:47 -0000
Bug fixed in branch emacs-25.

In article <mailman.2414.1452890468.843.bug-gnu-emacs <at> gnu.org> you wrote:
> Alan Mackenzie <acm <at> muc.de> writes:

>> In .../src/regex.c put point at BOL6534, "char *" here:
>>
>> }
>> WEAK_ALIAS (__re_compile_pattern, re_compile_pattern)
>> ^L
>> /* Entry points compatible with 4.2 BSD regex library.  We don't define
>>    them unless specifically requested.  */
>>
>> #if defined _REGEX_RE_COMP || defined _LIBC
>>
>> /* BSD has one and only one pattern buffer.  */
>> static struct re_pattern_buffer re_comp_buf;
>>
>> char *                                          <=================================
>> # ifdef _LIBC
>> /* Make these definitions weak in libc, so POSIX programs can redefine
>>    these names if they don't use our functions, and still use
>>    regcomp/regexec below without link errors.  */
>> weak_function
>> # endif
>> re_comp (s)
>>     const char *s;
>> {
>>
>>
>> Do C-M-a.  Point doesn't move.
>>
>> Preliminary investigation:  With point on the 'h' of "char *",
>> (c-beginning-of-decl-1 nil) should move point one character backwards.
>> Instead, it moves to BOL "WEAK_ALIAS".

> I just tested this in Emacs 25 and it seems that in every case point
> moves back to "WEAK_ALIAS". That is, C-M-a, c-beginning-of-defun,
> behaves the same way as (c-beginning-of-decl-1 nil).

> I guess that makes it more broken, if more consistent, than when the bug
> was raised.

> -- 
> Alan Third

-- 
Alan Mackenzie (Nuremberg, Germany).


[Message part 3 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: C Mode:  C-M-a fails at BOD re_comp, src/regex.c L6534
Date: Thu, 5 Feb 2009 11:36:45 +0000
In .../src/regex.c put point at BOL6534, "char *" here:

}
WEAK_ALIAS (__re_compile_pattern, re_compile_pattern)
^L
/* Entry points compatible with 4.2 BSD regex library.  We don't define
   them unless specifically requested.  */

#if defined _REGEX_RE_COMP || defined _LIBC

/* BSD has one and only one pattern buffer.  */
static struct re_pattern_buffer re_comp_buf;

char *                                          <=================================
# ifdef _LIBC
/* Make these definitions weak in libc, so POSIX programs can redefine
   these names if they don't use our functions, and still use
   regcomp/regexec below without link errors.  */
weak_function
# endif
re_comp (s)
    const char *s;
{


Do C-M-a.  Point doesn't move.

Preliminary investigation:  With point on the 'h' of "char *",
(c-beginning-of-decl-1 nil) should move point one character backwards.
Instead, it moves to BOL "WEAK_ALIAS".

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 9 years and 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.