One of the editor experts in GExperts that come in handy once in a while is the Sort Expert. All it does is take the selected lines and sort them alphabetically.
Now, it can sort ascending, as before, descending (not sure when you might want to do that, but since I was at it, why not implement it?) and it can reverse the current line order. The latter is useful, if you want to undo changes in reverse order.
In addition, a new option allows to sort procedures / functions by name, ignoring the procedure / function prefix of the line, so
function c: integer; procedure b; function a: integer;
can be sorted like this:
function a: integer; procedure b; function c: integer;
rather than this:
function a: integer; function c: integer; procedure b;