From unknown Fri Jun 20 07:26:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48180 <48180@debbugs.gnu.org> To: bug#48180 <48180@debbugs.gnu.org> Subject: Status: ruby-mode.el: fix font lock for puts and printf Reply-To: bug#48180 <48180@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:26:35 +0000 retitle 48180 ruby-mode.el: fix font lock for puts and printf reassign 48180 emacs submitter 48180 Steve Purcell severity 48180 normal tag 48180 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 21:01:49 2021 Received: (at submit) by debbugs.gnu.org; 3 May 2021 01:01:49 +0000 Received: from localhost ([127.0.0.1]:45800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldMy5-0005Dx-47 for submit@debbugs.gnu.org; Sun, 02 May 2021 21:01:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:42138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldMy1-0005Dq-Ni for submit@debbugs.gnu.org; Sun, 02 May 2021 21:01:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldMy1-0006DD-52 for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 21:01:45 -0400 Received: from mail.purcellpeople.com ([85.214.32.38]:34002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldMxz-00043e-4O for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 21:01:44 -0400 Received: from wuji.local (122-57-13-60-adsl.sparkbb.co.nz [122.57.13.60]) by mail.purcellpeople.com (Postfix) with ESMTPSA id C007560BFD for ; Mon, 3 May 2021 03:01:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=sanityinc.com; s=default; t=1620003697; bh=d89g4g0MD+AXpyfG+rcANTvc1s0u/xYffSy7Bz75dgg=; h=From:To:Subject:Date:From; b=disrS1qLxMR9ShjWSKz9hc6IM9/nUXs1FG9I8FOF8F3xr8eeYa2sfCu9uPIPt0lMA fw+DiQUk5FK2lPi1xsSSHnUAglam5WOJ/ykSqXqoWhcLiWUccb1yFI0dfo6sIbs45s ePs4dz0jy1hRlYMDc0omFADYq98O6cWrT6LYv4PA= From: Steve Purcell To: bug-gnu-emacs@gnu.org Subject: ruby-mode.el: fix font lock for puts and printf Date: Mon, 03 May 2021 13:01:17 +1200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=85.214.32.38; envelope-from=steve@sanityinc.com; helo=mail.purcellpeople.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Both these methods can be called without arguments, so the font locking of "bare" calls to either is incorrect. The fix is to font-lock them as for other kernel methods which accepts zero or more arguments. In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.4.0, NS appkit-2022.44 Version 10.16 (Build 20E232)) Repository revision: 30d974bf5c02a1367291fbb6fa17a182bb7974b7 Repository branch: master Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.3 Configured using: 'configure --prefix=/nix/store/kvhx6vn5wvif4s9aiwp75v8pxplh19i2-emacs-gcc-20210502.0 --disable-build-details --with-modules --with-ns --disable-ns-self-contained --with-native-compilation CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-lisp-progmodes-ruby-mode.el-puts-and-printf-do-not-r.patch >From 6041b603c0a4cadbd1eaa92a2d9c0162bedbd939 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Mon, 3 May 2021 12:54:53 +1200 Subject: [PATCH] lisp/progmodes/ruby-mode.el: puts and printf do not require args Both these methods can be called without arguments, so the font locking of "bare" calls to either is incorrect. The fix is to font-lock them as for other kernel methods which accepts zero or more arguments. --- lisp/progmodes/ruby-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 35772827ce2..0c54a1d27a6 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2127,11 +2127,9 @@ ruby-font-lock-keywords "loop" "open" "p" - "print" "printf" "proc" "putc" - "puts" "require" "require_relative" "spawn" @@ -2180,9 +2178,11 @@ ruby-font-lock-keywords "fork" "global_variables" "local_variables" + "print" "private" "protected" "public" + "puts" "raise" "rand" "readline" -- 2.31.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 03:42:07 2021 Received: (at 48180) by debbugs.gnu.org; 3 May 2021 07:42:07 +0000 Received: from localhost ([127.0.0.1]:46087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldTDS-0000Ve-RV for submit@debbugs.gnu.org; Mon, 03 May 2021 03:42:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldTDR-0000VG-Ad for 48180@debbugs.gnu.org; Mon, 03 May 2021 03:42:05 -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=OuZYYB0B5eJlx0qyxm1Q6xbl744NHgiEw62pHHtRPfA=; b=pQEO1Fe60kqRIGG5gmR8/4eXty YlSxcNEj8LGTKRYLIwj9EkxE0anNtaPChdWQplaYWGYqua/zwNq1H5T3e2Ji5uo1oHeir0foB3104 UEP6BGjhPQ6BzLGJyUAQsvQON+R0WcMzsrEfTnp4xi4ZZy+O0/6CY5NkNuY9ZWZeCxj0=; 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 1ldTDJ-0001lw-2A; Mon, 03 May 2021 09:41:59 +0200 From: Lars Ingebrigtsen To: Steve Purcell Subject: Re: bug#48180: ruby-mode.el: fix font lock for puts and printf References: X-Now-Playing: Tied + Tickled Trio's _Constant RMX_: "Constant (von Hometrainer)" Date: Mon, 03 May 2021 09:41:56 +0200 In-Reply-To: (Steve Purcell's message of "Mon, 03 May 2021 13:01:17 +1200") Message-ID: <875z00fem3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Steve Purcell writes: > Both these methods can be called without arguments, so the font > locking of "bare" calls to either is incorrect. The fix is to > font-lock them as for other kernel methods which accepts zero or mor [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48180 Cc: 48180@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Steve Purcell writes: > Both these methods can be called without arguments, so the font > locking of "bare" calls to either is incorrect. The fix is to > font-lock them as for other kernel methods which accepts zero or more > arguments. Thanks; applied to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 03:42:13 2021 Received: (at control) by debbugs.gnu.org; 3 May 2021 07:42:13 +0000 Received: from localhost ([127.0.0.1]:46090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldTDZ-0000Vs-1R for submit@debbugs.gnu.org; Mon, 03 May 2021 03:42:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldTDX-0000VY-0F for control@debbugs.gnu.org; Mon, 03 May 2021 03:42:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PhtyEV9PnUSi04y/qbnrrSLe+0PC9gWlWEHvqQWhKAc=; b=hsLQsuytgu6PjHx+DwVYwsk6LO uZc2rK+rkoIuIShp3weZLgFgz1Cmbu5XkmyCD0TaFy0rscCC8kE3R+5xtezRjTo4eAuFZtj/lnezP xPsjNg/EGRB0DyOAeF6uLJUvCz+5ZFR2VV2DSwbaPmvhh7bTbva0Uw8sKFLfhk5+vKJA=; 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 1ldTDP-0001mA-GD for control@debbugs.gnu.org; Mon, 03 May 2021 09:42:05 +0200 Date: Mon, 03 May 2021 09:42:03 +0200 Message-Id: <874kfkfelw.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #48180 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 48180 fixed close 48180 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 48180 fixed close 48180 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 06:17:58 2021 Received: (at 48180) by debbugs.gnu.org; 3 May 2021 10:17:58 +0000 Received: from localhost ([127.0.0.1]:46265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldVeI-0006Qv-G0 for submit@debbugs.gnu.org; Mon, 03 May 2021 06:17:58 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:44596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldVeG-0006Qp-Eu for 48180@debbugs.gnu.org; Mon, 03 May 2021 06:17:57 -0400 Received: by mail-wm1-f43.google.com with SMTP id 82-20020a1c01550000b0290142562ff7c9so3207508wmb.3 for <48180@debbugs.gnu.org>; Mon, 03 May 2021 03:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Yrd4FfVKqq7GVxveaaeqzVjjD9xB2ZmqQUS4FlkhJ08=; b=FM57gs39Af7/i3xcWwjDv44N34Ye5Qg7qreiB8PsBC1f0Rf9A+OayWrr0e53sC1qzF hYjdwSMJ6TKYp4uWlD8iaWCp+nhIgt1R3/1PPp7mWCPbn0Ua2QJ8s/J0wGCWzR1cNFZa Y9uCp4DsgCEGPJBfHtp+0cRhdBFiEpclmPvcdBJpYZ/3pQiih5iJBPk9zqvnrYWJaaFD mN7Fyu8qboEQAQ2zzNA5v67mdOPMGcSKvd7rMyH4axL+DBkyDSNqtTr/Zn6plYLPaHcL YsfudYw5VWOxBAp/y83JPMhrdbo02gU2NkN/qvJbASn1cnFfI0MlAXfl1Jg89qFK/Zio KcBg== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Yrd4FfVKqq7GVxveaaeqzVjjD9xB2ZmqQUS4FlkhJ08=; b=raXjHXmAVCtcJxxRSMCr+CMvERhdP09Ds8s1VHtKdcukOStVdDFQfRmv46XreW9n24 T6Qr3acKW1EDpvGpz5+nVhWKYAkjbhYtO0e+N3SnZflD7LyA8X+3MplwpArLyF1ST7H0 tLFpdZGt20J5HMLB8SLGAjlafnHz27IEJEPTz7z5Xmc/zWUliiSdQFqckBTM+xOkNiF4 pS5nZkOf8uY8ybL65ngtVn47eYkcByzLVH1lFp0xspE6prjw2T/BGfOnpiQllXogkTve lh6UboZi+ZiZ1psbmYR7lH+blcKrlQzvOLzeBqLn6v9vOR5CpdfyoEWOqXynwSHNpO3H 0VxQ== X-Gm-Message-State: AOAM530ycvKQlU4gV75EWf0FlXpg7DduVpfdsguYc+8OLAh4YfObyBim jdHCNO/HubU4AH+BQ54fQa1TRywZM6A= X-Google-Smtp-Source: ABdhPJyhkSyOOuExeeabsRD/vcZm8eOEsj4cnltJU2Kex7C/FT3KvAmI12NWft4SyKyVwSO2KSR80g== X-Received: by 2002:a05:600c:4303:: with SMTP id p3mr20924297wme.166.1620037070599; Mon, 03 May 2021 03:17:50 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v20sm11212104wmj.15.2021.05.03.03.17.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 May 2021 03:17:49 -0700 (PDT) Subject: Re: bug#48180: ruby-mode.el: fix font lock for puts and printf To: Steve Purcell , 48180@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: Date: Mon, 3 May 2021 13:17:48 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 48180 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Hi Steve, On 03.05.2021 04:01, Steve Purcell wrote: > Both these methods can be called without arguments, so the font > locking of "bare" calls to either is incorrect. The fix is to > font-lock them as for other kernel methods which accepts zero or more > arguments. Is that important? Like, is anybody likely to call either without args? font-lock is not a precise facility (that anything depends on), so we can afford to be wrong in 0.01% cases. If we institute this principle, I suppose we'll need to do this for all functions that can work without args? In my testing, that's also: p, open, loop, warn, print Also note that your title says 'printf', but the patch said 'print'. From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 13:04:43 2021 Received: (at 48180) by debbugs.gnu.org; 3 May 2021 17:04:43 +0000 Received: from localhost ([127.0.0.1]:47560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldbzv-0000m9-G2 for submit@debbugs.gnu.org; Mon, 03 May 2021 13:04:43 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:37475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldbzu-0000lj-26 for 48180@debbugs.gnu.org; Mon, 03 May 2021 13:04:42 -0400 X-Originating-IP: 91.129.102.166 Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 16BDC40005; Mon, 3 May 2021 17:04:34 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#48180: ruby-mode.el: fix font lock for puts and printf Organization: LINKOV.NET References: Date: Mon, 03 May 2021 19:42:44 +0300 In-Reply-To: (Dmitry Gutov's message of "Mon, 3 May 2021 13:17:48 +0300") Message-ID: <875yzz24bf.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48180 Cc: Steve Purcell , 48180@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Both these methods can be called without arguments, so the font >> locking of "bare" calls to either is incorrect. The fix is to >> font-lock them as for other kernel methods which accepts zero or more >> arguments. > > Is that important? Like, is anybody likely to call either without args? > font-lock is not a precise facility (that anything depends on), so we can > afford to be wrong in 0.01% cases. It always bothered me that in ruby-mode highlighting was broken for printing without arguments, but I had no time to investigate. Now finally this is fixed. Maybe some other printing like "p" could be fixed as well, but the already fixed "puts" and "print" is an improvement. From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 16:32:07 2021 Received: (at 48180) by debbugs.gnu.org; 3 May 2021 20:32:07 +0000 Received: from localhost ([127.0.0.1]:48554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldfEd-0004z9-Lk for submit@debbugs.gnu.org; Mon, 03 May 2021 16:32:07 -0400 Received: from mail.purcellpeople.com ([85.214.32.38]:44268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldfEc-0004yk-3L for 48180@debbugs.gnu.org; Mon, 03 May 2021 16:32:06 -0400 Received: from smtpclient.apple (122-57-10-138-adsl.sparkbb.co.nz [122.57.10.138]) by mail.purcellpeople.com (Postfix) with ESMTPSA id 52EEE6726E; Mon, 3 May 2021 22:31:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=sanityinc.com; s=default; t=1620073919; bh=WkCqtiRrqxc+0x+hU1JQQAjqbkSUKJZ2yKEAp17Vd/Q=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=V3TCWNY3rIZRGCgKwcYv7QRparqCX63Yh0hV/pdpEaXvd4UpgLUQPaSSK0AVDI2Xl BbZJ3i3KT6sCx4sSAUxMXnsKi3BEoT7rUMFFEBiVLLh/LRth5QdwhUdRK3wveDeZ2G Z/n1XNguNRViieZVOTmUqeBLy09sf2L1p4jtvuMQ= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Re: bug#48180: ruby-mode.el: fix font lock for puts and printf From: Steve Purcell In-Reply-To: <875yzz24bf.fsf@mail.linkov.net> Date: Tue, 4 May 2021 08:31:53 +1200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <875yzz24bf.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3654.80.0.2.43) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48180 Cc: 48180@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 4 May 2021, at 04:42, Juri Linkov wrote: >=20 >> Is that important? Like, is anybody likely to call either without = args? >> font-lock is not a precise facility (that anything depends on), so we = can >> afford to be wrong in 0.01% cases. >=20 > It always bothered me that in ruby-mode highlighting was broken for = printing > without arguments, but I had no time to investigate. Now finally this = is fixed. > Maybe some other printing like "p" could be fixed as well, but the > already fixed "puts" and "print" is an improvement. Yes, it=E2=80=99s actually pretty common to just use =E2=80=9Cputs=E2=80=9D= without args to print an empty line. From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 16:42:28 2021 Received: (at 48180) by debbugs.gnu.org; 3 May 2021 20:42:28 +0000 Received: from localhost ([127.0.0.1]:48599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldfOd-00056M-Qw for submit@debbugs.gnu.org; Mon, 03 May 2021 16:42:27 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:36615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldfOc-00056D-H8 for 48180@debbugs.gnu.org; Mon, 03 May 2021 16:42:26 -0400 Received: by mail-wm1-f41.google.com with SMTP id l24-20020a7bc4580000b029014ac3b80020so54975wmi.1 for <48180@debbugs.gnu.org>; Mon, 03 May 2021 13:42:26 -0700 (PDT) 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=JQ7lD4KWQUci6EMpWMdSiz6cA1IaxRvrpKz8bXTJB1s=; b=ejiegQ/V6YA4CPVHqIo7W4QOzsPgUvnKmyXy0SD0e/jwDqdVszZrwi4tSGLJCDGNzq A1rpRdf+DUYD4J/QWNo3pDVY3C1hwKKlC6Ugseahe4/xV/jsUHF+UuUxVa2kn8WzcVbL lWvVot1LLUvR95RpFNptdXAp07LNk+BAY4MKsMxtzK7JZCHu7OOC1WEm5WvZlty20i+7 XZllt9p3CCYz17F5GEpU5q43o/FEvPz0XgNmhiAi86m0XGqNavLy41p8ELin7Au+EPmp DOBAy8m/AVUxDDIL+PZ9PFFOPIIkKqt8TwutOe0eCNPl69b4X0SYd4lc8nZDS+bXGxl0 P83A== 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=JQ7lD4KWQUci6EMpWMdSiz6cA1IaxRvrpKz8bXTJB1s=; b=aFbtZd389+WAWsoqwsFq0TDBVnNZ/JIeY86wtFAmhAoWKn0AXiGvz58WiFeZ+tTUD9 W1AbY7Bm9pAvUPbTtQs686zOfFtjMu/x857UCctrYZqI4dvp3PNv3C7GYS2ipjbFYa2l i4KpeAQdGOqLa/cHbYJFleX1fegW67dsiRyIFz1iIwUaN2tH7oGp1WGdhCL2sMt1hZw2 ynO5FIWBn8ois6LOGmsww/qLxieamSIVjKg5UT3r8K/0n57cF1YJ8k7bJU/JeOJoUywQ fsBvsGlVEIx25RsJsuXZ/KmUagath2IleMPFVV65ta3dUKg3hOYfx37rvCxBtuChs184 eWdQ== X-Gm-Message-State: AOAM5315UVBwnFqvQ0cJwJ8bh6sOHsdEwLsidXYX65fbEquyJayKsxm/ KD6SLEaQNMmM/OkqBYmeFzKYMVjgrGU= X-Google-Smtp-Source: ABdhPJxVod8xxf6KAkvRsa4bbC8YvwHEdGM0wJ9OLKuyj45h3CD1Svs4Z68NbwFJWkT8LYyKvWp3Ww== X-Received: by 2002:a7b:c017:: with SMTP id c23mr383782wmb.175.1620074540597; Mon, 03 May 2021 13:42:20 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id f8sm702556wmc.8.2021.05.03.13.42.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 May 2021 13:42:19 -0700 (PDT) Subject: Re: bug#48180: ruby-mode.el: fix font lock for puts and printf To: Steve Purcell , Juri Linkov References: <875yzz24bf.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <13c7b876-4913-069f-aeec-c017cb76ce53@yandex.ru> Date: Mon, 3 May 2021 23:42:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 48180 Cc: 48180@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 03.05.2021 23:31, Steve Purcell wrote: >> It always bothered me that in ruby-mode highlighting was broken for printing >> without arguments, but I had no time to investigate. Now finally this is fixed. >> Maybe some other printing like "p" could be fixed as well, but the >> already fixed "puts" and "print" is an improvement. > > Yes, it’s actually pretty common to just use “puts” without args to print an empty line. Very good, then. From unknown Fri Jun 20 07:26:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Jun 2021 11:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator