Mercurial > dotfiles
changeset 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 | 95621f473f7e |
children | 7edfa8d22584 |
files | .elisp/settings/90.which-function-mode.el |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
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)))