Subject: bug#64351: probabe bug associated with “completion-regexp-list”

From: Eli Zaretskii <[email-masked]>
Date: Fri, 30 Jun 2023 16:15:43 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Shynur Xie <[email-masked]>,  [email-masked]
> Date: Fri, 30 Jun 2023 08:51:18 -0400
> 
> > Stefan, is the below the right fix?  If it is, do you think it is safe
> > enough for the release branch?
> 
> I haven't had time to investigate if it's really The Right Fix, but it's
> definitely a safe fix, yes.

Thanks.

The alternative would be to treat the nil return value from
try-completion here:

              (let* ((prefix (try-completion fixed comps)) <<<<<<<<<<<<<<<
                     (unique (or (and (eq prefix t) (setq prefix fixed))
                                 (and (stringp prefix)
                                      (eq t (try-completion prefix comps))))))
                (unless (or (eq elem 'prefix)
                            (equal prefix ""))
                  (push prefix res))

as if it were "".  Would that be better?

With the change I proposed, "C-h v -l TAB" deletes "-l" that the user
typed -- is that the expected result when there are no completions?