[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/posframe cd4f8d2 2/2: * posframe.el (posframe-poshandle
From: |
ELPA Syncer |
Subject: |
[elpa] externals/posframe cd4f8d2 2/2: * posframe.el (posframe-poshandler-p0.5p0-to-f0.5p1): New function. |
Date: |
Sun, 24 Oct 2021 03:57:26 -0400 (EDT) |
branch: externals/posframe
commit cd4f8d20f14c13423368c08af95cda1aa17ae1e6
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* posframe.el (posframe-poshandler-p0.5p0-to-f0.5p1): New function.
---
posframe.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/posframe.el b/posframe.el
index c2d84e2..656f102 100644
--- a/posframe.el
+++ b/posframe.el
@@ -1148,6 +1148,16 @@ structure of INFO can be found in docstring of
`posframe-show'. "
(y (cdr (posframe-poshandler-p0p0-to-p0p1 info))))
(cons x y)))
+(defun posframe-poshandler-p0.5p0-to-f0.5p1 (info)
+ "Posframe's position hanlder.
+
+Get a posframe position, which let posframe(0.5, 0) align to a
+position, which x = x of frame(0.5, 0) and y = y of point(0, 1). The
+structure of INFO can be found in docstring of `posframe-show'. "
+ (let ((x (car (posframe-poshandler-p0.5p0-to-f0.5f0 info)))
+ (y (cdr (posframe-poshandler-p0p0-to-p0p1 info))))
+ (cons x y)))
+
(defalias 'posframe-poshandler-point-bottom-left-corner-upward
#'posframe-poshandler-p0p1-to-p0p1)
(defun posframe-poshandler-p0p1-to-p0p1 (info)
"Posframe's position hanlder.