Correct ommissions in rmc.el

* lisp/emacs-lisp/rmc.el (touch-screen-scroll)
(touch-screen-pinch): Declare functions.
(read-multiple-choice--short-answers): Call the same functions
directly and prevent the on-screen keyboard from being
deactivated immedately before it is reopened.
This commit is contained in:
Po Lu 2024-06-28 14:43:58 +08:00
parent bf862fc277
commit c4ec905c9a

View file

@ -179,6 +179,9 @@ Usage example:
(read-multiple-choice--short-answers
prompt choices help-string show-help)))
(declare-function touch-screen-scroll "touch-screen.el")
(declare-function touch-screen-pinch "touch-screen.el")
(defun read-multiple-choice--short-answers (prompt choices help-string show-help)
(let* ((dialog-p (use-dialog-box-p))
(prompt-choices
@ -225,7 +228,11 @@ Usage example:
(when (setq command
(let ((current-key-remap-sequence
(vector tchar)))
(touch-screen-translate-touch nil)))
;; Provide an empty prompt to `t-s-t-t' so
;; that it may not repeatedly display
;; and/or disable the on-screen keyboard,
;; or move point.
(touch-screen-translate-touch "")))
(setq command (if (> (length command) 0)
(aref command 0)
nil))
@ -240,9 +247,9 @@ Usage example:
;; Respond to scroll and pinch events as if RMC were
;; not in progress.
((eq (car-safe command) 'touchscreen-scroll)
(funcall #'touch-screen-scroll command))
(touch-screen-scroll command))
((eq (car-safe command) 'touchscreen-pinch)
(funcall #'touch-screen-pinch command))
(touch-screen-pinch command))
;; Prevent other touchscreen-generated events from
;; reaching the default conditional.
((memq (or (and (symbolp command) command)