1. 09 Jul, 2020 10 commits
    • Paul Eggert's avatar
      Use Gnulib libgmp module · c8b6006d
      Paul Eggert authored
      Instead of doing GMP by hand, use the Gnulib libgmp module.
      * .gitignore: Add lib/gmp.h.
      * admin/merge-gnulib (GNULIB_MODULES): Add libgmp.
      * configure.ac (GMP_LIB, GMP_OBJ): Remove.  Gnulib uses the name
      LIB_GMP, so all uses changed.  All uses of GMP_OBJ removed.
      (HAVE_GMP): Set this from Gnulib’s variables.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/mini-gmp-gnulib.c, lib/mini-gmp.c, lib/mini-gmp.h, m4/libgmp.m4:
      New files, copied from Gnulib.
      * src/bignum.h, test/data/emacs-module/mod-test.c:
      Include gmp.h unconditionally.
      * src/mini-gmp-emacs.c, src/mini-gmp.c, src/mini-gmp.h:
      Remove.  This moves these files from src to lib, and
      updates them to the current GMP version.
      * test/Makefile.in (GMP_H): New macro.
      ($(test_module)): Use it to decide whether to compile
      mini-gmp-gnulib.c too.
    • Paul Eggert's avatar
      Speed up GCC 10.1 compilation in default Git builds · 50130655
      Paul Eggert authored
      * configure.ac (nw): GCC 10.1 introduced warnings enabled by -fanalyzer
      that slow down compilation considerably.  Generate these warnings only
      if --enable-gcc-warnings is explicitly given.  Also, do not bother to
      eliminate warnings that Gnulib’s revised manywarnings module no longer
    • Paul Eggert's avatar
      Update from Gnulib · 0fc8671d
      Paul Eggert authored
      This incorporates:
      2020-07-07 dup2: remove support for some very old platforms
      2020-07-07 memchr: remove support for some very old platforms
      2020-07-04 getumask: new module
      2020-07-03 getrandom: fix compilation error on native Windows
      2020-07-03 lchmod: simplify after 2020-02-22 change
      2020-07-01 manywarnings: improve port to GCC 10.1
      2020-06-28 getrandom: fix compilation errors on older versions of mingw
      2020-06-29 alloca-opt: fix warning on mingw
      * lib/alloca.in.h, lib/dup2.c, lib/getrandom.c, lib/string.in.h:
      * lib/sys_stat.in.h, lib/unistd.in.h, m4/dup2.m4, m4/getrandom.m4:
      * m4/lchmod.m4, m4/manywarnings.m4, m4/string_h.m4, m4/sys_stat_h.m4:
      * m4/unistd_h.m4: Copy from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
    • Alexander Adolf's avatar
      EUDC: Add macOS Contacts backend · 814e3b0b
      Alexander Adolf authored
      * lisp/net/eudcb-macos-contacts.el: New file.
      * doc/misc/eudc.texi (macOS Contacts): New section.
      (macOS Contacts Configuration): Likewise.
      * etc/NEWS: Mention new macOS Contacts backend.
    • Eli Zaretskii's avatar
      Improve display of compositions by "C-u C-x =" · 2d7c3e49
      Eli Zaretskii authored
      * lisp/descr-text.el (describe-char): On TTY frames, display the
      Unicode names of the composed characters as well.  (Bug#42256)
    • João Távora's avatar
      Unbreak M-x eldoc · 59f56368
      João Távora authored
      The command should always invoke Eldoc when called interactively,
      instead of going through the usual checks, which are performed to
      avoid interference with other commands.
      * lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Rework.
      (Version): Bump to 1.2.0
    • João Távora's avatar
      Prevent infloop in Eldoc message truncation algorithm · ffb99d84
      João Távora authored
      The truncation algorithm still has a long way to go for very narrow
      frame sizes.  It should become a generic mechanism that would allows
      one to truncate a string so that fits in N possibly truncated screen
      lines of a full-width window.
      * lisp/emacs-lisp/eldoc.el (eldoc-handle-docs): Tweak
    • João Távora's avatar
      Bump Flymake version · 19cf8e5b
      João Távora authored
      * lisp/progmodes/flymake.el (Version): Bump to 1.0.9.
    • Glenn Morris's avatar
      Update tests for recent changes · ef8bd7d8
      Glenn Morris authored
      * test/lisp/descr-text-tests.el (descr-text-test-desc):
      Update for recent change to describe-char-eldoc.
      * test/lisp/progmodes/elisp-mode-tests.el
      Update for recent change to elisp--highlight-function-argument.
    • Glenn Morris's avatar
  2. 08 Jul, 2020 13 commits
    • João Távora's avatar
      ; * etc/NEWS (Eldoc): adjust NEWS entry. · 9a7aab2d
      João Távora authored
    • João Távora's avatar
      Shoosh warnings about obsolete eldoc-documentation-function · 6063b542
      João Távora authored
      * lisp/progmodes/cfengine.el (cfengine3-mode): Remove mention to
      obsolete eldoc-documentation-function.
      * lisp/progmodes/python.el (python-mode): Use with-no-warnings.
    • Eli Zaretskii's avatar
      ; * etc/NEWS: Fix last change. · a85026c3
      Eli Zaretskii authored
    • Eli Zaretskii's avatar
    • Mattias Engdegård's avatar
      Special-case symbol and fixnum keys in member, assoc and rassoc · b7058f95
      Mattias Engdegård authored
      * src/fns.c (Fmember, Fassoc, Frassoc): Delegate to the cheaper Fmemq,
      Fassq and Frassq for arguments of the appropriate types.
      (eq_comparable_value): New function.
    • João Távora's avatar
      Improve Eldoc docstrings · 384fa109
      João Távora authored
      * lisp/emacs-lisp/eldoc.el (eldoc-documentation-strategy): Improve
      (eldoc--make-callback): Improve docstring.
      (eldoc--invoke-strategy): New helper function.
      (eldoc-print-current-symbol-info): Call eldoc--invoke-strategy.
      (eldoc-documentation-functions): Improve docstring.
    • João Távora's avatar
      Change version scheme of two Eldoc obsolete specs · fbc0bc6b
      João Távora authored
      * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function)
      (eldoc-message): Obsolete spec uses eldoc-1.1.0.
    • João Távora's avatar
      Adjust describe-char-eldoc to new eldoc-documentation-functions protocol · b3efd5c2
      João Távora authored
      * lisp/descr-text.el (describe-char-eldoc): Adjust to new
      eldoc-documentation-functions protocol.
    • João Távora's avatar
      Adjust Eldoc documentation after Eli's review · bba3bea2
      João Távora authored
      * etc/NEWS (Eldoc): Adjust paragraphs.
      * lisp/emacs-lisp/eldoc.el (eldoc-prefer-doc-buffer): Adjust
      (eldoc--enthusiasm-curbing-timer, eldoc-documentation-strategy)
      (eldoc-documentation-functions): Adjust docstring.
      (eldoc--handle-docs): Adjust comments.
      (eldoc--documentation-compose-1): New helper.
      (eldoc-documentation-compose-eagerly): Use it.
      (eldoc-print-current-symbol-info): Adjust comments.
    • João Távora's avatar
      Make more parts of Emacs use new Eldoc capabilities · 1203626f
      João Távora authored
      Elisp-mode was doing a lot of work that can now be delegated to Eldoc.
      Flymake uses the new Eldoc functionality, too, installing a global
      documentation function that may report on diagnostics under point.
      CEDET's grammar.el was left as the only user of an Eldoc-internal
      function.  That function was moved to grammar.el.  That file is still,
      somewhat reprehensibly, using an internal function of elisp-mode.el,
      but this was left unchanged.
      In other situations, eldoc-documentation-functions is used or
      The only other places where the obsolete eldoc-documentation-function
      is still used is in libraries which are presumably meant to remain
      compatible with previous Emacs versions.
      * lisp/progmodes/elisp-mode.el (elisp-eldoc-funcall)
      (elisp-eldoc-var-docstring): New functions.
      (emacs-lisp-mode): Put two elements in
      * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Setup
      new Elisp eldoc-documentation-functions.
      * lisp/progmodes/flymake.el (flymake-mode): Use
      (flymake-eldoc-function): New function.
      (Package-Requires): Require eldoc 1.1.0
      * lisp/descr-text.el (describe-char-eldoc): Recommend
      * lisp/progmodes/cfengine.el (cfengine3-documentation-function):
      Recommend eldoc-documentation-functions
      * lisp/progmodes/octave.el (inferior-octave-mode): Use
      * lisp/cedet/semantic/grammar.el (semantic--docstring-format-sym-doc):
      New function.
      (semantic-grammar-eldoc-get-macro-docstring): Adjust.
    • João Távora's avatar
    • João Távora's avatar
      New M-x eldoc for on-demand and interactive documentation requests · 22cae4f5
      João Távora authored
      The function eldoc is just an alias for
      eldoc-print-current-symbol-info, which is made interactive.
      * lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Now an
      interactive function.
      (eldoc): Alias to eldoc-print-current-symbol-info.
    • João Távora's avatar
      Better handle asynchronous Eldoc sources · a7a53f0d
      João Távora authored
      This is a backward compatible redesign of significant parts of the
      eldoc.el library.
      Previously, Eldoc clients (major/minor modes setting its documentation
      gathering variables) needed to directly call eldoc-message, an
      internal function, to display the docstring to the user.  When more
      asynchronous sources are involved, this is hard to do or even breaks
      Now, an Eldoc backend may return any non-nil, non-string value and
      call a callback afterwards.  This restores power to Eldoc over how
      (and crucially also when) to display the docstrings to the user.
      Among other things, this fixes so called "doc blinking", or the very
      short-lived display of a lower priority Eldoc message.  This would
      happen if a particular producer of documentation finishes shortly
      before a higher priority one, like in the LSP engine Eglot as reported
      by Andrii Kolomoiets <andreyk.mad@gmail.com> and Dmitry Gutov
      Gathering docstrings is now delegated to the variable
      eldoc-documentation-strategy, which is the new name for the
      now-obsolete eldoc-documentation-function, and still accepts the
      so-called "old protocol".  Examples of the new strategies enabled are
      codified in functions such as eldoc-documentation-enthusiast,
      eldoc-documentation-compose-eagerly, along with the existing
      eldoc-documentation-compose and eldoc-documentation-default.
      The work of displaying and formatting docstrings is shifted almost
      fully to Eldoc itself and is delegated to the internal function
      eldoc--handle-docs.  Among other improvements, it handles most of
      eldoc-echo-area-use-multiline-p and outputs documentation to a
      temporary *eldoc* buffer.
      The manual and NEWS are updated to mention the new Eldoc features.
      * lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions):
      Overhaul docstring.
      (eldoc-documentation-compose, eldoc-documentation-default): Handle
      non-nil, non-string values of elements of
      eldoc-documentation-functions.  Use eldoc--handle-multiline.
      (eldoc-print-current-symbol-info): Honour non-nil, non-string
      values returned by eldoc-documentation-callback.
      (eldoc--make-callback): Now also a function.
      (eldoc-documentation-default, eldoc-documentation-compose): Tweak docstring.
      (eldoc-documentation-enthusiast, eldoc-documentation-compose-eagerly):
      New functions.
      (eldoc-echo-area-use-multiline-p): Add new semantics.
      (eldoc--handle-docs): Handle some of eldoc-echo-area-use-multiline-p.
      (eldoc-doc-buffer): New command.
      (eldoc-prefer-doc-buffer): New defcustom.
      (eldoc--enthusiasm-curbing-timer): New variable.
      (eldoc-documentation-strategy): Rename from eldoc-documentation-function.
      (eldoc--supported-p): Use eldoc-documentation-strategy
      (eldoc-argument-case, global-eldoc-mode)
      (turn-on-eldoc-mode): Mention eldoc-documentation-strategy.
      (eldoc-message-function): Mention eldoc--message.
      (eldoc-message): Made obsolete.
      (eldoc--message): New helper.
      * lisp/hexl.el (hexl-print-current-point-info): Adjust to new
      eldoc-documentation-functions protocol.
      * lisp/progmodes/cfengine.el (cfengine3-documentation-function):
      Adjust to new eldoc-documentation-functions protocol.
      * lisp/progmodes/elisp-mode.el
      (elisp-eldoc-documentation-function): Adjust to new
      eldoc-documentation-functions protocol.
      * lisp/progmodes/octave.el (octave-eldoc-function): Adjust to new
      eldoc-documentation-functions protocol.
      * lisp/progmodes/python.el (python-eldoc-function): Adjust to new
      eldoc-documentation-functions protocol.
      (eldoc-print-current-symbol-info): Rework with cl-labels.
      * doc/emacs/programs.texi (Lisp Doc): Mention
      * doc/lispref/modes.texi (Major Mode Conventions): Mention
      * etc/NEWS: Mention eldoc-documentation-strategy.
  3. 07 Jul, 2020 5 commits
  4. 06 Jul, 2020 5 commits
    • Stefan Monnier's avatar
    • Mattias Engdegård's avatar
      Simplify byte-code optimisation of pure functions · 3f990c3c
      Mattias Engdegård authored
      Most pure functions need no explicit optimisation; we can do away with
      almost all uses of byte-optimize-predicate (now renamed to
      byte-optimize-constant-args, since it is not just for predicates).
      Also remove some superfluous arity warnings.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-identity, byte-optimize-memq)
      (byte-optimize-nth, byte-optimize-nthcdr):
      Remove arity warnings and simplify.
      * lisp/emacs-lisp/byte-opt.el (<, >, <=, >=, not, null, consp, listp)
      (symbolp, stringp, string<, string-lessp, proper-list-p, logand)
      (logior, logxor, lognot, car, cdr, car-safe, cdr-safe):
      Remove superfluous byte-optimizer property.
      (byte-optimize-predicate): Rename to byte-optimize-constant-args.
      All uses changed.
    • Mattias Engdegård's avatar
      Mark more functions pure (bug#42147) · fb63a64d
      Mattias Engdegård authored
      Extend the list of 'pure' functions to many predicates and numerical
      functions that we are reasonably confident will give portable results.
      Also include various list and array accessors, because our use of purity
      in the byte compiler isn't affected by the mutability of arguments.
      * lisp/emacs-lisp/byte-opt.el: Update example in comment.
      (pure-fns): Add many functions.
      (byte-optimize-form-code-walker) Don't signal errors during evaluation
      of calls to pure functions with constant arguments at compile time,
      since such calls are not necessarily reachable.
    • Dmitry Gutov's avatar
      ; Revert "; Add a note about a bottleneck" · 10a0941f
      Dmitry Gutov authored
      This reverts commit 9f9ce631.
      It's still a bottleneck, but so are mapcar (with its effect on GC) and
      concat. So our limits show in several places at once.
    • Dmitry Gutov's avatar
      ; Add a note about a bottleneck · 9f9ce631
      Dmitry Gutov authored
  5. 05 Jul, 2020 7 commits
    • Dmitry Gutov's avatar
    • Dmitry Gutov's avatar
      ; Add a couple of FIXMEs · bcde7952
      Dmitry Gutov authored
    • Dmitry Gutov's avatar
      project-switch-to-buffer: Don't filter based on default-directory · 4ca13d98
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-switch-to-buffer):
      Don't filter based on default-directory
      (project-switch-to-buffer): Ditto.
    • Wilson Snyder's avatar
      Verilog-Mode collected updates. · e3ada206
      Wilson Snyder authored
      * lisp/progmodes/verilog-mode.el (verilog-auto-inst): Support regexp of
      what AUTOINST I/O to include, issue #1682.  Reported by Mrainy.
      (verilog-font-lock-keywords-1): Fix highlighting module names with no
      following (, issue #1679.  Reported by Vinam Arora.
      (verilog-font-lock-keywords) Adds syntax highlighting for identifiers in
      declaration statements, #1678.
      (verilog-calculate-indent, verilog-inject-arg)
      (verilog-keywords, verilog-showscopes): Support AMS
      connectmodule/endconnectmodule, #1665. Reported by Dan McMahill.
    • Mattias Engdegård's avatar
      Don't confuse errors with nil in bytecomp-tests.el · 58e27ebb
      Mattias Engdegård authored
      * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-check-1)
      (bytecomp-explain-1, test-byte-opt-arithmetic, bytecomp-lexbind-check-1)
      If an expression raises an error when evaluated, don't treat it as if
      it had succeeded with the value nil; use 'bytecomp-check-error' as the
      result instead.
    • Eli Zaretskii's avatar
      Clarify the documentation of 'left/right-fringe' display spec · 247dcb4b
      Eli Zaretskii authored
      * doc/lispref/display.texi (Other Display Specs, Fringe Bitmaps):
      Clarify how the optional FACE parameter of the left-fringe and
      right-fringe display spec is used.  Reported by Gregory Heytings
    • Mattias Engdegård's avatar
      Relax portable number check in byte compiler (bug#42147) · c10293e1
      Mattias Engdegård authored
      With bignums, the set of representable integers is no longer
      platform-dependent, and since we use nothing but IEEE754 64-bit
      floats, all numbers are now portable.  Take advantage of this fact
      to simplify constant-folding in the byte compiler, allowing it to
      be applied more widely.
      * lisp/emacs-lisp/byte-opt.el (byte-opt--portable-max)
      (byte-opt--portable-min, byte-opt--portable-numberp): Remove.
      (byte-opt--arith-reduce, byte-optimize-minus, byte-optimize-1+)
      (byte-optimize-1-): Simplify: any number will do, and if N is a
      number, then so are -N, N+1 and N-1.