1. 25 Apr, 2019 3 commits
  2. 24 Apr, 2019 19 commits
    • Mark Oteiza's avatar
      Fix some strings in wordstar mode · 4494789d
      Mark Oteiza authored
      * 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.
    • Mark Oteiza's avatar
      Change WordStar emulation into a minor mode (Bug#35148) · cb17e9c4
      Mark Oteiza authored
      * 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.
    • Dmitry Gutov's avatar
      Fix project-find-regexp search for '--' · f0e026a8
      Dmitry Gutov authored
      * 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>.
    • Juri Linkov's avatar
      * lisp/windmove.el (windmove-display-in-direction): Support consecutive calls · 62072bad
      Juri Linkov authored
      Remember action and delete it from display-buffer-overriding-action afterwards
    • Philipp Stephani's avatar
      Unbreak build when building without GMP support. · 4eb7f9ef
      Philipp Stephani authored
      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.
    • Philipp Stephani's avatar
      Add missing GMP library to test module. · 553220fc
      Philipp Stephani authored
      * test/Makefile.in (GMP_LIB): Define variable.
      ($(test_module)): Use it.
    • Philipp Stephani's avatar
      Move definition of Lisp_Module_Function to emacs-module.c. · d2e1bac4
      Philipp Stephani authored
      * 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
      (emacs_subr, struct Lisp_Module_Function): Move from lisp.h.
      * src/print.c (print_vectorlike):
      * src/doc.c (Fdocumentation): Use the new accessor functions.
    • Paul Eggert's avatar
      Simplify thread initialization and GC · 4c90369d
      Paul Eggert authored
      * src/lisp.h (PVECHEADERSIZE): New macro.
      * 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.
    • Eli Zaretskii's avatar
      Regenerate src/emacs-module.h when emacs-module.h.in changes · c5358e83
      Eli Zaretskii authored
      * Makefile.in (CONFIG_STATUS_FILES_IN): Add
    • Eli Zaretskii's avatar
      Fix rescheduling timers after suspension · 2b3c0ae5
      Eli Zaretskii authored
      * lisp/emacs-lisp/timer.el (timer-event-handler): Fix the
      comparison between next invocation time and current time.
    • Eli Zaretskii's avatar
      Fix posn-at-point with line-number display and display properties · f6e6c174
      Eli Zaretskii authored
      * 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)
    • Eli Zaretskii's avatar
      Fix a typo in a recent commit · a2e9d3e3
      Eli Zaretskii authored
      * src/timefns.c (timespec_to_lisp): Fix a typo in function
    • Philipp Stephani's avatar
    • Philipp Stephani's avatar
      Clarify rounding mode when converting to struct timespec. · c4bacb12
      Philipp Stephani authored
      * 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
      (emacs_module_init): Define it.
      * test/src/emacs-module-tests.el (mod-test-nanoseconds): New unit test.
    • Philipp Stephani's avatar
      Fix return type of make_time. · 534c33cf
      Philipp Stephani authored
      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.
    • Philipp Stephani's avatar
      Add module functions to convert from and to big integers. · e290a7d1
      Philipp Stephani authored
      * src/module-env-27.h: Add new module functions to convert big
      * 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
      (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.
    • Philipp Stephani's avatar
      Add conversions to and from struct timespec to module interface. · bffceab6
      Philipp Stephani authored
      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
      (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.
    • Eli Zaretskii's avatar
      Revert "Remove font.c code commented out for a decade" · 5ae407aa
      Eli Zaretskii authored
      This reverts commit 64d0cd98.
      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.
    • YAMAMOTO Mitsuharu's avatar
      Don't link libXft when using cairo · 5f4e8e2e
      YAMAMOTO Mitsuharu authored
      * 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
      * lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and
      (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
      * 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.
  3. 23 Apr, 2019 17 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/timer-list.el: Fix header-line alignment · 1828e9a9
      Stefan Monnier authored
      Enable lexical-binding.
      (cl-print-compiled, cl-print-compiled-button): Declare.
      (timer-list-mode): Add spacing to align the header.
    • Philipp Stephani's avatar
    • Paul Eggert's avatar
      Remove some unnecessary #ifdef directives · 51595f53
      Paul Eggert authored
      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’.
    • Stefan Monnier's avatar
    • Paul Eggert's avatar
      Remove font.c code commented out for a decade · 64d0cd98
      Paul Eggert authored
      * 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.
    • Philipp Stephani's avatar
      Use three-argument form for out-of-range errors. · 259dfd20
      Philipp Stephani authored
      This provides more debugging hints for callers.
      * src/emacs-module.c (module_copy_string_contents): Use three-argument
      form of args-out-of-range.
    • Philipp Stephani's avatar
      Use high-level integer conversion macro in a few cases. · eaea40b3
      Philipp Stephani authored
      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.
    • Mattias Engdegård's avatar
      Rename auto-revert-notify-watch-descriptor-hash-list · ecab8835
      Mattias Engdegård authored
      * lisp/autorevert.el
      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.
    • Michael Albinus's avatar
      Remote processes cannot use a pipe process for stderr · e8c07cae
      Michael Albinus authored
      * doc/lispref/processes.texi (Asynchronous Processes):
      (Accepting Output): Remote processes cannot use a pipe process for
    • Philipp Stephani's avatar
    • Eli Zaretskii's avatar
      Speed up JSON parsing · db2c9308
      Eli Zaretskii authored
      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)
    • Philipp Stephani's avatar
      Small fix for a JSON unit test. · b59429a4
      Philipp Stephani authored
      * 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.
    • Alan Mackenzie's avatar
      Optimize for typing characters into long C++ raw strings. · 0d5caa9a
      Alan Mackenzie authored
      * 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
      (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
    • YAMAMOTO Mitsuharu's avatar
      Release xft_data in widget destroy callback to avoid visual distraction · 085929ca
      YAMAMOTO Mitsuharu authored
      * 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.
    • Paul Eggert's avatar
      Let plain ‘make’ work even not GNU Make · 6fa8d3c8
      Paul Eggert authored
      * 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).
    • Paul Eggert's avatar
      Revert Vinternal_interpreter_environment tweak · 7cc66173
      Paul Eggert authored
      Stefan Monnier pointed out examples like (funcall `(closure
      ,(let ((cycle (list nil))) (setcdr cycle cycle)) () a)),
      where the user can set Vinternal_interpreter_environment
      * src/eval.c (Fsetq): Revert recent change, going back to Fassq.
    • Paul Eggert's avatar
      Improve UBSan discussion in etc/DEBUG · 27540be5
      Paul Eggert authored
      * etc/DEBUG: Improve -gdwarf-N documentation.
      Go into more detail about UndefinedBehaviorSanitizer.
  4. 22 Apr, 2019 1 commit