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

148415 commits

Author SHA1 Message Date
Glenn Morris
19df5e7869 Update admins make-manuals for new output variable
* admin/admin.el (make-manuals-dist-output-variables):
Add abs_top_builddir.
2021-02-28 14:28:34 -08:00
Stefan Kangas
150d06644e Convert dired menus to easymenu
* lisp/dired.el (dired-mode-map): Move menus from here...
(dired-mode-subdir-menu, dired-mode-immediate-menu)
(dired-mode-regexp-menu, dired-mode-mark-menu)
(dired-mode-operate-menu): ...to here, and convert to easymenu.
2021-02-28 23:23:41 +01:00
Stefan Kangas
c8f19a4af6 Convert hi-lock-menu to easymenu
* lisp/hi-lock.el (hi-lock-menu): Convert to easymenu.
2021-02-28 22:21:55 +01:00
Alan Mackenzie
56a8559076 Combine and reconcile two conflicting entries in NEWS on goto-line-history
* etc/NEWS: Amend.

* doc/lispref/minibuf.texi (Minibuffer History): Amend the entry about
goto-line-history, which is now buffer local only after being so customized.
2021-02-28 21:15:34 +00:00
Mattias Engdegård
f8ab343eb9 Declare more string predicates as pure
* lisp/emacs-lisp/byte-opt.el (pure-fns): Treat string>,
string-greaterp, string-empty-p, string-blank-p, string-prefix-p and
string-suffix-p as pure functions in the compiler.
2021-02-28 20:18:43 +01:00
Basil L. Contovounesios
a286e02580 ; Fix process-lines-handling-status docstring. 2021-02-28 19:00:27 +00:00
Basil L. Contovounesios
797f0ba218 ; Fix dired-switches-in-mode-line defcustom tags. 2021-02-28 19:00:27 +00:00
Stefan Kangas
c537b6384f Convert ibuffer menus to easymenu
* lisp/ibuffer.el (ibuffer-mode-map): Move menu from here...
(ibuffer-mode-mark-menu, ibuffer-mode-view-menu): ...to here.
Convert to easymenu.
(ibuffer-mode--groups-menu-definition): New function.  Fix bug where
"Kill filter by group named" and "Yank last killed filter group
before" was overwritten and never shown in the menu.
(ibuffer-mode-groups-popup): Convert to easymenu.
(ibuffer-mode-operate-menu): Rename from 'ibuffer-mode-operate-map'
and update uses.  Convert to easymenu.
(ibuffer-mode-operate-map): Make into obsolete alias for above
renamed variable.
2021-02-28 19:26:06 +01:00
Michael Albinus
0fd206badc Add `completion-predicate' to some Tramp commands
* lisp/net/tramp-cmds.el (tramp-cleanup-this-connection)
(tramp-rename-these-files): Add property `completion-predicate'.

* lisp/net/tramp.el (tramp-command-completion-p): New defun.
2021-02-28 18:23:27 +01:00
Kapuze Martin
277a254a42 Enable Python type hints and non-trivial base classes in wisent
* admin/grammars/python.wy: Enable understanding Python type hints
and non-trivial base classes (bug#46817).

Copyright-paperwork-exempt: yes
2021-02-28 18:09:15 +01:00
Lars Ingebrigtsen
0510040754 Adjust cmuscheme.el menu bar after previous scheme.el change
* lisp/cmuscheme.el (map): Adjust the keymap lookup after recent
scheme.el change (bug#46820).
2021-02-28 18:09:15 +01:00
Mattias Engdegård
bdea1883cc Fix pcase 'rx' pattern match-data bug
The pcase 'rx' pattern would in some cases allow the match data to be
clobbered before it is read.  For example:

  (pcase "PQR"
    ((and (rx (let a nonl)) (rx ?z)) (list 'one a))
    ((rx (let b ?Q))                 (list 'two b)))

The above returned (two "P") instead of the correct (two "Q").
This occurred because the calls to string-match and match-string were
presented as separate patterns to pcase, which would interleave them
with other patterns.

As a remedy, combine string matching and match-data extraction into a
single pcase pattern.  This introduces a slight inefficiency for two
or more submatches as they are grouped into a list structure which
then has to be destructured.

Found by Stefan Monnier.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg02010.html

* lisp/emacs-lisp/rx.el (rx--reduce-right): New helper.
(rx [pcase macro]): Combine string-match and match-string calls into a
single pcase pattern.
* test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test cases.
2021-02-28 13:06:24 +01:00
Stefan Monnier
aad8ffafa8 * lisp/international/mule-cmds.el: Try and fix bug#46818
(update-leim-list-file): Reduce stack/pdl use.
2021-02-27 20:30:21 -05:00
Stefan Monnier
ff09851a1f * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...)
(macroexp--expand-all): Use `pcase--dontcare` so pcase generates
slightly better code.  Don't hardcode which functions takes function
arguments; rely on a new `funarg-positions` symbol property instead.
2021-02-27 20:23:15 -05:00
Stefan Kangas
9eff23573d Convert text-mode menu to easymenu
* lisp/textmodes/text-mode.el (text-mode-map): Move menu
definition from here...
(text-mode-menu): ...to here, and convert to easymenu.
2021-02-28 01:51:31 +01:00
Stefan Kangas
9a110cb0d9 ; Make function missed in previous change obsolete
* lisp/play/handwrite.el (menu-bar-handwrite-map): Make unused
function obsolete.
2021-02-28 00:13:24 +01:00
Stefan Kangas
697aaafca3 Convert isearch menu to easymenu
* lisp/isearch.el (isearch-menu-bar-yank-map)
(isearch-menu-bar-map, isearch-mode-map): Move menu definition
from here...
(isearch-menu-bar-map): ...to here, and convert to easymenu.

* lisp/loadup.el ("emacs-lisp/easymenu"): Move before isearch.el.
2021-02-28 00:07:32 +01:00
Stefan Kangas
46c501e762 Checkdoc fixes in isearch.el
* lisp/isearch.el (isearch--set-state, isearch-yank-pop-only)
(isearch-search-and-update, isearch-complete-edit, isearch-search):
Minor doc fixes.
2021-02-28 00:07:32 +01:00
Juri Linkov
3b3b16ea17 * lisp/tab-bar.el: Support displaying global-mode-string in the tab bar.
* lisp/tab-bar.el (tab-bar--define-keys): Update global-mode-string
in mode-line-misc-info with condition to disable global-mode-string
in the mode line.
(tab-bar-format): New variable.
(tab-bar-format-history, tab-bar-format-add-tab)
(tab-bar-format-tabs): New functions with body from
'tab-bar-make-keymap-1'.
(tab-bar-format-align-right, tab-bar-format-global): New functions for
'tab-bar-format' list.
(tab-bar-format-list): New utility function.
(tab-bar-make-keymap-1): Just call 'tab-bar-format-list'.
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01210.html
2021-02-27 22:09:33 +02:00
Juri Linkov
53f6218cdc * lisp/subr.el (read-char-choice-with-read-key): New function.
* lisp/subr.el (read-char-choice): Move most of the function body to
'read-char-choice-with-read-key'.
(read-char-choice-with-read-key): New function with body from
'read-char-choice'.
2021-02-27 22:00:51 +02:00
Stefan Kangas
3a77021353 ; Fix mistake in easymenu conversion
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Use :style and
:selected instead of :button.
2021-02-27 20:22:43 +01:00
Stefan Kangas
0f91948372 Convert Buffer-menu-mode menu to easymenu
* lisp/buff-menu.el (Buffer-menu-mode-map): Move menu
definition from here...
(Buffer-menu-mode-menu): ...to here, and convert to easymenu.
2021-02-27 20:17:03 +01:00
Stefan Kangas
b34d39170b Minor fixes after preloading easymenu
* lisp/cedet/ede/dired.el:
* lisp/dired-x.el:
* lisp/filesets.el:
* lisp/follow.el:
* lisp/gnus/gnus-registry.el:
* lisp/net/eudc.el:
* lisp/printing.el:
* lisp/recentf.el:
* lisp/speedbar.el: Remove redundant require of easymenu; it is now
preloaded.
* lisp/org/org.el:
* lisp/progmodes/antlr-mode.el:
* lisp/progmodes/vhdl-mode.el:
* lisp/textmodes/reftex.el: Don't require easymenu in Emacs 28 or
later.

* etc/NEWS: Announce that 'easymenu' is now preloaded.
2021-02-27 20:04:41 +01:00
Glenn Morris
a4d7235f1a Fix doc/misc Makefile for out-of-tree with relative path
* doc/misc/Makefile.in (org_template): Fix for relative srcdir.
2021-02-27 10:02:24 -08:00
Glenn Morris
27da93862f Improve Makefile treatment of org sources in doc/misc
* doc/misc/Makefile.in (ORG_SETUP): New variable.
(ORG_SRC): Use wildcard rather than hard-coding.
(org_template): Adjust for input containing $srcdir and suffix.
(org_setup_template): New template.
2021-02-27 09:40:26 -08:00
Stefan Monnier
082b431e62 * lisp/emacs-lisp/bytecomp.el: Fix minor regression introduced by pdump
After `rm **/*.elc; make` we'd sometimes get loads and loads of unnecessary
"Reloading ...".

(byte-compile-refresh-preloaded): Don't reload files that are more
recent than `temacs` but older than the `.pdmp` file.
2021-02-27 12:28:17 -05:00
Stefan Kangas
2c639a35a6 Don't require overlay; that's only needed in XEmacs
* lisp/allout.el:
* lisp/net/eudc.el:
* lisp/org/org.el: Don't require overlay; that's only needed in
XEmacs.
2021-02-27 18:23:12 +01:00
Stefan Monnier
a5ad6747c9 * lisp/emacs-lisp/cconv.el: Fix uncaught brain farts in last change
(cconv--convert-funcbody, cconv-convert): Use `macroexp--warn-wrap` properly.
2021-02-27 12:21:02 -05:00
Lars Ingebrigtsen
de33de1a66 Add sexp navigation commands to elisp-mode
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add some
navigation commands (bug#24774).
2021-02-27 15:58:19 +01:00
Stefan Kangas
cd411ecb28 Convert emacs-lisp-mode menu to easy-menu-define
* lisp/loadup.el: Preload easymenu.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-map): Convert menu to
use easy-menu-define (bug#24774).
2021-02-27 15:24:35 +01:00
Matt Armstrong
36440b15d3 Remove unecessary unlock-buffer calls
* lisp/files.el (revert-buffer-insert-file-contents--default-function):
Remove vestigial call to `unlock-buffer'.
* lisp/simple.el (primitive-undo): Assume unlock-buffer is always
bound.  (Bug#46701)
2021-02-27 16:19:37 +02:00
Eli Zaretskii
2c5f215419 Avoid crashes in Mew due to corrupted tool-bar label
* src/gtkutil.c (update_frame_tool_bar): Don't keep around a
'char *' pointer to a Lisp string's contents when calling Lisp,
because that could relocate string data; keep the Lisp string
itself instead.  This avoids crashes in Mew.  (Bug#46791)
2021-02-27 09:26:55 +02:00
Lars Ingebrigtsen
f8b4623db3 Compute grep defaults earlier
* lisp/progmodes/grep.el (grep): Always compute the defaults
(bug#46801).
(grep-highlight-matches): Clarify that it's not just used
interactively.
2021-02-27 06:02:17 +01:00
Lars Ingebrigtsen
7ac99eeefe Change defcustom types of two non-standard hooks
* lisp/erc/erc.el (erc-before-connect, erc-after-connect): Change
type from 'hook to 'function (bug#34657).
2021-02-27 05:43:06 +01:00
F. Jason Park
c9f5c314ad Accept string argument in erc-add-to-input-ring
* lisp/erc/erc-ring.el: (erc-add-to-input-ring)
(erc-previous-command): Use existing API to grab input.
* test/lisp/erc/erc-tests.el: (erc-ring-previous-command)
See (bug#46339).
2021-02-27 05:35:40 +01:00
Lars Ingebrigtsen
2a9ce136ed Add generated .texi files to .gitignore 2021-02-27 05:23:45 +01:00
Glenn Morris
b3d310fa96 Fixes for doc/misc org source files
* doc/misc/org-setup.org: Fix "version" file lookup.  Add copyright.
* doc/misc/modus-themes.org: Fix up doclicense include.
* doc/misc/org.org: Remove non-working and unused "modification-time".
Fix up doclicense include.  Adjust setupfile inclusion.
2021-02-26 19:48:34 -08:00
Glenn Morris
fddd63f8b8 Distribute the real source for some doc/misc manuals (bug#45143)
* doc/misc/modus-themes.texi, doc/misc/org.texi:
Remove generated files from repository.
* doc/misc/Makefile.in: Add rules for building .texi from .org.
(ORG_SRC, abs_top_builddir, EMACS, emacs):
New variables.
(org_template): New template.
(orgclean): New phony target.
* Makefile.in (info): Depend on lisp.
* lisp/org/ox-texinfo.el (org-texinfo-export-to-texinfo-batch):
New function.
* doc/misc/org.org, doc/misc/org-setup.org: New files.
Import from https://code.orgmode.org d8e8a97a14.
2021-02-26 19:36:09 -08:00
Protesilaos Stavrou
3984044ad3 Import org source file for modus-themes manual
* doc/misc/modus-themes.org: New file.
Import from https://gitlab.com/protesilaos/modus-themes 515180ac.
2021-02-26 19:36:09 -08:00
Stefan Kangas
3b1fb6186b Use lexical-binding in progmodes/icon.el
* lisp/progmodes/icon.el: Use lexical-binding.
(electric-icon-brace): Very minor cleanup.
2021-02-27 03:24:51 +01:00
Stefan Kangas
9abee2acda Convert change-log-mode menu to easy-menu-define
* lisp/vc/add-log.el (change-log-mode-map): Move menu from here...
(change-log-mode-menu): ...to here; convert to easy-menu-define.
2021-02-27 03:14:04 +01:00
Stefan Monnier
a350ae058c * lisp/emacs-lisp/cconv.el: Improve line-nb info of unused var warnings
Instead of warning about unused vars during the analysis phase of
closure conversion, do it in the actual closure conversion by
annotating the code with "unused" warnings, so that the warnings
get emitted later by the bytecomp phase, like all other warnings,
at which point the line-number info is a bit less imprecise.

Take advantage of this change to wrap the expressions of unused
let-bound vars inside (ignore ...) so the byte-compiler can better
optimize them away.

Finally, promote `macroexp--warn-and-return` to "official" status
by removing its "--" marker.

(cconv-captured+mutated, cconv-lambda-candidates): Remove vars.
(cconv-var-classification): New var to replace them.
(cconv-warnings-only): Delete function.
(cconv--warn-unused-msg, cconv--var-classification): New functions.
(cconv--convert-funcbody): Add warnings for unused args.
(cconv-convert): Add warnings for unused vars in `let` and `condition-case`.
(cconv--analyze-use): Don't emit an "unused var" warning any more,
but instead remember the fact in `cconv-var-classification`.

* lisp/emacs-lisp/bytecomp.el (byte-compile-force-lexical-warnings):
Remove variable.
(byte-compile-preprocess): Remove corresponding case.

* lisp/emacs-lisp/pcase.el (pcase--if): Don't throw away `test` effects.
(\`):
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Use `car-safe` instead
of `car`, so it can more easily be removed by the optimizer if the
result is not used.

* lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): New function.
(macroexp-warn-and-return): Rename from `macroexp--warn-and-return`.
2021-02-26 20:24:52 -05:00
Stefan Monnier
99340ad17a lisp/vc/*.el: Use lexical-bindings in all the files
Also remove some redundant `:group` arguments.

* lisp/vc/vc.el (vc-ignore): Autoload.

* lisp/vc/pcvs-util.el (cvs-every, cvs-union, cvs-map): Delete functions.
* lisp/vc/cvs-status.el: Require `cl-lib` at runtime.
(cvs-tree-tags-insert): Use `cl-mapcar` and `cl-every` instead.
* lisp/vc/pcvs.el: Require `cl-lib` at runtime.
(cvs-do-removal): Use `cl-every` instead.

* lisp/vc/ediff-init.el: Require `ediff-util` (for `ediff-cleanup-mess`
and `ediff-default-suspend-function`).

* lisp/vc/pcvs-info.el (cvs-fileinfo<): Remove unused vars `subtypea`
and `subtypeb`.

* lisp/vc/vc-git.el:
* lisp/vc/vc-bzr.el: Require `vc-dispatcher` at runtime for
`vc-do-async-command`.
2021-02-26 16:51:15 -05:00
Stefan Monnier
2987376bc3 * lisp/cedet/semantic/idle.el: Fix compilation warning
(eldoc-last-message): Remove var declaration.
(eldoc-message): Remove function declaration.
(semantic--eldoc-info): Rename from semantic-idle-summary-idle-function.
Make it usable on `eldoc-documentation-functions`.
(semantic-idle-summary-mode): Use `eldoc-mode`.
(semantic-idle-summary-refresh-echo-area): Delete function.
2021-02-26 15:34:30 -05:00
Andrea Corallo
312deba530 * Canonicalize filenames on Windows before hashing (bug#46256)
* src/comp.c (Fcomp_el_to_eln_filename): On Windowns
	canonicalize filenames before hashing.
2021-02-26 21:28:59 +01:00
Stefan Monnier
49bad2a0a6 * lisp/cedet/semantic/analyze*.el: Use lexical-binding
* lisp/cedet/semantic/analyze.el: Use lexical-binding.
Rename the dynbound var `prefixtypes` to `semantic--prefixtypes`.
(semantic--prefixtypes): Declare var.

* lisp/cedet/semantic/analyze/complete.el: Use lexical-binding.
(semantic--prefixtypes): Declare var.
(semantic-analyze-possible-completions-default): Remove unused var `any`.
Rename `prefixtypes` to `semantic--prefixtypes`.

* lisp/cedet/semantic/analyze/debug.el: Use lexical-binding.
(semantic-analyzer-debug-global-symbol): Remove no-op use of `prefixtypes`.

* lisp/cedet/semantic/analyze/refs.el:
* lisp/cedet/semantic/analyze/fcn.el: Use lexical-binding.
2021-02-26 15:19:31 -05:00
Andrea Corallo
42fc752a14 * Change native compiler configure flag into '--with-native-compilation'
* configure.ac: Rename configure nativecomp flags into
	--with-native-compilation.
2021-02-26 20:11:31 +01:00
Andrea Corallo
b84c1727ea * Interactive tag native compilation function in emacs-lisp-mode
* lisp/progmodes/elisp-mode.el
	(emacs-lisp-native-compile-and-load): Tag it for `emacs-lisp-mode'.
2021-02-26 19:57:41 +01:00
Andrea Corallo
5c922cc3a4 Merge remote-tracking branch 'savannah/master' into native-comp 2021-02-26 19:54:59 +01:00
Michael Albinus
496fa1c03b Fix Tramp manual
* doc/misc/tramp.texi (External methods): Mention "about-args".
(Remote shell setup): Use sshx.
2021-02-26 18:37:14 +01:00