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

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

[nongnu] elpa/bash-completion 1b7ec87915 233/313: Fix byte-compilation e


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 1b7ec87915 233/313: Fix byte-compilation error under Emacs 24 and 25.
Date: Sat, 3 Dec 2022 10:59:33 -0500 (EST)

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

    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

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