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

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

[elpa] externals/window-commander bd1a422e51 1/2: Add support for softwa


From: ELPA Syncer
Subject: [elpa] externals/window-commander bd1a422e51 1/2: Add support for software keyboards which use text-conversion
Date: Sat, 9 Dec 2023 09:58:48 -0500 (EST)

branch: externals/window-commander
commit bd1a422e51783f5c6bf9f499d4147d3ecda501f7
Author: Daniel Semyonov <daniel@dsemy.com>
Commit: Daniel Semyonov <daniel@dsemy.com>

    Add support for software keyboards which use text-conversion
    
    * window-commander.el (wincom-run-window-command): Ensure
    '{overriding-,}text-conversion-style' is nil if necessary.
---
 window-commander.el | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/window-commander.el b/window-commander.el
index 096657bdd0..0c804e6ee7 100644
--- a/window-commander.el
+++ b/window-commander.el
@@ -320,11 +320,22 @@ This display function respects `wincom-id-format'."
 Run `wincom-before-command-hook', set `this-command' to FUN and set a
 transient map for ID selection which runs `wincom-after-command-hook' on
 exit."
-  (run-hooks 'wincom-before-command-hook)
-  (setq this-command fun)
-  (set-transient-map wincom--id-map
-                     (lambda ()
-                       (run-hooks 'wincom-after-command-hook))))
+  (let* ((set 'set-text-conversion-style)
+         (set (and (fboundp set) set))
+         (s text-conversion-style)
+         (overriding-text-conversion-style nil)
+         (b (current-buffer)))
+    (when set
+      (funcall set nil)
+      (frame-toggle-on-screen-keyboard nil nil))
+    (run-hooks 'wincom-before-command-hook)
+    (setq this-command fun)
+    (set-transient-map wincom--id-map
+                       (lambda ()
+                         (and set (buffer-live-p b)
+                              (with-current-buffer b
+                                (set-text-conversion-style s)))
+                         (run-hooks 'wincom-after-command-hook)))))
 
 (defmacro wincom-define-window-command (name args &rest body)
   "Define NAME as a window command with DOCSTRING as its documentation string.



reply via email to

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