From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build Date: Fri, 17 May 2019 14:38:05 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="99571"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 17 20:41:32 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRhnO-000Phv-Hb for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 20:41:30 +0200 Original-Received: from localhost ([127.0.0.1]:52402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRhnN-0001Uu-Fh for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 14:41:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRhkG-0008IH-Sy for emacs-devel@gnu.org; Fri, 17 May 2019 14:38:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRhkG-0003cL-0O for emacs-devel@gnu.org; Fri, 17 May 2019 14:38:16 -0400 Original-Received: from [195.159.176.226] (port=37652 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRhkF-0003bO-Ph for emacs-devel@gnu.org; Fri, 17 May 2019 14:38:15 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hRhkC-000M3Y-OJ for emacs-devel@gnu.org; Fri, 17 May 2019 20:38:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:BYVayPcKIMLmEVSjoSX9am8su9k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236682 Archived-At: > 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. Hmm... Stefan 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))))))