Subject: bug#21443: 24.5; etags' complete-tag changes the global value of tags-file-name

From: HuangMario <[email-masked]>
Date: Wed, 09 Sep 2015 21:18:04 +0800

I'm using etags and found that:

Step 0. Set the 'tags-file-name' as buffer local to a specified TAGS file, and the global value is nil.

Step 1. Press M-. to find tags.

Step 2. Input some characters in the mini-buffer and press the TAB key for completion, then the mini-buffer will display "Making tags completion table for ...done".

After that, the global value of 'tags-file-name' is set to the same as its local value.

How can I keep the global value nil ?

In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
of 2015-04-11 on builder10-9.porkrind.org
Windowing system distributor `Apple', version 10.3.1348
Configured using:
`configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp''

Important settings:
  locale-coding-system: utf-8-unix

Major mode: C/l

Minor modes in effect:
  etags-update-minor-mode: t
  irony-mode: t
  global-company-mode: t
  company-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-auto-revert-mode: t
  show-paren-mode: t
  global-linum-mode: t
  linum-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent messages:
Undo! [3 times]
Saving file /Users/mario/Documents/mcc/decl.c...
Wrote /Users/mario/Documents/mcc/decl.c
(No files need saving)
Compilation finished
Mark set
Saving file /Users/mario/Documents/mcc/decl.c...
Wrote /Users/mario/Documents/mcc/decl.c
(No files need saving)
Compilation finished

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils compile comint ansi-color
lisp-mnt irony-cdb-clang-complete irony-cdb vc-git cc-langs cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs etags-update company-files company-oddmuse company-keywords
company-etags etags ring company-gtags company-dabbrev-code
company-dabbrev company-capf company-cmake company-xcode company-clang
company-semantic company-eclim company-template company-css company-nxml
company-bbdb company-irony irony-completion irony-snippet
company-irony-c-headers irony find-func company cl-extra yasnippet
help-mode easymenu cl gv package epg-config leuven-theme edmacro kmacro
cl-loaddefs cl-lib autorevert filenotify paren linum time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 198579 14210)
(symbols 48 27156 0)
(miscs 40 386 764)
(strings 32 44533 8694)
(string-bytes 1 1199266)
(vectors 16 19605)
(vector-slots 8 545370 14451)
(floats 8 484 293)
(intervals 56 2046 340)
(buffers 960 18))