Override read-only when capturing clear in shell

When shell layer intercepts the clear commands and tries to replace it with
erase-buffer, this fails with 'Text is read-only'.
Work around this by using inhibit-read-only.
This commit is contained in:
Alexander Wingård 2018-10-05 15:18:46 +02:00 committed by Codruț Constantin Gușoi
parent ad8eb85960
commit 07a7776b6f
1 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,8 @@
;; Check for clear command and execute it.
((string-match "^[ \t]*clear[ \t]*$" command)
(comint-send-string proc "\n")
(erase-buffer))
(let ((inhibit-read-only t))
(erase-buffer)))
;; Check for man command and execute it.
((string-match "^[ \t]*man[ \t]*" command)
(comint-send-string proc "\n")