From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Interpret #r"..." as a raw string Date: Tue, 2 Mar 2021 16:32:45 +0200 Message-ID: References: <20210227.031857.1351840144740816188.conao3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10597"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: Matt Armstrong , Naoya Yamashita , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 02 15:33:47 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lH65q-0002aT-RW for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 15:33:46 +0100 Original-Received: from localhost ([::1]:46666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH65p-0005Rp-Re for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 09:33:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH651-0004lB-N4 for emacs-devel@gnu.org; Tue, 02 Mar 2021 09:32:55 -0500 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34343) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lH64z-0001gQ-LN for emacs-devel@gnu.org; Tue, 02 Mar 2021 09:32:55 -0500 Original-Received: by mail-wr1-x429.google.com with SMTP id u16so2100539wrt.1 for ; Tue, 02 Mar 2021 06:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GEVn2kmCq2D4oHacnc4voiTyxSY991apyltjGp7sAuQ=; b=PmXNrqQAJ84NOaSMgv1DGu9vnTkDMYFrKI9SpFwSVpkvK4rXaD1EQrCxY/uKVYIo+1 vPdBomY0lg6CAYgnDPTHBqg2+s24MJoBytEAnkpgieuQQq1RBCazKWTJeRBAbATWpzEk Hhk14xcVaLLwRiQYxoB9WMBCOTBIIR+WHqGRqJVGXlJlJ0IweSkt7pOKB1JCV7xfeFXq KzYOd4fKstviNgXDVME7sn0lbdE4sffG0vTFAoWs9S20E/v+ufrr84UHPzOo8klT/zsy lWGMNm/6NLQj1M6E4iPhYDXZYzkeuwXzLppfRv63FmrBBrDEuVExUajb8Cnw/k9c2M3C FK9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GEVn2kmCq2D4oHacnc4voiTyxSY991apyltjGp7sAuQ=; b=dHhX/m7sBBafxL6ZOu+2GeCHnEbYPYDWU8T47Oa83qKW7kkMnoOSXkutlWIdRQG1Wo Fv+NIbT4amMtAZ/5KotbF8sYPhUYeE3OZ1m8/TCBaHhzSf+tp/agZJcdOZpR//YkLsVe zNQ+/gXl+He6gcRz15v76sQGMU9ebVoE0uWt5sgP/0hf4XfIkJN8hxfUDPl+t0YtuSyN TcWLH1cgQvOqyedBW4se23PWPNht6ievwb/E5L6v2D9CvI/2C9oidq/GAIw4ZUFYz/MN +d+B3RRw4FgTCkC0WBZC2E5D1/0p0mF7Aj50KYqFzXI7sPM6X3I1nuNpLWA4g07x39L4 GeMA== X-Gm-Message-State: AOAM5328TEx/SnOlEUU/+JceJqAzFoBJgdmtTy72f3tlFpSZxqiIk4K3 m2YDm6fIToeHCNhXGP0JIRNnLGBtfLM= X-Google-Smtp-Source: ABdhPJz4HGV9cxh4eLGTVBgx6q7C4dP36JicTrS18T9X5iCljgbOhMxgkot2DYB3STG7opZeFmkfGQ== X-Received: by 2002:a5d:4743:: with SMTP id o3mr8836275wrs.108.1614695570557; Tue, 02 Mar 2021 06:32:50 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id w6sm7433312wrl.49.2021.03.02.06.32.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 06:32:49 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=raaahh@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265833 Archived-At: On 02.03.2021 16:14, Alan Mackenzie wrote: >> Both are supported by ruby-mode with syntax-propertize-function without >> too much trouble. > I've just tried this out, looking up some ruby syntax on Wikipedia. > Adapting its example, start out with this in ruby-mode: > > ######################################################################### > a = <<-BLOCK > > This is a double-quoted string > BLCK > BLOCK > b > ######################################################################### > > Now everything down to and including the second BLOCK has string face. > This seems correct. Delete the O from the first BLOCK, so that the > string is now terminated by BLCK. The second BLOCK still has string > face, although it is no longer in the string. Is this a bug? Would be a bug, but I can't exactly reproduce it. I delete the O, then wait 2 seconds (because of jit-lock-antiblink-grace, I guess?), and the second block gets fontified with font-lock-type-face. Set jit-lock-antiblink-grace to nil to make this happen faster. Still dependent on jit-lock-context-time, though.