emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/bash-completion f1bd7b0e17 215/313: Use more meaningful na


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion f1bd7b0e17 215/313: Use more meaningful names for the functions returning completion processes
Date: Sat, 3 Dec 2022 10:59:32 -0500 (EST)

branch: elpa/bash-completion
commit f1bd7b0e178cff98c621e3d6e31ec157c6d70382
Author: montag451 <montag451@laposte.net>
Commit: montag451 <montag451@laposte.net>

    Use more meaningful names for the functions returning completion processes
---
 bash-completion.el | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/bash-completion.el b/bash-completion.el
index f816ad5d67..30f164e26f 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -486,7 +486,7 @@ When doing completion outside of a comint buffer, call
     (error (if (not bash-completion-use-separate-processes)
                ;; try again with a separate process
                (let* ((bash-completion-use-separate-processes t)
-                      (process (bash-completion-require-process)))
+                      (process (bash-completion-get-process)))
                  (bash-completion-comm comp process))
              ;; re-throw the error
              (signal (car err) (cdr err))))))
@@ -512,12 +512,12 @@ Returns (list stub-start stub-end completions) with
   (when bash-completion-enabled
     (let ((bash-completion-use-separate-processes
            bash-completion-use-separate-processes)
-          (process (bash-completion-require-process)))
+          (process (bash-completion-get-process)))
       (when (and (not process) (not bash-completion-use-separate-processes))
         ;; no process associated with the current buffer, create a
         ;; separate completion process
         (setq bash-completion-use-separate-processes t)
-        (setq process (bash-completion-require-process)))
+        (setq process (bash-completion-get-process)))
       (let* ((comp (bash-completion--parse
                     comp-start comp-pos
                     (process-get process 'wordbreaks)
@@ -1038,7 +1038,7 @@ Return a CONS containing (before . after)."
 
 ;;; ---------- Functions: bash subprocess
 
-(defun bash-completion--require-separate-process ()
+(defun bash-completion--get-or-create-separate-process ()
   "Return the bash completion process or start it.
 
 If a bash completion process is already running, return it.
@@ -1133,7 +1133,7 @@ is set to t."
                   (bash-completion-kill process)
                 (error nil)))))))))
 
-(defun bash-completion--require-same-process ()
+(defun bash-completion--get-same-process ()
   "Setup the process associated with the current buffer and return it."
   (when (derived-mode-p 'comint-mode)
     (let ((process (get-buffer-process (current-buffer))))
@@ -1141,16 +1141,16 @@ is set to t."
         (bash-completion--setup-bash-common process))
       process)))
 
-(defun bash-completion-require-process ()
+(defun bash-completion-get-process ()
   "Setup and return a bash completion process.
 
 If `bash-completion-use-separate-processes' is non-nil,
-`bash-completion--require-separate-process' is called to get the
-process, otherwise `bash-completion--require-same-process' is
+`bash-completion--get-or-create-separate-process' is called to
+get the process, otherwise `bash-completion--get-same-process' is
 used. "
   (if bash-completion-use-separate-processes
-      (bash-completion--require-separate-process)
-    (bash-completion--require-same-process)))
+      (bash-completion--get-or-create-separate-process)
+    (bash-completion--get-same-process)))
 
 (defun bash-completion-cd-command-prefix ()
   "Build a command-line that CD to default-directory.
@@ -1305,7 +1305,7 @@ and would like bash completion in Emacs to take these 
changes into account."
 
 (defun bash-completion-buffer ()
   "Return the buffer of the BASH process, create the BASH process if 
necessary."
-  (bash-completion--get-buffer (bash-completion-require-process)))
+  (bash-completion--get-buffer (bash-completion-get-process)))
 
 (defun bash-completion-is-running ()
   "Check whether the bash completion process is running."
@@ -1345,7 +1345,7 @@ and would like bash completion in Emacs to take these 
changes into account."
 COMMANDLINE should be a bash command, without the final newline.
 
 PROCESS should be the bash process, if nil this function calls
-`bash-completion-require-process' which might start a new process
+`bash-completion-get-process' which might start a new process
 depending on the value of
 `bash-completion-use-separate-processes'.
 
@@ -1358,7 +1358,7 @@ result of the command in the bash completion process 
buffer or in
 `bash-completion-use-separate-processes' is nil.
 
 Return the status code of the command, as a number."
-  (let ((process (or process (bash-completion-require-process)))
+  (let ((process (or process (bash-completion-get-process)))
         (timeout (or timeout bash-completion-process-timeout))
         (prompt-regexp (if bash-completion-use-separate-processes
                            "\t-?[[:digit:]]+\v"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]