From a9a0ae9fab3a0bc3c0105be876b56c46d963982c Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Sat, 23 Mar 2024 18:09:03 -0700 Subject: [PATCH] Avoid using deprecated eshell-prompt-regexp --- eshell-syntax-highlighting.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eshell-syntax-highlighting.el b/eshell-syntax-highlighting.el index c59acb0..f2422e3 100644 --- a/eshell-syntax-highlighting.el +++ b/eshell-syntax-highlighting.el @@ -38,11 +38,12 @@ (require 'esh-mode) (require 'eshell) (require 'em-alias) - (require 'em-dirs) - (require 'em-prompt)) + (require 'em-dirs)) + (require 'esh-util) (require 'em-alias) +(require 'em-prompt) (defgroup eshell-syntax-highlighting nil @@ -445,9 +446,8 @@ (with-silent-modifications (save-excursion (goto-char eshell-last-output-end) - (forward-line 0) - (when (re-search-forward eshell-prompt-regexp (line-end-position) t) - (eshell-syntax-highlighting--parse-and-highlight 'command (point-max))))) + (eshell-next-prompt) + (eshell-syntax-highlighting--parse-and-highlight 'command (point-max)))) ;; save-excursion marker is deleted when highlighting elisp, ;; so explicitly pop back to initial point. (goto-char beg))))