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 21:54:55 -0400 (EDT) Message-ID: References: <87y2c19mel.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1741096510-1571635805-1622080495=:47790" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14413"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Cc: 48681@debbugs.gnu.org, Stefan Monnier To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 27 03:56:10 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 1lm5Fq-0003Ts-5k for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 May 2021 03:56:10 +0200 Original-Received: from localhost ([::1]:41294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm5Fo-0004Su-Pr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 May 2021 21:56:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm5Fi-0004Sf-65 for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 21:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm5Fh-0006jN-UD for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 21:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lm5Fh-0000g2-T6 for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 21:56:01 -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 01:56:01 +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.16220805022522 (code B ref 48681); Thu, 27 May 2021 01:56:01 +0000 Original-Received: (at 48681) by debbugs.gnu.org; 27 May 2021 01:55:02 +0000 Original-Received: from localhost ([127.0.0.1]:50366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm5Ek-0000eb-5y for submit@debbugs.gnu.org; Wed, 26 May 2021 21:55:02 -0400 Original-Received: from pb-smtp20.pobox.com ([173.228.157.52]:50507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm5Ei-0000e9-Q8 for 48681@debbugs.gnu.org; Wed, 26 May 2021 21:55:01 -0400 Original-Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 753C813A5A8; Wed, 26 May 2021 21:54:59 -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; s=sasl; bh=dbR3Jr0XICxltio3uLBmO5qEOBkpXNFpaGK5uP 2RStQ=; b=bCJfhMHtqxJQyVj7yOiYvUFqn7aWsLEQgtuCw7b/KMMRQKLbDgScJE yiUr6gbiCpVOBwdR31vkHKxrleEXeMTqZ+r9u5Ri2U7z0imFi9NRZAx6cBwjdqOH MjZBowcU3ncqK8sWSH1U1qjpdXVlPGC8pGU8AJoDN2RC5W6c0o50c= Original-Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 6E1D613A5A7; Wed, 26 May 2021 21:54:59 -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-smtp20.pobox.com (Postfix) with ESMTPSA id 1D19F13A5A6; Wed, 26 May 2021 21:54:57 -0400 (EDT) (envelope-from wtd@pobox.com) Original-Received: by shell3.miskatonic.org (Postfix, from userid 1000) id 91C34120B57; Wed, 26 May 2021 21:54:55 -0400 (EDT) Original-Received: from localhost (localhost [127.0.0.1]) by shell3.miskatonic.org (Postfix) with ESMTP id 8C0A81206DA; Wed, 26 May 2021 21:54:55 -0400 (EDT) X-X-Sender: wtd@shell3.miskatonic.org In-Reply-To: <87y2c19mel.fsf@gnus.org> X-Pobox-Relay-ID: 89CAAE72-BE8E-11EB-B31A-D5C30F5B5667-56320186!pb-smtp20.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:207346 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-1571635805-1622080495=:47790 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 27 May 2021, Lars Ingebrigtsen wrote: > And then later the commented-out ?=E2=88=A7 (etc) stuff was removed, so= I'm > wondering: > >> +(defconst ruby--prettify-symbols-alist >> + '(("and" . ?=E2=88=A7) >> + ("or" . ?=E2=88=A8)) >> + "Value for `prettify-symbols-alist' in `ruby-mode'.") > > Whether this is something that users of symbol prettification would > appreciate or not. Since I use neither prettification or write Ruby, I > have no opinion here. Perhaps Stefan has? (Added to the CCs.) This got me thinking, and I added four more prettifications (see attached= patch)=20 for &&, ||, <=3D and >=3D, which are all very basic. I just hack on Ruby, but I use it a lot. I think that anyone writing Rub= y in=20 Emacs who already has prettify-symbols-mode turned on (and is seeing it w= ork=20 with Python, R, Org, etc.) would, when they see this start working, say, = "Hey,=20 that's nice." Thanks for looking at the patch. Cheers, Bill -- William Denton https://www.miskatonic.org/ Librarian, artist and licensed private investigator. --1741096510-1571635805-1622080495=:47790 Content-Type: text/x-diff; name=prettify-ruby-2.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=prettify-ruby-2.patch ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3J1YnktbW9kZS5lbCBiL2xp c3AvcHJvZ21vZGVzL3J1YnktbW9kZS5lbA0KaW5kZXggMGM1NGExZDI3YS4u YTQ4ODc5YmZlNiAxMDA2NDQNCi0tLSBhL2xpc3AvcHJvZ21vZGVzL3J1Ynkt bW9kZS5lbA0KKysrIGIvbGlzcC9wcm9nbW9kZXMvcnVieS1tb2RlLmVsDQpA QCAtMjQyMSw2ICsyNDIxLDE1IEBAIHJ1YnktZmx5bWFrZS1hdXRvDQogICAg cmVwb3J0LWZuDQogICAgYXJncykpDQogDQorKGRlZmNvbnN0IHJ1YnktLXBy ZXR0aWZ5LXN5bWJvbHMtYWxpc3QNCisgICcoKCJhbmQiIC4gP+KIpykNCisg ICAgKCImJiIgLiA/4oinKQ0KKyAgICAoIm9yIiAuID/iiKgpDQorICAgICgi fHwiIC4gP+KIqCkNCisgICAgKCI8PSIgLiA/4omkKQ0KKyAgICAoIj49IiA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