unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Global Font Lock by default
Date: Fri, 04 Nov 2005 13:01:32 +0200	[thread overview]
Message-ID: <uirv8vfqr.fsf@gnu.org> (raw)
In-Reply-To: <200511030553.jA35rEKN002545@scanner2.ics.uci.edu> (message from Dan Nicolaescu on Wed, 02 Nov 2005 21:53:10 -0800)

> Cc: emacs-devel@gnu.org
> From: Dan Nicolaescu <dann@ics.uci.edu>
> Date: Wed, 02 Nov 2005 21:53:10 -0800
> 
>   > > (assume a 256 colors xterm)
>   > > One problem is here:
>   > > tty_setup_colors does not do anything with its argument (mode) if for
>   > > example mode is 16 (i.e. when using --color=16)
>   > 
>   > This is not a bug: 16 colors is not a standard color mode, so it is
>   > not currently supported (the manual explains that, I hope).
> 
> The manual says "... 8, 16, 88, or 256 as the value of NUM"

This probably means it did work when I wrote the code and the
documentation, and I just forgot.  Sorry for the confusion, it's been
a long time since I looked at the code.

>   > > Another problem: when using --color=8, display-color-cells will return
>   > > 8 after emacs is started, but when xterm-register-default-colors is
>   > > run it returns 256 ... 
>   > 
>   > This is a bug: when Emacs is started with --color=8, it should behave
>   > as if only the 8 standard colors are available.  Could you please see
>   > what changes the value returned by display-color-cells?  Something is
>   > calling tty_setup_colors to reset to the default color mode (the one
>   > that supports 256 colors).
> 
> Nothing tries to reset to the default color mode, it looks like
> xterm-register-default-colors is called before tty_setup_colors,
> so display-color-cells returns the default 256.
> 
> When set_tty_color_mode is called:
> (gdb) xbacktrace 
> "modify-frame-parameters"
> "frame-notice-user-settings"
> "command-line-1"
> "command-line"
> "normal-top-level"
> 
> if you look in `command-line', the call to  `command-line-1' is a
> few lines after the code that loads the term/xterm.el file.

This does not necessarily constitute a bug: the terminal file should
indeed be loaded before --color is processed.  That's because the
terminal file defines the default color mode, and the user needs to be
able to return to that default during the session by adding
`(tty-color-mode 0)' to the frame's parameters.

So I'd expect display-color-cells to return 256 before --color=8 is
processed by startup.el, but 8 after it processes --color=8.

I don't know when I will have time to work on this, so if you (or
someone else) want to try, please go ahead.  I'll try to help as well
as I can.

TIA

  reply	other threads:[~2005-11-04 11:01 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29 20:34 Global Font Lock by default Richard M. Stallman
2005-10-29 21:51 ` Kim F. Storm
2005-10-29 23:44   ` David Kastrup
2007-02-27 19:59     ` Stuart D. Herring
2005-10-30 14:52   ` Richard M. Stallman
2005-10-31 16:48     ` Dan Nicolaescu
2005-10-31 17:31       ` Romain Francoise
2005-10-31 17:47         ` Dan Nicolaescu
2005-10-31 18:35           ` Romain Francoise
2005-10-31 20:48             ` Dan Nicolaescu
2005-10-31 21:11               ` Romain Francoise
2005-10-31 21:24                 ` Dan Nicolaescu
2005-10-31 21:50                   ` Romain Francoise
2005-10-31 22:07                     ` Dan Nicolaescu
2005-10-31 22:21                       ` Stefan Monnier
2005-10-31 22:41                         ` Dan Nicolaescu
2005-10-31 22:52                           ` Stefan Monnier
2005-10-31 23:20                             ` Miles Bader
2005-11-01 15:05                         ` Dan Nicolaescu
2005-11-01 11:56                       ` Romain Francoise
2005-11-01 21:52                       ` Richard M. Stallman
2005-11-02 22:51                         ` Dan Nicolaescu
2005-11-01  4:53                 ` Eli Zaretskii
2005-11-01  6:25                   ` Dan Nicolaescu
2005-11-01  6:35                   ` Dan Nicolaescu
2005-11-01 19:50                     ` Eli Zaretskii
2005-11-01 20:43                       ` Dan Nicolaescu
2005-11-02  4:23                         ` Eli Zaretskii
2005-11-02  5:46                           ` Dan Nicolaescu
2005-11-02 18:55                             ` Eli Zaretskii
2005-11-02 20:00                               ` Dan Nicolaescu
2005-11-03  4:39                                 ` Eli Zaretskii
2005-11-03  5:53                                   ` Dan Nicolaescu
2005-11-04 11:01                                     ` Eli Zaretskii [this message]
2005-11-04 14:20                                       ` Eli Zaretskii
2005-11-06 19:47                       ` Dan Nicolaescu
2005-11-01  7:29       ` Dan Nicolaescu
2005-11-01 10:03         ` Kim F. Storm
2005-11-01 12:04           ` Kim F. Storm
2005-11-01 12:56             ` Chong Yidong
2005-11-01 13:36               ` Kim F. Storm
2005-11-01 15:10                 ` Dan Nicolaescu
2005-11-01 17:19                   ` Luc Teirlinck
2005-11-01 17:23                   ` Luc Teirlinck
2005-11-01 17:28                   ` Luc Teirlinck
2005-11-01 19:57                   ` Eli Zaretskii
2005-11-01 19:54           ` Eli Zaretskii
2005-11-01 20:03             ` Kim F. Storm
2005-11-02  1:33               ` Luc Teirlinck
2005-11-02 10:27           ` Richard M. Stallman
2005-11-02 12:08             ` David Kastrup
2005-11-02 14:10               ` Luc Teirlinck
2005-11-03 13:50               ` Richard M. Stallman
2005-11-03 14:57                 ` Stefan Monnier
2005-11-03 16:24                   ` David Kastrup
2005-11-04  2:03                 ` Luc Teirlinck

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=uirv8vfqr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).