From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Newsgroups: gmane.emacs.help Subject: global-set-key, error: Invalid modifier in string Date: Fri, 17 Aug 2007 05:08:46 -0000 Organization: http://groups.google.com Message-ID: <1187327326.366474.138940@o80g2000hse.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1187336815 19922 80.91.229.12 (17 Aug 2007 07:46:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2007 07:46:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 17 09:46:54 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ILwXl-0001g0-US for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Aug 2007 09:46:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILwXl-0007Z5-A9 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Aug 2007 03:46:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!o80g2000hse.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 65 Original-NNTP-Posting-Host: 67.86.66.31 Original-X-Trace: posting.google.com 1187327326 21070 127.0.0.1 (17 Aug 2007 05:08:46 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 17 Aug 2007 05:08:46 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: o80g2000hse.googlegroups.com; posting-host=67.86.66.31; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:151051 X-Mailman-Approved-At: Fri, 17 Aug 2007 03:46:37 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46625 Archived-At: 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(# 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 "" [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).