unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Strange code in derived.el.
@ 2005-06-09 16:02 Lute Kamstra
  2005-06-09 16:14 ` Stefan Monnier
  2005-06-10 13:29 ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Lute Kamstra @ 2005-06-09 16:02 UTC (permalink / raw)


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?  Wouldn't delay-mode-hooks (used unconditionally) be missing
as well, then?

Shall I just delete the test?

Lute.


Index: lisp/emacs-lisp/derived.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/derived.el,v
retrieving revision 1.6
diff -c -r1.6 derived.el
*** lisp/emacs-lisp/derived.el	21 May 2005 22:35:35 -0000	1.6
--- lisp/emacs-lisp/derived.el	9 Jun 2005 15:39:48 -0000
***************
*** 235,245 ****
  	  ,@body
  	  )
  	 ;; 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))))))
  
  ;; PUBLIC: find the ultimate class of a derived mode.
  
--- 235,241 ----
  	  ,@body
  	  )
  	 ;; Run the hooks, if any.
! 	 (run-mode-hooks ',hook)))))
  
  ;; PUBLIC: find the ultimate class of a derived mode.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-06-11 12:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-09 16:02 Strange code in derived.el Lute Kamstra
2005-06-09 16:14 ` Stefan Monnier
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

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).