Didier Verna <verna(a)inf.enst.fr> writes:
> This is problematic. For all I know, there can be valid user
code
> that uses that macro. Adding an argument will make all that code
> fail. I think you should choose a different name, or perhaps a new
> macro (`with-caps-disable-folding-regexp'?)
I know this is problematic, but I envisioned the other
possibilities, and came up with the conclusion that risking a
user-code breakage (this is not the first time it could happen) is
the best choice. Here's why: The macro _currently assumes a regular
expression_.
Hmm. In that case, obsolete that name, and use a totally different
name for the new macro, along with the REGEXP flag.
- either we have a regexp-flag, that's the change I proposed,
That's perfectly fine, as long as you take care not to hose the
users.
We did far worse with the `concat' interface change (which I
totally
agree with).
Not really. `concat' had this warning for ages:
Do not use individual integers as arguments!
The behavior of `concat' in that case will be changed later!
If your program passes an integer as an argument to `concat',
you should change it right away not to do so.
Also, the old code using `concat' fails with a clear error message.
In this case, the old code saying, for instance:
(with-caps-disable-folding STRING
FORM1
FORM2
...)
*No* error will be signaled, but FORM1 will be evaluated and used as
the REGEXP flag. Subtle and evil.
> The argument that the changes are affordable because the
packages
> don't use the macro does not stand because we don't know how much
> user code uses the macros. What we call "packages" is but one
> part of Lisp code written by our users. With your changes,
> otherwise perfectly valid code using documented interface will
> fail in various obscure ways.
See above. I'm not sure how much user code actually know and use
this macro.
Neither am I, and that's the whole point. For all I know, lots of
code might use it. I know I liked it, and used it in my internal
customizations.
What's more, the change is not /that/ complicated to upgrade.
It is very complicated to detect.
I really think keeping the old macro and giving the new one another
name is the easiest path in this case. It's been done countless times
(add-menu -> add-submenu, etc.) and the compatibility effort is in
most cases worth it.
Breaking backward compatibility is acceptable, but breaking it subtly
is not. All IMHO, of course.
> You should write a modification of the
`with-caps-disable-folding'
> macro and use it consistently.
I think I'll write another macro for use in interactive functions
rather. Something like `interactive-with-caps-disable-folding'
Yes, that's what I meant by "modification" of it.
Footnotes: [1] One day, I'd like to see a coherent naming
convention
appear: either `re-foobar', or `foobar-regexp', but only one. With
the number of symbols we're reaching in XEmacs, I find it very
important to be strict on naming conventions. Stricter than we are
now. I have some other pedantic changes in mind, like renaming all
*-hook variables to *-hooks
You mean the other way around: hooks->hook?
--
Hrvoje Niksic <hniksic(a)srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Thou Who might be our Father Who perhaps may be in Heaven...
-- Roger Zelazny