From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#47488: Treatment of # in js.el Date: Wed, 12 May 2021 15:32:01 +0200 Message-ID: <87sg2sjcxa.fsf@gnus.org> References: <871rahqtu6.fsf@gnus.org> <030f4208-3688-1e23-990e-1becd852c27b@yandex.ru> <87lf8lpijq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31687"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47488@debbugs.gnu.org, Reuben Thomas To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 12 15:33:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgoz8-000873-Nr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 May 2021 15:33:10 +0200 Original-Received: from localhost ([::1]:54808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgoz7-00079d-72 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 May 2021 09:33:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgoz0-00079G-Hz for bug-gnu-emacs@gnu.org; Wed, 12 May 2021 09:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55143) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgoz0-0002XF-A4 for bug-gnu-emacs@gnu.org; Wed, 12 May 2021 09:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgoz0-0005xN-5l for bug-gnu-emacs@gnu.org; Wed, 12 May 2021 09:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 May 2021 13:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47488 X-GNU-PR-Package: emacs Original-Received: via spool by 47488-submit@debbugs.gnu.org id=B47488.162082633222802 (code B ref 47488); Wed, 12 May 2021 13:33:02 +0000 Original-Received: (at 47488) by debbugs.gnu.org; 12 May 2021 13:32:12 +0000 Original-Received: from localhost ([127.0.0.1]:38456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgoyC-0005vi-Ik for submit@debbugs.gnu.org; Wed, 12 May 2021 09:32:12 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:58250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgoyA-0005vQ-GK for 47488@debbugs.gnu.org; Wed, 12 May 2021 09:32:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vL/CKJk1BdQb9KCwFi8XD/SHjVutbuybkqtt23D6cZA=; b=gSeYYqcJgSRzYnCvLBvTq0qjD0 GaJBgVQED3e3NRFtpbjWcSXK/7lIkzb6hg4pWAQN8XyLe98H+f5+UcboTuPyBdocQW2BaT1vCoTpK h4iIzNn4dIosLWwdrNIRl9+MNholyN4owCY/PyeaZMvfeiP56UWbY7Wxk0mIT7jo0398=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgoy1-0004s9-Tj; Wed, 12 May 2021 15:32:04 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUpIyRXQkK2jXT/ //8moIRuAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UFDA0PHwojkjAAAAFjSURBVCjPTZK9bsIwEMfv IjsSmRgCKp7pkDxFItXMobIReGJIJeqnoEN3OlAVJiolFfgpe3bChxffz3f3vw8ZgE5cwf2gh6Kz OTyCv7EH/4iohx3QxfXqRFYaYKSUJph6wBXAgGCtfcrOiwLUuuqE/EM9ZGRRpcSDl8A9sI0XmKRU SBwWay+dKQritvV56Uj5QK0CxBW79Z/y4g6UIR7But01DKB17g7auO1tGCNX22AAA1y4w6lbAqcp rWuuO+DSmDP2EgwH8c+tB2nK9rZQNPoOIPimz3+TcsLyUw/maJe26YKUMPbs6s5TRbPjMn+/wsde ib7vSbTLVPJd+F2jwF3+lMw+3Z6IQDSxa7Ulz1he4gAUF5UzF53HF+tIEBlqPCEBCUasKpkCGwDZ fF9MILM6ePBLjeCZFOivMJi/8EIHSGT7exBFG0DIv9Zl0DjfQa5eG5fi2ToaPa9xOuMl1Wn/AQ24 Y7feUWh8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA1LTEyVDEzOjE1OjMwKzAwOjAwrNX/dwAA ACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNS0xMlQxMzoxNTozMCswMDowMN2IR8sAAAAASUVORK5C YII= X-Now-Playing: Neil Young & Stray Gators's _Archives Vol. II (1): Everybody's Alone (1972 - 1976)_: "Yonder Stands the Sinner" In-Reply-To: (Dmitry Gutov's message of "Tue, 11 May 2021 15:45:13 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206320 Archived-At: Dmitry Gutov writes: >> I think that sounds like a good solution. Grepping around a bit, >> perhaps `cpp-font-lock-keywords-source-directives' in font-lock.el would >> be a good source to use here? > > ... looking at the regexp it also matches #file, #line or #warning. > > Each of these could also be a name of a private attribute, I > think. Still, if those are indeed standard preprocessor directives, > this var looks like a good choice. I've never heard of the #file directive, but: ;; `cpp-font-lock-keywords-source-directives' is calculated from: ;; ;; (regexp-opt ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" ;; "ifndef" "import" "include" "line" "pragma" "undef" "warning")) I spent 30 seconds googling, and I could find no list of directive that includes #file, so... Bug #warning is used, and so is #line, so perhaps it's an old thing? Anyway, I'll amend the change to js.el to check whether it matches this regexp. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no