1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 00:30:37 -08:00
Commit graph

146258 commits

Author SHA1 Message Date
Gregory Heytings
84c1940d42 Autoload list-colors-display.
* lisp/facemenu.el (list-colors-display): Autoload, it is mentioned
in (info "(emacs)Colors for Faces"), and to be generally available.
2021-04-10 16:13:11 +03:00
Michael Albinus
ca1ddef262 Tramp: fix location of files on W32
* lisp/net/tramp.el:
* lisp/net/tramp-sh.el: Use (eq system-type 'windows-nt) where appropriate.
(tramp-completion-function-alist-ssh): Fix location of files on W32.
2021-04-10 14:46:58 +02:00
Jim Porter
c975258abf Further fix of hostname completion on MS Windows
* lisp/net/tramp.el (tramp-completion-file-name-regexp-simplified)
(tramp-completion-file-name-regexp-separate): Fix W32 hostname/method
completion for simplified and separate syntaxes (same as the previous change
to default syntax).

Copyright-paperwork-exempt: yes
2021-04-10 13:16:13 +02:00
João Távora
c50b5907e0 Fail earlier if stale Flymake report functions called
If a Flymake backend calls a "stale" report function,
flymake--handle-report might be called for a backend function that is
no longer in the flymake--backend-state hash table.  This patch makes
that erroneous situation slightly more explicit.

* lisp/progmodes/flymake.el (flymake--handle-report): Improve
error reporting.
2021-04-10 11:19:34 +01:00
Dmitry Gutov
0db2126d71 Don't stop when before space or closing paren
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
Don't stop when before space or closing paren (bug#47665).
2021-04-10 01:51:39 +03:00
Alan Mackenzie
f493a9bef4 CC Mode: fix c-where-wrt-brace-construct to cope with class declarations
Make the function correctly recognize a brace block preceded by an
introductory line without a parameter list.

* lisp/progmodes/cc-cmds.el (c-where-wrt-brace-contruct): Reintroduce the use
of c-beginning-of-decl-1, which was removed some weeks ago, in place of a
c-syntactic-skip-backward.  Reformulate the code generally.
2021-04-09 20:52:49 +00:00
Mattias Engdegård
59342f689e Fix condition-case optimiser bug
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't
perform incorrect optimisations when a condition-case variable shadows
another lexical variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
New test case.
2021-04-09 19:20:55 +02:00
Mattias Engdegård
b7a7e879d0 Better compiler warning tests
These changes allow all bytecomp-tests to be run interactively.

* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--with-warning-test)
(bytecomp--define-warning-file-test): Interpret any space in the
pattern as arbitrary whitespace to tolerate line breaks.
Don't abuse the expected-failure mechanism when checking
for the expected absense of a warning.
(bytecomp/*.el): Rewrite patterns to work with line breaks
in the middle.
2021-04-09 19:20:55 +02:00
Mattias Engdegård
a2a7cfde29 Clean up bytecomp-tests.el
Now all test cases are run with both lexical and dynamic binding
where applicable, comparing interpreted against compiled results.
Previously, almost all tests were only run with dynamic binding
which was definitely not intended.

* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Rename to bytecomp-tests--test-cases.
(bytecomp-check-1, bytecomp-explain-1, bytecomp-tests)
(bytecomp-lexbind-tests, bytecomp-lexbind-check-1)
(bytecomp-lexbind-explain-1): Remove.
(bytecomp-tests--eval-interpreted, bytecomp-tests--eval-compiled)
(bytecomp-tests-lexbind, bytecomp-tests-dynbind)
(bytecomp-tests--test-cases-lexbind-only): New.
2021-04-09 19:20:54 +02:00
Stefan Kangas
40db60563c Make refer-every into obsolete alias for seq-every-p
* lisp/textmodes/refer.el (refer-every): Make into obsolete
function alias for seq-every-p.  Update single caller.
2021-04-09 18:42:14 +02:00
Stefan Kangas
512ec97bcf Remove redundant #' before lambda in ibuf-*.el
* lisp/ibuf-ext.el (ibuffer-included-in-filters-p)
(ibuffer-included-in-filter-p-1, ibuffer-do-kill-lines)
(ibuffer-jump-to-buffer, ibuffer-mark-on-buffer)
(ibuffer-mark-by-name-regexp, ibuffer-mark-by-mode-regexp)
(ibuffer-mark-by-content-regexp, ibuffer-mark-by-mode)
(ibuffer-mark-modified-buffers, ibuffer-mark-unsaved-buffers)
(ibuffer-mark-dissociated-buffers, ibuffer-mark-help-buffers)
(ibuffer-mark-compressed-file-buffers, ibuffer-mark-old-buffers)
(ibuffer-mark-special-buffers, ibuffer-mark-read-only-buffers)
(ibuffer-mark-dired-buffers, ibuffer-do-occur):
* lisp/ibuf-macs.el (ibuffer-save-marks, define-ibuffer-sorter)
(define-ibuffer-op): Remove redundant #' before lambda.
2021-04-09 18:27:27 +02:00
Stefan Kangas
cdd72c5d89 Don't preserve window-line in tabulated-list-print
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Don't
try to preserve window-line.  (Bug#42747)
2021-04-09 18:25:08 +02:00
Stefan Kangas
22515134ae Use lexical-binding in winner.el
* lisp/winner.el: Use lexical-binding.  Remove redundant :group
args.
(winner-set, winner-mode-map): Quote function symbols as such.
2021-04-09 16:40:03 +02:00
Stefan Monnier
e7ee3f7330 Merge branch 'vhdl-mode-lexbind' into trunk 2021-04-09 10:26:42 -04:00
Stefan Kangas
fb596973b9 Use lexical-binding in cmuscheme.el
* lisp/cmuscheme.el: Use lexical-binding.  Doc fixes.  Remove
redundant :group args.  Quote function symbols as such.
2021-04-09 16:12:35 +02:00
Stefan Kangas
caeb86b439 * lisp/progmodes/cmacexp.el: Use lexical-binding. 2021-04-09 15:20:56 +02:00
Stefan Kangas
064d933e20 Use lexical-binding in foldout.el
* lisp/foldout.el: Use lexical-binding.  Doc and formatting fixes.
Quote function symbols as such.
2021-04-09 14:54:04 +02:00
Stefan Kangas
841dcfa7c3 Use lexical-binding in loadhist.el and add tests
* lisp/loadhist.el: Use lexical-binding.
* test/lisp/loadhist-tests.el: New file.
2021-04-09 13:44:44 +02:00
Mattias Engdegård
612d731676 Self-TCO in condition-case error handlers
* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Recognise
`condition-case` handlers as being in the tail position.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels):
Extend test.
2021-04-09 10:55:37 +02:00
Jim Porter
1d42f4800b Fix hostname completion on MS Windows
* lisp/net/tramp.el (tramp-completion-file-name-regexp-default):
Handle volume letter being added to paths for file name completion on W32
systems.  This fixes hostname (and method) autocomplete on W32.

Copyright-paperwork-exempt: yes
2021-04-09 09:57:06 +02:00
Stefan Monnier
dfdec267ae * test/lisp/shadowfile-tests.el: Fix recent test failures
(shadow--tests-cleanup): `shadow-hashtable` is now a hash table (duh!).
2021-04-08 22:55:20 -04:00
Stefan Monnier
5b1e7af7bf * lisp/progmodes/vhdl-mode.el: Use lexical-binding
Use #' to quote function names to get better compiler diagnostics.
Wrap some lines to avoid arguments "hidden" in positions that are easy
to misread.
Prefix unused arguments with a semi-colon to silence compiler warnings.
Fix a few comments that used ;;; even though they were not headings.

(vhdl-emacs-21): Delete variable.
Replace all uses with (not (featurep 'xemacs)) instead since `vhdl-mode`
has been incompatible with Emacs<21 for more than 10 years already.
(vhdl-prepare-search-1): Add Edebug declaration.
(vhdl-prepare-search-2): Add Edebug declaration and use
`with-syntax-table`.
(vhdl-visit-file): Add Edebug and indentation declaration.
Move the bulk of the code to a function for easier debugging.
(vhdl--visit-file): New function extracted from `vhdl-visit-file`.
Be careful not to modify syntax tables in unrelated buffers.
(vhdl-speedbar-refresh): Remove unused var `pos`.
(vhdl-backward-sexp): Remove unused var `last-forward`.
(vhdl-electric-tab, vhdl-minibuffer-tab, vhdl-line-expand):
Rename arg to avoid conflict with the `prefix-arg`
global variable.
(vhdl-align-region-1): Remove unused var `indent`.
(vhdl-character-to-event): Actually give a body to that poor function.
(vhdl-template-context): Remove unused vars `entity-exists` and `string`.
(vhdl-template-group): Remove unused var `start`.
(vhdl-template-argument-list): Remove unused var `start`.
(vhdl-port-paste-context-clause): Remove unused var `margin`.
(vhdl-port-paste-testbench): Remove unused var `source-buffer`.
(vhdl-hs-minor-mode): Declare function `hs-hide-all`.
(vhdl-get-hierarchy): Rename arguments `ent-alist`, `conf-alist`, and
`conf-key` and bind those dynamically scoped var via `let` instead
since arguments can't be dynamically scoped.
(vhdl-speedbar-insert-hierarchy, vhdl-compose-configuration-architecture):
Same thing with arguments `ent-alist` and `conf-alist`.
(vhdl-cache-version): Declare variable.
(speedbar-expand-line, speedbar-edit-line): Declare functions.
(vhdl-speedbar-update-current-unit): Declare before first use.
(vhdl-compose-new-component): Remove unused var `project`.
(lazy-lock-minimum-size): Declare variable.
(vhdl-submit-bug-report): Declare variable `reporter-prompt-for-summary-p`.
2021-04-08 19:43:20 -04:00
Stefan Kangas
9a604501f0 Revert "Load all generic-x.el modes unconditionally"
This reverts commit 0161c9df6e.
2021-04-09 01:43:10 +02:00
Stefan Monnier
a4575655d2 * lisp/shadowfile.el: Use lexical-binding
Delete redundant `:group` args.

(shadow-hashtable): Make it an actual hash-table.
(shadow-shadows-of, shadow-invalidate-hashtable): Adjust accordingly.
(shadow-insert-var): Strength-reduce `eval` to `symbol-value`.
(shadow--save-buffers-kill-emacs): New function extracted from
`shadow-save-buffers-kill-emacs`.
(shadow-save-buffers-kill-emacs): Use it and use `save-buffers-kill-emacs`.
(shadow-initialize, shadowfile-unload-function):
Use `advice-add/remove` rather than override `save-buffers-kill-emacs`
with `defalias`.
2021-04-08 19:34:57 -04:00
Stefan Kangas
3492cc36f2 Remove redundant #' before lambda in {calendar,erc,mh-e}/*.el
* lisp/calendar/icalendar.el (icalendar--get-most-recent-observance):
* lisp/calendar/parse-time.el (parse-time-rules):
* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC):
* lisp/erc/erc-track.el (erc-modified-channels-display):
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol)
(erc-cmd-IGNORE, erc-cmd-JOIN, erc-default-server-handler)
(erc-banlist-update):
* lisp/mh-e/mh-search.el (mh-search, mh-mairix-convert-to-sop*)
(mh-index-create-sequences):
* lisp/mh-e/mh-thread.el (mh-toggle-threads, mh-thread-generate)
(mh-thread-prune-containers, mh-thread-sort-containers):
* lisp/mh-e/mh-utils.el (mh-sub-folders): Remove redundant #' before
lambda.
2021-04-09 00:04:13 +02:00
Gregory Heytings
ff796823e5 Terminate isearch when point has moved to another buffer
* lisp/isearch.el (isearch-post-command-hook): Terminate isearch
when the command just executed has moved point to another buffer.
https://lists.gnu.org/archive/html/emacs-devel/2021-04/msg00309.html
2021-04-08 22:04:39 +03:00
Gregory Heytings
972bab0981 User option to move to another match when changing direction in isearch.
* lisp/isearch.el (isearch-direction-change-changes-match):
New user option (bug#47599).
(isearch-repeat): Use the new option.
(isearch-repeat-forward, isearch-repeat-backward): Adapt to the
new option.

* etc/NEWS: Mention the new user option.

* doc/emacs/search.texi: Document the new user option.
2021-04-08 22:04:08 +03:00
Juri Linkov
b4eb84d4af * lisp/repeat.el (repeat-post-hook): Check for prefix-arg.
This is instead of checking for a list of argument-related commands
that set prefix-arg anyway.
2021-04-08 21:54:43 +03:00
Juri Linkov
580c4c6510 * lisp/repeat.el (repeat-post-hook): Skip repeating in minibuffer (bug#47566).
(repeat-map)<defvar>: Add docstring.
2021-04-08 21:54:43 +03:00
Stefan Monnier
d365c947b5 * lisp/progmodes/vhdl-mode.el: Use progress-reporter
This was actually prompted by a backward compatibility problem
(because of the use of Emacs-27's `time-convert`).  The new code
seems to work fine in Emacs-25.
It also fixes a minor bug that made the echo area messages of
`vhdl-indent-region` compete with those of `indent-region`.

(vhdl-progress-info): Delete variable.
(vhdl--progress-reporter): New var to replace it.
(vhdl-update-progress-info): Delete function.
(vhdl-indent-line): Call progress-reporter-update instead.
(vhdl-indent-region): Make it an obsolete alias of `indent-region`.
Change all users.
(vhdl-align-region-groups, vhdl-align-region, vhdl-fix-case-region-1):
Use `make-progress-reporter` and `progress-reporter-update`.
2021-04-08 14:44:37 -04:00
Stefan Monnier
a45493f259 * lisp/array.el: Use lexical-binding 2021-04-08 14:36:51 -04:00
Michael Albinus
173d49b03a * doc/misc/tramp.texi (Frequently Asked Questions): New item about recentf. 2021-04-08 16:35:02 +02:00
Michael Albinus
9e8ac1f5be Revert use of powershell in Tramp, there are collateral damages
* lisp/net/tramp-sh.el (tramp-methods) <sshx, scpx>: Fix quoting
for MS Windows.
(tramp-connection-properties): Don't set "encoding-shell".
(tramp-actions-before-shell): Remove `tramp-no-job-control-regexp'.
(tramp-maybe-open-connection): Revert changes for "encoding-shell".

* lisp/net/tramp.el (tramp-no-job-control-regexp): Remove.
2021-04-08 12:24:42 +02:00
Juri Linkov
151b202cf0 Don't set isearch-success in isearch-wrap functions
* lisp/comint.el (comint-history-isearch-wrap):
* lisp/simple.el (minibuffer-history-isearch-wrap):
Don't set isearch-success to t, so isearch-repeat won't skip the
beginning of the wrapped match with (forward-char (if isearch-forward 1 -1)).
2021-04-07 19:47:09 +03:00
Glenn Morris
67628c9b2b Merge from origin/emacs-27
2f5f30671a (origin/emacs-27) Fix broken links in autorevert.el
673c02f6d0 * lisp/international/ja-dic-cnv.el (skkdic-convert): Doc fix.
2021-04-07 07:50:17 -07:00
Glenn Morris
70b452e2bc ; Merge from origin/emacs-27
The following commit was skipped:

e2d199aa44 Fix crash when using menus and tramp on NS
2021-04-07 07:50:17 -07:00
Glenn Morris
0bd538f890 Merge from origin/emacs-27
3ec93bb7c2 Improve doc strings in replace.el
2021-04-07 07:50:13 -07:00
Stefan Kangas
b66e2a7b66 Clarify obsoletion messages for easy-menu-{add,remove}
* lisp/emacs-lisp/easymenu.el (easy-menu-remove, easy-menu-add):
Clarify obsoletion messages.
2021-04-07 14:33:10 +02:00
Stefan Kangas
5d45613616 Update whois-server-tld
* lisp/net/net-utils.el (whois-server-tld): Update and add some
missing entries.
2021-04-07 14:33:10 +02:00
Mattias Engdegård
55f0576ebd Fix mistakes in bytecomp-tests
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Fix typos and avoid errors that made
the tests less powerful than intended.
2021-04-07 13:11:43 +02:00
Stefan Kangas
c1173f231d ; Fix my previous change to shadowfile.el
* lisp/shadowfile.el (shadow-add-to-todo, shadow-union): Wrap call
to cl-union in nreverse for backwards-compatible ordering.
2021-04-07 02:40:31 +02:00
Dmitry Gutov
1ff7cde102 Add explicit support for C-g or ESC ESC ESC after keymap prompt
* lisp/progmodes/project.el (project-switch-project):
Add explicit support for C-g or ESC ESC ESC after keymap prompt
(bug#47620).
2021-04-07 03:25:18 +03:00
Dario Gjorgjevski
5d293f4f74 Allow complex key bindings in project-switch-project
* lisp/progmodes/project.el (project-switch-project): Replace
read-event with an overriding local map and read-key-sequence to allow
for complex key bindings to be read (bug#47620).
2021-04-07 03:24:49 +03:00
Stefan Monnier
c105017c44 * lisp/find-file.el: Make the commands oblivious to mouse/non-mouse
(ff-find-other-file): Add `event` argument.
(ff-find-other-file-other-window): Rename from
`ff-mouse-find-other-file-other-window` and use this new argument.
(ff-mouse-find-other-file, ff-mouse-find-other-file-other-window):
Make them obsolete aliases.
(ff-upcase-p): Remove unused `start` and `end` arguments and
simplify accordingly.
2021-04-06 17:06:07 -04:00
Stefan Monnier
c9655fcb47 * lisp/find-file.el: Use lexical-binding
Remove unused `:group` args.  Prefer #' to quote function.

(ff-special-constructs, ff-find-the-other-file, ff-get-file-name)
(ff-list-replace-env-vars, ff-cc-hh-converter): Use `match-string`.
(modula2-other-file-alist): Tighten regexps.
(ff-get-other-file, ff-find-other-file): Use dynamic scoping.
(ff-find-the-other-file): Minor simplification.
(ff-other-file-name): Delete unused function.
(ff-string-match): Don't let-bind `case-fold-search` if not needed.
(ff-basename): Make it an obsolete alias for `file-name-nondirectory`.
(ff-switch-file): Minor simplification.
(ff-list-replace-env-vars): Use [:alnum:].
(ff-upcase-p): Use [:upper:]
(ff-cc-hh-converter): Use [:upper:] and [:lower:].
2021-04-06 16:29:11 -04:00
Juri Linkov
735ed235c7 * lisp/isearch.el (isearch-wrap-pause): New defcustom (bug#47599).
(isearch-repeat): Use it.
(isearch-search): Don't ding when isearch-wrap-pause is no-ding.
2021-04-06 22:15:30 +03:00
Stefan Monnier
ccd616aeb0 * lisp/progmodes/ps-mode.el: Use lexical-binding
And prefer #' to quote function names.
2021-04-06 14:05:58 -04:00
Damien Cassou
2f5f30671a Fix broken links in autorevert.el
* lisp/autorevert.el (global-auto-revert-non-file-buffers):
Fix broken links.  (Bug#47621)
2021-04-06 19:31:56 +02:00
Michael Albinus
738266240d Fix Bug#47601 in Tramp
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Use `tramp-handle-file-newer-than-file-p'.  (Bug#47601)
(tramp-sh-handle-file-newer-than-file-p, tramp-run-test2): Remove.
2021-04-06 09:50:07 +02:00
Stefan Monnier
e0c3925961 * lisp/msb.el: Use lexical-binding
Remove redundant `:group` args.
(msb--add-to-menu): Strength-reduce `eval` to `symbol-value` and use `push`.
(msb--create-sort-item): Strength-reduce `eval` to `symbol-value`.
(msb-menu-bar-update-buffers): Replace `(lambda...) with a proper closure.
2021-04-06 00:26:38 -04:00