Emacs: use special-mode-map derivative in output buffer

This commit is contained in:
Milo Davis 2018-01-08 10:48:27 -05:00
parent 2d00e5a2f8
commit 899bc53289

View File

@ -421,6 +421,12 @@ Overrides `michelson-print-errors' and `michelson-highlight-errors'"
(display-buffer-below-selected buffer nil))))
(window-body-width message-window)))
(defvar michelson-output-buffer-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map special-mode-map)
(define-key map "g" nil)
map)
"Keymap for types buffer.")
(defun michelson-write-output-buffer (data &optional do-not-overwrite)
"Write the given `DATA' to the output buffer.
@ -455,6 +461,7 @@ If `DO-NOT-OVERWRITE' is non-nil, the existing contents of the buffer are mainta
'face 'michelson-stack-highlight-face))
(setq michelson-highlighting (not michelson-highlighting)))))
(insert data))
(use-local-map michelson-output-buffer-map)
(read-only-mode 1)
(goto-char (point-min))
(while (not (eobp))