Permalink
Browse files

keybinding for expand-region

  • Loading branch information...
1 parent 21ee8f3 commit d83cdc8dbd35cc296a8392b8fbd57e5dbe965424 @redguardtoo redguardtoo committed Feb 25, 2012
Showing with 12 additions and 4 deletions.
  1. +11 −3 init-misc.el
  2. +1 −1 init.el
View
14 init-misc.el
@@ -174,9 +174,17 @@
(track-closed-files-mode)
-(global-set-key (kbd "C-@") 'er/expand-region)
-(global-set-key (kbd "C-M-@") 'er/contract-region)
-(global-set-key (kbd "M-SPC") 'set-mark-command) ;borrowed from ergoemacs
+; if emacs-nox, use C-@, else, use C-2;
+(if window-system
+ (progn
+ (define-key global-map (kbd "C-2") 'er/expand-region)
+ (define-key global-map (kbd "C-M-2") 'er/contract-region)
+ )
+ (progn
+ (define-key global-map (kbd "C-@") 'er/expand-region)
+ (define-key global-map (kbd "C-M-@") 'er/contract-region)
+ )
+)
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
View
2 init.el
@@ -85,7 +85,6 @@
(require 'init-spelling))
(require 'init-marmalade)
-(require 'init-misc)
;; Finally set up themes, after most possibly-customised faces have been defined
(require 'init-themes) ; color-themes 6.6.1 has some problem
@@ -114,6 +113,7 @@
(require 'init-undo-tree)
(require 'init-moz)
+(require 'init-misc)
;;----------------------------------------------------------------------------
;; Allow access from emacsclient
;;----------------------------------------------------------------------------

0 comments on commit d83cdc8

Please sign in to comment.