Stefan Monnier [Thu, 18 Feb 2021 15:27:36 +0000 (10:27 -0500)]
* lisp/emacs-lisp/edebug.el (eval-defun): Simplify
(edebug-all-defs, edebug-all-forms): Don't autoload since the problem
it was working around has been fixed a while back.
(edebug--eval-defun): Rename from `edebug-eval-defun` and simplify by
making it an `:around` advice.
(edebug-install-read-eval-functions)
(edebug-uninstall-read-eval-functions): Adjust accordingly.
(edebug-eval-defun): Redefine as an obsolete wrapper.
* lisp/progmodes/elisp-mode.el (elisp--eval-defun):
Use `load-read-function` so it obeys `edebug-all-(defs|forms)`.
(elisp--eval-defun): Fix recent regression introduced with
`elisp--eval-defun-result`.
Lars Ingebrigtsen [Thu, 18 Feb 2021 11:52:55 +0000 (12:52 +0100)]
Revert "Do interactive mode tagging for python.el navigation functions."
This reverts commit
546f552e7b2439b482c7d28222fb88761a9c876a.
This is a "core package", so can't use the new syntax.
Doug Davis [Thu, 18 Feb 2021 11:39:00 +0000 (12:39 +0100)]
Do interactive mode tagging for python.el navigation functions.
* lisp/progmodes/python.el (navigation functions): Add python-mode to
`interactive' declarations for mode-specific commands (bug#46610).
Copyright-paperwork-exempt: yes
Mattias Engdegård [Thu, 18 Feb 2021 10:11:11 +0000 (11:11 +0100)]
Fix rx `regexp` form with deprecated syntax
The argument of the rx `regexp` form is assumed to evaluate to a valid
regexp, but certain kinds of deprecated but still accepted usage were
not handled correctly, such as unescaped literal (special) characters:
(rx "a" (regexp "*")) => "a*" which is wrong.
Handle these cases; there is no extra trouble.
* lisp/emacs-lisp/rx.el (rx--translate-regexp): Force bracketing
of single special characters.
* test/lisp/emacs-lisp/rx-tests.el (rx-regexp): Add test case.
Dmitry Gutov [Thu, 18 Feb 2021 03:06:33 +0000 (05:06 +0200)]
Move 'project-try-ede' to the back of 'project-find-functions'
* lisp/cedet/ede.el (project-find-functions):
Move 'project-try-ede' further back, so that 'project-try-vc' has
priority (bug46202).
Dmitry Gutov [Wed, 17 Feb 2021 23:41:03 +0000 (01:41 +0200)]
Present C source files as absolute file names too when possible
* lisp/progmodes/elisp-mode.el (xref-location-group):
Present C source files as absolute file names too when possible
(bug#46514).
Basil L. Contovounesios [Wed, 17 Feb 2021 23:08:24 +0000 (23:08 +0000)]
; Fix another recent typo in simple.el.
Basil L. Contovounesios [Wed, 17 Feb 2021 22:49:15 +0000 (22:49 +0000)]
Fix recent Command Modes changes in Elisp manual
* doc/lispref/commands.texi (Command Modes): Fix typos and grammar.
Cross-reference the 'declare' form node.
Basil L. Contovounesios [Wed, 17 Feb 2021 22:48:18 +0000 (22:48 +0000)]
; Fix typo in last change to simple.el.
Matt Armstrong [Wed, 17 Feb 2021 22:33:21 +0000 (23:33 +0100)]
doc/lispref/commands.texi (Command Modes): Fix typo.
* doc/lispref/commands.texi (Command Modes): Fix typo.
Alan Mackenzie [Wed, 17 Feb 2021 21:15:51 +0000 (21:15 +0000)]
Make goto-line-history buffer local only when so customized
* lisp/simple.el (goto-line-history-local): New customizable option.
(goto-line-history): Define this simply with defvar, not defvar-local.
(goto-line-read-args): Handle goto-line-history-local, and changes to it.
* doc/emacs/basic.texi (Moving Point): Add a paragraph about
goto-line-history-local.
* etc/NEWS: Add an item under "Editing Changes in Emacs 28.1".
Lars Ingebrigtsen [Wed, 17 Feb 2021 19:59:44 +0000 (20:59 +0100)]
Adjust the edebug spec for `interactive'
* lisp/emacs-lisp/edebug.el: Adjust the edebug spec for
`interactive' for the new syntax.
Lars Ingebrigtsen [Wed, 17 Feb 2021 19:14:22 +0000 (20:14 +0100)]
Make unused `Buffer-menu-sort' alias obsolete
* lisp/buff-menu.el (Buffer-menu-sort): Make unused alias obsolete.
* test/lisp/progmodes/elisp-mode-tests.el
(find-defs-defalias-defun-el): Adjust test to use an alias that's
not obsolete.
Lars Ingebrigtsen [Wed, 17 Feb 2021 18:54:09 +0000 (19:54 +0100)]
Mark up commands in buff-menu.el for modes
Glenn Morris [Wed, 17 Feb 2021 19:08:27 +0000 (11:08 -0800)]
; * admin/CPP-DEFINES: Remove unused defines.
Lars Ingebrigtsen [Wed, 17 Feb 2021 18:25:08 +0000 (19:25 +0100)]
Explicate on how to tag commands with modes
* doc/lispref/commands.texi (Command Modes): New node.
(Using Interactive): Move the `modes' text to the new node.
Juri Linkov [Wed, 17 Feb 2021 18:04:42 +0000 (20:04 +0200)]
New transient mode 'repeat-mode' to allow shorter key sequences (bug#46515)
* doc/emacs/basic.texi (Repeating): Document repeat-mode.
* lisp/repeat.el (repeat-exit-key): New defcustom.
(repeat-mode): New global minor mode.
(repeat-post-hook): New function.
* lisp/bindings.el (undo-repeat-map): New variable.
(undo): Put 'repeat-map' property with
'undo-repeat-map'.
(next-error-repeat-map): New variable.
(next-error, previous-error): Put 'repeat-map' property with
'next-error-repeat-map'.
* lisp/window.el (other-window-repeat-map): New variable.
(other-window): Put 'repeat-map' property with
'other-window-repeat-map'.
(resize-window-repeat-map): New variable.
(enlarge-window, enlarge-window-horizontally)
(shrink-window-horizontally, shrink-window): Put 'repeat-map'
property with 'resize-window-repeat-map'.
Juri Linkov [Wed, 17 Feb 2021 17:56:45 +0000 (19:56 +0200)]
New command 'tab-duplicate' like in web browsers
Michael Albinus [Wed, 17 Feb 2021 17:04:35 +0000 (18:04 +0100)]
Further Tramp code cleanup
* doc/misc/tramp.texi (Predefined connection information):
Mention "about-args".
* lisp/net/tramp-cmds.el (tramp-version): Adapt docstring.
* lisp/net/tramp.el (tramp-handle-expand-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name)
* lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Handle local "/..".
* lisp/net/tramp-rclone.el (tramp-methods) <rclone>:
Adapt `tramp-mount-args'.
(tramp-rclone-flush-directory-cache): Remove.
(tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file)
(tramp-rclone-handle-make-directory): Don't use that function.
(tramp-rclone-maybe-open-connection): Fix use of `tramp-mount-args'.
* lisp/net/trampver.el (tramp-inside-emacs): New defun.
* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-sh-handle-process-file, tramp-open-shell): Use it.
(tramp-get-env-with-u-option): Remove.
* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-top):
New test.
Eli Zaretskii [Wed, 17 Feb 2021 16:59:01 +0000 (18:59 +0200)]
; Fix last m-x.texi change.
Eli Zaretskii [Wed, 17 Feb 2021 16:57:42 +0000 (18:57 +0200)]
; Fix last change in commands.texi.
Eli Zaretskii [Wed, 17 Feb 2021 16:53:54 +0000 (18:53 +0200)]
Disable filtering of commands in M-x completion
This makes the default behavior like it was before:
M-x completion doesn't filter out any commands. To
have commands filtered based on their relevance to the
current buffer's modes, customize the option
'read-extended-command-predicate' to call
'command-completion-default-include-p'.
* doc/lispref/commands.texi (Interactive Call):
* doc/emacs/m-x.texi (M-x): Update the description of
'read-extended-command-predicate' and improve wording.
* etc/NEWS: Update the entry about
'read-extended-command-predicate'.
* lisp/simple.el (read-extended-command-predicate): Change default
value to nil. Update doc string. Add :group.
(read-extended-command): Handle nil as meaning to apply
no-filtering.
Lars Ingebrigtsen [Wed, 17 Feb 2021 16:12:27 +0000 (17:12 +0100)]
Fix recently introduced bug in `byte-compile-lambda'
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Fix recently
introduced error when compiling non-lexical commands (bug#46589).
Basil L. Contovounesios [Wed, 17 Feb 2021 13:27:56 +0000 (13:27 +0000)]
; Finish recent rename of completion-* predicates.
Lars Ingebrigtsen [Wed, 17 Feb 2021 11:15:07 +0000 (12:15 +0100)]
Clarify 'read-extended-command-predicate' in NEWS
Lars Ingebrigtsen [Wed, 17 Feb 2021 11:01:27 +0000 (12:01 +0100)]
Change name for the completion-* predicates
* lisp/simple.el (command-completion-default-include-p)
(command-completion-with-modes-p, command-completion-button-p):
Rename from completion-*.
(read-extended-command-predicate): Adjust default predicate.
* lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Adjust
predicate name.
Glenn Morris [Wed, 17 Feb 2021 05:25:18 +0000 (21:25 -0800)]
* configure.ac: Replace obsolete AC_CHECK_HEADER usage. (Bug#46578)
Glenn Morris [Wed, 17 Feb 2021 04:54:46 +0000 (20:54 -0800)]
* configure.ac: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE.
Glenn Morris [Wed, 17 Feb 2021 04:34:26 +0000 (20:34 -0800)]
Remove TIME_WITH_SYS_TIME, unused for a long time
* configure.ac (AC_HEADER_TIME): Remove. (Bug#46578)
Harald Jörg [Tue, 16 Feb 2021 23:54:38 +0000 (00:54 +0100)]
cperl-mode: Improve detection of index entries for imenu
* lisp/progmodes/cperl-mode.el
(cperl-imenu-addback): Customization variable deleted. This
variable has been declared obsolete in 1998.
(cperl--basic-identifier-regexp) and many other variables:
defining regular expressions for basic Perl constructs.
(cperl-imenu--create-perl-index): This function has been
completely rewritten, keeping only some parts of the output
formatting. It now recognizes a lot more package and
subroutine declarations which came since Perl 5.14: Packages
with a version and/or a block attached, lexical subroutines,
declarations with a newline between the keyword "package" and
the package name, and several more. This version also
correctly separates subroutine names from attributes, does no
longer support "unnamed" packages (which don't exist in Perl),
and doesn't fall for false positives like stuff that looks
like a declaration in a multiline string.
(cperl-tags-hier-init): Eliminate call to
`cperl-imenu-addback` (which actually was commented out in
1997)
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test--validate-regexp) and six other new tests for the
new regular expressions and the index creation.
* test/lisp/progmodes/cperl-mode-resources/grammar.pl: New
file showcasing different syntax variations for package and
sub declarations (bug#46574).
Lars Ingebrigtsen [Tue, 16 Feb 2021 23:43:52 +0000 (00:43 +0100)]
Don't move point in `exif-parse-buffer'
* lisp/image/exif.el (exif-parse-buffer): Don't move point
(bug#46552).
Lars Ingebrigtsen [Tue, 16 Feb 2021 22:32:04 +0000 (23:32 +0100)]
Fix edebug spec for minibuffer-with-setup-hook
* lisp/files.el (minibuffer-with-setup-hook): Instrument the
:append form for edebug (bug#46531).
Lars Ingebrigtsen [Tue, 16 Feb 2021 22:06:46 +0000 (23:06 +0100)]
Clarify Gnus Agent expiry quirks
* doc/misc/gnus.texi (Agent Expiry): Mention that the last article
won't be expired (bug#46533).
Glenn Morris [Tue, 16 Feb 2021 20:11:55 +0000 (12:11 -0800)]
thumbs.el: avoid creating thumbs directory on loading library
* lisp/thumbs.el (thumbs-cleanup-thumbsdir):
Don't create the thumbs directory if it does not exist.
Glenn Morris [Tue, 16 Feb 2021 20:03:39 +0000 (12:03 -0800)]
* admin/cus-test.el (cus-test-load-libs): Quieten loading.
Glenn Morris [Tue, 16 Feb 2021 20:01:25 +0000 (12:01 -0800)]
* admin/cus-test.el (cus-test-get-lisp-files): Ignore loaddefs files.
Bastian Beranek [Tue, 16 Feb 2021 10:35:35 +0000 (11:35 +0100)]
* lisp/tab-bar.el: Fix behavior of toggle-frame-tab-bar (bug #46299)
(toggle-frame-tab-bar): Add frame parameter to protect tab bar state.
(tab-bar--update-tab-bar-lines): Check parameter.
Basil L. Contovounesios [Sun, 14 Feb 2021 16:58:06 +0000 (16:58 +0000)]
Pacify unused function warning in xfns.c with GTK2
* src/xfns.c (x_get_net_workarea, x_get_monitor_for_frame)
(x_make_monitor_attribute_list, x_get_monitor_attributes_fallback):
[HAVE_XINERAMA] (x_get_monitor_attributes_xinerama)
[HAVE_XRANDR] (x_get_monitor_attributes_xrandr)
(x_get_monitor_attributes): Fix #ifdefs around definitions to avoid
unused function warnings regardless of GTK use (bug#46509).
[HAVE_XRANDR] (x_get_monitor_attributes_xrandr): Undefine
RANDR13_LIBRARY after it's been used.
Lars Ingebrigtsen [Tue, 16 Feb 2021 16:42:24 +0000 (17:42 +0100)]
Revert "Fix problem of point movement in image-mode"
This reverts commit
7c7377288a125ef47f2b422cf131f044a3b418e1.
This is fixed differently in Emacs 27.
Lars Ingebrigtsen [Tue, 16 Feb 2021 16:39:03 +0000 (17:39 +0100)]
Fix problem of point movement in image-mode
* lisp/image-mode.el (image-mode): Switch disable-point-adjustment
on, otherwise `C-c C-c' will move point around oddly.
(image-toggle-display): Ensure that point is on the image (bug#46552).
Lars Ingebrigtsen [Tue, 16 Feb 2021 13:21:52 +0000 (14:21 +0100)]
Do interactive mode tagging for info.el
Lars Ingebrigtsen [Tue, 16 Feb 2021 13:00:55 +0000 (14:00 +0100)]
Don't resize images in image-mode if we have a rotation
* lisp/image-mode.el (image-fit-to-window): Don't resize of we
have a manually rotated imaged (and explain the resizing logic a
bit).
Konstantin Kharlamov [Tue, 16 Feb 2021 11:49:30 +0000 (12:49 +0100)]
make smerge-vc-next-conflict wrap around
* lisp/vc/smerge-mode.el:
(smerge-vc-next-conflict): While searching for conflict markers,
wrap search around if current file is the last one with conflicts
(bug#46538).
Stefan Kangas [Tue, 16 Feb 2021 09:05:03 +0000 (10:05 +0100)]
Do `interactive' mode tagging in gomoku.el
* lisp/play/gomoku.el: Do `interactive' mode tagging.
Stefan Kangas [Tue, 16 Feb 2021 08:56:17 +0000 (09:56 +0100)]
* lisp/play/gomoku.el: Minor doc fixes; formatting.
Stefan Monnier [Tue, 16 Feb 2021 04:54:45 +0000 (23:54 -0500)]
* lisp/emacs-lisp/bindat.el: Add 64bit int support
(bindat--unpack-u64, bindat--unpack-u64r, bindat--pack-u64)
(bindat--pack-u64r): New functions.
(bindat--unpack-item, bindat--pack-item): Use them.
(bindat--fixed-length-alist): Add new types.
Stefan Kangas [Tue, 16 Feb 2021 04:26:24 +0000 (05:26 +0100)]
Fix admin/check-doc-strings for new DEFUN format
* admin/check-doc-strings: Various fixes, including for the new DEFUN
format. The script still produces a ton of false positives, however.
Stefan Monnier [Tue, 16 Feb 2021 04:22:09 +0000 (23:22 -0500)]
* lisp/emacs-lisp/bindat.el: Clarify when field labels are optional
The fixes the doc and the Edebug spec, as well as a subtle issue in
the code where a field whose name is (eval 'fill) was mistakenly
considered as an anonymous field of type `fill`.
(bindat--unpack-item, bindat--unpack-group, bindat--length-group)
(bindat--pack-item, bindat--pack-group): Use dotimes, dolist, and pcase.
(bindat--item-aux): New edebug elem.
(bindat-item): Use it to fix the handling of optional fields.
(bindat-format-vector): Use `mapconcat`.
Stefan Monnier [Tue, 16 Feb 2021 02:25:15 +0000 (21:25 -0500)]
* lisp/emacs-lisp/bindat.el (bindat-spec): New macro.
It's basically an alias for `quote`, but it offers the advantage of
providing Edebug support and opens the possibility of compiling
the bindat spec to ELisp code.
* doc/lispref/processes.texi (Bindat Spec): Document `bindat-spec`.
(Bindat Functions): Tweak a few things to adjust to the state of the code.
* test/lisp/emacs-lisp/bindat-tests.el: Use it.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests--read): New function.
(edebug-tests--&rest-behavior): New test.
Basil L. Contovounesios [Mon, 15 Feb 2021 21:50:38 +0000 (21:50 +0000)]
; Fix last change in simple.el.
Stefan Monnier [Mon, 15 Feb 2021 17:07:52 +0000 (12:07 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Warn on empty let bodies
Ulf Jasper [Mon, 15 Feb 2021 16:27:45 +0000 (17:27 +0100)]
Display yearly ical events from first year on. Fix Bug#23100.
Convert yearly rrule starting in year x into diary-anniversary entry
for year x-1 when importing an icalendar. Correspondingly convert
diary-anniversary for year x into yearly rrule starting in year x+1.
*
test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-american:
*
test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-european:
*
test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-iso:
*
test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-american:
*
test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-european:
*
test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-iso:
*
test/lisp/calendar/icalendar-tests.el (icalendar-convert-anniversary-to-ical):
Match new diary-anniversary/yearly-rrule behaviour.
* lisp/calendar/icalendar.el (icalendar--datestring-to-isodate): Add
year-shift option. (icalendar--convert-anniversary-to-ical): Shift
the year as diary-anniversary is not displayed in the initial year.
(icalendar--convert-recurring-to-diary): Shift the year as
diary-anniversary is not displayed in the initial year. (Bug#23100)
Stefan Monnier [Mon, 15 Feb 2021 15:57:26 +0000 (10:57 -0500)]
* lisp/calc/calc-sel.el (calc-replace-sub-formula): Fix typo
Reported by Sébastien Miquel <sebastien.miquel@posteo.eu>
Stefan Monnier [Mon, 15 Feb 2021 15:50:07 +0000 (10:50 -0500)]
* lisp/emacs-lisp/bindat.el: Expose the `struct` variable (bug#46534)
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Mark it as dynamically scoped.
Lars Ingebrigtsen [Mon, 15 Feb 2021 13:43:53 +0000 (14:43 +0100)]
Allow overriding declared predicates, too
* lisp/simple.el (completion-default-include-p): Rename and move
the checking for an explicit predicate down here...
(read-extended-command): ... from here.
(read-extended-command-predicate): Adjust default value.
Lars Ingebrigtsen [Mon, 15 Feb 2021 12:43:27 +0000 (13:43 +0100)]
Do `interactive' mode tagging in the remaining lisp/gnus files
Lars Ingebrigtsen [Mon, 15 Feb 2021 12:08:15 +0000 (13:08 +0100)]
Add a new variable `global-minor-modes'
* doc/lispref/modes.texi (Minor Modes): Document it.
* lisp/simple.el (global-minor-modes): New variable.
(completion-in-mode-p): Use it.
(completion-with-modes-p): Use it.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Support it.
Lars Ingebrigtsen [Mon, 15 Feb 2021 11:44:57 +0000 (12:44 +0100)]
Rename minor-modes to local-minor-modes
* doc/lispref/modes.texi (Minor Modes): Update documentation.
* lisp/simple.el (completion-with-modes-p): Change usage.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Change usage.
* src/buffer.c: Rename from minor_modes to local_minor_modes
throughout.
(syms_of_buffer): Rename minor-modes to local-minor-modes.
* src/buffer.h (struct buffer): Rename minor_modes_.
* src/pdumper.c (dump_buffer): Update hash and usage.
Stefan Monnier [Mon, 15 Feb 2021 04:56:42 +0000 (23:56 -0500)]
* lisp/emacs-lisp/edebug.el (edebug-&optional, edebug-&rest): Remove vars
According to my tests, `edebug-&optional` never has any effect.
And `edebug-&rest` can be replaced with a closure.
(edebug-&rest-wrapper): Remove function.
(edebug--match-&-spec-op): Use a closure to remember the `specs`.
Stefan Monnier [Mon, 15 Feb 2021 03:56:08 +0000 (22:56 -0500)]
* lisp/emacs-lisp/byte-run.el (compiler-macro): Make it Edebuggable
* lisp/emacs-lisp/gv.el (gc-expander, gv-setter): Reuse the spec of
`compiler-macro`.
Lars Ingebrigtsen [Mon, 15 Feb 2021 03:42:32 +0000 (04:42 +0100)]
Make the button completion predicate be more useful
* lisp/simple.el (completion-button-p): Rework from
`completion-at-point-p'.
* lisp/net/shr.el (shr-show-alt-text): It should be possible to
complete to commands that aren't bound to a key.
Lars Ingebrigtsen [Mon, 15 Feb 2021 03:22:29 +0000 (04:22 +0100)]
Speed up completion-in-mode-p in the common case
* lisp/simple.el (completion-in-mode-p): Make predicate more
efficient in the common one-mode case.
Lars Ingebrigtsen [Mon, 15 Feb 2021 02:44:15 +0000 (03:44 +0100)]
Fix two syntax errors in Specification List
* doc/lispref/edebug.texi (Specification List): Add a couple of
missing @s.
Stefan Monnier [Mon, 15 Feb 2021 02:13:35 +0000 (21:13 -0500)]
* Edebug: Generalize `&lookup`, use it for `cl-macrolet` and `cl-generic`
This allows the use of (declare (debug ...)) in the lexical macros
defined with `cl-macrolet`. It also fixes the names used by Edebug
for the methods of `cl-generic` so it doesn't need to use gensym
and so they don't include the formal arg names any more.
* lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op):
Rename from `edebug--handle-&-spec-op`.
(edebug--match-&-spec-op <&interpose>): Rename from `&lookup` and
generalize so it can let-bind dynamic variables around the rest of the parse.
(edebug-lexical-macro-ctx): Rename from `edebug--cl-macrolet-defs` and
make it into an alist.
(edebug-list-form-args): Use the specs from `edebug-lexical-macro-ctx`
when available.
(edebug--current-cl-macrolet-defs): Delete var.
(edebug-match-cl-macrolet-expr, edebug-match-cl-macrolet-name)
(edebug-match-cl-macrolet-body): Delete functions.
(def-declarations): Use new `&interpose`.
(edebug--match-declare-arg): Rename from `edebug--get-declare-spec` and
adjust to new calling convention.
* lisp/subr.el (def-edebug-elem-spec): Fix docstring.
(eval-after-load): Use `declare`.
* lisp/emacs-lisp/cl-generic.el: Fix Edebug names so we don't need
gensym any more and we only include the specializers but not the formal
arg names.
(cl--generic-edebug-name): New var.
(cl--generic-edebug-remember-name, cl--generic-edebug-make-name): New funs.
(cl-defgeneric, cl-defmethod): Use them.
* lisp/emacs-lisp/cl-macs.el: Add support for `debug` declarations in
`cl-macrolet`.
(cl-declarations-or-string):
Fix use of `lambda-doc` and allow use of `declare`.
(edebug-lexical-macro-ctx): Declare var.
(cl--edebug-macrolet-interposer): New function.
(cl-macrolet): Use it to pass the right `lexical-macro-ctx` to the body.
* lisp/emacs-lisp/pcase.el (pcase-PAT): Use new `&interpose`.
(pcase--edebug-match-pat-args): Rename from `pcase--get-edebug-spec` and
adjust to new calling convention.
* test/lisp/emacs-lisp/cl-generic-tests.el (cl-defgeneric/edebug/method):
Adjust to the new names.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-cl-defmethod-qualifier)
(edebug-tests-cl-flet): Adjust to the new names.
* doc/lispref/edebug.texi (Specification List): Document &interpose.
Stefan Kangas [Sun, 14 Feb 2021 23:43:15 +0000 (00:43 +0100)]
Avoid asking repeatedly about reloading bookmarks file
* lisp/bookmark.el (bookmark-maybe-load-default-file): Reload watched
bookmarks file only if its mtime has changed since the last query.
This avoids asking repeatedly about reloading the bookmarks file if
the user has already said "no" to a previous query.
(bookmark--watch-file-already-queried-p): New function.
(bookmark--watch-already-asked-mtime): New variable.
Stefan Kangas [Sun, 14 Feb 2021 20:37:23 +0000 (21:37 +0100)]
Mark up bookmark.el for correct modes
* lisp/bookmark.el: Mark up all commands with applicable modes.
Lars Ingebrigtsen [Sun, 14 Feb 2021 21:57:19 +0000 (22:57 +0100)]
Add a comment to `read-extended-command'
* lisp/simple.el (read-extended-command): Add a comment.
Eli Zaretskii [Sun, 14 Feb 2021 20:11:05 +0000 (22:11 +0200)]
* src/xdisp.c (move_it_to): Fix last change. (Bug#46316)
Lars Ingebrigtsen [Sun, 14 Feb 2021 19:34:03 +0000 (20:34 +0100)]
Add a possible completion predicate for buttons
* lisp/simple.el (completion-at-point-p): New predicate.
* lisp/net/shr.el (shr-show-alt-text): Mark up as a button.
Lars Ingebrigtsen [Sun, 14 Feb 2021 19:24:23 +0000 (20:24 +0100)]
Make completion-with-modes-p work with minor modes, too
* lisp/simple.el (completion-with-modes-p): Work with minor modes,
too.
Bastian Beranek [Mon, 8 Feb 2021 17:12:33 +0000 (18:12 +0100)]
Fix showing and hiding of tab-bar on new frames (bug#46299)
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines)
(tab-bar--tab-bar-lines-for-frame):
New functions to update value of tab-bar-lines in frames.
(tab-bar-mode, tab-bar-new-tab-to, tab-bar-close-tab)
(tab-bar-close-other-tab, tab-bar-show :set):
Use new function.
(tab-bar-select-tab-modifiers :set):
Work around visual glitch.
Lars Ingebrigtsen [Sun, 14 Feb 2021 17:14:36 +0000 (18:14 +0100)]
Do command markup in blackbox.el
Lars Ingebrigtsen [Sun, 14 Feb 2021 17:01:06 +0000 (18:01 +0100)]
Fix byte-run--set-modes call signature
* lisp/emacs-lisp/byte-run.el (byte-run--set-modes): We take a
list of modes, not a single one (and fix the quoting).
Lars Ingebrigtsen [Sun, 14 Feb 2021 15:57:05 +0000 (16:57 +0100)]
Fix missing ' in NEWS
Lars Ingebrigtsen [Sun, 14 Feb 2021 15:55:37 +0000 (16:55 +0100)]
Also mention `M-o M-o' removal
* lisp/loadup.el (facemenu-keymap-restore): Also restore `M-o M-o'.
Lars Ingebrigtsen [Sun, 14 Feb 2021 15:51:14 +0000 (16:51 +0100)]
Don't update `minor-modes' in global modes
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): There's no
point in setting the buffer-local `minor-modes' in global modes.
Lars Ingebrigtsen [Sun, 14 Feb 2021 15:18:39 +0000 (16:18 +0100)]
Mark up 5x5 for interactive mode
Robert Pluim [Sun, 14 Feb 2021 14:05:58 +0000 (15:05 +0100)]
; * doc/lispref/modes.texi: typo fix
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:43:24 +0000 (14:43 +0100)]
Fix problem with the newly introduces `minor-modes' variable
* lisp/help-fns.el (describe-mode): Apparently buffer-local
variables take precedence over lexically bound variables?
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:14:48 +0000 (14:14 +0100)]
Do `interactive' mode markup in all Gnus files
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:13:38 +0000 (14:13 +0100)]
Really fix the syntax problem in define-minor-mode
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix
interactive extension in previous change.
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:12:08 +0000 (14:12 +0100)]
Fix previous define-minor-mode change
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix
interactive extension in previous change.
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:08:56 +0000 (14:08 +0100)]
Mark up eww.el for correct modes
* lisp/net/eww.el: Mark up all commands with applicable modes.
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:07:48 +0000 (14:07 +0100)]
Make `C-h m' list unbound commands applicable for the mode
* lisp/help-fns.el (help-fns--list-local-commands): New function.
(describe-mode): Use it.
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:06:16 +0000 (14:06 +0100)]
Allow define-minor-mode to take an :interactive keyword
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Allow
specifying the :interactive state and the modes.
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:00:51 +0000 (14:00 +0100)]
Fix dumping of buffers after minor_modes was added
* src/pdumper.c (dump_buffer): Set minor_modes to nil before dumping.
Lars Ingebrigtsen [Sun, 14 Feb 2021 12:57:59 +0000 (13:57 +0100)]
Revert the bit about command_modes in previous patch set
* src/data.c (Fcommand_modes): Remove the subr bit -- it's not
necessary since it can just use a predicate.
* src/lisp.h (GCALIGNED_STRUCT): Remove command_modes.
* src/lread.c (defsubr): Remove command_modes.
Lars Ingebrigtsen [Sun, 14 Feb 2021 12:56:53 +0000 (13:56 +0100)]
Add 'read-extended-command-predicate'
* doc/emacs/m-x.texi (M-x): Document it.
* doc/lispref/commands.texi (Interactive Call): Document it further.
* lisp/simple.el (read-extended-command-predicate): New user option.
(read-extended-command-predicate): Use it.
(completion-in-mode-p): New function (the default predicate).
Lars Ingebrigtsen [Sun, 14 Feb 2021 12:31:10 +0000 (13:31 +0100)]
Mark easy-menu-do-define menus as "not interesting"
* lisp/emacs-lisp/easymenu.el (easy-menu-do-define): Mark menu
keymaps as "not interesting" when doing completion.
Lars Ingebrigtsen [Sun, 14 Feb 2021 12:29:35 +0000 (13:29 +0100)]
Add new 'declare' forms for command completion predicates
* doc/lispref/functions.texi (Declare Form): Document the new
`completion' and `modes' declarations.
* lisp/simple.el (completion-with-modes-p): New helper functions.
* lisp/emacs-lisp/byte-run.el (byte-run--set-completion)
(byte-run--set-modes):
(defun-declarations-alist): New declarations for `completion' and
`modes'.
Lars Ingebrigtsen [Sun, 14 Feb 2021 12:21:24 +0000 (13:21 +0100)]
Extend the syntax of `interactive' to list applicable modes
* doc/lispref/commands.texi (Using Interactive): Document the
extended `interactive' form.
* doc/lispref/loading.texi (Autoload): Document list-of-modes
form.
* lisp/emacs-lisp/autoload.el (make-autoload): Pick the list of
modes from `interactive' out of the functions.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Allow for the
extended `interactive' form.
* src/callint.c (Finteractive): Document the extended form.
* src/data.c (Finteractive_form): Return the interactive form in
the old format (even when there's an extended `interactive') to
avoid having other parts of Emacs be aware of this.
(Fcommand_modes): New defun.
* src/emacs-module.c (GCALIGNED_STRUCT): Allow for modules to
return command modes.
* src/lisp.h: New function module_function_command_modes.
Lars Ingebrigtsen [Sun, 14 Feb 2021 11:52:00 +0000 (12:52 +0100)]
Fix how `shell-mode' avoids being called interactively
* lisp/shell.el (shell-mode): Make noninteractive instead of
erroring out after being called.
Lars Ingebrigtsen [Sun, 14 Feb 2021 11:50:19 +0000 (12:50 +0100)]
Introduce an :interactive keyword for `defined-derived-mode'
* doc/lispref/modes.texi (Derived Modes): Document it.
* lisp/emacs-lisp/derived.el (define-derived-mode): Introduce a
new :interactive keyword.
Stefan Kangas [Sun, 14 Feb 2021 11:54:36 +0000 (12:54 +0100)]
Remove redundant :group args from textmodes/*.el
* lisp/textmodes/enriched.el:
* lisp/textmodes/ispell.el:
* lisp/textmodes/makeinfo.el:
* lisp/textmodes/paragraphs.el:
* lisp/textmodes/picture.el:
* lisp/textmodes/refbib.el:
* lisp/textmodes/refer.el:
* lisp/textmodes/remember.el:
* lisp/textmodes/texinfo.el:
* lisp/textmodes/tildify.el:
* lisp/textmodes/two-column.el: Remove redundant :group args.
Lars Ingebrigtsen [Sun, 14 Feb 2021 11:37:44 +0000 (12:37 +0100)]
Add a new buffer-local variable `minor-modes'
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Keep
`minor-modes' updated.
* src/buffer.c (bset_minor_modes, Fmake_indirect_buffer)
(reset_buffer, init_buffer_once): Initialise `minor-modes'.
(syms_of_buffer): Add `minor-modes' as a new permanently-local
variable.
* src/buffer.h (struct buffer): Add minor_modes_.
Stefan Monnier [Sun, 14 Feb 2021 00:24:33 +0000 (19:24 -0500)]
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Reinstate.
Removed by accident.
Stefan Monnier [Sun, 14 Feb 2021 00:22:17 +0000 (19:22 -0500)]
* lisp/emacs-lisp/edebug.el: Fix `called-interactively-p`
And get rid of the old special-case handling of `interactive-p`, which
is now redundant.
(edebug--called-interactively-skip): Fix lexical-binding case,
and adjust to some formerly missed call patterns.
(edebug-def-interactive, edebug-interactive-p): Remove vars.
(edebug-interactive-p-name, edebug-wrap-def-body)
(edebug-make-enter-wrapper): Remove functions.
(edebug-list-form): Don't special-case `interactive-p`.
Stefan Monnier [Sat, 13 Feb 2021 22:50:31 +0000 (17:50 -0500)]
* lisp/emacs-lisp/edebug.el (edebug-match-lambda-expr): Delete function
(lambda-expr): Define with `def-edebug-elem-spec` instead.
(edebug--handle-&-spec-op): Remove left over code.
(interactive): Re-add mistakenly removed spec elem.
* doc/lispref/edebug.texi (Specification List): Remove `function-form`.
Alan Third [Sun, 31 Jan 2021 20:19:53 +0000 (20:19 +0000)]
Fix flicker when resizing NS frame programmatically (bug#46155)
; Incidentally fixes bug#21326.
* src/nsterm.m ([EmacsView viewWillDraw]): New function.
([EmacsView viewDidResize:]): We now have to mark the frame for
display on resize.
([EmacsView initFrameFromEmacs:]): Retain frame contents on resize.
([EmacsView updateLayer]): Don't update the layer if the frame is
still garbaged.
Alan Third [Wed, 10 Feb 2021 22:12:16 +0000 (22:12 +0000)]
Remove aliasing on SVG images under scaled NS frames
* src/image.c (FRAME_SCALE_FACTOR): New #define for getting frame
scale factor.
(image_set_transform):
(svg_load_image): Use FRAME_SCALE_FACTOR.
* src/nsterm.m (ns_frame_scale_factor): Get the scale factor for an NS
frame.