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

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

[elpa] externals/posframe 102eb8c 07/16: Use posframe-hack


From: Feng Shu
Subject: [elpa] externals/posframe 102eb8c 07/16: Use posframe-hack
Date: Thu, 21 May 2020 00:57:31 -0400 (EDT)

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

    Use posframe-hack
---
 README.md   | 54 +++++++++++++++++++++++++++---------------------------
 posframe.el |  6 ++++--
 2 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/README.md b/README.md
index 9c1a126..7ce42b5 100644
--- a/README.md
+++ b/README.md
@@ -3,26 +3,26 @@ Note: this file is auto converted from posframe.el by 
[el2org](https://github.co
 
 # &#30446;&#24405;
 
-1.  [Posframe README](#orge5cd755)
-    1.  [What is posframe?](#orgd8ab90b)
-    2.  [Installation](#org53f48fe)
-    3.  [Usage](#org43d2716)
-        1.  [Create a posframe](#org7e036f7)
-        2.  [Hide a posframe](#org1dc88c4)
-        3.  [Hide all posframes](#org4145329)
-        4.  [Delete a posframe](#org43b7a7d)
-        5.  [Delete all posframes](#orgfc9af34)
-        6.  [Customizing mouse pointer control](#org09376a1)
-        7.  [Set fallback arguments of posframe-show](#org78579f9)
-        8.  [Some packages which use posframe](#org700aaf9)
-
-
-<a id="orge5cd755"></a>
+1.  [Posframe README](#org9250ddd)
+    1.  [What is posframe?](#orga3a4de5)
+    2.  [Installation](#org54522b5)
+    3.  [Usage](#org5a4c1a3)
+        1.  [Create a posframe](#org15d439c)
+        2.  [Hide a posframe](#orga0789fc)
+        3.  [Hide all posframes](#orgfea11fc)
+        4.  [Delete a posframe](#orgb945e53)
+        5.  [Delete all posframes](#orgf34da80)
+        6.  [Customizing mouse pointer control](#org3142fd3)
+        7.  [Set fallback arguments of posframe-show](#org8d2c22f)
+        8.  [Some packages which use posframe](#org6b1b801)
+
+
+<a id="org9250ddd"></a>
 
 # Posframe README
 
 
-<a id="orgd8ab90b"></a>
+<a id="orga3a4de5"></a>
 
 ## What is posframe?
 
@@ -38,7 +38,7 @@ NOTE:
 
 1.  For MacOS users, posframe needs Emacs version >= 26.0.91
 2.  GNOME users with GTK3 builds should set \`x-gtk-resize-child-frames'
-    to 'resize-mode or 'hide, then run command \`posframe-delete-all'.
+    to 'resize-mode or 'hide, then run command \`posframe-hack'.
     
     1.  'resize-mode has better behavior but not future-compatible.
     2.  'hide is more future-proof but will blink the child frame every
@@ -52,19 +52,19 @@ NOTE:
 ![img](./snapshots/posframe-1.png)
 
 
-<a id="org53f48fe"></a>
+<a id="org54522b5"></a>
 
 ## Installation
 
     (require 'posframe)
 
 
-<a id="org43d2716"></a>
+<a id="org5a4c1a3"></a>
 
 ## Usage
 
 
-<a id="org7e036f7"></a>
+<a id="org15d439c"></a>
 
 ### Create a posframe
 
@@ -92,21 +92,21 @@ NOTE:
         C-h f posframe-show
 
 
-<a id="org1dc88c4"></a>
+<a id="orga0789fc"></a>
 
 ### Hide a posframe
 
     (posframe-hide " *my-posframe-buffer*")
 
 
-<a id="org4145329"></a>
+<a id="orgfea11fc"></a>
 
 ### Hide all posframes
 
     M-x posframe-hide-all
 
 
-<a id="org43b7a7d"></a>
+<a id="orgb945e53"></a>
 
 ### Delete a posframe
 
@@ -118,7 +118,7 @@ NOTE:
         (posframe-delete-frame " *my-posframe-buffer*")
 
 
-<a id="orgfc9af34"></a>
+<a id="orgf34da80"></a>
 
 ### Delete all posframes
 
@@ -129,7 +129,7 @@ You probably shouldn't use it if you are sharing a buffer
 between posframe and other packages.
 
 
-<a id="org09376a1"></a>
+<a id="org3142fd3"></a>
 
 ### Customizing mouse pointer control
 
@@ -140,7 +140,7 @@ To disable this feature, add this to your init.el:
     (setq posframe-mouse-banish nil)
 
 
-<a id="org78579f9"></a>
+<a id="org8d2c22f"></a>
 
 ### Set fallback arguments of posframe-show
 
@@ -154,7 +154,7 @@ border-width to 10 and fallback background color to green.
         (or (plist-get info arg-name) value)))
 
 
-<a id="org700aaf9"></a>
+<a id="org6b1b801"></a>
 
 ### Some packages which use posframe
 
diff --git a/posframe.el b/posframe.el
index b60455e..601cc21 100644
--- a/posframe.el
+++ b/posframe.el
@@ -39,7 +39,7 @@
 ;; NOTE:
 ;; 1. For MacOS users, posframe needs Emacs version >= 26.0.91
 ;; 2. GNOME users with GTK3 builds should set `x-gtk-resize-child-frames'
-;;    to 'resize-mode or 'hide, then run command `posframe-delete-all'.
+;;    to 'resize-mode or 'hide, then run command `posframe-hack'.
 ;;    1. 'resize-mode has better behavior but not future-compatible.
 ;;    2. 'hide is more future-proof but will blink the child frame every
 ;;       time it's resized.
@@ -1068,15 +1068,17 @@ bottom center.  The structure of INFO can be found in 
docstring of
 
 (defvar x-gtk-resize-child-frames)
 
+;;;###autoload
 (defun posframe-hack ()
   "Do something hack for posframe."
+  (interactive)
+  (posframe-delete-all)
   (when (and (string-match-p "GTK[3]" (or system-configuration-features ""))
              (string-match-p "GNOME" (or (getenv "XDG_CURRENT_DESKTOP") ""))
              (not x-gtk-resize-child-frames))
     (if (> emacs-major-version 26)
         (progn
           (setq x-gtk-resize-child-frames 'resize-mode)
-          (posframe-delete-all)
           (message "Posframe: variable `x-gtk-resize-child-frames' has been 
set to 'resize-mode for GNOME/GTK3"))
       (message "Posframe: GNOME+GTK3 have resize bug: 
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00343.html";))))
 



reply via email to

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