summaryrefslogtreecommitdiffstats
path: root/.emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-09-05 11:03:19 +0200
committerGravatar Tom Willemsen2011-09-05 11:03:19 +0200
commit2ff16041c5656b53ba9d3e36c2e2c5e1eb2dba92 (patch)
treed6f9bd9542720cd90f97be6dbd2cb9f24146430c /.emacs.d
parent73f8cf00f053a5683e43572259cde38b19941cea (diff)
downloaddotfiles-2ff16041c5656b53ba9d3e36c2e2c5e1eb2dba92.tar.gz
dotfiles-2ff16041c5656b53ba9d3e36c2e2c5e1eb2dba92.zip
EMACS: Disable <CTRL>-z when in X
`.emacs.d/functions.el' - Removed functions `(x-init)' and `(cli-init)'. `.emacs.d/init.el' - Moved initialization for with and without window systems from seperate functions. - Globally unset <CTRL>-z when we have a window system.
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/functions.el8
-rw-r--r--.emacs.d/init.el15
2 files changed, 10 insertions, 13 deletions
diff --git a/.emacs.d/functions.el b/.emacs.d/functions.el
index 00a458a..5f3f1c0 100644
--- a/.emacs.d/functions.el
+++ b/.emacs.d/functions.el
@@ -108,14 +108,6 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
(insert ";;\n")
(insert-char ?\; width))
-(defun x-init ()
- "Initialization only for X"
- (setq linum-format " %d"))
-
-(defun cli-init ()
- "Add a space to the linum column"
- (setq linum-format "%d "))
-
(defun replace-occurrences (from to)
(save-excursion
(goto-char (point-min))
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 9331504..00f4e78 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -163,7 +163,16 @@
'(("ryuslash@gmail.com"
(:network-server . "talk.google.com")
(:connection-type . ssl))))
-
+
+;;; X11
+(when window-system
+ (setq linum-format " %d")
+ (global-unset-key "\C-z"))
+
+;;; CLI
+(when (not window-system)
+ (setq linum-format "%d "))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; AUTOLOADS ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -218,10 +227,6 @@
(setq initial-frame-alist ; initial frame settings
(append '((font . "DejaVu Sans Mono-11:antialias=true"))))
-(if window-system
- (x-init)
- (cli-init))
-
(fset 'yes-or-no-p 'y-or-n-p) ; switch yes or no to y or n
(tool-bar-mode -1) ; no toolbar