1. 21 Mar, 2019 2 commits
  2. 11 Mar, 2019 2 commits
    • Paul Eggert's avatar
      Improve binary-as-unsigned treatment (Bug#34792) · 9b4d34fa
      Paul Eggert authored
      * etc/NEWS:
      * src/editfns.c (Fformat, binary_as_unsigned):
      Update now that we always have bignums.
      (syms_of_editfns) [!defined lisp_h_FIXNUMP]: Remove now-obsolete
      code, since lisp_h_FIXNUMP is always defined now.
      * test/src/editfns-tests.el (read-large-integer): Simplify,
      now that we can assume binary-as-unsigned defaults to nil.
      9b4d34fa
    • Paul Eggert's avatar
      More regexp corrections and tweaks · e81c44fd
      Paul Eggert authored
      Problems reported by Mattias Engdegård in:
      https://lists.gnu.org/r/emacs-devel/2019-03/msg00247.html
      * lisp/align.el (align-rules-list):
      * lisp/comint.el (comint-output-filter):
      * lisp/language/china-util.el (encode-hz-region):
      * lisp/progmodes/cperl-mode.el (cperl-indent-exp):
      * lisp/progmodes/idlwave.el (idlwave-is-pointer-dereference):
      * lisp/progmodes/scheme.el (dsssl-font-lock-keywords):
      * lisp/textmodes/texinfmt.el (texinfo-accent-commands):
      * test/src/regex-emacs-tests.el (regex-tests-re-even-escapes):
      Fix some regular-expression typos.
      e81c44fd
  3. 24 Feb, 2019 1 commit
    • Philipp Stephani's avatar
      Ignore pending_signals when checking for quits. · 72ec233f
      Philipp Stephani authored
      pending_signals is often set if no quit is pending.  This results in
      bugs in module code if the module returns but no quit is actually
      pending.
      
      As a better alternative, add a new process_input environment function
      for Emacs 27.  That function processes signals (like maybe_quit).
      
      * configure.ac: Add module snippet for Emacs 27.
      
      * src/module-env-27.h: New file.
      
      * src/emacs-module.h.in: Add process_input function to environment
      interface.
      
      * src/emacs-module.c (module_should_quit): Use QUITP macro to check
      whether the caller should quit.
      (module_process_input): New function.
      (initialize_environment): Use it.
      
      * src/eval.c: Remove obsolete comment.
      
      * test/data/emacs-module/mod-test.c (signal_wrong_type_argument)
      (signal_errno): New helper functions.
      (Fmod_test_sleep_until): New test module function.
      
      * test/src/emacs-module-tests.el (mod-test-sleep-until): New unit
      test.
      
      * doc/lispref/internals.texi (Module Misc): Document process_input.
      72ec233f
  4. 12 Feb, 2019 1 commit
  5. 10 Feb, 2019 1 commit
  6. 27 Jan, 2019 1 commit
    • Paul Eggert's avatar
      forward-line now works with bignums · cc1c46e4
      Paul Eggert authored
      * src/cmds.c (Fforward_line): Support bignum arg.
      (scan_newline): Return void since no caller was using the
      return value.
      * src/search.c (find_newline, scan_newline_from_point)
      (find_newline1): Return the number of newlines counted, not
      the count shortage, so that the return value always fits in
      ptrdiff_t even if the original count was a bignum.  All
      callers changed.
      * test/src/cmds-tests.el (forward-line-with-bignum): New test.
      cc1c46e4
  7. 19 Jan, 2019 1 commit
  8. 15 Jan, 2019 1 commit
    • Paul Eggert's avatar
      Fix accept-process-output/process-live-p confusion · 9fc02ff5
      Paul Eggert authored
      * doc/lispref/processes.texi (Accepting Output):
      Document the issue.
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      * lisp/net/tramp-smb.el (tramp-smb-wait-for-output):
      * lisp/net/tramp.el (tramp-interrupt-process):
      * test/src/process-tests.el (make-process/mix-stderr):
      Fix code that uses accept-process-output and process-live-p.
      Add FIXME comments as necessary.
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
      * lisp/net/tramp.el (tramp-action-out-of-band):
      Add FIXME comments as necessary.
      9fc02ff5
  9. 13 Jan, 2019 1 commit
    • Paul Eggert's avatar
      Fix translation-region bug with MAX_CHAR · 1a722e88
      Paul Eggert authored
      Also, clean up the code a bit.
      Actually I discovered the bug while cleaning up the code.
      * src/editfns.c (Fsubst_char_in_region)
      (Ftranslate_region_internal): Use bool for booleans.
      (Ftranslate_region_internal): Fix off-by-1 bug when a
      translation table translates the maximum char.  Assume C99
      decl-after-statement, similar minor cleanups.
      * test/src/editfns-tests.el (test-translate-region-internal):
      New test.
      1a722e88
  10. 01 Jan, 2019 2 commits
    • Paul Eggert's avatar
      Update more copyright years · a04bf151
      Paul Eggert authored
      Update some other copyright years automatically, by running:
      Run 'UPDATE_COPYRIGHT_YEAR=2019 \
      UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 admin/update-copyright'
      followed by 'admin/merge-gnulib'.
      a04bf151
    • Paul Eggert's avatar
      Update copyright year to 2019 · 26bed8ba
      Paul Eggert authored
      Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
      26bed8ba
  11. 23 Dec, 2018 1 commit
    • Michael Albinus's avatar
      Handle `make-process' in Tramp and ange-ftp · 3ea89aca
      Michael Albinus authored
      * doc/lispref/processes.texi (Asynchronous Processes):
      Explain, that not all file name handlers support `make-process'.
      
      * lisp/net/ange-ftp.el:
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-process'.
      
      * lisp/vc/ediff-util.el:
      * src/process.c:
      * test/src/process-tests.el: Use "file name handler" consequently.
      3ea89aca
  12. 22 Dec, 2018 1 commit
    • Philipp Stephani's avatar
      Add file name handler support for 'make-process' (Bug#28691) · 039be4e0
      Philipp Stephani authored
      * src/process.c (Fmake_process): Add new keyword argument
      ':file-handler'.
      (syms_of_process) <make-process, :file-handler>: Define new symbols.
      
      * lisp/files.el (file-name-non-special): Add support for
      'make-process'.
      
      * test/src/process-tests.el (make-process/file-handler/found)
      (make-process/file-handler/not-found)
      (make-process/file-handler/disable): New unit tests.
      (process-tests--file-handler): New helper function.
      
      * test/lisp/files-tests.el
      (files-tests-file-name-non-special-make-process): New unit test.
      
      * doc/lispref/files.texi (Magic File Names): Document that
      'make-process' can invoke file name handlers.
      
      * doc/lispref/processes.texi (Asynchronous Processes): Document
      ':file-handlers' argument to 'make-process'.
      
      * etc/NEWS (Lisp Changes in Emacs 27.1): Mention new
      :file-handler argument for 'make-process'.
      039be4e0
  13. 19 Dec, 2018 2 commits
  14. 18 Dec, 2018 1 commit
    • Paul Eggert's avatar
      Support (ash INTEGER BIGNUM) · cdaaaf2e
      Paul Eggert authored
      * src/data.c (emacs_mpz_mul_2exp): 2nd arg is now a
      nonnegative EMACS_INT not mp_bitcnt_t, to simplify checking.
      (Fash): Support COUNT values that are bignums or that
      exceed mp_bitcnt_t range.
      * test/src/data-tests.el (data-tests-ash-lsh): Test this.
      cdaaaf2e
  15. 12 Dec, 2018 1 commit
  16. 25 Nov, 2018 1 commit
    • Michael Heerdegen's avatar
      Replace insignificant backquotes · 1808d254
      Michael Heerdegen authored
      Replace most insignificant occurrences of '`' with a straight quote,
      sharp quote or nothing.  This includes backquotes in 'pcase' patterns.
      
      * admin/admin.el:
      * lisp/apropos.el:
      * lisp/arc-mode.el:
      * lisp/auth-source.el:
      * lisp/avoid.el:
      * lisp/bindings.el:
      * lisp/bs.el:
      * lisp/calculator.el:
      * lisp/calendar/todo-mode.el:
      * lisp/cedet/semantic.el:
      * lisp/cedet/semantic/analyze/debug.el:
      * lisp/cedet/semantic/bovine.el:
      * lisp/cedet/semantic/dep.el:
      * lisp/cedet/semantic/grammar.el:
      * lisp/cedet/semantic/wisent/comp.el:
      * lisp/cedet/semantic/wisent/grammar.el:
      * lisp/cedet/srecode/mode.el:
      * lisp/cus-edit.el:
      * lisp/doc-view.el:
      * lisp/elec-pair.el:
      * lisp/electric.el:
      * lisp/emacs-lisp/autoload.el:
      * lisp/emacs-lisp/benchmark.el:
      * lisp/emacs-lisp/byte-opt.el:
      * lisp/emacs-lisp/bytecomp.el:
      * lisp/emacs-lisp/cconv.el:
      * lisp/emacs-lisp/cl-extra.el:
      * lisp/emacs-lisp/cl-generic.el:
      * lisp/emacs-lisp/cl-macs.el:
      * lisp/emacs-lisp/copyright.el:
      * lisp/emacs-lisp/debug.el:
      * lisp/emacs-lisp/eieio-compat.el:
      * lisp/emacs-lisp/ert.el:
      * lisp/emacs-lisp/generator.el:
      * lisp/emacs-lisp/inline.el:
      * lisp/emacs-lisp/macroexp.el:
      * lisp/emacs-lisp/map.el:
      * lisp/emacs-lisp/package-x.el:
      * lisp/emacs-lisp/package.el:
      * lisp/emacs-lisp/radix-tree.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/epa.el:
      * lisp/erc/erc-dcc.el:
      * lisp/erc/erc-track.el:
      * lisp/erc/erc.el:
      * lisp/eshell/em-ls.el:
      * lisp/eshell/esh-cmd.el:
      * lisp/files.el:
      * lisp/filesets.el:
      * lisp/font-lock.el:
      * lisp/frameset.el:
      * lisp/gnus/gnus-agent.el:
      * lisp/gnus/gnus-art.el:
      * lisp/gnus/gnus-cite.el:
      * lisp/gnus/gnus-group.el:
      * lisp/gnus/gnus-msg.el:
      * lisp/gnus/gnus-salt.el:
      * lisp/gnus/gnus-srvr.el:
      * lisp/gnus/gnus-sum.el:
      * lisp/gnus/gnus-topic.el:
      * lisp/gnus/gnus-util.el:
      * lisp/gnus/gnus.el:
      * lisp/gnus/message.el:
      * lisp/gnus/mm-util.el:
      * lisp/gnus/mml.el:
      * lisp/gnus/nnheader.el:
      * lisp/gnus/nnimap.el:
      * lisp/gnus/nnmairix.el:
      * lisp/gnus/spam.el:
      * lisp/hexl.el:
      * lisp/hi-lock.el:
      * lisp/ibuf-ext.el:
      * lisp/ibuffer.el:
      * lisp/ido.el:
      * lisp/info.el:
      * lisp/international/mule-cmds.el:
      * lisp/international/mule-util.el:
      * lisp/json.el:
      * lisp/jsonrpc.el:
      * lisp/language/cyrillic.el:
      * lisp/language/european.el:
      * lisp/language/georgian.el:
      * lisp/language/tibetan.el:
      * lisp/language/utf-8-lang.el:
      * lisp/language/vietnamese.el:
      * lisp/ldefs-boot.el:
      * lisp/mail/mail-extr.el:
      * lisp/man.el:
      * lisp/menu-bar.el:
      * lisp/mh-e/mh-acros.el:
      * lisp/mh-e/mh-folder.el:
      * lisp/mh-e/mh-mime.el:
      * lisp/mh-e/mh-show.el:
      * lisp/mh-e/mh-speed.el:
      * lisp/minibuffer.el:
      * lisp/mpc.el:
      * lisp/net/ange-ftp.el:
      * lisp/net/hmac-def.el:
      * lisp/net/newst-backend.el:
      * lisp/net/quickurl.el:
      * lisp/net/tramp-archive.el:
      * lisp/net/tramp-compat.el:
      * lisp/notifications.el:
      * lisp/obsolete/pgg-parse.el:
      * lisp/obsolete/vc-arch.el:
      * lisp/obsolete/xesam.el:
      * lisp/org/ob-C.el:
      * lisp/org/ob-core.el:
      * lisp/org/ob-exp.el:
      * lisp/org/ob-groovy.el:
      * lisp/org/ob-haskell.el:
      * lisp/org/ob-io.el:
      * lisp/org/ob-lisp.el:
      * lisp/org/ob-lob.el:
      * lisp/org/ob-lua.el:
      * lisp/org/ob-octave.el:
      * lisp/org/ob-perl.el:
      * lisp/org/ob-python.el:
      * lisp/org/ob-ref.el:
      * lisp/org/ob-ruby.el:
      * lisp/org/ob-sql.el:
      * lisp/org/org-agenda.el:
      * lisp/org/org-capture.el:
      * lisp/org/org-clock.el:
      * lisp/org/org-colview.el:
      * lisp/org/org-duration.el:
      * lisp/org/org-element.el:
      * lisp/org/org-entities.el:
      * lisp/org/org-gnus.el:
      * lisp/org/org-indent.el:
      * lisp/org/org-info.el:
      * lisp/org/org-inlinetask.el:
      * lisp/org/org-lint.el:
      * lisp/org/org-list.el:
      * lisp/org/org-mouse.el:
      * lisp/org/org-plot.el:
      * lisp/org/org-src.el:
      * lisp/org/org-table.el:
      * lisp/org/org.el:
      * lisp/org/ox-ascii.el:
      * lisp/org/ox-html.el:
      * lisp/org/ox-latex.el:
      * lisp/org/ox-man.el:
      * lisp/org/ox-md.el:
      * lisp/org/ox-org.el:
      * lisp/org/ox-publish.el:
      * lisp/org/ox-texinfo.el:
      * lisp/org/ox.el:
      * lisp/play/bubbles.el:
      * lisp/play/gamegrid.el:
      * lisp/progmodes/autoconf.el:
      * lisp/progmodes/cc-defs.el:
      * lisp/progmodes/cc-engine.el:
      * lisp/progmodes/cc-fonts.el:
      * lisp/progmodes/cc-langs.el:
      * lisp/progmodes/cperl-mode.el:
      * lisp/progmodes/ebrowse.el:
      * lisp/progmodes/elisp-mode.el:
      * lisp/progmodes/flymake-cc.el:
      * lisp/progmodes/flymake.el:
      * lisp/progmodes/fortran.el:
      * lisp/progmodes/grep.el:
      * lisp/progmodes/gud.el:
      * lisp/progmodes/idlwave.el:
      * lisp/progmodes/js.el:
      * lisp/progmodes/m4-mode.el:
      * lisp/progmodes/make-mode.el:
      * lisp/progmodes/mixal-mode.el:
      * lisp/progmodes/modula2.el:
      * lisp/progmodes/octave.el:
      * lisp/progmodes/opascal.el:
      * lisp/progmodes/prolog.el:
      * lisp/progmodes/ps-mode.el:
      * lisp/progmodes/python.el:
      * lisp/progmodes/ruby-mode.el:
      * lisp/progmodes/sh-script.el:
      * lisp/progmodes/sql.el:
      * lisp/progmodes/verilog-mode.el:
      * lisp/ps-mule.el:
      * lisp/rtree.el:
      * lisp/ruler-mode.el:
      * lisp/ses.el:
      * lisp/simple.el:
      * lisp/startup.el:
      * lisp/subr.el:
      * lisp/term/ns-win.el:
      * lisp/textmodes/bibtex.el:
      * lisp/textmodes/conf-mode.el:
      * lisp/textmodes/css-mode.el:
      * lisp/textmodes/refill.el:
      * lisp/textmodes/sgml-mode.el:
      * lisp/textmodes/tex-mode.el:
      * lisp/tutorial.el:
      * lisp/url/url-dav.el:
      * lisp/url/url-gw.el:
      * lisp/url/url-http.el:
      * lisp/url/url-methods.el:
      * lisp/url/url-privacy.el:
      * lisp/vc/cvs-status.el:
      * lisp/vc/diff-mode.el:
      * lisp/vc/ediff-init.el:
      * lisp/vc/ediff-ptch.el:
      * lisp/vc/log-edit.el:
      * lisp/vc/log-view.el:
      * lisp/vc/pcvs-info.el:
      * lisp/vc/pcvs.el:
      * lisp/vc/smerge-mode.el:
      * lisp/vc/vc-git.el:
      * lisp/vc/vc-hg.el:
      * lisp/vc/vc-mtn.el:
      * lisp/vc/vc-rcs.el:
      * lisp/whitespace.el:
      * lisp/window.el:
      * test/lisp/electric-tests.el:
      * test/lisp/emacs-lisp/cl-lib-tests.el:
      * test/lisp/emacs-lisp/ert-tests.el:
      * test/lisp/epg-tests.el:
      * test/lisp/jsonrpc-tests.el:
      * test/src/data-tests.el:
      * test/src/json-tests.el: Replace most insignificant backquotes.
      1808d254
  17. 13 Nov, 2018 1 commit
    • Paul Eggert's avatar
      Act like POSIX sh if $HOME is relative · 90027650
      Paul Eggert authored
      POSIX says sh ~/foo should act like $HOME/foo even if $HOME is
      relative, so be consistent with that (Bug#33255).
      * admin/merge-gnulib (GNULIB_MODULES): Add dosname.
      * src/buffer.c (init_buffer): Use emacs_wd to get
      initial working directory with slash appended if needed.
      (default-directory): Say it must be absolute.
      * src/emacs.c (emacs_wd): New global variable.
      (init_cmdargs): Dir arg is now char const *.
      (main): Set emacs_wd.
      * src/emacs.c (main) [NS_IMPL_COCOA]:
      * src/fileio.c (Fexpand_file_name):
      Use get_homedir instead of egetenv ("HOME").
      * src/fileio.c: Include dosname.h, for IS_ABSOLUTE_FILE_NAME.
      (splice_dir_file, get_homedir): New functions.
      * src/xrdb.c (gethomedir): Remove.  All callers changed
      to use get_homedir and splice_dir_file.
      * test/src/fileio-tests.el (fileio-tests--relative-HOME): New test.
      90027650
  18. 11 Nov, 2018 2 commits
  19. 10 Nov, 2018 3 commits
  20. 31 Oct, 2018 1 commit
    • Gemini Lasswell's avatar
      Add regression test for Bug#33014 · c3cf85b1
      Gemini Lasswell authored
      Backport from master.
      * test/src/eval-tests.el:
      (eval-tests-byte-code-being-evaluated-is-protected-from-gc): New test.
      (eval-tests-33014-var): New variable.
      (eval-tests-33014-func, eval-tests-33014-redefine): New functions.
      c3cf85b1
  21. 29 Oct, 2018 1 commit
  22. 17 Oct, 2018 1 commit
  23. 14 Oct, 2018 1 commit
  24. 13 Oct, 2018 1 commit
    • Eli Zaretskii's avatar
      Improve 'json-insert' so it doesn't cons a string from JSON · 95f69e7d
      Eli Zaretskii authored
      * src/json.c (struct json_buffer_and_size): New member
      inserted_bytes.
      (json_insert): Instead of creating a string and inserting it
      into the current buffer, copy the unibyte text into the gap.
      (struct json_insert_data): New member inserted_bytes.
      (json_insert_callback): Update commentary.  Pass the
      inserted_bytes value to json_insert and on its return copy the
      updated value back into DATA.
      (Fjson_insert): Decode the unibyte text inserted into the gap.
      Call before-change-functions and after-change-functions only
      once, before and after processing the insertion of the entire
      JSON representation.
      
      * test/src/json-tests.el (json-insert/throw): Adapt to the
      modified implementation of json-insert: it no longer calls the
      modification hooks once for each inserted chunk of JSON
      representation.
      95f69e7d
  25. 11 Oct, 2018 1 commit
    • Paul Eggert's avatar
      Fix mishandling of symbols that look like numbers · 5bd8cfc1
      Paul Eggert authored
      * src/bignum.c (make_neg_biguint): New function.
      * src/lread.c (read1): Do not mishandle an unquoted symbol
      with name equal to something like "1\0x", i.e., a string
      of numeric form followed by a NUL byte.
      Formerly these symbols were misread as numbers.
      (string_to_number): Change last argument from an integer flag
      to a pointer to the length.  This lets the caller figure out
      how much of the prefix was used.  All callers changed.
      Add a fast path if the integer (sans sign) fits in uintmax_t.
      Update comments and simplify now that bignums are present.
      * src/print.c (print_object): Fix quoting of symbols that look
      like numbers, by relying on string_to_number for the tricky
      cases rather than trying to redo its logic, incorrectly.  For
      example, (read (prin1-to-string '\1e+NaN)) formerly returned
      "1e+NaN", which was wrong: a backslash is needed in the output
      to prevent it from being read as a NaN.  Escape NO_BREAK_SPACE
      too, since lread.c treats it like SPACE.
      * test/src/print-tests.el (print-read-roundtrip):
      Add tests illustrating the abovementioned bugs.
      5bd8cfc1
  26. 07 Oct, 2018 3 commits
    • Paul Eggert's avatar
      Improvements on (TICKS . HZ) · 3cc45232
      Paul Eggert authored
      This patch is in response to Eli's review (Bug#32902#10).
      * src/systime.c: Doc strings of affected functions now refer
      to format-time-string instead of to Lisp manual, and
      format-time-string's doc string covers time values.
      * test/src/systime-tests.el (format-time-string-with-zone):
      Check decode-time too.
      (decode-then-encode-time, time-arith-tests): New tests.
      3cc45232
    • Paul Eggert's avatar
      New (TICKS . HZ) timestamp format · 93fe4209
      Paul Eggert authored
      This follows on a suggestion by Stefan Monnier in:
      https://lists.gnu.org/r/emacs-devel/2018-08/msg00991.html
      (Bug#32902).
      * doc/lispref/buffers.texi (Modification Time):
      * doc/lispref/os.texi (Processor Run Time, Time Calculations)
      * doc/lispref/processes.texi (System Processes):
      * doc/lispref/text.texi (Undo):
      Let the "Time of Day" section cover timestamp format details.
      * doc/lispref/os.texi (Time of Day):
      Say that timestamp internal format should not be assumed.
      Document new (ticks . hz) format.  Omit mention of seconds-to-time
      since it is now just an alias for encode-time.
      (Time Conversion): Document encode-time extension.
      * etc/NEWS: Mention changes.
      * lisp/calendar/cal-dst.el (calendar-system-time-basis): Now const.
      * lisp/calendar/cal-dst.el (calendar-absolute-from-time)
      (calendar-time-from-absolute)
      (calendar-next-time-zone-transition):
      * lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
      Simplify by using bignums, (TICKS . HZ), and new encode-time.
      * lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
      Simplify by using bignums and new encode-time.
      * lisp/calendar/parse-time.el (parse-iso8601-time-string):
      Handle DST more accurately, by using new encode-time.
      * lisp/calendar/time-date.el (seconds-to-time):
      * lisp/calendar/timeclock.el (timeclock-seconds-to-time):
      Now just an alias for encode-time.
      * lisp/calendar/time-date.el (days-to-time):
      * lisp/emacs-lisp/timer.el (timer--time-setter):
      * lisp/net/ntlm.el (ntlm-compute-timestamp):
      * lisp/obsolete/vc-arch.el (vc-arch-add-tagline):
      * lisp/org/org-id.el (org-id-uuid, org-id-time-to-b36):
      * lisp/tar-mode (tar-octal-time):
      Don't assume timestamps default to list form.
      * lisp/tar-mode.el (tar-parse-octal-long-integer):
      Now an obsolete alias for tar-parse-octal-integer.
      * src/keyboard.c (decode_timer): Adjust to changes to
      time decoding functions elsewhere.
      * src/timefns.c: Include bignum.h, limits.h.
      (FASTER_TIMEFNS): New macro.
      (WARN_OBSOLETE_TIMESTAMPS, CURRENT_TIME_LIST)
      (timespec_hz, trillion, ztrillion):
      New constants.
      (make_timeval): Use TIME_T_MAX instead of its definiens.
      (check_time_validity, time_add, time_subtract):
      Remove.  All uses removed.
      (disassemble_lisp_time): Remove; old code now folded into
      decode_lisp_time.  All callers changed.
      (invalid_hz, s_ns_to_double, ticks_hz_list4, mpz_set_time)
      (timespec_mpz, timespec_ticks, time_hz_ticks)
      (lisp_time_hz_ticks, lisp_time_seconds)
      (time_form_stamp, lisp_time_form_stamp, decode_ticks_hz)
      (decode_lisp_time, mpz_time, list4_to_timespec):
      New functions.
      (decode_float_time, decode_time_components, lisp_to_timespec):
      Adjust to new struct lisp_time, which does not lose
      information like the old one did.
      (enum timeform): New enum.
      (decode_time_components): New arg FORM.  All callers changed.
      RESULT and DRESULT are now mutually exclusive; no callers need
      to change because of this.
      (decode_time_components, lisp_time_struct)
      (lisp_seconds_argument, time_arith, make_lisp_time, Ffloat_time)
      (Fencode_time):
      Add support for (TICKS . HZ) form.
      (DECODE_SECS_ONLY): New constant.
      (lisp_time_struct): 2nd arg is now enum timeform, not int.
      All callers changed.
      (check_tm_member): Support bignums.m
      (Fencode_time): Add new two-arg functionality.
      * src/systime.h (struct lisp_time): Now ticks+hz rather than
      hi+lo+us+ps, since ticks+hz does not lose info.
      * test/src/systime-tests.el (time-equal-p-nil-nil):
      New test.
      93fe4209
    • Paul Eggert's avatar
      Move timestamp-related stuff to timefns.c · b5d08da1
      Paul Eggert authored
      This does not change behavior; it’s just long-overdue
      refactoring (Bug#32902).
      * src/emacs.c (main): Call init_timefns, syms_of_timefns.
      * src/timefns.c: New file, containing timestamp-related stuff
      from editfns.c and sysdep.c.
      * src/Makefile.in (base_obj): Add timefns.o.
      * src/editfns.c: Simplify by moving a big chunk to timefns.c.
      Do not include systime.h, sys/resource.h, sys/param.h,
      strftime.h, coding.h.
      (HAVE_TZALLOC_BUG, TM_YEAR_BASE, HAVE_TM_GMTOFF, tzeqlen)
      (local_tz, utc_tz, emacs_localtime_rz, emacs_mktime_z)
      (invalid_time_zone_specification, xtzfree, tzlookup)
      (TIME_T_MIN, TIME_T_MAX, time_overflow, invalid_time)
      (check_time_validity, hi_time, lo_time, Fcurrent_time)
      (time_add, time_subtract, time_arith, Ftime_add)
      (Ftime_subtract, Ftime_less_p, Fget_internal_run_time)
      (make_lisp_time, disassemble_lisp_time, decode_float_time)
      (lisp_to_timespec, lisp_time_struct, lisp_time_argument)
      (lisp_seconds_argument, Ffloat_time, emacs_nmemftime)
      (Fformat_time_string, format_time_string, Fdecode_time)
      (check_tm_member, Fencode_time, Fcurrent_time_string)
      (tm_gmtoff, Fcurrent_time_zone, Fset_time_zone_rule)
      (emacs_getenv_TZ, emacs_setenv_TZ): Move to timefns.c.
      * src/emacs.c (main): Adjust to initialization changes.
      * src/sysdep.c: Include <sys/resource.h> if it's present.
      Regularize includes a bit.
      (Fget_internal_run_time): Move here from editfns.c.
      (init_timefns, syms_of_timefns): New functions.
      * src/w32.h (w32_get_internal_run_time): Move decl here
      so that it need not be cloned.
      * test/src/editfns-tests.el:
      * test/src/editfns-tests.el (format-time-string-with-zone)
      (format-time-string-with-outlandish-zone)
      (editfns-tests--have-leap-seconds)
      (format-time-string-with-bignum-on-32-bit):
      Move to ...
      * test/src/timefns-tests.el: ... this new file.
      b5d08da1
  27. 22 Sep, 2018 2 commits
    • Paul Eggert's avatar
      Round bignums consistently with other integers · 0b36041d
      Paul Eggert authored
      * src/bignum.c (mpz_bufsize): New function.
      (bignum_bufsize): Use it.
      (mpz_get_d_rounded): New function.
      (bignum_to_double): Use it.
      * src/bignum.c (bignum_to_double):
      * src/data.c (bignum_arith_driver):
      When converting bignums to double, round instead of
      truncating, to be consistent with what happens with fixnums.
      * test/src/floatfns-tests.el (bignum-to-float): Test rounding.
      0b36041d
    • Paul Eggert's avatar
      Fix (+ bignum float) bug · 3727bc7d
      Paul Eggert authored
      * src/data.c (bignum_arith_driver): Fix typo: missing ‘return’.
      * test/src/data-tests.el (data-tests-bignum): Test for the typo.
      3727bc7d
  28. 21 Sep, 2018 1 commit
  29. 15 Sep, 2018 1 commit
    • Eli Zaretskii's avatar
      Avoid adverse side effects of fixing bug#21824 · e133b630
      Eli Zaretskii authored
      * test/src/buffer-tests.el
      (overlay-modification-hooks-deleted-overlay): New test.
      
      * src/buffer.c (report_overlay_modification): Don't bypass all
      the overlay-modification hooks; instead, invoke each function
      only if the buffer associated with the overlay is the current
      buffer.  (Bug#30823)
      e133b630
  30. 13 Sep, 2018 1 commit
    • Paul Eggert's avatar
      Fix (floor 54043195528445955 3.0) bug · c44bc4d3
      Paul Eggert authored
      * src/floatfns.c (rounding_driver): Fix rounding error
      that can occur when both args have values exactly
      representable as integers but at least one arg is a float.
      * test/src/floatfns-tests.el (big-round): New test.
      c44bc4d3