all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Strange code in derived.el.
Date: Thu, 09 Jun 2005 12:14:09 -0400	[thread overview]
Message-ID: <jwvk6l3qzmq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87u0k7jz7k.fsf@xs4all.nl> (Lute Kamstra's message of "Thu, 09 Jun 2005 18:02:07 +0200")

> I don't understand this piece of code at the end of
> define-derived-mode in lisp/emacs-lisp/derived.el:

> ,----
> | 	 ;; Run the hooks, if any.
> | 	 ;; Make the generated code work in older Emacs versions
> | 	 ;; that do not yet have run-mode-hooks.
> | 	 (if (fboundp 'run-mode-hooks)
> | 	     (run-mode-hooks ',hook)
> | 	   (run-hooks ',hook))))))
> `----

> Is the expansion of this define-derive-mode macro ever run in older
> Emacsen?

Hopefully not.  Such forward compatibility on .elc files is generally not
guaranteed.

> Wouldn't delay-mode-hooks (used unconditionally) be missing as well, then?

No: it's a macro so it'll be expanded away.

> Shall I just delete the test?

I'd say yes, but since someone went to the trouble of adding it (I didn't
write it in the original code) maybe this someone can explain why she found
it to be necessary/useful.


        Stefan

  reply	other threads:[~2005-06-09 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-09 16:02 Strange code in derived.el Lute Kamstra
2005-06-09 16:14 ` Stefan Monnier [this message]
2005-06-10 13:29 ` Richard Stallman
2005-06-10 14:32   ` Lute Kamstra
2005-06-10 16:03     ` Stefan Monnier
2005-06-11  6:46       ` Lute Kamstra
2005-06-11 12:17     ` Richard Stallman

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=jwvk6l3qzmq.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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 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.