]> git.donarmstrong.com Git - emacs.git/blobdiff - .emacs
load don-configuration
[emacs.git] / .emacs
diff --git a/.emacs b/.emacs
index 672e569c2058286d6fd12a8a2ada2c170a3fabb8..7aa6fca7f4da564d86560c643a233ef305bf8755 100644 (file)
--- a/.emacs
+++ b/.emacs
@@ -20,8 +20,7 @@
  '(global-auto-revert-mode t)
  '(global-font-lock-mode t nil (font-lock))
  '(global-set-key "\347" t)
- '(iswitchb-mode t)
- '(iswitchb-prompt-newbuffer nil)
+ '(icomplete-mode t)
  '(log-edit-keep-buffer t)
  '(mail-user-agent (quote sendmail-user-agent))
  '(markdown-enable-math t)
 (fset 'perl-mode 'cperl-mode)
 ;;(load-file "cperl-mode.el")
 (add-to-list 'load-path '"~/lib/emacs_el/configuration/")
-(add-to-list 'load-path '"~/lib/emacs_el/")
-;; this is the tiny-tools module from https://github.com/jaalto/project--emacs-tiny-tools.git
-(add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/tiny")
-(add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/other")
-;;(add-to-list 'Tex-style-path '"~/lib/emacs_el/auctex/")
-
-(setq tinyprocmail--procmail-version "v3.22")
-(add-hook 'tinyprocmail--load-hook 'tinyprocmail-install)
-(require 'tinyprocmail)
+(require 'don-configuration)
 
 (require 'vcl-mode)
 
 (require 'tex-site)
 ;;(require 'psvn)
-(require 'cperl-mode)
 ;;(require 'ecasound)
 ;;(require 'emacs-wiki)
 (require 'bibtex)
                              (lambda () (html-mode) (auto-fill-mode)))
                            auto-mode-alist))
 
-;; Use c-mode for perl .xs files
-(add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
-(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
-(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
-(add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
-(add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
 
 ; use markdown mode for mdwn files
 (add-to-list 'auto-mode-alist '("\\.mdwn$" . markdown-mode))
@@ -158,9 +142,6 @@ Argument DESCRIPTION MIME description."
 (global-unset-key "\M-g")
 (global-set-key "\M-g" 'goto-line)
 
-;;(autoload 'perl-mode "cperl-mode"
-;;  "alternate mode for editing Perl programs" t)
-
 ;; self-insert-command hack.
 ;;   Without this, "if<SP>" expands to
 ;;   if ( -!-) {
@@ -168,20 +149,6 @@ Argument DESCRIPTION MIME description."
 ;;   which really should be,
 ;;   if (-!-) {
 ;;   }
-(setq cperl-hairy t
-      cperl-indent-level 4
-      cperl-auto-newline nil
-      cperl-auto-newline-after-colon nil
-      cperl-continued-statement-offset 4
-      cperl-brace-offset -1
-      cperl-continued-brace-offset 0
-      cperl-label-offset -4
-      cperl-highlight-variables-indiscriminately t
-      cperl-electric-lbrace-space nil
-      cperl-indent-parens-as-block nil
-      cperl-close-paren-offset -1
-      cperl-tab-always-indent t)
-;(add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
 
 
 
@@ -287,8 +254,6 @@ Argument DESCRIPTION MIME description."
     (fill-paragraph arg))
   )
 
-;(iswitchb-default-keybindings)
-
 (column-number-mode t)
 (setq-default reftex-plug-into-AUCTeX t)
 
@@ -348,7 +313,7 @@ Argument DESCRIPTION MIME description."
 
 (desktop-load-default)
 (desktop-read)
-'(iswitchb-mode on)
+'(icomplete-mode on)
 (custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
@@ -356,14 +321,6 @@ Argument DESCRIPTION MIME description."
  ;; If there is more than one, they won't work right.
  '(menu ((((type x-toolkit)) (:background "black" :foreground "grey90")))))
 
-(defun ess-change-directory (path)
-  "Set the current working directory to PATH for both *R* and Emacs."
-  (interactive "DDirectory to change to: ")
-
-  (when (file-exists-p path)
-    (ess-command (concat "setwd(\"" path "\")\n"))
-    ;; use file-name-as-directory to ensure it has trailing /
-    (setq default-directory (file-name-as-directory path))))
 
 (put 'upcase-region 'disabled nil)
 (put 'downcase-region 'disabled nil)
@@ -376,23 +333,11 @@ Argument DESCRIPTION MIME description."
 (add-hook 'c-mode-common-hook 'flyspell-prog-mode)
 (add-hook 'cperl-mode-hook 'flyspell-prog-mode)
 (add-hook 'tcl-mode-hook 'flyspell-prog-mode)
-(add-hook 'ess-mode-hook 'flyspell-prog-mode)
 (defun turn-on-flyspell ()
    "Force flyspell-mode on using a positive arg.  For use in hooks."
    (interactive)
    (flyspell-mode 1))
 
-;;; outlining support for ess modes
-(add-hook 'ess-mode-hook
-      '(lambda ()
-         (outline-minor-mode)
-         (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function\\)")
-         (defun outline-level ()
-           (cond ((looking-at "^##### ") 1)
-             ((looking-at "^#### ") 2)
-             ((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3)
-             (t 1000)))
-         ))
 
  ; Outline-minor-mode key map
  (define-prefix-command 'cm-map nil "Outline-")
@@ -559,6 +504,24 @@ Argument DESCRIPTION MIME description."
 
 ; require org mode
 (load "org-mode-configuration")
+; ess configuration
+(load "ess_remote_eval")
+(load "ess_configuration")
+; procmailmode configuration
+(load "procmail_mode")
+
+(load "mode-line-cleaner")
+
+(defadvice ask-user-about-supersession-threat (around ask-user-about-supersession-threat-if-necessary)
+  "Call ask-user-about-supersession-threat only if the buffer is actually obsolete."
+  (if (or (buffer-modified-p)
+          (verify-visited-file-modtime)
+          (< (* 8 1024 1024) (buffer-size))
+          (/= 0 (call-process-region 1 (+ 1 (buffer-size)) "diff" nil nil nil "-q" (buffer-file-name) "-")))
+      ad-do-it
+    (clear-visited-file-modtime)
+    (not-modified)))
+(ad-activate 'ask-user-about-supersession-threat)
 
 ; apparently things like to step on C-;, so we'll use a hack from
 ; http://stackoverflow.com/questions/683425/globally-override-key-binding-in-emacs/5340797#5340797 to fix this
@@ -584,3 +547,4 @@ Argument DESCRIPTION MIME description."
         (assq-delete-all 'my-keys-minor-mode minor-mode-map-alist)
         (add-to-list 'minor-mode-map-alist mykeys))))
 (ad-activate 'load)
+(global-set-key "\M- " 'hippie-expand)