aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | * lisp/progmodes/sql.elMichael R. Mauger2019-04-242-47/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (sql-is-sqli-buffer-p): New function. (sql-generate-unique-sqli-buffer-name): Refactor and use it. (sql-product-interactive): Simplify name logic. * test/lisp/progmodes/sql-tests.el (sql-tests-placeholder-filter-harness): New macro. (sql-tests-placeholder-filter-simple) (sql-tests-placeholder-filter-ampersand) (sql-tests-placeholder-filter-period): Refactored tests and use macro. (sql-tests-buffer-naming-harness): New macro. (sql-tests-buffer-naming-default) (sql-tests-buffer-naming-multiple) (sql-tests-buffer-naming-explicit) (sql-tests-buffer-naming-universal-argument) (sql-tests-buffer-naming-existing): New tests.
* | | | Improve port to platforms lacking euidaccess (Bug#35406)Paul Eggert2019-04-244-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/emacsclient.c (set_local_socket): Use faccessat with AT_EACCESS instead of using euidaccess. * admin/merge-gnulib, lib/gnulib.mk.in, m4/gnulib-comp.m4: Revert previous change.
* | | | Port to platforms lacking euidaccess (Bug#35406)Paul Eggert2019-04-243-34/+11
| | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add euidaccess. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* | | | Merge from gnulibPaul Eggert2019-04-243-3/+5
| | | |
* | | | Fix some strings in wordstar modeMark Oteiza2019-04-241-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/obsolete/ws-mode.el (ws-search-direction, ws-error, ws-end-block): (ws-mark-word, ws-undo, ws-goto-last-cursorposition, ws-last-error): (ws-kill-bol): Remove full stops from message string endings. Minor formatting tweaks.
* | | | Change WordStar emulation into a minor mode (Bug#35148)Mark Oteiza2019-04-241-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/obsolete/ws-mode.el: Turn on lexical-binding. Update commentary. (wordstar): New custom group. (wordstar-mode-lighter): New custom variable. (wordstar-mode): Declare with define-minor-mode. (turn-on-wordstar-mode): New function. (global-wordstar-mode): New function. Use previous new function.
* | | | Fix project-find-regexp search for '--'Dmitry Gutov2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/project.el (project--find-regexp-in-files): Add an explicit '-e' before the pattern. Fixing the ability to search for '--'. Reported by Juri Linkov <juri@linkov.net>.
* | | | * lisp/windmove.el (windmove-display-in-direction): Support consecutive callsJuri Linkov2019-04-251-15/+16
| | | | | | | | | | | | | | | | Remember action and delete it from display-buffer-overriding-action afterwards
* | | | Unbreak build when building without GMP support.Philipp Stephani2019-04-244-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for a new preprocessor macro EMACS_MODULE_HAVE_MPZ_T to emacs-module.h. If this macro is defined, assume that mpz_t is already defined and don’t include gmp.h. Don’t document the new macro for now, as it’s unclear whether we want to support this in modules outside the Emacs tree. * src/emacs-module.h.in: Allow user to prevent inclusion of gmp.h. * src/emacs-module.c: Use mini-gmp if GMP is unavailable. Don’t include gmp.h. * src/lisp.h: Don’t require gmp.h. It’s not needed for lisp.h. * test/Makefile.in (GMP_LIB, GMP_OBJ): New variables. ($(test_module)): Use them. * test/data/emacs-module/mod-test.c: Use mini-gmp if GMP is unavailable.
* | | | Add missing GMP library to test module.Philipp Stephani2019-04-241-1/+2
| | | | | | | | | | | | | | | | | | | | * test/Makefile.in (GMP_LIB): Define variable. ($(test_module)): Use it.
* | | | Move definition of Lisp_Module_Function to emacs-module.c.Philipp Stephani2019-04-244-29/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h: Remove include of emacs-module.h. Remove definition of Lisp_Module_Function structure. * src/emacs-module.c (module_function_documentation) (module_function_address): New accessor functions for module function fields. (emacs_subr, struct Lisp_Module_Function): Move from lisp.h. * src/print.c (print_vectorlike): * src/doc.c (Fdocumentation): Use the new accessor functions.
* | | | Simplify thread initialization and GCPaul Eggert2019-04-245-74/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (PVECHEADERSIZE): New macro. (XSETPVECTYPESIZE): Use it. * src/search.c (syms_of_search): No need to initialize or staticpro last_thing_searched or saved_last_thing_searched, as the thread code arranges for initialization and GC. * src/thread.c (main_thread): Initialize statically. (Fmake_mutex, Fmake_condition_variable, Fmake_thread): Use ALLOCATE_ZEROED_PSEUDOVECTOR rather than zeroing by hand. (mark_one_thread): No need to mark Lisp_Object members. (init_main_thread, init_threads_once): Remove. All uses removed.
* | | | Regenerate src/emacs-module.h when emacs-module.h.in changesEli Zaretskii2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | * Makefile.in (CONFIG_STATUS_FILES_IN): Add src/emacs-module.h.in.
* | | | Fix rescheduling timers after suspensionEli Zaretskii2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/timer.el (timer-event-handler): Fix the comparison between next invocation time and current time.
* | | | Fix posn-at-point with line-number display and display propertiesEli Zaretskii2019-04-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (pos_visible_p): Account for line-number display width when CHARPOS is covered by display property that begins at the 2nd display element of a screen line. (Bug#35404)
* | | | Fix a typo in a recent commitEli Zaretskii2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | * src/timefns.c (timespec_to_lisp): Fix a typo in function definition.
* | | | * doc/lispref/internals.texi (Module Values): Add a GMP examplePhilipp Stephani2019-04-241-0/+25
| | | |
* | | | Clarify rounding mode when converting to struct timespec.Philipp Stephani2019-04-243-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/internals.texi (Module Values): Clarify that the truncation is towards negative infinity. * test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds): Add test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-nanoseconds): New unit test.
* | | | Fix return type of make_time.Philipp Stephani2019-04-244-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make_time is documented to return a (TICKS . HZ) pair, so we can’t use make_lisp_time. Introduce a new conversion function instead. * src/emacs-module.c (module_make_time): Use timespec_to_lisp to correct return type. * src/timefns.c (timespec_to_lisp): New function. (make_lisp_time): Use it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid): Check return type.
* | | | Add module functions to convert from and to big integers.Philipp Stephani2019-04-248-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/module-env-27.h: Add new module functions to convert big integers. * src/emacs-module.h.in (emacs_mpz): Define if GMP is available. * src/emacs-module.c (module_extract_big_integer) (module_make_big_integer): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_double): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-double): New unit test. * doc/lispref/internals.texi (Module Values): Document new functions.
* | | | Add conversions to and from struct timespec to module interface.Philipp Stephani2019-04-247-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time values are a fundamental data type, and such conversions are hard to implement within modules because of the various forms of time values in Emacs Lisp. Adding dedicated conversion functions can significantly simplify module code dealing with times. This approach uses nanosecond precision. While Emacs in theory has support for higher-precision time values, in practice most languages and standards, such as POSIX, C, Java, and Go, have settled on nanosecond-precision integers to represent time. * src/emacs-module.h.in: Add header for struct timespec. * src/module-env-27.h: Add module functions for time conversion. * src/emacs-module.c (module_extract_time, module_make_time): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid) (mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New unit tests. * doc/lispref/internals.texi (Module Values): Document time conversion functions.
* | | | Revert "Remove font.c code commented out for a decade"Eli Zaretskii2019-04-241-0/+465
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 64d0cd9810af6bd0c378fc6bc666c76ddfa97e40. Rationale: any font-related code and comments, even if unused for decades, serves as important source of useful information in an area of Emacs code that is notoriously under-documented. Please do NOT remove this stuff until we have an active expert in this are on board, who will then decide whether this can be retired.
* | | | Don't link libXft when using cairoYAMAMOTO Mitsuharu2019-04-2412-81/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Check cairo early. Don't try Xft if cairo is used. * lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h. (XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs. (XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy) (XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros. (crxft_font_open_name, crxft_font_close, crxft_draw_create) (crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New externs. * lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and cairo-xlib.h. (crxft_font_open_name, crxft_font_close, crxft_draw_create) (crxft_set_source_color, crxft_draw_rect, crxft_draw_string) (crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions. * lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h. * lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call cairo_surface_mark_dirty and cairo_surface_flush. * lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h. (draw_text) [USE_CAIRO]: Call cairo_surface_flush. * src/xsettings.c [USE_CAIRO]: Include fontconfig.h (apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or XftDefaultSet. * lwlib/lwlib-Xaw.c: * lwlib/lwlib-int.h: * lwlib/xlwmenu.c: * lwlib/xlwmenuP.h: * src/xrdb.c: * src/xsettings.c: * src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO || defined HAVE_XFT. * src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if defined USE_CAIRO || defined HAVE_XFT.
* | | | * lisp/emacs-lisp/timer-list.el: Fix header-line alignmentStefan Monnier2019-04-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Enable lexical-binding. (cl-print-compiled, cl-print-compiled-button): Declare. (timer-list-mode): Add spacing to align the header.
* | | | * src/emacs-module.c: Add an additional requirement for API changes.Philipp Stephani2019-04-231-0/+3
| | | |
* | | | Remove some unnecessary #ifdef directivesPaul Eggert2019-04-233-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These directives are in files that are compiled only if the symbols are defined. * src/gfilenotify.c: Remove unnecessary ‘#ifdef HAVE_GFILENOTIFY’. * src/inotify.c: Remove unnecessary ‘#ifdef HAVE_INOTIFY’. * src/kqueue.c: Remove unnecessary ‘#ifdef HAVE_KQUEUE’.
* | | | * etc/package-keyring.gpg: Add the 2019 keyStefan Monnier2019-04-231-0/+0
| | | |
* | | | Remove font.c code commented out for a decadePaul Eggert2019-04-231-465/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/font.c (LSTRING_HEADER_SIZE, LSTRING_GLYPH_SIZE, check_gstring) (check_otf_features, otf_list, otf_tag_symbol, otf_open) (font_otf_capability, generate_otf_features) (font_otf_DeviceTable, font_otf_ValueRecord) (font_otf_Anchor, Ffont_drive_otf, Ffont_otf_alternates) (Fdraw_string, syms_of_font): Remove "experimental and not tested much" code that has been "#if 0"-ed out for more than a decade and which was getting in the way of maintenance.
* | | | Use three-argument form for out-of-range errors.Philipp Stephani2019-04-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides more debugging hints for callers. * src/emacs-module.c (module_copy_string_contents): Use three-argument form of args-out-of-range.
* | | | Use high-level integer conversion macro in a few cases.Philipp Stephani2019-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INT_TO_INTEGER is more obviously correct and means we don’t have to worry about data type sizes and signedness. * src/json.c (json_parse_error): Use INT_TO_INTEGER. The tiny performance gain of make_fixed_natnum isn’t worth the trouble then signaling an error.
* | | | Rename auto-revert-notify-watch-descriptor-hash-listMattias Engdegård2019-04-231-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/autorevert.el (auto-revert-notify-watch-descriptor-hash-list): Rename to auto-revert--buffers-by-watch-descriptor. Improved doc string. (auto-revert-notify-rm-watch, auto-revert-notify-add-watch, auto-revert-notify-handler): Use new name.
* | | | Remote processes cannot use a pipe process for stderrMichael Albinus2019-04-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Asynchronous Processes): (Accepting Output): Remote processes cannot use a pipe process for stderr.
* | | | * src/json.c (json_make_string): Add missing cast.Philipp Stephani2019-04-231-1/+1
| | | |
* | | | Speed up JSON parsingEli Zaretskii2019-04-231-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Dmitry Gutov <dgutov@yandex.ru> for running many benchmarks and for useful discussions. * src/json.c (json_make_string): Speed up parsing of JSON strings by optimizing the normal case of a valid UTF-8 string being returned from libjansson. (Bug#31138)
* | | | Small fix for a JSON unit test.Philipp Stephani2019-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/json-tests.el (json-parse-string/null): Make JSON object syntactically valid. This test is supposed to check whether an escaped null character causes an error, but without quoting the string it would be syntactically invalid in any case.
* | | | Optimize for typing characters into long C++ raw strings.Alan Mackenzie2019-04-232-478/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare) (c-font-lock-objc-methods) (c-font-lock-declarations, c-font-lock-enum-tail) (c-font-lock-cut-off-declarators, c-font-lock-enclosing-decls): If the chunk been fontified consists entirely of comments and strings, don't attempt to perform the function's action. * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Don't expand (c-new-BEG c-new-END) unnecessarily to the entire raw string being fontified. (c-fl-decl-start, c-fl-decl-end): When in a (raw or otherwise) string, don't return a position outside of the string (which used to cause unneeded fontification).
* | | | Release xft_data in widget destroy callback to avoid visual distractionYAMAMOTO Mitsuharu2019-04-232-29/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lwlib/lwlib-int.h (struct _widget_instance) [HAVE_XFT]: Remove nr_xft_data. * lwlib/lwlib-Xaw.c (find_xft_data, xaw_update_one_widget) [HAVE_XFT]: Loop while widget member is not NULL instead of using nr_xft_data. (xaw_destroy_instance) [HAVE_XFT]: Move xft_data release code from here ... (destroy_xft_data) [HAVE_XFT]: ... to here. (make_dialog) [HAVE_XFT]: Add destroy_xft_data as destroy callback for dialog.
* | | | Let plain ‘make’ work even not GNU MakePaul Eggert2019-04-222-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (top_distclean): Clean makefile as well as Makefile. * configure.ac: If not using plain ‘make’, create a makefile so that plain ‘make’ simply calls $(MAKE).
* | | | Revert Vinternal_interpreter_environment tweakPaul Eggert2019-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stefan Monnier pointed out examples like (funcall `(closure ,(let ((cycle (list nil))) (setcdr cycle cycle)) () a)), where the user can set Vinternal_interpreter_environment indirectly. * src/eval.c (Fsetq): Revert recent change, going back to Fassq.
* | | | Improve UBSan discussion in etc/DEBUGPaul Eggert2019-04-221-13/+27
| | | | | | | | | | | | | | | | | | | | * etc/DEBUG: Improve -gdwarf-N documentation. Go into more detail about UndefinedBehaviorSanitizer.
* | | | Tweak Vinternal_interpreter_environment lookupPaul Eggert2019-04-221-8/+10
| | | | | | | | | | | | | | | | | | | | * src/eval.c (Fsetq, eval_sub): Use assq_no_quit instead of Fassq for a list that cannot contain cycles or be that long.
* | | | Improve wur coverage on older GCCsPaul Eggert2019-04-222-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/conf_post.h (__has_attribute_warn_unused_result): New macro for compilers lacking __has_attribute. * src/systhread.h (__has_attribute): Remove ineffective define. (ATTRIBUTE_WARN_UNUSED_RESULT): Work better on GCC 3.4 thru 4.
* | | | Go back to old way of checking json int rangePaul Eggert2019-04-222-28/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the lisp.h macros really need improvement, INTEGER_TO_INT is not the right way to go about it, as it causes conversion from intmax_t to uintmax_t and back again, which can cause a signal if the value is negative. * src/lisp.h (INTEGER_TO_INT, ranged_integer_to_int) (ranged_integer_to_uint): Remove, reverting recent changes to this file. * src/json.c (lisp_to_json): Revert to previous code, as the change messes up with uintmax_t<->intmax_t conversion.
* | | | * src/lisp.h (INTEGER_TO_INT): Fix bug.Philipp Stephani2019-04-221-1/+1
| | | |
* | | | Precise handling of filenotify `stopped' eventsMattias Engdegård2019-04-221-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/autorevert.el (auto-revert-notify-handler): When getting a `stopped' event, deal with it for the buffers it applies to, rather than for all buffers in auto-revert mode.
* | | | * autorevert.el (auto-revert-notify-rm-watch): Simplify.Mattias Engdegård2019-04-221-12/+10
| | | |
* | | | Revert "Don't remove notify descriptor that is already gone"Mattias Engdegård2019-04-221-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e9e807e9317ca7aa99a5dd220ee8586f8f4331bf, which is no longer necessary as `file-notify-rm-watch' has been made robust against reentry.
* | | | Make file-notify-rm-watch robust against reentryMattias Engdegård2019-04-221-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow file-notify callbacks to call `file-notify-rm-watch', harmlessly, after receiving a `stopped' event without triggering recursion. * lisp/filenotify.el (file-notify--watch): Note that `callback' can be nil. (file-notify--rm-descriptor): Set the `callback' field to nil before sending `stopped'. (file-notify-rm-watch): Don't do anything if the `callback' field is nil.
* | | | Introduce a helper macro to convert a Lisp integer to a C integer.Philipp Stephani2019-04-222-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to CONS_TO_INTEGER. The inverse (INT_TO_INTEGER) already exists. * src/lisp.h (INTEGER_TO_INT): New macro. (ranged_integer_to_int, ranged_integer_to_uint): New functions. * src/json.c (lisp_to_json): Use helper macro.
* | | | Improve documentation around standard error pipes (Bug#35328).Philipp Stephani2019-04-221-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Asynchronous Processes): Document existence and properties of the standard error process. (Accepting Output): Document that one has to accept output from the standard error process separately.