Permalink
Browse files

Clean up starter-kit-misc.el.

  • Loading branch information...
1 parent 7e9de05 commit 008de687b586ffa4244b09d64e5e5af00f232c20 @technomancy committed Dec 10, 2010
Showing with 43 additions and 28 deletions.
  1. +43 −28 starter-kit-misc.el
View
71 starter-kit-misc.el
@@ -1,6 +1,41 @@
-;;; starter-kit-misc.el --- Things that don't fit anywhere else
+;;; starter-kit-misc.el --- Saner defaults and goodies: miscellany
;;
-;; Part of the Emacs Starter Kit
+;; Copyright (c) 2008-2010 Phil Hagelberg and contributors
+;;
+;; Author: Phil Hagelberg <technomancy@gmail.com>
+;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit
+;; Version: 2.0
+;; Keywords: convenience
+
+;; This file is not part of GNU Emacs.
+
+;;; Commentary:
+
+;; "Emacs outshines all other editing software in approximately the
+;; same way that the noonday sun does the stars. It is not just bigger
+;; and brighter; it simply makes everything else vanish."
+;; -Neal Stephenson, "In the Beginning was the Command Line"
+
+;; This file contains setqs and things that aren't bindings or defuns.
+
+;;; License:
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 3
+;; of the License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
(when window-system
(setq frame-title-format '(buffer-file-name "%f" ("%b")))
@@ -11,19 +46,14 @@
;; can't do it at launch or emacsclient won't always honor it
(add-hook 'before-make-frame-hook 'esk-turn-off-tool-bar)
-(set-terminal-coding-system 'utf-8)
-(set-keyboard-coding-system 'utf-8)
-(prefer-coding-system 'utf-8)
(ansi-color-for-comint-mode-on)
(setq visible-bell t
- echo-keystrokes 0.1
- font-lock-maximum-decoration t
inhibit-startup-message t
- transient-mark-mode t
color-theme-is-global t
shift-select-mode nil
mouse-yank-at-point t
+ x-select-enable-clipboard t
require-final-newline t ; crontabs break without this
truncate-partial-width-windows nil
uniquify-buffer-name-style 'forward
@@ -32,7 +62,6 @@
whitespace-line-column 100
ediff-window-setup-function 'ediff-setup-windows-plain
oddmuse-directory "~/.emacs.d/oddmuse"
- xterm-mouse-mode t
save-place-file "~/.emacs.d/places")
(add-to-list 'safe-local-variable-values '(lexical-binding . t))
@@ -48,12 +77,6 @@
;; (setq browse-url-browser-function 'browse-url-generic
;; browse-url-generic-program "~/src/conkeror/conkeror")
-;; Transparently open compressed files
-(auto-compression-mode t)
-
-;; Enable syntax highlighting for older Emacsen that have it off
-(global-font-lock-mode t)
-
;; Save a list of recent files visited.
(recentf-mode 1)
@@ -80,14 +103,12 @@
"Hook that gets run on activation of any programming mode.")
(defalias 'yes-or-no-p 'y-or-n-p)
+
(random t) ;; Seed the random-number generator
;; Hippie expand: at times perhaps too hip
-(setq hippie-expand-try-functions-list
- (remove 'try-expand-line
- (remove 'try-expand-list
- (remove 'try-complete-file-name-partially
- hippie-expand-try-functions-list))))
+(dolist (f '(try-expand-line try-expand-list try-complete-file-name-partially))
+ (delete f hippie-expand-try-functions-list))
;; Add this back in at the end of the list.
(add-to-list 'hippie-expand-try-functions-list 'try-complete-file-name-partially t)
@@ -98,16 +119,13 @@
;; Associate modes with file extensions
(add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . diff-mode))
-(add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
(add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
-(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
(eval-after-load 'grep
'(when (boundp 'grep-find-ignored-files)
- (add-to-list 'grep-find-ignored-files "target")
- (add-to-list 'grep-find-ignored-files "*.class")))
+ (add-to-list 'grep-find-ignored-files "*.class")))
;; Default to unified diffs
(setq diff-switches "-u")
@@ -127,10 +145,7 @@
;; Platform-specific stuff
(when (eq system-type 'darwin)
;; Work around a bug on OS X where system-name is FQDN
- (setq system-name (car (split-string system-name "\\."))))
-
-;; make emacs use the clipboard
-(setq x-select-enable-clipboard t)
+ (setq esk-system-name (car (split-string esk-system-name "\\."))))
;; Get around the emacswiki spam protection
(add-hook 'oddmuse-mode-hook

0 comments on commit 008de68

Please sign in to comment.