Browse Source

Runs meghanada only if at least 512 mb of ram is free

master
Raphael Roberts 6 years ago
parent
commit
e7803c07d6
  1. 8
      settings.org

8
settings.org

@ -96,8 +96,10 @@ This handy function is a customized ripoff of custom-save-all
#+END_SRC
** Low memeory check
#+BEGIN_SRC emacs-lisp
(defun rlbr/high-mem () (>= (nth 1 (memory-info))
(expt 1024 2)))
(defun rlbr/high-mem (&optional threshold)
(let ((threshold (or threshold (expt 1024 2)))))
(>= (nth 1 (memory-info))
threshold))
#+END_SRC
** Kill this buffer
#+BEGIN_SRC emacs-lisp
@ -200,7 +202,7 @@ This handy function is a customized ripoff of custom-save-all
:defer t)
(use-package meghanada
:if (rlbr/high-mem)
:if (rlbr/high-mem (* 512 1024))
:defer t
:init
(add-hook 'java-mode-hook

Loading…
Cancel
Save