# HG changeset patch # User Augie Fackler # Date 1416349056 18000 # Node ID 3d46ce32c14e6c376251ead9297a829f3fb4b75c # Parent 95621f473f7e6cdc0de1ac7e60ee0cfac81a81d5 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. diff --git a/.elisp/settings/90.which-function-mode.el b/.elisp/settings/90.which-function-mode.el --- 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)))