> Yes, but we need to do that even on chunks of code that have not yet > been (and may never be) displayed and in buffers where font-lock > is disabled. IOW I'm not talking about fontification but about parsing. Sure. But I was only talking about the possibility to highlight such instances just like we do with column 0 parens in strings already. > Pretty much, yes, tho the error message should give more info (the OP > complained about lack of info in the error message). That's what the ellipsis stands for. But what info? Guessing a good buffer position seems next to impossible. Where else can `forward-sexp' go astray when called from a top-level position? >> But do we really have to scan the buffer in the first place? > > Don't know. Maybe not, indeed. Maybe it's just to detect the "too many > closing parens" case as well (i.e. rather than silently ignore trailing > code). We could simply search for (concat "^(" (symbol-name symbol))) and do a `forward-sexp' over the form starting there as in the attached patch. I see no reason why we should try to handle an .emacs broken before or after that form. martin