[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: req-package
From: |
Edward Knyshov |
Subject: |
Re: req-package |
Date: |
Thu, 13 Aug 2015 15:10:49 +0300 |
Yes, sure. Sorry for late answer. Here is example. I configure clojure
development environment with req-package(use-package)
(req-package eldoc
;; this form call will download eldoc package from elpa or el-get as
needed
:commands eldoc
-mode
;; this parameter delays loading of eldoc until eldo-mode function is
called
:init (prog
n (add-h
ook 'emacs-lisp-mode-hook (lambda () (eldoc-mode 1)))
;; add eldoc to emacs lisp mode
(add-hook 'lisp-interaction-mode-hook (lambda () (eldoc-mode 1)))))
;; add eldoc to
lisp based interaction modes
modes
(req-package clojure-mode
;; this form call will download
clojure-mode
package from elpa or el-get as needed
:mode (("clj\\'" . clojure-mo
de)
;; this parameter delays loading of clojure-mode until
("cljs\\'" . clojure-mode)))
;; file with any of these extensions is loaded
(req-package cider
;; this form call will download
cider
package from elpa or el-get as needed
:require (clojure-m
ode eldoc)
;; this parameters makes sure that this req-package form is evaluated
after all of these packages are loaded
:commands cider-mode
;; delay loading until cider-mode function is called
:init (progn (add-hook 'clojure-mode-h
ook #'cider-mode)
;; start cider in clojure mode
(add-hook 'cider-mode-hook #'eldoc-mode)
;; start eldoc after cider setups some of its internal things and calls
its hook
(setq nrepl-log-messages t)))
;; some logging stuff
(req-package-finish) ;; start loading
This
example may bit a bit hard to understand in concrete, but you may get an
idea.
On Tue, Aug 11, 2015 at 6:30 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> > Remember, how often you tackled into problem, when you need to require
> one
> > package, do some configuration, then the same with second and so on.
>
> Indeed, one of the problems I have here is to remember the last time
> I had a problem like the one you describe.
>
> Obviously, we're not using the same set of packages or the same kind
> of configuration. Can you give some examples you've bumped into?
>
>
> Stefan
>
>
>
- req-package, Edward Knyshov, 2015/08/11
- Re: req-package, Stefan Monnier, 2015/08/11
- Re: req-package,
Edward Knyshov <=
- Re: req-package, Alexander Shukaev, 2015/08/13
- Re: req-package, Edward Knyshov, 2015/08/13
- Re: req-package, Alexander Shukaev, 2015/08/13
- Re: req-package, Edward Knyshov, 2015/08/13
- Message not available
- Re: req-package, Stefan Monnier, 2015/08/13
- Re: req-package, Edward Knyshov, 2015/08/14
- Re: req-package, Edward Knyshov, 2015/08/14
- Message not available
- Re: req-package, Stefan Monnier, 2015/08/14
- Re: req-package, Alexander Shukaev, 2015/08/14
- Re: req-package, Edward Knyshov, 2015/08/14