From 2ff16041c5656b53ba9d3e36c2e2c5e1eb2dba92 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 5 Sep 2011 11:03:19 +0200 Subject: EMACS: Disable -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 -z when we have a window system. --- .emacs.d/functions.el | 8 -------- .emacs.d/init.el | 15 ++++++++++----- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to '.emacs.d') 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 -- cgit v1.2.3-54-g00ecf