From: John <jmg3000@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: global-set-key, error: Invalid modifier in string
Date: Fri, 17 Aug 2007 05:08:46 -0000 [thread overview]
Message-ID: <1187327326.366474.138940@o80g2000hse.googlegroups.com> (raw)
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).
next reply other threads:[~2007-08-17 5:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 5:08 John [this message]
2007-08-17 8:17 ` global-set-key, error: Invalid modifier in string 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
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=1187327326.366474.138940@o80g2000hse.googlegroups.com \
--to=jmg3000@gmail.com \
--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.