[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] find-file-noselect-1
From: |
Richard Stallman |
Subject: |
Re: [PATCH] find-file-noselect-1 |
Date: |
Sat, 12 Feb 2005 03:38:07 -0500 |
Answering my own question: it can be added in gdb-ui.el. The following patch
is only for gdb-ui.el, but it adds a function to find-file-hook. I guess it
could still break find-file, if its not right.
Bugs are always a risk--but is there any reason to think bugs are likely
in this patch?
I suggest you change the progn to condition-case so as to catch any
errors that happen in gdb-enqueue-input. And if it does ever catch an
error, it could set gud-comint-buffer to nil so it won't do anything
on future calls to find-file. That should make it safe.
+ (defun gdb-set-gud-minor-mode (file)
+ "Set gud-minor-mode from find-file if appropriate."
+ (goto-char (point-min))
+ (unless (search-forward "No source file named " nil t)
+ (with-current-buffer
+ (find-file-noselect file)
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?
+ (save-current-buffer
What's the reason for that? The contents don't change buffers.
- [PATCH] find-file-noselect-1, Nick Roberts, 2005/02/10
- Re: [PATCH] find-file-noselect-1, Miles Bader, 2005/02/10
- Re: [PATCH] find-file-noselect-1, Nick Roberts, 2005/02/10
- Re: [PATCH] find-file-noselect-1, Nick Roberts, 2005/02/10
- Re: [PATCH] find-file-noselect-1,
Richard Stallman <=
- Re: [PATCH] find-file-noselect-1, Nick Roberts, 2005/02/12
- Re: [PATCH] find-file-noselect-1, Stefan Monnier, 2005/02/12
- Re: [PATCH] find-file-noselect-1, Nick Roberts, 2005/02/13
- Re: [PATCH] find-file-noselect-1, Stefan Monnier, 2005/02/13
- Re: [PATCH] find-file-noselect-1, Richard Stallman, 2005/02/13
- Re: [PATCH] find-file-noselect-1, Nick Roberts, 2005/02/13
- Re: [PATCH] find-file-noselect-1, Richard Stallman, 2005/02/15
- Re: [PATCH] find-file-noselect-1, Stefan Monnier, 2005/02/10
Re: [PATCH] find-file-noselect-1, Stefan Monnier, 2005/02/10