unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 58406@debbugs.gnu.org
Subject: bug#58406: 29.0.50; Bars refactoring?
Date: Mon, 10 Oct 2022 13:58:40 +0200	[thread overview]
Message-ID: <871qrfao0f.fsf@elite.giraud> (raw)
In-Reply-To: <83y1togj84.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Oct 2022 11:45:31 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

[...]

> The approach is OK, and welcome.  But let's please wait with this
> refactoring until after the emacs-29 branch is cut.  OK?

Yes.  Po Lu made that point clear too.

[...]

> The "F->tool_bar_items" part of the comment is outdated.
>
> Also, our style is to leave two spaces between sentences in comments
> and documentation.

[...]

> Likewise here: outdated reference to tool_bar_items.


Yes.  Sorry to have wasted your time: this patch is far from clean (and
it shows in comment and the like).  It was really just to show my
direction.

>> +  /* Is mouse on the highlighted item?  */
>> +  if (bar == TAB_BAR)
>> +    return *prop_idx == f->last_tab_bar_item ? 0 : 1;
>> +  else if (EQ (window, hlinfo->mouse_face_window)
>> +      && *vpos >= hlinfo->mouse_face_beg_row
>> +      && *vpos <= hlinfo->mouse_face_end_row
>> +      && (*vpos > hlinfo->mouse_face_beg_row
>> +	  || *hpos >= hlinfo->mouse_face_beg_col)
>> +      && (*vpos < hlinfo->mouse_face_end_row
>> +	  || *hpos < hlinfo->mouse_face_end_col
>> +	  || hlinfo->mouse_face_past_end))
>> +    return 0;
>
> The "else if" clause should only be used for the tool bar, not for the
> menu bar, AFAIU.

I don't know yet 😅

>> @@ -15485,6 +15451,7 @@ handle_tool_bar_click_with_device (struct frame *f, int x, int y, bool down_p,
>>    Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
>>    struct window *w = XWINDOW (f->tool_bar_window);
>>    int hpos, vpos, prop_idx;
>> +  bool close_p;
>
> The value of this is ignored here, so it is better to call this
> variable 'ignored' or 'dummy' or something to that effect.

Yes it is a good idea.  I'll try to remember that next time.
-- 
Manuel Giraud





      reply	other threads:[~2022-10-10 11:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10  7:37 bug#58406: 29.0.50; Bars refactoring? Manuel Giraud
2022-10-10  8:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-10  8:37   ` Manuel Giraud
2022-10-10  8:51     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-10  9:01       ` Eli Zaretskii
2022-10-10 10:05         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-10 11:24           ` Eli Zaretskii
2022-10-10 13:42             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-10 12:10       ` Manuel Giraud
2022-10-10 13:41         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-10 14:30           ` Manuel Giraud
2022-10-10 16:08             ` Eli Zaretskii
2022-10-11  0:32             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-10  8:58     ` Eli Zaretskii
2022-10-10  8:45 ` Eli Zaretskii
2022-10-10 11:58   ` Manuel Giraud [this message]

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=871qrfao0f.fsf@elite.giraud \
    --to=manuel@ledu-giraud.fr \
    --cc=58406@debbugs.gnu.org \
    --cc=eliz@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).