all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* global-set-key, error: Invalid modifier in string
@ 2007-08-17  5:08 John
  2007-08-17  8:17 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: John @ 2007-08-17  5:08 UTC (permalink / raw)
  To: help-gnu-emacs

I'm trying to remap just a few keys around, but Emacs is telling me
"error: Invalid modifier in string". Here's what I'm dropping into the
middle of my ~/.emacs file:

;; To scroll the window up/down by one line. Stealing M-<
;; and M->. I'll use some other keys for beginning- and
;; end-of-buffer (see below).
(global-set-key "\M-<" '"\C-u1\C-v")
(global-set-key "\M->" '"\C-u1\M-v")

;; Used to be M-< and M->
(global-set-key "\M-," 'beginning-of-buffer)
(global-set-key "\M-." 'end-of-buffer)

;; Used to be M-, and M-.
(global-set-key "\C-<" 'tags-loop-continue)
(global-set-key "\C->" 'find-tag)

;; Used to be M-{ and M-}
(global-set-key "\M-{" nil)
(global-set-key "\M-}" nil)
(global-set-key "\M-p" 'backward-paragraph)
(global-set-key "\M-n" 'forward-paragraph)

;; Used to be M-v and C-v
(global-set-key "\C-v" nil)
(global-set-key "\M-v" nil)
(global-set-key "\C-," 'scroll-down)
(global-set-key "\C-." 'scroll-up)

Seems like some of the Alt keys are working, but the ones with "\C-"
in them are causing the error. I think I'm correctly following the
example in the manual ("57.4.6 Rebinding Keys in Your Init File"). Are
there rules about the order in which you set the bindings?

I'm setting some of those to nil just because I'd guess it would be
easier to acclimate to the new ones without the old ones still
working.

Starting Emacs with --debug-init gives me:


Debugger entered--Lisp error: (error "Invalid modifier in string")
  eval-buffer(#<buffer  *load*> nil "/home/john/.emacs" nil t)  ;
Reading at buffer position 2007
  load-with-code-conversion("/home/john/.emacs" "/home/john/.emacs" t
t)
  load("~/.emacs" t t)
  #[ nil "<snip lots of escaped hexy-looking backslash-ridden
stuff>" [init-file-user system-type user-init-file-1 user-init-file
otherfile source ms-dos "~" "/_emacs" windows-nt directory-files nil "^
\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/
_emacs" vax-vms "sys$login:.emacs" "/.emacs" t load expand-file-name
"init" file-name-as-directory "/.emacs.d" file-name-extension "elc"
file-name-sans-extension ".el" file-exists-p file-newer-than-file-p
message "Warning: %s is newer than %s" sit-for 1 "default" alt inhibit-
default-init inhibit-startup-message] 7]()
  command-line()
  normal-top-level()


Any corrections would be much appreciated.

This is GNU Emacs 22.0.91.1 on Ubuntu (the emacs-snapshot-gtk package).

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

end of thread, other threads:[~2007-08-20  6:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17  5:08 global-set-key, error: Invalid modifier in string John
2007-08-17  8:17 ` Peter Dyballa
2007-08-17 10:13 ` Johan Bockgård
2007-08-17 15:20   ` John
2007-08-17 15:40     ` John
2007-08-19 15:56       ` Johan Bockgård
2007-08-17 18:16     ` Emilio Lopes
2007-08-20  6:12       ` Stefan Monnier
     [not found] ` <mailman.4897.1187338712.32220.help-gnu-emacs@gnu.org>
2007-08-17 15:08   ` John

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.