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

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

[nongnu] elpa/bash-completion de033933bd 282/313: Chain function definit


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion de033933bd 282/313: Chain function definitions with && during setup.
Date: Sat, 3 Dec 2022 10:59:38 -0500 (EST)

branch: elpa/bash-completion
commit de033933bd066564be8159256f27b1d57aac1c0c
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>

    Chain function definitions with && during setup.
    
    Using && instead of ; helps detect errors during setup and fail cleanly
    and early.
---
 bash-completion.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bash-completion.el b/bash-completion.el
index 01a1dfbf4c..538f2ed2b5 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -1212,11 +1212,11 @@ completion in these cases."
             "  fi;"
             "  PROMPT_COMMAND=__emacs_complete_prompt;"
             "  history &>/dev/null -d $((HISTCMD - 1)) || true;"
-            "};"
+            "} &&"
             "function __emacs_complete_prompt {"
             "  PS1=" bash-completion--ps1 ";"
             "  PROMPT_COMMAND=__emacs_complete_recover_prompt;"
-            "};"
+            "} &&"
             "function __emacs_complete_recover_prompt {"
             "  local r=$?;"
             "  PS1=\"${__emacs_complete_ps1}\";"
@@ -1225,7 +1225,7 @@ completion in these cases."
             "  if [[ -n \"$PROMPT_COMMAND\" ]]; then"
             "    (exit $r); eval \"$PROMPT_COMMAND\";"
             "  fi;"
-            "};"
+            "} &&"
             "__emacs_complete_pre_command")
            process)
           (bash-completion--setup-bash-common process))



reply via email to

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