emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

define-derived-mode runs parent mode hook after evaluating body


From: martin rudalics
Subject: define-derived-mode runs parent mode hook after evaluating body
Date: Fri, 20 Jul 2007 11:00:50 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

A subtle bug with `define-derived-mode' I just met with
`change-log-mode'.  The latter's definition goes as ...

(define-derived-mode change-log-mode text-mode "Change Log"
  "..."
  (setq left-margin 8
        fill-column 74
        ...

...but in my .emacs I have:

(add-hook
 'text-mode-hook
 '(lambda () (setq fill-column 72)))

Consequently, my Change Log buffers have a `fill-column' of 72 which is
not really desirable.  I obviously don't have any intention to check
which of the major modes I eventually use derive from text-mode and add
the appropriate hooks there.

Is it really useful/needed to delay the hook of the parent mode in a
derived mode until after evaluating the body?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]