From: Uday S Reddy Date: Sun, 24 Apr 2011 18:47:17 +0000 (-0400) Subject: Fix next-file command in etags.el. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~215^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7031be6d49cb78d4cc4a2604b899144824abfeca;p=emacs.git 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. --- diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 37825382788..92cd765b492 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-04-24 Chong Yidong + + * maintaining.texi (List Tags): Document next-file. Suggested by + Uday S Reddy. + 2011-04-23 Juanma Barranquero * mini.texi (Minibuffer Edit): diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 8f395ba9563..dafc9327c74 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -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) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c83f8d5102f..efbd08ae6e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-04-24 Uday S Reddy (tiny change) + + * progmodes/etags.el (next-file): Don't use set-buffer to change + buffers (Bug#8478). + 2011-04-24 Chong Yidong * files.el (auto-mode-alist): Use js-mode for .json (Bug#8529). diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 49a2971a92a..6bd2de992cb 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -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)