doomemacs/core
Henrik Lissner 8903eebdc4
Change purpose of autodef cookie argument
;;;###autodef FORM

FORM was used as a predicate for inclusion as an autodef. Now it is used
as the replacement sexp in case the module is disabled.

Oh, you don't know what autdefs are? Well let me explain (thanks for
asking, by the way). An autdef'ed function, macro, or function alias is
always available to be called, anywhere in Doom, even if its containing
module is disabled. For instance:

  ;;;###autodef
  (defun say-hello! (name)  ; the trailing ! denotes an autodef
    (message "Hello %s" name))

This makes it safe to call `do-something` without a check whether it
exists (or if its module is enabled). When the module is enabled, an
autoload entry is added to the Doom autoloads file:

  (autoload 'do-something "path/to/some/modules/autoloads")

And it is autoloaded as normal when it is first used. However, if the
module is disabled, then this is inserted instead:

  (defmacro do-something (&rest _))

This no-ops; it does nothing and doesn't evaluate its arguments. If FORM
above was provided, that is used instead of a noop macro.

It's a little smarter than simple substitution, but that's the gist of
it.
2019-03-02 01:34:14 -05:00
..
autoload Remove doom-cleanup-hook & doom/cleanup-session 2019-02-26 22:57:02 -05:00
cli Change purpose of autodef cookie argument 2019-03-02 01:34:14 -05:00
templates Add option to load doom in vanilla sandbox 2018-08-12 02:45:01 +02:00
test Update map! tests for removal of :if 2019-01-02 16:06:39 -05:00
core-cli.el bin/doom: make invalid command a user-error 2018-09-28 22:29:42 -04:00
core-editor.el General, minor reformatting & refactor 2019-02-18 00:47:46 -05:00
core-keybinds.el Mention $DOOMDIR/init.el in leader key docstrings 2019-02-24 13:47:54 -05:00
core-lib.el Revise documentation for defer-feature! macro 2019-02-24 20:59:29 -05:00
core-modules.el Adopt seagle0128/doom-modeline for :ui modeline 2019-03-02 01:34:14 -05:00
core-os.el Remove select-enable-{clipboard,primary} #1008 2019-02-28 03:21:40 -05:00
core-packages.el Adjust compile-time state in package helper macros 2019-01-02 14:11:02 -05:00
core-projects.el Improve projectile-git-command 2019-01-18 19:40:09 +11:00
core-ui.el Fix uniquify+persp-mode compatibility 2019-02-26 12:19:35 -05:00
core.el Add async-byte-compile-log-file setting to core.el 2019-02-21 19:13:35 -05:00
packages.el Switch to main repo for all-the-icons 2019-02-17 14:44:23 -05:00