* Possible etags-table.el BUG. Can anyone approve?
@ 2011-01-25 17:15 Oleksandr Gavenko
0 siblings, 0 replies; only message in thread
From: Oleksandr Gavenko @ 2011-01-25 17:15 UTC (permalink / raw)
To: help-gnu-emacs
I download http://www.emacswiki.org/emacs/etags-table.el ,
load and set
(setq etags-table-alist
(list
'(".*\\.[ch]" "c:/Program Files/Microsoft
SDKs/Windows/v6.1/include/TAGS")
'(".*\\.cpp" "c:/Program Files/Microsoft
SDKs/Windows/v6.1/include/TAGS")
))
and got error in *.cpp files when try visit file by M-. :
ad-Orig-visit-tags-table-buffer: File c:/Program Files/Microsoft
SDKs/Windows/v6.1/Include/TAGSpp is not a valid tags table
I will contact with author but little more later.
After debug I found from which place it come:
'etags-table-build-table-list' function.
This peace of code look strange for me and original place of error:
;; Go through mapping alist
(mapc (lambda (mapping)
(let ((key (car mapping))
(tag-files (cdr mapping)))
(when (string-match key filename)
(mapc (lambda (tag-file)
(add-to-list 'tables (file-truename (replace-match
tag-file t nil filename)) t))
tag-files))))
etags-table-alist)
I don't understand why code contain:
(replace-match tag-file t nil filename)
For me this code must be rewritten to:
(mapc (lambda (mapping)
(let ((key (car mapping))
(tag-files (cdr mapping)))
(when (string-match key filename)
(setq tables (append tables (mapcar 'file-truename
tag-files))))))
etags-table-alist)
Originally author in 'etags-table-alist' docs write $ at the end of regex
so if I rewrite regex all work OK. But why do replace-match????
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-25 17:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-25 17:15 Possible etags-table.el BUG. Can anyone approve? Oleksandr Gavenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.