consider a completion acceptable if it matches all regular expressions
in this list, with @code{case-fold-search} (@pxref{Searching and Case})
bound to the value of @code{completion-ignore-case}.
+
+Do not set this variable to a non-@code{nil} value globally, as that
+is not safe and will probably cause errors in completion commands.
+This variable should be only let-bound to non-@code{nil} values around
+calls to basic completion functions: @code{try-completion},
+@code{test-completion}, and @code{all-completions}.
@end defvar
@defmac lazy-completion-table var fun
(setq ccs (nreverse ccs))
(let* ((prefix (try-completion fixed comps))
(unique (or (and (eq prefix t) (setq prefix fixed))
- (eq t (try-completion prefix comps)))))
+ (and (stringp prefix)
+ (eq t (try-completion prefix comps))))))
(unless (or (eq elem 'prefix)
(equal prefix ""))
(push prefix res))
if it matches all regular expressions in this list, with
`case-fold-search' bound to the value of `completion-ignore-case'.
See Info node `(elisp)Basic Completion', for a description of these
-functions. */);
+functions.
+
+Do not set this variable to a non-nil value globally, as that is not
+safe and will probably cause errors in completion commands. This
+variable should be only let-bound to non-nil values around calls to
+basic completion functions like `try-completion' and `all-completions'. */);
Vcompletion_regexp_list = Qnil;
DEFVAR_BOOL ("minibuffer-allow-text-properties",