all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* define-derived-mode runs parent mode hook after evaluating body
@ 2007-07-20  9:00 martin rudalics
  2007-07-20 16:09 ` Stefan Monnier
  2007-07-20 16:11 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: martin rudalics @ 2007-07-20  9:00 UTC (permalink / raw)
  To: emacs-devel

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?

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

end of thread, other threads:[~2007-07-22 21:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-20  9:00 define-derived-mode runs parent mode hook after evaluating body martin rudalics
2007-07-20 16:09 ` Stefan Monnier
2007-07-21 16:54   ` Richard Stallman
2007-07-22  3:08     ` Stefan Monnier
2007-07-22 18:37       ` Richard Stallman
2007-07-20 16:11 ` Stefan Monnier
2007-07-21  9:21   ` martin rudalics
2007-07-22 18:36     ` Stefan Monnier
2007-07-22 21:22       ` martin rudalics

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.