[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/telephone-line 5ccd246d25 049/195: Documentation update
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/telephone-line 5ccd246d25 049/195: Documentation update |
Date: |
Wed, 5 Jan 2022 02:59:21 -0500 (EST) |
branch: elpa/telephone-line
commit 5ccd246d252e3f2e052fe35449c81c8ded66a9ad
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>
Documentation update
---
telephone-line-separators.el | 2 +-
telephone-line-utils.el | 13 ++++++++++---
telephone-line.el | 5 +++--
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/telephone-line-separators.el b/telephone-line-separators.el
index 227e0d3fd5..06727cd7b0 100644
--- a/telephone-line-separators.el
+++ b/telephone-line-separators.el
@@ -28,7 +28,7 @@
(require 'telephone-line-utils)
(defun telephone-line-row-pattern-fixed-gradient (_ width)
- "Create a gradient bytestring of WIDTH from FG-COLOR to BG-COLOR."
+ "Create a gradient bytestring of WIDTH."
(mapcar (lambda (num)
(/ num (float width)))
(number-sequence 1 width)))
diff --git a/telephone-line-utils.el b/telephone-line-utils.el
index 0780760a14..62fadf9ed6 100644
--- a/telephone-line-utils.el
+++ b/telephone-line-utils.el
@@ -19,11 +19,13 @@
;;; Code:
-(require 'memoize)
(require 'cl-lib)
-(require 'seq)
(require 'color)
+(require 'memoize)
+(require 's)
+(require 'seq)
+
(defcustom telephone-line-height nil
"Override the mode-line height."
:group 'telephone-line
@@ -101,6 +103,7 @@ color1 and color2."
;; TODO: error on non-rectangular input?
(defun telephone-line--create-pbm-image (body fg-color bg-color)
+ "Create a pbm image from a byte list BODY and colors FG-COLOR and BG-COLOR."
(create-image
(concat
(format "P6 %d %d 255 " (length (car body)) (length body))
@@ -118,7 +121,7 @@ color1 and color2."
'display image))
(defun telephone-line-row-pattern (fill total)
- "Make a PBM line that has FILL FG-COLOR bytes out of TOTAL BG-COLOR bytes."
+ "Make a list of percentages (0 to 1), with FILL 0s out of TOTAL 1s, with a
non-integer in between."
(seq-let (intfill rem) (cl-floor fill)
(nconc
(make-list intfill 0) ;Left fill
@@ -127,6 +130,7 @@ color1 and color2."
(make-list (- total intfill 1) 1)))))) ;Right gap
(defun telephone-line-row-pattern-hollow (padding total)
+ "Make a list of percentages (0 to 1), with a non-integer positioned PADDING
places in out of TOTAL places."
(seq-let (intpadding rem) (cl-floor padding)
(nconc
(make-list intpadding 1) ;Left gap
@@ -148,10 +152,12 @@ color1 and color2."
normalized-axis)))
(defmacro telephone-line-complement (func)
+ "Return a function which is the complement of FUNC."
`(lambda (x)
(- (,func x))))
(defun telephone-line--separator-arg-handler (arg)
+ "Translate ARG into an appropriate color for a separator."
(if (facep arg)
(face-attribute arg :background)
arg))
@@ -180,6 +186,7 @@ NOTE: Forced-width primary separators are not currently
supported."
(char-to-string ,alt-char)))
(defun telephone-line--pad-body (body char-width)
+ "Pad 2d byte-list BODY to a width of CHAR-WIDTH, given as a number of
characters."
(let* ((body-width (length (car body)))
(padding-width (- (* char-width (frame-char-width)) body-width))
(left-padding (make-list (floor padding-width 2) 1))
diff --git a/telephone-line.el b/telephone-line.el
index f9fedd9c17..49aa66009a 100644
--- a/telephone-line.el
+++ b/telephone-line.el
@@ -121,6 +121,8 @@ Secondary separators do not incur a background color
change."
'display `((space :align-to (- (+ right right-fringe
right-margin)
,reserve)))))
+(defvar telephone-line-selected-window nil)
+
(defun telephone-line--set-selected-window ()
(when (not (minibuffer-window-active-p (frame-selected-window)))
(setq telephone-line-selected-window (frame-selected-window))))
@@ -135,8 +137,7 @@ Secondary separators do not incur a background color
change."
(defun telephone-line-selected-window-active ()
"Return whether the current window is active."
- (and (boundp 'telephone-line-selected-window)
- (eq telephone-line-selected-window (selected-window))))
+ (eq telephone-line-selected-window (selected-window)))
(defun telephone-line-face-map (sym)
"Return the face corresponding to SYM for the selected window's active
state."
- [nongnu] branch elpa/telephone-line created (now ff526441a2), ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line a84f75000c 017/195: Face hierarchy, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 6fd0211efe 045/195: Add GPL badge, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line b6dcd27331 025/195: Add install instructions, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 502285b6bc 077/195: Add support for xah-fly-keys, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 315054ffb4 068/195: Minor fixes, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 48f2894e95 046/195: Add initial support for multiple frames, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 1f2389212b 024/195: Remove -enable and -disable entirely, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line de93becc18 039/195: Merge pull request #12 from bjpbakker/fix/erc-segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 5ccd246d25 049/195: Documentation update,
ELPA Syncer <=
- [nongnu] elpa/telephone-line ae636f7ca2 041/195: Version bump, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 8bc83573c3 061/195: Fix unicode separators, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 1b52832b44 054/195: Nameless indentation, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 676b57d819 081/195: Made subseparator colors customizeable, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 00600d46c9 042/195: Merge branch 'master' of github.com:dbordak/telephone-line, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 3bb5cee841 074/195: Update readme.org, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line f5a1d0cbd2 057/195: Move over to new OO separators, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line cac54930a1 115/195: Improve even heights., ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 105defac6e 100/195: Remove telephone-line-trim, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 0fec3265a0 118/195: Fix terminology before it's too late., ELPA Syncer, 2022/01/05