[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 824f105 12/24: Optionally separate lv window and echo area
From: |
Oleh Krehel |
Subject: |
[elpa] master 824f105 12/24: Optionally separate lv window and echo area using a thin line |
Date: |
Fri, 01 May 2015 14:27:15 +0000 |
branch: master
commit 824f105b150e67b8ca450dff396cb9619fe7d6ce
Author: Jonas Bernoulli <address@hidden>
Commit: Oleh Krehel <address@hidden>
Optionally separate lv window and echo area using a thin line
* lv.el (lv-use-separator): New option.
(lv-separator): New face.
(lv): New custom group.
(lv-message): Respect lv-use-separator using lv-separator.
Re #122
---
lv.el | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/lv.el b/lv.el
index 76094b5..c4b7743 100644
--- a/lv.el
+++ b/lv.el
@@ -33,6 +33,24 @@
;;; Code:
+(defgroup lv nil
+ "The other echo area."
+ :group 'minibuffer
+ :group 'hydra)
+
+(defcustom lv-use-separator nil
+ "Whether to draw a line between the lv window and the echo area."
+ :group 'lv
+ :type 'boolean)
+
+(defface lv-separator
+ '((((class color) (background light)) :background "grey80")
+ (((class color) (background dark)) :background "grey30"))
+ "Face used to draw line between the lv window and the echo area.
+This is only used if option `lv-use-separator' is non-nil.
+Only the background color is significant."
+ :group 'lv)
+
(defvar lv-wnd nil
"Holds the current LV window.")
@@ -70,9 +88,16 @@
(null lv-force-update))
(delete-region (point-min) (point-max))
(insert str)
+ (when (window-system)
+ (unless (string-match-p "\n$" str)
+ (insert "\n"))
+ (insert
+ (propertize "__" 'face 'lv-separator 'display '(space :height (1)))
+ (propertize "\n" 'face 'lv-separator 'line-height t)))
(setq-local window-min-height n-lines)
(setq truncate-lines (> n-lines 1))
- (fit-window-to-buffer nil nil 1))
+ (let ((window-resize-pixelwise t))
+ (fit-window-to-buffer nil nil 1)))
(goto-char (point-min)))))
(defun lv-delete-window ()
- [elpa] master 8be0bff 02/24: hydra-examples.el: Add a defvar, (continued)
- [elpa] master 8be0bff 02/24: hydra-examples.el: Add a defvar, Oleh Krehel, 2015/05/01
- [elpa] master 192c5b0 03/24: Allow heads to conditionally exit, Oleh Krehel, 2015/05/01
- [elpa] master ad8def1 04/24: Match e.g. "C-d C-o" in docstring, Oleh Krehel, 2015/05/01
- [elpa] master f472834 05/24: hydra.el (hydra--format): Be non-greedy with width spec, Oleh Krehel, 2015/05/01
- [elpa] master 0b1b966 06/24: hydra.el (hydra-face-teal): Fixup doc, Oleh Krehel, 2015/05/01
- [elpa] master 1601991 07/24: Fix the regex once more and add test, Oleh Krehel, 2015/05/01
- [elpa] master c43e1cf 08/24: Add `lv-delete-window' function, Oleh Krehel, 2015/05/01
- [elpa] master b9d0687 09/24: Update `outline-regexp' and `indent-tabs-mode' file locals, Oleh Krehel, 2015/05/01
- [elpa] master 01248b1 10/24: Use one less ; for local vars, Oleh Krehel, 2015/05/01
- [elpa] master 00d2c0c 11/24: Add lv-force-update, Oleh Krehel, 2015/05/01
- [elpa] master 824f105 12/24: Optionally separate lv window and echo area using a thin line,
Oleh Krehel <=
- [elpa] master dd02b16 13/24: .dir-locals.el: Add, Oleh Krehel, 2015/05/01
- [elpa] master bf48e63 14/24: lv.el (lv-force-update): Be nil by default, Oleh Krehel, 2015/05/01
- [elpa] master 0ae560a 15/24: lv.el (lv-message): Use `lv-use-separator', Oleh Krehel, 2015/05/01
- [elpa] master 270c38b 16/24: Add a work-around for pop-to-buffer / dedicated bug, Oleh Krehel, 2015/05/01
- [elpa] master 8db62bf 17/24: Make *LV* window fixed size, Oleh Krehel, 2015/05/01
- [elpa] master 6524a2c 19/24: hydra.el (hydra-fontify-head-default): Fixup, Oleh Krehel, 2015/05/01
- [elpa] master 319ac87 20/24: hydra.el (hydra-key-format-spec): Declare obsolete, Oleh Krehel, 2015/05/01
- [elpa] master c78367f 21/24: hydra.el (hydra-cell-format): Change to defvar, Oleh Krehel, 2015/05/01
- [elpa] master 2bc9146 22/24: hydra.el: Use add/remove-function. Fix warning., Oleh Krehel, 2015/05/01
- [elpa] master 370a862 18/24: Repurpose `hydra--complain' for debugging, Oleh Krehel, 2015/05/01