Commits

Yuya Nishihara  committed bc78ae6

emacs: avoid permission error with sudo and anything

  • Participants
  • Parent commits e5aa147

Comments (0)

Files changed (1)

   ; anything-config depends on image-load-path, which may be missing
   (if (not (boundp 'image-load-path))
       (setq image-load-path '()))
-  (require 'anything-startup))
+  (require 'anything-startup)
+  (if (getenv "SUDO_USER")
+      ; allow to shutdown emacs even if permission denied
+      (remove-hook 'kill-emacs-hook 'anything-c-adaptive-save-history)))
 
 (setq-default indent-tabs-mode nil)
 (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60))