Emacs 配置nt
;;;nt for windows
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;window-os ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;max-frame ;(defun w32-restore-fra me () ; "Restore a minimized frame" ; (interactive) ; (w32-send-sys-command 61728)) ; ;(defun w32-maximize-frame () ; "Maximize the current frame" ; (interactive) ; (w32-send-sys-command 61488)) ; ;(w32-maximize-frame) ; ;;(global-set-key (kbd "<M-f2>") 'tool-bar-mode) ;;(global-set-key (kbd "<C-M-f2>") 'menu-bar-mode) ; (run-with-idle-timer 1 nil 'w32-send-sys-command 61488) (defun toggle-full-screen () (interactive) (shell-command "emacs_fullscreen.exe")) (global-set-key [f11] 'toggle-full-screen) ;;;use-window-key (setq w32-pass-lwindow-to-system nil) ;; prevent single keypress from activating Start Menu (setq w32-lwindow-modifier 'nil) ;; make sure it's not used as a modifier (define-key key-translation-map (kbd "<lwindow>") 'event-apply-super-modifier) (define-key key-translation-map (kbd "<apps>") 'event-apply-alt-modifier) (global-set-key (kbd "s-l") 'kill-whole-line) (global-set-key (kbd "s-o") 'other-window) (global-set-key (kbd "s-k") 'kill-buffer) (global-set-key (kbd "s-`") 'set-mark-command) (global-set-key (kbd "s-0") 'undo) (global-set-key (kbd "s-1") 'linum-mode) (global-set-key (kbd "s-2") 'column-number-mode) (global-set-key (kbd "s-3") 'color-theme-emacs-21) (global-set-key (kbd "s-4") 'color-theme-matrix) (global-set-key (kbd "s-5") 'menu-bar-mode) (global-set-key (kbd "s-6") 'scroll-bar-mode) (global-set-key (kbd "s-7") 'fringe-mode) (global-set-key (kbd "s-8") 'tool-bar-mode)