From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: John Smith Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Dec 2012 18:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13046 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 13046@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135438697632536 (code B ref -1); Sat, 01 Dec 2012 18:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Dec 2012 18:36:16 +0000 Received: from localhost ([127.0.0.1]:48761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TervD-0008Sj-PX for submit@debbugs.gnu.org; Sat, 01 Dec 2012 13:36:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33802) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teovj-000470-UF for submit@debbugs.gnu.org; Sat, 01 Dec 2012 10:24:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Teotb-0007Wy-Fv for submit@debbugs.gnu.org; Sat, 01 Dec 2012 10:22:24 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:38627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Teotb-0007Wu-Cc for submit@debbugs.gnu.org; Sat, 01 Dec 2012 10:22:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Teota-0005uN-Le for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2012 10:22:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeotZ-0007Wd-Ot for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2012 10:22:22 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:62754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeotZ-0007WS-Hk for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2012 10:22:21 -0500 Received: by mail-ee0-f41.google.com with SMTP id d41so970802eek.0 for ; Sat, 01 Dec 2012 07:22:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:x-google-sender-delegation:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=j2N+/Ve9igvqpuKm18OBTgr72aJ+1WEyudeXOg+dH+c=; b=Ues+faJk9hKZco43FG26GK/uuqSCmbfPMP/qWW23gSHZajVvJ76c3frpk3F0/rUl04 Jgn1pG42MB+hUahxKe2/+Jurl4Qf0MK85W1fZhrtMP/aVD6suu3WIZw197ZfVXgK4iUj ffWa4xyrog9OFeQlL7ZxmrYezq/P9lIyiongQNQPD7YcUAOTC+iZZGa9fbF0kUaCmLKt v1gE0G/k1f6lPo80VVKD6wnfzsRQNS/W4D++B+HBLJ/BBU1A+2T8dLGBP0kExvzW3gI7 ZileWa8UrW1hRDxeuC7Ja5nxykPQ5Y0MiAZa+MPZumuWrWSFr2gSaI9dPz6hprb943CD 2YyQ== MIME-Version: 1.0 Received: by 10.14.223.200 with SMTP id v48mr16852428eep.24.1354375340338; Sat, 01 Dec 2012 07:22:20 -0800 (PST) X-Google-Sender-Delegation: fdemesmay@gmail.com Received: by 10.223.173.1 with HTTP; Sat, 1 Dec 2012 07:22:20 -0800 (PST) In-Reply-To: References: Date: Sat, 1 Dec 2012 16:22:20 +0100 X-Google-Sender-Auth: axPUrhxm6zKWTQrw74nVimx1GZo Message-ID: From: John Smith Content-Type: multipart/mixed; boundary=047d7b6228200dac3904cfcc1586 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Mailman-Approved-At: Sat, 01 Dec 2012 13:36:14 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) --047d7b6228200dac3904cfcc1586 Content-Type: multipart/alternative; boundary=047d7b6228200dac3304cfcc1584 --047d7b6228200dac3304cfcc1584 Content-Type: text/plain; charset=ISO-8859-1 Dear Maintainers, Using emacs -Q,just open the attached minimal example and try typing "std::string" in the body of the function. That should hang emacs forever (or at least it does on my up-to-date ubuntu). Cheers, --047d7b6228200dac3304cfcc1584 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Dear Maintainers,

Using emacs -Q,just ope= n the attached minimal example and try typing "std::string" in th= e body of the function.
That should hang emacs forever (or at least it = does on my up-to-date ubuntu).

Cheers,


--047d7b6228200dac3304cfcc1584-- --047d7b6228200dac3904cfcc1586 Content-Type: text/x-c++hdr; charset=US-ASCII; name="crash.hpp" Content-Disposition: attachment; filename="crash.hpp" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ha6v5iz50 dGVtcGxhdGU8Pg0NCnZvaWQgdCgpIHsNDQovL3R5cGUgInN0ZDo6c3RyaW5nIiBiZWxvdyB0aGlz IGxpbmUgdG8gaGFuZyBlbWFjcw0KDQogICAgfQ0K --047d7b6228200dac3904cfcc1586-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 01 21:05:14 2012 Received: (at control) by debbugs.gnu.org; 2 Dec 2012 02:05:14 +0000 Received: from localhost ([127.0.0.1]:48972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teyvh-0004Or-7n for submit@debbugs.gnu.org; Sat, 01 Dec 2012 21:05:14 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:56261) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teyvf-0004Ok-0h for control@debbugs.gnu.org; Sat, 01 Dec 2012 21:05:11 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so1081155pad.3 for ; Sat, 01 Dec 2012 18:02:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=AVCeyHdTgye+8gLmXSt3tTqSGSiNpCIzjY3OrQf6PGU=; b=cOZzM2q0U4x1FrJ267Qc4WWaHpIpPKQwpKYzrWMAagboxDJKZrNYjDsIfCO1WXPrft Wj/q2KQbSh8XiEpxO9Y4uENhJZ48Ls9C51mB45Q4ANbWrTO594/j8gEHhkV2ivkgKOR4 PHk5/5dRNZgcGX9czcdb6hUxfsNB6mklSj6teiMs/LQ4alF1W6/QOXlsQaGg3jK7eMUB hgEt5MySnUnFVf0jtGrJn/hdJ/iMdsupgqiGDCEGG+qmOQopT/CgXRiozbvWoqO/TX4P kwCx7+ktBr2ISetiyAtGwhgKYr+zUQawFVHkA0scqe94wFXGGUXt6Ht74GSQZ4NRPpQP 8UYw== Received: by 10.68.232.2 with SMTP id tk2mr18109432pbc.92.1354413776377; Sat, 01 Dec 2012 18:02:56 -0800 (PST) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id qt3sm5564224pbb.32.2012.12.01.18.02.53 (version=SSLv3 cipher=OTHER); Sat, 01 Dec 2012 18:02:55 -0800 (PST) From: Chong Yidong To: control@debbugs.gnu.org Subject: severity 13046 important Date: Sun, 02 Dec 2012 10:02:51 +0800 Message-ID: <87mwxxcit0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) severity 13046 important thanks From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 02 Dec 2012 02:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: John Smith , 13046@debbugs.gnu.org Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.135441457021202 (code B ref 13046); Sun, 02 Dec 2012 02:17:01 +0000 Received: (at 13046) by debbugs.gnu.org; 2 Dec 2012 02:16:10 +0000 Received: from localhost ([127.0.0.1]:48977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tez6I-0005Vt-7m for submit@debbugs.gnu.org; Sat, 01 Dec 2012 21:16:10 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:61517) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tez6F-0005Vl-7t for 13046@debbugs.gnu.org; Sat, 01 Dec 2012 21:16:08 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so1083471pad.3 for <13046@debbugs.gnu.org>; Sat, 01 Dec 2012 18:13:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=4ZgaLRBhucW8PK0yaqxT6Y8gt91MGTZFU+o7Hm6Brkc=; b=Hr+7waFNUCoIPx6pp9Fs3vz2mwOVqBfwPLriYDOSMepBbb9yaBdss1myyMWm9bOe3f lTNymiaWAKPIiPSbCxksJjCeV56zrVjGl6mSd0ouBTnq4oJK9MmvR2JSZnzAarkfvhPj ajgPXUlGnbhAS0chSoR5u6+aK7vmBBIp+CNJDhZhaMsWAkJ0zT6kWWG4Vl+N9EN11WUK O+XJHoNd6JwNwj9WPolXz+v4Hg+djtkFZYL8r0JqG14C5KGT6H9BucKfFECEWo8Ptlhe pSQ5Iz6GYPvj+CFR6/tKlw3cYxx8lKkzEWYRxtmE/rL6tn4JoJKDG8DMhdvibX0xisQk pGlA== Received: by 10.66.85.74 with SMTP id f10mr15052369paz.38.1354414432483; Sat, 01 Dec 2012 18:13:52 -0800 (PST) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id i1sm168798pav.35.2012.12.01.18.13.49 (version=SSLv3 cipher=OTHER); Sat, 01 Dec 2012 18:13:51 -0800 (PST) From: Chong Yidong References: Date: Sun, 02 Dec 2012 10:13:47 +0800 In-Reply-To: (John Smith's message of "Sat, 1 Dec 2012 16:22:20 +0100") Message-ID: <87txs5fbfo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) John Smith writes: > Using emacs -Q,just open the attached minimal example and try typing > "std::string" in the body of the function. > That should hang emacs forever (or at least it does on my up-to-date > ubuntu). I think this is a duplicate of Bug#11841. The patch posted in Bug#11841 does not completely fix this test case. Giving ^M whitespace syntax in CC mode, as Stefan suggested, seems like the easiest solution. Alan, could you take another look? It would be good to have this fixed in Emacs 24.3. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 01 21:16:42 2012 Received: (at control) by debbugs.gnu.org; 2 Dec 2012 02:16:42 +0000 Received: from localhost ([127.0.0.1]:48980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tez6n-0005WZ-U5 for submit@debbugs.gnu.org; Sat, 01 Dec 2012 21:16:42 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:50932) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tez6m-0005WT-QK for control@debbugs.gnu.org; Sat, 01 Dec 2012 21:16:41 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so1083607pad.3 for ; Sat, 01 Dec 2012 18:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=FBgT1SR7PQSxxICr8aNkaQnyHecZTMu2l9HgDUIXBZw=; b=CSSm0Zl2yAvG6PCIyvrntOuOmysjO8alV/Enh8EngE+ot4M/2pMaa00FL5aUwtGfon xD9MMBB/oVVCAF70nS5vlqJ/Lj3NFffsQPUpXYQoG1Y4dsVg3EBFGzJuu+0UieQ1qpgq YOYdAYSc1TgAti4XlJi5EsoQnTZHQawveDfDHxuzRAeAnk8klLEaR6/p00oDbKcXtjEj AB/NaKYbUCieBX7RsFq6g2vwvQyvLpivLcFgCj9WAaQEDW0sBNFoMQyOSLQfp+uHTE+o cEmFAaCbLRjYatLzHb3tvqLK4bIrLTfcDQlYQwKG/No93BOZRvvbhKf0gf6kheShXnnr dUAw== Received: by 10.68.209.136 with SMTP id mm8mr17643872pbc.146.1354414466242; Sat, 01 Dec 2012 18:14:26 -0800 (PST) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id f2sm5511703paz.25.2012.12.01.18.14.23 (version=SSLv3 cipher=OTHER); Sat, 01 Dec 2012 18:14:25 -0800 (PST) From: Chong Yidong To: control@debbugs.gnu.org Subject: merge 11841 13046 Date: Sun, 02 Dec 2012 10:14:21 +0800 Message-ID: <87hao5jj42.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) merge 11841 13046 severity 11841 important thanks From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 02 Dec 2012 15:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Chong Yidong Cc: John Smith , 13046@debbugs.gnu.org Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.13544637209655 (code B ref 13046); Sun, 02 Dec 2012 15:56:02 +0000 Received: (at 13046) by debbugs.gnu.org; 2 Dec 2012 15:55:20 +0000 Received: from localhost ([127.0.0.1]:50180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfBt2-0002Vg-DC for submit@debbugs.gnu.org; Sun, 02 Dec 2012 10:55:20 -0500 Received: from colin.muc.de ([193.149.48.1]:64419 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfBsz-0002VY-Ug for 13046@debbugs.gnu.org; Sun, 02 Dec 2012 10:55:19 -0500 Received: (qmail 12145 invoked by uid 3782); 2 Dec 2012 15:52:59 -0000 Received: from acm.muc.de (pD951B8A7.dip.t-dialin.net [217.81.184.167]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 02 Dec 2012 16:52:55 +0100 Received: (qmail 14097 invoked by uid 1000); 2 Dec 2012 15:46:35 -0000 Date: Sun, 2 Dec 2012 15:46:35 +0000 Message-ID: <20121202154635.GA12129@acm.acm> References: <87txs5fbfo.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87txs5fbfo.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) Hello, Yidong. On Sun, Dec 02, 2012 at 10:13:47AM +0800, Chong Yidong wrote: > John Smith writes: > > Using emacs -Q,just open the attached minimal example and try typing > > "std::string" in the body of the function. > > That should hang emacs forever (or at least it does on my up-to-date > > ubuntu). Yes. > I think this is a duplicate of Bug#11841. I think so too, though 11841 has at least two distinct bugs causing the same symptom. > The patch posted in Bug#11841 does not completely fix this test case. > Giving ^M whitespace syntax in CC mode, as Stefan suggested, seems like > the easiest solution. The problem in John Smith's case is that c-backward-sws ("backward syntactic whitespace") doesn't always go back over a ^M, causing the calling routine to loop. I'm looking into this at the moment. > Alan, could you take another look? It would be good to have this fixed > in Emacs 24.3. Agreed. -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 02 Dec 2012 18:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Chong Yidong Cc: Vadim K , John Smith , 13046@debbugs.gnu.org Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.135447270622982 (code B ref 13046); Sun, 02 Dec 2012 18:26:03 +0000 Received: (at 13046) by debbugs.gnu.org; 2 Dec 2012 18:25:06 +0000 Received: from localhost ([127.0.0.1]:50367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfEDy-0005yd-6J for submit@debbugs.gnu.org; Sun, 02 Dec 2012 13:25:06 -0500 Received: from colin.muc.de ([193.149.48.1]:22684 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfEDv-0005yQ-Do for 13046@debbugs.gnu.org; Sun, 02 Dec 2012 13:25:04 -0500 Received: (qmail 19887 invoked by uid 3782); 2 Dec 2012 18:22:44 -0000 Received: from acm.muc.de (pD951B8A7.dip.t-dialin.net [217.81.184.167]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 02 Dec 2012 19:22:43 +0100 Received: (qmail 14593 invoked by uid 1000); 2 Dec 2012 18:16:23 -0000 Date: Sun, 2 Dec 2012 18:16:23 +0000 Message-ID: <20121202181623.GB12129@acm.acm> References: <87txs5fbfo.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87txs5fbfo.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) Hello Yidong, Vadim, John. On Sun, Dec 02, 2012 at 10:13:47AM +0800, Chong Yidong wrote: > John Smith writes: > > Using emacs -Q,just open the attached minimal example and try typing > > "std::string" in the body of the function. > > That should hang emacs forever (or at least it does on my up-to-date > > ubuntu). > I think this is a duplicate of Bug#11841. > The patch posted in Bug#11841 does not completely fix this test case. > Giving ^M whitespace syntax in CC mode, as Stefan suggested, seems like > the easiest solution. Alan, could you take another look? It would be > good to have this fixed in Emacs 24.3. On Wed, Jul 25, 2012 at 11:58:22PM +0300, Vadim K wrote: > Hello Alan, > I've tried your patch and it worked fine for the original posted > bad.cpp file. However I have found a variation of that file that still > causes emacs to hang (see attached bad2.cpp). [ Bug #11841 ] I think the enclosed patch fixes these bugs. Please try out the patch and let us know if there are still any problems here. The basic problem is that (forward-comment -1) doesn't recognise a CR character as whitespace. My first attempt to patch this, in July, was only partly successful. The specific problem was that (forward-comment -1) _sometimes_ goes back over the LF in CRLF, sometimes not. I've not discovered by what criterion. diff -r 1adcc48506f9 cc-engine.el --- a/cc-engine.el Sun Apr 22 09:42:29 2012 +0000 +++ b/cc-engine.el Sun Dec 02 17:46:53 2012 +0000 @@ -1454,8 +1454,21 @@ ;; return t when moving backwards at bob. (not (bobp)) - (if (let (open-paren-in-column-0-is-defun-start) - (forward-comment -1)) + (if (let (open-paren-in-column-0-is-defun-start moved-comment) + (while + (and (not (setq moved-comment (forward-comment -1))) + ;; Cope specifically with ^M^J here - + ;; forward-comment sometimes gets stuck after ^Ms, + ;; sometimes after ^M^J. + (or + (when (eq (char-before) ?\r) + (backward-char) + t) + (when (and (eq (char-before) ?\n) + (eq (char-before (1- (point))) ?\r)) + (backward-char 2) + t)))) + moved-comment) (if (looking-at "\\*/") ;; Emacs <= 20 and XEmacs move back over the ;; closer of a block comment that lacks an opener. -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: John Smith Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 03 Dec 2012 08:58:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Chong Yidong , 13046@debbugs.gnu.org, Vadim K Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.135452503726419 (code B ref 13046); Mon, 03 Dec 2012 08:58:04 +0000 Received: (at 13046) by debbugs.gnu.org; 3 Dec 2012 08:57:17 +0000 Received: from localhost ([127.0.0.1]:50800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfRq0-0006s3-Uw for submit@debbugs.gnu.org; Mon, 03 Dec 2012 03:57:17 -0500 Received: from mail-ea0-f172.google.com ([209.85.215.172]:34607) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfRpy-0006rs-4d for 13046@debbugs.gnu.org; Mon, 03 Dec 2012 03:57:15 -0500 Received: by mail-ea0-f172.google.com with SMTP id a1so1170285eaa.3 for <13046@debbugs.gnu.org>; Mon, 03 Dec 2012 00:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:x-google-sender-delegation:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=zKn9pDBfZ/vkEfuYwr5wPLiSntJv4CbjzhN/KJCbfPg=; b=QRqwl5jw6JN7NV5bWTGNntWtYm/p6DHW/wqR7JILqZT3Z1N/ZNFpI5olmIugkMaOR4 2YBIqigcSc1WKZX0FYWSUPM3/kDhQJTmiWQIyxRBdBudMTuDqRCgvTiK6zCOKtqXVEbu GQam1yD9k6mn6EvabHOV+dYzgUgeZqb5AHGYKExFufuoTH3RxmIArao5d1ooS8Tqv4Gr 6YvjZpMK5rYcVMQTSv6uhDgqeewDfEnLkUBeCgTkku5mqIrENH3AEjFZiX9XN6me3Q2Q hBaQbUwjFaXRZUpoQUAL4fUen0AoUm1kH+u/iaxWNKp8wIVZUehKIZpKgSpb6XUEzZDS 500w== MIME-Version: 1.0 Received: by 10.14.221.9 with SMTP id q9mr34347517eep.3.1354524892060; Mon, 03 Dec 2012 00:54:52 -0800 (PST) X-Google-Sender-Delegation: fdemesmay@gmail.com Received: by 10.223.173.1 with HTTP; Mon, 3 Dec 2012 00:54:51 -0800 (PST) In-Reply-To: <20121202181623.GB12129@acm.acm> References: <87txs5fbfo.fsf@gnu.org> <20121202181623.GB12129@acm.acm> Date: Mon, 3 Dec 2012 09:54:51 +0100 X-Google-Sender-Auth: 2JMdtKQzR3QMdQVj4v69uozbMFE Message-ID: From: John Smith Content-Type: multipart/alternative; boundary=047d7b6049ba07da7d04cfeee7e0 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) --047d7b6049ba07da7d04cfeee7e0 Content-Type: text/plain; charset=ISO-8859-1 Hello all, I'm afraid my limited emacs knowledge will not allow me to test the patch. (Building fresh from source + patching the lisp => too much :) ) I trust however that it does! Thanks for being so responsive. Yours Sincerely, John On Sun, Dec 2, 2012 at 7:16 PM, Alan Mackenzie wrote: > Hello Yidong, Vadim, John. > > On Sun, Dec 02, 2012 at 10:13:47AM +0800, Chong Yidong wrote: > > John Smith writes: > > > > Using emacs -Q,just open the attached minimal example and try typing > > > "std::string" in the body of the function. > > > That should hang emacs forever (or at least it does on my up-to-date > > > ubuntu). > > > I think this is a duplicate of Bug#11841. > > > The patch posted in Bug#11841 does not completely fix this test case. > > Giving ^M whitespace syntax in CC mode, as Stefan suggested, seems like > > the easiest solution. Alan, could you take another look? It would be > > good to have this fixed in Emacs 24.3. > > On Wed, Jul 25, 2012 at 11:58:22PM +0300, Vadim K wrote: > > Hello Alan, > > > > I've tried your patch and it worked fine for the original posted > > bad.cpp file. However I have found a variation of that file that still > > causes emacs to hang (see attached bad2.cpp). > [ Bug #11841 ] > > > I think the enclosed patch fixes these bugs. Please try out the patch > and let us know if there are still any problems here. > > The basic problem is that (forward-comment -1) doesn't recognise a CR > character as whitespace. My first attempt to patch this, in July, was > only partly successful. > > The specific problem was that (forward-comment -1) _sometimes_ goes back > over the LF in CRLF, sometimes not. I've not discovered by what > criterion. > > > > diff -r 1adcc48506f9 cc-engine.el > --- a/cc-engine.el Sun Apr 22 09:42:29 2012 +0000 > +++ b/cc-engine.el Sun Dec 02 17:46:53 2012 +0000 > @@ -1454,8 +1454,21 @@ > ;; return t when moving backwards at bob. > (not (bobp)) > > - (if (let (open-paren-in-column-0-is-defun-start) > - (forward-comment -1)) > + (if (let (open-paren-in-column-0-is-defun-start moved-comment) > + (while > + (and (not (setq moved-comment (forward-comment -1))) > + ;; Cope specifically with ^M^J here - > + ;; forward-comment sometimes gets stuck after ^Ms, > + ;; sometimes after ^M^J. > + (or > + (when (eq (char-before) ?\r) > + (backward-char) > + t) > + (when (and (eq (char-before) ?\n) > + (eq (char-before (1- (point))) ?\r)) > + (backward-char 2) > + t)))) > + moved-comment) > (if (looking-at "\\*/") > ;; Emacs <= 20 and XEmacs move back over the > ;; closer of a block comment that lacks an opener. > > > > -- > Alan Mackenzie (Nuremberg, Germany). > --047d7b6049ba07da7d04cfeee7e0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello all,

I'm afraid my limited emacs knowledge will not allow = me to test the patch. (Building fresh from source + patching the lisp =3D&g= t; too much :) )
I trust however that it does!

Thanks for being s= o responsive.

Yours Sincerely,
John

On Sun, Dec = 2, 2012 at 7:16 PM, Alan Mackenzie <acm@muc.de> wrote:
Hello Yidong, Vadim, John.

On Sun, Dec 02, 2012 at 10:13:47AM +0800, Chong Yidong wrote:
> John Smith <drefleladi@gmail.com> writes:

> > Using emacs -Q,just open the attached minimal example and try typ= ing
> > "std::string" in the body of the function.
> > That should hang emacs forever (or at least it does on my up-to-d= ate
> > ubuntu).

> I think this is a duplicate of Bug#11841.

> The patch posted in Bug#11841 does not completely fix this test case.<= br> > Giving ^M whitespace syntax in CC mode, as Stefan suggested, seems lik= e
> the easiest solution. =A0Alan, could you take another look? =A0It woul= d be
> good to have this fixed in Emacs 24.3.

On Wed, Jul 25, 2012 at 11:58:22PM +0300, Vadim K wrote:
> Hello Alan,


> I've tried your patch and it worked fine for the original posted > bad.cpp file. However I have found a variation of that file that still=
> causes emacs to hang (see attached bad2.cpp).
[ Bug #11841 ]


I think the enclosed patch fixes these bugs. =A0Please try out the patch and let us know if there are still any problems here.

The basic problem is that (forward-comment -1) doesn't recognise a CR character as whitespace. =A0My first attempt to patch this, in July, was only partly successful.

The specific problem was that (forward-comment -1) _sometimes_ goes back over the LF in CRLF, sometimes not. =A0I've not discovered by what
criterion.



diff -r 1adcc48506f9 cc-engine.el
--- a/cc-engine.el =A0 =A0 =A0Sun Apr 22 09:42:29 2012 +0000
+++ b/cc-engine.el =A0 =A0 =A0Sun Dec 02 17:46:53 2012 +0000
@@ -1454,8 +1454,21 @@
=A0 =A0 =A0 =A0 =A0 =A0 ;; return t when moving backwards at bob.
=A0 =A0 =A0 =A0 =A0 =A0 (not (bobp))

- =A0 =A0 =A0 =A0 =A0 (if (let (open-paren-in-column-0-is-defun-start)
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (forward-comment -1))
+ =A0 =A0 =A0 =A0 =A0 (if (let (open-paren-in-column-0-is-defun-start moved= -comment)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (while
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (and (not (setq moved-comment (fo= rward-comment -1)))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; Cope specifically with ^M^J he= re -
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; forward-comment sometimes gets= stuck after ^Ms,
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; sometimes after ^M^J.
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(or
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (when (eq (char-befor= e) ?\r)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (backward-char) + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 t)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (when (and (eq (char-= before) ?\n)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0(eq (char-before (1- (point))) ?\r))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (backward-char 2)=
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 t))))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 moved-comment)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (if (looking-at "\\*/")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; Emacs <=3D 20 and XEmacs move= back over the
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; closer of a block comment that l= acks an opener.



--
Alan Mackenzie (Nuremberg, Germany).

--047d7b6049ba07da7d04cfeee7e0-- From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 05 Dec 2012 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: John Smith Cc: Chong Yidong , 13046@debbugs.gnu.org, Vadim K Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.13547386523024 (code B ref 13046); Wed, 05 Dec 2012 20:18:01 +0000 Received: (at 13046) by debbugs.gnu.org; 5 Dec 2012 20:17:32 +0000 Received: from localhost ([127.0.0.1]:55296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgLPM-0000mg-NF for submit@debbugs.gnu.org; Wed, 05 Dec 2012 15:17:31 -0500 Received: from colin.muc.de ([193.149.48.1]:56807 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgLPI-0000mW-Fq for 13046@debbugs.gnu.org; Wed, 05 Dec 2012 15:17:26 -0500 Received: (qmail 14587 invoked by uid 3782); 5 Dec 2012 20:17:13 -0000 Received: from acm.muc.de (pD9557B20.dip.t-dialin.net [217.85.123.32]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 05 Dec 2012 21:17:11 +0100 Received: (qmail 4543 invoked by uid 1000); 5 Dec 2012 20:10:47 -0000 Date: Wed, 5 Dec 2012 20:10:47 +0000 Message-ID: <20121205201047.GA3656@acm.acm> References: <87txs5fbfo.fsf@gnu.org> <20121202181623.GB12129@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hello, John. On Mon, Dec 03, 2012 at 09:54:51AM +0100, John Smith wrote: > Hello all, > I'm afraid my limited emacs knowledge will not allow me to test the patch. > (Building fresh from source + patching the lisp => too much :) ) > I trust however that it does! If you want to test the patch, here's how to go about it: (i) Make sure you've got the program `patch' installed - it's in package "diffutils". (I don't know the package manager in Ubuntu). (ii) Extract my email containing the patch to a file, say foo.diff. You don't need to bother separating out the actual patch from all the other stuff. (iii) Locate cc-engine.el. It will be somewhere like /usr/local/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you installed Emacs from source, or /usr/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you installed Emacs from a package manager. In either case you can find it for sure with C-h f c-mode , and click/type CR on the file name. Then do C-x C-v to see where it is. (iv) Unzip the source file: cd ; gunzip cc-engine.el.gz (v) Patch that file: patch < /path/to/foo.diff (vi) Byte compile the file: (in emacs) M-x byte-compile-file /path/to/cc-engine.el (vii) Load the file (or restart Emacs): M-x load-file /path/to/cc-engine.elc (note the 'c' at the end of ".elc") (viii) Advisable: gunzip, byte compile, and load cc-cmds.el.gz too. This is because it uses the "defsubst" (inline function) changed in cc-engine.el. > Thanks for being so responsive. Thank you for such a high quality bug report. > Yours Sincerely, > John -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: John Smith Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 07 Dec 2012 04:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Chong Yidong , 13046@debbugs.gnu.org, Vadim K Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.135485489415202 (code B ref 13046); Fri, 07 Dec 2012 04:35:02 +0000 Received: (at 13046) by debbugs.gnu.org; 7 Dec 2012 04:34:54 +0000 Received: from localhost ([127.0.0.1]:57605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgpeH-0003x8-RL for submit@debbugs.gnu.org; Thu, 06 Dec 2012 23:34:54 -0500 Received: from mail-ea0-f172.google.com ([209.85.215.172]:48645) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgpeE-0003wy-8q for 13046@debbugs.gnu.org; Thu, 06 Dec 2012 23:34:52 -0500 Received: by mail-ea0-f172.google.com with SMTP id a1so33364eaa.3 for <13046@debbugs.gnu.org>; Thu, 06 Dec 2012 20:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:x-google-sender-delegation:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=CGyEE3MWK9uHG0b+elm189w21uEurQl2fGTAw6+u9GY=; b=07grB4LMeD6t/iWjKsZQkdOb7D3FrygFVehA3ZwNp4xWfNj1CQlu64/9Bsj46ajFRZ PUCrnOHi7wV11ur47BLpTXHWWpgdzp8YzhLuh66XaoYpOZ416dYAjElYFWrejGQCSexR 3hxQcgmC+7ZU2hUVykvk548SpFyR0J0IOfliQJDCSetxey/Hh6053HsXQ3vii5fj7eOh tezSvzMP5zsgRJZnT/s594KkhkHn7jSwmfU9srNOS8aSjiHKLGvdooRrgy2kLT19smyr nAwkk9qf1O1EDkL1uZaU6DgWjI2AqeodxV+txJwfpoH+kHZ2O+ae6w18zF9kLZ8veqQq RdMw== MIME-Version: 1.0 Received: by 10.14.174.198 with SMTP id x46mr12394705eel.23.1354854872886; Thu, 06 Dec 2012 20:34:32 -0800 (PST) X-Google-Sender-Delegation: fdemesmay@gmail.com Received: by 10.223.144.81 with HTTP; Thu, 6 Dec 2012 20:34:32 -0800 (PST) In-Reply-To: <20121205201047.GA3656@acm.acm> References: <87txs5fbfo.fsf@gnu.org> <20121202181623.GB12129@acm.acm> <20121205201047.GA3656@acm.acm> Date: Fri, 7 Dec 2012 05:34:32 +0100 X-Google-Sender-Auth: DnQTPkOwq89QcypJjaA9XO5nmMA Message-ID: From: John Smith Content-Type: multipart/alternative; boundary=047d7b62430a6baf3e04d03bbb22 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --047d7b62430a6baf3e04d03bbb22 Content-Type: text/plain; charset=ISO-8859-1 Damn you. I *told* you that I didn't have the time & skills to look into this further and you being so-nice-and-all guilt forced me into doing it :) ok, so a few take-aways from giving advices to an emacs noob: -on ubuntu the distribution only packages compiled lisp files so one needs to add a special package to get the sources -*In either case you can find it for sure with C-h f c-mode , and click/type CR on the file name. Then do C-x C-v to see where it is.* I could switch to the C-mode but never understood what "*click/type CR on the file name"* was supposed to mean. Anyways I found the file. -the patch didn't work since the lines you removed changed a bit between 23.4 and HEAD, but I worked around it. -like all good things there are dependencies: cc-defs.el for one and friends, I had to fetch them -mmh, it doesn't byte compile. actually, even vanilla unpatched file doesn't byte-compile: In c-declare-lang-variables: cc-engine.el:162:28:Warning: reference to free variable `c-lang-variable-inits' cc-engine.el:163:1:Error: Symbol's value as variable is void: c-lang-variable-inits I tried commenting out that line but no such luck. I guess this is a trivial problem and I need to build something else but mmh what? I'm stuck. Years of devs in heaps of languages and yet I'm so helpless with this one. Cheers and thanks for the trip. John On Wed, Dec 5, 2012 at 9:10 PM, Alan Mackenzie wrote: > Hello, John. > > On Mon, Dec 03, 2012 at 09:54:51AM +0100, John Smith wrote: > > Hello all, > > > I'm afraid my limited emacs knowledge will not allow me to test the > patch. > > (Building fresh from source + patching the lisp => too much :) ) > > I trust however that it does! > > If you want to test the patch, here's how to go about it: > (i) Make sure you've got the program `patch' installed - it's in package > "diffutils". (I don't know the package manager in Ubuntu). > > (ii) Extract my email containing the patch to a file, say foo.diff. You > don't need to bother separating out the actual patch from all the other > stuff. > > (iii) Locate cc-engine.el. It will be somewhere like > /usr/local/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you > installed Emacs from source, or > /usr/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you installed > Emacs from a package manager. In either case you can find it for sure with > C-h f c-mode , and click/type CR on the file name. Then do C-x C-v > to see where it is. > > (iv) Unzip the source file: cd ; gunzip cc-engine.el.gz > > (v) Patch that file: patch < /path/to/foo.diff > > (vi) Byte compile the file: (in emacs) > M-x byte-compile-file /path/to/cc-engine.el > > (vii) Load the file (or restart Emacs): > M-x load-file /path/to/cc-engine.elc > (note the 'c' at the end of ".elc") > > (viii) Advisable: gunzip, byte compile, and load cc-cmds.el.gz too. > This is because it uses the "defsubst" (inline function) changed in > cc-engine.el. > > > Thanks for being so responsive. > > Thank you for such a high quality bug report. > > > Yours Sincerely, > > John > > -- > Alan Mackenzie (Nuremberg, Germany). > --047d7b62430a6baf3e04d03bbb22 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Damn you.
I *told* you that I didn't have the time & skills to l= ook into this further and you being so-nice-and-all guilt forced me into do= ing it :)

ok, so a few take-aways from giving advices to an emacs no= ob:

-on ubuntu the distribution only packages compiled lisp files so one ne= eds to add a special package to get the sources

-In either case y= ou can find it for sure with C-h f c-mode <ret>, and click/type CR on the file name. =A0Then do C-= x C-v to see where it is.
I could switch to the C-mode but never understoo= d what "click/type CR on the file name" was supposed to me= an. Anyways I found the file.

-the patch didn't work since the l= ines you removed changed a bit between 23.4 and HEAD, but I worked around i= t.

-like all good things there are dependencies: cc-defs.el for one and fr= iends, I had to fetch them

-mmh, it doesn't byte compile. actual= ly, even vanilla unpatched file doesn't byte-compile:
In c-declare-l= ang-variables:
cc-engine.el:162:28:Warning: reference to free variable
=A0=A0=A0 `c-lan= g-variable-inits'
cc-engine.el:163:1:Error: Symbol's value as va= riable is void: c-lang-variable-inits

I tried commenting out that li= ne but no such luck.
I guess this is a trivial problem and I need to build something else but mm= h what? I'm stuck.
Years of devs in heaps of languages and yet I'= ;m so helpless with this one.

Cheers and thanks for the trip.
John



On Wed, Dec 5, 2012 at 9:10 = PM, Alan Mackenzie <acm@muc.de> wrote:
Hello, John.

On Mon, Dec 03, 2012 at 09:54:51AM +0100, John Smith wrote:
> Hello all,

> I'm afraid my limited emacs knowledge will not allow me to test th= e patch.
> (Building fresh from source + patching the lisp =3D> too much :) )<= br> > I trust however that it does!

If you want to test the patch, here's how to go about it:
(i) Make sure you've got the program `patch' installed - it's i= n package
"diffutils". =A0(I don't know the package manager in Ubuntu).=

(ii) Extract my email containing the patch to a file, say foo.diff. =A0You<= br> don't need to bother separating out the actual patch from all the other=
stuff.

(iii) Locate cc-engine.el. =A0It will be somewhere like
/usr/local/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you
installed Emacs from source, or
/usr/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you installed
Emacs from a package manager. =A0In either case you can find it for sure wi= th
C-h f c-mode <ret>, and click/type CR on the file name. =A0Then do C-= x C-v
to see where it is.

(iv) Unzip the source file: cd <above directory>; gunzip cc-engine.el= .gz

(v) Patch that file: patch < /path/to/foo.diff

(vi) Byte compile the file: (in emacs)
M-x byte-compile-file <ret> /path/to/cc-engine.el

(vii) Load the file (or restart Emacs):
M-x load-file /path/to/cc-engine.elc
(note the 'c' at the end of ".elc")

(viii) Advisable: gunzip, byte compile, and load cc-cmds.el.gz too.
This is because it uses the "defsubst" (inline function) changed = in
cc-engine.el.

> Thanks for being so responsive.

Thank you for such a high quality bug report.

> Yours Sincerely,
> John

--
Alan Mackenzie (Nuremberg, Germany).

--047d7b62430a6baf3e04d03bbb22-- From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 09 Dec 2012 04:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: John Smith , 13046@debbugs.gnu.org, Vadim K Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.135502605313762 (code B ref 13046); Sun, 09 Dec 2012 04:08:01 +0000 Received: (at 13046) by debbugs.gnu.org; 9 Dec 2012 04:07:33 +0000 Received: from localhost ([127.0.0.1]:33470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThYAu-0003Zv-9U for submit@debbugs.gnu.org; Sat, 08 Dec 2012 23:07:32 -0500 Received: from mail-da0-f44.google.com ([209.85.210.44]:51810) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThYAr-0003Zn-Pg for 13046@debbugs.gnu.org; Sat, 08 Dec 2012 23:07:30 -0500 Received: by mail-da0-f44.google.com with SMTP id z20so743090dae.3 for <13046@debbugs.gnu.org>; Sat, 08 Dec 2012 20:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=nlqTOKwd1LsO4RTqvBIdo4Vm9w3VJYtTJMroNQ9KjBU=; b=k7ntsVxnOqQI5Hav1hS20wn4Akn+DO/gcuABEkDyErSr672xcrQ2TrBK7jyY+lRfoC +mVtW4dEZwW1VeP7xKY1UJ/csLPq8EfGu98ybg+A/+/c9rpgRc003hgh2nvpArThI7su Tbbj4zzulyok2Jzg2yXReNuuxThq8oBRyFmPU8hLuHmwTYeQwzZHQr/4rxIkbi80bSJq UkD5nCM8FS6PZXepI+G6yF73b/SnWRYzWTi0UC4tbmH1SlrX8zQafUww12Umo0Dk2/ls taauC0N4hMH/ZRGnNQ8L7S1WOhHnblScTYzc7oAn95oqSfBvVUegwtHlRkVD1yXlFpMY K8sw== Received: by 10.68.213.33 with SMTP id np1mr27928901pbc.64.1355026021477; Sat, 08 Dec 2012 20:07:01 -0800 (PST) Received: from ulysses (cm107.delta179.maxonline.com.sg. [59.189.179.107]) by mx.google.com with ESMTPS id o5sm9394942paz.32.2012.12.08.20.06.58 (version=SSLv3 cipher=OTHER); Sat, 08 Dec 2012 20:07:00 -0800 (PST) From: Chong Yidong References: <87txs5fbfo.fsf@gnu.org> <20121202181623.GB12129@acm.acm> Date: Sun, 09 Dec 2012 12:06:56 +0800 In-Reply-To: <20121202181623.GB12129@acm.acm> (Alan Mackenzie's message of "Sun, 2 Dec 2012 18:16:23 +0000") Message-ID: <87txrvuavz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Alan Mackenzie writes: > I think the enclosed patch fixes these bugs. Please try out the patch > and let us know if there are still any problems here. Seems to work OK. Looks like a bit of a hack, but if it fixes the bug, so be it. Feel free to commit to emacs-24 if you're happy with it, and thanks. From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: Vadim K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 09 Dec 2012 13:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Chong Yidong , John Smith , 13046@debbugs.gnu.org Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.13550604556496 (code B ref 13046); Sun, 09 Dec 2012 13:41:03 +0000 Received: (at 13046) by debbugs.gnu.org; 9 Dec 2012 13:40:55 +0000 Received: from localhost ([127.0.0.1]:33717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Thh7i-0001gg-JC for submit@debbugs.gnu.org; Sun, 09 Dec 2012 08:40:51 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:33092) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Thh7a-0001gS-Id for 13046@debbugs.gnu.org; Sun, 09 Dec 2012 08:40:43 -0500 Received: by mail-pb0-f44.google.com with SMTP id uo1so1296069pbc.3 for <13046@debbugs.gnu.org>; Sun, 09 Dec 2012 05:40:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fjnUuDshHBopNDSuhBAAAtYmVJy+G1TLCVdjY787TY8=; b=BTkFPyYlp6UnfGN1qZyQATshix9B9cSjeOQL9dtl7EZ9kS8hmPNHpgWyW1Ll8W5q3E BDWmos4qnJTBWHQgoBXKfvsF7XozQTh23w+DZmyVEwC1qF8pM+oZd+rnYtz1Xe71v/i/ B/zsHbgzy+e6VQ1fEwGE5Y3mDiZoNhf4vAT6hVNc3ljwp1HXfVj5HVR31khUOu7hEPgr 6mnbF2SHRq405R4354lqLtW6h46jSHGbIBFfoZzH5xbBFFRRv4Bmercp/zjwT6nV7a0H yxb8yChqMcZhnX5DWFlV18d+y8YScg6/UwuRRmV9LJQUQtOhUNIidBahJH+dHrXrt+W5 j7Bg== MIME-Version: 1.0 Received: by 10.68.236.99 with SMTP id ut3mr5617435pbc.16.1355060410850; Sun, 09 Dec 2012 05:40:10 -0800 (PST) Received: by 10.66.222.232 with HTTP; Sun, 9 Dec 2012 05:40:10 -0800 (PST) In-Reply-To: <20121202181623.GB12129@acm.acm> References: <87txs5fbfo.fsf@gnu.org> <20121202181623.GB12129@acm.acm> Date: Sun, 9 Dec 2012 15:40:10 +0200 Message-ID: From: Vadim K Content-Type: multipart/alternative; boundary=047d7b33d7f6701d1d04d06b96ba X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) --047d7b33d7f6701d1d04d06b96ba Content-Type: text/plain; charset=ISO-8859-1 Hi Alan, I've verified that this patch does fix the issue #11841. On my Windows XP, after applying this patch, emacs was able to open both files that caused the issue. Vadim On Sun, Dec 2, 2012 at 8:16 PM, Alan Mackenzie wrote: > > I think the enclosed patch fixes these bugs. Please try out the patch > and let us know if there are still any problems here. > > -- > Alan Mackenzie (Nuremberg, Germany). > --047d7b33d7f6701d1d04d06b96ba Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Alan,


I've verified that this patc= h does fix the issue #11841. On my Windows XP, after applying this patch, e= macs was able to open both files that caused the issue.=A0


Vadim

On Sun, Dec 2= , 2012 at 8:16 PM, Alan Mackenzie <acm@muc.de> wrote:

I think the enclosed patch fixes these bugs. =A0Please try out the patch and let us know if there are still any problems here.

=A0--
Alan Mackenzie (Nuremberg, Germany).

--047d7b33d7f6701d1d04d06b96ba-- From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 09 Dec 2012 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: John Smith Cc: 13046@debbugs.gnu.org Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.135507275124657 (code B ref 13046); Sun, 09 Dec 2012 17:06:02 +0000 Received: (at 13046) by debbugs.gnu.org; 9 Dec 2012 17:05:51 +0000 Received: from localhost ([127.0.0.1]:34295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThkK7-0006Pe-2B for submit@debbugs.gnu.org; Sun, 09 Dec 2012 12:05:51 -0500 Received: from colin.muc.de ([193.149.48.1]:38860 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThkK4-0006PV-BB for 13046@debbugs.gnu.org; Sun, 09 Dec 2012 12:05:49 -0500 Received: (qmail 89419 invoked by uid 3782); 9 Dec 2012 17:05:13 -0000 Received: from acm.muc.de (pD951B6D1.dip.t-dialin.net [217.81.182.209]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 09 Dec 2012 18:05:12 +0100 Received: (qmail 23806 invoked by uid 1000); 9 Dec 2012 16:58:47 -0000 Date: Sun, 9 Dec 2012 16:58:47 +0000 Message-ID: <20121209165847.GB23669@acm.acm> References: <87txs5fbfo.fsf@gnu.org> <20121202181623.GB12129@acm.acm> <20121205201047.GA3656@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Dec 07, 2012 at 05:34:32AM +0100, John Smith wrote: > Damn you. > I *told* you that I didn't have the time & skills to look into this further > and you being so-nice-and-all guilt forced me into doing it :) > ok, so a few take-aways from giving advices to an emacs noob: > -on ubuntu the distribution only packages compiled lisp files so one needs > to add a special package to get the sources > -*In either case you can find it for sure with C-h f c-mode , and > click/type CR on the file name. Then do C-x C-v to see where it is.* > I could switch to the C-mode but never understood what "*click/type CR on > the file name"* was supposed to mean. Anyways I found the file. > -the patch didn't work since the lines you removed changed a bit between > 23.4 and HEAD, but I worked around it. > -like all good things there are dependencies: cc-defs.el for one and > friends, I had to fetch them Sorry, I'd forgotten about the dependencies. > -mmh, it doesn't byte compile. actually, even vanilla unpatched file > doesn't byte-compile: > In c-declare-lang-variables: > cc-engine.el:162:28:Warning: reference to free variable > `c-lang-variable-inits' > cc-engine.el:163:1:Error: Symbol's value as variable is void: > c-lang-variable-inits > I tried commenting out that line but no such luck. > I guess this is a trivial problem and I need to build something else but > mmh what? I'm stuck. > Years of devs in heaps of languages and yet I'm so helpless with this one. c-lang-variable-inits is needed at compile time, and is in a different file. It would probably be easiest at this stage just to compile the entire CC Mode. To do this, get all the files cc-*.el (there are 17) gunzipped, and give this at the command line (not within Emacs): $ emacs -Q -batch -f batch-byte-compile cc-*.el > Cheers and thanks for the trip. :-) > John -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Aug 22 01:03:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters ) Resent-From: John Smith Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 15 Dec 2012 18:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13046 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 13046@debbugs.gnu.org Received: via spool by 13046-submit@debbugs.gnu.org id=B13046.135559458011186 (code B ref 13046); Sat, 15 Dec 2012 18:03:01 +0000 Received: (at 13046) by debbugs.gnu.org; 15 Dec 2012 18:03:00 +0000 Received: from localhost ([127.0.0.1]:44338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tjw4h-0002uM-Uy for submit@debbugs.gnu.org; Sat, 15 Dec 2012 13:03:00 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:45798) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tjw4e-0002uC-Rt for 13046@debbugs.gnu.org; Sat, 15 Dec 2012 13:02:58 -0500 Received: by mail-ee0-f44.google.com with SMTP id b47so2766145eek.3 for <13046@debbugs.gnu.org>; Sat, 15 Dec 2012 10:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:x-google-sender-delegation:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=b9MK6rTMmCQjd/ll9t3mz7yYAWqwACvlPdIOy5ncegY=; b=dIwv9F9cFm2/n79ONoMeV4NIPOO4UbrwmA0lFPrZSH3c5QBVfpql8MtoY6nHMI1vRq 8vSj1VUmOO0Pk9IKZWjaXZdA0kH4XzNQcJprqpaP4OU/saELarHzxXFMZMG+VQc20JrK 2hzZ0stRf0HVuwKrqpBKutEixWkrKJlqgRKa3dOfp+ce3C5EmcNW0K6Uce5LRTXrlUD2 ySk+oUCWXiVpoJZBTyo4Oy1yspYpPe+p90KwDx+oi4frI6uu+D4Re74VmZIoav1FnmYN w/M8EsJRzEQFRdEQBgvpwyZxOg0PVQVryuInfxUTivW61J+7xJDXNGx9s31sGDIt5GaC Vlgg== MIME-Version: 1.0 Received: by 10.14.203.2 with SMTP id e2mr25239900eeo.20.1355594511512; Sat, 15 Dec 2012 10:01:51 -0800 (PST) X-Google-Sender-Delegation: fdemesmay@gmail.com Received: by 10.223.144.81 with HTTP; Sat, 15 Dec 2012 10:01:51 -0800 (PST) In-Reply-To: <20121209165847.GB23669@acm.acm> References: <87txs5fbfo.fsf@gnu.org> <20121202181623.GB12129@acm.acm> <20121205201047.GA3656@acm.acm> <20121209165847.GB23669@acm.acm> Date: Sat, 15 Dec 2012 19:01:51 +0100 X-Google-Sender-Auth: aRWUTWUZi57mXPnkjb5oV4ZkNpg Message-ID: From: John Smith Content-Type: multipart/alternative; boundary=047d7b33db1251743e04d0e7f165 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --047d7b33db1251743e04d0e7f165 Content-Type: text/plain; charset=ISO-8859-1 Hello, I confirm that the patch indeed works for my work-file (which is a tad more complicated than my contrived example) Thanks, Fred On Sun, Dec 9, 2012 at 5:58 PM, Alan Mackenzie wrote: > On Fri, Dec 07, 2012 at 05:34:32AM +0100, John Smith wrote: > > Damn you. > > I *told* you that I didn't have the time & skills to look into this > further > > and you being so-nice-and-all guilt forced me into doing it :) > > > ok, so a few take-aways from giving advices to an emacs noob: > > > -on ubuntu the distribution only packages compiled lisp files so one > needs > > to add a special package to get the sources > > > -*In either case you can find it for sure with C-h f c-mode , and > > click/type CR on the file name. Then do C-x C-v to see where it is.* > > I could switch to the C-mode but never understood what "*click/type CR on > > the file name"* was supposed to mean. Anyways I found the file. > > > -the patch didn't work since the lines you removed changed a bit between > > 23.4 and HEAD, but I worked around it. > > > -like all good things there are dependencies: cc-defs.el for one and > > friends, I had to fetch them > > Sorry, I'd forgotten about the dependencies. > > > -mmh, it doesn't byte compile. actually, even vanilla unpatched file > > doesn't byte-compile: > > In c-declare-lang-variables: > > cc-engine.el:162:28:Warning: reference to free variable > > `c-lang-variable-inits' > > cc-engine.el:163:1:Error: Symbol's value as variable is void: > > c-lang-variable-inits > > > I tried commenting out that line but no such luck. > > I guess this is a trivial problem and I need to build something else but > > mmh what? I'm stuck. > > Years of devs in heaps of languages and yet I'm so helpless with this > one. > > c-lang-variable-inits is needed at compile time, and is in a different > file. It would probably be easiest at this stage just to compile the > entire CC Mode. To do this, get all the files cc-*.el (there are 17) > gunzipped, and give this at the command line (not within Emacs): > > $ emacs -Q -batch -f batch-byte-compile cc-*.el > > > Cheers and thanks for the trip. > > :-) > > > John > > -- > Alan Mackenzie (Nuremberg, Germany). > --047d7b33db1251743e04d0e7f165 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I confirm that the patch indeed works for my work-file (which= is a tad more complicated than my contrived example)

Thanks,
Fre= d

On Sun, Dec 9, 2012 at 5:58 PM, Alan Ma= ckenzie <acm@muc.de> wrote:
On Fri, Dec 07, 2012 at 05= :34:32AM +0100, John Smith wrote:
> Damn you.
> I *told* you that I didn't have the time & skills to look into= this further
> and you being so-nice-and-all guilt forced me into doing it :)

> ok, so a few take-aways from giving advices to an emacs noob:

> -on ubuntu the distribution only packages compiled lisp files so one n= eeds
> to add a special package to get the sources

> -*In either case you can find it for sure with C-h f c-mode <= ret>, and
> click/type CR on the file name. =A0Then do C-x C-v to see where it is.= *
> I could switch to the C-mode but never understood what "*click/ty= pe CR on
> the file name"* was supposed to mean. Anyways I found the file.

> -the patch didn't work since the lines you removed changed a bit b= etween
> 23.4 and HEAD, but I worked around it.

> -like all good things there are dependencies: cc-defs.el for one and > friends, I had to fetch them

Sorry, I'd forgotten about the dependencies.

> -mmh, it doesn't byte compile. actually, even vanilla unpatched fi= le
> doesn't byte-compile:
> In c-declare-lang-variables:
> cc-engine.el:162:28:Warning: reference to free variable
> =A0 =A0 `c-lang-variable-inits'
> cc-engine.el:163:1:Error: Symbol's value as variable is void:
> c-lang-variable-inits

> I tried commenting out that line but no such luck.
> I guess this is a trivial problem and I need to build something else b= ut
> mmh what? I'm stuck.
> Years of devs in heaps of languages and yet I'm so helpless with t= his one.

c-lang-variable-inits is needed at compile time, and is in a differen= t
file. =A0It would probably be easiest at this stage just to compile the
entire CC Mode. =A0To do this, get all the files cc-*.el (there are 17)
gunzipped, and give this at the command line (not within Emacs):

$ emacs -Q -batch -f batch-byte-compile cc-*.el

> Cheers and thanks for the trip.

:-)

> John

--
Alan Mackenzie (Nuremberg, Germany).

--047d7b33db1251743e04d0e7f165--