unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Key binding in local keymap problem
@ 2008-09-09 20:18 etay.meiri
  2008-09-09 20:45 ` Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: etay.meiri @ 2008-09-09 20:18 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I have the following line in my .emacs:

(define-key gud-mode-map [f9] 'gud-break)

and I get an error that the value of gud-mode-map is void.

Here's the full log:

("/usr/bin/emacs-22.2")
Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/igrep-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el
(source)...done
Loading advice...done
Loading dired-x...done
Loading /home/cl/.recentf...done
Cleaning up the recentf list...done (0 removed)
Loading ido...done
Loading cua-base...done
Loading /home/cl/.emacs_packages/cedet-1.0pre4/common/cedet.el
(source)...
"/home/cl/.emacs_packages/cedet-1.0pre4/common/" added to `load-path'
Loading cl-macs...done
"/home/cl/.emacs_packages/cedet-1.0pre4/cogre" added to `load-path'
"/home/cl/.emacs_packages/cedet-1.0pre4/ede" added to `load-path'
"/home/cl/.emacs_packages/cedet-1.0pre4/eieio" added to `load-path'
"/home/cl/.emacs_packages/cedet-1.0pre4/semantic" added to `load-path'
"/home/cl/.emacs_packages/cedet-1.0pre4/speedbar" added to `load-path'
"/home/cl/.emacs_packages/cedet-1.0pre4/contrib" added to `load-path'
Setting up cedet...done
Setting up cogre...done
Setting up ede...
Loading ede...
!! File eieio uses old-style backquotes !!
Loading ede-speedbar...done
Loading ede...done
Setting up ede...done
Setting up eieio...done
Setting up semantic...
Loading derived...done
Setting up semantic...done
Setting up speedbar...done
Setting up cedet-contrib...done
Loading /home/cl/.emacs_packages/cedet-1.0pre4/common/cedet.el
(source)...done
Loading semantic-idle...done
Loading senator...
Loading ring...done
Loading senator...done
Loading /home/cl/.emacs_packages/cedet-1.0pre4/common/cedet.el
(source)...
"/home/cl/.emacs_packages/cedet-1.0pre4/common/" added to `load-path'
Setting up cedet...done
Setting up cogre...done
Setting up ede...done
Setting up eieio...done
Setting up semantic...done
Setting up speedbar...done
Setting up cedet-contrib...done
Loading /home/cl/.emacs_packages/cedet-1.0pre4/common/cedet.el
(source)...done

An error has occurred while loading `/home/cl/.emacs':

Symbol's value as variable is void: gud-mode-map

Any idea?

Thanks,

-Etay


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

* RE: Key binding in local keymap problem
  2008-09-09 20:18 Key binding in local keymap problem etay.meiri
@ 2008-09-09 20:45 ` Drew Adams
  2008-09-09 21:02   ` Juanma
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2008-09-09 20:45 UTC (permalink / raw)
  To: etay.meiri, help-gnu-emacs

> I have the following line in my .emacs:
> (define-key gud-mode-map [f9] 'gud-break)
> and I get an error that the value of gud-mode-map is void.

You need to load library `gud' before you do that.
It defines variable `gud-mode-map' and gives it a value.





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

* Re: Key binding in local keymap problem
  2008-09-09 20:45 ` Drew Adams
@ 2008-09-09 21:02   ` Juanma
  2008-09-09 21:46     ` Drew Adams
  2008-09-11  8:41     ` Nikolaj Schumacher
  0 siblings, 2 replies; 5+ messages in thread
From: Juanma @ 2008-09-09 21:02 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday 09 September 2008, Drew Adams wrote:
> > I have the following line in my .emacs:
> > (define-key gud-mode-map [f9] 'gud-break)
> > and I get an error that the value of gud-mode-map is void.
> 
> You need to load library `gud' before you do that.
> It defines variable `gud-mode-map' and gives it a value.

So, if you don't want to load `gud' on Emacs start-up, use `add-hook':

(add-hook 'gud-mode-hook
          (lambda () (define-key gud-mode-map [f9] 'gud-break)))
-- 
Juanma

"Having a smoking section in a restaurant is like
 having a peeing section in a swimming pool."
       -- Edward Burr






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

* RE: Key binding in local keymap problem
  2008-09-09 21:02   ` Juanma
@ 2008-09-09 21:46     ` Drew Adams
  2008-09-11  8:41     ` Nikolaj Schumacher
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2008-09-09 21:46 UTC (permalink / raw)
  To: 'Juanma', help-gnu-emacs

> > > I have the following line in my .emacs:
> > > (define-key gud-mode-map [f9] 'gud-break)
> > > and I get an error that the value of gud-mode-map is void.
> > 
> > You need to load library `gud' before you do that.
> > It defines variable `gud-mode-map' and gives it a value.
> 
> So, if you don't want to load `gud' on Emacs start-up, use `add-hook':
> (add-hook 'gud-mode-hook
>           (lambda () (define-key gud-mode-map [f9] 'gud-break)))

Yes, I should have added that. Thanks.





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

* Re: Key binding in local keymap problem
  2008-09-09 21:02   ` Juanma
  2008-09-09 21:46     ` Drew Adams
@ 2008-09-11  8:41     ` Nikolaj Schumacher
  1 sibling, 0 replies; 5+ messages in thread
From: Nikolaj Schumacher @ 2008-09-11  8:41 UTC (permalink / raw)
  To: Juanma; +Cc: help-gnu-emacs

Juanma <juanma_bellon@yahoo.es> wrote:

> On Tuesday 09 September 2008, Drew Adams wrote:
> (add-hook 'gud-mode-hook
>           (lambda () (define-key gud-mode-map [f9] 'gud-break)))

I think it's cleaner to do the customizations like this:

(eval-after-load 'gud '(define-key gud-mode-map [f9] 'gud-break))

So they aren't executed every time the mode is started.

regards,
Nikolaj Schumacher




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

end of thread, other threads:[~2008-09-11  8:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-09 20:18 Key binding in local keymap problem etay.meiri
2008-09-09 20:45 ` Drew Adams
2008-09-09 21:02   ` Juanma
2008-09-09 21:46     ` Drew Adams
2008-09-11  8:41     ` Nikolaj Schumacher

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).