summaryrefslogtreecommitdiff
path: root/lib-src
Commit message (Collapse)AuthorAgeFilesLines
* Fix several printfs for 32 bit systemsPo Lu2022-09-101-1/+1
| | | | | | | * lib-src/emacsclient.c (main): Use right length modifier when printing uintmax_t. * src/alloc.c (check_pure_size): Use right length modifier when printing ptrdiff_t.
* Display error in emacsclient if setsockopt failedStefan Kangas2022-09-091-3/+10
| | | | | * lib-src/emacsclient.c (set_tcp_socket, set_socket_timeout): Display an error message if setsockopt failed.
* ; Make emacsclient.c more quiet againStefan Kangas2022-09-071-2/+0
| | | | | * lib-src/emacsclient.c (main): Remove status message after getting a response from the server. (Bug#57650)
* ; * lib-src/emacsclient.c (main): Fix previous change.Stefan Kangas2022-09-071-2/+2
|
* Fix the MS-Windows buildEli Zaretskii2022-09-061-3/+8
| | | | | | | * lib-src/emacsclient.c (DEFAULT_TIMEOUT): Move out of the !WINDOWSNT condition, to fix the MS-Windows compilation. (set_socket_timeout) [WINDOWSNT]: Protect against too-large values of timeout.
* Add new --timeout flag to emacsclientStefan Kangas2022-09-061-3/+72
| | | | | | | | | | | | | | * lib-src/emacsclient.c (DEFAULT_TIMEOUT): New constant. (timeout): New static variable. (longopts, shortopts, decode_options, print_help_and_exit): Add new flag --timeout. (set_socket_timeout, check_socket_timeout): New helper functions. (main): Display a status message or exit after Emacs has not responded for a while, depending on above new --timeout flag. (Bug#50849) * doc/emacs/misc.texi (emacsclient Options): * doc/man/emacsclient.1: Document the above new option. * etc/NEWS: Announce it.
* * lib-src/etags.c: Remove XEmacs support.Stefan Kangas2022-08-071-8/+0
|
* Revert "Revert part of 59732a83c8 to fix bug#52969"Stefan Monnier2022-08-031-357/+3
| | | | | | | | | | | This reverts commit 460f35e96df1c39ce2ba0f424b36365a2f9e9825. Re-remove the code that scans .el files for docstrings, now that even `lisp/loaddefs.el` is compiled. * lib-src/make-docfile.c (scan_file): Don't call `scan_lisp_file`. (scan_lisp_file, skip_white, read_lisp_symbol, search_lisp_doc_at_eol): Delete functions.
* Merge from origin/emacs-28Stefan Kangas2022-07-161-0/+3
|\ | | | | | | db259d8fd3 Build Seccomp filter only if we have a 64-bit userspace (B...
| * Build Seccomp filter only if we have a 64-bit userspace (Bug#56549)Philipp Stephani2022-07-151-0/+3
| | | | | | | | | | * configure.ac (SIZEOF_LONG): New variable. * lib-src/Makefile.in (SIZEOF_LONG): New variable; added conditional.
| * Revert "Don’t assume openat"Eli Zaretskii2022-04-171-1/+2
| | | | | | | | | | | | | | | | | | | | This reverts commit 3cccf0a9107d585173e527550bbc45253624ca2e. This is a change with far-reaching effects on MS-Windows at the least, where file-related APIs are shadowed to support transparent support for UTF-8 encoded file names. Making such changes on a stable branch for the benefit of a proprietary platform with a 13-year old OS is a tail wagging the dog. Please don't do that without discussing first.
* | Fix quoting of file names in 'ctags'Eli Zaretskii2022-07-011-0/+11
| | | | | | | | | | * lib-src/etags.c (main) [WINDOWSNT || MSDOS]: Quote file names according to the rules of the system shells.
* | Update the 'etags' test suiteEli Zaretskii2022-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | * ETAGS.good_1: * ETAGS_good_2: * ETAGS_good_3: * ETAGS_good_4: * ETAGS_good_5: * ETAGS_good_6: Adapt to recent changes in test sources. * lib-src/etags.c (C_entries): Add commentary for resetting bracelev. (Bug#45246)
* | Pacify GCC 12 -Wanalyzer-use-of-uninitialized-valuePaul Eggert2022-05-311-8/+8
| | | | | | | | | | | | | | | | | | * lib-src/etags.c (readline_internal): Do not copy a pointer to freed storage, as that has undefined behavior even if the pointer is not dereferenced. (relative_filename): Avoid a backward scan by remembering where the last slash was. This is a bit faster, and pacifies a GCC false alarm.
* | Audit quoting symbols in C doc stringsLars Ingebrigtsen2022-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/manual/etags/c-src/emacs/src/keyboard.c (Frecursive_edit): * src/xfns.c (syms_of_xfns): * src/xdisp.c (Fwindow_text_pixel_size): (syms_of_xdisp): * src/w32notify.c (Fw32notify_add_watch): (Fw32notify_add_watch): * src/frame.c (Fframe_child_frame_border_width): * src/comp.c (Fcomp__subr_signature): * src/alloc.c (Fgarbage_collect): * lib-src/make-docfile.c (scan_c_stream): Audit quoting symbols in C doc strings.
* | Pacify GCC 12 in default developer buildPaul Eggert2022-05-121-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets ‘./configure; make’ work on Fedora 36 x86-64 from a Git checkout without generating false-alarm warnings. * lib-src/etags.c (main): There appeared to be false alarm with GCC 12. However, the code was wrong anyway, as it mishandled file names containing "'" so fix that bug. This pacifies GCC. (mercury_decl): Omit tests ‘s + pos != NULL’ that were apparently intended to be ‘s[pos] != '\0'’ but which were miscoded to always be true and which were mostly not needed anyway. In one place, though, a test was needed, so fix that by using strchr instead. * src/alloc.c (lisp_free) [!GC_MALLOC_CHECK]: * src/term.c (Fsuspend_tty): Don’t look at a pointer after freeing it, even just to test it for equality with some other pointer, as this has undefined behavior in C and GCC 12 diagnoses this. * src/dbusbind.c (xd_read_message_1): Rework the code a bit so that it has fewer tests. This pacifies GCC 12 which was complaining incorrectly about dereferencing a null pointer. * src/intervals.c (copy_properties): Remove an eassume that should no longer be needed even to pacify older GCCs, due to ... * src/intervals.h (split_interval_left): ... this addition of ATTRIBUTE_RETURNS_NONNULL to pacify a GCC 12 warning about dereferencing a null pointer. * src/regex-emacs.c (EXTEND_BUFFER): Use negative values rather than auxiliary booleans to indicate null pointers. This pacifies GCC 12 false alarms about using uninitialized variables. * src/xdisp.c (clear_position): New function. (append_space_for_newline, extend_face_to_end_of_line): Use it to work around false alarms from GCC 12. (display_and_set_cursor): Add an UNINIT to pacify GCC 12. * src/xterm.c (x_draw_glyphless_glyph_string_foreground): Defend against hypothetical bad code elsewhere; this also pacifies GCC 12. (x_term_init): Use fixed-size auto array rather than alloca, as the array is small; this also pacifies GCC 12.
* | Merge from origin/emacs-28Paul Eggert2022-04-171-2/+1
|\| | | | | | | 3cccf0a910 Don’t assume openat
| * Don’t assume openatPaul Eggert2022-04-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use openat only on platforms with O_PATH. This ports to OS X 10.9 and earlier. Problem reported by Keith David Bershatsky in: https://lists.gnu.org/r/emacs-devel/2022-04/msg00805.html * lib-src/emacsclient.c (local_sockname): Use open, not openat. * src/sysdep.c (sys_openat): New static function, which uses openat only if O_PATH is defined. (emacs_openat): Use it instead of openat. (emacs_openat_noquit): Remove. (emacs_open_noquit): Reimplement as per the old emacs_openat_noquit, but use plain 'open'.
* | ebrowse dumping need not return intPaul Eggert2022-04-081-25/+13
| | | | | | | | | | | | * lib-src/ebrowse.c (dump_members, dump_tree): Return void, not int, since callers never actually use returned value. All uses changed.
* | Do not include <attribute.h> from <config.h>Paul Eggert2022-03-086-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | This is because mod-test.c shouldn’t use source code from lib, but it does need to include <config.h>. * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c: * lib-src/make-docfile.c, lib-src/movemail.c: * lib-src/seccomp-filter.c, src/dynlib.h, src/lisp.h: * src/syssignal.h, src/sysstdio.h, src/systhread.h, src/tparam.h: Include <attribute.h>. * src/conf_post.h: Do not include <attribute.h>. All uses of attribute.h macros replaced with their _GL_ equivalents.
* | Merge from origin/emacs-28Stefan Kangas2022-03-061-0/+2
|\| | | | | | | | | 0090318c61 * lib-src/seccomp-filter.c (main): Use faccessat2 only if ... 3bb01a499b Fix regression in derived-mode-init-mode-variables
| * * lib-src/seccomp-filter.c (main): Use faccessat2 only if defined.Andreas Schwab2022-03-051-0/+2
| |
* | Merge from origin/emacs-28Stefan Kangas2022-01-231-0/+2
|\| | | | | | | | | 6d3608be88 Seccomp: improve support for newer versions of glibc (Bug#... e58ecd01d5 EUDC: Fix a quoting bug in the BBDB backend
| * Seccomp: improve support for newer versions of glibc (Bug#51073)Philipp Stephani2022-01-221-0/+2
| | | | | | | | | | | | | | * lib-src/seccomp-filter.c (main): Allow 'pread64' and 'faccessat2' system calls. Newer versions of glibc use these system call (starting with commits 95c1056962a3f2297c94ce47f0eaf0c5b6563231 and 3d3ab573a5f3071992cbc4f57d50d1d29d55bde2, respectively).
* | Merge from origin/emacs-28Po Lu2022-01-211-1/+9
|\| | | | | | | | | | | 11ea45c9e4 Fix UB in ebrowse ba57b78064 Fix execute-extended-command-for-buffer in fundamental-mode ef0c1d4c2c Add workaround to handle a problem with Enlightenment WM (...
| * Fix UB in ebrowseEli Zaretskii2022-01-201-1/+9
| | | | | | | | | | | | | | | | * lib-src/ebrowse.c (matching_regexp): Avoid writing beyond the limits of 'matching_regexp_buffer'. Patch by Jan Stranik <jan@stranik.org>. (Bug#53333) Copyright-paperwork-exempt: yes
* | Fix Emacs icon not appearing on HaikuPo Lu2022-01-171-3/+36
| | | | | | | | | | | | | | * lib-src/be_resources.cc (main): Scale input bitmap appropriately before setting it as the mini and large icons. * src/Makefile.in (Emacs): Add dependency on `lib-src/be-resources'.
* | Avoid user environment interfering with bootstrapGlenn Morris2022-01-121-0/+3
| | | | | | | | | | | | | | * Makefile.in, admin/unidata/Makefile.in: * doc/misc/Makefile.in, lib-src/Makefile.in: Don't export user environment variables that can affect running emacs. (Bug#53038)
* | Fix two unused variable warnings in make-docfile.cStefan Kangas2022-01-041-2/+0
| | | | | | | | | | * lib-src/make-docfile.c (scan_lisp_file): Fix unused variable warnings.
* | Revert part of 59732a83c8 to fix bug#52969Stefan Monnier2022-01-031-3/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | While we don't need to put docstrings of .elc files into etc/DOC, we still need to put those of `loaddefs.el` there since we don't have a "dynamic docstring" feature for the non-compiled files and keeping the actual docstrings in the heap would be prohibitive. * src/Makefile.in ($(etc)/DOC): Scan `lisp/loaddefs.el` still. * lib-src/make-docfile.c (scan_lisp_file): New function. (scan_file): Use it. (skip_white, read_lisp_symbol, search_lisp_doc_at_eol): New functions.
* | Merge from origin/emacs-28Stefan Kangas2022-01-021-1/+1
|\| | | | | | | | | | | | | efb1c7ec37 ; * admin/notes/years: More known problems. f475c5823a ; Copyright year fixes 2684def348 ; Run set-copyright from admin.el 2558b37b5e ; * admin/notes/years: Mention known problems with 'update...
| * ; Run set-copyright from admin.elGlenn Morris2022-01-011-1/+1
| |
* | ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Merge from origin/emacs-28Eli Zaretskii2022-01-0116-16/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-0116-16/+16
| |
* | Don't store docstrings of preloaded .el files in etc/DOCStefan Monnier2021-12-301-463/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the location of those files changes between build time and installation time, this requires to tweak the file name used in those (#$ . NNN) references during the dump so they don't hardcode the build directory. We do it in the same way as was already done for those same file names in `load-history`, except we convert them back to absolute file names more lazily (i.e. when fetching the actual docstring rather than at startup), which requires remembering the `lisp-dir` computed at startup in the new `lisp-directory` variable. * src/Makefile.in ($(etc)/DOC): Don't scan Lisp files any more. * src/lread.c (Fload): Use relative file names for `load-file-name` when preloading for the dump, like we already did for `current-load-list`. (read_list): Don't zero-out dynamic docstring references during the preload since they won't be filled later by Snarf-documentation any more. (read1): Remove the hash-hack for doc references that were zeroed. * lisp/startup.el (lisp-directory): New variable. (command-line): Set it. * src/doc.c (get_doc_string): Use `lisp-directory` for dynamic docstring references using relative file names. (syms_of_doc): Add `Qlisp_directory`. * lib-src/make-docfile.c (scan_file): Don't handle `.el` or `.elc` files any more. (IS_SLASH): Remove macro, not used any more. (skip_white, read_lisp_symbol, search_lisp_doc_at_eol) (scan_lisp_file): Remove functions, not used any more. * doc/lispref/loading.texi (Library Search): Mention `lisp-directory`.
* | Prefer $(info) to @echoPaul Eggert2021-12-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have GNU Make output some diagnostics directly, instead of forking and execing a shell to do it. * GNUmakefile (help): * doc/lispref/two-volume.make (vol2.pdf, elisp2med-init) (elisp2-init): * doc/misc/Makefile.in (echo-info, echo-sources): * lib-src/Makefile.in (archlibdir, install, check): * src/verbose.mk.in (AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD) (AM_V_CXXLD, AM_V_ELC, AM_V_ELN, AM_V_GEN, AM_V_GLOBALS) (AM_V_RC): * test/Makefile.in (subdirs, subdir-targets): Prefer $(info) to @echo. * GNUmakefile (MAKECMDGOALS, configure, Makefile): Prefer $(warning) to @echo >&2. * src/verbose.mk.in (AM_V_ELN): Output target, like the others.
* | Merge remote-tracking branch 'origin/master' into feature/pgtkPo Lu2021-12-121-2/+7
|\ \
| * | Really fix the etags TEX parsingLars Ingebrigtsen2021-12-121-3/+3
| | | | | | | | | | | | | | | * lib-src/etags.c (TEX_decode_env): Re-fix off-by-one parsing of TEXTAGS environment variable (bug#52438).
| * | Fix an off-by-one error in TEX parsing in etagsLars Ingebrigtsen2021-12-121-2/+7
| | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (TEX_decode_env): Fix off-by-one parsing of TEXTAGS environment variable (bug#52438). Based on a patch by David Fussner <dfussner@googlemail.com> and amended by Andreas Schwab <schwab@linux-m68k.org>.
* | | Merge remote-tracking branch 'origin/master' into feature/pgtkPo Lu2021-12-101-2/+1
|\| |
| * | Merge from origin/emacs-28Stefan Kangas2021-12-101-2/+1
| |\| | | | | | | | | | | | | | | | | | | 7a25ba0fde ; * lisp/image-dired.el: Fix typo. dda6337066 emacsclient takes more care about XDG_RUNTIME_DIR 26fb4168b8 ; Prefer HTTPS in more URLs 6b89578524 ; * lisp/progmodes/flymake.el: Update the minimum Emacs ve...
| | * emacsclient takes more care about XDG_RUNTIME_DIRPaul Eggert2021-12-091-2/+1
| | | | | | | | | | | | | | | | | | | | | * lib-src/emacsclient.c (set_local_socket): Revert to the Emacs 27 behavior of not trying TMPDIR if XDG_RUNTIME_DIR is set. This is one of the suggestions made by Jim Porter and independently by Ulrich Mueller in Bug#51327.
* | | Merge remote-tracking branch 'origin/master' into feature/pgtkPo Lu2021-12-031-1/+3
|\| |
| * | Merge from origin/emacs-28Stefan Kangas2021-12-031-1/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 9c222b9c1a Port to C compilers that lack size-0 arrays fed35a8951 Port emacsclient to Solaris 10 f35d6a9c73 * CONTRIBUTE: Improve commit message instructions e0ee1d003a Work around IBM XL C compiler bug 6b99b6eb8b * admin/make-tarball.txt: Various clarifications. bbf4140091 * admin/diff-tar-files: Don't assume .tar.gz. 0a50ad11db * lisp/tab-bar.el (tab-bar-close-other-tabs): Fix regression.
| | * Port emacsclient to Solaris 10Paul Eggert2021-12-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Without this patch, the build fails on Solaris 10 with the diagnostic “Undefined symbol acl_trivial first referenced in file ../lib/libgnu.a(file-has-acl.o)”. * lib-src/Makefile.in (LIB_HAS_ACL): New macro. (emacsclient${EXEEXT}): Link with $(LIB_HAS_ACL).
| | * Fix compilation errors with MinGW64 GCC 11Eli Zaretskii2021-10-241-0/+9
| | | | | | | | | | | | | | | | | | | | | * lib-src/ntlib.c (_GL_ATTRIBUTE_MALLOC) (_GL_ATTRIBUTE_DEALLOC_FREE): Define to avoid compilation errors with MinGW64 GCC 11. Suggested by Andy Moreton <andrewjmoreton@gmail.com>. Do not merge to master.
* | | Merge remote-tracking branch 'origin/master' into feature/pgtkPo Lu2021-12-011-3/+4
|\| |
| * | Suppress emacsclient message that daemon should have started if --quietJim Porter2021-12-011-3/+4
| | | | | | | | | | | | | | | * lib-src/emacsclient.c (start_daemon_and_retry_set_socket): Don't output "daemon should have started" message if --quiet (bug#52214).
* | | Merge remote-tracking branch 'origin/master' into feature/pgtkPo Lu2021-11-303-0/+167
|\| |