Skip to content

Fix require and supress error messages of byte compile #456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2018
Merged

Fix require and supress error messages of byte compile #456

merged 1 commit into from
Apr 9, 2018

Conversation

zonuexe
Copy link
Member

@zonuexe zonuexe commented Apr 9, 2018

declare-function is a directive that notifies the byte compiler of function definition information.
This suppresses unnecessary error messages during byte compilation.

Before

% make
emacs -Q -batch -L . --eval \
	"(progn \
	   (require 'package) \
	   (package-generate-autoloads \"php-mode\" default-directory))"
Generating autoloads for php-cc-mode.el...
Generating autoloads for php-cc-mode.el...done
Generating autoloads for php-core.el...
Generating autoloads for php-core.el...done
Generating autoloads for php-mode-test.el...
Generating autoloads for php-mode-test.el...done
Generating autoloads for php-mode.el...
Generating autoloads for php-mode.el...done
Generating autoloads for php-project.el...
Generating autoloads for php-project.el...done
Generating autoloads for tiny-init.el...
Generating autoloads for tiny-init.el...done
Wrote /Users/megurine/repo/emacs/php-mode/php-mode-autoloads.el
Wrote /Users/megurine/repo/emacs/php-mode/php-mode-autoloads.el
emacs -Q -batch -L . -f batch-byte-compile php-project.el
emacs -Q -batch -L . -f batch-byte-compile php-mode.el

In end of data:
php-mode.el:1854:1:Warning: the following functions are not known to be
    defined: package-desc-status, package-version-join, package-desc-version,
    custom-group-members, semantic-create-imenu-index
emacs -Q -batch -L . -f batch-byte-compile php-mode-test.el

After

% make
emacs -Q -batch -L . --eval \
	"(progn \
	   (require 'package) \
	   (package-generate-autoloads \"php-mode\" default-directory))"
Generating autoloads for php-cc-mode.el...
Generating autoloads for php-cc-mode.el...done
Generating autoloads for php-core.el...
Generating autoloads for php-core.el...done
Generating autoloads for php-mode-test.el...
Generating autoloads for php-mode-test.el...done
Generating autoloads for php-mode.el...
Generating autoloads for php-mode.el...done
Generating autoloads for php-project.el...
Generating autoloads for php-project.el...done
Generating autoloads for tiny-init.el...
Generating autoloads for tiny-init.el...done
Wrote /Users/megurine/repo/emacs/php-mode/php-mode-autoloads.el
Wrote /Users/megurine/repo/emacs/php-mode/php-mode-autoloads.el
emacs -Q -batch -L . -f batch-byte-compile php-project.el
emacs -Q -batch -L . -f batch-byte-compile php-mode.el
emacs -Q -batch -L . -f batch-byte-compile php-mode-test.el

declare-function is a directive that notifies the byte compiler of
function definition information.
This suppresses unnecessary error messages during byte compilation.
@zonuexe zonuexe merged commit 6de2923 into emacs-php:master Apr 9, 2018
@zonuexe zonuexe deleted the fix/suppress-byte-compile-error branch April 9, 2018 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant