help-smalltalk
[Top][All Lists]
Advanced

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

Re: display _ as left arrow (was Re: Help on sending a UDP Packet)


From: Derek Zhou
Subject: Re: display _ as left arrow (was Re: Help on sending a UDP Packet)
Date: Tue, 12 Jan 2021 14:15:56 -0500
User-agent: mu4e 1.2.0; emacs 27.0.91

Stefan Monnier writes:

>
> The downside is that then both `_` and `:=` would be displayed in the
> same way.  And since GNU Smalltalk seems to encourage the use of `:=`
> over `_`, maybe it's better to keep `_` ugly?
>
>
>         Stefan
>
>
> diff --git a/smalltalk-mode.el b/smalltalk-mode.el
> index f662fe1d69..768396b71b 100644
> --- a/smalltalk-mode.el
> +++ b/smalltalk-mode.el
> @@ -534,6 +534,7 @@ of the line where the search succeeded.  Otherwise, 
> return nil."
>  
>  (defvar smalltalk-prettify-symbols-alist
>    '(("^" . ?↑)
> +    ("_" . ?←)
>      (":=" . ?←)))
>  
>  ;;;; ---[ Interactive functions ]---------------------------------------

I tried that, and it is not as nice as one would think. It is not
highlighted as an operator for one.

Smalltalk does not allow a leading underscore for variable names because
of this usage of underscore. In many other languages there is a
convention of using leading underscore to mean something, like to
supress warning of unused variables. Many people including me like the
visual cue it provides.

Derek




reply via email to

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