]> git.eshelyaron.com Git - emacs.git/commitdiff
Cease preloading touch-screen.el outside X and Android
authorPo Lu <luangruo@yahoo.com>
Wed, 6 Dec 2023 02:34:41 +0000 (10:34 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 6 Dec 2023 02:34:41 +0000 (10:34 +0800)
* lisp/calc/calc.el (touch-screen-display-keyboard):

* lisp/minibuffer.el (clear-minibuffer-message):

* lisp/term.el (touch-screen-display-keyboard): Declare
touch-screen-display-keyboard before binding or setting it.

* lisp/loadup.el: Don't autoload touch-screen.el outside X and
Android.

* lisp/touch-screen.el: Autoload functions called from commands
responding to touch screen events.

lisp/calc/calc.el
lisp/loadup.el
lisp/minibuffer.el
lisp/term.el
lisp/touch-screen.el

index 41aeb17c25209286cfe6d1c4446d090558dae1bc..506232187015ca0e0dbfa30a99098589b3f56204 100644 (file)
@@ -1285,6 +1285,8 @@ the trail buffer."
           (setq calc-trail-buffer nil)
           t))))
 
+(defvar touch-screen-display-keyboard)
+
 (defun calc-mode ()
   "Calculator major mode.
 
index d447523dc42be9ef870b1d1633a347bd1ad290d0..ef4203917d4a3960ba5e54a4219a7afc81ba4dc6 100644 (file)
 (if (featurep 'dynamic-setting)
     (load "dynamic-setting"))
 
-;; touch-screen.el is tiny and is used liberally throughout the button
-;; code etc, so it may as well be preloaded everywhere.
-(load "touch-screen")
-
 (if (featurep 'x)
     (progn
+      (load "touch-screen")
       (load "x-dnd")
       (load "term/common-win")
       (load "term/x-win")))
 (if (featurep 'android)
     (progn
       (load "ls-lisp")
+      (load "touch-screen")
       (load "term/common-win")
       (load "term/android-win")))
 
index 03b64198bcf6a807aa4c4d850b3802b32f9917d7..2ddaf0af120e17fbe606ffbc0aa0b0fe4a6d5c19 100644 (file)
@@ -975,7 +975,7 @@ Intended to be called via `clear-message-function'."
   ;; progress, because a preview message might currently be displayed
   ;; in the echo area.  FIXME: find some way to place this in
   ;; touch-screen.el.
-  (if (and touch-screen-preview-select
+  (if (and (bound-and-true-p touch-screen-preview-select)
            (eq (nth 3 touch-screen-current-tool) 'drag))
       'dont-clear-message
     ;; Return nil telling the caller that the message
index b2875e4a17f3c21f3f168580e9d37bdc4d744fec..81746e0c20d2a2272364475099f4c25ad651ba4c 100644 (file)
@@ -1085,6 +1085,8 @@ underlying shell."
   (setq term-ansi-current-invisible nil)
   (setq term-ansi-current-bg-color 0))
 
+(defvar touch-screen-display-keyboard)
+
 (define-derived-mode term-mode fundamental-mode "Term"
   "Major mode for interacting with an inferior interpreter.
 The interpreter name is same as buffer name, sans the asterisks.
index 56adb75cefc358f6bfb5fe46c0844ad3bb3c476a..be08ae1d3c8261d809e5e819dc1d4ab53bddf630 100644 (file)
@@ -1913,6 +1913,7 @@ if POSN is on a link or a button, or `mouse-1' otherwise."
 \f
 ;; Exports.  These functions are intended for use externally.
 
+;;;###autoload
 (defun touch-screen-track-tap (event &optional update data threshold)
   "Track a single tap starting from EVENT.
 EVENT should be a `touchscreen-begin' event.
@@ -1970,6 +1971,7 @@ otherwise, return t once the `touchscreen-end' event arrives."
                    (eq (caadr event) (caadr new-event))))
            (t (throw 'finish nil))))))))
 
+;;;###autoload
 (defun touch-screen-track-drag (event update &optional data)
   "Track a single drag starting from EVENT.
 EVENT should be a `touchscreen-begin' event.
@@ -2017,6 +2019,7 @@ touch point in EVENT did not move significantly, and t otherwise."
 ;;; Event handling exports.  These functions are intended for use by
 ;;; Lisp commands bound to touch screen gesture events.
 
+;;;###autoload
 (defun touch-screen-inhibit-drag ()
   "Inhibit subsequent `touchscreen-drag' events from being sent.
 Prevent `touchscreen-drag' and translated mouse events from being