shosei

.emacs

Mar 14th, 2012
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 2.47 KB | None | 0 0
  1. ;; ;; Set default foreground and background colors
  2. (set-foreground-color "White")
  3. (set-background-color "Black")
  4. (set-cursor-color "Gold")
  5. (set-mouse-color "Black")
  6. (set-border-color "Black")
  7.  
  8. ;; Disable tool-bar-mode at startup
  9.  (tool-bar-mode nil)
  10.  
  11. ;; Sets pretty-print result of a sexp evaluation in a separate buffer, *Pp Eval Output*’
  12. (global-set-key [remap eval-last-sexp] 'pp-eval-last-sexp)
  13. `````````
  14. ;; Forward sentence
  15. (setq next-line-add-newlines nil)
  16.  
  17. ;; Visual feedback on selections
  18. (setq-default transient-mark-mode t)
  19. ;; Show line and column numbers in the mode line
  20. (line-number-mode t)
  21. (column-number-mode t)
  22.  
  23. ;; ;; Make sure emacs isn't accidentally killed
  24. ;; (defun paranoid-exit-from-emacs()
  25. ;;   (interactive)
  26. ;;   (if (yes-or-no-p "Do you want to exit? ")
  27. ;;       (save-buffers-kill-emacs)))
  28. ;; (global-set-key "\C-x\C-c" 'paranoid-exit-from-emacs)
  29.  
  30. `
  31. ;; Shhhh!
  32. (setq visible-bell t)
  33.  
  34. ;; Autocompilation
  35. (defun autocompile()
  36.   "compile itself if ~/.emacs"
  37.   (interactive))
  38.   (if (string= (buffer-file-name) (concat default-directory ".emacs"))
  39.       (byte-compile-file (buffer-file-name)))
  40.  
  41.  
  42.  
  43. ;; enable interactive completion mode in minibuffer
  44. (icomplete-mode)
  45.  
  46. ;; highlight-changes-mode
  47. (global-highlight-changes-mode t)
  48.  
  49. ;; global-hl-line-mode
  50. (global-hl-line-mode t)
  51.  
  52.  ;;global-font-lock
  53. (global-font-lock-mode t)
  54.  
  55. ;; Turn on global word-wrap
  56. (global-visual-line-mode t)
  57.  
  58. ;; Display the name of the file being edited in the title bar.
  59. (setq frame-title-format "%b")
  60.  
  61.  
  62. (global-set-key "\C-x\C-m" 'execute-extended-command)
  63. (global-set-key "\C-c\C-m" 'execute-extended-command)
  64.  
  65. ;; Deletes the last word
  66. (global-set-key "\C-w" 'backward-kill-word)
  67. (global-set-key "\C-x\C-k" 'kill-region)
  68. (global-set-key "\C-c\C-k" 'kill-region)
  69.  
  70.  
  71. (global-set-key [f5] 'call-last-kbd-macro)
  72.  
  73.  
  74. ;; Show line-number in the mode line
  75. (line-number-mode 1)
  76.  
  77. ;; Show column-number in the mode line
  78. (column-number-mode 1)
  79.  
  80. ;; setting default fill-column
  81. (setq-default fill-column 72)
  82.  
  83. ;; auto-fill in all modes
  84. (setq auto-fill-mode 1)
  85.  
  86. (global-hi-lock-mode t)
  87. ;;===== Set standard indent to 2 rather that 4 ====
  88. (setq standard-indent 2)
  89.  
  90. ;; hl-line-mode all modes
  91. (global-hl-line-mode t)
  92.  
  93. ;; highlight-changes for all modes
  94. (global-highlight-changes-mode t)
  95.  
  96.  
  97. (defvar hl-line-face)                   ; Quiet the byte-compiler.
  98. (defvar global-hl-line-mode)            ; Quiet the byte-compiler.
  99. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Advertisement
Add Comment
Please, Sign In to add comment