summaryrefslogtreecommitdiff
path: root/lib-src
Commit message (Collapse)AuthorAge
* Port to Solaris 10Paul Eggert2021-01-01
| | | | | | | | | | | | | | | | | | | | | | * configure.ac: Instead of AC_CHECK_HEADER, use AC_COMPILE_IFELSE with X11/Intrinsic.h when checking for X11/extensions/Xrender.h. This suppresses a bogus "report a bug to bug-gnu-emacs" diagnostic from 'configure' in Solaris 10. (SETUP_SLAVE_PTY): Adjust to recent renaming of forkin to std_in in callproc.c. Needed on Solaris and Unixware. * lib-src/Makefile.in (LIB_GETRANDOM, LIBS_ETAGS): New vars, needed because on Solaris 10 the Gnulib tempname module now needs the -lrt library for clock_gettime. Throw in the LIB_GETRANDOM stuff too while we’re at it; from getrandom.m4 it seems to be needed for MingW. (LIBS_MOVE, etags_libs): Use them. * src/callproc.c [SETUP_SLAVE_PTY]: Include sys/stream.h and sys/stropts.h, for SETUP_SLAVE_PTY’s definiens. * src/process.c [NEED_BSDTTY]: Don’t include bsdtty.h; hasn’t been needed in years. [USG5_4]: Don’t include sys/stream.h or sys/stropts.h; these directives havbe been moved to callproc.c because the only use of SETUP_SLAVE_PTY is there now.
* Merge from origin/emacs-27Paul Eggert2021-01-01
|\ | | | | | | 33d159c36f Fix copyright years by hand
| * Fix copyright years by handPaul Eggert2021-01-01
| | | | | | | | These are dates that admin/update-copyright did not update.
| * Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
| * Fix crash (segfault) in etags on generating tags for Erlang filesSerge Tupchii2020-12-09
| | | | | | | | | | | | | | | | | | | | * lib-src/etags.c: Set allocated and lastlen to zero, after freeing last ptr in Erlang_functions to prevent dereferencing NULL pointer (bug#45122). Copyright-paperwork-exempt: yes (cherry picked from commit 2d8f0364fcd1d5dad2b82dd3a9af870b03854547)
* | Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Adjust to recent Gnulib changesPaul Eggert2020-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest Gnulib merge brought in free-posix, which causes 'free' to preserve errno. This lets us simplify some Emacs code that calls 'free'. * admin/merge-gnulib (GNULIB_MODULES): Add free-posix. This module is pulled in by canonicalize-lgpl anyway, so we might as well rely on it. * lib-src/emacsclient.c (get_current_dir_name): Sync better with src/sysdep.c. * lib-src/etags.c (process_file_name, etags_mktmp): * lib-src/update-game-score.c (unlock_file): * src/fileio.c (file_accessible_directory_p): * src/sysdep.c (get_current_dir_name_or_unreachable): Simplify by assuming that 'free' preserves errno. * src/alloc.c (malloc_unblock_input): Preserve errno, so that xfree preserves errno. * src/sysdep.c (get_current_dir_name_or_unreachable): Simplify by using strdup instead of malloc+memcpy. No need for realloc (and the old code leaked memory anyway on failure); just use free+malloc.
* | Fix crash (segfault) in etags on generating tags for Erlang filesSerge Tupchii2020-12-08
| | | | | | | | | | | | | | * lib-src/etags.c: Set allocated and lastlen to zero, after freeing last ptr in Erlang_functions to prevent dereferencing NULL pointer (bug#45122). Copyright-paperwork-exempt: yes
* | Merge from origin/emacs-27Glenn Morris2020-11-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | 75723ec212 (origin/emacs-27) ; * lisp/emacs-lisp/benchmark.el (benchm... 53e2a612ad ; * lib-src/make-fingerprint.c: Update commentary. 286c632772 Reformat argument commentary in etags.c 4ec740866a Make the invocation of combine-change-calls in comment-reg... 66bcec8838 * lisp/progmodes/cc-langs.el (c-<>-notable-chars-re): Fix ... 03eeab469e ; Update the expected result files in test/manual/etags. d875a22bc6 Update the various INSTALL files # Conflicts: # INSTALL
| * ; * lib-src/make-fingerprint.c: Update commentary.Glenn Morris2020-11-15
| |
| * Reformat argument commentary in etags.cEli Zaretskii2020-11-15
| | | | | | | | | | * lib-src/etags.c (pfnote, consider_token, C_entries): Resurrect original format of comments to function arguments.
| * ; Fix more trivial typosStefan Kangas2020-09-21
| |
* | Mark the return value from strerror as a constantPhilipp Klaus Krause2020-10-14
| | | | | | | | | | | | | | | | | | * src/emacs.c (main): Mark the return from strerror as a constant, since it shouldn't be changed (bug#43982). * lib-src/movemail.c (pfatal_and_delete): Ditto. Copyright-paperwork-exempt: yes
* | ; Fix trivial typos in ChangeLogsStefan Kangas2020-10-03
| |
* | ; Fix typosStefan Kangas2020-09-21
| |
* | Don't output emacsclient warning if both -a and --quietLars Ingebrigtsen2020-08-13
| | | | | | | | | | | | * lib-src/emacsclient.c (set_local_socket): Don't output the warning if both -a and --quiet are specified (bug#16117). Inspired by a patch from Scott Turner <srt19170@gmail.com>.
* | Merge from origin/emacs-27Glenn Morris2020-05-28
|\| | | | | | | | | | | | | e7a3ed8a6d Fix tab-bar-tab-name-ellipsis initialization 4737d0af75 Fix Elisp manual entry for format-spec 0195809bb6 Fix rare assertion violations in 'etags' cddb0079ff ; * lisp/format-spec.el (format-spec): Fix typo.
| * Fix rare assertion violations in 'etags'Eli Zaretskii2020-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (pfnote): Instead of raising an assertion when we get an empty tag name, return immediately. (Bug#41465) * test/manual/etags/ETAGS.good_1: * test/manual/etags/ETAGS.good_2: * test/manual/etags/ETAGS.good_3: * test/manual/etags/ETAGS.good_4: * test/manual/etags/ETAGS.good_5: * test/manual/etags/ETAGS.good_6: Adapt to latest changes in etags.
* | Port etags FALLTHROUGH to C2XPaul Eggert2020-05-23
| | | | | | | | | | | | | | Problem reported by Ashish SHUKLA in: https://lists.gnu.org/r/emacs-devel/2020-05/msg03013.html * lib-src/etags.c (C_entries): Move label so that FALLTHROUGH precedes a case label, as draft C2X specifies.
* | * lib-src/Makefile.in (LINK_CFLAGS): Remove; unused.Paul Eggert2020-04-04
| |
* | Stop using newly-deprecated dosname Gnulib modulePaul Eggert2020-03-28
| | | | | | | | | | | | | | | | | | Code is supposed to use the filename module now. * admin/merge-gnulib (GNULIB_MODULES): Replace dosname with filename. * lib/dosname.h: Remove this forwarding stub. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib-src/emacsclient.c, src/fileio.c: Include filename.h instead of dosname.h.
* | Pacify GCC 9.2.1 20190927 -O3Paul Eggert2020-03-04
|/ | | | | | | | | | | | | | | | | | | | | | | | Original problem report by N. Jackson in: https://lists.gnu.org/r/emacs-devel/2020-03/msg00047.html I found some other warnings when I used gcc, and fixed them with this patch. * lib-src/etags.c: Include verify.h. (xnmalloc, xnrealloc): Tell the compiler that NITEMS is nononnegative and ITEM_SIZE is positive. * src/conf_post.h (__has_attribute_returns_nonnull) (ATTRIBUTE_RETURNS_NONNULL): New macros. * src/editfns.c (Fuser_full_name): Don’t assume Fuser_login_name returns non-nil. * src/intervals.c (rotate_right, rotate_left, update_interval): * src/intervals.h (LENGTH, LEFT_TOTAL_LENGTH, RIGHT_TOTAL_LENGTH): Use TOTAL_LENGTH0 or equivalent on intervals that might be null. * src/intervals.h (TOTAL_LENGTH): Assume arg is nonnull. (TOTAL_LENGTH0): New macro, with the old TOTAL_LENGTH meaning. (make_interval, split_interval_right): Add ATTRIBUTE_RETURNS_NONNULL. * src/pdumper.c (dump_check_dump_off): Now returns void, since no caller uses the return value. Redo assert to pacify GCC. (decode_emacs_reloc): Add a seemingly-random eassume to pacify GCC. Ugly, and I suspect due to a bug in GCC.
* Make emacs prefer an existing ~/.emacs.d to an existing XDG locationRobert Pluim2020-01-16
| | | | | | | | | | | | | | | * doc/emacs/custom.texi (Find Init): Update description of how Emacs finds its init file directory and the interaction with $XDG_CONFIG_HOME (Early Init File): Correct XDG location of early-init.el * etc/NEWS: Update description to make it clear the ~/.emacs.d is preferred, even if the XDG location exists. * lisp/startup.el: Prefer ~/.emacs.d even if the XDG location exists. * lib-src/emacsclient.c (open_config): Prefer home directory the XDG location.
* Fix copyright years by handPaul Eggert2020-01-01
| | | | These are dates that admin/update-copyright did not update.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Prefer static to extern in ebrowsePaul Eggert2019-12-09
| | | | | | | | | | | | | | | * lib-src/ebrowse.c (info_where, info_cls, info_member) (info_position, options, yyival, yytext, yytext_end, yyout) (yyline, filename, is_ident, is_digit, is_white, f_append) (f_verbose, f_very_verbose, f_structs, f_regexps) (f_nested_classes, min_regexp, max_regexp, inbuffer, in) (inbuffer_size, string_start, class_table, member_table) (namespace_alias_table, global_symbols, current_namespace) (all_namespaces, namespace_stack, namespace_stack_size) (namespace_sp, tk, keyword_table, search_path) (search_path_tail, scope_buffer, scope_buffer_size) (scope_buffer_len): Now static. (options): Now const.
* * lib-src/etags.c (pot_etags_version): Remove; unused.Paul Eggert2019-12-09
|
* * lib-src/etags.c (Forth_suffixes): Now static.Paul Eggert2019-12-09
|
* etags: remove some arbitrary limitsPaul Eggert2019-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | etags had undefined behavior if input files, lines, tags, etc., had more than INT_MAX bytes. Clean up the usage of integer types to fix the overflow errors I found. * admin/merge-gnulib (GNULIB_MODULES): Add mempcpy. * lib-src/etags.c: Include inttypes.h, intprops.h. (memcpyz): New function. Use it to simplify several occurrences of memcpy followed by storing a trailing '\0'. (xnew): Use xnmalloc, to catch overflow on integer multiplication. (xrnew): Change last arg to multiplier. The type is not needed. All callers changed. (node, lineno, charno, linecharno, invalidcharno, make_tag): (pfnote, add_node, number_len, C_symtype, lbz, Makefile_targets) (readline): Use intmax_t for line numbers and character positions, instead of int or long. (linebuffer, make_tag, pfnote, total_size_of_entries, put_entry) (in_word_set, C_symtype, token, cstack, pushclass_above): (popclass_above, write_classname, consider_token, C_entries) (Ruby_functions, Makefile_targets, Lua_functions, TeX_commands) (TeX_decode_env, erlang_func, erlang_attribute, erlang_atom) (substitute, regex_tag_multiline, nocase_tail, readline_interval) (readline, savenstr, concat, etags_getcwd, relative_filename) (linebuffer_setlen): Use ptrdiff_t for object sizes, instead of int or long or unsigned or size_t. (write_classname, C_entries): Avoid sprintf, as the result could exceed INT_MAX bytes and then behavior goes haywire. (main): Use int, instead of unsigned, for argv counts. (get_language_from_filename): Use bool for boolean. (Ruby_functions): Prefer strcpy to memcpy when copying "=". (linebuffer_setlen): Use ‘if’ instead of ‘while’. (memory_full, xnmalloc, xnrealloc): New functions. (xmalloc): Use memory_full, and take a ptrdiff_t instead of a size_t. (xrealloc): Remove; no longer needed. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/mempcpy.c, m4/mempcpy.m4: New files, copied from Gnulib.
* Update some URLsPaul Eggert2019-09-23
| | | | | | | | | | | | | | | | | This mostly changes http: to https: in URLs. It also updates some URLs that have moved, removes some URLs that no longer work, recommends against using procmail (procmail.org no longer works), and removes some mentions of the no-longer-existing Gmane, LPF and VTW. It doesn't update all URLs, just the ones I had time for. * GNUmakefile (help): * admin/admin.el (manual-doctype-string): * admin/charsets/Makefile.in (${charsetdir}/ALTERNATIVNYJ.map): * admin/charsets/mapconv: * lisp/net/soap-client.el (soap-create-envelope): * lisp/org/org.el (org-doi-server-url): * lisp/textmodes/bibtex.el (bibtex-generate-url-list): Prefer https: to http: un URLs.
* Revert "emacsclient: ignore --eval parameters when starting alternate editor"Lars Ingebrigtsen2019-09-15
| | | | | | This reverts commit 6fe661342a24edcaea255c3ba9a37613031554da. The alternate editor may be Emacs, which is useful when you want to eval something in an existing Emacs (if it exists), or in a new Emacs if there's no server running.
* Check instead of relying on NOTREACHEDPaul Eggert2019-08-31
| | | | | | | | | | | | | | | | NOTREACHED was designed for traditional lint decades ago, and _Noreturn now normally subsumes its function. In the one case in Emacs where NORETURN might help and _Noreturn does not, check for NOTREACHED instead of assuming it. * lib-src/etags.c (main): * src/xterm.c (x_connection_closed): Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED is no longer needed there. Also, one of the NOTREACHEDs was misplaced, which defeated traditional lint checking anyway. * lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED. * src/emacs.c (main): Use eassume (false) rather than NOTREACHED, so that running with ENABLE_CHECKING catches any internal error causing the toplevel Frecursive_edit to return.
* emacsclient: adjust to new config file locationPaul Eggert2019-08-30
| | | | | | | * lib-src/emacsclient.c (open_config): New arg XDG, to respect XDG_CONFIG_HOME, consistently with Emacs proper. Caller changed. Use XDG convention if available, falling back on the old names if not.
* * lib-src/make-docfile.c: Fix comment typo.Paul Eggert2019-07-12
|
* Tweak builtin symbol order for speedPaul Eggert2019-07-11
| | | | | | | | * lib-src/make-docfile.c (compare_globals): Make symbols 1 through 4 be t, unbound, error, lambda. This is in addition to symbol 0 being nil. This change improved ‘make compile-always’ performance by 0.6% on my platform.
* Make fingerprint handling compatible with LTOAndreas Schwab2019-07-09
| | | | | | | | | | Tell the compiler that the fingerprint variable is modified unpredictably. * lib/fingerprint.h (fingerprint): Remove const. * lib/fingerprint.c (fingerprint): Likewise. * src/pdumper.c (Fdump_emacs_portable): Cast fingerprint variable. (pdumper_load): Likewise. * lib-src/make-fingerprint.c (main): Likewise.
* emacsclient: ignore --eval parameters when starting alternate editorLars Ingebrigtsen2019-06-27
| | | | | | * lib-src/emacsclient.c (fail): If the user said --eval, don't pass those arguments to the alternate editor as file names. Suggested by a patch from Scott Turner (bug#11474).
* Fix PATH_MAX change to lib-src/emacsclient.cJuanma Barranquero2019-06-26
| | | | * lib-src/emacsclient.c (get_current_dir_name): Declare pwdlen.
* Prefer PATH_MAX to MAXPATHLENPaul Eggert2019-06-25
| | | | | | | | | | | | | | | | PATH_MAX is standardized, MAXPATHLEN is not. Also, the Gnulib pathmax module fixes some rare bugs with PATH_MAX. So prefer PATH_MAX to MAXPATHLEN unless we know the latter is also correct (for some platform-specific code). * admin/merge-gnulib (GNULIB_MODULES): Add pathmax. This module was already present, as a dependency of canonicalize-lgpl, but now Emacs is using it directly. Sort. * lib-src/emacsclient.c: Include stdint.h, pathmax.h. (get_current_dir_name): Sync to current src/sysdep.c. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * src/sysdep.c: Include pathmax.h. (get_current_dir_name_or_unreachable): Use PATH_MAX instead of MAXPATHLEN.
* Avoid some strlen work, primarily via strnlenPaul Eggert2019-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add strnlen. * lib-src/etags.c (find_entries): * src/emacs.c (main): * src/nsmenu.m (parseKeyEquiv:): * src/nsterm.m (ns_xlfd_to_fontname): * src/term.c (vfatal): Prefer !*X to !strlen (X). * lib-src/etags.c (pfnote, add_regex): * lib-src/pop.c (pop_open): * lib-src/update-game-score.c (main): * lwlib/lwlib.c (lw_separator_p): * src/doprnt.c (doprnt): * src/emacs.c (main): * src/inotify.c (inotifyevent_to_event): * src/keyboard.c (menu_separator_name_p, parse_tool_bar_item): * src/sysdep.c (get_current_dir_name_or_unreachable): * src/xdisp.c (store_mode_line_string): Use strnlen to avoid unnecessary work with strlen. * lib-src/etags.c (Prolog_functions, prolog_pr) (Erlang_functions, erlang_func): Prefer ptrdiff_t to size_t when either will do. (prolog_pr, erlang_func): New arg LASTLEN, to avoid unnecessary strlen call. All callers changed. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/strnlen.c, m4/strnlen.m4: New files, copied from Gnulib. * lwlib/lwlib.c (lw_separator_p): * src/json.c (json_has_prefix): Use strncmp to avoid unecessary work with strlen + memcmp. * src/process.c (set_socket_option): Use SBYTES instead of strlen.
* etags: Fix handling of quoted symbol names in ErlangDavid Hull2019-06-25
| | | | | * lib-src/etags.c (erlang_attribute): Fix handling of quoted symbol names in Erlang (bug#24960).
* Remove -q from zstd invocationLars Ingebrigtsen2019-06-24
| | | | | * lib-src/etags.c (compressors): -q isn't necessary since standard output goes to /dev/null. From Michael Albinus (bug#33919).
* Add Zstandard compression support for etagsAlexander Gramiak2019-06-24
| | | | | | * lib-src/etags.c: (compressors): Add zstd support. (print_language_names): Report zstd support. * doc/man/etags.1: Update doc.
* Simplify lib-src version printingPaul Eggert2019-06-20
| | | | | | | | | | | | | | | | * lib-src/Makefile.in (etags_cflags): Remove. All uses replaced by a simple ‘-o $@’. (ebrowse${EXEEXT}, emacsclient${EXEEXT}, emacsclientw${EXEEXT}): Omit -DVERSION= option. * lib-src/ebrowse.c (VERSION): * lib-src/emacsclient.c (VERSION): * lib-src/etags.c (EMACS_NAME, VERSION): Remove. All uses replaced by PACKAGE_NAME and PACKAGE_VERSION. * lib-src/ebrowse.c (version): * lib-src/etags.c (print_version): Use fputs to output the version info, since that’s fputs_unlocked. * lib-src/etags.c (PROGRAM_NAME): New macro. (print_version): Use it.
* Update author/maintainer infoPaul Eggert2019-05-26
| | | | | Update email addresses and fix spellings of some author and maintainer names.
* Avoid backslash-newline-newline in source codePaul Eggert2019-05-22
| | | | | | | | | | | | | | | * etc/refcards/Makefile (PDF_FRENCH): * lib-src/etags.c (LOOP_ON_INPUT_LINES): * lisp/dabbrev.el (dabbrev-check-other-buffers): * lisp/org/org-id.el (org-id-link-to-org-use-id): * lisp/org/org.el (org-support-shift-select, org-file-apps): * src/alloc.c (CHECK_ALLOCATED_AND_LIVE) (CHECK_ALLOCATED_AND_LIVE_SYMBOL): * src/frame.h (FRAME_PIXEL_WIDTH_TO_TEXT_COLS): * src/regex-emacs.c (PREFETCH_NOLIMIT): * src/window.h (WINDOW_BUFFER): Remove backslash-newline that immediately precedes another newline, as this is not the usual style and is confusing.
* Port new fingerprinting scheme to clang + LTOPaul Eggert2019-05-04
| | | | | | | | | | | | | | | | * lib-src/make-fingerprint.c (main): Don't consider multiple instances of the fingerprint to be an error, as this can happen with clang and -flto. Instead, replace all instances of the fingerprint. There is a tiny chance that this will silently corrupt the Emacs executable. This patch suggests that we should go back to fingerprinting the inputs to the linker instead of its output, as the new fingerprinting scheme is unnecessarily complicated and this complexity reduces reliability. The old scheme (i.e., before commit 2019-05-14T23:31:24Z!eggert@cs.ucla.edu) was simpler and more portable and good enough, and it's looking like it would be less trouble in practice than the new scheme.
* Simplify use of NDEBUG in etags.cPaul Eggert2019-05-03
| | | | | | | | | * lib-src/etags.c [!DEBUG]: Do not define NDEBUG, as that’s conf_post.h’s job now. [NDEBUG]: Do not redefine ‘assert’, as that works around ancient bugs (e.g., sunos4 pcc) that don’t matter any more, as can be seen that other Emacs source files that successfully use assert.h without this workaround.
* * lib-src/profile.c: Delete long-obsolete fileStefan Monnier2019-04-26
| | | | | | | | This auxiliary executable was used by the old `profile.el` which later inspired `elp.el`. It was made obsolete when Emacs acquired native timers. * lib-src/Makefile.in (UTILITIES): Remove profile. (profile${EXEEXT}): Delete rule.
* Port emacsclient euidaccess to Solaris 10Paul Eggert2019-04-25
| | | | | | | Without this fix, linking emacsclient fails with ‘Undefined symbol eaccess’ on Solaris 10 sparc. * lib-src/Makefile.in (LIB_EACCESS): New macro. (emacsclient${EXEEXT}, emacsclientw${EXEEXT}): Use it.