emacs-devel
[Top][All Lists]
Advanced

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

Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorth


From: Gregory Heytings
Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)
Date: Thu, 30 Sep 2021 08:20:24 +0000


Yes, it'll break a lot of tooling.

Can you report any specific problems?


A simple example: suppose you want to check which ELPA package activates tab-bar-mode. That's easy to do with "grep -R tab-bar-mode" in a clone of the ELPA repository. With symbol prefix renaming, a package author might decide to add ("tb-" . "tab-bar-") in the shorthands of the package, and "grep -R tab-bar-mode" will not show anything. Likewise for tag systems, the symbols that are recorded will possibly be different in each package, and a search for tab-bar-mode will not return occurrences of tb-mode.

My argument was: If we want to add something along these lines, it should be more like Common Lisp's package system.

That is far more complex and has deep flaws. The symbol prefix renaming feature is much cleaner.


Indeed, but IMO only if it comes with an unambiguous textual indication that the symbol will be transformed by the Lisp reader into another symbol, for example "::" between the shorthand and the rest of the symbol. Not only will those who read the code immediately see that tb::mode is a shorthand and not a regular Elisp symbol, but it becomes much easier to instruct tools such as grep or tag systems to preprocess el files by first expanding tb::mode into tab-bar-mode.



reply via email to

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