diff options
| -rw-r--r-- | lisp/completion.el | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/lisp/completion.el b/lisp/completion.el index 89285c74d41..b9c3a21f5ea 100644 --- a/lisp/completion.el +++ b/lisp/completion.el | |||
| @@ -1062,7 +1062,9 @@ and downcased. Sets up `cmpl-db-prefix-symbol'." | |||
| 1062 | (defvar inside-locate-completion-entry nil) | 1062 | (defvar inside-locate-completion-entry nil) |
| 1063 | ;; used to trap lossage in silent error correction | 1063 | ;; used to trap lossage in silent error correction |
| 1064 | 1064 | ||
| 1065 | (defun locate-completion-entry (completion-entry prefix-entry) | 1065 | (define-obsolete-function-alias 'locate-completion-entry |
| 1066 | #'completion-locate-entry "27.1") | ||
| 1067 | (defun completion-locate-entry (completion-entry prefix-entry) | ||
| 1066 | "Locate the completion entry. | 1068 | "Locate the completion entry. |
| 1067 | Returns a pointer to the element before the completion entry or nil if | 1069 | Returns a pointer to the element before the completion entry or nil if |
| 1068 | the completion entry is at the head. | 1070 | the completion entry is at the head. |
| @@ -1085,14 +1087,16 @@ Must be called after `find-exact-completion'." | |||
| 1085 | cmpl--completion-string)) | 1087 | cmpl--completion-string)) |
| 1086 | (inside-locate-completion-entry | 1088 | (inside-locate-completion-entry |
| 1087 | ;; recursive error: really scrod | 1089 | ;; recursive error: really scrod |
| 1088 | (locate-completion-db-error)) | 1090 | (completion-locate-db-error)) |
| 1089 | (t | 1091 | (t |
| 1090 | ;; Patch out | 1092 | ;; Patch out |
| 1091 | (set cmpl-db-symbol nil) | 1093 | (set cmpl-db-symbol nil) |
| 1092 | ;; Retry | 1094 | ;; Retry |
| 1093 | (locate-completion-entry-retry completion-entry))))))) | 1095 | (completion-locate-entry-retry completion-entry))))))) |
| 1094 | 1096 | ||
| 1095 | (defun locate-completion-entry-retry (old-entry) | 1097 | (define-obsolete-function-alias 'locate-completion-entry-retry |
| 1098 | #'completion-locate-entry-retry "27.1") | ||
| 1099 | (defun completion-locate-entry-retry (old-entry) | ||
| 1096 | (let ((inside-locate-completion-entry t)) | 1100 | (let ((inside-locate-completion-entry t)) |
| 1097 | (add-completion (completion-string old-entry) | 1101 | (add-completion (completion-string old-entry) |
| 1098 | (completion-num-uses old-entry) | 1102 | (completion-num-uses old-entry) |
| @@ -1105,11 +1109,13 @@ Must be called after `find-exact-completion'." | |||
| 1105 | 0 completion-prefix-min-length))))) | 1109 | 0 completion-prefix-min-length))))) |
| 1106 | (if (and cmpl-entry pref-entry) | 1110 | (if (and cmpl-entry pref-entry) |
| 1107 | ;; try again | 1111 | ;; try again |
| 1108 | (locate-completion-entry cmpl-entry pref-entry) | 1112 | (completion-locate-entry cmpl-entry pref-entry) |
| 1109 | ;; still losing | 1113 | ;; still losing |
| 1110 | (locate-completion-db-error))))) | 1114 | (completion-locate-db-error))))) |
| 1111 | 1115 | ||
| 1112 | (defun locate-completion-db-error () | 1116 | (define-obsolete-function-alias 'locate-completion-db-error |
| 1117 | #'completion-locate-db-error "27.1") | ||
| 1118 | (defun completion-locate-db-error () | ||
| 1113 | ;; recursive error: really scrod | 1119 | ;; recursive error: really scrod |
| 1114 | (error "Completion database corrupted. Try M-x clear-all-completions. Send bug report")) | 1120 | (error "Completion database corrupted. Try M-x clear-all-completions. Send bug report")) |
| 1115 | 1121 | ||
| @@ -1158,7 +1164,7 @@ Returns the completion entry." | |||
| 1158 | (let* ((prefix-entry (find-cmpl-prefix-entry | 1164 | (let* ((prefix-entry (find-cmpl-prefix-entry |
| 1159 | (substring cmpl-db-downcase-string 0 | 1165 | (substring cmpl-db-downcase-string 0 |
| 1160 | completion-prefix-min-length))) | 1166 | completion-prefix-min-length))) |
| 1161 | (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry)) | 1167 | (splice-ptr (completion-locate-entry cmpl-db-entry prefix-entry)) |
| 1162 | (cmpl-ptr (cdr splice-ptr))) | 1168 | (cmpl-ptr (cdr splice-ptr))) |
| 1163 | ;; update entry | 1169 | ;; update entry |
| 1164 | (set-completion-string cmpl-db-entry completion-string) | 1170 | (set-completion-string cmpl-db-entry completion-string) |
| @@ -1202,7 +1208,8 @@ String must be longer than `completion-prefix-min-length'." | |||
| 1202 | (let* ((prefix-entry (find-cmpl-prefix-entry | 1208 | (let* ((prefix-entry (find-cmpl-prefix-entry |
| 1203 | (substring cmpl-db-downcase-string 0 | 1209 | (substring cmpl-db-downcase-string 0 |
| 1204 | completion-prefix-min-length))) | 1210 | completion-prefix-min-length))) |
| 1205 | (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry))) | 1211 | (splice-ptr (completion-locate-entry |
| 1212 | cmpl-db-entry prefix-entry))) | ||
| 1206 | ;; delete symbol reference | 1213 | ;; delete symbol reference |
| 1207 | (set cmpl-db-symbol nil) | 1214 | (set cmpl-db-symbol nil) |
| 1208 | ;; remove from prefix list | 1215 | ;; remove from prefix list |