Add more api demos (#1845)

* Added function Demos
* Added use-package demos
* Some corrections
* Fix duplicated use-package! type
This commit is contained in:
Maximiliano 2019-10-03 14:51:08 -04:00 committed by Henrik Lissner
parent 167ce4ca4d
commit dea5d84069
4 changed files with 81 additions and 33 deletions

View file

@ -419,18 +419,7 @@ Properties
:unless [CONDITION] [...]
Any of the above properties may be nested, so that they only apply to a
certain group of keybinds.
Example
(map! :map magit-mode-map
:m \"C-r\" 'do-something ; C-r in motion state
:nv \"q\" 'magit-mode-quit-window ; q in normal+visual states
\"C-x C-r\" 'a-global-keybind
:g \"C-x C-r\" 'another-global-keybind ; same as above
(:when IS-MAC
:n \"M-s\" 'some-fn
:i \"M-o\" (lambda (interactive) (message \"Hi\"))))"
certain group of keybinds."
(doom--map-process rest))
(provide 'core-keybinds)

View file

@ -301,10 +301,6 @@ If N and M = 1, there's no benefit to using this macro over `remove-hook'.
(defmacro setq-hook! (hooks &rest var-vals)
"Sets buffer-local variables on HOOKS.
(setq-hook! 'markdown-mode-hook
line-spacing 2
fill-column 80)
\(fn HOOKS &rest [SYM VAL]...)"
(declare (indent 1))
(macroexp-progn

View file

@ -425,26 +425,17 @@ two extra properties:
:after-call SYMBOL|LIST
Takes a symbol or list of symbols representing functions or hook variables.
The first time any of these functions or hooks are executed, the package is
loaded. e.g.
(use-package! projectile
:after-call (pre-command-hook after-find-file dired-before-readin-hook)
...)
loaded.
:defer-incrementally SYMBOL|LIST|t
Takes a symbol or list of symbols representing packages that will be loaded
incrementally at startup before this one. This is helpful for large packages
like magit or org, which load a lot of dependencies on first load. This lets
you load them piece-meal during idle periods, so that when you finally do need
the package, it'll load quicker. e.g.
the package, it'll load quicker.
NAME is implicitly added if this property is present and non-nil. No need to
specify it. A value of `t' implies NAME, e.g.
(use-package! abc
;; This is equivalent to :defer-incrementally (abc)
:defer-incrementally t
...)"
specify it. A value of `t' implies NAME."
(declare (indent 1))
(unless (or (memq name doom-disabled-packages)
;; At compile-time, use-package will forcibly load packages to