From aeeeb64bb90fe8d396376af0e4cbd8d7346d17d2 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 15 Sep 2020 22:50:45 -0700 Subject: [PATCH] Clean up the mode-line for ielm buffers --- oni-elisp/oni-elisp.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/oni-elisp/oni-elisp.el b/oni-elisp/oni-elisp.el index 587de53..73e5bf7 100644 --- a/oni-elisp/oni-elisp.el +++ b/oni-elisp/oni-elisp.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0909.085302 +;; Version: 2020.0915.224953 ;; Package-Requires: (oni-company oni-flycheck oni-paredit oni-fci oni-yasnippet oni-hydra rainbow-delimiters nameless erefactor flycheck-relint handle elisp-format) ;; This program is free software; you can redistribute it and/or modify @@ -69,6 +69,20 @@ (setq-local auto-fill-inhibit-regexp (rx line-start ";; Package-Requires: ")) (auto-fill-mode)) +(defun oni-elisp-setup-ielm-mode-line () + "Clean up the mode-line for ielm buffers." + (setq mode-line-buffer-identification + (list (propertize "Interactive Emacs Lisp Mode" 'face 'mode-line-buffer-id)) + mode-line-format + '("%e" + mode-line-front-space + mode-line-remote + mode-line-frame-identification + mode-line-buffer-identification + " on " + (:eval (buffer-name ielm-working-buffer)) + mode-line-end-spaces))) + (defhydra oni-elisp-hydra (:color teal :hint nil) " ^Eval^ @@ -91,6 +105,7 @@ _eb_: Buffer 'display-fill-column-indicator-mode 'fci-mode)) +(add-hook 'ielm-mode-hook #'oni-elisp-setup-ielm-mode-line) (add-hook 'ielm-mode-hook 'company-mode) (add-hook 'ielm-mode-hook 'paredit-mode)