branch: elpa/bash-completion
commit 1b7ec8791553ef17c87bc777f8c06cb3cde11bf2
Author: Stephane Zermatten <[email protected]>
Commit: Stephane Zermatten <[email protected]>

    Fix byte-compilation error under Emacs 24 and 25.
    
    comint-last-prompt is only available starting with Emacs 26.
---
 bash-completion.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bash-completion.el b/bash-completion.el
index f16e26a32d..f50dd7fdc4 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -1345,6 +1345,11 @@ and would like bash completion in Emacs to take these 
changes into account."
       (setq no-timeout (accept-process-output process timeout nil t)))
     no-timeout))
 
+(when (< emacs-major-version 26)
+  ;; comint-last-prompt was not available prior to Emacs 26.1, so we
+  ;; always fallback to comint-prompt-regexp.
+  (defvar comint-last-prompt nil))
+
 (defun bash-completion--get-prompt-regexp ()
   (if comint-last-prompt
       (let ((start (car comint-last-prompt))

Reply via email to