From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: define-key for a major-mode, 'face and external program
Date: Wed, 12 Sep 2012 23:46:25 -0400 [thread overview]
Message-ID: <jwvzk4uegez.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.8702.1347441052.855.help-gnu-emacs@gnu.org
> (defcustom rct-mode-hook nil
> "Normal hook run when entering rct mode and many related modes."
> :type 'hook
> :options '(font-lock-mode t)
> :group 'rct)
> Actualy I don't know if it's usefull to add the property :options.
It's not very useful and `t' is not a valid value there (and
font-lock-mode is enabled by default, so very few people will want to
enable explicitly just for your mode).
BTW, this whole defcustom is unneeded since define-derived-mode already
defines the `rct-mode-hook' for you.
> I get an error:
> Debugger entered--Lisp error: (void-function add-hooks)
The error says you're calling a function that doesn't exist.
> (add-hooks 'rct-mode-hook)
There's `run-hooks' (which you don't need to call since
define-derived-mode does that for you), and there's `add-hook' which
requires one more argument and would be used in the user's .emacs file
rather than in your code.
Stefan
prev parent reply other threads:[~2012-09-13 3:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-08 22:38 define-key for a major-mode, 'face and external program pascal chenevas
2012-09-11 15:18 ` pascal chenevas
[not found] ` <mailman.8626.1347376754.855.help-gnu-emacs@gnu.org>
2012-09-12 0:45 ` Stefan Monnier
2012-09-12 9:10 ` pascal chenevas
[not found] ` <mailman.8702.1347441052.855.help-gnu-emacs@gnu.org>
2012-09-13 3:46 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzk4uegez.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.