1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00
Commit Graph

3948 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
004d7e97e2 Add a new command `memory-report'
* doc/lispref/internals.texi (Garbage Collection): Document it.
* lisp/emacs-lisp/memory-report.el: New package.
2020-12-11 14:49:53 +01:00
Lars Ingebrigtsen
aa7e5ce651 Add new function `object-intervals'
* doc/lispref/text.texi (Examining Properties): Document it.
* src/fns.c (Fobject_intervals): New defun.
(collect_interval): New function.
2020-12-11 14:40:20 +01:00
Mattias Engdegård
6596b5541d Fupcase no longer maps ?ß to itself (bug#11309)
* test/src/casefiddle-tests.el (casefiddle-tests-char-casing):
(upcase ?ß) now returns ?ẞ (U+7838), partly for technical reasons but
the previous behaviour was arbitrary and arguably less useful.
Correct upcasing of ß is normally SS, which is what Fupcase returns if
given a string, or (for special purposes) ẞ.
2020-12-10 11:02:27 +01:00
Juri Linkov
303f0a19cc Support highlighting of ripgrep output (bug#44983)
* etc/grep.txt: Add ripgrep samples.

* lisp/progmodes/grep.el (grep-match-regexp): Highlight ripgrep matches too.
(grep-regexp-alist): Remove $ to highlight ripgrep binary file matches.
2020-12-09 21:16:03 +02:00
Mattias Engdegård
beebd2a85e Recognise ß properly as a lower-case letter (bug#11309)
ß was incorrectly treated as a caseless character and thus not matched
by the regexp [[:lower:]] (or, in case-folding mode, [[:upper:]]).
The reason is that the upcase table maps it to itself, which can be
remedied by mapping it to ẞ (U+7838) instead.  Doing so does not
affect upcasing since the special-uppercase property maps it to SS.

* lisp/international/characters.el (tbl): Map ß to ẞ in the upcase
table.
* test/src/regex-emacs-tests.el (regexp-eszett): Uncomment previously
failing tests.  Add checks to make sure that case transformations
remain valid.
2020-12-09 15:29:48 +01:00
Michael Albinus
2782d1e1a1 Improve tests for gio file notifications
* .gitlab-ci.yml (test-filenotify-gio): Call "make -k".

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
Set connection property "gio-file-monitor".

* lisp/net/tramp-sh.el (tramp-get-remote-gio-file-monitor): New defun.
(tramp-sh-handle-file-notify-add-watch): Use it.

* test/lisp/filenotify-tests.el (file-notify--test-read-event): Simplify.
(file-notify--test-monitor): Handle also remote "gio monitor".
(file-notify-test03-events, file-notify-test04-autorevert)
(file-notify-test05-file-validity, file-notify-test08-backup)
(file-notify-test09-watched-file-in-watched-dir):
Handle GKqueueFileMonitor.
2020-12-09 14:49:58 +01:00
Mattias Engdegård
be4d6b043f Fix [:upper:] and [:lower:] for Unicode characters (bug#11309)
* src/regex-emacs.c (execute_charset): Add canon_table argument to
allow expression of a correct predicate for [:upper:] and [:lower:].
(mutually_exclusive_p, re_match_2_internal): Pass extra argument.
* test/src/regex-emacs-tests.el (regexp-case-fold, regexp-eszett):
New tests.  Parts of regexp-eszett still fail and are commented out.
2020-12-09 10:35:13 +01:00
Basil L. Contovounesios
2581beba65 Make abbrev-tests.el more deterministic
* test/lisp/abbrev-tests.el (abbrev--table-symbols-test): Don't rely
on order of symbols in obarray.
2020-12-09 00:54:34 +00:00
Lars Ingebrigtsen
1fb099ceb0 Make rcirc nick renaming heed nickname max lengths
* lisp/net/rcirc.el (rcirc-server-parameters): New variable (bug#6795).
(rcirc-connect): Set it.
(rcirc-handler-433): Use the length from the server.
(rcirc-handler-005): Collect server data.
(rcirc-server-parameter-value): New utility function.
(rcirc--make-new-nick): New function.
2020-12-08 18:22:47 +01:00
Stefan Kangas
3b20c03316 Prefer setq-local in tests
* test/lisp/allout-tests.el (allout-test-resumption-prior-value-resumed)
(allout-test-resumption-multiple-holds)
(allout-test-resumption-unbinding):
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el
(faceup-test-mode):
* test/lisp/epg-tests.el (with-epg-tests):
* test/src/data-tests.el (binding-test-buffer-A): Prefer setq-local.
2020-12-08 08:57:22 +01:00
Philipp Stephani
0155bd0fdb Fix bug in how ERT invokes its debugger.
The debugger needs to receive a list of the error symbol and data;
cf. the documentation of the `debugger' variable.  This bug manifested
itself in ERT forms such as (should (integerp (ert-fail "Boo"))),
which resulted in an incorrect condition object.  Note that forms such
as (should (ert-fail "Boo")) weren't affected because they wouldn't
use the `ert--should-signal-hook'.

* test/emacs-lisp/ert.el (ert--should-signal-hook): Call debugger with
the right arguments.

* test/lisp/emacs-lisp/ert-tests.el (ert-test-fail-inside-should): Add
unit test.
2020-12-07 21:41:40 +01:00
Philipp Stephani
2d989e81b7 Unbreak a few unit tests that rely on lack of backtraces
* test/lisp/emacs-lisp/gv-tests.el (gv-dont-define-expander-in-file)
(gv-dont-define-expander-other-file):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-default-config):
Suppress backtraces in batch mode to unbreak unit tests.
2020-12-07 11:59:06 +01:00
Philipp Stephani
3970f4ac40 Add new variable to selectively suppress backtraces in batch mode.
* src/eval.c (syms_of_eval): Define new variable
'backtrace-on-error-noninteractive' to selectively enable backtrace
printing in batch mode.
(signal_or_quit): Use it.

* etc/NEWS: Document new variable.

* test/src/eval-tests.el (eval-tests/backtrace-in-batch-mode/inhibit):
New unit test.
2020-12-07 11:59:06 +01:00
Philipp Stephani
40e11743ca Print a backtrace on unhandled errors in batch mode (Bug#44942).
* src/eval.c (signal_or_quit): Print a backtrace in batch mode if no
error handler was found.

* test/src/eval-tests.el (eval-tests/backtrace-in-batch-mode)
(eval-tests/backtrace-in-batch-mode/demoted-errors): New unit tests.

* etc/NEWS: Document change.
2020-12-06 17:47:52 +01:00
Stefan Monnier
fc54c83518 * lisp/progmodes/perl-mode.el: Fix handling of s'foo'bar'
(perl-syntax-propertize-function): Don't put a syntax-property
on regexp-op delimiters if they're already handled correctly
by the normal syntax tables.
(perl-syntax-propertize-special-constructs): Mark the middle
quote of s'foo'bar' as punctuation.

* test/manual/indent/perl.perl: Add new test cases.
2020-12-05 10:41:20 -05:00
Mattias Engdegård
7bdc40e8d1 Speed up match-substitute-replacement
* lisp/subr.el (match-substitute-replacement): Use match-data--translate.
* src/search.c (Fmatch_data__translate): Remove string restriction.
* test/lisp/subr-tests.el (subr-match-substitute-replacement): New test.
2020-12-04 18:39:13 +01:00
Stefan Kangas
55300e6cdc Add tests for several byte-compiler warnings
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp/warn-autoload-not-on-top-level\.el)
(bytecomp/warn-callargs\.el)
(bytecomp/warn-defcustom-nogroup\.el)
(bytecomp/warn-defcustom-notype\.el)
(bytecomp/warn-defvar-lacks-prefix\.el)
(bytecomp/warn-format\.el)
(bytecomp/warn-lambda-malformed-interactive-spec\.el)
(bytecomp/warn-make-variable-buffer-local\.el)
(bytecomp/warn-redefine-defun-as-macro\.el)
(bytecomp/warn-redefine-defun\.el)
(bytecomp/warn-redefine-macro-as-defun\.el)
(bytecomp/warn-save-excursion\.el)
(bytecomp/warn-variable-let-bind-constant\.el)
(bytecomp/warn-variable-let-bind-nonvariable\.el)
(bytecomp/warn-variable-set-constant\.el)
(bytecomp/warn-variable-set-nonvariable\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-autoload-not-on-top-level.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-callargs.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-defcustom-nogroup.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-defcustom-notype.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-defvar-lacks-prefix.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-format.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-lambda-malformed-interactive-spec.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-make-variable-buffer-local.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-redefine-defun-as-macro.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-redefine-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-redefine-macro-as-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-save-excursion.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-nonvariable.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-constant.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el:
* test/lisp/emacs-lisp/bytecomp-tests.el: New files.
2020-12-03 17:08:28 +01:00
Michael Albinus
62fa6d19b3 Fix auto-revert-test07-auto-revert-several-buffers
* test/lisp/autorevert-tests.el
(auto-revert-test07-auto-revert-several-buffers): Adapt times values.
2020-12-03 15:58:40 +01:00
Stefan Kangas
cf90856946 Remove redundant requires of 'font-core'
* lisp/ibuffer.el:
* test/lisp/erc/erc-track-tests.el: Don't require 'font-core'; it is
preloaded since version 22.1.
2020-12-03 08:51:15 +01:00
Stefan Kangas
1b2547de23 Remove redundant requires of faces
* lisp/htmlfontify.el:
* lisp/term/ns-win.el:
* lisp/term/w32-win.el:
* lisp/term/x-win.el:
* test/lisp/faces-tests.el: Don't require 'faces'; it is preloaded
since version 19.34.
2020-12-02 18:21:44 +01:00
Michael Albinus
9f462496ae Add test to autorevert-tests.el
* test/lisp/autorevert-tests.el (auto-revert--wait-for-revert):
Handle `auto-revert--messages' being nil.
(auto-revert-test07-auto-revert-several-buffers): New test.
2020-12-02 16:09:20 +01:00
Stefan Kangas
17d9d90ec2 Improve sectioning in bytecomp-tests.el
* test/lisp/emacs-lisp/bytecomp-tests.el: Add section comments.
(test-eager-load-macro-expansion)
(test-eager-load-macro-expansion-eval-and-compile): Move definitions.
2020-12-02 13:11:07 +01:00
Lars Ingebrigtsen
4bb554cf24 Add tests for xsd-regexp 2020-12-02 12:26:04 +01:00
Stefan Kangas
ace6eba036 Fix byte-compiler warning for failed uses of lexical vars
* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Fix byte-compiler
warning for failed uses of lexical vars.  (Bug#44980)
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--define-warning-file-test): Don't prefix tests with
'warn'.
(bytecomp/error-lexical-var-with-add-hook\.el)
(bytecomp/error-lexical-var-with-remove-hook\.el)
(bytecomp/error-lexical-var-with-run-hook-with-args-until-failure\.el)
(bytecomp/error-lexical-var-with-run-hook-with-args-until-success\.el)
(bytecomp/error-lexical-var-with-run-hook-with-args\.el)
(bytecomp/error-lexical-var-with-symbol-value\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-symbol-value.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-failure.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-remove-hook.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-add-hook.el:
New files.
2020-12-01 13:35:03 +01:00
Stefan Kangas
4457b9590c Add tests for some byte-compiler warnings
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-warn/warn-interactive-only\.el)
(bytecomp-warn/warn-obsolete-defun\.el)
(bytecomp-warn/warn-obsolete-hook\.el)
(bytecomp-warn/warn-obsolete-variable-same-file\.el)
(bytecomp-warn/warn-obsolete-variable\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-interactive-only.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-hook.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-same-file.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable.el:
New files.
2020-12-01 04:49:10 +01:00
Stefan Kangas
a126c3684f Test byte-compiler free variable warning
* test/lisp/emacs-lisp/bytecomp-tests.el (ert-x): Require.
(bytecomp--define-warning-file-test): New macro.
(bytecomp-warn/warn-free-setq\.el)
(bytecomp-warn/warn-free-variable-reference\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-free-setq.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-free-variable-reference.el:
New files.
2020-11-30 22:43:37 +01:00
Michael Albinus
31dcc70e55 Some adaptions to tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test-vec): Check for remote
`tramp-test-temporary-file-directory'.
(tramp-test11-copy-file, tramp-test12-rename-file):
Do not skip for tramp-gvfs.el.
(tramp--test-sh-p): Use `tramp-test-vec'.
2020-11-30 13:54:29 +01:00
Philipp Stephani
41c338474d Fix double-free bug when finalizing module runtimes.
* src/emacs-module.c (finalize_runtime_unwind): Don't finalize initial
environment twice.

* test/src/emacs-module-resources/mod-test.c (emacs_module_init):
Allocate lots of values during module initialization to trigger the
bug.
2020-11-29 21:13:02 +01:00
Philipp Stephani
23974cfa48 Fix incorrect handling of module runtime and environment pointers.
We used to store module runtime and environment pointers in the static
lists Vmodule_runtimes and Vmodule_environments.  However, this is
incorrect because these objects have to be kept per-thread.  With this
naive approach, interleaving module function calls in separate threads
leads to environments being removed in the wrong order, which in turn
can cause local module values to be incorrectly garbage-collected.
The fix isn't completely trivial: specbinding the lists wouldn't work
either, because then the garbage collector wouldn't find the
environments in other threads than the current ones, again leading to
objects being garbage-collected incorrectly.  While introducing custom
pseudovector types would fix this, it's simpler to put the runtime and
environment pointers into the specbinding list as new specbinding
kinds.  This works since we need to unwind them anyway, and we only
ever treat the lists as a stack.  The thread switching machinery
ensures that the specbinding lists are thread-local, and that all
elements of the specbinding lists in all threads are marked during
garbage collection.

Module assertions now have to walk the specbinding list for the
current thread, which is more correct since they now only find
environments for the current thread.  As a result, we can now remove
the faulty Vmodule_runtimes and Vmodule_environments variables
entirely.

Also add a unit test that exemplifies the problem.  It interleaves two
module calls in two threads so that the first call ends while the
second one is still active.  Without this change, this test triggers
an assertion failure.

* src/lisp.h (enum specbind_tag): Add new tags for module runtimes and
environments.

* src/eval.c (record_unwind_protect_module): New function to record a
module object in the specpdl list.
(do_one_unbind): Unwind module objects.
(backtrace_eval_unrewind, default_toplevel_binding, lexbound_p)
(Fbacktrace__locals): Deal with new specbinding types.
(mark_specpdl): Mark module environments as needed.

* src/alloc.c (garbage_collect): Remove call to 'mark-modules'.
Garbage collection of module values is now handled as part of marking
the specpdl of each thread.

* src/emacs-module.c (Fmodule_load, funcall_module): Use specpdl to
record module runtimes and environments.
(module_assert_runtime, module_assert_env, value_to_lisp): Walk
through specpdl list instead of list variables.
(mark_module_environment): Rename from 'mark_modules'.  Don't attempt
to walk though current thread's environments only, since that would
miss other threads.
(initialize_environment, finalize_environment): Don't change
Vmodule_environments variable; environments are now in the specpdl
list.
(finalize_environment_unwind, finalize_runtime_unwind): Make 'extern'
since do_one_unbind now calls them.
(finalize_runtime_unwind): Don't change Vmodule_runtimes variable;
runtimes are now in the specpdl list.
(syms_of_module): Remove Vmodule_runtimes and Vmodule_environments.

* test/data/emacs-module/mod-test.c (Fmod_test_funcall): New test
function.
(emacs_module_init): Bind it.

* test/src/emacs-module-tests.el (emacs-module-tests--variable): New
helper type to guard access to state in a thread-safe way.
(emacs-module-tests--wait-for-variable)
(emacs-module-tests--change-variable): New helper functions.
(emacs-module-tests/interleaved-threads): New unit test.
2020-11-27 20:15:33 +01:00
Stefan Monnier
1f633311c1 * lisp/subr.el (activate-change-group): Refine fix for bug#33341 2020-11-27 10:19:21 -05:00
Mattias Engdegård
8ebf041d5f Make the 'cucumber' compilation pattern work without 'omake'
When 'omake' is included in compilation-error-regexp-alist, which it
still is by default, then all other rules are modified to match with
an extra leading 6 spaces as well. The 'cucumber' pattern relied on
this in order to work as intended.

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Extend the 'cucumber' pattern so that it works even when 'omake'
is not included.  Move it below the 'gnu' rule so that it doesn't
match anything else.
2020-11-27 16:17:19 +01:00
Stefan Monnier
66eeaaa488 * lisp/subr.el (activate-change-group): Fix bug#33341 2020-11-27 09:43:56 -05:00
Mattias Engdegård
558b6dbca7 Fix replace-regexp-in-string substring match data translation
For certain patterns, re-matching the same regexp on the matched
substring does not produce correctly translated match data
(bug#15107 and bug#44861).

Using a new builtin function also improves performance since the
number of calls to string-match is halved.

Reported by Kevin Ryde and Shigeru Fukaya.

* lisp/subr.el (replace-regexp-in-string): Translate the match data
using match-data--translate instead of trusting a call to string-match
on the matched string to do the job.
* test/lisp/subr-tests.el (subr-replace-regexp-in-string):
Add test cases.
* src/search.c (Fmatch_data__translate): New internal function.
(syms_of_search): Register it as a subroutine.
2020-11-26 14:20:13 +01:00
Mattias Engdegård
d148d0259a Add tests for replace-regexp-in-string
* test/lisp/subr-tests.el (subr-replace-regexp-in-string): New.
2020-11-25 13:57:16 +01:00
Michael Albinus
20f9645898 * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
Use `tramp--test-windows-nt-p'.
2020-11-25 12:24:08 +01:00
Michael Albinus
e45ad6b08e Merge from origin/emacs-27
6442cdc0e4 Revert extra focus redirection in do_switch_frame (Bug#24803)
fc4379f1ae Minor cleanup of tramp-tests.el on MS Windows
dea3d6aa18 Fix handling of defcustom :local tag
2020-11-25 12:18:23 +01:00
Michael Albinus
fc4379f1ae Minor cleanup of tramp-tests.el on MS Windows
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
Do not test remote pty on MS Windows.
2020-11-25 09:41:11 +01:00
Philipp Stephani
5804ac0b49 Add a (broken) unit test to exemplify Bug#11218.
* test/lisp/emacs-lisp/ert-tests.el
(ert-test-with-demoted-errors): New (broken) unit test.
2020-11-24 18:39:58 +01:00
Basil L. Contovounesios
dea3d6aa18 Fix handling of defcustom :local tag
For discussion, see the following emacs-devel thread:
https://lists.gnu.org/r/emacs-devel/2020-11/msg00734.html

* lisp/custom.el (custom-declare-variable): Delay call to
make-variable-buffer-local until after user option has been
initialized with a value.  Otherwise the user option may be
initialized to nil.
* test/lisp/custom-tests.el (custom--test-local-option)
(custom--test-permanent-option): New :local user options.
(custom-test-local-option): New test for defcustom :local keyword.
2020-11-24 16:50:37 +00:00
Mauro Aranda
cbd24607d7 Fix matching of inline choices for the choice widget
A choice widget should be able to match either no inline values or
inline values, upon request.  (Bug#44579)

* lisp/wid-edit.el (choice): New property, :inline-bubbles-p.  A
predicate that returns non-nil if the choice widget can act as an
inline widget.  Document it.
(widget-choice-inline-bubbles-p): New function, for the
:inline-bubbles-p property of the choice widget.
(widget-inline-p): New function.  Use the :inline-bubbles-p property
of the widget, if any.
(widget-match-inline): Use the above to see if the widget can act like
an inline widget.  Document it.
(widget-choice-value-create): Account for the case of a choice widget
that has inline members.
(widget-checklist-add-item, widget-editable-list-value-create)
(widget-group-value-create): Use widget-inline-p rather than just
checking for a non-nil :inline property, allowing these functions to
pass the complete information to widgets like the choice widget to
create their values.

* test/lisp/wid-edit-tests.el (widget-test-choice-match-no-inline)
(widget-test-choice-match-all-inline)
widget-test-choice-match-some-inline): New tests, to check that choice
widgets can match its choices, inline or not.
(widget-test-inline-p): New test, for the new function
widget-inline-p.
(widget-test-repeat-can-handle-choice)
(widget-test-repeat-can-handle-inlinable-choice)
(widget-test-list-can-handle-choice)
(widget-test-list-can-handle-inlinable-choice)
(widget-test-option-can-handle-choice)
(widget-test-option-can-handle-inlinable-choice): New tests.  This
grouping widgets need to be able to create a choice widget regardless
if it has inline choices or not.
2020-11-24 08:31:18 -03:00
Michael Albinus
e2acb8fef4 Adapt files-x-tests.el according to recent Tramp changes
* test/lisp/files-x-tests.el (tramp-connection-local-default-profile):
Don't declare.
(tramp-connection-local-default-shell-variables)
(tramp-connection-local-default-system-variables): Declare.
(files-x-test-with-connection-local-variables): Use them.
2020-11-23 19:54:09 +01:00
Stefan Kangas
9490f12c4d Test for byte-compiler warning "variable lacks prefix"
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--with-warning-test): New macro.
(bytecomp-warn-wrong-args, bytecomp-warn-wrong-args-subr):
Use above new macro.
(bytecomp-warn-variable-lacks-prefix): New test.
2020-11-22 07:19:11 +01:00
Stefan Kangas
b6339fc19c Test interactive-only spec of with-suppressed-warnings
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Test suppressing warning
with interactive-only.
2020-11-22 03:24:26 +01:00
Stefan Kangas
fb9326b45c Say which command shadows a key binding
* src/keymap.c (describe_vector): Say which command shadows this
binding.  (Bug#9293)
* test/src/keymap-tests.el
(help--describe-vector/bug-9293-one-shadowed-in-range): Adapt
test.
2020-11-22 02:48:53 +01:00
Stefan Kangas
84dd5c9bea Don't shadow bindings by the same command
* src/keymap.c (describe_vector): Do not say binding is shadowed if
the other key binding points to the same command.  (Bug#9293)
* test/src/keymap-tests.el
(help--describe-vector/bug-9293-same-command-does-not-shadow): New
test.
2020-11-22 02:45:03 +01:00
Stefan Kangas
a649034336 Don't show key ranges if shadowed by different commands
* src/keymap.c (describe_vector): Make sure found consecutive keys
are either not shadowed or, if they are, that they are shadowed by
the same command.  (Bug#9293)
* test/src/keymap-tests.el
(help--describe-vector/bug-9293-one-shadowed-in-range): New test.
2020-11-22 02:45:03 +01:00
Mauro Aranda
abd15e088e Use cl-letf instead of unwind-protect in a test
* test/lisp/cus-edit-tests.el (cus-edit-tests-customize-saved/show-obsolete):
Good use case for cl-letf, so use it.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca> in:
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00914.html
2020-11-20 19:28:03 -03:00
Stefan Monnier
ac98bcc906 * test/manual/indent/tcl.tcl: Add string interpolation case 2020-11-20 16:54:06 -05:00
Mauro Aranda
6924320aeb Take care of a FIXME in cus-edit-tests.el
* test/lisp/cus-edit-tests.el (cus-edit-tests-customize-saved/show-obsolete):
Add a fake saved-value property, to be able check that the obsolete
option is present in the Customize buffer.  Expect the test to pass
now.
2020-11-20 18:37:30 -03:00
Stefan Kangas
b4b1bd6e03 Hide obsolete options in most customize commands
* lisp/cus-edit.el (custom--filter-obsolete-variables): New defun.
* lisp/cus-edit.el (customize-changed-options)
(customize-apropos, custom-group-value-create): Hide obsolete user
options.  (Bug#44598)
* test/lisp/cus-edit-tests.el: New file.
2020-11-20 14:33:25 +01:00