emacs-devel
[Top][All Lists]
Advanced

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

Re: Why is touch-screen.el preloaded?


From: Po Lu
Subject: Re: Why is touch-screen.el preloaded?
Date: Wed, 29 Nov 2023 19:53:58 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

> I don't think I understand what you are saying.  Can you perhaps show
> an example and explain this using that example?

OK.  calc.el binds touch-screen-display-keyboard to t, preventing window
creation hooks it installs from removing the virtual keyboard when the
selected window changes as its calculator windows are created.

    ;; not hidden by accident.
    (let ((touch-screen-display-keyboard t))
      (when (get-buffer-window "*Calc Keypad*")

This let statement binding a global variable won't take effect if
byte-compiled on systems where touch-screen.el is not preloaded unless a
defvar statement is inserted, and much code will omit this statement,
since their authors will be unaware it might be necessary.  Such code
will function improperly if compiled on those systems.


reply via email to

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