[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Strange code in derived.el.
From: |
Lute Kamstra |
Subject: |
Strange code in derived.el. |
Date: |
Thu, 09 Jun 2005 18:02:07 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
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.
- Strange code in derived.el.,
Lute Kamstra <=