From: Lars Ingebrigtsen Date: Wed, 19 Jun 2019 14:03:57 +0000 (+0200) Subject: Rename function in completion.el to use completion- prefixes X-Git-Tag: emacs-27.0.90~2397 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65b2faf6fa8d962cd2c4275d91406d66d95b5ca7;p=emacs.git Rename function in completion.el to use completion- prefixes * lisp/completion.el (locate-completion-entry) (completion-locate-entry, locate-completion-entry-retry) (completion-locate-entry-retry, locate-completion-db-error): Rename to use a completion- prefix and make the old names obsolete aliases. (add-completion-to-head, delete-completion): Use the new function names. --- 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'." (defvar inside-locate-completion-entry nil) ;; used to trap lossage in silent error correction -(defun locate-completion-entry (completion-entry prefix-entry) +(define-obsolete-function-alias 'locate-completion-entry + #'completion-locate-entry "27.1") +(defun completion-locate-entry (completion-entry prefix-entry) "Locate the completion entry. Returns a pointer to the element before the completion entry or nil if the completion entry is at the head. @@ -1085,14 +1087,16 @@ Must be called after `find-exact-completion'." cmpl--completion-string)) (inside-locate-completion-entry ;; recursive error: really scrod - (locate-completion-db-error)) + (completion-locate-db-error)) (t ;; Patch out (set cmpl-db-symbol nil) ;; Retry - (locate-completion-entry-retry completion-entry))))))) + (completion-locate-entry-retry completion-entry))))))) -(defun locate-completion-entry-retry (old-entry) +(define-obsolete-function-alias 'locate-completion-entry-retry + #'completion-locate-entry-retry "27.1") +(defun completion-locate-entry-retry (old-entry) (let ((inside-locate-completion-entry t)) (add-completion (completion-string old-entry) (completion-num-uses old-entry) @@ -1105,11 +1109,13 @@ Must be called after `find-exact-completion'." 0 completion-prefix-min-length))))) (if (and cmpl-entry pref-entry) ;; try again - (locate-completion-entry cmpl-entry pref-entry) + (completion-locate-entry cmpl-entry pref-entry) ;; still losing - (locate-completion-db-error))))) + (completion-locate-db-error))))) -(defun locate-completion-db-error () +(define-obsolete-function-alias 'locate-completion-db-error + #'completion-locate-db-error "27.1") +(defun completion-locate-db-error () ;; recursive error: really scrod (error "Completion database corrupted. Try M-x clear-all-completions. Send bug report")) @@ -1158,7 +1164,7 @@ Returns the completion entry." (let* ((prefix-entry (find-cmpl-prefix-entry (substring cmpl-db-downcase-string 0 completion-prefix-min-length))) - (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry)) + (splice-ptr (completion-locate-entry cmpl-db-entry prefix-entry)) (cmpl-ptr (cdr splice-ptr))) ;; update entry (set-completion-string cmpl-db-entry completion-string) @@ -1202,7 +1208,8 @@ String must be longer than `completion-prefix-min-length'." (let* ((prefix-entry (find-cmpl-prefix-entry (substring cmpl-db-downcase-string 0 completion-prefix-min-length))) - (splice-ptr (locate-completion-entry cmpl-db-entry prefix-entry))) + (splice-ptr (completion-locate-entry + cmpl-db-entry prefix-entry))) ;; delete symbol reference (set cmpl-db-symbol nil) ;; remove from prefix list