bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

etags doesn't respect buffer local tags-file-name


From: matt
Subject: etags doesn't respect buffer local tags-file-name
Date: Thu, 16 Nov 2000 12:22:31 -0800

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.2 (i386-debian-linux-gnu, X toolkit)
 of Tue Jul 25 2000 on raven
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --with-pop=yes --with-x=yes --with-x-toolkit=yes'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

C-u M-. always uses the global value of `tags-file-name' even if a
buffer local value is set.

I never set the global value for the tags buffer, preferring to set
the local value in c-mode-common-hook.  So C-u M-. is broken for me.

find-tag-noselect sets the current buffer to the TAGS buffer.  Then
the `tags-file-name' var is referenced via find-tag-noselect ->
find-tag-in-order -> visit-tags-table-buffer.  So the global instead
of buffer local value is used for C-u M-.

My fix to etags.el just sets `tags-file-name' from `tags-file-name'
before switching to the TAGS buffer.

*** etags.el.orig       Thu Nov 16 12:01:55 2000
--- etags.el    Thu Nov 16 12:07:02 2000
***************
*** 768,776 ****
    (interactive (find-tag-interactive "Find tag: "))
  
    (setq find-tag-history (cons tagname find-tag-history))
!   ;; Save the current buffer's value of `find-tag-hook' before selecting the
!   ;; tags table buffer.
!   (let ((local-find-tag-hook find-tag-hook))
      (if (eq '- next-p)
        ;; Pop back to a previous location.
        (if (ring-empty-p tags-location-ring)
--- 768,779 ----
    (interactive (find-tag-interactive "Find tag: "))
  
    (setq find-tag-history (cons tagname find-tag-history))
!   ;; Save the current buffer's value of `find-tag-hook' before
!   ;; selecting the tags table buffer.  For the same reason, set the
!   ;; global value of tags-file-name from tags-file-name in case it is
!   ;; buffer local.
!   (let ((local-find-tag-hook find-tag-hook)
!       (tags-file-name tags-file-name))
      (if (eq '- next-p)
        ;; Pop back to a previous location.
        (if (ring-empty-p tags-location-ring)


Recent input:
up up up up up up C-e ) C-x C-s down-mouse-1 mouse-movement 
mouse-movement mouse-movement mouse-movement mouse-movement 
mouse-movement mouse-movement drag-mouse-1 left left 
left left right right right left left right up up up 
up up up up up up up left right down down left left 
down down down left left left left left left left left 
left left left left left left left left right right 
down left left right right down left right up up up 
up up up up up up up up up up down down down down down 
down down down down down menu-bar help-menu report
-emacs-bug

Recent messages:
Mark saved where search started [6 times]
Auto-saving...
defun: (NAME ARGLIST [DOCSTRING] BODY...)
Saving file /home/matt/env/elisp/etags.el...
Wrote /home/matt/env/elisp/etags.el
(No changes need to be saved)
Saving file /home/matt/env/elisp/etags.el...
Wrote /home/matt/env/elisp/etags.el
Loading emacsbug...
Loading emacsbug...done



reply via email to

[Prev in Thread] Current Thread [Next in Thread]