-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix autoloaded register-definition-prefixes
#24
Conversation
breadcrumb.el
Outdated
@@ -436,6 +436,7 @@ propertized crumbs." | |||
(bc--goto (selected-window) choice)))) | |||
|
|||
(provide 'breadcrumb) | |||
;;;###autoload (register-definition-prefixes "breadcrumb" '("breadcrumb-")) | |||
;;; breadcrumb.el ends here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a side-note, if you place the local variables below it, then the statement in this line is no longer accurate. 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to fix. Always found that "ends here" kinda silly anyway. What's the point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to fix. Always found that "ends here" kinda silly anyway. What's the point?
https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html says "Its purpose is to enable people to detect truncated versions of the file from the lack of a footer line."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone ahead and fixed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone ahead and fixed it.
But not in this PR, please. SOrry I should have been clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Its purpose is to enable people to detect truncated versions of the file from the lack of a footer line."
By the way, "enables people". Particular kinds of people who trade in truncated files coming up with genius ideas that no other language have.
Just so I understand this fix, is this enough to prevent |
Sorry, I closed this from a commit message, but I meant to close #23 instead. So reopening |
No, it only ensures that the correct prefix is also registered. |
And are there any adverse effects (that you know of) to having two prefixes registered for a given package? |
I'm not aware of any, but I know very little about all this, so that doesn't mean much. |
I think
Should be added to this PR. Also please make the commit message in the GNU changelog format (like other commit messages in this repo). |
3b0f35b
to
ad1af79
Compare
I don't know, but I agree with you that
I tried this, but as you pointed out in your email to the mailing list,
Done. |
I want this pull request fix |
* breadcrumb.el: Add correct register-definition-prefixes autoload so that "breadcrumb-" is registered as a prefix. Locally set autoload-compute-prefixes to nil so that "bc-" is not registered. Co-authored-by: Jonas Bernoulli <[email protected]>
* breadcrumb.el:
ad1af79
to
c99367e
Compare
Done! Emacs master branch master now autoloads Thanks! |
OK merged. And thanks. I'd rather the "ends here" thing hadn't been touched here, but no biggie anyway, I'll just remove that silly trailer soon anyway. |
I agree that it is silly in the age of version-control and would like to remove it from my libraries. But it's still the convention and if you go against it, linters will tell you about it. I have learned to live with it and it is certainly not the hill I want to die on, but if you feel more strongly about it, I would encourage you to try to get this convention removed. Or maybe just relaxed to IFF the file does not end with |
In that case, in
|
So what?
Why me? you can try too! :-) All these text-based tools are brittle and they don't cooperate. For example, the real reason that the "ends here" thing happened before the actual end is because |
Currently, autoload generation with shorthands results in:
(register-definition-prefixes "breadcrumb" '("bc-"))
The autoload prefix should be
"breadcrumb-"
so thatbreadcrumb.el
will be autoloaded when users type inM-x describe-function RET breadcrumb-
See
(info "(elisp)Autoload by Prefix")
for more information.Related issues: