Mercurial > emacs
diff lib-src/etags.c @ 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 | 824d09eb82bf |
| children | 90109c37ac78 b1c1fc853d2f |
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; }
