bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48681: Patch: Make prettify-symbols-mode work with ruby-mode


From: Lars Ingebrigtsen
Subject: bug#48681: Patch: Make prettify-symbols-mode work with ruby-mode
Date: Thu, 27 May 2021 00:10:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

William Denton <wtd@pobox.com> writes:

> Hello,
>
> Attached is a small patch that will make prettify-symbols-mode work in
> ruby-mode.  It just adapts the code that's there for perl-mode, using
> some of the symbols from python-mode.
>
> This is my first time submitting a patch, and I hope it and this
> commit message are close to what's needed:

Thanks; the patch looks good to me.  I see that the equivalent thing in
Perl mode was added as:

+(defconst perl--prettify-symbols-alist
+  '(;;("andalso" . ?∧) ("orelse"  . ?∨) ("as" . ?≡)("not" . ?¬)
+    ;;("div" . ?÷) ("*"   . ?×) ("o"   . ?○)
+    ("->"  . ?→)
+    ("=>"  . ?⇒)
+    ;;("<-"  . ?←) ("<>"  . ?≠) (">="  . ?≥) ("<="  . ?≤) ("..." . ?⋯)
+    ("::" . ?∷)
+    ))

And then later the commented-out ?∧ (etc) stuff was removed, so I'm
wondering:

> +(defconst ruby--prettify-symbols-alist
> +  '(("and" . ?∧)
> +    ("or" . ?∨))
> +  "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.)

(And why are these defconsts, anyway?)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]