1. 29 Mar, 2020 1 commit
  2. 28 Mar, 2020 7 commits
    • Juri Linkov's avatar
      Switch to literal mode with message when regexp is too big in char-fold search · d1b8179f
      Juri Linkov authored
      * lisp/char-fold.el (char-fold-to-regexp): Don't use regexp-quote
      when the length of regexp reaches 5000.  (Bug#40216)
      
      * lisp/isearch.el (isearch-search): On big regexp in char-fold mode
      gracefully fall back to literal mode, try to search again and display
      momentary-message about switching to literal mode.
      (isearch--momentary-message): Add optional arg SECONDS.
      d1b8179f
    • Paul Eggert's avatar
      Stop using newly-deprecated dosname Gnulib module · 4f41188a
      Paul Eggert authored
      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.
      4f41188a
    • Paul Eggert's avatar
      Update from Gnulib · a775dca4
      Paul Eggert authored
      This incorporates:
      2020-03-28 Use module 'filename' instead of module 'dosname'
      2020-03-28 dosname: Redirect to 'filename'
      * lib/at-func.c, lib/canonicalize-lgpl.c, lib/dosname.h:
      Copy from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/filename.h: New file, copied from Gnulib.
      a775dca4
    • Stefan Monnier's avatar
      * lisp/jit-lock.el (jit-lock-mode): Pass `local` to add-hook · dceba13c
      Stefan Monnier authored
      The old code used local=nil knowing that add-hook would affect the
      local part only anyway.  Remove this hideous assumption.
      Remove redundant `:group` args while we're at it.
      dceba13c
    • Stefan Monnier's avatar
      * lisp/progmodes/ebrowse.el (ebrowse-tags-loop-call): Rename · a7e35165
      Stefan Monnier authored
      Used to be called `ebrowse-tags-loop-form` and passed to `eval`.
      Now it's passed to `apply` instead, which is better for karma.
      (ebrowse-tags-loop-continue, ebrowse-tags-search)
      (ebrowse-tags-query-replace, ebrowse-tags-search-member-use):
      Adjust accordingly.
      (ebrowse-electric-position-mode-map): Move init into declaration.
      (ebrowse-electric-position-mode): Derive from special.
      a7e35165
    • Mattias Engdegård's avatar
      Turn compilation-error-case-fold-search into a defvar · dfeb87d8
      Mattias Engdegård authored
      See bug#40119, and the discussion at
      https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00653.html
      
      * lisp/progmodes/compile.el (compilation-error-case-fold-search):
      Turn into a defvar.
      * etc/NEWS: Update.
      dfeb87d8
    • Michael Albinus's avatar
      Tramp cache fixes · e6c6486e
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Flush the
      cache after the file has been written.
      e6c6486e
  3. 27 Mar, 2020 9 commits
    • Paul Eggert's avatar
      Use ATTRIBUTE_CONST for some bignum functions · 90b6ba0a
      Paul Eggert authored
      * src/bignum.h (mpz_get_d_rounded):
      * src/lisp.h (bignum_to_double, bignum_to_intmax)
      (bignum_to_uintmax, bignum_bufsize):
      Declare as ATTRIBUTE_CONST.
      90b6ba0a
    • Stefan Monnier's avatar
    • Stefan Monnier's avatar
      * lisp/gnus/gnus-registry.el: Use lexical-binding · 3fdb53b1
      Stefan Monnier authored
      (gnus-registry-install-shortcuts): Use a closure (with dynamic :documentation)
      (gnus-registry-user-format-function-M): Use define-obsolete-function-alias.
      (gnus-registry-article-marks-to-names): η-reduce.
      3fdb53b1
    • Stefan Monnier's avatar
      * lisp/textmodes/tex-mode.el: Replace double-definition hack with an advice · 6075a7c5
      Stefan Monnier authored
      (tex-verbatim-environments): Add "Verbatim".
      (tex--guess-mode): Rename from tex-guess-mode and return the mode
      rather than calling it.
      (tex-mode): Replace second definition with an advice.
      6075a7c5
    • Stefan Monnier's avatar
      * lisp/progmodes/ebrowse.el: Prefer hash-tables to obarrays · 4710f280
      Stefan Monnier authored
      Remove redundant :group args.
      Use `defvar-local` and `setq-local` where possible.
      
      (ebrowse-some): Use seq-some instead.
      (ebrowse-every): Use seq-every-p instead.
      (ebrowse-position): Use seq-position.
      (ebrowse--tree-table): Rename from `ebrowse--tree-obarray`.
      Change all users to use a hash-table rather than an obarray.
      (ebrowse-for-all-trees): Adjust to the table being a hash-table.
      (ebrowse-tree-table-as-alist): Rename from `ebrowse-tree-obarray-as-alist`.
      (ebrowse-build-tree-obarray): Rename from `ebrowse-build-tree-obarray`.
      (ebrowse-tree-mode): Remove redundant setting of `ebrowse--tree-obarray`.
      (ebrowse-set-tree-indentation, ebrowse-view-file-other-frame)
      (ebrowse-last-completion-table): Rename from
      ebrowse-last-completion-obarray.
      (ebrowse-position): Make it a proper struct.
      4710f280
    • Eli Zaretskii's avatar
      Port the 'module/async-pipe' test to MS-Windows · f98ee21c
      Eli Zaretskii authored
      These changes let the code compile and produce a valid DLL, but the
      test hangs.  It looks like the hang is in Fdelete_process, when it
      closes one of the descriptors of the pipe process.
      In addition, this use of the pipe process cannot currently work
      on MS-Windows, since make-pipe-process doesn't set up the reader
      thread to read from the Emacs's side of the pipe, so the select
      emulation doesn't know there's stuff to read from that pipe.
      * test/data/emacs-module/mod-test.c [WINDOWSNT]: Include
      windows.h.
      (ALIGN_STACK) [!__x86_64__]: Define for 32-bit builds.
      (sleep_for_half_second): New function.
      (write_to_pipe): Declare return type differently for WINDOWSNT.
      Call sleep_for_half_second.
      (Fmod_test_async_pipe) [WINDOWSNT]: Use _beginthread as substitute
      for pthread_create.
      (invalid_finalizer): Replace non_ASCII character in a comment.
      
      * test/src/emacs-module-tests.el (module/async-pipe): Skip on
      MS-Windows, as the test fails and then hangs.
      f98ee21c
    • Michael Albinus's avatar
      ; * etc/NEWS: Fix typos. · e4f8098b
      Michael Albinus authored
      e4f8098b
    • Yuan Fu's avatar
      Add manual and NEWS entries for previous gdb-mi changes · ac242ed3
      Yuan Fu authored
      * etc/NEWS: Add entries for saving and restoring GDB window
      configurations.
      * doc/emacs/building.texi (GDB User Interface Layout): Add
      documentation for 'gdb-save-window-configuration',
      'gdb-load-window-configuration',
      'gdb-default-window-configuration-file',
      'gdb-window-configuration-directory',
      'gdb-restore-window-configuration-after-quit'.  Change 'many-windows
      layout' to 'default layout'.
      ac242ed3
    • Paul Eggert's avatar
      Treat out-of-range positions consistently · de00a933
      Paul Eggert authored
      If a position argument to get-byte etc. is an out-of-range integer,
      treat it the same regardless of whether it is a fixnum or a bignum.
      * src/buffer.c (fix_position): New function.
      * src/buffer.c (validate_region):
      * src/character.c (Fget_byte):
      * src/coding.c (Ffind_coding_systems_region_internal)
      (Fcheck_coding_systems_region):
      * src/composite.c (Ffind_composition_internal):
      * src/editfns.c (Fposition_bytes, Fchar_after, Fchar_before)
      (Finsert_buffer_substring, Fcompare_buffer_substrings)
      (Fnarrow_to_region):
      * src/fns.c (Fsecure_hash_algorithms):
      * src/font.c (Finternal_char_font, Ffont_at):
      * src/fringe.c (Ffringe_bitmaps_at_pos):
      * src/search.c (search_command):
      * src/textprop.c (get_char_property_and_overlay):
      * src/window.c (Fpos_visible_in_window_p):
      * src/xdisp.c (Fwindow_text_pixel_size):
      Use it instead of CHECK_FIXNUM_COERCE_MARKER, so that
      the code is simpler and treats bignums consistently with fixnums.
      * src/buffer.h (CHECK_FIXNUM_COERCE_MARKER): Define here
      rather than in lisp.h, and reimplement in terms of fix_position
      so that it treats bignums consistently with fixnums.
      * src/lisp.h (CHECK_FIXNUM_COERCE_MARKER): Move to buffer.h.
      * src/textprop.c (validate_interval_range): Signal with original
      bounds rather than modified ones.
      de00a933
  4. 26 Mar, 2020 7 commits
    • Juri Linkov's avatar
      Disable enable-local-variables for hunk-only in diff-syntax-fontify-props · 10bedb75
      Juri Linkov authored
      * lisp/vc/diff-mode.el (diff-syntax-fontify-props): Let-bind
      enable-local-variables to nil when hunk-only is non-nil (bug#39190)
      10bedb75
    • Paul Eggert's avatar
      Refactor and fix typo in CHECK_*_COERCE_MARKER · 57f5a63d
      Paul Eggert authored
      * src/data.c (check_integer_coerce_marker)
      (check_number_coerce_marker): New functions.
      Also, fix a typo in the former, by having it use
      Qinteger_or_marker_p not Qnumber_or_marker_p.
      (arithcompare, floatop_arith_driver, bignum_arith_driver)
      (arith_driver, Fplus, Fminus, Ftimes, Fquo, Frem, Fmod)
      (minmax_driver, Flogand, Flogior, Flogxor, Fadd1, Fsub1):
      Use them in place of the similarly-named macros.
      * src/lisp.h (CHECK_NUMBER_COERCE_MARKER)
      (CHECK_INTEGER_COERCE_MARKER): Remove; no longer used.
      57f5a63d
    • Philipp Stephani's avatar
      Add a module function to open a file descriptor connected to a pipe. · d28b0047
      Philipp Stephani authored
      A common complaint about the module API is that modules can't
      communicate asynchronously with Emacs.  While it isn't possible to
      call arbitrary Emacs functions asynchronously, writing to a pipe
      should always be fine and is a pretty low-hanging fruit.
      
      This patch implements a function that adapts an existing pipe
      process.  That way, users can use familiar tools like process filters
      or 'accept-process-output'.
      
      * src/module-env-28.h: Add 'open_channel' module function.
      
      * src/emacs-module.c (module_open_channel): Provide definition for
      'open_channel'.
      (initialize_environment): Use it.
      
      * src/process.c (open_channel_for_module): New helper function.
      (syms_of_process): Define necessary symbol.
      
      * test/src/emacs-module-tests.el (module/async-pipe): New unit test.
      
      * test/data/emacs-module/mod-test.c (signal_system_error): New helper
      function.
      (signal_errno): Use it.
      (write_to_pipe): New function running in the background.
      (Fmod_test_async_pipe): New test module function.
      (emacs_module_init): Export it.
      
      * doc/lispref/internals.texi (Module Misc): Document new module
      function.
      
      * doc/lispref/processes.texi (Asynchronous Processes): New anchor
      for pipe processes.
      
      * etc/NEWS: Document 'open_channel' function.
      d28b0047
    • Paul Eggert's avatar
      Remove COERCE_MARKER · 934b3c9e
      Paul Eggert authored
      * src/xdisp.c (COERCE_MARKER): Remove.  All uses replaced by
      Fmarker_position; this is simpler as the macro was invoked only on
      markers.
      934b3c9e
    • Paul Eggert's avatar
      line-beginning-position args can be bignums · fe6b8c91
      Paul Eggert authored
      * src/editfns.c (Fline_beginning_position, Fline_end_position):
      Do not restrict integer arguments to fixnums.
      fe6b8c91
    • Paul Eggert's avatar
      Fix integer overflow in internal_self_insert · 98546d9c
      Paul Eggert authored
      * src/cmds.c (internal_self_insert): Avoid undefined behavior
      on integer overflow by using saturated add.
      98546d9c
    • Paul Eggert's avatar
      Fix integer overflow in forward-point · e4b6151f
      Paul Eggert authored
      * lisp/subr.el (forward-point): Rewrite in Lisp and move here ...
      * src/cmds.c (Fforward_point): ... from here.  This fixes an
      integer overflow bug with (forward-point most-positive-fixnum).
      e4b6151f
  5. 25 Mar, 2020 6 commits
  6. 24 Mar, 2020 7 commits
  7. 23 Mar, 2020 3 commits