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: Tue, 28 Sep 2021 19:23:03 +0000


Perhaps we could alleviate this by requiring that shorthands end with a particular character (like '/' or ':'), so that if you see it in a name, it's probably a shorthand.

I think that's a dreadful idea.


How so? The purpose is only to provide an unambiguous textual clue that the symbol will be transformed by the Lisp reader into another symbol. With your examples (in the manual), the author or user of some-nice-string-utils.el would use

;; elisp-shorthands: (("snu" . "some-nice-string-utils-"))

(without the final dash) in its local variables, and the chosen symbol (after thinking a bit more about this, I think "::" which was suggested earlier is better than "@") between snu and the function/variable names throughout the file.

That would also make the task of standard tools like tags or grep easier.


If however, you substritute "requiring shorthands to end" with "visually annotating" shorthands, such as with font-lock, for example


So in the end we would have something that very much resembles nameless.el (a prefix defined in local variables, and using font lock to "visually annotate" that prefix) without its benefits (not breaking any of the standard tools and allowing anyone to choose whether and how they want to use that feature)?



reply via email to

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