Mercurial > emacs
comparison lisp/derived.el @ 50586:3bbd33912c1d
(define-derived-mode): Make generated code work in
Emacs versions that do not have run-mode-hooks.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 14 Apr 2003 10:11:04 +0000 |
parents | 8ba8d2d4ead4 |
children | d91863669383 |
comparison
equal
deleted
inserted
replaced
50585:1e9e1fa3548b | 50586:3bbd33912c1d |
---|---|
223 ,(when syntax `(set-syntax-table ,syntax)) | 223 ,(when syntax `(set-syntax-table ,syntax)) |
224 ,(when abbrev `(setq local-abbrev-table ,abbrev)) | 224 ,(when abbrev `(setq local-abbrev-table ,abbrev)) |
225 ; Splice in the body (if any). | 225 ; Splice in the body (if any). |
226 ,@body | 226 ,@body |
227 ) | 227 ) |
228 ; Run the hooks, if any. | 228 ;; Run the hooks, if any. |
229 (run-mode-hooks ',hook))))) | 229 ;; Make the generated code work in older Emacs versions |
230 ;; that do not yet have run-mode-hooks. | |
231 (if (fboundp 'run-mode-hooks) | |
232 (run-mode-hooks ',hook) | |
233 (run-hooks ',hook)))))) | |
230 | 234 |
231 ;; PUBLIC: find the ultimate class of a derived mode. | 235 ;; PUBLIC: find the ultimate class of a derived mode. |
232 | 236 |
233 (defun derived-mode-class (mode) | 237 (defun derived-mode-class (mode) |
234 "Find the class of a major MODE. | 238 "Find the class of a major MODE. |