emacs-elpa-diffs
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]