Is this what you mean?

More or less.

                           I don't think that gud-comint-buffer should be set to
    nil because that would prevent the GDB session from recovering.

Perhaps you should add a new variable, which you can set if you catch
an error, to disable this hook from really doing anything once it has
had an error.

     > Why call find-file-noselect there?  If this is meant to operate on the
     > file that was just visited, it already has a buffer, and it is the
     > current buffer when gdb-find-file-hook runs.  Why not just use
     > that buffer?

    That might have been true but I'm now using this function to address Kim's
    point about enabling gud-minor-mode for existing buffers.

It sounds like you are in all cases trying to find an existing buffer.
So instead of using find-file-noselect, you could use
find-buffer-visiting.


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to