1. 08 Jul, 2020 1 commit
    • João Távora's avatar
      Improve Eldoc docstrings · b019a38b
      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.
  2. 07 Jul, 2020 2 commits
  3. 05 Jul, 2020 1 commit
    • João Távora's avatar
      Adjust Eldoc documentation after Eli's review · ea8e1ec3
      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.
  4. 30 Jun, 2020 4 commits
    • João Távora's avatar
      Make more parts of Emacs use new Eldoc capabilities · 99fd115a
      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 · 62dc1d48
      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 · 6c54414d
      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.
  5. 22 Jun, 2020 2 commits
  6. 21 Jun, 2020 13 commits
    • Juri Linkov's avatar
      Fix display-buffer-override-next-command to call action only once (bug#39722) · ce4ec179
      Juri Linkov authored
      * lisp/vc/vc-dir.el (vc-dir-bookmark-jump): Don't use save-window-excursion.
      * lisp/window.el (display-buffer-override-next-command): Reset
      display-buffer-overriding-action after the first buffer display action.
      * lisp/tab-bar.el (switch-to-buffer-other-tab): Don't reuse frame tabs.
      (other-tab-prefix): Don't reuse frame tabs.
    • Juri Linkov's avatar
      New commands other-window-prefix (C-x 4 4) and other-frame-prefix (C-x 5 5) · ba8370bc
      Juri Linkov authored
      * lisp/window.el (other-window-prefix, same-window-prefix): New commands.
      (ctl-x-4-map): Bind 'C-x 4 4' to 'other-window-prefix'.  (Bug#41691)
      * lisp/frame.el (other-frame-prefix): New command.
      (ctl-x-5-map): Bind 'C-x 5 5' to 'other-frame-prefix'.
    • Theodor Thornhill's avatar
      Forward declare eshell-buffer-name in project-eshell · a1686c00
      Theodor Thornhill authored
      * lisp/progmodes/project.el: Forward declare 'eshell-buffer-name' so
      that 'project-eshell' can use dynamically scoping with it.
    • Dmitry Gutov's avatar
      ; project-shell, project-eshell: Doc fixes · 7221d844
      Dmitry Gutov authored
    • Mattias Engdegård's avatar
      Consolidate #RGB string parsers · 9fe2bdb8
      Mattias Engdegård authored
      Use a single parser of color strings in the #RGB, rgb:R/G/B and
      rgbi:R/G/B formats, replacing four existing ones.  Previously,
      error-checking was spotty, handling of the rgbi: format not always
      present, and normalization of the result was sometimes incorrect.
      * src/dispextern.h: New prototype.
      * src/xfaces.c (parse_hex_color_comp, parse_float_color_comp)
      (parse_color_spec, Finternal-color_values_from_color_spec): New functions.
      * test/src/xfaces-tests.el (xfaces-internal-color-values-from-color-spec):
      New test.
      * lisp/term/tty-colors.el (tty-color-standard-values):
      Use internal-color-values-from-color-spec, replacing old parser.
      * src/nsterm.m (ns_get_color):
      * src/w32fns.c (x_to_w32_color):
      * src/xterm.c (x_parse_color): Use parse_color_spec, replacing old
      (HEX_COLOR_NAME_LENGTH): Remove #define.
    • Basil L. Contovounesios's avatar
      Revert last change in benchmark.el · 0792f8e4
      Basil L. Contovounesios authored
      For discussion, see the following thread:
      * lisp/emacs-lisp/benchmark.el (benchmark-run-compiled): Revert to
      giving byte-compile a form rather than a closure.
    • Eli Zaretskii's avatar
      Improve doc strings of 'project-shell' and 'project-eshell' · 8df2957d
      Eli Zaretskii authored
      * lisp/progmodes/project.el (project-shell, project-eshell): Doc
    • Basil L. Contovounesios's avatar
      Replace some uses of cl-mapcan with mapcan · a4d3897d
      Basil L. Contovounesios authored
      * lisp/progmodes/project.el (project-files, project-files):
      * lisp/progmodes/xref.el (xref-backend-references)
      * test/lisp/emacs-lisp/package-tests.el
      (package-test-strip-version): Replace cl-mapcan with equivalent
      calls to mapcan.
    • Michael Albinus's avatar
      Fix remaining problems with tramp-crypt.el · f18b0357
      Michael Albinus authored
      * lisp/net/tramp-compat.el (tramp-compat-make-temp-file):
      Simplify implementation.
      * lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-file)
      (tramp-crypt-handle-file-attributes, tramp-crypt-handle-file-system-info)
      (tramp-crypt-handle-make-directory): Let-bind `tramp-crypt-enabled' to nil.
      * lisp/net/tramp.el (tramp-file-name-for-operation): Fix for operations
      with two arguments.
      (tramp-handle-load): Suppress `signal-hook-function' when NOERROR
      is non-nil.
      * test/lisp/net/tramp-tests.el (tramp-test41-utf8)
      (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
      (tramp-test41-utf8-with-ls): Skip if needed.
    • Basil L. Contovounesios's avatar
      Evaluate some unnecessarily quoted lambdas · 1ecd350f
      Basil L. Contovounesios authored
      * lisp/cedet/semantic/complete.el
      * lisp/emacs-lisp/benchmark.el (benchmark-run-compiled):
      * lisp/emacs-lisp/package.el (package--default-summary)
      * lisp/eshell/em-pred.el (eshell-pred-file-time):
      * lisp/progmodes/verilog-mode.el (verilog-auto-lineup)
      (verilog-auto-reset-widths, verilog-auto-arg-format)
      (verilog-auto-inst-vector, verilog-auto-inst-template-numbers):
      * lisp/textmodes/bibtex.el (bibtex-dialect):
      * test/lisp/autoinsert-tests.el
      (autoinsert-tests-define-auto-insert-after): Remove some unnecessary
      quoting around anonymous functions.
    • Basil L. Contovounesios's avatar
      Silence some warnings in tests · 4cc6854c
      Basil L. Contovounesios authored
      * test/lisp/emacs-lisp/package-tests.el
      (package-test-suffix-matches): Evaluate lambda.
      * test/lisp/vc/vc-tests.el
      * test/src/undo-tests.el (undo-test-skip-invalidated-markers):
      Silence "unused local variable" warnings.
      * test/lisp/imenu-tests.el (imenu-simple-scan-deftest): Fix
      docstring.  Don't shadow global major-mode.
    • Dmitry Gutov's avatar
    • Theodor Thornhill's avatar
      Pop to an existing Eshell buffer by default · c1056b03
      Theodor Thornhill authored
      * lisp/progmodes/project.el (project-shell): Improve docstring to
      include information about an implementation detail.
      * list/progmodes/project.el (project-eshell): Modelled after
      'project-shell', change default behavior such that we don't create too
      many eshell buffers by default.  Use universal argument to create
      subsequent buffers.
  7. 20 Jun, 2020 7 commits
  8. 19 Jun, 2020 5 commits
    • Eli Zaretskii's avatar
      Fix last change in doc strings of project.el · 2eda8199
      Eli Zaretskii authored
      * lisp/progmodes/project.el (project-switch-to-buffer): More accurate
      doc string.
    • Michael Albinus's avatar
      Fix various problems in Tramp · 3e7499c8
      Michael Albinus authored
      * lisp/net/tramp-compat.el (tramp-temp-name-prefix): Declare.
      * lisp/net/tramp.el (tramp-make-tramp-temp-name): New defuns.
      * lisp/net/tramp.el (tramp-make-tramp-temp-file):
      * lisp/net/tramp-sh.el (tramp-find-inline-encoding)
      (tramp-maybe-open-connection, tramp-get-remote-touch)
      * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory): Use them.
      * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-stat):
      Simplify shell command.  Suppress errors (interpret as nil).
      (tramp-sh-handle-make-process): Do not visit with
      `insert-file-contents'.  Delete tmp file only if exists.
      (tramp-send-command-and-read): Suppress `signal-hook-function'
      when reading expression.
    • Eli Zaretskii's avatar
      Improve doc strings of project.el · 1e3b0f2d
      Eli Zaretskii authored
      * lisp/progmodes/project.el (project-dired, project-shell)
      (project-eshell, project-switch-to-buffer, project-kill-buffers)
      (project-list-file, project--read-project-list)
      (project--ensure-read-project-list, project--write-project-list)
      (project--remove-from-project-list, project-prompt-project-dir)
      (project-switch-commands, project-switch-project): Fix wording and
      formatting of doc strings.
    • Michael Albinus's avatar
      Fix newly introduced errors in Tramp · 70ac80d7
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-unload-hook):
      Remove `tramp-gvfs-dbus-event-error' from `dbus-event-error-functions'.
      * lisp/net/tramp.el (tramp-autoload-file-name-handler): Revert patch.
    • Andrii Kolomoiets's avatar
      project-switch-to-buffer: Use the "other buffer" as default · 6fe5c21c
      Andrii Kolomoiets authored
      * lisp/progmodes/project.el
      (project-switch-to-buffer): Pass the "other buffer" as DEF to
      read-buffer if it belongs to the current project (bug#41879).
  9. 18 Jun, 2020 5 commits