From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jake Hartman Newsgroups: gmane.emacs.bugs Subject: bug#7173: 23.2; cc-mode hangs, likely during font lock Date: Thu, 7 Oct 2010 17:37:17 -0600 Message-ID: Reply-To: jakehartman@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1286496727 21092 80.91.229.12 (8 Oct 2010 00:12:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Oct 2010 00:12:07 +0000 (UTC) To: 7173@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 08 02:12:05 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P40Z6-0002bN-Se for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Oct 2010 02:12:03 +0200 Original-Received: from localhost ([127.0.0.1]:46549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P40Z5-0001dB-Oj for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Oct 2010 20:11:59 -0400 Original-Received: from [140.186.70.92] (port=50067 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P40Z0-0001d6-4z for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 20:11:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P40Yy-0001jI-6S for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 20:11:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P40Yy-0001jD-32 for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2010 20:11:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P40Eo-00042j-Ls; Thu, 07 Oct 2010 19:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jake Hartman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2010 23:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7173 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.128649543015533 (code B ref -1); Thu, 07 Oct 2010 23:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2010 23:50:30 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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= Original-Received: by 10.223.113.78 with SMTP id z14mr2001998fap.92.1286494657550; Thu, 07 Oct 2010 16:37:37 -0700 (PDT) Original-Received: by 10.223.118.19 with HTTP; Thu, 7 Oct 2010 16:37:17 -0700 (PDT) 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-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 Resent-Date: Thu, 07 Oct 2010 19:51:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40761 Archived-At: 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) --