1. 11 Jul, 2020 4 commits
  2. 10 Jul, 2020 5 commits
    • João Távora's avatar
      Fix placement of Eldoc docs during eval-expression (bug#42309) · 1198b03e
      João Távora authored
      * lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): Rework.
      1198b03e
    • João Távora's avatar
      Revert "Fix Eldoc problem when loading on Emacs 26.3" · c2599632
      João Távora authored
      This reverts commit 9ade7ea7.
      
      * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.4.0
      c2599632
    • Michael Albinus's avatar
      Tramp code cleanup · 7caf5706
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-shell-prompt-pattern)
      (tramp-wrong-passwd-regexp, tramp-method-regexp-alist)
      (tramp-domain-regexp, tramp-host-regexp, tramp-ipv6-regexp)
      (tramp-port-regexp, tramp-debug-outline-regexp)
      (tramp-drop-volume-letter, tramp-parse-shostkeys)
      (tramp-handle-file-name-case-insensitive-p):
      * lisp/net/tramp-adb.el (tramp-adb-send-command-and-check):
      * lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter):
      * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp)
      (tramp-device-escape-sequence-regexp):
      * lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat)
      (tramp-smb-handle-set-file-acl, tramp-smb-read-file-entry):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-selinux-context):
      Use character classes in regexp.
      
      * lisp/net/tramp-adb.el (tramp-adb-ls-date-year-regexp)
      (tramp-adb-ls-date-time-regexp): New defconst.
      (tramp-adb-ls-date-regexp, tramp-adb-ls-toolbox-regexp)
      (tramp-adb-sh-fix-ls-output): Use them.
      (tramp-adb-handle-set-file-times, tramp-adb-maybe-open-connection):
      Apply `eval-when-compile' on constant concat data.
      (tramp-do-parse-file-attributes-with-ls):
      Suppress `signal-hook-function'.
      (tramp-adb--gnu-switches-to-ash): Remove unused function.
      (tramp-adb-handle-set-file-modes): Qhote argument.
      (tramp-adb-maybe-open-connection): Set file property rather than flush.
      
      * lisp/net/tramp-cmds.el (tramp-rename-these-files):
      Apply `eval-when-compile' on constant concat data.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes)
      (tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Embed them in
      `eval-and-compile'.
      (tramp-gvfs-get-directory-attributes): Apply `eval-when-compile'
      on constant concat data.
      7caf5706
    • João Távora's avatar
      Fix byte compilation warning in Eldoc · 62725e87
      João Távora authored
      * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Pass nil as
      second argument.
      62725e87
    • João Távora's avatar
      Fix Eldoc problem when loading on Emacs 26.3 · 9ade7ea7
      João Távora authored
      When defining the obsolete variable alias for old
      eldoc-documentation-function (which now points to the newer
      eldoc-documentation-strategy), one gets the error "don't know how to
      make a localized vareiable an alias".  I'm not sure, but I suspect
      this is because Eldoc is preloaded in Emacs 26.3 and the
      eldoc-documentation-function variable is already set locally by some
      Elisp buffer.
      
      Uninterning the symbol shortly before defining the alias seems to fix
      it.
      
      * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function):
      Unintern on load.
      (Version): Bump to 1.3.0
      9ade7ea7
  3. 09 Jul, 2020 11 commits
    • Paul Eggert's avatar
      Fix out-of-source ‘make check’ emacs-module-tests · c86f3fe0
      Paul Eggert authored
      Problem reported by Koki Fukuda in:
      https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
      * test/Makefile.in (MODULE_CFLAGS):
      Include from the same directories included from in ../src.
      * test/src/emacs-module-tests.el (module/describe-function-1):
      Strip path to source directory.
      c86f3fe0
    • 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.
      c8b6006d
    • 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
      generates.
      50130655
    • 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.
      0fc8671d
    • 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.
      814e3b0b
    • 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)
      2d7c3e49
    • 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
      59f56368
    • 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
      ffb99d84
    • 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.
      19cf8e5b
    • 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
      (elisp--highlight-function-argument-indexed)
      (elisp--highlight-function-argument-keyed-1)
      (elisp--highlight-function-argument-keyed-2):
      Update for recent change to elisp--highlight-function-argument.
      ef8bd7d8
    • Glenn Morris's avatar
  4. 08 Jul, 2020 13 commits
    • João Távora's avatar
      ; * etc/NEWS (Eldoc): adjust NEWS entry. · 9a7aab2d
      João Távora authored
      9a7aab2d
    • 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.
      6063b542
    • Eli Zaretskii's avatar
      ; * etc/NEWS: Fix last change. · a85026c3
      Eli Zaretskii authored
      a85026c3
    • Eli Zaretskii's avatar
      8cdfccfc
    • 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.
      b7058f95
    • João Távora's avatar
      Improve Eldoc docstrings · 384fa109
      João Távora authored
      * lisp/emacs-lisp/eldoc.el (eldoc-documentation-strategy): Improve
      docstring.
      (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.
      384fa109
    • 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.
      fbc0bc6b
    • 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.
      b3efd5c2
    • 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
      docstring.
      (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)
      (eldoc-documentation-compose-eagerly): Use it.
      (eldoc-print-current-symbol-info): Adjust comments.
      bba3bea2
    • 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
      recommended.
      
      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
      eldoc-documentation-functions.
      
      * 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.
      (flymake-eldoc-function): New function.
      (Package-Requires): Require eldoc 1.1.0
      
      * lisp/descr-text.el (describe-char-eldoc): Recommend
      eldoc-documentation-functions.
      
      * lisp/progmodes/cfengine.el (cfengine3-documentation-function):
      Recommend eldoc-documentation-functions
      
      * lisp/progmodes/octave.el (inferior-octave-mode): Use
      eldoc-documentation-functions.
      
      * lisp/cedet/semantic/grammar.el (semantic--docstring-format-sym-doc):
      New function.
      (semantic-grammar-eldoc-get-macro-docstring): Adjust.
      1203626f
    • João Távora's avatar
      a9bd5060
    • 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.
      22cae4f5
    • 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
      down.
      
      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
      <dgutov@yandex.ru>.
      
      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-highlight-function-argument)
      (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
      eldoc-documentation-strategy.
      
      * doc/lispref/modes.texi (Major Mode Conventions): Mention
      eldoc-documentation-functions.
      
      * etc/NEWS: Mention eldoc-documentation-strategy.
      a7a53f0d
  5. 07 Jul, 2020 5 commits
  6. 06 Jul, 2020 2 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.
      3f990c3c