From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: rust-ts-mode: appropriately fontify doc strings Date: Fri, 1 Dec 2023 19:41:15 -0800 Message-ID: References: <8734wotac6.fsf@poincare.umons.ac.be> <87il5is524.fsf@poincare.umons.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10919"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 02 04:41:54 2023 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 1r9Gt7-0002dn-2j for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Dec 2023 04:41:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9Gsb-0003Br-LH; Fri, 01 Dec 2023 22:41:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9GsZ-0003BM-4P for emacs-devel@gnu.org; Fri, 01 Dec 2023 22:41:19 -0500 Original-Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9GsX-0001vh-NE for emacs-devel@gnu.org; Fri, 01 Dec 2023 22:41:18 -0500 Original-Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-35d4e557c4bso5387565ab.0 for ; Fri, 01 Dec 2023 19:41:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701488476; x=1702093276; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3X3eCMz6c8wy40IBqNpgZXyx/kKBWxIrZpDXgQ8sDBI=; b=L514MXMk35zYXAXPkZuXIFNEsnSC+vxBD9oKVAaZflMPW/88HTa7Vll/CTsAPiDGMe gA+kss3VN/g9zw7RK1A3fbkEponOm4E+SyJ5TjLr8fudvU3xJIeeZi6gsX5nipMQhAeX TueFf5AOniT7AtGMnJCwyTn2LUJcGwWFJPbsQhkjwlIqXzuxB+uFXnfBHbSSXcwYNaqU 2BTwzrP7WB8YrAgnJONGgJMu0NYEx48P8GPRPZNQazRm/bviHvkcgk00KOd81wYOxHbs BLrTIZh0LqUug/rDO6L8ZcPSYOILlYga2bFLGTjYcxBjPS1nba8UQIyCItCixh3IhoY2 +1JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701488476; x=1702093276; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3X3eCMz6c8wy40IBqNpgZXyx/kKBWxIrZpDXgQ8sDBI=; b=Hgn9GK1PhqxHRzyr0ot2eANKvJwbJHtxyCraxin4UETd12OqeCUzlkk6Mae/PFQSjj wWtrS4dWluhawdlIG0LBtWqchlGBuSbFQbpydsDkSUk5KmPc0hvvvTZjaIwgo4W4SOJI 1GaPnjtFtXeIw0a8jSZO77plUmmZ3lpf/xJmRaxfNZCr6LtD/3hZ7ygVOS2MWUkdnkIS fiXNnOj6YLay0k9yv5fg/boxoSxucZ2l/9NSbrKeuiq0XNiyg4frtJHXkhWGxNk3t1Hz QfHG0SY474WW2KHDeFhbYMRGulr8wo8q92C5sKvkfsm8en8+212mFI7oyXgseABcvBc/ UElA== X-Gm-Message-State: AOJu0YySyjQrnHeux0B3GWUZ5H0DnWKI49wiDAfVVEIWiegfEzOXRF66 rsq5E3kjHU8z9ryjM1hOvWEyP7hveSqPoQ== X-Google-Smtp-Source: AGHT+IEiQyYU7GJBcHNl1IGzAHr4rAXJ9sVkA94oEAUtqXkPbnNcbkvAJrSK6SfqmeybBR6h7HxOsQ== X-Received: by 2002:a92:7410:0:b0:35d:59a2:128f with SMTP id p16-20020a927410000000b0035d59a2128fmr759062ilc.59.1701488476181; Fri, 01 Dec 2023 19:41:16 -0800 (PST) Original-Received: from [192.168.1.7] (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id h9-20020a170902f54900b001cfd049528esm4077621plf.110.2023.12.01.19.41.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Dec 2023 19:41:15 -0800 (PST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::12a; envelope-from=casouri@gmail.com; helo=mail-il1-x12a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313458 Archived-At: On 12/1/23 3:58 PM, Dmitry Gutov wrote: > On 01/12/2023 10:25, Christophe TROESTLER wrote: >> Hi, >> >> On  1 December 2023 at 01:50 +01, Dmitry Gutov  >> wrote: >>> On 30/11/2023 01:21, Christophe TROESTLER wrote: >>>> +         (prefix (buffer-substring-no-properties beg (min (+ beg >>>> 3) end))) >>>> +         (face (if (string-equal "///" prefix) >>> It'll probably be faster overall to use save-excursion and looking-at >>> instead of creating a substring. >> Thanks for your feedback. I did dome tests and the two are comparable >> (on Emacs 29.1) but here is a version that uses your suggestion. > > Thanks! I'd rather err on the side of this one, even if initial > testing shows the approaches are comparable. It's good to have > verified that it's not slower, anyway. > > I've pushed it to emacs-29. In the future, please send patches to the > bug tracker, though (then it's easier to ensure they are not lost). > Thanks to you both! Yuan