diff options
| author | Lars Ingebrigtsen | 2021-02-09 09:20:11 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-02-09 09:20:11 +0100 |
| commit | 5131e3accccc7bb3d59ab03cbb990eb3261ee9da (patch) | |
| tree | 5085213fa64976b20f4ebbdc638fdfe3c2f4d7aa | |
| parent | 9c1e89a32c65244a992a8a1ff73fd606f94a8a15 (diff) | |
| download | emacs-5131e3accccc7bb3d59ab03cbb990eb3261ee9da.tar.gz emacs-5131e3accccc7bb3d59ab03cbb990eb3261ee9da.zip | |
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.
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/erc/erc-pcomplete.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-cmpl.el | 6 | ||||
| -rw-r--r-- | lisp/pcomplete.el | 15 |
4 files changed, 12 insertions, 13 deletions
| @@ -2056,6 +2056,8 @@ directory instead of the default directory. | |||
| 2056 | 2056 | ||
| 2057 | * Incompatible Lisp Changes in Emacs 28.1 | 2057 | * Incompatible Lisp Changes in Emacs 28.1 |
| 2058 | 2058 | ||
| 2059 | ** 'pcomplete-ignore-case' is now an obsolete alias of 'completion-ignore-case'. | ||
| 2060 | |||
| 2059 | ** 'completions-annotations' face is not used when the caller puts own face. | 2061 | ** 'completions-annotations' face is not used when the caller puts own face. |
| 2060 | This affects the suffix specified by completion 'annotation-function'. | 2062 | This affects the suffix specified by completion 'annotation-function'. |
| 2061 | 2063 | ||
diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index ab4c7c580c6..ddaf78774a6 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el | |||
| @@ -89,7 +89,7 @@ for use on `completion-at-point-function'." | |||
| 89 | 89 | ||
| 90 | (defun pcomplete-erc-setup () | 90 | (defun pcomplete-erc-setup () |
| 91 | "Setup `erc-mode' to use pcomplete." | 91 | "Setup `erc-mode' to use pcomplete." |
| 92 | (setq-local pcomplete-ignore-case t) | 92 | (setq-local completion-ignore-case t) |
| 93 | (setq-local pcomplete-use-paring nil) | 93 | (setq-local pcomplete-use-paring nil) |
| 94 | (setq-local pcomplete-parse-arguments-function | 94 | (setq-local pcomplete-parse-arguments-function |
| 95 | #'pcomplete-erc-parse-arguments) | 95 | #'pcomplete-erc-parse-arguments) |
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 638c0ac230a..cbfe0b81545 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el | |||
| @@ -150,8 +150,8 @@ to writing a completion function." | |||
| 150 | :type (get 'pcomplete-dir-ignore 'custom-type)) | 150 | :type (get 'pcomplete-dir-ignore 'custom-type)) |
| 151 | 151 | ||
| 152 | (defcustom eshell-cmpl-ignore-case (eshell-under-windows-p) | 152 | (defcustom eshell-cmpl-ignore-case (eshell-under-windows-p) |
| 153 | (eshell-cmpl--custom-variable-docstring 'pcomplete-ignore-case) | 153 | (eshell-cmpl--custom-variable-docstring 'completion-ignore-case) |
| 154 | :type (get 'pcomplete-ignore-case 'custom-type)) | 154 | :type (get 'completion-ignore-case 'custom-type)) |
| 155 | 155 | ||
| 156 | (defcustom eshell-cmpl-autolist nil | 156 | (defcustom eshell-cmpl-autolist nil |
| 157 | (eshell-cmpl--custom-variable-docstring 'pcomplete-autolist) | 157 | (eshell-cmpl--custom-variable-docstring 'pcomplete-autolist) |
| @@ -259,7 +259,7 @@ to writing a completion function." | |||
| 259 | eshell-cmpl-file-ignore) | 259 | eshell-cmpl-file-ignore) |
| 260 | (setq-local pcomplete-dir-ignore | 260 | (setq-local pcomplete-dir-ignore |
| 261 | eshell-cmpl-dir-ignore) | 261 | eshell-cmpl-dir-ignore) |
| 262 | (setq-local pcomplete-ignore-case | 262 | (setq-local completion-ignore-case |
| 263 | eshell-cmpl-ignore-case) | 263 | eshell-cmpl-ignore-case) |
| 264 | (setq-local pcomplete-autolist | 264 | (setq-local pcomplete-autolist |
| 265 | eshell-cmpl-autolist) | 265 | eshell-cmpl-autolist) |
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 7effb27af7f..b648ecf0986 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -135,11 +135,8 @@ | |||
| 135 | "A regexp of names to be disregarded during directory completion." | 135 | "A regexp of names to be disregarded during directory completion." |
| 136 | :type '(choice regexp (const :tag "None" nil))) | 136 | :type '(choice regexp (const :tag "None" nil))) |
| 137 | 137 | ||
| 138 | (defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt cygwin)) | 138 | (define-obsolete-variable-alias 'pcomplete-ignore-case 'completion-ignore-case |
| 139 | ;; FIXME: the doc mentions file-name completion, but the code | 139 | "28.1") |
| 140 | ;; seems to apply it to all completions. | ||
| 141 | "If non-nil, ignore case when doing filename completion." | ||
| 142 | :type 'boolean) | ||
| 143 | 140 | ||
| 144 | (defcustom pcomplete-autolist nil | 141 | (defcustom pcomplete-autolist nil |
| 145 | "If non-nil, automatically list possibilities on partial completion. | 142 | "If non-nil, automatically list possibilities on partial completion. |
| @@ -472,7 +469,7 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 472 | (not (member | 469 | (not (member |
| 473 | (funcall norm-func (directory-file-name f)) | 470 | (funcall norm-func (directory-file-name f)) |
| 474 | seen))))))) | 471 | seen))))))) |
| 475 | (when pcomplete-ignore-case | 472 | (when completion-ignore-case |
| 476 | (setq table (completion-table-case-fold table))) | 473 | (setq table (completion-table-case-fold table))) |
| 477 | (list beg (point) table | 474 | (list beg (point) table |
| 478 | :predicate pred | 475 | :predicate pred |
| @@ -865,7 +862,7 @@ this is `comint-dynamic-complete-functions'." | |||
| 865 | (sort comps pcomplete-compare-entry-function))) | 862 | (sort comps pcomplete-compare-entry-function))) |
| 866 | ,@(cdr (completion-file-name-table s p a))) | 863 | ,@(cdr (completion-file-name-table s p a))) |
| 867 | (let ((completion-ignored-extensions nil) | 864 | (let ((completion-ignored-extensions nil) |
| 868 | (completion-ignore-case pcomplete-ignore-case)) | 865 | (completion-ignore-case completion-ignore-case)) |
| 869 | (completion-table-with-predicate | 866 | (completion-table-with-predicate |
| 870 | #'comint-completion-file-name-table pred 'strict s p a)))))) | 867 | #'comint-completion-file-name-table pred 'strict s p a)))))) |
| 871 | 868 | ||
| @@ -1116,7 +1113,7 @@ Typing SPC flushes the help buffer." | |||
| 1116 | "Insert a completion entry at point. | 1113 | "Insert a completion entry at point. |
| 1117 | Returns non-nil if a space was appended at the end." | 1114 | Returns non-nil if a space was appended at the end." |
| 1118 | (let ((here (point))) | 1115 | (let ((here (point))) |
| 1119 | (if (not pcomplete-ignore-case) | 1116 | (if (not completion-ignore-case) |
| 1120 | (insert-and-inherit (if raw-p | 1117 | (insert-and-inherit (if raw-p |
| 1121 | (substring entry (length stub)) | 1118 | (substring entry (length stub)) |
| 1122 | (comint-quote-filename | 1119 | (comint-quote-filename |
| @@ -1194,7 +1191,7 @@ Returns `partial' if completed as far as possible with the matches. | |||
| 1194 | Returns `listed' if a completion listing was shown. | 1191 | Returns `listed' if a completion listing was shown. |
| 1195 | 1192 | ||
| 1196 | See also `pcomplete-filename'." | 1193 | See also `pcomplete-filename'." |
| 1197 | (let* ((completion-ignore-case pcomplete-ignore-case) | 1194 | (let* ((completion-ignore-case completion-ignore-case) |
| 1198 | (completions (all-completions stub candidates)) | 1195 | (completions (all-completions stub candidates)) |
| 1199 | (entry (try-completion stub candidates)) | 1196 | (entry (try-completion stub candidates)) |
| 1200 | result) | 1197 | result) |