Didier Verna <verna(a)inf.enst.fr> writes:
There are two ways to achieve this: we can modify search_command (I
have a patch ready for this), or we can modify each concerned lisp
function. The point is that I don't know if there are
non-interactive cases that could be fucked up with this new
feature. If not, we'd better patch search_command directly. If yes,
then it's preferable to modify the lisp functions, and check if
we're calling them interactively. Or maybe not, if we use (downcase
...) to ensure we'll match everything ...
Although your suggestion makes sense as a user-interface improvement,
I'm certain that much code depends on case-fold-search doing what it
says it does, no matter what the search string is. For example:
(let ((case-fold-search nil))
(re-search-for "^Content-Length:")
..)
All of these would be broken by your proposed change. Checking
whether the function is called interactively would be likely to fail
when a higher-level function non-interactively calls a lower-level
function to search for a user-specified string.
The only good solution I see is to explicitly request this behaviour
in higher-level Lisp code. Note that the `with-caps-disable-folding'
macro exists for this very purpose.
--
Hrvoje, typing this in Paris.