[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards a cleaner build

From: Stefan Monnier
Subject: Re: Towards a cleaner build
Date: Fri, 17 May 2019 14:38:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> pcmpl-gnu.el:162:47:Warning: ‘pcomplete-suffix-list’ is an obsolete variable
>     (as of 24.1).
> But pcomplete-suffix-alist is used several times in the pcomplete source
> code, like in pcomplete.el:
>       (when (and (not (memq (char-before) pcomplete-suffix-list))
>                addsuffix)
>       (insert-and-inherit pcomplete-termination-string)
> And in pcomplete/tar, there's stuff like:
>     (let ((pcomplete-suffix-list (if (boundp 'pcomplete-suffix-list)
>                                      (cons ?= pcomplete-suffix-list))))
> which seems...  odd...  Is this part of a rewrite that was never
> finished?

Hmm... it's used, fundamentally, in pcomplete-insert-entry when the
third arg is non-nil.  There are two such cases, one of which can be
removed with the patch below, and the remaining one is in `pcomplete`
itself, which has been superseded by pcomplete-completions-at-point but
hasn't been declared obsolete (yet?) indeed.


diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index e080074927..8477733354 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -601,10 +601,10 @@ pcomplete-expand
               (> (length pcomplete-current-completions) 0)) ;??
       (delete-char (- pcomplete-last-completion-length))
       (while pcomplete-current-completions
-       (unless (pcomplete-insert-entry
-                "" (car pcomplete-current-completions) t
-                 pcomplete-last-completion-raw)
-         (insert-and-inherit pcomplete-termination-string))
+        (pcomplete-insert-entry
+        "" (car pcomplete-current-completions) nil
+         pcomplete-last-completion-raw)
+       (insert-and-inherit pcomplete-termination-string)
        (setq pcomplete-current-completions
              (cdr pcomplete-current-completions))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]