all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: michael_heerdegen@web.de, 7587@debbugs.gnu.org
Subject: bug#7587: 23.2; `format-mode-line' makes Emacs crash
Date: Thu, 16 Dec 2010 00:35:51 -0500	[thread overview]
Message-ID: <E1PT6VL-0006G6-N2@fencepost.gnu.org> (raw)
In-Reply-To: <87ei9icvg0.fsf@stupidchicken.com> (message from Chong Yidong on Thu, 16 Dec 2010 10:17:51 +0800)

> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Miles Bader <miles@gnu.org>,
>         michael_heerdegen@web.de, 7587@debbugs.gnu.org
> Date: Thu, 16 Dec 2010 10:17:51 +0800
> 
> format-mode-line should not pass non-basic faces to init_iterator.

Where do you see this condition enforced or assumed in the code?  I
see only the commentary before init_iterator, but I'm not sure which
code (except lookup_basic_face) would really puke or DTWT with a
non-basic face.  And support for face remapping already means that you
can sneak a non-basic face in, anyway.

> I'm not even sure what the FACE argument to format-mode-line is
> useful for

The doc string and the ELisp manual clearly answer that question:
format-mode-line can be used to compute the formatted string without
displaying it.  When you use this API that way, you can specify a face
for the parts of mode line that don't have their faces specified in
the mode-line format.  IOW, it sounds like a deliberate feature, given
the description in the ELisp manual.

> it doesn't seem to be used anywhere in the sources.

?? init_iterator uses it (well, its index in the face cache) to
initialize the appropriate member of the iterator object.

> I've changed format-mode-line so that if you pass a face argument to
> FACES, it should be one of `default', `mode-line', etc.  Any other face
> gets treated as `default'.

Given some history of discussions here, and the fact that no one seems
to be sure how this code should really work and why, I wonder why you
went ahead with the change without discussing it first.  I'm afraid
that this change breaks backward compatibility for no good reason.

Anyway, this being an incompatible change, it should be in NEWS.  In
addition, the ELisp manual should be modified accordingly.

Also, there seems to be a bug in the change itself, in this line:

  +    : EQ (face, Qmode_line_inactive) ? MODE_LINE_FACE_ID





  parent reply	other threads:[~2010-12-16  5:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 21:01 bug#7587: 23.2; `format-mode-line' makes Emacs crash Michael Heerdegen
2010-12-10 16:02 ` Eli Zaretskii
2010-12-10 16:39   ` Eli Zaretskii
2010-12-10 20:50   ` Stefan Monnier
2010-12-10 22:40     ` Eli Zaretskii
2010-12-16  2:17       ` Chong Yidong
2010-12-16  4:39         ` Drew Adams
2010-12-16  5:37           ` Eli Zaretskii
2010-12-16  5:35         ` Eli Zaretskii [this message]
2010-12-18  8:56           ` Eli Zaretskii
2010-12-20 15:29             ` Chong Yidong
2010-12-20 18:33               ` Eli Zaretskii
2010-12-25 10:18                 ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1PT6VL-0006G6-N2@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=7587@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=michael_heerdegen@web.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.