GNU bug report logs - #16759
CC Mode modes: mode hooks are called twice.

Previous Next

Packages: emacs, cc-mode;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 14 Feb 2014 22:21:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 16759 <at> debbugs.gnu.org
Subject: bug#16759: CC Mode modes: mode hooks are called twice.
Date: Wed, 19 Feb 2014 12:29:24 -0500
Alan Mackenzie wrote:

> The cause of this is that there is an invocation of run-mode-hooks
> generated by the macro define-derived-mode as well as an explicit call to
> run-mode-hooks which is not at the end of the mode function.

IIUC, this is because you want to run some C-mode stuff after the hooks.
A simple solution would be to add :after-hook to define-derived-mode.
You already did this for define-minor-mode.
It would be good for symmetry/consistency if nothing else, and seems
pre-approved:

http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00140.html

:)




This bug report was last modified 9 years and 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.