summaryrefslogtreecommitdiff
path: root/eshell-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-07-19 12:26:44 +0800
committerJSDurand <mmemmew@gmail.com>2021-07-19 12:32:41 +0800
commitb0b673a19f05664db77b3512dc57a03c4be7c6a9 (patch)
tree15d860ae907f7972d8b6f88b4d3e7d08647b6373 /eshell-conf.el
parent24c11301b8e06a696ca371eff4087d5e539504f5 (diff)
fix: fix bugs
* eshell-conf.el (eshell-current-command-stop): I forgot to remove a message statement that was for the debugging purpose only. (durand-eshell-emit-prompt): Add necessary text properties for eshell to function normally. (eshell-clear): Add inhibit-read-only so that we can clear even if the prompt is not after the last prompt.
Diffstat (limited to 'eshell-conf.el')
-rw-r--r--eshell-conf.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/eshell-conf.el b/eshell-conf.el
index 425d5cc..3d7052c 100644
--- a/eshell-conf.el
+++ b/eshell-conf.el
@@ -63,8 +63,7 @@
(mapconcat #'identity
(delq nil (list format-seconds-string
micro-str))
- " "))
- (message eshell-prompt-time-string))
+ " ")))
(setq eshell-current-command-start-time nil))))
;;;###autoload
@@ -110,7 +109,10 @@ Add a time information at the beginning. -- Modified by Durand."
(list
(cond ((> (length eshell-prompt-time-string) 0)
(propertize eshell-prompt-time-string
- 'font-lock-face 'modus-themes-heading-1)) )
+ 'font-lock-face 'modus-themes-heading-1
+ 'read-only t
+ 'front-sticky '(font-lock-face read-only)
+ 'rear-nonsticky '(font-lock-face read-only))) )
prompt))
" "))
(setq eshell-prompt-time-string "")))
@@ -132,7 +134,8 @@ Add a time information at the beginning. -- Modified by Durand."
;;;###autoload
(defun eshell-clear ()
(interactive)
- (delete-region eshell-last-output-end (point))
+ (let ((inhibit-read-only t))
+ (delete-region eshell-last-output-end (point)))
(eshell/clear t)
(eshell-emit-prompt))