]> code.delx.au - gnu-emacs-elpa/commitdiff
Prevent point movement caused by 'location in company-etags.
authorNikolaj Schumacher <git@nschum.de>
Sun, 21 Feb 2010 23:00:01 +0000 (00:00 +0100)
committerNikolaj Schumacher <git@nschum.de>
Tue, 23 Feb 2010 14:17:08 +0000 (15:17 +0100)
company-etags.el

index 51628effaac217505a5707342c2553f371776106..75b07a065c5274b433acfa1bf979f562650fb112 100644 (file)
@@ -67,8 +67,9 @@ buffer automatically."
                         (all-completions arg (tags-completion-table)))))
     ('location (let ((tags-table-list (company-etags-buffer-table)))
                  (when (fboundp 'find-tag-noselect)
-                   (let ((buffer (find-tag-noselect arg)))
-                     (cons buffer (with-current-buffer buffer (point)))))))
+                   (save-excursion
+                     (let ((buffer (find-tag-noselect arg)))
+                       (cons buffer (with-current-buffer buffer (point))))))))
     ('sorted t)))
 
 (provide 'company-etags)