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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/posframe e4f171f 06/13: * posframe.el (posframe-funcall


From: Feng Shu
Subject: [elpa] externals/posframe e4f171f 06/13: * posframe.el (posframe-funcall): New function.
Date: Sat, 8 Jun 2019 19:42:27 -0400 (EDT)

branch: externals/posframe
commit e4f171f2267efa29822c85318bcd2bf014137e58
Author: Feng Shu <address@hidden>
Commit: Feng Shu <address@hidden>

    * posframe.el (posframe-funcall): New function.
---
 posframe.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/posframe.el b/posframe.el
index 6fc32c6..01ce127 100644
--- a/posframe.el
+++ b/posframe.el
@@ -666,6 +666,16 @@ This posframe's buffer is POSFRAME-BUFFER."
   (when (buffer-live-p posframe-buffer)
     (kill-buffer posframe-buffer)))
 
+(defun posframe-funcall (posframe-buffer function &rest arguments)
+  "Select posframe of POSFRAME-BUFFER's, and call FUNCTION.
+passing remaining arguments to it."
+  (when (get-buffer posframe-buffer)
+    (with-current-buffer posframe-buffer
+      (when (framep posframe--frame)
+        (with-selected-frame posframe--frame
+          (when (functionp function)
+            (apply function arguments)))))))
+
 ;;;###autoload
 (defun posframe-hide-all ()
   "Hide all posframe's frames."



reply via email to

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