"\\.eln$" matches lines ending in ".eln", "\\.eln\\'" matches only if the string ends in ".eln", which is presumably the intention. Using string-suffix-p could be even clearer.
I didn't read the source but a name like "library" suggests that the string to match against may contain more than one match. In either case, using "\\'" means that that string must be constructed c
No, \' is no faster than $. It's just The Right Thing here, even tho the probability that $ will misbehave in this case is very low here (you'd need to have a file with ".eln\n" embedded somewhere i