Don't warn about cl-functions with old cl-lib

* .travis.yml (install): Set warnings to (not cl-functions) if cl-lib
needs to be downloaded.  Since the downloaded cl-lib just aliases cl.el
functions, trying to use cl- prefixed functions would cause compile
warnings otherwise.
* Rakefile: Pass environment variable `warnings' as
`byte-compile-warnings' value when compiling.
This commit is contained in:
Noam Postavsky 2016-08-01 17:33:54 -04:00
parent 5264379908
commit 4b12f7de7a
2 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ install:
- export PATH=/tmp/emacs/bin:${PATH} - export PATH=/tmp/emacs/bin:${PATH}
- if ! emacs -Q --batch --eval "(require 'cl-lib)" ; then - if ! emacs -Q --batch --eval "(require 'cl-lib)" ; then
curl -Lo cl-lib.el http://elpa.gnu.org/packages/cl-lib-0.5.el ; curl -Lo cl-lib.el http://elpa.gnu.org/packages/cl-lib-0.5.el ;
export warnings="'(not cl-functions)" ;
fi fi
- if ! emacs -Q --batch --eval "(require 'ert)" ; then - if ! emacs -Q --batch --eval "(require 'ert)" ; then
curl -LO https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert.el && curl -LO https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert.el &&

View File

@ -99,6 +99,7 @@ desc "Compile yasnippet.el into yasnippet.elc"
rule '.elc' => '.el' do |t| rule '.elc' => '.el' do |t|
sh "#{$EMACS} --batch -L . --eval \"(setq byte-compile-error-on-warn t)\"" + sh "#{$EMACS} --batch -L . --eval \"(setq byte-compile-error-on-warn t)\"" +
" --eval \"(setq byte-compile-warnings #{ENV['warnings']})\"" +
" -f batch-byte-compile #{t.source}" " -f batch-byte-compile #{t.source}"
end end
task :compile => FileList["yasnippet.el"].ext('elc') task :compile => FileList["yasnippet.el"].ext('elc')