]> git.eshelyaron.com Git - emacs.git/commitdiff
etags.el fix for bug#13412
authorGlenn Morris <rgm@gnu.org>
Thu, 17 Jan 2013 02:07:25 +0000 (21:07 -0500)
committerGlenn Morris <rgm@gnu.org>
Thu, 17 Jan 2013 02:07:25 +0000 (21:07 -0500)
* lisp/progmodes/etags.el (tags-table-check-computed-list):
Preserve point in tags buffer.

lisp/ChangeLog
lisp/progmodes/etags.el

index c2d869ae8273ed2367c008cf73e7b8f99d0174b7..cd7a013d55cf59d6ec8f241355fba552744df56e 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-17  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/etags.el (tags-table-check-computed-list):
+       Preserve point in tags buffer.  (Bug#13412)
+
 2013-01-16  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/lisp-mode.el (lisp-indent-function): Doc fix.
index dc16a2ce762f08a67eb5fd440cf2aa245ccf2806..21844d20598fc86ae716b1565debfbb421d634cd 100644 (file)
@@ -335,12 +335,15 @@ file the tag was in."
                     (save-excursion
                       (tags-verify-table (buffer-file-name table-buffer))))
                (with-current-buffer table-buffer
-                 (if (tags-included-tables)
-                     ;; Insert the included tables into the list we
-                     ;; are processing.
-                     (setcdr tables (nconc (mapcar 'tags-expand-table-name
-                                                   (tags-included-tables))
-                                           (cdr tables)))))
+                  ;; Needed so long as etags-tags-included-tables
+                  ;; does not save-excursion.
+                  (save-excursion
+                    (if (tags-included-tables)
+                        ;; Insert the included tables into the list we
+                        ;; are processing.
+                        (setcdr tables (nconc (mapcar 'tags-expand-table-name
+                                                      (tags-included-tables))
+                                              (cdr tables))))))
              ;; This table is not in core yet.  Insert a placeholder
              ;; saying we must read it into core to check for included
              ;; tables before searching the next table in the list.
@@ -1547,6 +1550,7 @@ hits the start of file."
                 files)))
     (nreverse files)))
 
+;; FIXME?  Should this save-excursion?
 (defun etags-tags-included-tables () ; Doc string?
   (let ((files nil)
        beg)