Ah, I see - it works because the closure holds on to the jQuery reference as it is defined at the time the code is called, so that even when jQuery is redefined later we've still got the original jQuery reference, which has the necessary plugins attached.
I'm going to reject this pull request because it is a very noisy way of adding the necessary lines. Thanks for the patch though.
Hi Luke, It's true, adding the closure only protects this script code from future changes to the jQuery name as a reference. So if someone after this script someone points the jQuery reference to a different instance, we're protected, however if someone does jQuery.fn = undefined, or wipes out some other part of the jQuery object or some jQuery plugin that Semantic would rely on, this will not help.
So perhaps it's wrong to call this a bug with Semantic, as I contend that there should only ever be one jQuery instance. I just used this method and debugged it this way to work with my site. It's the most frustrating quirk of jQuery usage that I've encountered, since jQuery usage relies heavily on $(document).ready, it seems you can't do much to protect yourself against other users of jQuery as all callers of $(document).ready will end up using the final object as manipulated by different scripts which may follow the one from your project.
As for PresentationControls, maybe that wymeditor.semantic.js should be tweaked so it's