all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: Eli Zaretskii <eliz@gnu.org>,
	stephen.berman@gmx.net, 51550@debbugs.gnu.org
Subject: bug#51550: 29.0.50; Customize Group INS buttons sometimes don't have a left box line
Date: Mon, 27 Dec 2021 19:19:47 +0800	[thread overview]
Message-ID: <87ilvaz44s.fsf@yahoo.com> (raw)
In-Reply-To: <87mtkmz5ht.fsf@yahoo.com> (Po Lu's message of "Mon, 27 Dec 2021 18:50:22 +0800")

Po Lu <luangruo@yahoo.com> writes:

> I think the solution is to save the face ID of the iterator after the
> call to extend_face_to_end_of_line, then compare it to the face after
> the iterator is reseated to the next line, and set
> it->start_of_box_run_p to true if that face is different and also has a
> box.

I have this code mostly working now, but I don't understand why
set_iterator_to_next doesn't seem to be updating it->face_id.

AFAIU, set_iterator_to_next called with RESEAT set to true eventually
calls reseat, which in turn calls handle_face_prop through handle_stop
if the iterator was reseated past the stop position, which should be set
to the beginning of the next line when the face property at that next
line differs from the line whose face is being extended.

However, handle_face_prop is never called, so I have to call it manually
like this:

	  /* Consume the line end.  This skips over invisible lines.  */
	  set_iterator_to_next (it, true);

-->	  handle_face_prop (it);
	  if (it->face_id != DEFAULT_FACE_ID
	      && it->face_id != saved_face_id)
	    {
	      face = FACE_FROM_ID_OR_NULL (it->f, it->face_id);
	      if (face && face->box != FACE_NO_BOX)
		{
		  it->face_box_p = true;
		  it->start_of_box_run_p = true;
		}
	    }

Any ideas?  Thanks.





  reply	other threads:[~2021-12-27 11:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ee80gezy.fsf.ref@yahoo.com>
2021-11-01 13:52 ` bug#51550: 29.0.50; Customize Group INS buttons sometimes don't have a left box line Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-01 14:29   ` Eli Zaretskii
2021-11-01 19:28     ` Stephen Berman
2021-11-01 19:38       ` Eli Zaretskii
2021-11-02  1:58         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-02 10:58           ` Stephen Berman
2021-11-02 14:13           ` Eli Zaretskii
2021-11-02 23:59             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-03  5:35             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-03  7:03               ` Stefan Kangas
2021-11-03 12:53                 ` Eli Zaretskii
2021-11-05  7:27                   ` Stefan Kangas
2021-12-27 10:50                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-27 11:19                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-12-27 14:55                       ` Eli Zaretskii
2021-12-28  0:37                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-28 12:40                           ` Eli Zaretskii
2021-12-28 12:45                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-28 13:17                               ` Eli Zaretskii
2021-12-28 13:24                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-28 17:35                       ` Eli Zaretskii
2021-12-29  0:33                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-29 12:56                           ` Eli Zaretskii
2021-12-29 13:23                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-29 13:37                               ` Eli Zaretskii
2021-12-29 13:54                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-29 14:56                                   ` Eli Zaretskii
2021-12-30  1:11                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-30 11:37                                   ` Eli Zaretskii
2021-12-30 11:43                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87ilvaz44s.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=51550@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=stefan@marxist.se \
    --cc=stephen.berman@gmx.net \
    /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.