Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 2922aece authored by Ryan Thompson's avatar Ryan Thompson

Merge pull request #560 from DarwinAwardWinner/init-default-directory

Set "default-directory" during package init
parents 72b411a9 70df199b
......@@ -221,27 +221,32 @@ definition provided by `el-get' recipes locally.
Intended for use from recipes, it will run once both the
`Info-directory-list' and the `load-path' variables have been
taken care of, but before any further action from
`el-get-init'.
`el-get-init'. It will be run with `default-directory' set
to the package directory.
:before
A pre-init function to run once before `el-get-init' calls
`load' and `require'. It gets to run with `load-path'
already set, and after :prepare has been called. It's not
intended for use from recipes.
intended for use from recipes. It will be run with
`default-directory' set to the package directory.
:post-init
Intended for use from recipes. This function is registered
for `eval-after-load' against the recipe library by
`el-get-init' once the :load and :features have been setup.
It will be run with `default-directory' set to the package
directory.
:after
A function to register for `eval-after-load' against the
recipe library, after :post-init, and after per-package
user-init-file (see `el-get-user-package-directory'). That's not
intended for recipe use.
user-init-file (see `el-get-user-package-directory'). That's
not intended for recipe use. It will be run with
`default-directory' set to the package directory.
:lazy
......
......@@ -375,7 +375,8 @@ called by `el-get' (usually at startup) for each installed package."
(after (plist-get source :after))
(pkgname (plist-get source :pkgname))
(library (or (plist-get source :library) pkgname package))
(pdir (el-get-package-directory package)))
(pdir (el-get-package-directory package))
(default-directory pdir))
;; a builtin package initialisation is about calling recipe and user
;; code only, no load-path nor byte-compiling support needed here.
......
......@@ -6,6 +6,6 @@
:load-path "."
:post-init (lambda ()
(require 'auto-complete)
(add-to-list 'ac-dictionary-directories (expand-file-name "dict" pdir))
(add-to-list 'ac-dictionary-directories (expand-file-name "dict"))
(require 'auto-complete-config)
(ac-config-default)))
......@@ -4,7 +4,7 @@
:url "https://github.com/sellout/emacs-color-theme-solarized.git"
:depends color-theme
:post-init (lambda ()
(add-to-list 'custom-theme-load-path pdir)
(add-to-list 'custom-theme-load-path default-directory)
(autoload 'color-theme-solarized-light "color-theme-solarized"
"color-theme: solarized-light" t)
(autoload 'color-theme-solarized-dark "color-theme-solarized"
......
......@@ -5,4 +5,4 @@
:url "https://github.com/jrockway/cperl-mode.git"
:depends mode-compile
:compile "cperl-mode.el"
:provide cperl-mode)
\ No newline at end of file
:provide cperl-mode)
......@@ -12,4 +12,4 @@
;; thus here we are trying to emulate the Makefile behaviour.
:build `(,(concat el-get-emacs
" -batch -q -no-site-file -l SKK-MK -f SKK-MK-compile")
"mv skk-setup.el.in skk-setup.el"))
\ No newline at end of file
"mv skk-setup.el.in skk-setup.el"))
......@@ -7,7 +7,7 @@
(lambda ()
;; Load yasnippet because yas/load-directory has no autoload
(require 'yasnippet)
(yas/load-directory (expand-file-name "snippets" pdir))
(yas/load-directory (expand-file-name "snippets"))
(autoload 'django-mode "django-mode" "Major mode for Django web framework." t)
;; django-html-mode is autoloaded, should just work
(add-to-list 'auto-mode-alist '("\.djhtml$" . django-html-mode))))
(:name edit-server
:description "Emacs edit-server. This provides an edit server to respond to requests from the Chrome Emacs Chrome plugin."
:type http
:url "http://github.com/stsquad/emacs_chrome/raw/master/servers/edit-server.el")
\ No newline at end of file
:url "http://github.com/stsquad/emacs_chrome/raw/master/servers/edit-server.el")
......@@ -4,4 +4,4 @@
:url "https://github.com/byplayer/egg.git"
:load-path (".")
:compile nil ;; egg uses eval at places which breaks compilation
:features egg)
\ No newline at end of file
:features egg)
(:name elunit
:description "A unit testing framework for Emacs Lisp code."
:type emacswiki)
\ No newline at end of file
:type emacswiki)
(:name eol-conversion
:description "Set end-of-line conversion for current buffer"
:type http
:url "http://centaur.maths.qmw.ac.uk/emacs/files/eol-conversion.el")
\ No newline at end of file
:url "http://centaur.maths.qmw.ac.uk/emacs/files/eol-conversion.el")
......@@ -4,4 +4,4 @@
:type git
:url "https://github.com/tarsius/epkg.git"
:depends (vcomp magit listing)
:compile ("epkg.el" "epkg-ui.el"))
\ No newline at end of file
:compile ("epkg.el" "epkg-ui.el"))
......@@ -2,4 +2,4 @@
:description "Add score support to tracked channel buffers"
:type git
:url "git://git.naquadah.org/erc-track-score.git"
:features erc-track-score)
\ No newline at end of file
:features erc-track-score)
(:name erc
:description "A powerful, modular, and extensible Emacs InternetRelayChat client."
:type elpa)
\ No newline at end of file
:type elpa)
......@@ -3,4 +3,4 @@
:type git
:url "https://github.com/dwdreisigmeyer/flymake-html-validator"
:features "flymake-html-validator"
:prepare (lambda () (setq validator-script (concat el-get-dir "flymake-html-validator"))))
\ No newline at end of file
:prepare (lambda () (setq validator-script (concat el-get-dir "flymake-html-validator"))))
......@@ -4,4 +4,4 @@
:type http
:url "https://raw.github.com/sroccaserra/emacs/master/flymake-lua.el"
:post-init (lambda ()
(add-hook 'lua-mode-hook 'flymake-lua-load)))
\ No newline at end of file
(add-hook 'lua-mode-hook 'flymake-lua-load)))
......@@ -2,4 +2,4 @@
:description "Helper functions for fringe bitmaps."
:type http
:url "http://nschum.de/src/emacs/fringe-helper/fringe-helper.el"
:features fringe-helper)
\ No newline at end of file
:features fringe-helper)
(:name fuzzy-format
:description "Select indent-tabs-mode and format code automatically."
:type emacswiki)
\ No newline at end of file
:type emacswiki)
......@@ -2,4 +2,4 @@
:description "Minor mode for incremental blame for Git"
:type git
:url "https://github.com/tsgates/git-emacs.git"
:features git-blame)
\ No newline at end of file
:features git-blame)
......@@ -2,4 +2,4 @@
:description "Yet another git emacs mode for newbies"
:type git
:url "https://github.com/tsgates/git-emacs.git"
:features git-emacs)
\ No newline at end of file
:features git-emacs)
......@@ -2,4 +2,4 @@
:description "Mode line decoration support, part of git-emacs."
:type git
:url "https://github.com/tsgates/git-emacs.git"
:features (git-emacs git-modeline))
\ No newline at end of file
:features (git-emacs git-modeline))
......@@ -3,4 +3,4 @@
:description "Clickable buttons in header lines"
:type git
:url "https://github.com/tarsius/header-button.git"
:compile "header-button.el")
\ No newline at end of file
:compile "header-button.el")
......@@ -2,4 +2,4 @@
:description "Major mode to edit Io language files in Emacs"
:type git
:url "https://github.com/superbobry/io-mode.git"
:features io-mode)
\ No newline at end of file
:features io-mode)
......@@ -2,4 +2,4 @@
:description "Incremental occur."
:type hg
:url "http://mercurial.intuxication.org/hg/ioccur"
:features ioccur)
\ No newline at end of file
:features ioccur)
(:name js-comint
:description "Run javascript in an inferior process window."
:type http
:url "http://downloads.sourceforge.net/js-comint-el/js-comint.el")
\ No newline at end of file
:url "http://downloads.sourceforge.net/js-comint-el/js-comint.el")
......@@ -2,4 +2,4 @@
:description "Emacs key sequence quiz"
:type http
:url "http://www.phys.au.dk/~harder/keywiz.el"
:features keywiz)
\ No newline at end of file
:features keywiz)
......@@ -4,4 +4,4 @@
:type git
:url "https://github.com/tarsius/listing.git"
:depends (header-button map-progress)
:compile "listing.el")
\ No newline at end of file
:compile "listing.el")
(:name lively
:description "Interactively updating text"
:type emacswiki)
\ No newline at end of file
:type emacswiki)
......@@ -2,4 +2,4 @@
:description "LiveJournal client for Emacs"
:type git
:url "https://github.com/hober/ljupdate.git"
:features ljupdate)
\ No newline at end of file
:features ljupdate)
(:name magithub
:description "Magit extensions for using GitHub"
:type git
:url "https://github.com/nex3/magithub.git")
\ No newline at end of file
:url "https://github.com/nex3/magithub.git")
......@@ -3,4 +3,4 @@
:description "Mapping macros that report progress"
:type git
:url "https://github.com/tarsius/map-progress.git"
:compile "map-progress.el")
\ No newline at end of file
:compile "map-progress.el")
......@@ -2,4 +2,4 @@
:description "A client for the Music Player Daemon (MPD)."
:type git
:url "https://github.com/pft/mingus.git"
:features mingus-stays-home)
\ No newline at end of file
:features mingus-stays-home)
(:name mmm-mode
:description "Allow Multiple Major Modes in a buffer"
:type git
:url "https://github.com/purcell/mmm-mode.git")
\ No newline at end of file
:url "https://github.com/purcell/mmm-mode.git")
......@@ -2,4 +2,4 @@
:description "Smart command for compiling files according to major-mode."
:type http
:url "http://perso.tls.cena.fr/boubaker/distrib/mode-compile.el"
:load-path ("."))
\ No newline at end of file
:load-path ("."))
(:name moz-repl
:description "Lets current buffer interact with inferior mozilla."
:type http
:url "http://github.com/bard/mozrepl/raw/master/chrome/content/moz.el")
\ No newline at end of file
:url "http://github.com/bard/mozrepl/raw/master/chrome/content/moz.el")
(:name mwe-log-commands
:description "Log keyboard commands to buffer"
:type http
:url "http://www.foldr.org/~michaelw/emacs/mwe-log-commands.el")
\ No newline at end of file
:url "http://www.foldr.org/~michaelw/emacs/mwe-log-commands.el")
......@@ -4,4 +4,4 @@
:url "git://git.naquadah.org/naquadah-theme.git"
:post-init (lambda ()
(add-to-list 'custom-theme-load-path
(el-get-package-directory 'naquadah-theme))))
default-directory)))
......@@ -2,4 +2,4 @@
:description "NSIS(Nullsoft Scriptable Install System)-mode"
:type emacswiki
:features nsis-mode
:post-init (lambda nil (add-to-list (quote auto-mode-alist) (quote ("\\.[Nn][Ss][IiHh]$" . nsis-mode)))))
\ No newline at end of file
:post-init (lambda nil (add-to-list (quote auto-mode-alist) (quote ("\\.[Nn][Ss][IiHh]$" . nsis-mode)))))
......@@ -11,7 +11,7 @@
(expand-file-name
(convert-standard-filename
(concat (file-name-as-directory
(el-get-package-directory "package"))
default-directory)
"elpa")))
package-directory-list
(list (file-name-as-directory package-user-dir)
......
......@@ -5,4 +5,4 @@
:features pcmpl-git
:prepare (lambda ()
(setq pcmpl-git-options-file
(expand-file-name "git-options" (el-get-package-directory 'pcmpl-git)))))
(expand-file-name "git-options"))))
......@@ -2,4 +2,4 @@
:description "The Emacs Predictive Completion package adds a new minor-mode to the GNU Emacs editor."
:type git
:url "http://www.dr-qubit.org/git/predictive.git"
:features predictive)
\ No newline at end of file
:features predictive)
(:name project-local-variables
:description "Set project-local variables from a file."
:type elpa)
\ No newline at end of file
:type elpa)
......@@ -3,8 +3,7 @@
:type git
:url "https://github.com/tsgates/pylookup.git"
:post-init (lambda ()
(setq pylookup-dir (expand-file-name "pylookup" el-get-dir)
pylookup-program (expand-file-name "pylookup.py" pylookup-dir)
pylookup-db-file (expand-file-name "pylookup.db" pylookup-dir))
(setq pylookup-program (expand-file-name "pylookup.py")
pylookup-db-file (expand-file-name "pylookup.db"))
(autoload 'pylookup-lookup "pylookup" "Lookup SEARCH-TERM in the Python HTML indexes." t)
(autoload 'pylookup-update "pylookup" "Run pylookup-update and create the database at `pylookup-db-file'." t)))
......@@ -8,7 +8,7 @@
(setenv
"PYTHONPATH"
(let ((pp (getenv "PYTHONPATH")))
(concat (el-get-package-directory "pymacs")
(concat default-directory
(unless (string-prefix-p ":" pp) ":")
pp)))
(autoload 'pymacs-load "pymacs" nil t)
......
......@@ -3,4 +3,4 @@
:type hg
:url "https://qmake-mode.googlecode.com/hg/"
:load "qmake.el"
:features qmake-mode)
\ No newline at end of file
:features qmake-mode)
......@@ -2,4 +2,4 @@
:description "An emacs buffer in rcirc-groups major mode"
:type git
:url "https://github.com/dimitri/rcirc-groups.git"
:features rcirc-groups)
\ No newline at end of file
:features rcirc-groups)
(:name rdebug
:description "Ruby debugger user interface, startup file."
:type svn
:url "http://ruby-debug.rubyforge.org/svn/trunk/emacs/")
\ No newline at end of file
:url "http://ruby-debug.rubyforge.org/svn/trunk/emacs/")
(:name regex-tool
:description "A regular expression evaluation tool for programmers"
:type git
:url "https://github.com/jwiegley/regex-tool.git")
\ No newline at end of file
:url "https://github.com/jwiegley/regex-tool.git")
(:name ri-emacs
:description "Ruby ri help inside emacs"
:type git
:url "https://github.com/pedz/ri-emacs.git")
\ No newline at end of file
:url "https://github.com/pedz/ri-emacs.git")
......@@ -3,6 +3,6 @@
:post-init
(lambda ()
(unless (boundp 'pymacs-load-path) (setq pymacs-load-path nil))
(add-to-list 'pymacs-load-path (el-get-package-directory "rope")))
(add-to-list 'pymacs-load-path default-directory))
:type hg
:url "http://bitbucket.org/agr/rope")
......@@ -3,7 +3,7 @@
:post-init
(lambda ()
(unless (boundp 'pymacs-load-path) (setq pymacs-load-path nil))
(add-to-list 'pymacs-load-path (el-get-package-directory "ropemacs")))
(add-to-list 'pymacs-load-path default-directory))
:depends (rope ropemode)
:type hg
:url "http://bitbucket.org/agr/ropemacs")
......@@ -3,6 +3,6 @@
:post-init
(lambda ()
(unless (boundp 'pymacs-load-path) (setq pymacs-load-path nil))
(add-to-list 'pymacs-load-path (el-get-package-directory "ropemode")))
(add-to-list 'pymacs-load-path default-directory))
:type hg
:url "http://bitbucket.org/agr/ropemode")
(:name ruby-block
:description "Highlight matching block"
:type emacswiki
:features ruby-block)
\ No newline at end of file
:features ruby-block)
(:name ruby-compilation
:description "Run a ruby process in a compilation buffer"
:type elpa)
\ No newline at end of file
:type elpa)
(:name ruby-mode
:description "Major mode for editing Ruby files. RubyMode provides font-locking, indentation support, and navigation for Ruby code."
:type elpa)
\ No newline at end of file
:type elpa)
......@@ -3,4 +3,4 @@
:type bzr
:url "bzr://rudel.bzr.sourceforge.net/bzrroot/rudel/trunk"
:load "rudel-loaddefs.el"
:build ("emacs --script rudel-compile.el"))
\ No newline at end of file
:build ("emacs --script rudel-compile.el"))
......@@ -4,4 +4,4 @@
:url "http://lampsvn.epfl.ch/svn-repos/scala/scala-tool-support/trunk/src/emacs/"
:build ("make")
:load-path (".")
:features scala-mode-auto)
\ No newline at end of file
:features scala-mode-auto)
......@@ -2,4 +2,4 @@
:description "Major mode for editing SCSS files(http://sass-lang.com)"
:type git
:url "https://github.com/antonj/scss-mode.git"
:features scss-mode)
\ No newline at end of file
:features scss-mode)
......@@ -3,4 +3,4 @@
:type http
:url "http://www.neilvandyke.org/sicp-texi/sicp.info.gz"
:build ("gunzip -f sicp.info.gz")
:info "sicp.info")
\ No newline at end of file
:info "sicp.info")
......@@ -2,4 +2,4 @@
:description "Emacs smart tabs functionality. Intelligently indent with tabs, align with spaces!"
:type git
:url "git://gist.github.com/488820.git"
:features smarttabs)
\ No newline at end of file
:features smarttabs)
(:name smarty-mode
:description "Smarty-Mode is a mode allowing easy edit of Smarty templates: highlight, templates, navigation into source files."
:type http
:url "http://lisp.morinie.fr/smarty/download/smarty-mode.el")
\ No newline at end of file
:url "http://lisp.morinie.fr/smarty/download/smarty-mode.el")
......@@ -8,4 +8,4 @@
(concat "make " target " EMACS=" el-get-emacs))
'("clean" "default"))
:load-path (".")
:load ("sml-mode-startup.el"))
\ No newline at end of file
:load ("sml-mode-startup.el"))
(:name smooth-scroll
:description "Minor mode for smooth scrolling."
:type emacswiki
:features smooth-scroll)
\ No newline at end of file
:features smooth-scroll)
......@@ -2,4 +2,4 @@
:description "Make emacs scroll smoothly, keeping the point away from the top and bottom of the current buffer's window in order to keep lines of context around the point visible as much as possible, whilst avoiding sudden scroll jumps which are visually confusing."
:type http
:url "http://adamspiers.org/computing/elisp/smooth-scrolling.el"
:features smooth-scrolling)
\ No newline at end of file
:features smooth-scrolling)
(:name sudo-save
:description "Allow saving files using sudo"
:type emacswiki
:features sudo-save)
\ No newline at end of file
:features sudo-save)
......@@ -2,4 +2,4 @@
:description "Mouse-clickable shortcut buttons for the Sunrise Commander File Manager"
:type emacswiki
:url "https://github.com/emacsmirror/sunrise-commander/raw/master/sunrise-x-buttons.el"
:features sunrise-x-buttons)
\ No newline at end of file
:features sunrise-x-buttons)
(:name swank-clojure
:description "Slime adapter for clojure"
:type http
:url "http://github.com/technomancy/swank-clojure/raw/master/swank-clojure.el")
\ No newline at end of file
:url "http://github.com/technomancy/swank-clojure/raw/master/swank-clojure.el")
......@@ -2,4 +2,4 @@
:description "A *visual* way to choose a window to switch to"
:type git
:url "https://github.com/dimitri/switch-window.git"
:features switch-window)
\ No newline at end of file
:features switch-window)
(:name tidy
:description "Interface to the HTML Tidy program"
:type emacswiki)
\ No newline at end of file
:type emacswiki)
(:name twit
:description "Interface with twitter.com"
:type emacswiki)
\ No newline at end of file
:type emacswiki)
......@@ -10,10 +10,9 @@
:post-init (lambda ()
(setq uim-el-agent (concat
(file-name-as-directory
(el-get-package-directory "uim-el"))
default-directory)
"emacs/uim-el-agent"))
(setq uim-el-helper-agent (concat
(file-name-as-directory
(el-get-package-directory "uim-el"))
default-directory)
"emacs/uim-el-helper-agent"))))
(:name vc-darcs
:description "A VC backend for darcs"
:type http
:url "http://www.pps.jussieu.fr/~jch/software/repos/vc-darcs/vc-darcs.el")
\ No newline at end of file
:url "http://www.pps.jussieu.fr/~jch/software/repos/vc-darcs/vc-darcs.el")
......@@ -2,4 +2,4 @@
:description "Word conjugation"
:type http
:url "http://kanis.fr/hg/lisp/ivan/verbiste.el"
:load "verbiste.el")
\ No newline at end of file
:load "verbiste.el")
......@@ -4,4 +4,4 @@
:url "https://raw.github.com/djcb/elisp/master/themes/zenburn-theme.el"
:post-init (lambda ()
(add-to-list 'custom-theme-load-path
(el-get-package-directory "zenburn-theme"))))
default-directory)))
......@@ -2,4 +2,4 @@
:description "Unfold CSS-selector-like expressions to markup"
:type git
:url "https://github.com/rooney/zencoding.git"
:features zencoding-mode)
\ No newline at end of file
:features zencoding-mode)
;; https://github.com/dimitri/el-get/issues/548
;;
;; Use `default-directory' in :post-init and similar recipe init hooks.
(let ((debug-on-error t)
;; (el-get-byte-compile nil)
(el-get-verbose t))
(require 'el-get)
(el-get 'sync 'pcmpl-git)
(el-get-init 'pcmpl-git)
;; Verify that the option in :post-init was set correctly
(assert (string= pcmpl-git-options-file
(expand-file-name "git-options" (el-get-package-directory 'pcmpl-git)))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment