.emacs
changeset 765 bbeae3f53afa
parent 604 9084d12d924d
child 773 9308a0c91624
equal deleted inserted replaced
764:1e356bb92737 765:bbeae3f53afa
     6 ;;
     6 ;;
     7 ;; For load order see README.
     7 ;; For load order see README.
     8 
     8 
     9 ;; ======================================================================
     9 ;; ======================================================================
    10 ;; Load path.
    10 ;; Load path.
       
    11 
       
    12 (defun my-find-subdirs (dir)
       
    13   (if (file-directory-p dir)
       
    14       (cons dir (apply 'append (mapcar 'my-find-subdirs (directory-files dir t "^[^.]")) ) )
       
    15     ))
       
    16 (defun my-add-subdirs-to-load-path (dir)
       
    17   (mapc
       
    18    (lambda (d)
       
    19      (add-to-list 'load-path d t)
       
    20      (message "Load-path updated with: %s" d)
       
    21      )
       
    22    (my-find-subdirs dir)) )
       
    23 
    11 (defvar my-usr-el-dir
    24 (defvar my-usr-el-dir
    12   (expand-file-name "~/usr/share/emacs/site-lisp")
    25   (expand-file-name "~/usr/share/emacs/site-lisp")
    13   "Here live additional lisp packages.")
    26   "Here live additional lisp packages.")
    14 (add-to-list 'load-path my-usr-el-dir t)
    27 (my-add-subdirs-to-load-path my-usr-el-dir)
       
    28 
    15 (defvar my-lisp-dir
    29 (defvar my-lisp-dir
    16   (expand-file-name "~/.emacs.d/my-lisp")
    30   (expand-file-name "~/.emacs.d/my-lisp")
    17   "Here live my lisp packages.")
    31   "Here live my lisp packages.")
    18 (add-to-list 'load-path my-lisp-dir t)
    32 (my-add-subdirs-to-load-path my-lisp-dir)
    19 
    33 
    20 (defvar my-autoload (concat my-lisp-dir "/autoload-my.el")
    34 (defvar my-autoload (concat my-lisp-dir "/autoload-my.el")
    21   "Path to autoload for mode files.")
    35   "Path to autoload for mode files.")
    22 (defvar dot-emacs-autogen (expand-file-name "~/.emacs-autogen")
    36 (defvar dot-emacs-autogen (expand-file-name "~/.emacs-autogen")
    23   "Path to automatically generated config file. It content depend on
    37   "Path to automatically generated config file. It content depend on