[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct f3c662c52f 04/21: Rename helper function for 1/3 fr
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct f3c662c52f 04/21: Rename helper function for 1/3 frame height |
Date: |
Sat, 25 Mar 2023 15:59:00 -0400 (EDT) |
branch: externals/mct
commit f3c662c52f67347938a3be69896caae574005824
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Rename helper function for 1/3 frame height
---
mct.el | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/mct.el b/mct.el
index b29ae9e866..8f1bf3984a 100644
--- a/mct.el
+++ b/mct.el
@@ -42,18 +42,18 @@ and the Completions."
(make-obsolete 'mct-completion-windows-regexp 'mct--completions-window-name
"0.5.0")
-(defcustom mct-completion-window-size (cons #'mct--frame-height-fraction 1)
- "Set the maximum and minimum height of the Completions' buffer.
+(defcustom mct-completion-window-size (cons #'mct-frame-height-third 1)
+ "Set the maximum and minimum height of the Completions buffer.
The value is a cons cell in the form of (max-height . min-height)
where each value is either a natural number or a function which
returns such a number.
The default maximum height of the window is calculated by the
-function `mct--frame-height-fraction', which finds the closest
-round number to 1/3 of the frame's height. While the default
-minimum height is 1. This means that during live completions the
-Completions' window will shrink or grow to show candidates within
+function `mct-frame-height-third', which finds the closest round
+number to 1/3 of the frame's height. While the default minimum
+height is 1. This means that during live completions the
+Completions window will shrink or grow to show candidates within
the specified boundaries. To disable this bouncing effect, set
both max-height and min-height to the same number.
@@ -333,11 +333,16 @@ affairs."
(goto-char prev))))))
(put-text-property (point-min) (point) 'invisible t)))))
-(defun mct--frame-height-fraction ()
+(defun mct-frame-height-third ()
"Return round number of 1/3 of `frame-height'.
Can be used in `mct-completion-window-size'."
(floor (frame-height) 3))
+(define-obsolete-function-alias
+ 'mct--frame-height-fraction
+ 'mct-frame-height-third
+ "1.0.0")
+
(defun mct--height (param)
"Return height of PARAM in number of lines."
(cond
- [elpa] externals/mct d90dd8372f 18/21: Update package information, (continued)
- [elpa] externals/mct d90dd8372f 18/21: Update package information, ELPA Syncer, 2023/03/25
- [elpa] externals/mct 4f0088b2a2 19/21: Make the blocklist take precedence over the passlist, ELPA Syncer, 2023/03/25
- [elpa] externals/mct 06e974a23a 07/21: Remove documentation about deleted extensions, ELPA Syncer, 2023/03/25
- [elpa] externals/mct ec12cafaa3 15/21: Simplify the front matter in the README.org, ELPA Syncer, 2023/03/25
- [elpa] externals/mct d2391f88ed 03/21: Change minimum Emacs version to 28, ELPA Syncer, 2023/03/25
- [elpa] externals/mct 76d3ee9f0a 10/21: DEPRECATE mct-completions-format, ELPA Syncer, 2023/03/25
- [elpa] externals/mct f877e22324 12/21: Do not extend mct-highlight-candidate, ELPA Syncer, 2023/03/25
- [elpa] externals/mct a4f67da780 05/21: Rewrite some doc strings for stylistic consistency, ELPA Syncer, 2023/03/25
- [elpa] externals/mct 9c469d5cce 11/21: Delete old deprecation code, ELPA Syncer, 2023/03/25
- [elpa] externals/mct 7af3e101be 16/21: Add missing block about package sources, ELPA Syncer, 2023/03/25
- [elpa] externals/mct f3c662c52f 04/21: Rename helper function for 1/3 frame height,
ELPA Syncer <=