Mercurial > emacs
changeset 65714:fbae8bd411de
(main): In append mode, sort the tags file after writing it.
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Tue, 27 Sep 2005 20:18:15 +0000 |
parents | ad24f42046b1 |
children | 292616bda412 |
files | lib-src/etags.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/etags.c Tue Sep 27 18:48:59 2005 +0000 +++ b/lib-src/etags.c Tue Sep 27 20:18:15 2005 +0000 @@ -41,7 +41,7 @@ * configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 17.13"; +char pot_etags_version[] = "@(#) pot revision number is 17.14"; #define TRUE 1 #define FALSE 0 @@ -1475,12 +1475,13 @@ if (fclose (tagf) == EOF) pfatal (tagfile); - if (update) - { - char cmd[2*BUFSIZ+10]; - sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); - exit (system (cmd)); - } + if (CTAGS) + if (append_to_tagfile || update) + { + char cmd[2*BUFSIZ+10]; + sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); + exit (system (cmd)); + } return EXIT_SUCCESS; }