![]() ![]() Using ‘eval-after-load’ is one way of achieving fine grained configuration per-package. Using `eval-after-load' for package config You can do that by putting this in your init file: (add-hook 'after-init-hook ( lambda () (load "")))Īnd moving all your normal init to the >. Others point out that moving your whole initialization to after ELPA is loaded makes things easier to use. Some people think that using after-init-hook seems like a last resort because it may force the load of the package you’re referring to (thus slowing down Emacs). Using the `after-init-hook' for package config if all these tricks don’t work you can still postpone config until after the packages have been loaded like this:.( require ) your ELPA packages, configure them as normal basic initialization, ( require ) non-ELPA packages, etc. it could be easier just to move package-initialize to another point during startup so you can (require) ELPA packages this takes care of a lot of the described issues:.some package specific initialization can be done with eval-after-load, see eval-after-load.(global-set-key (kbd "C-'") 'shell-switcher-switch-buffer) key bindings can also be done in such a way to not cause init failure, even if the package is not loaded:.(add-hook 'groovy-mode-hook ( lambda () (setq tab-width 4))) mode specific customization of a package could go in a package hook which can be set before the package is loaded, for example:. ![]() (add-to-list 'auto-mode-alist '( " \\.gradle".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |