From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#2203: C Mode: C-M-a fails at BOD re_comp, src/regex.c L6534 Date: 22 Jan 2016 23:06:47 -0000 Organization: muc.de e.V. Message-ID: <20160122230647.52787.qmail@mail.muc.de> References: <20090205113645.GA3213@muc.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1453504042 3903 80.91.229.3 (22 Jan 2016 23:07:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2016 23:07:22 +0000 (UTC) To: 2203-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 23 00:07:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aMknQ-0001e8-Rs for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 00:07:12 +0100 Original-Received: from localhost ([::1]:55879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMknP-00006d-SU for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jan 2016 18:07:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMknL-0008UJ-UD for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2016 18:07:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMknL-0007ko-27 for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2016 18:07:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMknG-0007iu-28; Fri, 22 Jan 2016 18:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aMknF-0004TK-U4; Fri, 22 Jan 2016 18:07:01 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 22 Jan 2016 23:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 2203 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Mail-Followup-To: 2203@debbugs.gnu.org, acm@muc.de, acm@muc.de Original-Received: via spool by 2203-done@debbugs.gnu.org id=D2203.145350401017169 (code D ref 2203); Fri, 22 Jan 2016 23:07:01 +0000 Original-Received: (at 2203-done) by debbugs.gnu.org; 22 Jan 2016 23:06:50 +0000 Original-Received: from localhost ([127.0.0.1]:58168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMkn4-0004Sr-Jv for submit@debbugs.gnu.org; Fri, 22 Jan 2016 18:06:50 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:47539) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMkn2-0004Sc-Ji for 2203-done@debbugs.gnu.org; Fri, 22 Jan 2016 18:06:49 -0500 Original-Received: (qmail 52788 invoked by uid 3782); 22 Jan 2016 23:06:47 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.2-RELEASE-p9 (amd64)) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111865 Archived-At: Bug fixed in branch emacs-25. In article you wrote: > Alan Mackenzie 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).