]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoFix recently introduced bug in `byte-compile-lambda'
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).

3 years ago; Finish recent rename of completion-* predicates.
Basil L. Contovounesios [Wed, 17 Feb 2021 13:27:56 +0000 (13:27 +0000)]
; Finish recent rename of completion-* predicates.

3 years agoClarify 'read-extended-command-predicate' in NEWS
Lars Ingebrigtsen [Wed, 17 Feb 2021 11:15:07 +0000 (12:15 +0100)]
Clarify 'read-extended-command-predicate' in NEWS

3 years agoChange name for the completion-* predicates
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.

3 years ago* configure.ac: Replace obsolete AC_CHECK_HEADER usage. (Bug#46578)
Glenn Morris [Wed, 17 Feb 2021 05:25:18 +0000 (21:25 -0800)]
* configure.ac: Replace obsolete AC_CHECK_HEADER usage.  (Bug#46578)

3 years ago* configure.ac: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE.
Glenn Morris [Wed, 17 Feb 2021 04:54:46 +0000 (20:54 -0800)]
* configure.ac: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE.

3 years agoRemove TIME_WITH_SYS_TIME, unused for a long time
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)

3 years agocperl-mode: Improve detection of index entries for imenu
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).

3 years agoDon't move point in `exif-parse-buffer'
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).

3 years agoFix edebug spec for minibuffer-with-setup-hook
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).

3 years agoClarify Gnus Agent expiry quirks
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).

3 years agothumbs.el: avoid creating thumbs directory on loading library
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.

3 years ago* admin/cus-test.el (cus-test-load-libs): Quieten loading.
Glenn Morris [Tue, 16 Feb 2021 20:03:39 +0000 (12:03 -0800)]
* admin/cus-test.el (cus-test-load-libs): Quieten loading.

3 years ago* admin/cus-test.el (cus-test-get-lisp-files): Ignore loaddefs files.
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.

3 years ago* lisp/tab-bar.el: Fix behavior of toggle-frame-tab-bar (bug #46299)
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.

3 years agoPacify unused function warning in xfns.c with GTK2
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.

3 years agoRevert "Fix problem of point movement in image-mode"
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.

3 years agoFix problem of point movement in image-mode
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).

3 years agoDo interactive mode tagging for info.el
Lars Ingebrigtsen [Tue, 16 Feb 2021 13:21:52 +0000 (14:21 +0100)]
Do interactive mode tagging for info.el

3 years agoDon't resize images in image-mode if we have a rotation
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).

3 years agomake smerge-vc-next-conflict wrap around
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).

3 years agoDo `interactive' mode tagging in gomoku.el
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.

3 years ago* lisp/play/gomoku.el: Minor doc fixes; formatting.
Stefan Kangas [Tue, 16 Feb 2021 08:56:17 +0000 (09:56 +0100)]
* lisp/play/gomoku.el: Minor doc fixes; formatting.

3 years ago* lisp/emacs-lisp/bindat.el: Add 64bit int support
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.

3 years agoFix admin/check-doc-strings for new DEFUN format
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.

3 years ago* lisp/emacs-lisp/bindat.el: Clarify when field labels are optional
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`.

3 years ago* lisp/emacs-lisp/bindat.el (bindat-spec): New macro.
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.

3 years ago; Fix last change in simple.el.
Basil L. Contovounesios [Mon, 15 Feb 2021 21:50:38 +0000 (21:50 +0000)]
; Fix last change in simple.el.

3 years ago* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Warn on empty let bodies
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

3 years agoDisplay yearly ical events from first year on. Fix Bug#23100.
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)

3 years ago* lisp/calc/calc-sel.el (calc-replace-sub-formula): Fix typo
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>

3 years ago* lisp/emacs-lisp/bindat.el: Expose the `struct` variable (bug#46534)
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.

3 years agoAllow overriding declared predicates, too
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.

3 years agoDo `interactive' mode tagging in the remaining lisp/gnus files
Lars Ingebrigtsen [Mon, 15 Feb 2021 12:43:27 +0000 (13:43 +0100)]
Do `interactive' mode tagging in the remaining lisp/gnus files

3 years agoAdd a new variable `global-minor-modes'
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.

3 years agoRename minor-modes to local-minor-modes
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.

3 years ago* lisp/emacs-lisp/edebug.el (edebug-&optional, edebug-&rest): Remove vars
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`.

3 years ago* lisp/emacs-lisp/byte-run.el (compiler-macro): Make it Edebuggable
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`.

3 years agoMake the button completion predicate be more useful
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.

3 years agoSpeed up completion-in-mode-p in the common case
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.

3 years agoFix two syntax errors in Specification List
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.

3 years ago* Edebug: Generalize `&lookup`, use it for `cl-macrolet` and `cl-generic`
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.

3 years agoAvoid asking repeatedly about reloading bookmarks file
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.

3 years agoMark up bookmark.el for correct modes
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.

3 years agoAdd a comment to `read-extended-command'
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.

3 years ago* src/xdisp.c (move_it_to): Fix last change. (Bug#46316)
Eli Zaretskii [Sun, 14 Feb 2021 20:11:05 +0000 (22:11 +0200)]
* src/xdisp.c (move_it_to): Fix last change.  (Bug#46316)

3 years agoAdd a possible completion predicate for buttons
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.

3 years agoMake completion-with-modes-p work with minor modes, too
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.

3 years agoFix showing and hiding of tab-bar on new frames (bug#46299)
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.

3 years agoDo command markup in blackbox.el
Lars Ingebrigtsen [Sun, 14 Feb 2021 17:14:36 +0000 (18:14 +0100)]
Do command markup in blackbox.el

3 years agoFix byte-run--set-modes call signature
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).

3 years agoFix missing ' in NEWS
Lars Ingebrigtsen [Sun, 14 Feb 2021 15:57:05 +0000 (16:57 +0100)]
Fix missing ' in NEWS

3 years agoAlso mention `M-o M-o' removal
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'.

3 years agoDon't update `minor-modes' in global modes
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.

3 years agoMark up 5x5 for interactive mode
Lars Ingebrigtsen [Sun, 14 Feb 2021 15:18:39 +0000 (16:18 +0100)]
Mark up 5x5 for interactive mode

3 years ago; * doc/lispref/modes.texi: typo fix
Robert Pluim [Sun, 14 Feb 2021 14:05:58 +0000 (15:05 +0100)]
; * doc/lispref/modes.texi: typo fix

3 years agoFix problem with the newly introduces `minor-modes' variable
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?

3 years agoDo `interactive' mode markup in all Gnus files
Lars Ingebrigtsen [Sun, 14 Feb 2021 13:14:48 +0000 (14:14 +0100)]
Do `interactive' mode markup in all Gnus files

3 years agoReally fix the syntax problem in define-minor-mode
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.

3 years agoFix previous define-minor-mode 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.

3 years agoMark up eww.el for correct modes
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.

3 years agoMake `C-h m' list unbound commands applicable for the mode
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.

3 years agoAllow define-minor-mode to take an :interactive keyword
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.

3 years agoFix dumping of buffers after minor_modes was added
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.

3 years agoRevert the bit about command_modes in previous patch set
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.

3 years agoAdd 'read-extended-command-predicate'
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).

3 years agoMark easy-menu-do-define menus as "not interesting"
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.

3 years agoAdd new 'declare' forms for command completion predicates
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'.

3 years agoExtend the syntax of `interactive' to list applicable 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.

3 years agoFix how `shell-mode' avoids being called interactively
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.

3 years agoIntroduce an :interactive keyword for `defined-derived-mode'
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.

3 years agoRemove redundant :group args from textmodes/*.el
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.

3 years agoAdd a new buffer-local variable `minor-modes'
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_.

3 years ago* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Reinstate.
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.

3 years ago* lisp/emacs-lisp/edebug.el: Fix `called-interactively-p`
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`.

3 years ago* lisp/emacs-lisp/edebug.el (edebug-match-lambda-expr): Delete function
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`.

3 years agoFix flicker when resizing NS frame programmatically (bug#46155)
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.

3 years agoRemove aliasing on SVG images under scaled NS frames
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.

3 years ago* lisp/emacs-lisp/edebug.el (edebug--handle-&-spec-op <&name>): New method
Stefan Monnier [Sat, 13 Feb 2021 21:21:53 +0000 (16:21 -0500)]
* lisp/emacs-lisp/edebug.el (edebug--handle-&-spec-op <&name>): New method

(edebug--concat-name): New function.
(edebug-match-name, edebug-match-cl-generic-method-qualifier)
(edebug-match-cl-generic-method-args): Delete functions.

* doc/lispref/edebug.texi (Specification List): Document it.

* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Use `&name`.
(cl-generic--method-qualifier-p): New predicate.
(cl-defmethod): Use it and `&name`.
* lisp/emacs-lisp/cl-macs.el (cl-defun, cl-iter-defun, cl-flet):
* lisp/emacs-lisp/eieio-compat.el (defmethod):
* lisp/emacs-lisp/gv.el (gv-define-setter):
* lisp/emacs-lisp/ert.el (ert-deftest): Use `&name`.
* lisp/erc/erc-backend.el (define-erc-response-handler): Use `declare`
and `&name`.

3 years ago* etc/NEWS: Document new JSON behavior.
Philipp Stephani [Sat, 13 Feb 2021 18:35:26 +0000 (19:35 +0100)]
* etc/NEWS: Document new JSON behavior.

3 years agoSmall correction to `isearch-lazy-highlight-buffer-update'
Augusto Stoffel [Fri, 12 Feb 2021 18:29:54 +0000 (19:29 +0100)]
Small correction to `isearch-lazy-highlight-buffer-update'

The value of point is now read after a potential change of buffer.
* lisp/isearch.el (isearch-lazy-highlight-buffer-update): Move call
to `point' after `select-window'.

Copyright-paperwork-exempt: yes

3 years ago(backtrace-goto-source-functions): Make it a normal abnormal hook
Stefan Monnier [Sat, 13 Feb 2021 15:41:45 +0000 (10:41 -0500)]
(backtrace-goto-source-functions): Make it a normal abnormal hook

* lisp/emacs-lisp/backtrace.el (backtrace-goto-source-functions):
Don't mark it as buffer-local any more.
(backtrace-goto-source): Use `run-hook-with-args-until-success`.

* lisp/emacs-lisp/edebug.el (edebug-pop-to-backtrace): Clarify that the
hook is only intended to be modified buffer-locally.

3 years agoFix I-search at EOB when long lines are truncated
Eli Zaretskii [Sat, 13 Feb 2021 15:27:02 +0000 (17:27 +0200)]
Fix I-search at EOB when long lines are truncated

* src/xdisp.c (move_it_to): Fix logic when TO_CHARPOS is at the
end of an hscrolled line which ends at EOB.  (Bug#46316)

3 years ago; * src/json.c (Fjson_parse_string): Fix the doc string.
Eli Zaretskii [Sat, 13 Feb 2021 14:10:53 +0000 (16:10 +0200)]
; * src/json.c (Fjson_parse_string): Fix the doc string.

3 years agoPass 'struct json_configuration' as const where possible.
Philipp Stephani [Sat, 13 Feb 2021 13:35:30 +0000 (14:35 +0100)]
Pass 'struct json_configuration' as const where possible.

The JSON serialization and parsing functions don't need to modify
these structures.

* src/json.c (lisp_to_json_nonscalar_1, lisp_to_json_nonscalar)
(lisp_to_json, json_to_lisp): Mark configuration object parameter as
const.

3 years agoAllow any JSON value at the top level (Bug#42994).
Philipp Stephani [Sat, 13 Feb 2021 13:25:42 +0000 (14:25 +0100)]
Allow any JSON value at the top level (Bug#42994).

Newer standards like RFC 8259, which obsoletes the earlier RFC 4627,
now allow any top-level value unconditionally, so Emacs should too.

* src/json.c (Fjson_serialize, Fjson_insert): Pass JSON_ENCODE_ANY to
allow serialization of any JSON value.  Call 'lisp_to_json' instead of
'lisp_to_json_toplevel'.  Remove obsolete comments
(neither JSON_DECODE_ANY nor JSON_ALLOW_NUL are allowed here).  Reword
documentation strings.
(Fjson_parse_string, Fjson_parse_buffer): Pass JSON_DECODE_ANY to
allow deserialization of any JSON value.  Reword documentation
strings.
(lisp_to_json_nonscalar, lisp_to_json_nonscalar_1): Rename from
"toplevel" to avoid confusion.
(lisp_to_json): Adapt caller.
* test/src/json-tests.el (json-serialize/roundtrip-scalars): New unit
test.
* doc/lispref/text.texi (Parsing JSON): Update documentation.

3 years agoRemove stale comments from gnus-msg.el
Basil L. Contovounesios [Sat, 13 Feb 2021 12:47:59 +0000 (12:47 +0000)]
Remove stale comments from gnus-msg.el

* lisp/gnus/gnus-msg.el (gnus-group-mail, gnus-group-news)
(gnus-summary-mail-other-window, gnus-summary-news-other-window):
Remove stale comments about let-binding gnus-newsgroup-name, as they
should have been addressed (bug#37871#38).

3 years agoFix vertical cursor motion among many images
Eli Zaretskii [Sat, 13 Feb 2021 12:57:25 +0000 (14:57 +0200)]
Fix vertical cursor motion among many images

* src/xdisp.c (move_it_in_display_line_to): Consider it
MOVE_POS_MATCH_OR_ZV if we are just after an image, stretch, or
display string, and the position matches exactly.  This is needed
when one image follows another at TO_CHARPOS.  (Bug#46464)

3 years agoadd-minor-mode doc string clarification
Lars Ingebrigtsen [Sat, 13 Feb 2021 11:46:34 +0000 (12:46 +0100)]
add-minor-mode doc string clarification

* lisp/subr.el (add-minor-mode): Clarify that this function isn't
only about XEmacs compat stuff.

3 years agoDelete 20 year old comment in executable.el
Stefan Kangas [Sat, 13 Feb 2021 06:22:44 +0000 (07:22 +0100)]
Delete 20 year old comment in executable.el

* lisp/progmodes/executable.el (executable-insert): Delete 20 year old
comment.

3 years agoRemove redundant :group args in progmodes/*.el
Stefan Kangas [Sat, 13 Feb 2021 04:18:55 +0000 (05:18 +0100)]
Remove redundant :group args in progmodes/*.el

* lisp/progmodes/bug-reference.el:
* lisp/progmodes/cfengine.el:
* lisp/progmodes/cmacexp.el:
* lisp/progmodes/cpp.el:
* lisp/progmodes/cwarn.el:
* lisp/progmodes/dcl-mode.el:
* lisp/progmodes/executable.el:
* lisp/progmodes/flymake.el:
* lisp/progmodes/gud.el:
* lisp/progmodes/hideshow.el:
* lisp/progmodes/icon.el:
* lisp/progmodes/inf-lisp.el:
* lisp/progmodes/js.el:
* lisp/progmodes/ld-script.el:
* lisp/progmodes/make-mode.el:
* lisp/progmodes/modula2.el:
* lisp/progmodes/pascal.el:
* lisp/progmodes/perl-mode.el:
* lisp/progmodes/prog-mode.el:
* lisp/progmodes/simula.el:
* lisp/progmodes/xscheme.el: Remove redundant :group args.

3 years agoEdebug: Make it possible to debug `gv-expander`s in `declare`
Stefan Monnier [Sat, 13 Feb 2021 03:53:38 +0000 (22:53 -0500)]
Edebug: Make it possible to debug `gv-expander`s in `declare`

Arrange for declarations to be able to specify their own specs via
the `edebug-declaration-spec` property.

* lisp/emacs-lisp/edebug.el: (edebug--get-declare-spec): New function.
(def-declarations): New spec element.
(defun, defmacro): Use it in their spec.

* lisp/emacs-lisp/gv.el (gv-expander, gv-setter):
Set `edebug-declaration-spec`.

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-gv-expander): New test.

* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-use-gv-expander): New test case.

3 years agoComment out mysterious code from cperl-mode.el
Stefan Kangas [Fri, 12 Feb 2021 23:21:36 +0000 (00:21 +0100)]
Comment out mysterious code from cperl-mode.el

* lisp/progmodes/cperl-mode.el: Comment out mysterious code referring
to some unknown variable 'edit-var-mode-alist'.  No one seems to know
what it is used for, so comment it out and see if anyone complains
before Emacs 28.1 or 28.2.

3 years agoRemove outdated documentation from cperl-mode.el
Stefan Kangas [Fri, 12 Feb 2021 23:10:38 +0000 (00:10 +0100)]
Remove outdated documentation from cperl-mode.el

* lisp/progmodes/cperl-mode.el (cperl-tips, cperl-problems)
(cperl-praise, cperl-speed, cperl-mode): Doc fixes; remove references
to very old versions of Emacs and other "Emaxen".
(cperl-problems-old-emaxen): Make obsolete and remove information on
Emacs 20.3 and older.

3 years agoEdebug: Overload `edebug-form-spec` even less
Stefan Monnier [Sat, 13 Feb 2021 00:28:25 +0000 (19:28 -0500)]
Edebug: Overload `edebug-form-spec` even less

The `edebug-form-spec` symbol property was used both to map forms's
head symbol to the corresponding spec, and to map spec element names
to their expansion.

This lead to name conflicts which break instrumentation of examples such as

    (cl-flet ((gate (x) x)) (gate 4))

because of the Edebug spec element `gate`.
So introduce a new symbol property `edebug-elem-spec`.

* lisp/subr.el (def-edebug-elem-spec): New function.

* lisp/emacs-lisp/edebug.el (edebug--get-elem-spec): New function.
(edebug-match-symbol): Use it.
(Core Edebug elems): Put them on `edebug-elem-spec` instead of
`edebug-form-spec`.
(ELisp special forms): Set their `edebug-form-spec` via dolist.
(Other non-core Edebug elems): Use `def-edebug-elem-spec`.
(edebug-\`): Use `declare`.

* lisp/emacs-lisp/pcase.el (pcase-PAT, pcase-FUN, pcase-QPAT):
* lisp/skeleton.el (skeleton-edebug-spec):
* lisp/emacs-lisp/cl-macs.el: Use `def-edebug-elem-spec`.

* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests--conflicting-internal-names): New test.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-cl-flet1): New test case.

* doc/lispref/edebug.texi (Specification List): Add `def-edebug-elem-spec`.
(Specification Examples): Use it.

* doc/lispref/loading.texi (Hooks for Loading): Avoid the use of
`def-edebug-spec` in example (better use `debug` declaration).

3 years agoRemove XEmacs and Emacs 21 compat code from cperl-mode
Stefan Kangas [Fri, 12 Feb 2021 18:07:12 +0000 (19:07 +0100)]
Remove XEmacs and Emacs 21 compat code from cperl-mode

* lisp/progmodes/cperl-mode.el (cperl-mode): Remove XEmacs and
Emacs 21 compat code.
(cperl-compilation-error-regexp-list): New variable.
(cperl-compilation-error-regexp-alist): Make obsolete.

3 years agoFix ElDoc setup for eval-expression
Basil L. Contovounesios [Fri, 12 Feb 2021 21:26:08 +0000 (21:26 +0000)]
Fix ElDoc setup for eval-expression

* lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Don't set
global value of eldoc-documentation-strategy (bug#44886).

3 years agoUse `declare` instead of `def-edebug-spec` in most places
Stefan Monnier [Fri, 12 Feb 2021 21:08:01 +0000 (16:08 -0500)]
Use `declare` instead of `def-edebug-spec` in most places

* lisp/speedbar.el: Use lexical-binding.
(speedbar-with-writable): Use `declare`.

* lisp/subr.el (def-edebug-spec): Use `declare`.

* lisp/cedet/ede/base.el: Use lexical-binding.
(ede-with-projectfile): Use `declare`.
(recentf-exclude): Declare var.

* lisp/cedet/ede/pmake.el: Use lexical-binding.
(ede-pmake-insert-variable-shared, ede-pmake-insert-variable-once):
Use `declare`.

* lisp/cedet/ede/proj-comp.el: Use lexical-binding.
(ede-compiler-begin-unique, ede-compiler-only-once)
(ede-linker-begin-unique, ede-linker-only-once): Use `declare`.

* lisp/cedet/semantic/ctxt.el: Use lexical-binding.
(semantic-with-buffer-narrowed-to-context)
(semantic-with-buffer-narrowed-to-command): Use `declare`.
(semantic--progress-reporter): Declare var.
(semantic-ctxt-end-of-symbol-default): Remove unused var `fieldsep`.

* lisp/cedet/semantic/lex-spp.el: Use lexical-binding.
(define-lex-spp-macro-declaration-analyzer)
(define-lex-spp-include-analyzer, semantic-lex-with-macro-used)
(define-lex-spp-macro-undeclaration-analyzer): Use `declare`.
(semantic-lex-spp-symbol-remove): Rename arg to avoid colliding with
dynamic variable `obarray`.
(semantic-lex-spp-symbol-pop): Remove unused var `oldvalue`.
(semantic-lex-spp-lex-text-string): Remove unused var `analyzer`.

* lisp/cedet/semantic/lex.el (define-lex)
(semantic-lex-unterminated-syntax-protection, define-lex-analyzer)
(define-lex-regex-analyzer, define-lex-block-analyzer)
(semantic-lex-catch-errors): Use `declare`.

* lisp/cedet/semantic/tag.el: Use lexical-binding.
(semantic-with-buffer-narrowed-to-current-tag)
(semantic-with-buffer-narrowed-to-tag): Use `declare`.

* lisp/cedet/semantic/wisent.el: Use lexical-binding.
(define-wisent-lexer): Use `declare`.

* lisp/emacs-lisp/cl-lib.el (cl-pushnew): The arg to :test can be any
form not just function form.

* lisp/org/ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Use `declare`.

* lisp/org/ob-core.el (org-babel-map-src-blocks): Use `declare`.
(org-babel-result-cond): Simplify edebug spec.

* lisp/org/org-clock.el (org-with-clock-position, org-with-clock):
* lisp/org/org-agenda.el (org-agenda-with-point-at-orig-entry):
* lisp/org/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`.

* lisp/textmodes/rst.el (push): Remove redundant edebug spec.

* lisp/vc/pcvs-parse.el: Use lexical-binding.
(cvs-parse-buffer): Rename arg to avoid dynbound conflict.
(cvs-or): Use `declare`.

3 years agoSimplify expression in byte-code decompiler
Mattias Engdegård [Fri, 12 Feb 2021 18:43:41 +0000 (19:43 +0100)]
Simplify expression in byte-code decompiler

* lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1):
Replace roundabout expression with what it essentially does.

3 years agobyte-opt.el: More concise expression
Mattias Engdegård [Fri, 12 Feb 2021 18:41:07 +0000 (19:41 +0100)]
byte-opt.el: More concise expression

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Refactor `setq` clause.