summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix NOT-CURRENT behaviour in text-property-search-backwardLars Ingebrigtsen2020-07-171-5/+13
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/text-property-search.el (text-property-search-backward): Fix inconsistent behaviour of S-TAB in eww (and other callers that use the NOT-CURRENT behaviour) when there are adjacent elements (bug#39239).
* | ;Fix eldoc regression bug#42365Tassilo Horn2020-07-151-2/+3
| |
* | Consistently stylize eldoc as ElDoc in more proseBasil L. Contovounesios2020-07-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This fixes new occurrences of "Eldoc" since emacs-27. * doc/lispref/modes.texi (Major Mode Conventions): * etc/NEWS: * lisp/descr-text.el (describe-char-eldoc): * lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p) (eldoc-prefer-doc-buffer, eldoc--documentation-strategy-defcustom): Consistently capitalize eldoc as ElDoc rather than Eldoc in documentation and commentary.
* | Fix a typo in eldoc.elJames N. V. Cash2020-07-121-1/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): Fix a typo. (Bug#42310) Copyright-paperwork-exempt: yes
* | Sort out ElDoc backward compatibility of eldoc-documentation-functionJoão Távora2020-07-121-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As explained previously, we can't simply make eldoc-documentation-function an variable alias for eldoc-documentation-strategy, because ElDoc is pre-loaded in Emacs < 28, where it holds at least one buffer-local binding. So if eldoc.el is loaded in those versions, we do the variable alias binding in reverse. We do this using a macro eldoc--documentation-strategy-defcustom to at load time in which direction to make the variable alias. * lisp/emacs-lisp/eldoc.el (eldoc--documentation-strategy-defcustom): Helper macro. (eldoc-documentation-strategy, eldoc-documentation-function): Use it. (Version): Bump to 1.5.0
* | Fix placement of Eldoc docs during eval-expression (bug#42309)João Távora2020-07-101-36/+40
| | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): Rework.
* | Revert "Fix Eldoc problem when loading on Emacs 26.3"João Távora2020-07-101-4/+1
| | | | | | | | | | | | This reverts commit 9ade7ea7b77ec40c16deb4dff139ce7127a703e2. * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.4.0
* | Fix byte compilation warning in EldocJoão Távora2020-07-101-1/+1
| | | | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Pass nil as second argument.
* | Fix Eldoc problem when loading on Emacs 26.3João Távora2020-07-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Unbreak M-x eldocJoão Távora2020-07-091-13/+16
| | | | | | | | | | | | | | | | | | 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
* | Prevent infloop in Eldoc message truncation algorithmJoão Távora2020-07-091-1/+1
| | | | | | | | | | | | | | | | | | 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
* | 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 Eldoc documentation after Eli's reviewJoão Távora2020-07-081-95/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-081-34/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-86/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * 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.
* | 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.
* | Fix byte-compilation warning in project.elEli Zaretskii2020-06-261-0/+1
| | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-every-p): Autoload it. This fixes byte-compilation warning in project.el.
* | Revert last change in benchmark.elBasil L. Contovounesios2020-06-211-1/+1
| | | | | | | | | | | | | | | | For discussion, see the following thread: https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00791.html * lisp/emacs-lisp/benchmark.el (benchmark-run-compiled): Revert to giving byte-compile a form rather than a closure.
* | Evaluate some unnecessarily quoted lambdasBasil L. Contovounesios2020-06-212-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/complete.el (semantic-displayer-tooltip-max-tags): * lisp/emacs-lisp/benchmark.el (benchmark-run-compiled): * lisp/emacs-lisp/package.el (package--default-summary) (package-menu-filter-by-version): * 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-before) (autoinsert-tests-define-auto-insert-after): Remove some unnecessary quoting around anonymous functions.
* | Various battery.el improvements (bug#41808)Basil L. Contovounesios2020-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/battery.el: Mention BSD support in Commentary. Don't load preloaded lisp/emacs-lisp/timer.el. (battery--files): New function. (battery--find-linux-sysfs-batteries): Use it and make fewer syscalls. (battery-status-function): Perform GNU/Linux checks in increasing order of obsolescence: sysfs, ACPI, and then APM. Simplify Darwin check. Add :version tag now that battery-upower is the default. (battery-echo-area-format, battery-mode-line-format): Mention %s. (battery-load-low, battery-load-critical): New faces. (battery-update): Display battery-mode-line-format even if percentage is N/A. Apply faces battery-load-low or battery-load-critical according to the percentage, but append them so they don't override user customizations. Update all mode lines since we are in global-mode-string. (battery-linux-proc-apm-regexp): Mark as obsolete, replacing with... (battery--linux-proc-apm): ...this new rx definition. (battery-linux-proc-apm): Use it. Fix indentation. Simplify. (battery--acpi-rate, battery--acpi-capacity): New rx definitions. (battery-linux-proc-acpi): Use them. Fix pathological whitespace regexps. Simplify. (battery-linux-sysfs): Fix docstring and indentation. Reduce number of file searches. Simplify. (battery-bsd-apm): Fix docstring. Simplify. (battery-pmset): Fix docstring. Simplify ID regexp. * lisp/emacs-lisp/rx.el (rx-define): Indent as a defun. * test/lisp/battery-tests.el (battery-linux-proc-apm-regexp): Test new battery--linux-proc-apm rx definition. (battery-acpi-rate-regexp, battery-acpi-capacity-regexp): New tests.
* | Band-aid for edebugging generator bodies (Bug#40434).Philipp Stephani2020-06-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Edebug doesn't support them well. Rather than trying to fix Edebug, disable instrumentation for now to prevent annoying bugs. * lisp/emacs-lisp/generator.el (iter-defun, iter-lambda, iter-make) (iter-do): Don't attempt to instrument bodies that are mangled by the CPS transformer. * test/lisp/emacs-lisp/generator-tests.el (generator-tests-edebug): New regression test.
* | Ensure that getters and setters can be edebugged at the same time.Philipp Stephani2020-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's necessary to add a name suffix to setters defined with 'gv-define-setter' so that Edebug can distinguish between the getter and the setter (Bug#41853). * lisp/emacs-lisp/gv.el (gv-define-setter): Add a name suffix to setter definitions. * test/lisp/emacs-lisp/gv-tests.el (gv-setter-edebug): New regression test.
* | Slightly improve commit 73be4d1ed5b190bd93e9bad6aebe43d0dea0d7d3.Philipp Stephani2020-06-101-4/+4
| | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1) (cl-macro-list, cl-macro-list1): Use exactly the same specification as for &optional (sans the third optional list element).
* | Allow destructuring in &aux sections when using edebug (Bug#40431)Philipp Stephani2020-06-101-4/+4
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1) (cl-macro-list, cl-macro-list1): Allow arbitrary 'cl-lambda' arguments in the &aux section. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-aux-edebug): New regression test.
* | * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add `make-byte-code'.Andrea Corallo2020-06-071-2/+2
| | | | | | | | | | | | `make-byte-code' wraps `vector' doing some sanity check on the input arguments. `vector' is in side-effect-and-error-free-fns so add `make-byte-code' to side-effect-free-fns.
* | Merge from origin/emacs-27Glenn Morris2020-06-071-2/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 35661ef943 (origin/emacs-27) Fix typo in "(elisp) Type Keywords" 1af0e95fec Gnus nnir-summary-line-format has no effect dd366b5d3b Improve documentation of 'window-text-pixel-size' fbd49f969e * src/xdisp.c (Fwindow_text_pixel_size): Doc fix. (Bug#41... d8593fd19f Minor improvements to EDE and EIEIO manuals 3916e63f9e Have Fido mode also imitate Ido mode in ignore-case options cc35b197c7 Update package-menu-quick-help bf09106256 Improve documentation of 'sort-subr' 73749efa13 Update Ukrainian transliteration 30a7ee505a Fix Arabic shaping when eww/shr fill the text to be rendered 7d323f07c0 Silence some byte-compiler warnings in tests cf473e742f * test/lisp/battery-tests.el: New file. b07e3b1d97 Improve format-spec documentation (bug#41571) # Conflicts: # test/lisp/emacs-lisp/package-tests.el
| * Update package-menu-quick-helpBasil L. Contovounesios2020-06-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package--quick-help-keys): Filtering is now bound to the prefix '/', not the key 'f' (bug#41721). Advertise only the standard 'g' binding now that both it and 'r' are bound to revert-buffer (bug#35504). (package--prettify-quick-help-key): Avoid modifying string literals. (package-menu-filter): Reintroduce as obsolete alias of package-menu-filter-by-keyword for backward compatibility (bug#36981).
* | Un-deprecate oset and oset-defaultBasil L. Contovounesios2020-06-062-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For discussion see the following threads: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00630.html https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00674.html https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00099.html * lisp/emacs-lisp/eieio.el (oset, oset-default): Un-deprecate. * lisp/emacs-lisp/eieio-core.el (eieio-oref): Declare gv-setter here instead of in lisp/emacs-lisp/eieio.el. Suggested by Stefan Monnier <monnier@iro.umontreal.ca>. (eieio-oref-default): Add gv-setter declaration. * etc/NEWS: Announce these changes. * doc/misc/eieio.texi (Accessing Slots): Document oref and oref-default as generalized variables. Consistently document getters before setters. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Use lexical-binding. (eieio-test-13-init-methods): Simplify. (eieio-test-33-instance-tracker): Declare IT-list as special.
* | Merge from origin/emacs-27Paul Eggert2020-06-011-3/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 44c0e074f7 * doc/emacs/buffers.texi (Icomplete): Mention icomplete-mi... 68b6dad1d8 Be more aggressive in marking objects during GC 36f508f589 ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo. cc340da1fe Fix bug #41618 "(byte-compile 'foo) errors when foo is a m... 41232e6797 Avoid crashes due to bidi cache being reset during redisplay f72bb4ce36 * lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize ... d3e0023aaa ; * etc/TODO: Fix formatting. (Bug#41497) a8ad94cd2f Fix mingw.org's MinGW GCC 9 warning about 'execve' # Conflicts: # lisp/tab-bar.el # nt/inc/ms-w32.h # src/alloc.c
| * Fix bug #41618 "(byte-compile 'foo) errors when foo is a macro."Alan Mackenzie2020-05-311-3/+4
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile): Disentangle the eval of the final form from the pushing of 'macro onto it, doing the former first.
* | * lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indentStefan Monnier2020-05-292-8/+16
| | | | | | | | Use the new "space after paren" convention to get the desired indentation
* | * lisp/emacs-lisp/lisp-mode.el: Add new indentation conventionakater2020-05-291-2/+6
| | | | | | | | | | | | (calculate-lisp-indent): To distinguish code and data when indenting, introduce the convention that a space between an open paren and a symbol indicate that this should be indented as a simple data list.
* | Let user adjust the column widths of the package menu.Chris McMahan2020-05-231-4/+24
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-name-column-width) (package-version-column-width, package-status-column-width) (package-archive-column-width): New defcustoms. (package-menu-mode): Use the values of defcustoms instead of hardcoded values. (Bug#41086)
* | Allow back-references in syntax-propertize-rules.Tassilo Horn2020-05-191-10/+25
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/syntax.el (syntax-propertize--shift-groups-and-backrefs): Renamed from syntax-propertize--shift-groups, and also shift back-references. (syntax-propertize-rules): Adapt docstring and use renamed function. * test/lisp/emacs-lisp/syntax-tests.el: New test. (syntax-propertize--shift-groups-and-backrefs): New ERT test.
* | Don’t attempt to modify constant consesPaul Eggert2020-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From a patch privately suggested by Mattias Engdegård on 2020-05-11 in a followup to Bug#40671. * admin/charsets/cp51932.awk: * admin/charsets/eucjp-ms.awk: Generate code that does not modify constant conses. * doc/misc/emacs-mime.texi (Encoding Customization): * lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops): * lisp/frameset.el (frameset-persistent-filter-alist): * lisp/gnus/gnus-sum.el (gnus-article-mode-line-format-alist): Use append instead of nconc. * lisp/language/japanese.el (japanese-ucs-cp932-to-jis-map) (jisx0213-to-unicode): Use mapcar instead of mapc. * lisp/language/lao-util.el (lao-transcription-consonant-alist) (lao-transcription-vowel-alist): * lisp/language/tibetan.el (tibetan-subjoined-transcription-alist): Use copy-sequence. * test/src/fns-tests.el (fns-tests-nreverse): (fns-tests-sort, fns-tests-collate-sort) (fns-tests-string-version-lessp, fns-tests-mapcan): Use copy-sequence, vector, and list.
* | Turn Eldoc, Xref and Project into GNU ELPA :core packagesJoão Távora2020-05-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new packages state they require Emacs 26.3 to function, but a small part of project.el breaks this "soft" rule: the two functions requiring fileloop.el are incompatible with Emacs 26.3. * lisp/jsonrpc.el: Tweak comment near Package-Requires. * lisp/emacs-lisp/eldoc.el: Add Version and Package-Requires. * lisp/progmodes/flymake.el: Add comment near Package-Requires. * lisp/progmodes/project.el: Add Version and Package-Requires. * lisp/progmodes/xref.el: Add Version and Package-Requires.
* | * lisp/emacs-lisp/syntax.el: Fix bug#41195Stefan Monnier2020-05-121-6/+18
| | | | | | | | | | | | | | | | Allow use of `syntax-ppss-flush-cache` in `syntax-propertize-function`. (syntax-propertize--inhibit-flush): New var. (syntax-propertize): Bind it. (syntax-ppss-flush-cache): Test it.
* | Revert "Inhibit modification hooks when saving eieio-persistent's"Michael Heerdegen2020-05-121-2/+1
| | | | | | | | This reverts commit c59e878439833d89998e03134ee9060f9c449fd9.
* | Support sorting timer-list-mode by column (Bug#40854)Stefan Kangas2020-05-121-4/+31
| | | | | | | | | | | | | | * lisp/emacs-lisp/timer-list.el (timer-list-mode) (timer-list--idle-predicate, timer-list--next-predicate) (timer-list--repeat-predicate) (timer-list--function-predicate): Add support for sorting by column.
* | Base timer-list-mode on tabulated-list-mode (Bug#40854)Stefan Kangas2020-05-121-56/+49
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/timer-list.el (list-timers) (timer-list-mode): Inherit from 'tabulated-list-mode' instead of 'special-mode' and make the necessary changes to support that. * doc/lispref/os.texi (Timers): Update documentation.
* | Fix bug #40992 whilst still allowing breakpoint highlights in edebugAlan Mackenzie2020-05-111-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strategy: when an instrumented function gets re-evaluated, save the former value of its symbol's `edebug' property in the new propery `ghost-edebug'. If this function is still being edebugged, edebug will then access its info from this new property. Also fix the bug whereby compile-defun'ing an instrumented function prevents the function being re-instrumented by I (edebug-instrument-callee). * lisp/emacs-lisp/edebug.el (edebug-get-edebug-or-ghost): New function. (edebug-read-and-maybe-wrap-form1): save value of `edebug' property in 'ghost-edebug'. (edebug-make-form-wrapper): Set value of `ghost-edebug' to nil. (edebug-make-form-wrapper, edebug-find-stop-point, edebug-next-break-point) (edebug-modify-breakpoint, edebug--overlay-breakpoints, edebug-set-breakpoint) (edebug-unset-breakpoints, edebug-toggle-disable-breakpoint) (edebug--backtrace-goto-source, edebug-display-freq-count) (edebug-set-conditional-breakpoint): Use edebug-get-edebug-or-ghost to access edebug information. (edebug-instrument-function): Also check a function is a cons before declaring it "already instrumented".
* | * lisp/emacs-lisp/pcase.el (pcase--fgrep): Look inside vectorsStefan Monnier2020-05-111-4/+9
| |
* | * lisp/emacs-lisp/syntax.el (syntax-propertize): Use run-hook-wrappedStefan Monnier2020-05-111-17/+21
| | | | | | | | | | This way we avoid making assumptions about the content of syntax-propertize-extend-region-functions