From 1bb74dab326c754ec42db54bff4e3e5ae3cdf117 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Thu, 13 Sep 2018 12:41:31 +0900 Subject: [PATCH] Fix info dir configs --- emacs.el | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index 2d7ac40..89b4e44 100644 --- a/emacs.el +++ b/emacs.el @@ -970,10 +970,19 @@ found, otherwise returns nil." (with-eval-after-load 'text-mode (define-key text-mode-map (kbd "C-m") 'newline)) -(with-eval-after-load 'info - (defvar Info-directory-list nil) - (add-to-list 'Info-directory-list - (expand-file-name "~/.brew/share/info"))) +(autoload-eval-lazily 'info nil + (defvar Info-additional-directory-list) + (dolist (dir (directory-files (concat user-emacs-directory + "info") + t + "^[^.].*")) + (when (file-directory-p dir) + (add-to-list 'Info-additional-directory-list + dir))) + (let ((dir (expand-file-name "~/.brew/share/info"))) + (when (file-directory-p dir) + (add-to-list 'Info-additional-directory-list + dir)))) (with-eval-after-load 'apropos (defvar apropos-mode-map (make-sparse-keymap))