diff .elisp/settings/90.which-function-mode.el @ 354:3d46ce32c14e

which-function-mode: only enable in emacs 24.4 and later Emacs 24.3.x has a bug in which-function-mode that causes my emacs to lock up for several seconds. Rather than tolerate that, just disable which-function-mode on those systems.
author Augie Fackler <raf@durin42.com>
date Tue, 18 Nov 2014 17:17:36 -0500
parents 6d78e7d0930f
children
line wrap: on
line diff
--- a/.elisp/settings/90.which-function-mode.el
+++ b/.elisp/settings/90.which-function-mode.el
@@ -1,4 +1,9 @@
-(which-function-mode)
-(add-to-list 'which-func-modes 'python-mode)
-(add-to-list 'which-func-modes 'emacs-lisp-mode)
-(add-to-list 'which-func-modes 'go-mode)
+;; emacs 24.3 had a buggy which-function-mode that was really slow, so
+;; only load which-function-mode on 24.4 and later.
+(if (and (>= emacs-major-version 24)
+         (>= emacs-minor-version 4))
+    (progn
+      (which-function-mode)
+      (add-to-list 'which-func-modes 'python-mode)
+      (add-to-list 'which-func-modes 'emacs-lisp-mode)
+      (add-to-list 'which-func-modes 'go-mode)))