;;; setup-@:package@.el ;;;@:setup-copyright-notice@ ;;; Description: Provide (1) personal setup; (2) a clean way to export it. (require 'cl) (defvar @:package@-version "@:version@") (defun setup-@:package@ (&optional autoloadsp corep ksel) "Set up @:package@ package. Optional first arg AUTOLOADSP if non-nil means load autoloads.el. Optional second arg COREP if non-nil means load core.el. Optional third arg KSEL, applicable only if COREP is non-nil, controls which global keys are rebound when core/keys.el is loaded. If a list of the form `(only KEY1 KEY2 ...)', then only those named keys are rebound. If a list of the form `(except KEY1 KEY2 ...)', then those named keys will not be rebound, but others may be. If unspecified, the default value is `(only)', which disables all rebindings. Examples: To prevent `C-x r' and `C-l' from being rebound, use the following form for KSEL (note no SPC for `C-x r'): (except \"\\C-xr\" \"\\C-l\") To only rebind `C-x C-b', use the form: (only \"\\C-x\\C-b\") To accept all rebindings, use the form: (except)" (let* ((dir (file-name-directory (car (load-history-filename-element "setup-@:package@")))) (home (expand-file-name "@:package@" dir))) (setq home (expand-file-name "lisp" dir)) ; zonk on install (setq home (file-name-as-directory home)) (flet ((under-home (rel) (expand-file-name rel home)) (home-load (rel) (load-file (under-home rel)))) (dolist (dir '@:subdirs@) (add-to-list 'load-path (under-home (symbol-name dir)))) (when autoloadsp (home-load "autoloads.el")) (when corep (let ((*ttn-select-global-keys* ksel)) (home-load "core.el")))))) (provide 'setup-@:package@) ;;; setup-@:package@.el ends here