1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00

Make pcomplete-ignore-case obsolete

* lisp/pcomplete.el (pcomplete-completions-at-point)
(pcomplete-stub, pcomplete--entries, pcomplete-insert-entry):
* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize):
* lisp/eshell/em-cmpl.el (eshell-cmpl-ignore-case):
* lisp/erc/erc-pcomplete.el (pcomplete-erc-setup): Use
`completion-ignore-case' instead (bug#23117).

* lisp/pcomplete.el (pcomplete-ignore-case): Make obsolete.
This commit is contained in:
Lars Ingebrigtsen 2021-02-09 09:20:11 +01:00
parent 9c1e89a32c
commit 5131e3accc
4 changed files with 12 additions and 13 deletions

View file

@ -2056,6 +2056,8 @@ directory instead of the default directory.
* Incompatible Lisp Changes in Emacs 28.1 * Incompatible Lisp Changes in Emacs 28.1
** 'pcomplete-ignore-case' is now an obsolete alias of 'completion-ignore-case'.
** 'completions-annotations' face is not used when the caller puts own face. ** 'completions-annotations' face is not used when the caller puts own face.
This affects the suffix specified by completion 'annotation-function'. This affects the suffix specified by completion 'annotation-function'.

View file

@ -89,7 +89,7 @@ for use on `completion-at-point-function'."
(defun pcomplete-erc-setup () (defun pcomplete-erc-setup ()
"Setup `erc-mode' to use pcomplete." "Setup `erc-mode' to use pcomplete."
(setq-local pcomplete-ignore-case t) (setq-local completion-ignore-case t)
(setq-local pcomplete-use-paring nil) (setq-local pcomplete-use-paring nil)
(setq-local pcomplete-parse-arguments-function (setq-local pcomplete-parse-arguments-function
#'pcomplete-erc-parse-arguments) #'pcomplete-erc-parse-arguments)

View file

@ -150,8 +150,8 @@ to writing a completion function."
:type (get 'pcomplete-dir-ignore 'custom-type)) :type (get 'pcomplete-dir-ignore 'custom-type))
(defcustom eshell-cmpl-ignore-case (eshell-under-windows-p) (defcustom eshell-cmpl-ignore-case (eshell-under-windows-p)
(eshell-cmpl--custom-variable-docstring 'pcomplete-ignore-case) (eshell-cmpl--custom-variable-docstring 'completion-ignore-case)
:type (get 'pcomplete-ignore-case 'custom-type)) :type (get 'completion-ignore-case 'custom-type))
(defcustom eshell-cmpl-autolist nil (defcustom eshell-cmpl-autolist nil
(eshell-cmpl--custom-variable-docstring 'pcomplete-autolist) (eshell-cmpl--custom-variable-docstring 'pcomplete-autolist)
@ -259,7 +259,7 @@ to writing a completion function."
eshell-cmpl-file-ignore) eshell-cmpl-file-ignore)
(setq-local pcomplete-dir-ignore (setq-local pcomplete-dir-ignore
eshell-cmpl-dir-ignore) eshell-cmpl-dir-ignore)
(setq-local pcomplete-ignore-case (setq-local completion-ignore-case
eshell-cmpl-ignore-case) eshell-cmpl-ignore-case)
(setq-local pcomplete-autolist (setq-local pcomplete-autolist
eshell-cmpl-autolist) eshell-cmpl-autolist)

View file

@ -135,11 +135,8 @@
"A regexp of names to be disregarded during directory completion." "A regexp of names to be disregarded during directory completion."
:type '(choice regexp (const :tag "None" nil))) :type '(choice regexp (const :tag "None" nil)))
(defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt cygwin)) (define-obsolete-variable-alias 'pcomplete-ignore-case 'completion-ignore-case
;; FIXME: the doc mentions file-name completion, but the code "28.1")
;; seems to apply it to all completions.
"If non-nil, ignore case when doing filename completion."
:type 'boolean)
(defcustom pcomplete-autolist nil (defcustom pcomplete-autolist nil
"If non-nil, automatically list possibilities on partial completion. "If non-nil, automatically list possibilities on partial completion.
@ -472,7 +469,7 @@ Same as `pcomplete' but using the standard completion UI."
(not (member (not (member
(funcall norm-func (directory-file-name f)) (funcall norm-func (directory-file-name f))
seen))))))) seen)))))))
(when pcomplete-ignore-case (when completion-ignore-case
(setq table (completion-table-case-fold table))) (setq table (completion-table-case-fold table)))
(list beg (point) table (list beg (point) table
:predicate pred :predicate pred
@ -865,7 +862,7 @@ this is `comint-dynamic-complete-functions'."
(sort comps pcomplete-compare-entry-function))) (sort comps pcomplete-compare-entry-function)))
,@(cdr (completion-file-name-table s p a))) ,@(cdr (completion-file-name-table s p a)))
(let ((completion-ignored-extensions nil) (let ((completion-ignored-extensions nil)
(completion-ignore-case pcomplete-ignore-case)) (completion-ignore-case completion-ignore-case))
(completion-table-with-predicate (completion-table-with-predicate
#'comint-completion-file-name-table pred 'strict s p a)))))) #'comint-completion-file-name-table pred 'strict s p a))))))
@ -1116,7 +1113,7 @@ Typing SPC flushes the help buffer."
"Insert a completion entry at point. "Insert a completion entry at point.
Returns non-nil if a space was appended at the end." Returns non-nil if a space was appended at the end."
(let ((here (point))) (let ((here (point)))
(if (not pcomplete-ignore-case) (if (not completion-ignore-case)
(insert-and-inherit (if raw-p (insert-and-inherit (if raw-p
(substring entry (length stub)) (substring entry (length stub))
(comint-quote-filename (comint-quote-filename
@ -1194,7 +1191,7 @@ Returns `partial' if completed as far as possible with the matches.
Returns `listed' if a completion listing was shown. Returns `listed' if a completion listing was shown.
See also `pcomplete-filename'." See also `pcomplete-filename'."
(let* ((completion-ignore-case pcomplete-ignore-case) (let* ((completion-ignore-case completion-ignore-case)
(completions (all-completions stub candidates)) (completions (all-completions stub candidates))
(entry (try-completion stub candidates)) (entry (try-completion stub candidates))
result) result)