From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string Date: Sun, 29 Sep 2013 18:16:29 +0300 Message-ID: <87wqlzpsj6.fsf@yandex.ru> References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380467842 5780 80.91.229.3 (29 Sep 2013 15:17:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Sep 2013 15:17:22 +0000 (UTC) Cc: 15251@debbugs.gnu.org To: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 17:17:21 2013 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 1VQIkI-0000NF-QP for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 17:17:18 +0200 Original-Received: from localhost ([::1]:45064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQIkI-0001YY-BX for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2013 11:17:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQIk9-0001Wl-94 for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:17:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQIk2-0003r8-Vp for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:17:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQIk2-0003qe-SG for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VQIk1-0000lI-LV for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 11:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2013 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15251 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15251-submit@debbugs.gnu.org id=B15251.13804678112907 (code B ref 15251); Sun, 29 Sep 2013 15:17:01 +0000 Original-Received: (at 15251) by debbugs.gnu.org; 29 Sep 2013 15:16:51 +0000 Original-Received: from localhost ([127.0.0.1]:44931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQIjq-0000ko-DR for submit@debbugs.gnu.org; Sun, 29 Sep 2013 11:16:51 -0400 Original-Received: from mail-ea0-f180.google.com ([209.85.215.180]:56546) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQIjk-0000kZ-F6 for 15251@debbugs.gnu.org; Sun, 29 Sep 2013 11:16:45 -0400 Original-Received: by mail-ea0-f180.google.com with SMTP id h10so2171297eaj.11 for <15251@debbugs.gnu.org>; Sun, 29 Sep 2013 08:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=fJCCwmFxOfS7c5RDOmq6XucHYzqK1/dltvJQ+tCHQGc=; b=ZQr4X+VUqynu8cvVo8MzK5FsVq7lo+AJoA1MO/93iqBhZQ+O+yE11xLA0o1mbp8+W+ J0PQ5epRP8jHHGSBSc2MIj40x3eg02clSEXiVs4emLWd2VYRo/uFweM2gku1E8QM4x6d nNFSkU01k9Ul4uwlPuDRbyxHqCXKp8wWTIpxvDUzG8X2jpQrT28kz24qNd3V+dTKBgN7 7ViBoFd36PAzZuCIU5vLStWxWy4ng76OgHyYSkfOKpy85Qeu6/AUW8GAD+lD/eQU7lqL iLar764xBznnP9l1CBSO3G9tdBhQqHH5YaCUtJ06SCrLBOf1isYkHNqwfM6dkbkpaei4 8IuQ== X-Received: by 10.15.98.194 with SMTP id bj42mr29518630eeb.12.1380467803293; Sun, 29 Sep 2013 08:16:43 -0700 (PDT) Original-Received: from axl (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id f49sm40384436eec.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 29 Sep 2013 08:16:42 -0700 (PDT) In-Reply-To: <52482759.1070804@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6h\?\= \=\?utf-8\?Q\?ler\=22's\?\= message of "Sun, 29 Sep 2013 15:12:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:78798 Archived-At: Andreas R=C3=B6hler writes: > Reading the face for detecting basic things like comment is terrible. It sure is. It can be justified for very hot functions, but otherwise `syntax-ppss' does a better job in (more or less) constant time. But that code was written in 2001, a few months before `syntax-ppss' was introduced. > What did the author smoke when writing this ;) Let's ask him. :) Stefan, can we consider `syntax-ppss' fast enough at this point? It will mean re-implementing `comment-search-backward' in terms of it, and removing most of the code in `comment-beginning' definition. AFAICT, both of these functions are not particularly hot, and are called once or twice per user action, at most. `comment-search-backward' can also be made to respect `comment-use-syntax' (and use its current definition if that var's value is nil), but if comments don't have valid entries in the syntax table, font-lock won't recognize them (or will it?), and then the dance with face properties is not useful either.