]> git.donarmstrong.com Git - emacs.git/commitdiff
switch to icomplete; use mode line clearner; dont ask about supersession
authorDon Armstrong <don@donarmstrong.com>
Thu, 20 Nov 2014 21:29:52 +0000 (13:29 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 20 Nov 2014 21:29:52 +0000 (13:29 -0800)
.emacs

diff --git a/.emacs b/.emacs
index 30b1f557b4e49b7f23e44c844336165d70d1b7b5..1d32ab9481b6e163d7571f47ede47c723f81eee4 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)
@@ -287,8 +286,6 @@ Argument DESCRIPTION MIME description."
     (fill-paragraph arg))
   )
 
-;(iswitchb-default-keybindings)
-
 (column-number-mode t)
 (setq-default reftex-plug-into-AUCTeX t)
 
@@ -348,7 +345,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.
@@ -543,6 +540,19 @@ Argument DESCRIPTION MIME description."
 (load "ess_remote_eval")
 (load "ess_configuration")
 
+(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