unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: emacs init and mode-maps
Date: Thu, 22 Jun 2006 10:58:15 +0200	[thread overview]
Message-ID: <v9u06d8t3s.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: e7dfnt$cjs$1@online.de

On Thu, Jun 22 2006, Andreas Roehler wrote:

> After defining a key in my emacs init file
>
> (define-key sh-mode-map "\M-#" 'variable-anlegen)
>
> emacs refused further loading and I got the following error
>
> "Symbol's value as variable is void: sh-mode-map".
>
> Meanwhile I know, that 
> (require 'sh-script)
>
> in the init file before will solve the problem.
>
> Nonetheless, I consider this error as not appropriate,
> as defining mode-keys in init files is a common task.

Use `eval-after-load' or a mode hook.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

  reply	other threads:[~2006-06-22  8:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22  7:17 emacs init and mode-maps Andreas Roehler
2006-06-22  8:58 ` Reiner Steib [this message]
2006-06-22  9:22   ` David Kastrup
2006-06-22 10:02     ` Reiner Steib
2006-06-22 13:58       ` Andreas Roehler
2006-06-22 14:44         ` David Kastrup
2006-06-23 10:38           ` Andreas Roehler
2006-06-24 11:01             ` Peter Dyballa
     [not found]             ` <mailman.3284.1151146887.9609.help-gnu-emacs@gnu.org>
2006-06-25  7:14               ` Andreas Roehler
2006-06-25  9:54                 ` David Kastrup
2006-06-23 10:38           ` Andreas Roehler
2006-06-23 10:54             ` David Kastrup
2006-06-23 20:51               ` Kevin Rodgers
2006-06-23 22:08                 ` Slawomir Nowaczyk
2006-06-26 16:12                   ` Kevin Rodgers
2006-06-27 12:03                     ` Slawomir Nowaczyk
2006-06-24  6:04               ` Andreas Roehler

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9u06d8t3s.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).