From: Eli Zaretskii <eliz@gnu.org>
To: Alex <agrambot@gmail.com>
Cc: 35058@debbugs.gnu.org
Subject: bug#35058: [PATCH] Use display-graphic-p in more cases
Date: Fri, 05 Apr 2019 10:29:43 +0300 [thread overview]
Message-ID: <838swodi54.fsf@gnu.org> (raw)
In-Reply-To: <87h8be7s3t.fsf@gmail.com> (message from Alex on Wed, 03 Apr 2019 14:26:30 -0600)
> From: Alex <agrambot@gmail.com>
> Cc: 35058@debbugs.gnu.org
> Date: Wed, 03 Apr 2019 14:26:30 -0600
>
> I've attached a patch series below (including the logb change Basil
> recommended). Are these okay to apply?
Almost, we are close. See the remaining few comments below.
> The first patch does still use display-graphic-p in a few cases in
> frame.el for the predicates concerning pixel dimensions. Do you really
> want them to use memq instead?
For the display-* functions, yes, I'd like to leave their definitions
explicit.
> +(defun display-symbol-keys-p (&optional display)
> + "Return non-nil if DISPLAY supports symbol names as keys.
> +This means that, for example, DISPLAY can differentiate between
> +the keybinding RET and [return]."
> + (let ((frame-type (framep-on-display display)))
> + (or (memq frame-type '(x w32 ns pc))
> + (memq system-type '(ms-dos windows-nt)))))
Please add a comment here explaining that MS-Windows/MS-DOS terminals
are an exception because they have built-in support for function keys.
> --- a/lisp/faces.el
> +++ b/lisp/faces.el
> @@ -55,6 +55,7 @@ term-file-aliases
> :group 'terminals
> :version "25.1")
>
> +(declare-function display-graphic-p "frame" (&optional display))
Did you try to bootstrap with this? frame.el is loaded after
faces.el. (There are more similar declarations in the patches with
the same issues.)
> --- a/lisp/emulation/cua-base.el
> +++ b/lisp/emulation/cua-base.el
> @@ -427,7 +427,7 @@ cua-rectangle-mark-key
>
> (defcustom cua-rectangle-modifier-key 'meta
> "Modifier key used for rectangle commands bindings.
> -On non-window systems, always use the meta modifier.
> +On non-window systems, use `cua-rectangle-terminal-modifier-key'.
> Must be set prior to enabling CUA."
> :type '(choice (const :tag "Meta key" meta)
> (const :tag "Alt key" alt)
> @@ -435,6 +435,16 @@ cua-rectangle-modifier-key
> (const :tag "Super key" super))
> :group 'cua)
>
> +(defcustom cua-rectangle-terminal-modifier-key 'meta
> + "Modifier key used for rectangle commands bindings in terminals.
> +Must be set prior to enabling CUA."
> + :type '(choice (const :tag "Meta key" meta)
> + (const :tag "Alt key" alt)
> + (const :tag "Hyper key" hyper)
> + (const :tag "Super key" super))
> + :group 'cua
> + :version "27.1")
This change should be called out in NEWS.
The new display-* predicates should probably also be mentioned in
NEWS.
Thanks.
next prev parent reply other threads:[~2019-04-05 7:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-30 23:38 bug#35058: [PATCH] Use display-graphic-p in more cases Alex
2019-03-31 12:45 ` Basil L. Contovounesios
2019-03-31 15:37 ` Eli Zaretskii
2019-04-01 4:15 ` Alex
2019-04-01 5:21 ` Eli Zaretskii
2019-04-02 17:05 ` Alex
2019-04-02 17:23 ` Eli Zaretskii
2019-04-02 17:57 ` Alex
2019-04-02 18:39 ` Eli Zaretskii
2019-04-03 5:14 ` Alex
2019-04-03 5:29 ` Eli Zaretskii
2019-04-03 20:26 ` Alex
2019-04-05 7:29 ` Eli Zaretskii [this message]
2019-04-05 16:35 ` Alex
2019-04-05 18:51 ` Eli Zaretskii
2019-04-07 5:11 ` Alex
[not found] ` <<83a7hagv11.fsf@gnu.org>
2019-04-01 14:32 ` Drew Adams
2019-04-06 7:18 ` Eli Zaretskii
2019-04-07 13:50 ` Stefan Monnier
[not found] <<8736n4ndav.fsf@gmail.com>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=838swodi54.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=35058@debbugs.gnu.org \
--cc=agrambot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).