From: Dmitry Gutov <dgutov@yandex.ru>
To: William Denton <wtd@pobox.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 48681@debbugs.gnu.org
Subject: bug#48681: Patch: Make prettify-symbols-mode work with ruby-mode
Date: Thu, 27 May 2021 21:02:05 +0300 [thread overview]
Message-ID: <33f32ea5-7fbb-7823-b475-2ae99354fecb@yandex.ru> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2105262334440.48387@shell3.miskatonic.org>
On 27.05.2021 06:52, William Denton wrote:
> An excellent question, and I think I overstepped things. The
> documentation¹ and answers on Stack Exchange² say "&&" and "||" are
> logical operators (so the logical symbols work) but "and" and "or" have
> lower precedence and are used differently.
Right. And apparently, it's exactly the same situation in Perl.
> It'd be best to just prettify "&&" and "||" with symbols, and anyone who
> wants "and" and "or" could add those by hand. Shall I send a revised
> patch, or do you just want to delete those bits?
Looking at the various prettify-symbols definitions, there is no great
consistency.
Even so, we can see that only python-mode uses the symbols ∧ and ∨.
As someone who graduated with an engineering degree a decade ago, the
"intersection" and "union" symbols look unusual in a programming context
to me. And a lot of software developers don't have a math background at all.
I'd recommend to just use the list from perl-mode:
'(("->" . ?→)
("=>" . ?⇒)
("::" . ?∷))
and also add the ("lambda" . ?λ) mapping to it.
next prev parent reply other threads:[~2021-05-27 18:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 17:26 bug#48681: Patch: Make prettify-symbols-mode work with ruby-mode William Denton
2021-05-26 22:10 ` Lars Ingebrigtsen
2021-05-27 1:54 ` William Denton
2021-05-27 2:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-27 3:52 ` William Denton
2021-05-27 18:02 ` Dmitry Gutov [this message]
2021-05-29 6:10 ` Lars Ingebrigtsen
2021-05-29 11:07 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33f32ea5-7fbb-7823-b475-2ae99354fecb@yandex.ru \
--to=dgutov@yandex.ru \
--cc=48681@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=wtd@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).