aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorGlenn Morris2018-01-15 13:53:40 -0800
committerGlenn Morris2018-01-15 13:53:40 -0800
commit9bd8f01cd6613795e6a7bb228b1aff342cc88c8b (patch)
treeaa566ea564a3d8e344c3015b997a6478e2010b5d /lib-src
parente6b1df09551fc02aedcba4dbf5ee91dad4686e9a (diff)
parent2c0cfa64553dc1d4d376b42b56e52a007222736b (diff)
downloademacs-9bd8f01cd6613795e6a7bb228b1aff342cc88c8b.tar.gz
emacs-9bd8f01cd6613795e6a7bb228b1aff342cc88c8b.zip
Merge from origin/emacs-26
2c0cfa6455 * ChangeLog.3: Update 4387bb44ae Update authors bce51bd6f7 * lisp/gnus/message.el (message-do-auto-fill): Prevent do-... bd2a2a1e84 Improve documentation of etags 7ba75b9637 Teach etags new interpreters for some languages 1f7f03742d * lisp/emacs-lisp/generator.el (iter-defun): Add 'doc-stri... dbb4aac212 * lisp/emacs-lisp/syntax.el (syntax-propertize): Fix bug#2... 80463a43da Improve documentation of fill-separate-heterogeneous-words... 4bd2416d55 Fix documentation of some x-* functions 9c2b11484f Inherit query-on-exit flag to stderr process (Bug#30031) 3efb1e7def Fix Bug#30057 a9b884c60f Tag some unstable tests, and skip by default (bug#24503) # Conflicts: # test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index eb6d31a6607..588921bc700 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -630,6 +630,8 @@ static const char *Erlang_suffixes [] =
630static const char Erlang_help [] = 630static const char Erlang_help [] =
631"In Erlang code, the tags are the functions, records and macros\n\ 631"In Erlang code, the tags are the functions, records and macros\n\
632defined in the file."; 632defined in the file.";
633static const char *Erlang_interpreters [] =
634 { "escript", NULL };
633 635
634const char *Forth_suffixes [] = 636const char *Forth_suffixes [] =
635 { "fth", "tok", NULL }; 637 { "fth", "tok", NULL };
@@ -666,6 +668,8 @@ static const char *Lua_suffixes [] =
666 { "lua", "LUA", NULL }; 668 { "lua", "LUA", NULL };
667static const char Lua_help [] = 669static const char Lua_help [] =
668"In Lua scripts, all functions are tags."; 670"In Lua scripts, all functions are tags.";
671static const char *Lua_interpreters [] =
672 { "lua", NULL };
669 673
670static const char *Makefile_filenames [] = 674static const char *Makefile_filenames [] =
671 { "Makefile", "makefile", "GNUMakefile", "Makefile.in", "Makefile.am", NULL}; 675 { "Makefile", "makefile", "GNUMakefile", "Makefile.in", "Makefile.am", NULL};
@@ -721,12 +725,16 @@ static const char *Prolog_suffixes [] =
721static const char Prolog_help [] = 725static const char Prolog_help [] =
722"In Prolog code, tags are predicates and rules at the beginning of\n\ 726"In Prolog code, tags are predicates and rules at the beginning of\n\
723line."; 727line.";
728static const char *Prolog_interpreters [] =
729 { "gprolog", "pl", "yap", "swipl", "prolog", NULL };
724 730
725static const char *Python_suffixes [] = 731static const char *Python_suffixes [] =
726 { "py", NULL }; 732 { "py", NULL };
727static const char Python_help [] = 733static const char Python_help [] =
728"In Python code, 'def' or 'class' at the beginning of a line\n\ 734"In Python code, 'def' or 'class' at the beginning of a line\n\
729generate a tag."; 735generate a tag.";
736static const char *Python_interpreters [] =
737 { "python", NULL };
730 738
731static const char *Ruby_suffixes [] = 739static const char *Ruby_suffixes [] =
732 { "rb", "ru", "rbw", NULL }; 740 { "rb", "ru", "rbw", NULL };
@@ -735,6 +743,8 @@ static const char *Ruby_filenames [] =
735static const char Ruby_help [] = 743static const char Ruby_help [] =
736 "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\ 744 "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\
737a line generate a tag. Constants also generate a tag."; 745a line generate a tag. Constants also generate a tag.";
746static const char *Ruby_interpreters [] =
747 { "ruby", NULL };
738 748
739/* Can't do the `SCM' or `scm' prefix with a version number. */ 749/* Can't do the `SCM' or `scm' prefix with a version number. */
740static const char *Scheme_suffixes [] = 750static const char *Scheme_suffixes [] =
@@ -798,14 +808,15 @@ static language lang_names [] =
798 { "c++", Cplusplus_help, Cplusplus_entries, Cplusplus_suffixes }, 808 { "c++", Cplusplus_help, Cplusplus_entries, Cplusplus_suffixes },
799 { "c*", no_lang_help, Cstar_entries, Cstar_suffixes }, 809 { "c*", no_lang_help, Cstar_entries, Cstar_suffixes },
800 { "cobol", Cobol_help, Cobol_paragraphs, Cobol_suffixes }, 810 { "cobol", Cobol_help, Cobol_paragraphs, Cobol_suffixes },
801 { "erlang", Erlang_help, Erlang_functions, Erlang_suffixes }, 811 { "erlang", Erlang_help, Erlang_functions, Erlang_suffixes,
812 NULL, Erlang_interpreters },
802 { "forth", Forth_help, Forth_words, Forth_suffixes }, 813 { "forth", Forth_help, Forth_words, Forth_suffixes },
803 { "fortran", Fortran_help, Fortran_functions, Fortran_suffixes }, 814 { "fortran", Fortran_help, Fortran_functions, Fortran_suffixes },
804 { "go", Go_help, Go_functions, Go_suffixes }, 815 { "go", Go_help, Go_functions, Go_suffixes },
805 { "html", HTML_help, HTML_labels, HTML_suffixes }, 816 { "html", HTML_help, HTML_labels, HTML_suffixes },
806 { "java", Cjava_help, Cjava_entries, Cjava_suffixes }, 817 { "java", Cjava_help, Cjava_entries, Cjava_suffixes },
807 { "lisp", Lisp_help, Lisp_functions, Lisp_suffixes }, 818 { "lisp", Lisp_help, Lisp_functions, Lisp_suffixes },
808 { "lua", Lua_help, Lua_functions, Lua_suffixes }, 819 { "lua", Lua_help,Lua_functions,Lua_suffixes,NULL,Lua_interpreters},
809 { "makefile", Makefile_help,Makefile_targets,NULL,Makefile_filenames}, 820 { "makefile", Makefile_help,Makefile_targets,NULL,Makefile_filenames},
810 { "objc", Objc_help, plain_C_entries, Objc_suffixes }, 821 { "objc", Objc_help, plain_C_entries, Objc_suffixes },
811 { "pascal", Pascal_help, Pascal_functions, Pascal_suffixes }, 822 { "pascal", Pascal_help, Pascal_functions, Pascal_suffixes },
@@ -813,9 +824,12 @@ static language lang_names [] =
813 { "php", PHP_help, PHP_functions, PHP_suffixes }, 824 { "php", PHP_help, PHP_functions, PHP_suffixes },
814 { "postscript",PS_help, PS_functions, PS_suffixes }, 825 { "postscript",PS_help, PS_functions, PS_suffixes },
815 { "proc", no_lang_help, plain_C_entries, plain_C_suffixes }, 826 { "proc", no_lang_help, plain_C_entries, plain_C_suffixes },
816 { "prolog", Prolog_help, Prolog_functions, Prolog_suffixes }, 827 { "prolog", Prolog_help, Prolog_functions, Prolog_suffixes,
817 { "python", Python_help, Python_functions, Python_suffixes }, 828 NULL, Prolog_interpreters },
818 { "ruby", Ruby_help,Ruby_functions,Ruby_suffixes,Ruby_filenames }, 829 { "python", Python_help, Python_functions, Python_suffixes,
830 NULL, Python_interpreters },
831 { "ruby", Ruby_help, Ruby_functions, Ruby_suffixes,
832 Ruby_filenames, Ruby_interpreters },
819 { "scheme", Scheme_help, Scheme_functions, Scheme_suffixes }, 833 { "scheme", Scheme_help, Scheme_functions, Scheme_suffixes },
820 { "tex", TeX_help, TeX_commands, TeX_suffixes }, 834 { "tex", TeX_help, TeX_commands, TeX_suffixes },
821 { "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes }, 835 { "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes },
@@ -1796,6 +1810,13 @@ find_entries (FILE *inf)
1796 else 1810 else
1797 lp = skip_spaces (lb.buffer + 2); 1811 lp = skip_spaces (lb.buffer + 2);
1798 cp = skip_non_spaces (lp); 1812 cp = skip_non_spaces (lp);
1813 /* If the "interpreter" turns out to be "env", the real interpreter is
1814 the next word. */
1815 if (cp > lp && strneq (lp, "env", cp - lp))
1816 {
1817 lp = skip_spaces (cp);
1818 cp = skip_non_spaces (lp);
1819 }
1799 *cp = '\0'; 1820 *cp = '\0';
1800 1821
1801 if (strlen (lp) > 0) 1822 if (strlen (lp) > 0)