unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 35508@debbugs.gnu.org
Subject: bug#35508: 27.0.50; Fine-ordering of functions on hooks
Date: Sat, 11 May 2019 16:54:42 +0300	[thread overview]
Message-ID: <83tve1cd0d.fsf@gnu.org> (raw)
In-Reply-To: <jwvtve16sm6.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 11 May 2019 09:26:10 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: 35508@debbugs.gnu.org
> Date: Sat, 11 May 2019 09:26:10 -0400
> 
> >> Other objections?
> > Thanks.  Should we perhaps change 100 to 110 and 90 to 100?
> 
> You mean make it go https://en.wikipedia.org/wiki/Up_to_eleven ?  ;-)

Yes.  The idea is that 100 is easier to remember than either 90 or
110.

> > And perhaps not document the 110 value?  Just a thought.
> 
> I think we do want to document values greater than what `t` does: it can
> be important (e.g. for syntax-ppss-flush-cache) to make sure we stay
> closer to the end than those hooks appended via `t` for weaker reasons
> (e.g. because they don't want to be before some other function, although
> they don't really care if they're the very last one or not).
> 
> Also I think it's important to use the same convention as for add-function.

We can always document that in comments.

> But what I wonder is whether we should enforce the convention: currently
> we don't in add-function (and in this add-hook patch), so you can use
> a depth of 8345 if you feel like: it's really just a convention.
> 
> Also, maybe the docs should insist on the fact that 100/-100 should
> basically never be used since they imply that you're 100% sure that
> noone will ever need to come before/after you, and you can never be sure
> 100%.

We could have checkdoc complain about values we don't want to see in
application code.





  reply	other threads:[~2019-05-11 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 20:37 bug#35508: 27.0.50; Fine-ordering of functions on hooks Stefan Monnier
2019-04-30 21:37 ` Drew Adams
2019-04-30 22:31   ` Stefan Monnier
2019-05-01 18:00 ` Eli Zaretskii
2019-05-01 20:29   ` Stefan Monnier
2019-05-08 18:32     ` Stefan Monnier
2019-05-11 12:05       ` Eli Zaretskii
2019-05-11 13:26         ` Stefan Monnier
2019-05-11 13:54           ` Eli Zaretskii [this message]
2019-05-13 13:29             ` Stefan Monnier
2019-05-29 19:56               ` Stefan Monnier

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=83tve1cd0d.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=35508@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).