Browse Source

bind my-prefix-map to C-xC-x, cleanse code

pull/1/head
10sr 13 years ago
parent
commit
575b96115f
1 changed files with 19 additions and 18 deletions
  1. +19
    -18
      .emacs.el

+ 19
- 18
.emacs.el View File

@@ -9,16 +9,9 @@
(unless (file-directory-p (expand-file-name "~/.emacs.d/lisp")) (unless (file-directory-p (expand-file-name "~/.emacs.d/lisp"))
(make-directory (expand-file-name "~/.emacs.d/lisp"))) (make-directory (expand-file-name "~/.emacs.d/lisp")))
(add-to-list 'load-path "~/.emacs.d/lisp") (add-to-list 'load-path "~/.emacs.d/lisp")
(add-to-list 'load-path "~/dbx/Public/myelisp")


(require 'cl) (require 'cl)


(defvar my-prefix-map
(make-sparse-keymap))
(global-set-key (kbd "C-z") my-prefix-map)
(define-key my-prefix-map (kbd "C-q") 'quoted-insert)
(define-key my-prefix-map (kbd "C-z") 'suspend-frame)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; start and quit ;; start and quit


@@ -79,6 +72,13 @@
(prefer-coding-system 'utf-8-unix) (prefer-coding-system 'utf-8-unix)
(setq system-time-locale "C") (setq system-time-locale "C")


(defvar my-prefix-map
(make-sparse-keymap))
(define-key ctl-x-map (kbd "C-x") my-prefix-map)
(define-key my-prefix-map (kbd "C-q") 'quoted-insert)
(define-key my-prefix-map (kbd "C-z") 'suspend-frame)


;; display ;; display
(setq redisplay-dont-pause t) (setq redisplay-dont-pause t)
(setq visible-bell t) (setq visible-bell t)
@@ -170,9 +170,9 @@
(global-set-key (kbd "C-<down>") (lambda () (interactive)(scroll-up 1))) (global-set-key (kbd "C-<down>") (lambda () (interactive)(scroll-up 1)))
(global-set-key (kbd "C-<left>") 'scroll-down) (global-set-key (kbd "C-<left>") 'scroll-down)
(global-set-key (kbd "C-<right>") 'scroll-up) (global-set-key (kbd "C-<right>") 'scroll-up)
(global-set-key (kbd "C-x M-x") 'execute-extended-command)
(global-set-key (kbd "C-x M-:") 'eval-expression)
(global-set-key (kbd "<select>") 'previous-line-mark) (global-set-key (kbd "<select>") 'previous-line-mark)
(define-key ctl-x-map (kbd "M-x") 'execute-extended-command)
(define-key ctl-x-map (kbd "M-:") 'eval-expression)


;; C-h and DEL ;; C-h and DEL
(global-set-key (kbd "C-h") (kbd "DEL")) (global-set-key (kbd "C-h") (kbd "DEL"))
@@ -238,7 +238,14 @@
(setq show-paren-style 'mixed) (setq show-paren-style 'mixed)


(transient-mark-mode 1) (transient-mark-mode 1)

(global-font-lock-mode 1) (global-font-lock-mode 1)
(setq font-lock-global-modes
'(not
help-mode
eshell-mode
term-mode
Man-mode))


(standard-display-ascii ?\n "$\n") (standard-display-ascii ?\n "$\n")
(copy-face 'default 'my-eol-face) (copy-face 'default 'my-eol-face)
@@ -290,13 +297,6 @@
'(not '(not
term-mode)) term-mode))


(setq font-lock-global-modes
'(not
help-mode
eshell-mode
term-mode
Man-mode))

(add-hook 'font-lock-mode-hook (add-hook 'font-lock-mode-hook
(lambda () (lambda ()
;; (font-lock-add-keywords nil my-eol-face) ;; (font-lock-add-keywords nil my-eol-face)
@@ -410,6 +410,7 @@ emacs-major-version
(setq auto-save-list-file-prefix (expand-file-name "~/.emacs.d/autosave/")) (setq auto-save-list-file-prefix (expand-file-name "~/.emacs.d/autosave/"))
(setq delete-auto-save-files t) (setq delete-auto-save-files t)


(add-to-list 'completion-ignored-extensions ".bak")
;; (setq delete-by-moving-to-trash t ;; (setq delete-by-moving-to-trash t
;; trash-directory "~/.emacs.d/trash") ;; trash-directory "~/.emacs.d/trash")


@@ -487,8 +488,8 @@ if EXCLUDE-CURRENT-BUFFER-P is non-nil, never kill current buffer"


;; (define-key my-prefix-map (kbd "C-h") help-map) ;; (define-key my-prefix-map (kbd "C-h") help-map)
(global-set-key (kbd "C-\\") help-map) (global-set-key (kbd "C-\\") help-map)
(global-set-key (kbd "C-x DEL") help-map)
(global-set-key (kbd "C-x C-h") help-map)
(define-key ctl-x-map (kbd "DEL") help-map)
(define-key ctl-x-map (kbd "C-h") help-map)
(define-key help-map "a" 'apropos) (define-key help-map "a" 'apropos)


;; compose window ;; compose window


Loading…
Cancel
Save