From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Denton Newsgroups: gmane.emacs.bugs Subject: bug#48681: Patch: Make prettify-symbols-mode work with ruby-mode Date: Wed, 26 May 2021 23:52:32 -0400 (EDT) Message-ID: References: <87y2c19mel.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1741096510-1022674290-1622087282=:48387" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34227"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Cc: Lars Ingebrigtsen , 48681@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 27 05:53:17 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 1lm75A-0008h7-Q1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 May 2021 05:53:16 +0200 Original-Received: from localhost ([::1]:35558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm759-0008Ax-08 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 May 2021 23:53:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm74x-0008AY-EC for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 23:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm74w-0007iL-Eq for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 23:53:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lm74w-0005ZO-ED for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 23:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: William Denton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 May 2021 03:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48681 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48681-submit@debbugs.gnu.org id=B48681.162208756121384 (code B ref 48681); Thu, 27 May 2021 03:53:02 +0000 Original-Received: (at 48681) by debbugs.gnu.org; 27 May 2021 03:52:41 +0000 Original-Received: from localhost ([127.0.0.1]:50408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm74b-0005Yq-E3 for submit@debbugs.gnu.org; Wed, 26 May 2021 23:52:41 -0400 Original-Received: from pb-smtp21.pobox.com ([173.228.157.53]:59905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm74Y-0005Yg-RD for 48681@debbugs.gnu.org; Wed, 26 May 2021 23:52:39 -0400 Original-Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id A4FC5126F5D; Wed, 26 May 2021 23:52:37 -0400 (EDT) (envelope-from wtd@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=date:from :to:cc:subject:in-reply-to:message-id:references:mime-version :content-type:content-id; s=sasl; bh=Wwsj3u8HOr790VERQtfPj5eHz6G FeLhSfcH50WFk/vA=; b=DY13QE0pVsQXtDxb66wmUvlYi4UhFJi1yR/V5bGQOnC DWkulADawsqtF/c2cJB0hBm9rwT4B9A+dZUcC8BNvBgVltm3FdF0H3F6hLkBEBUo GleqKx4JCgDnPxvO6brcYf9X7xs7U35+BIm/Bd2KUeVSLOR2sPVQLoYMeeRFDQws = Original-Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 9DF10126F5C; Wed, 26 May 2021 23:52:37 -0400 (EDT) (envelope-from wtd@pobox.com) Original-Received: from shell3.miskatonic.org (unknown [199.103.62.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 44DC5126F5B; Wed, 26 May 2021 23:52:35 -0400 (EDT) (envelope-from wtd@pobox.com) Original-Received: by shell3.miskatonic.org (Postfix, from userid 1000) id 9294E120B57; Wed, 26 May 2021 23:52:32 -0400 (EDT) Original-Received: from localhost (localhost [127.0.0.1]) by shell3.miskatonic.org (Postfix) with ESMTP id 8D691120753; Wed, 26 May 2021 23:52:32 -0400 (EDT) X-X-Sender: wtd@shell3.miskatonic.org In-Reply-To: Content-ID: X-Pobox-Relay-ID: F8C9334C-BE9E-11EB-B738-FA9E2DDBB1FC-56320186!pb-smtp21.pobox.com 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:207349 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1741096510-1022674290-1622087282=:48387 Content-Type: text/plain; CHARSET=UTF-8; format=flowed Content-ID: Content-Transfer-Encoding: quoted-printable On 26 May 2021, Stefan Monnier wrote: >> +(defconst ruby--prettify-symbols-alist >> + '(("and" . ?=E2=88=A7) >> + ("&&" . ?=E2=88=A7) > > Are `and` and `&&` absolutely 100% completely totally equivalent in Rub= y? > >> + ("or" . ?=E2=88=A8) >> + ("||" . ?=E2=88=A8) > > Same question for `or` and `||`? An excellent question, and I think I overstepped things. The documentati= on=C2=B9 and=20 answers on Stack Exchange=C2=B2 say "&&" and "||" are logical operators (= so the=20 logical symbols work) but "and" and "or" have lower precedence and are us= ed=20 differently. It'd be best to just prettify "&&" and "||" with symbols, and anyone who = wants=20 "and" and "or" could add those by hand. Shall I send a revised patch, or= do you=20 just want to delete those bits? Thanks, Bill =C2=B9 https://ruby-doc.com/core/doc/syntax/precedence_rdoc.html =C2=B2 E.g. https://stackoverflow.com/a/2083118/854346 -- William Denton https://www.miskatonic.org/ Librarian, artist and licensed private investigator. --1741096510-1022674290-1622087282=:48387--