Sorry, I wasn't thinking very hard about the simplifications I made in the V2 patch. Now it would error out if '(or file-name (buffer-file-name))' was nil which I assume can happen. Here is a V3 patch which should be good now.