[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `next-file' in etags.el signaling error to denote end of operation
From: |
Kevin Ryde |
Subject: |
Re: `next-file' in etags.el signaling error to denote end of operation |
Date: |
Sun, 27 Dec 2009 11:34:44 +1100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
"Tobias C. Rittweiler" <address@hidden> writes:
>
> This makes it not all that easy to call `tags-query-replace' multiple
> times in a row programmatically as far as I can see.
I struck that recently too, trying to use it programmatically.
I wondered if it was the right tool for the job.
I also struck that if you pass relative filenames then they can be taken
relative to the directories of other files in the list, if some of those
are in buffers already.
I've been contemplating the change below, without being sure if it
affects anything except programmed usages, which may not be its purpose
...
2009-11-16 Kevin Ryde <address@hidden>
* progmodes/etags.el (next-file): expand-file-name on files from
the eval, the same as in the tags-table-files case. This lets
tags-query-replace go to the right place if the evalled form gives
relative filenames some of which are already in buffers.
Index: etags.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/etags.el,v
retrieving revision 1.218
diff -u -u -r1.218 etags.el
--- etags.el 5 Dec 2009 22:01:04 -0000 1.218
+++ etags.el 27 Dec 2009 00:26:41 -0000
@@ -1708,7 +1708,8 @@
(tags-table-files))))))))
(t
;; Initialize the list by evalling the argument.
- (setq next-file-list (eval initialize))))
+ ;; expand-file-name in case the tags-loop-operate goes to a new dir.
+ (setq next-file-list (mapcar 'expand-file-name (eval initialize)))))
(unless next-file-list
(and novisit
(get-buffer " *next-file*")