unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: xh yang <linux.xhyang@gmail.com>
Cc: 33784@debbugs.gnu.org
Subject: bug#33784: 27.0.50; some case c-backward-token-2 takes cpu more and emacs hang
Date: 18 Dec 2018 17:47:16 -0000	[thread overview]
Message-ID: <20181218174716.96822.qmail__42683.1734752797$1545155191$gmane$org@mail.muc.de> (raw)
In-Reply-To: <mailman.5878.1545108246.1284.bug-gnu-emacs@gnu.org>

Hello, xh.

In article <mailman.5878.1545108246.1284.bug-gnu-emacs@gnu.org> you wrote:
> [-- text/plain, encoding 7bit, charset: UTF-8, 117 lines --]

> follow case:

> (let ((str "#define SLOGE(...)\n
> ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_ERROR, LOG_TAG,\n
> __VA_ARGS__))"))
> (with-temp-buffer
> (delay-mode-hooks (funcall 'c++-mode))
> (insert str)
> (font-lock-ensure)
> (buffer-string)
> )
> )

> execute up code, emacs will hang

Yes.  The problem here is the (font-lock-ensure).  This is being called
even though font-lock-mode is disabled.  I think there should be a check
for this in font-lock-ensure, but there isn't.

So, yes, we have a bug here.  Thanks for taking the trouble to report
it.

Incidentally, the temporary buffer created by with-temp-buffer never has
font-lock-mode enabled, and font-lock-mode is spiked so that it cannot
be enabled in such a buffer.  I don't know why.  Attempting to enable it
fails silently, which is probably another bug.

Incidentally[2], the delay-mode-hooks in your recipe has nothing to do
with the problem.

> In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
> of 2018-12-18 built on xhyang-ThinkPad-T470p
> Repository revision: 1691a51094d35ac4b2c311fa407c6b77eea7a105
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
> System Description: Ubuntu 16.04.3 LTS

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).






  parent reply	other threads:[~2018-12-18 17:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18  4:09 bug#33784: 27.0.50; some case c-backward-token-2 takes cpu more and emacs hang xh yang
     [not found] ` <mailman.5878.1545108246.1284.bug-gnu-emacs@gnu.org>
2018-12-18 17:47   ` Alan Mackenzie [this message]
     [not found] ` <20181218174716.96822.qmail@mail.muc.de>
2018-12-18 18:51   ` Eli Zaretskii
2018-12-18 18:55     ` Alan Mackenzie
     [not found]     ` <20181218185505.GC8949@ACM>
2018-12-18 19:23       ` Eli Zaretskii
2018-12-18 21:05         ` Alan Mackenzie
2018-12-18 22:05           ` Glenn Morris
2018-12-19 19:20             ` Alan Mackenzie
2018-12-19 15:22           ` Eli Zaretskii
2018-12-20  7:18 ` bug#33784: xh yang
2018-12-20 12:53   ` bug#33784: Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20181218174716.96822.qmail__42683.1734752797$1545155191$gmane$org@mail.muc.de' \
    --to=acm@muc.de \
    --cc=33784@debbugs.gnu.org \
    --cc=linux.xhyang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).