Skip to content
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

correct library name on first and last line #111

Merged
merged 4 commits into from May 15, 2016
Merged

correct library name on first and last line #111

merged 4 commits into from May 15, 2016

Conversation

tarsius
Copy link
Contributor

@tarsius tarsius commented Dec 1, 2015

No description provided.

@tamzinblake
Copy link
Owner

should modify lib/js3-foot.el and lib/js3-head.el

@tarsius
Copy link
Contributor Author

tarsius commented Apr 30, 2016

This is confusing. Do you generate js3-mode.el from the files in lib?

@tamzinblake
Copy link
Owner

Yes. Update the files in lib and then run bin/build - the .el file is also committed to the repo just for legacy reasons.

The actual library intended for use is "js3-mode.el".  Adjust its first
and last lines to mention that name instead of "js3.el".

"js3.el" is a symlink to "js3-mode.el".  Some users might try to load it
using (require 'js3).  Provide that feature in "js3-mode.el".

The files in "lib/" are only intended to be used to generate
"js3-mode.el" and it should therefore not be placed on the
`load-path'. Add a new file "lib/.nosearch", which makes it less likely
that "lib/" accidentally ends up there.
Beginning with Emacs v25.1 the second argument to `looking-back' is
mandatory.  It may be `nil' though, in which case it continues to
behave as before (without the second argument).
It is a function, not a macro, and so its argument usually has to be
quoted.  In this case it does.
There are two options available (1) define `js3-mode-error' and its
alias `js3-mode-help' before using them, or (2) quote the function
symbol using `quote' instead of `function' (' instead of #').

We do the latter here.  The result is that the byte-compiler no longer
knows that these function symbols are intended to be used as functions,
so it no longer checks whether these functions are defined, so it no
longer detects that this may not be the case, and does not complain.
That's okay.  The functions are being defined, just after they are being
defined.

Also note that quoting the first symbol in a `defalias' form as a
function is never right.  When `defalias' arguments are being evaluated
the alias (i.e. the function) is not defined yet, that's why we call it.
@tarsius
Copy link
Contributor Author

tarsius commented May 2, 2016

Okay, I have done that.

I have also fixed some other issues the byte-compiler told me about. (Addressing these issues was harder than doing so should have been because the byte-compiler told me about errors in js3-mode.el but I then had to determine the location inside one of the files in lib/ to actually fix it. Therefore I would strongly suggest you stop concatenating the "input libraries" to generate js3-mode.el -- "legacy reasons" doesn't seem like a good enough reason to make maintenance harder in the present and future.)

@tamzinblake
Copy link
Owner

👍

@tarsius
Copy link
Contributor Author

tarsius commented May 3, 2016

Thanks for commit access, but I am not interested. I only came here to fix this issue because I noticed it as part of my work on the Emacsmirror. Please revoke commit access again.

@tarsius tarsius merged commit 7fceb21 into tamzinblake:master May 15, 2016
@tarsius
Copy link
Contributor Author

tarsius commented May 15, 2016

I still have commit access and have merged this now. Please remove my commit access - I don't want to do anymore but this.

@tarsius tarsius deleted the patch-1 branch May 15, 2016 15:51
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.

None yet

3 participants