Configure .emacs file

From Notes_Wiki
Revision as of 04:55, 13 November 2012 by Saurabh (talk | contribs) (Created page with "=Configure .emacs file= Use following as <tt>.emacs</tt> configuration. If there are already few lines in .emacs file then these lines can be appended / prepended to existing...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Configure .emacs file

Use following as .emacs configuration. If there are already few lines in .emacs file then these lines can be appended / prepended to existing file:

(setq load-path (cons "~/.emacs.d" load-path))

;;Preventing emacs from creating backup files
(setq make-backup-files nil)

;;Preventing emacs from creating auto-save files
(setq auto-save-default nil)

;;Use visual-line-mode for word wrap
(global-visual-line-mode 1)

;;Wrap lines at 60 columns
(set-fill-column 60)

;;Wrap lines at 60 columns and enable auto-fill-mode automatically
(setq-default fill-column 60)
(add-hook 'text-mode-hook 'turn-on-auto-fill)

;;Set default font-size to 160 (16pt)
(set-face-attribute 'default nil :height 160) 


;;Setting up Emacs for use with Erlang
;;Update the below mentioned paths appropriately based on installation
(add-to-list 'load-path "/usr/local/lib/erlang/lib/tools-2.6.7/emacs/")
(require 'erlang-start)

(add-to-list 'auto-mode-alist '("\\.erl?$" . erlang-mode))
(add-to-list 'auto-mode-alist '("\\.hrl?$" . erlang-mode))

(setq erlang-root-dir "/usr/local/lib/erlang")
(add-to-list 'exec-path "/usr/local/lib/erlang/bin")
(setq erlang-man-root-dir "/usr/local/lib/erlang/man")


;;Make emacs copy-paste M-w, C-y work with system copy-paste
(setq x-select-enable-clipboard t)



If you have installed ELPA (Emacs Lisp Package Archive) then it might have added few lines of its own.