Fix next-file command in etags.el.

* lisp/progmodes/etags.el (next-file): Don't use set-buffer to change
buffers (Bug#8478).

* doc/lisp/maintaining.texi (List Tags): Document next-file.
This commit is contained in:
Uday S Reddy 2011-04-24 14:47:17 -04:00 committed by Chong Yidong
parent 6f68a3a29e
commit 7031be6d49
4 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-04-24 Chong Yidong <cyd@stupidchicken.com>
* maintaining.texi (List Tags): Document next-file. Suggested by
Uday S Reddy.
2011-04-23 Juanma Barranquero <lekktu@gmail.com>
* mini.texi (Minibuffer Edit):

View file

@ -2326,6 +2326,12 @@ details.
You can also use the collection of tag names to complete a symbol
name in the buffer. @xref{Symbol Completion}.
You can use @kbd{M-x next-file} to visit the files in the selected
tags table. The first time this command is called, it visits the
first file in the tags table. Each subsequent call visits the next
file in the table, unless a prefix argument is supplied, in which case
it returns to the first file.
@node EDE
@section Emacs Development Environment
@cindex EDE (Emacs Development Environment)

View file

@ -1,3 +1,8 @@
2011-04-24 Uday S Reddy <u.s.reddy@cs.bham.ac.uk> (tiny change)
* progmodes/etags.el (next-file): Don't use set-buffer to change
buffers (Bug#8478).
2011-04-24 Chong Yidong <cyd@stupidchicken.com>
* files.el (auto-mode-alist): Use js-mode for .json (Bug#8529).

View file

@ -1756,9 +1756,9 @@ if the file was newly read in, the value is the filename."
(with-current-buffer buffer
(revert-buffer t t)))
(if (not (and new novisit))
(set-buffer (find-file-noselect next novisit))
(find-file next novisit)
;; Like find-file, but avoids random warning messages.
(set-buffer (get-buffer-create " *next-file*"))
(switch-to-buffer (get-buffer-create " *next-file*"))
(kill-all-local-variables)
(erase-buffer)
(setq new next)