From unknown Thu Aug 14 21:22:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7173 <7173@debbugs.gnu.org> To: bug#7173 <7173@debbugs.gnu.org> Subject: Status: hang with non-standard defun-prompt-regexp in cc-mode Reply-To: bug#7173 <7173@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:22:28 +0000 retitle 7173 hang with non-standard defun-prompt-regexp in cc-mode reassign 7173 emacs,cc-mode submitter 7173 jakehartman@gmail.com severity 7173 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 19:50:30 2010 Received: (at submit) by debbugs.gnu.org; 7 Oct 2010 23:50:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P40EH-00042U-3H for submit@debbugs.gnu.org; Thu, 07 Oct 2010 19:50:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P401K-0003x0-1O for submit@debbugs.gnu.org; Thu, 07 Oct 2010 19:37:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P404R-0005Cd-VB for submit@debbugs.gnu.org; Thu, 07 Oct 2010 19:40:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:41073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P404R-0005CW-IX for submit@debbugs.gnu.org; Thu, 07 Oct 2010 19:40:19 -0400 Received: from [140.186.70.92] (port=40407 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P404F-0002W6-T1 for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 19:40:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P403H-000557-TG for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 19:39:11 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:60920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P403H-00054v-Ii for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 19:39:07 -0400 Received: by fxm10 with SMTP id 10so343857fxm.0 for ; Thu, 07 Oct 2010 16:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:reply-to:from :date:message-id:subject:to:content-type; bh=gPdifBCAMJewNTd0crzf+0s8eouIw4sSRaaTFEzrhJo=; b=DQ1U1TQpsUL07Tb3TXt5+8dODJKSi9ah4tHuoekYS1v+gqW5BoXo966jCWu7aYOrU2 9iRTZQOvPlCCYCS6AM1Qr2gWS3p0QUavIKoiMc1UjHcSnDswfZGjDkXv+mUXv0C8rO9w L4MqpJw8imlf+BmWEuqlI+0MoNGGgyASyvYg8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; b=CR6sN6KCNJ9oGe+EQ6KT8TSAjW+/3KaPnNyDJq5UbRbrBw6ah0ZNj9ippTKjoZVFnu 9Slc2IXFFUCde23M09L1gaOWL7HGhSl3MGtwLXHlSkzCWhofhUPqbH+PJSMm/JUs1K2m /jhyKbQknCO86j0FrYh6SK6q97C3fcn0wdhlw= Received: by 10.223.113.78 with SMTP id z14mr2001998fap.92.1286494657550; Thu, 07 Oct 2010 16:37:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.118.19 with HTTP; Thu, 7 Oct 2010 16:37:17 -0700 (PDT) From: Jake Hartman Date: Thu, 7 Oct 2010 17:37:17 -0600 Message-ID: Subject: 23.2; cc-mode hangs, likely during font lock To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 07 Oct 2010 19:50:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: jakehartman@gmail.com 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: -5.9 (-----) Emacs 23.2.1 hangs when I try to open a file containing the following C code: cat <test.c int a; void f(int x) {} EOF emacs test.c Note the space preceding the first line. The content of the first line doesn't seem to matter: so long as it starts with a space, emacs hangs. If I remove that space, the file opens successfully. However, if I then enter a space at the start of the first line, emacs will hang after a second or two -- about the amount of time between font lock updates. By hangs I mean stops responding and takes up 100% CPU. Caught in an infinite loop. My stripped-down .emacs file reads as follows: (c-add-style "my-cstyle" '( (defun-prompt-regexp . " "))) (defun apply-my-cstyles () (c-set-style "my-cstyle")) (add-hook 'c-mode-common-hook 'apply-my-cstyles) The problem is trivially solved by setting defun-prompt-regexp to nil. I'm not sure why it was a space in the first place, as I never put a space before the curly brace starting a function. But there might be some weirdos out there who do, so I figured I'd report the bug for their benefit. Cheers, Jake In GNU Emacs 23.2.1 (x86_64-apple-darwin10.4.0, X toolkit) of 2010-10-07 on bakers.aoc-vis.nrao.edu Windowing system distributor `The X.Org Foundation', version 11.0.10402000 configured using `configure '--prefix=/opt/local' '--infodir' '/opt/local/share/info/emacs' '--without-dbus' '--without-gconf' '--with-x-toolkit=lucid' '--without-xaw3d' '--without-carbon' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' 'CC=/usr/bin/gcc-4.2' 'CFLAGS=-pipe -O2 -arch x86_64' 'LDFLAGS=-L/opt/local/lib -arch x86_64' 'CPPFLAGS=-I/opt/local/include'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t - e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. call-interactively: End of buffer Quit Saving file /Users/jhartman/.emacs... Wrote /Users/jhartman/.emacs Non-character input-event Saving file /Users/jhartman/.emacs... Wrote /Users/jhartman/.emacs Load-path shadows: None found. Features: (shadow sort mail-extr message idna ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug multi-isearch cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process font-render-setting x-toolkit x multi-tty emacs) -- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 03 16:45:19 2011 Received: (at control) by debbugs.gnu.org; 3 Oct 2011 20:45:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RApO0-0004ky-T2 for submit@debbugs.gnu.org; Mon, 03 Oct 2011 16:45:19 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RApNu-0004iL-A8 for control@debbugs.gnu.org; Mon, 03 Oct 2011 16:45:11 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RApMX-0006tG-1y for control@debbugs.gnu.org; Mon, 03 Oct 2011 16:43:45 -0400 Date: Mon, 03 Oct 2011 16:43:45 -0400 Message-Id: Subject: control message for bug 7173 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -6.4 (------) retitle 7173 hang with non-standard defun-prompt-regexp in cc-mode From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 03 16:45:21 2011 Received: (at 7173-done) by debbugs.gnu.org; 3 Oct 2011 20:45:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RApO4-0004lf-Ss for submit@debbugs.gnu.org; Mon, 03 Oct 2011 16:45:21 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RApO0-0004kn-9t for 7173-done@debbugs.gnu.org; Mon, 03 Oct 2011 16:45:18 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RApMc-0006tt-Tq; Mon, 03 Oct 2011 16:43:50 -0400 From: Glenn Morris To: 7173-done@debbugs.gnu.org Subject: Re: bug#7173: 23.2; cc-mode hangs, likely during font lock References: X-Spook: Vickie Weaver MIT-LL security NSA gamma argus Majic X-Ran: -+7HT;7s:Uq&1}27cUfPX_>>.!,FH|yxVWKYsrmj'{pNgs`?;U~jI&o4[)Se#|Gz5I`(rA X-Hue: blue X-Attribution: GM Date: Mon, 03 Oct 2011 16:43:50 -0400 In-Reply-To: (Jake Hartman's message of "Thu, 7 Oct 2010 17:37:17 -0600") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7173-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -6.4 (------) Version: 24.1 I can reproduce this in 23.3, but not in the current trunk, so it seems to have been fixed. From unknown Thu Aug 14 21:22:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Nov 2011 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator