среда, 31 августа 2011 г.

My EMACS config file at 2011-08-31

Here I save my EMACS config file for myself as backup and for everyone to see.



;;; Hijarian's .emacs config file
;;; 2011-08-31


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 1: MODES

;;; Enable Viper-mode by default
(setq viper-mode t)
(require 'viper)

;;; Autoload nXHTML-mode
(load "~/.emacs.d/nxhtml/autostart.el")

;;; Autoload SLIME
(add-to-list 'load-path "~/.emacs.d/slime/")
(require 'slime)
(slime-setup '(slime-fancy))
(setq slime-net-coding-system 'utf-8-unix)
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")
;;;Autoload quicklisp
(load (expand-file-name "~/systems/quicklisp/slime-helper.el"))

;;; Autoload CEDET
(load-file "~/.emacs.d/cedet/common/cedet.el")
;; Enabling projects
(global-ede-mode t)
;; Enabling code helpers
(semantic-load-enable-gaudy-code-helpers)
;; Enabling additional features for names completion
(require 'semantic-ia)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 2: SCROLLING

;;; Buffer corrections
(setq scroll-conservatively 5)
(setq scroll-margin 5)
(setq scroll-preserve-screen-position 1)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 3: INDENTATION RULES

;;; To set the mod-2 indentation used when you hit the TAB key
(setq c-basic-offset 2)
;;; To cause the TAB file-character to be interpreted as mod-4 indentation
(setq tab-width 4)
;;; To cause TAB characters to not be used in the file for compression, and for only spaces to be used
(setq-default indent-tabs-mode nil)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 4: KILL RING INTEGRATION IN X CLIPBOARD

; (transient-mark-mode 1)  ; Now on by default: makes the region act quite like the text "highlight" in many apps.
; (setq shift-select-mode t) ; Now on by default: allows shifted cursor-keys to control the region.
(setq mouse-drag-copy-region nil)  ; stops selection with a mouse being immediately injected to the kill ring
(setq x-select-enable-primary nil)  ; stops killing/yanking interacting with primary X11 selection
(setq x-select-enable-clipboard t)  ; makes killing/yanking interact with clipboard X11 selection

;; these will probably be already set to these values, leave them that way if so!
(setf interprogram-cut-function 'x-select-text)
(setf interprogram-paste-function 'x-cut-buffer-or-selection-value)

; You need an emacs with bug #902 fixed for this to work properly. It has now been fixed in CVS HEAD.
; it makes "highlight/middlebutton" style (X11 primary selection based) copy-paste work as expected
; if you're used to other modern apps (that is to say, the mere act of highlighting doesn't
; overwrite the clipboard or alter the kill ring, but you can paste in merely highlighted
; text with the mouse if you want to)
(setq select-active-regions t) ;  active region sets primary X11 selection
(global-set-key [mouse-2] 'mouse-yank-primary)  ; make mouse middle-click only paste from primary X11 selection, not clipboard and kill ring.

;; with this, doing an M-y will also affect the X11 clipboard, making emacs act as a sort of clipboard history, at
;; least of text you've pasted into it in the first place.
(setq yank-pop-change-selection t)  ; makes rotating the kill ring change the X11 clipboard.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 5: GENERIC INTERFACE UPDATES

;;; Disable toolbar
(tool-bar-mode -1)

;;; No startup message
(setq inhibit-startup-message t)

;;; Filenames in frametitle
(setq frame-title-format "%b")

;;; NO BEEPING MOTHERFUCKER
(setq visible-bell t)

;;; Show matching parentesis
(show-paren-mode 1)

;; Column & line numbers in mode bar
(column-number-mode t)
(line-number-mode t)

;;; Call find-file-dialog with C-x M-f
(defadvice find-file-read-args (around find-file-read-args-always-use-dialog-box act)
  "Simulate invoking menu item as if by the mouse; see `use-dialog-box'."
  (let ((last-nonmenu-event nil))
    ad-do-it))
(global-set-key (kbd "C-x M-f") 'menu-find-file-existing)

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(initial-scratch-message nil))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :background "#ffffff" :foreground "#000000" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 87 :width normal :foundry "unknown" :family "Liberation Mono")))))
(put 'upcase-region 'disabled nil)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Комментариев нет:

Отправить комментарий