]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago* lisp/net/shr.el (shr-insert-document): Explain why bidi-display-reordering
Stefan Monnier [Sun, 11 Apr 2021 00:06:21 +0000 (20:06 -0400)]
* lisp/net/shr.el (shr-insert-document): Explain why bidi-display-reordering

3 years agoAdd new icomplete-vertical-mode
Gregory Heytings [Sat, 10 Apr 2021 10:47:45 +0000 (11:47 +0100)]
Add new icomplete-vertical-mode

Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/icomplete.el (icomplete-completions): Consider icomplete-vertical-mode.
(icomplete-vertical-mode-minibuffer-map): New map.
(icomplete--vertical-minibuffer-setup): New helper.
(icomplete-vertical-mode): New minor mode.

* doc/emacs/buffers.texi (Icomplete): Mention icomplete-vertical-mode.

* etc/NEWS: Mention icomplete-vertical-mode

3 years ago* lisp/misearch.el (multi-isearch-read-buffers): Fix last change
Stefan Monnier [Sat, 10 Apr 2021 22:07:37 +0000 (18:07 -0400)]
* lisp/misearch.el (multi-isearch-read-buffers): Fix last change

These are not buffers but buffer names.

3 years ago* src/emacs.c (read_full): Add a few assertions.
Philipp Stephani [Mon, 14 Dec 2020 20:25:11 +0000 (21:25 +0100)]
* src/emacs.c (read_full): Add a few assertions.

3 years ago* lisp/cus-dep.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 21:11:58 +0000 (17:11 -0400)]
* lisp/cus-dep.el: Use lexical-binding

3 years ago* lisp/misearch.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 21:07:58 +0000 (17:07 -0400)]
* lisp/misearch.el: Use lexical-binding

(multi-isearch-read-buffers, multi-isearch-read-files):
Replace `add-to-list` with `cl-pushnew` for use on a local variable.

3 years ago* src/emacs.c (load_seccomp): Add a useful assertion.
Philipp Stephani [Sat, 10 Apr 2021 19:21:08 +0000 (21:21 +0200)]
* src/emacs.c (load_seccomp): Add a useful assertion.

3 years ago* src/emacs.c (load_seccomp): Fix condition.
Philipp Stephani [Sat, 10 Apr 2021 19:19:50 +0000 (21:19 +0200)]
* src/emacs.c (load_seccomp): Fix condition.

3 years ago* lisp/ps-bdf.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 21:03:11 +0000 (17:03 -0400)]
* lisp/ps-bdf.el: Use lexical-binding

3 years ago* lisp/informat.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 21:01:01 +0000 (17:01 -0400)]
* lisp/informat.el: Use lexical-binding

3 years ago* lisp/loadup.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 20:58:11 +0000 (16:58 -0400)]
* lisp/loadup.el: Use lexical-binding

3 years ago* lisp/jka-compr.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 20:25:28 +0000 (16:25 -0400)]
* lisp/jka-compr.el: Use lexical-binding

Prefer #' to quote function names.

3 years ago* etc/NEWS: Extend paragraph about &define form and backtracking
Philipp Stephani [Sat, 10 Apr 2021 19:54:12 +0000 (21:54 +0200)]
* etc/NEWS: Extend paragraph about &define form and backtracking

3 years ago; Fix copyright years
Glenn Morris [Sat, 10 Apr 2021 19:24:09 +0000 (12:24 -0700)]
; Fix copyright years

3 years agoConvert CC Mode to lexical binding in Emacs
Alan Mackenzie [Sat, 10 Apr 2021 19:18:28 +0000 (19:18 +0000)]
Convert CC Mode to lexical binding in Emacs

lisp/progmodes/cc-align.el, lisp/progmodes/cc-awk.el,
lisp/progmodes/cc-bytecomp.el, lisp/progmodes/cc-cmds.el,
lisp/progmodes/cc-defs.el, lisp/progmodes/cc-engine.el,
lisp/progmodes/cc-fonts.el, lisp/progmodes/cc-guess.el,
lisp/progmodes/cc-langs.el, lisp/progmodes/cc-menus.el,
lisp/progmodes/cc-mode.el, lisp/progmodes/cc-styles.el,
lisp/progmodes/cc-subword.el, lisp/progmodes/cc-vars.el: Mark these files with
a `lexical-binding' setting in line 1.

lisp/progmodes/cc-align.el, lisp/progmodes/cc-engine.el,
lisp/progmodes/cc-vars.el (c-syntactic-context, c-syntactic-element): Declare
these as special variables.

lisp/progmodes/cc-bytecomp.el (cc-bytecomp-debug-msg): prefix the parameter
ARGS with a _, and remove an `ignore' call.

lisp/progmodes/cc-cmds.el (c-where-wrt-brace-construct): Remove `kluge-start',
an unused variable.
(c-while-widening-to-decl-block): Add an extra parameter, which suppresses
the generation of a setting of variable `where'.
(c-defun-name-and-limits): Remove variable `where' from the function and use
the new argument to the previous macro.

lisp/progmodes/cc-engine.el (c-cache-to-parse-ps-state): Remove two unneeded
variables, `last' and `intermediate'.

lisp/progmodes/cc-fonts.el (c-font-lock-c++-using): Remove unused variable.

lisp/progmodes/cc-langs.el (c-vsemi-status-unknown-p-fn): Replace the doc
string with the more precise one from stand-alone CC Mode.

lisp/progmodes/cc-styles.el (c-set-offset): Give the `ignored' parameter a
leading _.

3 years agoAdd a helper binary to create a basic Secure Computing filter.
Philipp Stephani [Thu, 17 Dec 2020 10:20:55 +0000 (11:20 +0100)]
Add a helper binary to create a basic Secure Computing filter.

The binary uses the 'seccomp' helper library.  The library isn't
needed to load the generated Secure Computing filter.

* configure.ac: Check for 'seccomp' header and library.

* lib-src/seccomp-filter.c: New helper binary to generate a generic
Secure Computing filter for GNU/Linux.

* lib-src/Makefile.in (DONT_INSTALL): Add 'seccomp-filter' helper
binary if possible.
(all): Add Secure Computing filter file if possible.
(seccomp-filter$(EXEEXT)): Compile helper binary.
(seccomp-filter.bpf seccomp-filter.pfc): Generate filter files.

* test/src/emacs-tests.el (emacs-tests/seccomp/allows-stdout)
(emacs-tests/seccomp/forbids-subprocess): New unit tests.

* test/Makefile.in (src/emacs-tests.log): Add dependency on the helper
binary.

3 years ago* src/emacs.c (load_seccomp): Fix condition.
Philipp Stephani [Sat, 10 Apr 2021 18:35:06 +0000 (20:35 +0200)]
* src/emacs.c (load_seccomp): Fix condition.

3 years agoRead file in a loop if necessary.
Philipp Stephani [Mon, 14 Dec 2020 20:25:11 +0000 (21:25 +0100)]
Read file in a loop if necessary.

This allows for short reads from 'emacs_read'.

* src/emacs.c (read_full): New helper function.
(load_seccomp): Use it.

3 years ago; * etc/NEWS: Fix the wording of a recently added entry.
Eli Zaretskii [Sat, 10 Apr 2021 18:17:09 +0000 (21:17 +0300)]
; * etc/NEWS: Fix the wording of a recently added entry.

3 years agoAdd support for --seccomp command-line option.
Philipp Stephani [Mon, 14 Dec 2020 20:25:11 +0000 (21:25 +0100)]
Add support for --seccomp command-line option.

When passing this option on GNU/Linux, Emacs installs a Secure
Computing kernel system call filter.  See Bug#45198.

* configure.ac: Check for seccomp header.

* src/emacs.c (usage_message): Document --seccomp option.
(emacs_seccomp): New wrapper for 'seccomp' syscall.
(load_seccomp, maybe_load_seccomp): New helper functions.
(main): Potentially load seccomp filters during startup.
(standard_args): Add --seccomp option.

* lisp/startup.el (command-line): Detect and ignore --seccomp option.

* test/src/emacs-tests.el (emacs-tests/seccomp/absent-file)
(emacs-tests/seccomp/empty-file)
(emacs-tests/seccomp/file-too-large)
(emacs-tests/seccomp/invalid-file-size): New unit tests.
(emacs-tests--with-temp-file): New helper macro.

* etc/NEWS: Document new --seccomp option.

3 years agoEdebug: Disable backtracking when hitting a &define keyword.
Philipp Stephani [Thu, 18 Mar 2021 11:40:08 +0000 (12:40 +0100)]
Edebug: Disable backtracking when hitting a &define keyword.

Edebug doesn't deal well with backtracking out of definitions, see
Bug#41988.  Rather than trying to support this rare situation (e.g. by
implementing a multipass parser), prevent it by adding an implicit
gate.

* lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Disable
backtracking when hitting a &define keyword.

* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-duplicate-&define): New unit test.
(edebug-tests--duplicate-&define): New helper macro.

* doc/lispref/edebug.texi (Backtracking): Mention &define in the list
of constructs that disable backtracking.

* etc/NEWS: Document new behavior.

3 years ago* lisp/gnus/nnagent.el: Fix spurious empty line at BOB
Stefan Monnier [Sat, 10 Apr 2021 16:19:16 +0000 (12:19 -0400)]
* lisp/gnus/nnagent.el: Fix spurious empty line at BOB

3 years ago* lisp/edmacro.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 16:18:22 +0000 (12:18 -0400)]
* lisp/edmacro.el: Use lexical-binding

(edmacro-finish-edit, edmacro-parse-keys): Use `match-string`.

3 years ago* lisp/files-x.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 16:08:36 +0000 (12:08 -0400)]
* lisp/files-x.el: Use lexical-binding

3 years ago* lisp/ps-mule.el: Use lexical-binding
Stefan Monnier [Sat, 10 Apr 2021 13:52:09 +0000 (09:52 -0400)]
* lisp/ps-mule.el: Use lexical-binding

(ps-mule-encode-header-string, ps-mule-begin-job): Use `pcase`.

3 years agoAutoload list-colors-display.
Gregory Heytings [Sat, 10 Apr 2021 12:35:06 +0000 (12:35 +0000)]
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.

3 years agoTramp: fix location of files on W32
Michael Albinus [Sat, 10 Apr 2021 12:46:58 +0000 (14:46 +0200)]
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.

3 years agoFurther fix of hostname completion on MS Windows
Jim Porter [Sat, 10 Apr 2021 11:16:13 +0000 (13:16 +0200)]
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

3 years agoFail earlier if stale Flymake report functions called
João Távora [Sat, 10 Apr 2021 10:19:26 +0000 (11:19 +0100)]
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.

3 years agoDon't stop when before space or closing paren
Dmitry Gutov [Fri, 9 Apr 2021 22:51:39 +0000 (01:51 +0300)]
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).

3 years agoCC Mode: fix c-where-wrt-brace-construct to cope with class declarations
Alan Mackenzie [Fri, 9 Apr 2021 20:52:49 +0000 (20:52 +0000)]
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.

3 years agoFix condition-case optimiser bug
Mattias Engdegård [Fri, 9 Apr 2021 16:59:09 +0000 (18:59 +0200)]
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.

3 years agoBetter compiler warning tests
Mattias Engdegård [Fri, 9 Apr 2021 16:49:16 +0000 (18:49 +0200)]
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.

3 years agoClean up bytecomp-tests.el
Mattias Engdegård [Fri, 9 Apr 2021 16:42:12 +0000 (18:42 +0200)]
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.

3 years agoMake refer-every into obsolete alias for seq-every-p
Stefan Kangas [Fri, 9 Apr 2021 16:42:14 +0000 (18:42 +0200)]
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.

3 years agoRemove redundant #' before lambda in ibuf-*.el
Stefan Kangas [Thu, 8 Apr 2021 22:14:12 +0000 (00:14 +0200)]
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.

3 years agoDon't preserve window-line in tabulated-list-print
Stefan Kangas [Fri, 9 Apr 2021 16:25:08 +0000 (18:25 +0200)]
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)

3 years agoUse lexical-binding in winner.el
Stefan Kangas [Fri, 9 Apr 2021 14:16:42 +0000 (16:16 +0200)]
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.

3 years agoMerge branch 'vhdl-mode-lexbind' into trunk
Stefan Monnier [Fri, 9 Apr 2021 14:26:42 +0000 (10:26 -0400)]
Merge branch 'vhdl-mode-lexbind' into trunk

3 years agoUse lexical-binding in cmuscheme.el
Stefan Kangas [Fri, 9 Apr 2021 14:12:35 +0000 (16:12 +0200)]
Use lexical-binding in cmuscheme.el

* lisp/cmuscheme.el: Use lexical-binding.  Doc fixes.  Remove
redundant :group args.  Quote function symbols as such.

3 years ago* lisp/progmodes/cmacexp.el: Use lexical-binding.
Stefan Kangas [Fri, 9 Apr 2021 13:06:32 +0000 (15:06 +0200)]
* lisp/progmodes/cmacexp.el: Use lexical-binding.

3 years agoUse lexical-binding in foldout.el
Stefan Kangas [Fri, 9 Apr 2021 12:54:04 +0000 (14:54 +0200)]
Use lexical-binding in foldout.el

* lisp/foldout.el: Use lexical-binding.  Doc and formatting fixes.
Quote function symbols as such.

3 years agoUse lexical-binding in loadhist.el and add tests
Stefan Kangas [Fri, 9 Apr 2021 11:44:44 +0000 (13:44 +0200)]
Use lexical-binding in loadhist.el and add tests

* lisp/loadhist.el: Use lexical-binding.
* test/lisp/loadhist-tests.el: New file.

3 years agoSelf-TCO in `condition-case` error handlers
Mattias Engdegård [Thu, 8 Apr 2021 20:48:02 +0000 (22:48 +0200)]
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.

3 years agoFix hostname completion on MS Windows
Jim Porter [Fri, 9 Apr 2021 07:57:06 +0000 (09:57 +0200)]
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

3 years ago* test/lisp/shadowfile-tests.el: Fix recent test failures
Stefan Monnier [Fri, 9 Apr 2021 02:55:04 +0000 (22:55 -0400)]
* test/lisp/shadowfile-tests.el: Fix recent test failures

(shadow--tests-cleanup): `shadow-hashtable` is now a hash table (duh!).

3 years ago* lisp/progmodes/vhdl-mode.el: Use lexical-binding
Stefan Monnier [Thu, 25 Mar 2021 02:59:52 +0000 (22:59 -0400)]
* 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`.

3 years agoRevert "Load all generic-x.el modes unconditionally"
Stefan Kangas [Thu, 8 Apr 2021 23:42:41 +0000 (01:42 +0200)]
Revert "Load all generic-x.el modes unconditionally"

This reverts commit 0161c9df6edc02db6bd8871b00df522dd0699157.

3 years ago* lisp/shadowfile.el: Use lexical-binding
Stefan Monnier [Thu, 8 Apr 2021 23:34:57 +0000 (19:34 -0400)]
* 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`.

3 years agoRemove redundant #' before lambda in {calendar,erc,mh-e}/*.el
Stefan Kangas [Thu, 8 Apr 2021 22:04:13 +0000 (00:04 +0200)]
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.

3 years agoTerminate isearch when point has moved to another buffer
Gregory Heytings [Wed, 7 Apr 2021 16:58:51 +0000 (16:58 +0000)]
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

3 years agoUser option to move to another match when changing direction in isearch.
Gregory Heytings [Wed, 7 Apr 2021 17:51:30 +0000 (17:51 +0000)]
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.

3 years ago* lisp/repeat.el (repeat-post-hook): Check for prefix-arg.
Juri Linkov [Thu, 8 Apr 2021 18:46:57 +0000 (21:46 +0300)]
* 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.

3 years ago* lisp/repeat.el (repeat-post-hook): Skip repeating in minibuffer (bug#47566).
Juri Linkov [Thu, 8 Apr 2021 18:43:35 +0000 (21:43 +0300)]
* lisp/repeat.el (repeat-post-hook): Skip repeating in minibuffer (bug#47566).

(repeat-map)<defvar>: Add docstring.

3 years ago* lisp/progmodes/vhdl-mode.el: Use progress-reporter
Stefan Monnier [Thu, 8 Apr 2021 18:44:37 +0000 (14:44 -0400)]
* 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`.

3 years ago* lisp/array.el: Use lexical-binding
Stefan Monnier [Thu, 8 Apr 2021 18:36:51 +0000 (14:36 -0400)]
* lisp/array.el: Use lexical-binding

3 years ago* doc/misc/tramp.texi (Frequently Asked Questions): New item about recentf.
Michael Albinus [Thu, 8 Apr 2021 14:35:02 +0000 (16:35 +0200)]
* doc/misc/tramp.texi (Frequently Asked Questions): New item about recentf.

3 years agoRevert use of powershell in Tramp, there are collateral damages
Michael Albinus [Thu, 8 Apr 2021 10:24:42 +0000 (12:24 +0200)]
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.

3 years agoDon't set isearch-success in isearch-wrap functions
Juri Linkov [Wed, 7 Apr 2021 16:47:09 +0000 (19:47 +0300)]
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)).

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 7 Apr 2021 14:50:17 +0000 (07:50 -0700)]
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.

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 7 Apr 2021 14:50:17 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

e2d199aa44 Fix crash when using menus and tramp on NS

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 7 Apr 2021 14:50:13 +0000 (07:50 -0700)]
Merge from origin/emacs-27

3ec93bb7c2 Improve doc strings in replace.el

3 years agoClarify obsoletion messages for easy-menu-{add,remove}
Stefan Kangas [Wed, 7 Apr 2021 12:30:54 +0000 (14:30 +0200)]
Clarify obsoletion messages for easy-menu-{add,remove}

* lisp/emacs-lisp/easymenu.el (easy-menu-remove, easy-menu-add):
Clarify obsoletion messages.

3 years agoUpdate whois-server-tld
Stefan Kangas [Wed, 7 Apr 2021 11:35:59 +0000 (13:35 +0200)]
Update whois-server-tld

* lisp/net/net-utils.el (whois-server-tld): Update and add some
missing entries.

3 years agoFix mistakes in bytecomp-tests
Mattias Engdegård [Wed, 7 Apr 2021 11:11:43 +0000 (13:11 +0200)]
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.

3 years ago; Fix my previous change to shadowfile.el
Stefan Kangas [Tue, 6 Apr 2021 23:49:21 +0000 (01:49 +0200)]
; 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.

3 years agoAdd explicit support for C-g or ESC ESC ESC after keymap prompt
Dmitry Gutov [Wed, 7 Apr 2021 00:24:17 +0000 (03:24 +0300)]
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).

3 years agoAllow complex key bindings in project-switch-project
Dario Gjorgjevski [Tue, 6 Apr 2021 14:51:28 +0000 (16:51 +0200)]
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).

3 years ago* lisp/find-file.el: Make the commands oblivious to mouse/non-mouse
Stefan Monnier [Tue, 6 Apr 2021 21:06:07 +0000 (17:06 -0400)]
* 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.

3 years ago* lisp/find-file.el: Use lexical-binding
Stefan Monnier [Tue, 6 Apr 2021 20:28:50 +0000 (16:28 -0400)]
* 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:].

3 years ago* lisp/isearch.el (isearch-wrap-pause): New defcustom (bug#47599).
Juri Linkov [Tue, 6 Apr 2021 19:15:30 +0000 (22:15 +0300)]
* 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.

3 years ago* lisp/progmodes/ps-mode.el: Use lexical-binding
Stefan Monnier [Tue, 6 Apr 2021 18:05:58 +0000 (14:05 -0400)]
* lisp/progmodes/ps-mode.el: Use lexical-binding

And prefer #' to quote function names.

3 years agoFix broken links in autorevert.el
Damien Cassou [Tue, 6 Apr 2021 17:31:56 +0000 (19:31 +0200)]
Fix broken links in autorevert.el

* lisp/autorevert.el (global-auto-revert-non-file-buffers):
Fix broken links.  (Bug#47621)

3 years agoFix Bug#47601 in Tramp
Michael Albinus [Tue, 6 Apr 2021 07:50:07 +0000 (09:50 +0200)]
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.

3 years ago* lisp/msb.el: Use lexical-binding
Stefan Monnier [Tue, 6 Apr 2021 04:26:38 +0000 (00:26 -0400)]
* 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.

3 years ago* lisp/hippie-exp.el: Use lexical-binding
Stefan Monnier [Tue, 6 Apr 2021 04:13:44 +0000 (00:13 -0400)]
* lisp/hippie-exp.el: Use lexical-binding

Remove redundant `:group` args.
(make-hippie-expand-function): Turn it into a function returning
a closure.
(try-expand-all-abbrevs): Strength-reduce `eval` to `symbol-value`
and use `abbrev-table-p` rather than `vectorp`.

3 years ago* lisp/comint.el: Fix understickiness of non-comint properties
Stefan Monnier [Mon, 5 Apr 2021 21:30:11 +0000 (17:30 -0400)]
* lisp/comint.el: Fix understickiness of non-comint properties

When a third party package adds properties to the prompt they don't
necessarily want to be `read-nonsticky` (e.g. for the `cursor-intangible`
property), so replace the catchall `rear-nonsticky t` with an
actual list of the properties that we want to be `rear-nonsticky`.

(comint-send-input, comint-output-filter): Don't mark
all properties as non-sticky.

3 years ago* lisp/tab-bar.el: Add repeat-map keymaps.
Juri Linkov [Mon, 5 Apr 2021 21:18:59 +0000 (00:18 +0300)]
* lisp/tab-bar.el: Add repeat-map keymaps.

* lisp/tab-bar.el (tab-bar-switch-repeat-map): New keymap used for
'tab-next' and 'tab-previous'.
(tab-bar-move-repeat-map): New keymap used for 'tab-move'.
https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg01103.html

3 years ago* lisp/repeat.el (repeat-keep-prefix): New defcustom.
Juri Linkov [Mon, 5 Apr 2021 21:02:43 +0000 (00:02 +0300)]
* lisp/repeat.el (repeat-keep-prefix): New defcustom.

* lisp/repeat.el (repeat-map): New autoloaded global variable.
(repeat-post-hook): Use 'repeat-map' when non-nil
and reset it to nil afterwards.
(repeat-post-hook): Keep the current prefix when
'repeat-keep-prefix' is non-nil.

* lisp/window.el (other-window-repeat-map): Add "O" that sets
'repeat-map' to 'other-window-repeat-map' before calling
'(other-window -1)'.

https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg01387.html

3 years ago* lisp/repeat.el (repeat-post-hook): Fix key lookup.
Juri Linkov [Mon, 5 Apr 2021 20:46:35 +0000 (23:46 +0300)]
* lisp/repeat.el (repeat-post-hook): Fix key lookup.

* lisp/repeat.el (repeat-post-hook): Rename let-bound repeat-map to rep-map.
Define let-bound prefix-command-p.  Use lookup-key with
this-single-command-keys instead of last-command-event.
Don't show message when typing prefix keys.
https://lists.gnu.org/archive/html/emacs-devel/2021-04/msg00083.html

3 years agoUse powershell for Tramp on MS Windows
Michael Albinus [Mon, 5 Apr 2021 17:37:30 +0000 (19:37 +0200)]
Use powershell for Tramp on MS Windows

* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Nil on MS Windows.
(tramp-connection-properties): Add "encoding-shell".
(tramp-maybe-open-connection): Use it.  Change exit handling.
(tramp-actions-before-shell): Add `tramp-no-job-control-regexp'.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-no-job-control-regexp): New defcustom.
(tramp-get-debug-buffer): Set coding system.

3 years agoDo not search the global keymap in project--keymap-prompt
Dario Gjorgjevski [Mon, 5 Apr 2021 16:15:16 +0000 (18:15 +0200)]
Do not search the global keymap in project--keymap-prompt

* lisp/progmodes/project.el: (project--keymap-prompt) Pass
project--keymap-prompt as a list to where-is-internal so that the
global keymap is not searched at all (bug#47501).

3 years agoDon't call `image-toggle-display-text' when toggling
Lin Sun [Mon, 5 Apr 2021 16:12:14 +0000 (18:12 +0200)]
Don't call `image-toggle-display-text' when toggling

*lisp/image-mode.el (image-mode-to-text): Do not call the
image-toggle-display-text twice when toggle image display (bug#47521).

3 years agoFix cd to directories called "eshell" in eshell
Utkarsh Singh [Mon, 5 Apr 2021 16:09:41 +0000 (18:09 +0200)]
Fix cd to directories called "eshell" in eshell

* lisp/eshell/em-script.el (eshell-script-initialize): Allow
changing directory to directories called "eshell" (bug#47547).

Copyright-paperwork-exempt: yes

3 years ago* lisp/international/ja-dic-cnv.el (skkdic-convert): Doc fix.
Glenn Morris [Mon, 5 Apr 2021 15:49:07 +0000 (08:49 -0700)]
* lisp/international/ja-dic-cnv.el (skkdic-convert): Doc fix.

3 years agoRemove redundant #' before lambda in calc/*.el
Stefan Kangas [Mon, 5 Apr 2021 15:28:05 +0000 (17:28 +0200)]
Remove redundant #' before lambda in calc/*.el

* lisp/calc/calc-alg.el (math-defsimplify):
* lisp/calc/calc-ext.el (math-defintegral, math-defintegral-2):
* lisp/calc/calc-prog.el (math-do-arg-check): Remove redundant #'
before lambda.

3 years ago* lisp/shadowfile.el (cl-lib): Revert removing require.
Stefan Kangas [Mon, 5 Apr 2021 13:51:08 +0000 (15:51 +0200)]
* lisp/shadowfile.el (cl-lib): Revert removing require.

3 years ago* lisp/pcomplete.el: Remove aliases commented out for 20 years.
Stefan Kangas [Mon, 5 Apr 2021 13:15:31 +0000 (15:15 +0200)]
* lisp/pcomplete.el: Remove aliases commented out for 20 years.

3 years agoRemove local uniquify functions in favour of seq-uniq
Stefan Kangas [Mon, 5 Apr 2021 13:14:19 +0000 (15:14 +0200)]
Remove local uniquify functions in favour of seq-uniq

* lisp/emacs-lisp/seq.el (seq-uniq): Add autoload cookie.
* lisp/pcomplete.el: (pcomplete-uniquify-list): Use seq-uniq.
* lisp/eshell/esh-util.el (eshell-uniqify-list)
(eshell-uniquify-list):
* lisp/nxml/rng-util.el (rng-uniquify-equal):
* lisp/progmodes/idlwave.el (idlwave-uniquify):
* lisp/textmodes/artist.el (artist-uniq): Make into obsolete
function aliases for seq-uniq.  Update callers.
* lisp/nxml/rng-util.el (rng-uniquify-eq): Make obsolete in favor
of seq-uniq.  Update callers.

3 years agoObsolete local set difference functions in favor of seq-difference
Stefan Kangas [Mon, 5 Apr 2021 12:24:00 +0000 (14:24 +0200)]
Obsolete local set difference functions in favor of seq-difference

* lisp/emacs-lisp/seq.el (seq-difference): Add autoload cookie.
* lisp/gnus/gnus-range.el (gnus-set-difference):
* lisp/gnus/spam.el (spam-set-difference): Make obsolete in favor
of seq-difference.  Update callers.

3 years agoObsolete local list functions in shadowfile.el
Stefan Kangas [Mon, 5 Apr 2021 12:17:02 +0000 (14:17 +0200)]
Obsolete local list functions in shadowfile.el

* lisp/shadowfile.el (shadow-union): Make obsolete in favour of
cl-union.  Update callers.
(shadow-find): Make into obsolete function alias for seq-find.
Update callers.
(cl-lib): Remove unnecessary require.

3 years ago* test/infra/Dockerfile.emba (emacs-gnustep): Do not run parallel make.
Michael Albinus [Mon, 5 Apr 2021 10:45:10 +0000 (12:45 +0200)]
* test/infra/Dockerfile.emba (emacs-gnustep): Do not run parallel make.

3 years agoRemove code commented out since 1995 from ediff-util.el
Stefan Kangas [Sun, 4 Apr 2021 23:58:50 +0000 (01:58 +0200)]
Remove code commented out since 1995 from ediff-util.el

* lisp/vc/ediff-util.el (ediff-load-hook): Remove code commented out
since the file was added in 1995.

3 years agoReplace local intersection functions with seq-intersection
Stefan Kangas [Sun, 4 Apr 2021 23:13:54 +0000 (01:13 +0200)]
Replace local intersection functions with seq-intersection

* lisp/doc-view.el (doc-view-intersection):
* lisp/gnus/gnus-range.el (gnus-intersection):
* lisp/htmlfontify.el (hfy-interq):
* lisp/loadhist.el (file-set-intersect):
* lisp/mail/smtpmail.el (smtpmail-intersection): Make obsolete in
favor of seq-intersection.  Update all callers.

* lisp/url/url-dav.el (url-intersection): Redefine as obsolete
function alias for seq-intersection.  Update callers.

* lisp/mpc.el (mpc-intersection, mpc-cmd-list, mpc-reorder):
Use seq-intersection.

3 years agoMake ediff-copy-list alias obsolete
Stefan Kangas [Sun, 4 Apr 2021 23:38:48 +0000 (01:38 +0200)]
Make ediff-copy-list alias obsolete

* lisp/vc/ediff-mult.el (ediff-intersect-directories)
(ediff-get-directory-files-under-revision): Don't use above
obsolete alias.
* lisp/vc/ediff-util.el (ediff-copy-list): Make alias obsolete.

3 years ago* lisp/htmlfontify.el (hfy-triplet-regex): Use rx.
Stefan Kangas [Sun, 4 Apr 2021 23:35:18 +0000 (01:35 +0200)]
* lisp/htmlfontify.el (hfy-triplet-regex): Use rx.

3 years ago* etc/NEWS: Add entry for new SVG icons in customize.
Stefan Kangas [Sun, 4 Apr 2021 22:10:57 +0000 (00:10 +0200)]
* etc/NEWS: Add entry for new SVG icons in customize.

3 years ago* doc/misc/Makefile.in (echo-sources): Make it not the first target.
Glenn Morris [Mon, 5 Apr 2021 00:24:27 +0000 (17:24 -0700)]
* doc/misc/Makefile.in (echo-sources): Make it not the first target.

3 years agoRegenerate texi-from-org if ox-texinfo.el changes
Glenn Morris [Mon, 5 Apr 2021 00:11:47 +0000 (17:11 -0700)]
Regenerate texi-from-org if ox-texinfo.el changes

* doc/misc/Makefile.in (top_srcdir): New, set by configure.
(emacs): Set load-prefer-newer.
(org_template): Make output depend on ox-texinfo.el.

3 years agoRegenerate semantic grammars if the generating code changes
Glenn Morris [Sun, 4 Apr 2021 23:57:55 +0000 (16:57 -0700)]
Regenerate semantic grammars if the generating code changes

* admin/grammars/Makefile.in (emacs): Set load-prefer-newer.
(grammar_bovine, grammar_wisent): New variables.
(${bovinedir}/%-by.el, ${bovinedir}/scm-by.el)
(${cedetdir}/semantic/%-wy.el, ${wisentdir}/%-wy.el)
(${wisentdir}/javat-wy.el, ${cedetdir}/srecode/srt-wy.el):
Depend on the source file for the generating function.
* lisp/cedet/semantic/bovine/grammar.el (bovine--make-parser-1):
* lisp/cedet/semantic/wisent/grammar.el (wisent--make-parser-1):
Force generation of the output file.  The previous "is the output
newer than the input" failed to account for changes in the
generation code itself.  Force so we can let make figure it out.