1. 25 Apr, 2019 9 commits
    • Stefan Monnier's avatar
      Use lexical-binding by default for M-:, --eval, and *scratch* · e08e0880
      Stefan Monnier authored
      * lisp/startup.el (command-line): Default to lexical-binding in *scratch*.
      (normal-no-mouse-startup-screen, command-line-1):
      Use startup--get-buffer-create-scratch.
      * lisp/simple.el (eval-expression):
      * lisp/server.el (server-eval-and-print): Use lexical-binding to
      evaluate the expression.
      (server-execute): Use startup--get-buffer-create-scratch.
      * lisp/ielm.el (inferior-emacs-lisp-mode): Default to lexical-binding.
    • Alan Mackenzie's avatar
      Restore fontification of delimiters of multiline CC Mode strings. · 0c2d921a
      Alan Mackenzie authored
      E.g., on typing the closing delimiter of a string continued onto a second
      line, the opening delimiter retained its font-lock-warning-face.
      * lisp/progmodes/cc-defs.el (c-c++-raw-string-opener-re)
      (c-c++-raw-string-opener-1-re): New constants.
      (c-sub-at-c++-raw-string-opener, c-at-c++-raw-string-opener): New macros.
      * lisp/progmodes/cc-engine.el (c-raw-string-pos)
      (c-depropertize-raw-strings-in-region, c-after-change-unmark-raw-strings):
      Replace uses of open-coded raw string regexps by the new constants and macros
      in cc-defs.el.
      * lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Ditto
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Set
      c-new-BEG to the beginning of the string when we encounter its closing ".
      When not in a raw string, but in a string, clear syntax-table properties from
      its delimiters and set c-new-BEG/END to its limits.
      (c-after-change-mark-abnormal-strings): When applying syntax-table properties
      to string delimiters, also set c-new-BEG/END to ensure subsequent
    • Stephen Berman's avatar
      Make wdired-mode ignore ls file indicators · 6d8e0fc5
      Stephen Berman authored
      * lisp/wdired.el (wdired--restore-dired-filename-prop): When
      dired-listing-switches includes "F" or "classify", don't treat
      appended indicator characters as part of the file name (bug#34915).
      * test/lisp/wdired-tests.el (wdired-test-bug34915): New test.
    • Paul Eggert's avatar
      Port emacsclient euidaccess to Solaris 10 · 30030945
      Paul Eggert authored
      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.
    • Alan Mackenzie's avatar
      Fix some corner cases in the recognition of C++ raw strings. · efb8921a
      Alan Mackenzie authored
      These are where changing the identifier in a raw string delimiter causes
      different delimiters to match eachother.
      * lisp/progmodes/cc-engine.el (c-raw-string-end-delim-disrupted): New
      (c-before-change-check-raw-strings): Use new variable.
      (c-after-change-unmark-raw-strings): When typing into an opening delimiter or
      altering its close delimiter causes the opening delimiter to match a later
      closing delimiter, clear all syntax-table char properties from the opening
      delimiter onwards, and set c-new-END to point max.  Also, when changing a
      closing delimiter, check whether its new value matches a previously open
      opening delimiter earlier in the buffer, and amend the syntax-table text
      properties appropriately.
    • Michael R. Mauger's avatar
      * lisp/progmodes/sql.el · a1386fa6
      Michael R. Mauger authored
      (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-period): Refactored tests and use macro.
      (sql-tests-buffer-naming-harness): New macro.
      (sql-tests-buffer-naming-existing): New tests.
    • Paul Eggert's avatar
      Improve port to platforms lacking euidaccess (Bug#35406) · 2bf95739
      Paul Eggert authored
      * 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.
    • Paul Eggert's avatar
      Port to platforms lacking euidaccess (Bug#35406) · 445713f5
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add euidaccess.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
    • Paul Eggert's avatar
      Merge from gnulib · 41cc2b64
      Paul Eggert authored
  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 12 commits