X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/a41fc1c8dcb42f798904e5d93d82b27fac68d704..e357ccfe8e6f85c8adb5781b90cea7872e50b015:/dot/emacs diff --git a/dot/emacs b/dot/emacs index 5a3f712..e1a5d6e 100644 --- a/dot/emacs +++ b/dot/emacs @@ -84,7 +84,7 @@ (require 'paren) (trap (show-paren-mode t)) -(or window-system (menu-bar-mode -1)) +(or window-system (>= emacs-major-version 22) (menu-bar-mode -1)) ;; Multiple cursors. @@ -93,6 +93,12 @@ (autoload 'mdw-multiple-cursors-keymap "mdw-multiple-cursors.el" "A keymap for Magnar Sveen's awesome multiple-cursors." nil 'keymap) +;; Rust mode. + +(setq load-path (nconc load-path (list "~/lib/emacs/rust-mode/"))) +(autoload 'rust-mode "rust-mode" nil t) +(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) + ;; Temporary directory handling. (defun mdw-check-dir-exists (dir) @@ -429,18 +435,22 @@ ;; Default frame size. (setq default-frame-alist - (mdw-uniquify-alist - `((width . ,(if (>= emacs-major-version 21) 77 78)) - (height . 33) - (vertical-scroll-bars . right) - (cursor-type . bar) - (cursor-blink . t) - (left-fringe . 5) - (right-fringe . 5) - (scroll-bar-width . 15) - (cursor-color . "red") - (background-mode . ,(if mdw-black-background 'dark 'light))))) -(setq window-system-default-frame-alist + `((width . ,(if (>= emacs-major-version 21) 77 78)) + (height . 33) + (vertical-scroll-bars . right) + (cursor-type . bar) + (cursor-blink . t) + (left-fringe . 5) + (right-fringe . 5) + (scroll-bar-width . 15) + (tool-bar-lines . 0) + (menu-bar-lines . 1) + (cursor-color . "red") + (background-mode . ,(if mdw-black-background 'dark 'light))) + initial-frame-alist + `((width . ,(if (>= emacs-major-version 21) 77 78)) + (menu-bar-lines . ,(if window-system 1 0))) + window-system-default-frame-alist '((pm (font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850") (menu-font . "8.Helv") (background-color . "lightgrey")) @@ -460,6 +470,8 @@ (setq windmove-wrap-around t) (trap (iswitchb-mode)) (progn + (global-set-key [?\e ?\e] 'mdw-wrong) + (global-set-key [?\e ?\C-\] ?\C-\]] 'keyboard-escape-quit) (global-set-key [?\C-x ?w left] 'windmove-left) (global-set-key [?\C-x ?w ?h] 'windmove-left) (global-set-key [?\C-x ?w up] 'windmove-up) @@ -500,6 +512,7 @@ (global-set-key [XF86WakeUp] "") (global-set-key [?\C-c ?d ?w] 'devhelp-word-at-point) (global-set-key [?\C-c ?d ?a] 'devhelp-assistant-word-at-point) + (global-set-key [f11] 'mdw-toggle-full-screen) (and (not mdw-fast-startup) (fboundp 'hippie-expand) (global-set-key [?\M-/] 'hippie-expand))) @@ -579,11 +592,11 @@ ("@BASH@" . sh-mode) ("@PYTHON@" . python-mode) ("@PERL@" . cperl-mode) - ("/perl" . cperl-mode) + ("perl" . cperl-mode) ("@TCLSH@" . tcl-mode) ("@WISH@" . tcl-mode) - ("/tclsh" . tcl-mode) - ("/wish" . tcl-mode)) + ("tclsh" . tcl-mode) + ("wish" . tcl-mode)) interpreter-mode-alist)) (setq completion-ignored-extensions @@ -607,7 +620,7 @@ tcl-mode-hook go-mode-hook js-mode-hook javascript-mode-hook conf-mode-hook m4-mode-hook autoconf-mode-hook autotest-mode-hook a68-mode-hook a68-mode-hooks asm-mode-hook fsharp-mode-hook - scala-mode-hook TeX-mode-hook LaTeX-mode-hook + scala-mode-hook rust-mode-hook TeX-mode-hook LaTeX-mode-hook TeXinfo-mode-hook tex-mode-hook latex-mode-hook texinfo-mode-hook emacs-lisp-mode-hook scheme-mode-hook lisp-mode-hook lisp-interaction-mode-hook makefile-mode-hook @@ -685,6 +698,7 @@ (add-hook 'linux-c-mode-hook #'(lambda () (setq c-basic-offset 8))) (add-hook 'asm-mode-hook 'mdw-fontify-asm t) (add-hook 'go-mode-hook 'mdw-fontify-go t) + (add-hook 'rust-mode-hook 'mdw-fontify-rust t) (add-hook 'icon-mode-hook 'mdw-fontify-icon t)