]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago* Fix truncated warnings (bug#47024)
Andrea Corallo [Wed, 10 Mar 2021 14:50:58 +0000 (15:50 +0100)]
* Fix truncated warnings (bug#47024)

* lisp/emacs-lisp/comp.el (comp-run-async-workers): Bind
`warning-fill-column' to `most-positive-fixnum'.

3 years ago* src/comp.c (ABI_VERSION): Bump following-up 380ba045c4.
Andrea Corallo [Tue, 9 Mar 2021 15:35:13 +0000 (16:35 +0100)]
* src/comp.c (ABI_VERSION): Bump following-up 380ba045c4.

3 years ago* test/src/comp-test-funcs.el (comp-test-46670-1-f): Remove a warning.
Andrea Corallo [Tue, 9 Mar 2021 11:06:28 +0000 (12:06 +0100)]
* test/src/comp-test-funcs.el (comp-test-46670-1-f): Remove a warning.

3 years agoMerge commit '9cbdf20316' into native-comp
Andrea Corallo [Tue, 9 Mar 2021 09:03:47 +0000 (10:03 +0100)]
Merge commit '9cbdf20316' into native-comp

3 years ago* Fix comp unit type decl in eln files to fix GC crash (bug#46256)
Pip Cet [Mon, 8 Mar 2021 20:49:59 +0000 (20:49 +0000)]
* Fix comp unit type decl in eln files to fix GC crash (bug#46256)

* src/comp.c (emit_ctxt_code): Allocate comp_unit as a Lisp_Object,
not a pointer to pointer to Lisp_Object.

3 years agoZero stale pointer when unloading comp units (bug#46256)
Pip Cet [Sun, 7 Mar 2021 21:26:29 +0000 (21:26 +0000)]
Zero stale pointer when unloading comp units (bug#46256)

* src/alloc.c (cleanup_vector): Call unload_comp_unit.
* src/comp.c (unload_comp_unit): New function.

3 years ago* Handle `comp-native-driver-options' both as file-local both as global
Andrea Corallo [Sun, 7 Mar 2021 20:56:06 +0000 (21:56 +0100)]
* Handle `comp-native-driver-options' both as file-local both as global

* src/comp.c (add_driver_options): Throw an error if
`comp-native-driver-options' is set globally but
'gcc_jit_context_add_driver_option' is not available, ignore for
the file-local case.

3 years agoUse `length=' and family where possible in native comp code
Andrea Corallo [Sun, 7 Mar 2021 20:26:55 +0000 (21:26 +0100)]
Use `length=' and family where possible in native comp code

* lisp/emacs-lisp/comp-cstr.el (comp-intersect-typesets)
(comp-cstr-imm): Use Use `length=' and family where possible.
* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-target-block)
(comp-compute-dominator-frontiers)
(batch-byte-native-compile-for-bootstrap): Likewise.

3 years ago; * src/comp.c (load_comp_unit): Fix a comment.
Andrea Corallo [Sun, 7 Mar 2021 20:01:35 +0000 (21:01 +0100)]
; * src/comp.c (load_comp_unit): Fix a comment.

3 years ago* lisp/emacs-lisp/comp.el (w32-get-nproc): Suppress warning declaring it.
Andrea Corallo [Sun, 7 Mar 2021 19:25:28 +0000 (20:25 +0100)]
* lisp/emacs-lisp/comp.el (w32-get-nproc): Suppress warning declaring it.

For non Windows system.

3 years agoAllow for `comp-native-driver-options' to work as a file-local variable.
Andrea Corallo [Sun, 7 Mar 2021 19:19:20 +0000 (20:19 +0100)]
Allow for `comp-native-driver-options' to work as a file-local variable.

3 years ago* Work around GCC PR99126 on all libgccjit < 11
Andrea Corallo [Sun, 7 Mar 2021 18:48:04 +0000 (19:48 +0100)]
* Work around GCC PR99126 on all libgccjit < 11

* src/comp.c (Fcomp__compile_ctxt_to_file): Work around GCC
PR99126 on all libgccjit < 11.

3 years agoAvoid aborts in native-comp subprocesses when exiting Emacs on Windows
Eli Zaretskii [Sun, 7 Mar 2021 14:31:35 +0000 (16:31 +0200)]
Avoid aborts in native-comp subprocesses when exiting Emacs on Windows

* src/w32.c (shutdown_handler): Clear the message stack when being
shut down in noninteractive mode, to avoid aborting in
shut_down_emacs when a native-compilation subprocess is killed
because the parent Emacs exits.

3 years agoFix encoding of file names in comp.c
Eli Zaretskii [Sun, 7 Mar 2021 13:52:20 +0000 (15:52 +0200)]
Fix encoding of file names in comp.c

* src/comp.c (Fcomp__compile_ctxt_to_file) [WINDOWSNT]: Fix
encoding of file names passed to libgccjit.

3 years agoUse MS-Windows system APIs to get number of processors
Eli Zaretskii [Sun, 7 Mar 2021 13:32:55 +0000 (15:32 +0200)]
Use MS-Windows system APIs to get number of processors

* lisp/emacs-lisp/comp.el: Use 'w32-get-nproc' instead of the
environment variable NUMBER_OF_PROCESSORS.

* src/w32proc.c (Fw32_get_nproc): New primitive.
* src/w32.c (w32_get_nproc): New function.
(sample_system_load): Call w32_get_nproc to initialize the number
of processors on this system.
* src/w32.h (w32_get_nproc): Add prototype.

3 years ago; * src/comp.c (Fcomp__compile_ctxt_to_file) [WINDOWSNT]: Fix last change.
Eli Zaretskii [Sun, 7 Mar 2021 10:53:51 +0000 (12:53 +0200)]
; * src/comp.c (Fcomp__compile_ctxt_to_file) [WINDOWSNT]: Fix last change.

3 years agoFix libgccjit PROGNAME on MS-Windows
Eli Zaretskii [Sun, 7 Mar 2021 10:49:05 +0000 (12:49 +0200)]
Fix libgccjit PROGNAME on MS-Windows

* src/comp.c [WINDOWSNT]: Import gcc_jit_context_set_str_option.
(init_gccjit_functions): Load gcc_jit_context_set_str_option.
(gcc_jit_context_set_str_option) [WINDOWSNT]: New macro.
(Fcomp__compile_ctxt_to_file) [WINDOWSNT]: Pass the actual name of
the libgccjit DLL to the library, to be used as PROGNAME.

3 years agoFix `comp-cstr-intersection-no-hashcons' for negated result cstr
Andrea Corallo [Sat, 6 Mar 2021 21:36:50 +0000 (22:36 +0100)]
Fix `comp-cstr-intersection-no-hashcons' for negated result cstr

* lisp/emacs-lisp/comp-cstr.el
(comp-cstr-intersection-no-hashcons): When negated and
necessary relax dst to t.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.

3 years agoFix miscompilation of funcall forms in some cases (bug#46974)
Pip Cet [Sat, 6 Mar 2021 20:53:57 +0000 (20:53 +0000)]
Fix miscompilation of funcall forms in some cases (bug#46974)

* lisp/emacs-lisp/comp.el (comp-call-optim-func): Call
comp-cstr-imm-vld-p before relying on comp-cstr-imm to return the
right value.

3 years ago* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-simple): Suppress warning.
Andrea Corallo [Sat, 6 Mar 2021 19:51:11 +0000 (20:51 +0100)]
* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-simple): Suppress warning.

3 years agoFix `=' propagation to handle -0.0 0.0 case
Andrea Corallo [Sat, 6 Mar 2021 19:38:00 +0000 (20:38 +0100)]
Fix `=' propagation to handle -0.0 0.0 case

* lisp/emacs-lisp/comp-cstr.el
(comp-cstr-intersection-homogeneous): Fix indent + use `memql'.
(comp-cstr-=): Handle 0.0 -0.0 idiosyncrasy
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two
tests and fix enumeration.

3 years ago* src/Makefile.in (base_obj): Remove GMP_OBJ, undefined since 202007.
Glenn Morris [Sat, 6 Mar 2021 19:37:11 +0000 (11:37 -0800)]
* src/Makefile.in (base_obj): Remove GMP_OBJ, undefined since 202007.

3 years agoDon't pass implicit flags to sub-makes
Glenn Morris [Sat, 6 Mar 2021 19:09:19 +0000 (11:09 -0800)]
Don't pass implicit flags to sub-makes

* Makefile.in (info_misc, uninstall, texi_misc):
Don't pass any implicit make flags to sub-makes.
Ref https://lists.gnu.org/r/help-make/2021-03/msg00007.html

3 years agoRemove the --without-makeinfo configure option (bug#46837)
Glenn Morris [Sat, 6 Mar 2021 18:38:07 +0000 (10:38 -0800)]
Remove the --without-makeinfo configure option (bug#46837)

* configure.ac (--without-makeinfo): Remove option.
(HAVE_MAKEINFO): Remove output variable.

* Makefile.in (HAVE_MAKEINFO): Remove.
(info_misc): Remove HAVE_MAKEINFO check.
(info-real): Remove target.
(info): Simplify.

; * etc/NEWS: Mention this.

3 years ago* lisp/cedet/srecode/compile.el: Fix last change
Stefan Monnier [Sat, 6 Mar 2021 18:31:58 +0000 (13:31 -0500)]
* lisp/cedet/srecode/compile.el: Fix last change

(srecode-compile-inserter): Call `make-instance` properly.

3 years agoSpeed up json.el encoding
Basil L. Contovounesios [Sun, 21 Feb 2021 20:10:08 +0000 (20:10 +0000)]
Speed up json.el encoding

This replaces most json-encode-* functions with similar
json--print-* counterparts that insert into the current buffer
instead of returning a string (bug#46761).

Some unused but useful json-encode-* functions are kept for backward
compatibility and as a public API, and the rest are deprecated.

* etc/NEWS: Announce obsoletions.

* lisp/json.el: Document organization of library.  Make subsection
headings more consistent.
(json--encoding-current-indentation): Rename...
(json--print-indentation-prefix): ...to this, to reflect new use.
(json--encode-stringlike, json--encode-alist): Rename...
(json--print-stringlike, json--print-alist): ...to these,
respectively, and encode argument into current buffer instead.  All
callers changed.

(json--print-string, json--print-unordered-map, json--print-array)
(json--print): New functions.
(json-encode-string, json-encode-plist, json-encode-array)
(json-encode): Use them, respectively.

(json-encode-number, json-encode-hash-table): Mark as obsolete
aliases of json-encode.
(json-encode-key, json-encode-list): Mark as obsolete in preference
for json-encode.

(json--print-indentation-depth, json--print-keyval-separator): New
variables.
(json--with-output-to-string): New macro.
(json--print-indentation, json--print-keyword, json--print-key)
(json--print-pair, json--print-map, json--print-list): New
functions.

(json--with-indentation): Use json--print-indentation-depth to avoid
unnecessary string allocation.
(json-encoding-default-indentation, json-pretty-print-max-secs):
Clarify docstrings.
(json--escape, json--long-string-threshold, json--string-buffer):
Remove; no longer used.

* lisp/progmodes/js.el (js--js-encode-value): Replace
json-encode-string and json-encode-number with json-encode.
(js-eval-defun): Use json--print-list to avoid
json-encode-list->insert roundtrip.

* test/lisp/json-tests.el (test-json-encode-number)
(test-json-encode-hash-table, test-json-encode-hash-table-pretty)
(test-json-encode-hash-table-lisp-style)
(test-json-encode-hash-table-sort,  test-json-encode-list):  Replace
uses of obsolete functions with the equivalent use of json-encode.
(test-json-encode-key): Suppress obsoletion warnings.
(test-json-encode-string): Check that text properties are stripped.

3 years ago* lisp/emacs-lisp/bindat.el (bindat-struct): Fix Edebug def
Stefan Monnier [Sat, 6 Mar 2021 18:19:46 +0000 (13:19 -0500)]
* lisp/emacs-lisp/bindat.el (bindat-struct): Fix Edebug def

3 years ago* lisp/emulation/: Use lexical-binding
Stefan Monnier [Sat, 6 Mar 2021 18:03:12 +0000 (13:03 -0500)]
* lisp/emulation/: Use lexical-binding

* lisp/emulation/cua-base.el: Use lexical-binding.
Remove redundant `:group` arguments.
(cua-mode): Don't use `:require` since the autoload on `define-minor-mode`
takes care of loading the mode when custom-setting it.

* lisp/emulation/cua-gmrk.el: Use lexical-binding.
(cua--copy-rectangle-to-global-mark): Remove unused var `src-buf`.

* lisp/emulation/edt-mapper.el: Use lexical-binding.

* lisp/emulation/edt.el: Use lexical-binding.
Remove redundant `:group` arguments.
(edt-with-position): Allow `top`, `left`, and `far` to be left unused
in `body`.

* lisp/emulation/keypad.el: Use lexical-binding.

* lisp/emulation/viper-cmd.el: Move `provide` to the end.
(viper-read-string-with-history): Strength reduce `eval` to `symbol-value`.

* lisp/emulation/viper-ex.el: Use lexical-binding.
Remove redundant `:group` arguments.
Move `provide` to the end.

* lisp/emulation/viper-init.el: Use lexical-binding.

* lisp/emulation/viper-keym.el (viper-toggle-key): Use `dolist`.
(viper-insert-diehard-map): Use `string`.
(viper-modify-major-mode): Use `alist-get` and `setf`.

* lisp/emulation/viper-macs.el (viper-ex-work-buf):
Move `provide` to the end.
(viper-record-kbd-macro): Strength reduce `eval` to `symbol-value`.
(viper-describe-kbd-macros): Return value is not significant.
(viper-keyseq-is-a-possible-macro): Use `seq-some`.
(viper-common-seq-prefix): Use `seq-every-p`.

* lisp/emulation/viper-mous.el: Use lexical-binding.
Remove redundant `:group` arguments.
Move `provide` to the end.
(viper-remember-current-frame): Accept arbitrary ignored args.
(viper-parse-mouse-key): Strength reduce `eval` to `symbol-value`.
Remove unused var `key-spec`.
(viper-bind-mouse-search-key, viper-bind-mouse-insert-key):
Apply de Morgan.

* lisp/emulation/viper-util.el: Move `provide` to the end.
(viper-move-marker-locally, viper-push-onto-ring, viper-save-setting):
Strength reduce `eval` to `symbol-value`.
(viper-event-vector-p, viper-char-symbol-sequence-p, viper-char-array-p):
Use `seq-every-p`.

* lisp/emulation/viper.el (viper-non-hook-settings): Eta-reduce use of
`viper-remember-current-frame`.

3 years agoVarious map.el improvements
Basil L. Contovounesios [Wed, 24 Feb 2021 00:53:05 +0000 (00:53 +0000)]
Various map.el improvements

* lisp/emacs-lisp/seq.el (seq-do-indexed): Return nil as per doc.

* lisp/emacs-lisp/map.el: Require Emacs >= 26 due to dependence on
5-arg alist-get.  Bump package to version 3.0.  Fix other
headers.  (Bug#46754)
(map--plist-p): Detect list starting with nil as plist, not alist.
(map-elt, map-filter, map-apply, map--make-pcase-bindings)
(map--make-pcase-patterns): Simplify.
(map-let, map-put, map-nested-elt, mapp): Update docstring for plist
support.
(map-delete): Fix OBOE on arrays.  Split into cl-defmethods.
(map-values, map-values-apply): Specialize for arrays.
(map-pairs, map-keys-apply, map-put!): Improve docstring.
(map-length): Clarify docstring w.r.t. duplicate keys.  Split into
cl-defmethods.  Optimize default implementation.
(map-copy): Use copy-alist on alists.  Split into cl-defmethods.
(map-contains-key): Add plist support.  Clarify docstring
w.r.t. optional argument.  Simplify default implementation.
(map-some, map-every-p, map-merge, map-merge-with, map--into-hash):
Don't use map-apply for side effects.
(map-into): Preserve plist ordering.  Improve docstrings.
(map-insert): Add hash-table and array support.
(map-inplace): Remove unused error symbol.
(map-do): Return nil as per doc.

* etc/NEWS: Announce new user-visible behavior.

* test/lisp/emacs-lisp/map-tests.el: Prefer should-not
over (should (not ...)) in general.
(with-maps-do): Fix docstring.
(with-empty-maps-do): New macro.
(test-map-elt-default, test-mapp, test-map-keys, test-map-values)
(test-map-pairs, test-map-length, test-map-copy, test-map-apply)
(test-map-do, test-map-keys-apply, test-map-values-apply)
(test-map-filter, test-map-remove, test-map-empty-p)
(test-map-contains-key, test-map-some, test-map-every-p):
Use it.

(test-map-plist-p, test-map-put!-new-keys, test-map-insert-empty)
(test-map-insert, test-map-delete-empty, test-map-copy-alist)
(test-map-contains-key-testfn, test-map-into-hash-test)
(test-map-into-empty, test-map-merge, test-map-merge-empty):
New tests.

(test-map-elt): Test array key that is within bounds but not fixnum.
(test-map-put!): Use map--plist-p.  Remove redundant tests.
(test-map-put-alist-new-key): Don't modify list literal.
(test-map-put-testfn-alist, test-map-put-return-value): Silence
obsoletion warnings.
(test-map-delete): Check for OBOE on arrays.
(test-map-delete-return-value): Remove test made redundant by
test-map-delete.
(test-map-nested-elt, test-map-into): Test plists too.

3 years agoCC Mode: Fix calculation of c-parse-state when there're macros with braces
Alan Mackenzie [Sat, 6 Mar 2021 15:22:25 +0000 (15:22 +0000)]
CC Mode: Fix calculation of c-parse-state when there're macros with braces

This fixes bug #46951.

* lisp/progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache):
Ensure the starting point for backward scanning is not within a macro which
doesn't contain HERE.

3 years ago* lisp/progmodes/flymake.el (flymake-log): Push the right code
Stefan Monnier [Sat, 6 Mar 2021 14:56:43 +0000 (09:56 -0500)]
* lisp/progmodes/flymake.el (flymake-log): Push the right code

3 years ago* lisp/progmodes/flymake.el (flymake-log): Simplify
Stefan Monnier [Sat, 6 Mar 2021 14:55:30 +0000 (09:55 -0500)]
* lisp/progmodes/flymake.el (flymake-log): Simplify

3 years agoRevert "Fix Makefile subshell output when run in parallel"
Eli Zaretskii [Sat, 6 Mar 2021 14:49:00 +0000 (16:49 +0200)]
Revert "Fix Makefile subshell output when run in parallel"

This reverts commit 117505454ce04c0c0ce2c2b4058823cf764fc2eb.
It breaks the build for versions of GNU Make that don't support -O.

3 years agoFix Makefile subshell output when run in parallel
Basil L. Contovounesios [Sat, 6 Mar 2021 11:40:48 +0000 (11:40 +0000)]
Fix Makefile subshell output when run in parallel

For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-03/msg00255.html

* Makefile.in (texi_misc): Avoid interspersing parallel Make output
with that from subshell.

3 years agoPacify some semantic-tag-make-plist warnings
Basil L. Contovounesios [Sat, 6 Mar 2021 13:13:40 +0000 (13:13 +0000)]
Pacify some semantic-tag-make-plist warnings

* lisp/cedet/semantic/tag.el (semantic-tag-make-plist): Define
before its first use to pacify some recent "may not be defined at
runtime" warnings after turning on lexical-binding.

3 years agoRemove mention of using defun- and defvar- as prefixes
Lars Ingebrigtsen [Sat, 6 Mar 2021 12:27:34 +0000 (13:27 +0100)]
Remove mention of using defun- and defvar- as prefixes

* doc/lispref/tips.texi (Coding Conventions): Remove mention of
using defun- and defvar- as prefixes, as this is something that we
rarely do in Emacs (bug#46899).

3 years ago; Fix last change.
Eli Zaretskii [Sat, 6 Mar 2021 10:16:37 +0000 (12:16 +0200)]
; Fix last change.

3 years agoImprove documentation of Bindat
Eli Zaretskii [Sat, 6 Mar 2021 10:12:44 +0000 (12:12 +0200)]
Improve documentation of Bindat

* doc/lispref/processes.texi (Bindat Types, Bindat Functions)
(Bindat Computed Types): Improve wording and add indexing.

* etc/NEWS: Add a pointer to the ELisp manual for "Bindat".

3 years agoPull Modus themes version 1.2.3 from upstream
Protesilaos Stavrou [Fri, 5 Mar 2021 18:31:08 +0000 (18:31 +0000)]
Pull Modus themes version 1.2.3 from upstream

This syncs with the following upstream revision:

Update to version 1.2.3
0a36239 2021-03-05 19:43:30 +0200
https://gitlab.com/protesilaos/modus-themes/-/commit/0a36239baf908585cdf32c6188eb86713d9bf6c6

For discussion, see bug#45068 and the following upstream issue:
https://gitlab.com/protesilaos/modus-themes/-/issues/162

* doc/misc/modus-themes.org:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-themes.el:
* etc/themes/modus-vivendi-theme.el: Update to version 1.2.3.

3 years agoUpdate Modus themes to their version 1.2.0
Protesilaos Stavrou [Thu, 4 Mar 2021 14:20:15 +0000 (16:20 +0200)]
Update Modus themes to their version 1.2.0

* doc/misc/modus-themes.org: Add new version of the manual, with
changes to markup and references to the latest state of the project.

* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-operandi-theme.el: Provide updated version of each
theme, which expands the contents of 'modus-themes.el' (bug#45068).

* etc/themes/modus-themes.el: Add new supportive file.  This is where
theme data, functions, and face definitions are defined.

3 years agoConditionally use macroexp-file-name in Flymake
Basil L. Contovounesios [Sat, 6 Mar 2021 09:05:49 +0000 (09:05 +0000)]
Conditionally use macroexp-file-name in Flymake

* lisp/progmodes/flymake.el (flymake-log): Reinstate Emacs 26
support by conditionally using macroexp-file-name which is new in
Emacs 28 (bug#46957).

3 years ago* * lisp/cedet/semantic: Use lexical-binding in the generated grammars
Stefan Monnier [Sat, 6 Mar 2021 04:33:21 +0000 (23:33 -0500)]
* * lisp/cedet/semantic: Use lexical-binding in the generated grammars

* admin/grammars/c.by (typesimple): Bind `semantic-c-classname` dynamically.

* lisp/cedet/semantic/bovine.el: Use lexical-binding.
(semantic-lambda): Silence warnings if the `vals` arg is not used.

* lisp/cedet/semantic/grammar-wy.el: Re-generate.

* lisp/cedet/semantic/bovine/grammar.el: Use lexical-binding.
(bovine-grammar-expand-action): Silence warnings if some of the
`vals`, `start`, or `end` args is not used.
(bovine--make-parser-1): Use lexical-binding in the generated files.

* lisp/cedet/semantic/wisent/grammar.el: Use lexical-binding.
(wisent--make-parser-1): Use lexical-binding in the generated files.

3 years ago; Fix typo.
Stefan Kangas [Sat, 6 Mar 2021 03:08:54 +0000 (04:08 +0100)]
; Fix typo.

3 years agoAdd some new tests for keymap.c
Stefan Kangas [Sat, 6 Mar 2021 02:17:23 +0000 (03:17 +0100)]
Add some new tests for keymap.c

* test/src/keymap-tests.el (keymap-define-key/undefined)
(keymap-define-key/keyboard-macro, keymap-define-key/lambda)
(keymap-define-key/keymap, keymap-define-key/menu-item)
(keymap-lookup-key/list-of-keymaps, keymap-lookup-key/too-long):
New tests.
(keymap-lookup-key): Extend test slightly.

3 years ago* lisp/cedet/srecode/*.el: Use lexical-binding
Stefan Monnier [Sat, 6 Mar 2021 02:00:00 +0000 (21:00 -0500)]
* lisp/cedet/srecode/*.el: Use lexical-binding

* lisp/cedet/srecode/compile.el (srecode-compile-inserter):
Use `make-instance` instead of the class name-as-function.

* lisp/cedet/srecode/fields.el (srecode-field-behind-hook):
Remove unused var `field`.

* lisp/cedet/srecode/find.el (srecode-load-tables-for-mode): Simplify.

* lisp/cedet/srecode/getset.el (srecode-semantic-selected-tag): Declare var.

* lisp/cedet/srecode/mode.el (srecode-minor-mode): Mark references to
non-existing `srecode-m3-items` function.

* lisp/cedet/srecode/srt-mode.el (srecode-parse-this-macro): Remove
unused var `raw`.

3 years agoBindat: new macro-expansion based data layout language
Stefan Monnier [Sat, 6 Mar 2021 00:56:31 +0000 (19:56 -0500)]
Bindat: new macro-expansion based data layout language

Thorough redesign of the Bindat system, which makes it possible
to define new Bindat type forms, define recursive types, control
the values returned when unpacking, freely mix arbitrary computations
with type definitions, as well as support for arbitrary sized
integers.

This also reverts the recent addition of the `bindat-spec` macro and
the support for 64bit integers in the old Bindat language since that
is now considered obsolete anyway.

* doc/lispref/processes.texi (Bindat Types): Rename from `Bindat Spec`
and rewrite for the new sublanguage.
(Bindat Functions): Adjust to the new terminology.
(Bindat Computed Types): New node.

* lisp/emacs-lisp/bindat.el (bindat--type): New type.
(bindat--unpack-u64, bindat--unpack-u64r): Delete functions.
(bindat--unpack-item, bindat--pack-item, bindat--fixed-length-alist):
Revert addition of support for 64bit integers.
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Handle the new `bindat--type` values.
(bindat-spec): Revert addition of this macro.
(bindat--unpack-uint, bindat--unpack-uintr, bindat--pack-uint)
(bindat--pack-uintr): New functions.
(bindat-type, bindat-defmacro, bindat--pcase): New macros.
(bindat-type): New Edebug elem.
(bindat--type): New generic function.
(bindat--primitives): New constant.
(bindat--macroenv, bindat--op): New vars.
(bindat--make-docstring, bindat--fun, bindat--makefun, bindat--toplevel):
New functions.

* test/lisp/emacs-lisp/bindat-tests.el: Use `bindat-type`.
(ip): New Bindat type.
(header-bindat-spec, data-bindat-spec, packet-bindat-spec): Adjust to
new `bindat-type` macro.
(bindat-test-unpack): Simplify now that the order of fields is preserved.
(bindat-test--int-websocket-type, bindat-test--LEB128): New consts.
(bindat-test--pack-val, bindat-test--sint, bindat-test--recursive):
New tests.

3 years agoMake lambda-lifting work again
Mattias Engdegård [Fri, 5 Mar 2021 19:21:01 +0000 (20:21 +0100)]
Make lambda-lifting work again

* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Fix typo.
* test/lisp/emacs-lisp/cconv-tests.el (cconv-convert-lambda-lifted):
Add test case.

3 years agoImprove rcirc-authenticated-hook docstring
Tassilo Horn [Fri, 5 Mar 2021 19:53:18 +0000 (20:53 +0100)]
Improve rcirc-authenticated-hook docstring

* lisp/net/rcirc.el (rcirc-authenticated-hook): Improve docstring.

3 years ago* lisp/emacs-lisp/bindat.el: Minor refactoring
Stefan Monnier [Fri, 5 Mar 2021 18:31:16 +0000 (13:31 -0500)]
* lisp/emacs-lisp/bindat.el: Minor refactoring

(bindat--unpack-str, bindat--unpack-strz, bindat--unpack-bits):
New functions, extracted from `bindat--unpack-item`.
(bindat--unpack-item): Use them.
(bindat--align): New function.
(bindat--unpack-group, bindat--length-group, bindat--pack-group): Use it.
(bindat-get-field): Allow integers to index both lists (as returned by
`repeat`) and vectors (as returned by `vec`).
(bindat--pack-str, bindat--pack-bits): New functions, extracted from
`bindat--pack-item`.
(bindat--pack-item): Use them.

* test/lisp/emacs-lisp/bindat-tests.el (struct-bindat): Place the fields
in the order in which they appear in the structs.

3 years ago* src/fns.c (Frandom): Handle bignum `limit`s
Stefan Monnier [Fri, 5 Mar 2021 17:09:50 +0000 (12:09 -0500)]
* src/fns.c (Frandom): Handle bignum `limit`s

(ccall2, get_random_bignum): New functions.

3 years agoDeclare some completion predicates
Michael Albinus [Fri, 5 Mar 2021 16:51:22 +0000 (17:51 +0100)]
Declare some completion predicates

* lisp/filenotify.el (file-notify-handle-event):
* lisp/net/dbus.el (dbus-handle-event): Declare `completion-predicate'.

3 years ago* doc/misc/tramp.texi (Remote shell setup): Fix reference.
Masahiro Nakamura [Fri, 5 Mar 2021 16:46:53 +0000 (17:46 +0100)]
* doc/misc/tramp.texi (Remote shell setup): Fix reference.

3 years agoFix some unsafe uses of SSDATA in comp.c
Eli Zaretskii [Fri, 5 Mar 2021 14:39:10 +0000 (16:39 +0200)]
Fix some unsafe uses of SSDATA in comp.c

* src/comp.c (comp_hash_source_file)
(Fcomp__compile_ctxt_to_file, Fnative_elisp_load): Encode file
names before passing them to library APIs.
(Fcomp__compile_ctxt_to_file): use emacs_fopen instead of fopen.
(declare_lex_function): Avoid keeping a 'char *' pointer around
while calling Lisp, which could trigger GC, which could relocate
string data.

3 years agoImprove the documentation of :extra in cl-defmethod
Lars Ingebrigtsen [Fri, 5 Mar 2021 13:27:08 +0000 (14:27 +0100)]
Improve the documentation of :extra in cl-defmethod

* doc/lispref/functions.texi (Generic Functions): Improve
documentation of :extra (bug#46917).

* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Ditto.

3 years agoFix qualifiers order for loadhist-unload-element in elp.el
Mauro Aranda [Fri, 5 Mar 2021 13:18:32 +0000 (14:18 +0100)]
Fix qualifiers order for loadhist-unload-element in elp.el

* lisp/emacs-lisp/elp.el (loadhist-unload-element): The :extra
qualifier is expected to come before the other qualifiers, so do
that (bug#46917).

3 years agoRestrict the version guesser to top-level headings
Stephen Berman [Fri, 5 Mar 2021 13:08:17 +0000 (14:08 +0100)]
Restrict the version guesser to top-level headings

* lisp/help-fns.el (help-fns--first-release): Restrict the version
guesser to top-level section -- looking in all headings leads to
false positives (bug#46889).

3 years agoActually fill the correct paragraph in `lisp-fill-paragraph'
Lars Ingebrigtsen [Fri, 5 Mar 2021 13:01:00 +0000 (14:01 +0100)]
Actually fill the correct paragraph in `lisp-fill-paragraph'

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix previous
change here by actually filling the correct paragraph (bug#28937).

3 years agoDon't override load-path in require-theme
Basil L. Contovounesios [Fri, 5 Mar 2021 11:02:20 +0000 (11:02 +0000)]
Don't override load-path in require-theme

* lisp/custom.el (require-theme): Open-code 'require' error, because
binding load-path can prevent other libraries from loading on error,
such as debug.el, which gives a misleading error.  (Bug#45068)

3 years ago* Harden `comp-abi-hash' computation
Andrea Corallo [Fri, 5 Mar 2021 09:45:09 +0000 (10:45 +0100)]
* Harden `comp-abi-hash' computation

Account for subr arity in `comp-abi-hash' computation as that's part
of the ABI exposed to .eln files.

* src/comp.c (Fcomp__subr_signature): New support function.
(hash_native_abi): Make use of.
(syms_of_comp): Register 'Scomp__subr_signature'.

3 years agoDon't ignore lexically-bound variables in a defvar (bug#46912)
Pip Cet [Thu, 4 Mar 2021 21:06:13 +0000 (21:06 +0000)]
Don't ignore lexically-bound variables in a defvar (bug#46912)

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Walk
the value form of a defvar.

3 years ago* Makefile.in: Ensure non-info forms of doc/misc have an Emacs binary.
Glenn Morris [Fri, 5 Mar 2021 04:04:50 +0000 (20:04 -0800)]
* Makefile.in: Ensure non-info forms of doc/misc have an Emacs binary.

3 years ago* lisp/emacs-lisp/cl-generic.el: Make `doc-string` prop work with qualifiers
Stefan Monnier [Thu, 4 Mar 2021 23:20:56 +0000 (18:20 -0500)]
* lisp/emacs-lisp/cl-generic.el: Make `doc-string` prop work with qualifiers

(cl--defmethod-doc-pos): New function.
(cl-defmethod): Use it.

3 years ago* Makefile.in (ELN_DESTDIR): Remove unnecessary double quoting.
Andrea Corallo [Thu, 4 Mar 2021 20:43:59 +0000 (21:43 +0100)]
* Makefile.in (ELN_DESTDIR): Remove unnecessary double quoting.

3 years agoAdd a command in package mode for opening home pages directly
Lars Ingebrigtsen [Thu, 4 Mar 2021 20:39:40 +0000 (21:39 +0100)]
Add a command in package mode for opening home pages directly

* doc/emacs/package.texi (Package Menu): Document it.
* lisp/emacs-lisp/package.el (package-browse-url): New command and
keystroke (bug#46927).

3 years agoFix typos and doc strings in native-compilation files
Eli Zaretskii [Thu, 4 Mar 2021 18:36:43 +0000 (20:36 +0200)]
Fix typos and doc strings in native-compilation files

* lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose)
(comp-always-compile, comp-deferred-compilation-deny-list)
(comp-bootstrap-deny-list, comp-never-optimize-functions)
(comp-async-jobs-number, comp-async-cu-done-hook)
(comp-async-all-done-hook, comp-async-env-modifier-form)
(comp-pass, comp-native-compiling, comp-post-pass-hooks)
(comp-known-predicate-p, comp-pred-to-cstr)
(comp-symbol-values-optimizable, comp-limple-assignments)
(comp-limple-calls, comp-limple-branches, comp-block)
(comp-vec--verify-idx, comp-vec-aref, comp-vec-append)
(comp-vec-prepend, comp-block-preds)
(comp-ensure-native-compiler, comp-log, comp-log-func)
(comp-loop-insn-in-block, comp-byte-frame-size)
(comp-add-func-to-ctxt, comp-spill-lap-function, comp-spill-lap)
(comp-lap-fall-through-p, comp-new-frame, comp-emit-set-call)
(comp-copy-slot, comp-latch-make-fill, comp-emit-cond-jump)
(comp-body-eff, comp-op-case, comp-prepare-args-for-top-level)
(comp-limplify-top-level, comp-negate-arithm-cmp-fun)
(comp-emit-assume, comp-cond-cstrs-target-mvar)
(comp-function-foldable-p, comp-function-call-maybe-fold)
(comp-form-tco-call-seq, comp-clean-up-stale-eln)
(comp-delete-or-replace-file, comp--native-compile)
(native--compile-async, native-compile)
(batch-byte-native-compile-for-bootstrap): Fix typos, wording, and
punctuation in doc strings.
* lisp/loadup.el: Fix typos.

* src/lread.c (syms_of_lread): Doc fix.

3 years agoMake checkdoc work with qualified methods
Mauro Aranda [Thu, 4 Mar 2021 11:34:58 +0000 (08:34 -0300)]
Make checkdoc work with qualified methods

* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): Handle
cl-defmethod in a case of its own.  Check for the presence of
qualifiers, and skip them accordingly until the docstring.

* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-cl-defmethod-qualified-ok)
(checkdoc-cl-defmethod-with-extra-qualifier-ok)
(checkdoc-cl-defmethod-with-extra-and-nil-args-ok): Add tests for the fix.

3 years agoAdd "of" as a keyword in js-mode
Lars Ingebrigtsen [Thu, 4 Mar 2021 20:21:21 +0000 (21:21 +0100)]
Add "of" as a keyword in js-mode

* lisp/progmodes/js.el (js--keyword-re): Add the "of" of "for
... of" in ECMAScript 2018 (bug#46924).

3 years agoCall the set_buffer_overlays_ setters
Matt Armstrong [Thu, 4 Mar 2021 20:12:00 +0000 (21:12 +0100)]
Call the set_buffer_overlays_ setters

* src/buffer.c (Fkill_buffer): Call set_buffer_overlays_before and
set_buffer_overlays_after instead of setting the fields directly
(bug#46914).

3 years agoGenerate info/dir directly from any org sources
Glenn Morris [Thu, 4 Mar 2021 18:47:09 +0000 (10:47 -0800)]
Generate info/dir directly from any org sources

* Makefile.in (texi_misc): New variable.
(srcdir_doc_info_dir_inputs): Use texi_misc.
(${srcdir}/info/dir): No longer depend on info-real.

3 years ago* doc/misc/Makefile.in (echo-sources): New phony target.
Glenn Morris [Thu, 4 Mar 2021 18:44:07 +0000 (10:44 -0800)]
* doc/misc/Makefile.in (echo-sources): New phony target.

3 years ago* build-aux/make-info-dir: Handle .org input files.
Glenn Morris [Thu, 4 Mar 2021 18:43:25 +0000 (10:43 -0800)]
* build-aux/make-info-dir: Handle .org input files.

3 years ago; Makefile.in: Update a comment.
Glenn Morris [Thu, 4 Mar 2021 18:41:00 +0000 (10:41 -0800)]
; Makefile.in: Update a comment.

3 years agoDecouple require-theme from load-theme
Basil L. Contovounesios [Tue, 2 Mar 2021 14:35:50 +0000 (14:35 +0000)]
Decouple require-theme from load-theme

* lisp/custom.el (require-theme): Refashion after 'require', as a
function for loading only named features.  Do not call
load-theme (bug#45068).
* etc/NEWS: Update its announcement accordingly.
* doc/lispref/customize.texi (Custom Themes): Document it.

* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-vivendi-theme.el: Remove redundant calls to
'provide'.

* test/lisp/custom-tests.el (custom-tests--with-temp-dir): New
macro.
(custom-theme--load-path): Use it.
(custom-tests-require-theme): New test.

3 years ago; Pacify warnings in last newsticker change.
Basil L. Contovounesios [Thu, 4 Mar 2021 15:34:19 +0000 (15:34 +0000)]
; Pacify warnings in last newsticker change.

3 years ago; * etc/NEWS: Fix wording of a recently added entry.
Eli Zaretskii [Thu, 4 Mar 2021 13:21:52 +0000 (15:21 +0200)]
; * etc/NEWS: Fix wording of a recently added entry.

3 years agoRemove copy-pasto from image-dired.el
Mauro Aranda [Thu, 4 Mar 2021 13:16:02 +0000 (10:16 -0300)]
Remove copy-pasto from image-dired.el

* lisp/image-dired.el (image-dired-dired-edit-comment-and-tags):
Remove reference to widget-example-repeat.

3 years agoRemove duplicated tests in checkdoc-tests.el
Mauro Aranda [Thu, 4 Mar 2021 13:13:26 +0000 (10:13 -0300)]
Remove duplicated tests in checkdoc-tests.el

* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-cl-defmethod-ok)
(checkdoc-cl-defmethod-with-types-ok, checkdoc-cl-defun-with-key-ok)
(checkdoc-cl-defun-with-allow-other-keys-ok)
(checkdoc-cl-defun-with-default-optional-value-ok)
(checkdoc-cl-defun-with-destructuring-ok): This tests were duplicated,
so keep one copy of them.  Checked by diffing two files with the
suspected tests, and supported by the fact that running occur with the
regexp "^(ert-deftest" reported 14 matches, while the tests being run
were 8.

3 years agoMake radio checkboxes work in eww
Lars Ingebrigtsen [Thu, 4 Mar 2021 11:11:08 +0000 (12:11 +0100)]
Make radio checkboxes work in eww

* lisp/net/eww.el (eww-toggle-checkbox): Actually update the
:checked values in the form.

3 years ago* src/comp.c (hash_native_abi): Account for `system-configuraton-options'.
Andrea Corallo [Thu, 4 Mar 2021 08:03:26 +0000 (09:03 +0100)]
* src/comp.c (hash_native_abi): Account for `system-configuraton-options'.

3 years agoFix a doc/misc clean rule
Glenn Morris [Thu, 4 Mar 2021 03:58:47 +0000 (19:58 -0800)]
Fix a doc/misc clean rule

* doc/misc/Makefile.in (TEXI_FROM_ORG): New variable.
(orgclean): Fix rule.

3 years agoFix pcase dontcare pattern in cl--sm-macroexpand
Basil L. Contovounesios [Wed, 3 Mar 2021 12:49:31 +0000 (12:49 +0000)]
Fix pcase dontcare pattern in cl--sm-macroexpand

For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-03/msg00119.html

* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Fix recently
uncovered use of old name for pcase--dontcare.

3 years ago* lisp/emacs-lisp/pcase.el (pcase-defmacro): Fix `pcase-tests-macro`
Stefan Monnier [Wed, 3 Mar 2021 23:40:03 +0000 (18:40 -0500)]
* lisp/emacs-lisp/pcase.el (pcase-defmacro): Fix `pcase-tests-macro`

* lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Simplify accordingly.

3 years agoPreserve group structure on opml import and export.
Ulf Jasper [Wed, 3 Mar 2021 20:10:34 +0000 (21:10 +0100)]
Preserve group structure on opml import and export.

* lisp/net/newst-backend.el (newsticker--raw-url-list-defaults),
  (newsticker-url-list-defaults),
  (newsticker--get-news-by-url),
  (newsticker--sentinel-work),
  (newsticker--parse-atom-0.3),
  (newsticker--decode-rfc822-date),
  (newsticker--image-download-by-wget),
  (newsticker--image-save),
  (newsticker--image-download-by-url),
  (newsticker--cache-save),
  (newsticker--stat-num-items): Fix indentation.
  (newsticker-opml-export): Preserve group structure on export.
  (newsticker--opml-insert-elt),
  (newsticker--opml-insert-group),
  (newsticker--opml-insert-feed): New.
  (newsticker--opml-import-outlines):
  (newsticker-opml-import): Preserve group structure on import. (Fixes
  fourth issue in Bug#41376.)

3 years agoDon't call _setjmp through a function pointer (Bug#46824)
Pip Cet [Sun, 28 Feb 2021 06:31:00 +0000 (06:31 +0000)]
Don't call _setjmp through a function pointer (Bug#46824)

* src/comp.c (helper_link_table): Don't include SETJMP except on Windows.
(emit_setjmp): Don't use function pointers except on Windows.
(declare_runtime_imported_funcs): Don't import SETJMP at runtime.
(ABI_VERSION): Bump.
* test/src/comp-tests.el (46824-1): New test.
* test/src/comp-test-funcs.el (comp-test-46824-1-f): New function.

3 years ago* src/comp.c (return_nil): Make it not a nested function.
Andrea Corallo [Wed, 3 Mar 2021 19:25:14 +0000 (20:25 +0100)]
* src/comp.c (return_nil): Make it not a nested function.

3 years agoFix two compiler ICEs dealing with nan and infinity
Andrea Corallo [Tue, 2 Mar 2021 16:23:12 +0000 (17:23 +0100)]
Fix two compiler ICEs dealing with nan and infinity

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Don't crash when
truncate fails.
* test/src/comp-test-funcs.el (comp-test-=-nan): Add two functions
to be compiled.

3 years agoNew mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings
Juri Linkov [Wed, 3 Mar 2021 19:12:13 +0000 (21:12 +0200)]
New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings

* lisp/outline.el (outline-mode-cycle-map): New keymap from outline-mode-map.
(outline-mode-map): Inherit from outline-mode-cycle-map.
(outline-font-lock-keywords): Append keymap and face depending on
'outline-minor-mode-cycle' and 'outline-minor-mode-highlight'.
(outline-minor-mode-cycle, outline-minor-mode-highlight): New variables.
(outline-minor-mode-highlight-buffer): New function.
(outline-minor-mode): Handle 'outline-minor-mode-cycle' and
'outline-minor-mode-highlight'.
(outline-cycle-minor-mode, outline-cycle-highlight-minor-mode):
New minor modes (bug#45147).

* etc/compilation.txt:
* etc/grep.txt:
Enable outline-cycle-highlight-minor-mode.

3 years agoMake inversion.el obsolete (Bug#46841)
Stefan Kangas [Wed, 3 Mar 2021 18:54:37 +0000 (19:54 +0100)]
Make inversion.el obsolete (Bug#46841)

* lisp/cedet/inversion.el:
* test/lisp/cedet/inversion-tests.el: Move from here...
* lisp/obsolete/inversion.el:
* test/lisp/obsolete/inversion-tests.el: ...to here.

* lisp/cedet/cedet.el (cedet-version): Make obsolete.
* lisp/cedet/cedet-cscope.el (cedet-cscope-version-check):
* lisp/cedet/cedet-global.el (cedet-gnu-global-version-check):
* lisp/cedet/cedet-idutils.el (cedet-idutils-version-check):
* lisp/cedet/ede/make.el (ede-make-check-version): Use 'version<'
instead of 'inversion-check-version'.
* lisp/cedet/semantic/db-file.el (semanticdb-load-database): Don't
use 'inversion-test'.
* lisp/cedet/semantic/ede-grammar.el
(ede-proj-makefile-insert-variables): Don't add inversion to
loadpath.
* lisp/speedbar.el: Remove stale comment.

3 years agoFix compilation warnings in --with-wide-int build on Windows
Eli Zaretskii [Wed, 3 Mar 2021 18:15:58 +0000 (20:15 +0200)]
Fix compilation warnings in --with-wide-int build on Windows

* src/comp.c (emit_rvalue_from_emacs_uint)
(emit_rvalue_from_lisp_word_tag): Fix comparison of unsigned
values.
(gcc_jit_context_new_rvalue_from_ptr): Define only if
LISP_WORDS_ARE_POINTERS, to avoid compilation warning.
(init_gccjit_functions): Load gcc_jit_context_new_rvalue_from_ptr
only if LISP_WORDS_ARE_POINTERS.

3 years agoAvoid aborting on MS-Windows at startup
Eli Zaretskii [Wed, 3 Mar 2021 17:58:20 +0000 (19:58 +0200)]
Avoid aborting on MS-Windows at startup

* src/emacs.c (set_invocation_vars) [WINDOWSNT]: If argv0 is not
an absolute file name, obtain the absolute file name of the Emacs
executable from 'w32_my_exename'.

3 years agoImprove NEWS entries about native-compilation
Eli Zaretskii [Wed, 3 Mar 2021 11:59:08 +0000 (13:59 +0200)]
Improve NEWS entries about native-compilation

* etc/NEWS: Add an entry about native-compilation.  Improve
wording of the entry about 'package-native-compile'.

3 years agoC++ Mode: Handle "if constexpr (...)" with a simple statement correctly
Alan Mackenzie [Wed, 3 Mar 2021 11:55:51 +0000 (11:55 +0000)]
C++ Mode: Handle "if constexpr (...)" with a simple statement correctly

* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Add a check and
handling for c-block-stmt-hangon-key in the main loop.

3 years ago* lisp/emacs-lisp/pcase.el (pcase--u1): Fix typo
Stefan Monnier [Tue, 2 Mar 2021 20:57:45 +0000 (15:57 -0500)]
* lisp/emacs-lisp/pcase.el (pcase--u1): Fix typo

3 years agoCC Mode: Fix analysis of brace lists, particularly in C++ Mode
Alan Mackenzie [Tue, 2 Mar 2021 20:31:36 +0000 (20:31 +0000)]
CC Mode: Fix analysis of brace lists, particularly in C++ Mode

Fix some alignment functionality in cc-align.el.

* lisp/progmodes/cc-align.el (c-lineup-arglist-intro-after-paren): Align the
next line under the previous entry rather than one to the right of the paren.
(c-lineup-2nd-brace-entry-in-arglist): Take the anchor point from the
brace-list-entry element, not the brace-list-intro one.

* lisp/progmodes/cc-engine.el (c-looking-at-decl-block): Use
c-looking-at-statement-block to test whether "struct A {" begins a brace list
or a struct declaration.
(c-looking-at-or-maybe-in-bracelist): Several detailed amendments, correctly
to recognize brace lists.
(c-looking-at-statement-block): No longer search for commas, as they are not
reliable indicators of a brace list.  Search now for a restricted set of
keywords, since some can appear in brace lists in C++ mode.

* lisp/progmodes/cc-langs.el (c-stmt-block-only-keywords)
(c-stmt-block-only-keywords-regexp): New lang consts/vars.
(c-pre-id-bracelist-kwds): New lang const.
(c-pre-id-bracelist-key): Derive now from the above.
(c-pre-brace-non-bracelist-key): New lang const/var.

3 years ago* lisp/tab-bar.el: Minor stylistic fixes.
Juri Linkov [Tue, 2 Mar 2021 19:50:49 +0000 (21:50 +0200)]
* lisp/tab-bar.el: Minor stylistic fixes.

(tab-bar-select-tab-modifiers): Use tab-bar--undefine-keys and
tab-bar--define-keys instead of turning tab-bar-mode on/off.

3 years ago* lisp/emacs-lisp/trace.el (trace-values): Work outside of traced function
Stefan Monnier [Tue, 2 Mar 2021 14:13:57 +0000 (09:13 -0500)]
* lisp/emacs-lisp/trace.el (trace-values): Work outside of traced function

3 years agoFix = propagation semantic for constrained inputs
Andrea Corallo [Tue, 2 Mar 2021 07:43:39 +0000 (08:43 +0100)]
Fix = propagation semantic for constrained inputs

* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Synthesize
`comp-cstr-shallow-copy'.
(comp-cstr-=): Relax inputs before intersecting them.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add three
tests.

3 years ago(ruby-find-library-file): Also recognize 'gem' statements
Dmitry Gutov [Tue, 2 Mar 2021 13:16:34 +0000 (15:16 +0200)]
(ruby-find-library-file): Also recognize 'gem' statements

* lisp/progmodes/ruby-mode.el (ruby-find-library-file):
Also recognize 'gem' statements.

3 years agoCompile closures that modify their bound vars correctly (Bug#46834)
Pip Cet [Sun, 28 Feb 2021 19:43:09 +0000 (19:43 +0000)]
Compile closures that modify their bound vars correctly (Bug#46834)

* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Don't
move let bindings into the lambda. Don't reverse list of
bindings. (byte-compile): Evaluate the return value if it was
previously reified.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-reify-function):
Add tests.

3 years agoImprove the dired-do-kill-lines doc string
Lars Ingebrigtsen [Tue, 2 Mar 2021 07:07:59 +0000 (08:07 +0100)]
Improve the dired-do-kill-lines doc string

* lisp/dired-aux.el (dired-do-kill-lines): Document the FMT
parameter (bug#46867).