summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Have Python mode cooperate asynchronously with Eldocscratch/python-eldoc-asyncJoão Távora2020-07-081-69/+119
| | | | | | | | | | | | | | | | | When combined with Flymake mode, which also adds a value to eldoc-documentation-functions, Python-mode users can now experiment with different eldoc-documentation-strategy values. Also, this shoulda allow us to write automatic tests for this particular Eldoc functionality. * lisp/progmodes/python.el (inferior-python-mode): Set coming-preoutput-filter-functions. (python--shell-output-filter-in-progress) (python--shell-output-filter-buffer): Rename from python- variant. (python-shell-output-filter): Rework to support async operation. (python-eldoc--get-doc-at-point): Rework to support async. (python-eldoc-function): Use callback.
* ; * etc/NEWS (Eldoc): adjust NEWS entry.João Távora2020-07-081-2/+2
|
* Shoosh warnings about obsolete eldoc-documentation-functionJoão Távora2020-07-082-17/+12
| | | | | | | * lisp/progmodes/cfengine.el (cfengine3-mode): Remove mention to obsolete eldoc-documentation-function. * lisp/progmodes/python.el (python-mode): Use with-no-warnings.
* ; * etc/NEWS: Fix last change.Eli Zaretskii2020-07-081-1/+1
|
* ; * etc/NEWS: Minor copyedits of the recent additions.Eli Zaretskii2020-07-081-9/+10
|
* Special-case symbol and fixnum keys in member, assoc and rassocMattias Engdegård2020-07-081-0/+14
| | | | | | * 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.
* Improve Eldoc docstringsJoão Távora2020-07-081-31/+87
| | | | | | | | | * 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.
* Change version scheme of two Eldoc obsolete specsJoão Távora2020-07-081-2/+2
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function) (eldoc-message): Obsolete spec uses eldoc-1.1.0.
* Adjust describe-char-eldoc to new eldoc-documentation-functions protocolJoão Távora2020-07-081-2/+7
| | | | | * lisp/descr-text.el (describe-char-eldoc): Adjust to new eldoc-documentation-functions protocol.
* Adjust Eldoc documentation after Eli's reviewJoão Távora2020-07-082-101/+120
| | | | | | | | | | | | | | * 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.
* Make more parts of Emacs use new Eldoc capabilitiesJoão Távora2020-07-087-78/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.1.0João Távora2020-07-081-1/+1
|
* New M-x eldoc for on-demand and interactive documentation requestsJoão Távora2020-07-081-0/+3
| | | | | | | | | 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.
* Better handle asynchronous Eldoc sourcesJoão Távora2020-07-089-103/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Optimise assoc and rassoc with symbol key to assq and rassqMattias Engdegård2020-07-071-0/+11
| | | | | | | This is the same transformation made for member to memq. * lisp/emacs-lisp/byte-opt.el (byte-optimize-assoc): New function. (assoc, rassoc): Set the byte-optimizer property.
* Merge from origin/emacs-27Glenn Morris2020-07-074-15/+35
|\ | | | | | | | | | | | | 71fc003860 (origin/emacs-27) Avoid infloop in 'format-mode-line' 247dcb4b1b Clarify the documentation of 'left/right-fringe' display spec d453cee177 Minor improvement in ELisp manual 3c778c443c * doc/misc/tramp.texi (Customizing Methods): Fix typo.
| * Avoid infloop in 'format-mode-line'Eli Zaretskii2020-07-071-0/+16
| | | | | | | | | | * src/xdisp.c (decode_mode_spec): Don't use W->start if it is outside of the buffer's accessible region. (Bug#42220)
| * Clarify the documentation of 'left/right-fringe' display specEli Zaretskii2020-07-051-5/+7
| | | | | | | | | | | | | | * 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 <ghe@sdf.org>.
| * Minor improvement in ELisp manualEli Zaretskii2020-07-041-6/+7
| | | | | | | | | | * doc/lispref/frames.texi (Position Parameters): Clarify the description of the 'above' frame parameter. (Bug#42154)
| * * doc/misc/tramp.texi (Customizing Methods): Fix typo.Michael Albinus2020-07-021-4/+5
| |
* | ; Merge from origin/emacs-27Glenn Morris2020-07-070-0/+0
|\ \ | |/ | | | | | | | | The following commit was skipped: 2aa4be89cd (emacs-27) ; Auto-commit of loaddefs files.
| * ; Auto-commit of loaddefs files.Glenn Morris2020-07-011-0/+4
| |
* | Merge from origin/emacs-27Glenn Morris2020-07-076-9/+30
|\ \ | |/ | | | | | | | | | | | | 59e768d64a Fix undefined behavior in json.c (Bug#42113) cce00bef03 Fix ACTION argument of 'display-buffer' call in gud.el 0121db2702 * src/keyboard.c (Fclear_this_command_keys): Doc fix. b9abf5ceb2 Improve do string of 'man' b87fc938a0 ; * src/xdisp.c (pos_visible_p): Yet another minor fix for...
| * Fix undefined behavior in json.c (Bug#42113)Philipp Stephani2020-06-292-0/+14
| | | | | | | | | | | | | | | | * src/json.c (lisp_to_json_toplevel_1, Fjson_parse_string): Check whether input strings are actually strings. * test/src/json-tests.el (json-parse-string/wrong-type) (json-serialize/wrong-hash-key-type): New regression tests.
| * Fix ACTION argument of 'display-buffer' call in gud.elRichard Kim2020-06-281-3/+3
| | | | | | | | | | * lisp/progmodes/gud.el (gud-common-init): The ACTION argument of 'display-buffer' should be a list of list of functions. (Bug#41888)
| * * src/keyboard.c (Fclear_this_command_keys): Doc fix.Eli Zaretskii2020-06-271-1/+1
| |
| * Improve do string of 'man'Eli Zaretskii2020-06-271-1/+5
| | | | | | | | | | * lisp/man.el (man): Mention the need to use C-q for quoting the SPC character in the man-page input. (Bug#41859)
| * ; * src/xdisp.c (pos_visible_p): Yet another minor fix for bug#42039.Eli Zaretskii2020-06-261-4/+7
| |
* | * lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add `keyword`Stefan Monnier2020-07-061-10/+16
| |
* | Simplify byte-code optimisation of pure functionsMattias Engdegård2020-07-061-43/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Mark more functions pure (bug#42147)Mattias Engdegård2020-07-061-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | ; Revert "; Add a note about a bottleneck"Dmitry Gutov2020-07-061-2/+0
| | | | | | | | | | | | | | This reverts commit 9f9ce631a2ff44ebcb87b0b1390a21b13665db43. 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.
* | ; Add a note about a bottleneckDmitry Gutov2020-07-061-0/+2
| |
* | * lisp/progmodes/project.el: Bump the version.Dmitry Gutov2020-07-061-1/+1
| |
* | ; Add a couple of FIXMEsDmitry Gutov2020-07-061-1/+4
| |
* | project-switch-to-buffer: Don't filter based on default-directoryDmitry Gutov2020-07-061-13/+11
| | | | | | | | | | | | | | * lisp/progmodes/project.el (project-switch-to-buffer): Don't filter based on default-directory (https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00075.html). (project-switch-to-buffer): Ditto.
* | Verilog-Mode collected updates.Wilson Snyder2020-07-051-36/+76
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Don't confuse errors with nil in bytecomp-tests.elMattias Engdegård2020-07-051-10/+10
| | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-check-1) (bytecomp-explain-1, test-byte-opt-arithmetic, bytecomp-lexbind-check-1) (bytecomp-lexbind-explain-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.
* | Relax portable number check in byte compiler (bug#42147)Mattias Engdegård2020-07-051-30/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove long obsolete c-looking-at-bos. Make c-at-expression-start-p obsoleteAlan Mackenzie2020-07-041-11/+1
| | | | | | | | | | * lisp/progmodes/cc-engine.el (c-looking-at-bos): Remove. (c-at-expression-start-p): Make obsolete, with no alternative function.
* | Fix filling in js-mode and mhtml-mode (js-mode parts), fixing bug #41897Alan Mackenzie2020-07-042-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/js.el (js-mode): Use "\\(?:" in the value of comment-start-skip rather than "\\(", fixing the second half of bug #41952. Call c-foreign-init-lit-pos-cache and install c-foreign-truncate-lit-pos-cache on before-change-functions, to connect up correctly with CC Mode's filling mechanism. * lisp/textmodes/mhtml-mode.el (mhtml--crucial-variable-prefix): Add prefixes "adaptive-fill-", "fill-", "normal-auto-fill-function" and "paragraph-" to pull in variables crucial to filling. (mhtml-syntax-propertize): Read the current submode from the piece of text being propertized rather than one character before it, and do so before erasing the submode text-property. (mhtml-mode): Set the js-mode value of auto-fill-function to js-do-auto-fill. Correctly initialize and use CC Mode's filling facilities, as above.
* | CC Mode: Fix wrong value of comment-start-skip, fixing half of bug #41952Alan Mackenzie2020-07-042-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | Also add functions to enable correct use of CC Mode's filling functionality from major modes which don't initialize CC Mode fully. These modes are currently js-mode and mhtml-mode. * lisp/progmodes/cc-langs.el (comment-start-skip): Replace "\\(" by "\\(?:" so that (match-end 1) isn't falsely taken to be the start of the comment. * lisp/progmodes/cc-engine.el (c-foreign-truncate-lit-pos-cache) (c-foreign-init-lit-pos-cache): New functions.
* | Use 'emacs-lisp-mode-syntax-table' for reading Lisp expressionsDaniel Koning2020-07-041-2/+5
| | | | | | | | | | | | | | | | * lisp/simple.el (read--expression): Set syntax table to 'emacs-lisp-mode-syntax-table' when reading a Lisp expression from the minibuffer. (Bug#41781) Copyright-paperwork-exempt: yes
* | * lisp/progmodes/cc-mode.el (c-or-c++-mode--regexp): Change WS to [ \t] in itAlan Mackenzie2020-07-021-1/+1
| |
* | Remove Emacs-27 referencePhillip Lord2020-07-021-2/+2
| | | | | | | | * admin/nt/dist-build/README-windows-binaries:
* | Revert feature added in bfd96e995d using project directories in vc (bug#41821)Juri Linkov2020-07-024-14/+3
| |
* | ; * etc/NEWS: Announce dropping of support for OpenBSD 5.3.Eli Zaretskii2020-07-011-0/+5
| |
* | Support pty's on OpenBSDYASUOKA Masahiko2020-07-011-2/+2
| | | | | | | | | | | | | | * configure.ac (PTY_TTY_NAME_SPRINTF): OpenBSD has posix_openpt nowadays. (Bug#42059) Copyright-paperwork-exempt: yes
* | ; Auto-commit of loaddefs files.Glenn Morris2020-07-011-16/+111
| |
* | Bind 'C-x 4 1' to 'same-window-prefix' and document new commands (bug#41691)Juri Linkov2020-07-014-0/+37
| | | | | | | | | | | | | | | | * lisp/window.el (ctl-x-4-map): Bind 'C-x 4 1' to 'same-window-prefix'. * doc/emacs/windows.texi (Pop Up Window): Add 'C-x 4 4' and 'C-x 4 1'. * doc/emacs/frames.texi (Creating Frames): Add 'C-x 5 5'. (Tab Bars): Add 'C-x t t'.