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

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

virtual syntax


From: Emanuel Berg
Subject: virtual syntax
Date: Sat, 01 May 2021 06:41:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Can you configure Emacs to on the fly produce and show
a virtual syntax, e.g. one isn't happy with the zsh's

  local var=darn_ugly_syntax

so you instead make Emacs recognize the form

  ^local .*=.*

[ let's test that

  (string-match "^local .*=.*" "local var=darn_ugly_syntax") ; 0

OK ]

so when that happens Emacs shows the file as something it
isn't, in this case it would/should be

  local var = darn_ugly_syntax # not anymore

possible?

Question: why does zsh has that ugly syntax to begin with?
answer, without it, for example x = 1 is ambiguous b/c it can
be either an assignment to the var x OR it can be a function
with the first argument passed the equals sign! See?
Because obviously you can't have ambiguous computing!

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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