Here's the other problem: For as many helpful macros as there are, there could be more. For example, sometimes a user may want \es instead of \s. In my current project, I'm facing multiple situations where I want to end a word with -y or -ies depending on whether the number before it is plural, and a \y macro would be just perfect for that.
Now obviously, there's no way every conceivable useful text macro could be added to DM; it'd be pointless. But what if there was a structure in place by which we could define our own? Imagine this:
proc/MACRO_y(var/before,var/after)
if(isnum(before))
return (before==1)?"ies":"y"
if(istype(before,/atom))
var/atom/b=before
return (b.gender=="plural")?"ies":"y"
return
In this scenario, every proc set up with MACRO_n would become a valid text macro. Arguments sent to the proc would include the last bracketed input to go before, and the next one following (including as an argument, like \macro[arg]). So the text string "You own [n] bunn\y." will call the global proc MACRO_y(n,null).
If you don't want to restrict the possible names for procs, another solution is to introduce the macro keyword to the server (it's currently just in the client, but there's no reason it couldn't mean something different to the server) and define the proc as macro/y, or perhaps macro/text/y.
I suspect this wouldn't be too difficult to implement, as basically all this would do would be to expand "You own [n] bunn\y." to "You own [n] bunn[MACRO_y(n,null)]." There are only a couple of gotchas: First, you have to take care that the before and after variables aren't affected by these substitutions, so if you use more than one text macro between a pair of brackets they'll still expand correctly. Second, a macro should not be allowed to be self-recursive; if a second call to MACRO_y pops up on the call stack when one's already there, it should return a blank string. Whether or not you'd want to allow users to override the existing macros is a question best answered by somebody else.
Lummox JR
Yeah. Plurals and verb forms are a pain and extendable macros would be nice. We'll definitely put this excellent suggestion on the List.
--Dan