diff --git a/collects/scribblings/main/private/search.js b/collects/scribblings/main/private/search.js
index eaad53dd9b..98c24fe91a 100644
--- a/collects/scribblings/main/private/search.js
+++ b/collects/scribblings/main/private/search.js
@@ -114,7 +114,7 @@ function InitializeSearch() {
+' C+Enter/S+C+Enter to scroll through the'
+' results.'
+'
Search terms are all required, use'
- +' “-str” to negate a term.'
+ +' “N:str” to negate a term.'
+'Use “M:str” to match only'
+' identifiers from modules that (partially) match'
+' “str”; “M:” by'
@@ -343,15 +343,11 @@ function UrlToManual(url) {
// "L:schem" (only module names that match `schem')
function CompileTerm(term) {
- var op = false;
- // the first part avoids a single "-" from removing everything
- if (term != "-" && term.search(/^(-|[LMT]:)/) == 0) {
- op = term.substring(0,1);
- term = RegExp.rightContext;
- }
+ var op = ((term.search(/^[LMT]:/) == 0) && term.substring(0,1));
+ if (op) term = term.substring(2);
term = term.toLowerCase();
switch(op) {
- case "-":
+ case "N":
op = CompileTerm(term);
// return C_exact if it's not found, so it doesn't disqualify exact matches
return function(x) { return (op(x) >= C_match) ? C_fail : C_exact; }