1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-27 07:30:59 -08:00
Commit graph

144320 commits

Author SHA1 Message Date
Andrea Corallo
4f0e879030 Rework `native-compile' interface so it can return compiled functions
* lisp/emacs-lisp/comp.el (native-compile): Return the compiled
	function when the input is a symbol or a form.
	* test/src/comp-tests.el (free-fun, tco, fw-prop): Update tests
	for new `native-compile' interface.
2020-10-14 11:04:36 +02:00
Andrea Corallo
8861ee8b08 Have `native-elisp-load' return the last registerd function
* lisp/emacs-lisp/comp.el (comp-emit-for-top-level): Synthesize
	'top_level_run' so it returns the last value returned by
	`comp--register-subr'.
	* src/comp.c (load_comp_unit): Return what 'top_level_run'
	returns.
	(Fnative_elisp_load): Return what 'load_comp_unit' returns.
	* src/comp.h (load_comp_unit): Update signature.
2020-10-14 11:04:36 +02:00
Andrea Corallo
4bea0c0b1d * Allow for lambda forms as native compilation input
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Add new
	specialized method for compiling a lambda form.
2020-10-14 11:04:36 +02:00
Andrea Corallo
fda798808f * Move context output computation in `comp-spill-lap-function'
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Move
	output filename computation here.
	(native-compile): From here.
2020-10-14 11:04:36 +02:00
Brian Leung
237fd33aef Fix some compilation warnings in non nativecomp build (bug#43892)
* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/emacs-lisp/find-func.el (comp-eln-to-el-h): Declare
	variable.
	* lisp/emacs-lisp/nadvice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/files.el (comp-eln-to-el-h): Declare variable.
	* lisp/help.el (subr-native-lambda-list): Declare function.
2020-10-12 21:25:50 +02:00
Andrea Corallo
a3304feb9b Revert "Fix some compilation warnings in non nativecomp build (bug#43892)"
This reverts commit 6606ec8e31.
2020-10-12 21:25:00 +02:00
Andrea Corallo
6606ec8e31 Fix some compilation warnings in non nativecomp build (bug#43892)
* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/emacs-lisp/find-func.el (comp-eln-to-el-h): Declare
	variable.
	* lisp/emacs-lisp/nadvice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/files.el (comp-eln-to-el-h): Declare variable.
	* lisp/help.el (subr-native-lambda-list): Declare function.
2020-10-12 21:19:09 +02:00
Andrea Corallo
feed53f8b5 * lisp/help.el (help-function-arglist): Fix non nativecomp builds (bug#43914) 2020-10-10 21:30:35 +02:00
Andrea Corallo
4b924ef87d * As edges are indexed store them in an hash table
* lisp/emacs-lisp/comp.el (comp-edge): Update doc for 'number'
	slot.
	(comp-func): Rename 'edges' slot into 'edges-h'.
	(comp-log-edges): Update logic for edges in an hash table.
	(comp-clean-ssa, comp-compute-edges): Likewise.
2020-10-10 20:25:57 +02:00
Andrea Corallo
96f59a9faf * Add into phi l-value args basic block names
* lisp/emacs-lisp/comp.el (comp-ssa-rename-insn): Clean-up a
	leftover space.
	(comp-finalize-phis): Cons the blasic block name providing the
	mvar together with the mvar itself while forming the phi.
	(comp-fwprop-insn): Destructure correctly the phi.
2020-10-10 20:25:42 +02:00
Andrea Corallo
8b135af5bb Provide feature nativecomp and make use of it
* lisp/emacs-lisp/comp.el (comp-ensure-native-compiler): Use
	`featurep' to identify if the native compiler is available.
	* lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise.
	* lisp/emacs-lisp/package.el (package--delete-directory): Likewise.
	* lisp/loadup.el: Likewise.
	* src/comp.c (syms_of_comp): Provide feature nativecomp.
2020-10-10 18:47:45 +02:00
Andrea Corallo
77fa6befb4 * lisp/emacs-lisp/comp.el (comp-func): Fix doc for blocks slot. 2020-10-10 18:08:23 +02:00
Andrea Corallo
b8772e8b08 * Fix LIMPLE latch block name coloring in "*Native-compile-Log*"
* lisp/emacs-lisp/comp.el (comp-limple-lock-keywords): Fix
	latch block name coloring.
2020-10-10 15:15:49 +02:00
Brian Leung
51f5e487b2 Various typo fixes in native compiler related files
* lisp/emacs-lisp/comp.el (native-compiler-error-dyn-func)
	(comp-func, comp-func-l)
	(comp-func-d, comp-ensure-native-compiler, comp-type-hint-p)
	(comp-func-unique-in-cu-p, comp-alloc-class-to-container)
	(comp-limple-mode, comp-loop-insn-in-block)
	(comp-lex-byte-func-p, comp-c-func-name, comp-decrypt-arg-list)
	(comp-spill-lap-function, comp-intern-func-in-ctxt)
	(comp-spill-lap-function, comp-spill-lap, comp-emit-handler)
	(comp-prepare-args-for-top-level): Various typo fixes.
	* src/comp.c (Fcomp_el_to_eln_filename): Fix typo in error
	message.
2020-10-10 12:19:30 +02:00
Andrea Corallo
f7e7ff4fb1 Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-10 11:00:35 +02:00
Andrea Corallo
138990bbda * Fix failure when compiling a trampoline with no eln-cache dir (bug#43875)
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Try to create
	the eln-cache dir if this is not existing, if fails to do that
	move on to the next one.
2020-10-10 10:29:17 +02:00
Andrew Whatson
85450f03be * Fix typo name plus make error homogeneous in `comp-trampoline-compile'
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix typo
	renaming `comp-tampoline-compile' -> `comp-trampoline-compile'.
	Change error to be consistent.
	(comp-subr-trampoline-install): Use `comp-trampoline-compile'.
2020-10-10 10:29:14 +02:00
Eli Zaretskii
5824c209ba Add Euro Sign to Latin language input methods
* lisp/leim/quail/latin-post.el ("danish-postfix")
("finnish-postfix", "french-postfix", "german-postfix")
("icelandic-postfix", "italian-postfix", "norwegian-postfix")
("scandinavian-postfix", "spanish-postfix", "swedish-postfix"):
Add "E=" for the Euro Sign.  (Bug#43866)
2020-10-09 17:28:24 +03:00
Stefan Kangas
b19bf08447 ; shorten https://lists.gnu.org/archive/html/... links 2020-10-09 12:23:02 +02:00
Stefan Kangas
95e8c7d1d9 ; Fix typos 2020-10-09 11:53:21 +02:00
Mattias Engdegård
35478f3f76 Calc: fix arithmetic right shift sign bit detection
Arithmetic right shift didn't compute the bit to shift in correctly.
For example, #x600000000 right-shifted 8 steps (with 32 bit word size)
resulted in #xff000000 rather than 0. (Bug#43764)

* lisp/calc/calc-bin.el (calcFunc-ash): Fix condition.
* test/lisp/calc/calc-tests.el (calc-tests--clip, calc-tests--lsh)
(calc-tests--rsh, calc-tests--ash, calc-tests--rash, calc-tests--rot):
New.
(calc-shift-binary): New test.
2020-10-09 11:24:15 +02:00
Nick Gasson
c69c17d573 Match OpenBSD doas password prompt in comint
* lisp/comint.el (comint-password-prompt-regexp): match OpenBSD doas
password prompt. OpenBSD 5.8 replaced sudo with doas in the base
install.

* test/lisp/comint-tests.el (comint-testsuite-password-strings): test
that the doas password prompt is matched (bug#43846).

Copyright-paperwork-exempt: yes
2020-10-09 06:57:07 +02:00
Lars Ingebrigtsen
e45b0c5d94 message-signature doc fix
* lisp/gnus/message.el (message-signature): Mention
message-signature-insert-empty-line (bug#43853).
2020-10-09 06:48:51 +02:00
Lars Ingebrigtsen
82d70d3aab Clarify define-minor-mode hooks
* doc/lispref/modes.texi (Defining Minor Modes): Note that the
code (and the hook) is run both when the mode is enabled and
disabled (bug#43868).
2020-10-09 06:36:53 +02:00
Lars Ingebrigtsen
e2ece08273 Revert "Don't eagerly store articles in the Agent by default"
This reverts commit def34a2076.

This made storing articles in the Agent very slow.
2020-10-09 06:26:17 +02:00
Lars Ingebrigtsen
f3dbde7e6f Only skip directories in lgrep, not the other grep commands
* lisp/progmodes/grep.el (lgrep): Do the directory ignores here
(bug#23590).
(grep-compute-defaults): ... instead of here, because this would
affect all grep commands, not just lgrep.
2020-10-09 06:15:07 +02:00
Alan Mackenzie
81fe8990c0 CC Mode: Move the handling of keyword auto into type handling for C++.
This should allow auto, const, static, ... to be in any order.

* lisp/progmodes/cc-engine.el (c-forward-type): New return value 'no-id for
when auto precludes the parsing of a type identifier.  Adapt processing for
this.
(c-forward-decl-or-cast-1): Use the new facility from c-forward-type.

* lisp/progmodes/cc-langs.el (c-type-modifier-prefix-kwds): Insert the value
of c-no-type-kwds into the value.
(c-no-type-kwds, c-no-type-key): New lang consts/vars, basically "auto".
(c-typeless-decl-kwds, c-modifier-kwds): Remove "auto" from the C++ value.
2020-10-08 16:49:49 +00:00
Stefan Monnier
c7804ac401 * src/ftcrfont.c (ftcrfont_open): Initialize the max_width field
On a 32bit build, Emacs can otherwise crash with a !FIXNUM_OVERFLOW_P
assertion in `Ffont_info` by simply doing `emacs -Q` and then `C-s`.

* src/font.c: Try and detect uninitialized `max_width` fields.
(font_make_object): Set max_width to a silly value.
(Ffont_info): Check the value is not silly any more.
2020-10-08 09:49:20 -04:00
Stefan Monnier
d340a979db * lisp/doc-view.el: Fix "can't resize root window" error
(doc-view-fit-window-to-page): Change approach to detect when the
frame needs to be resized.
2020-10-08 09:44:34 -04:00
Dmitry Gutov
0a5e9cf262 Mention two more functions in the commentary
* lisp/progmodes/project.el:
Mention two more functions in the commentary (bug#43595).
2020-10-08 02:41:12 +03:00
Andrea Corallo
c3bc348f5e * Fix failure when eln-cache is removed (introduced by 4a1bb46260)
* src/comp.c (make_directory_wrapper, make_directory_wrapper_1):
	New functions.
	(Fcomp_el_to_eln_filename): If base_dir is not
	specified and we are searching across `comp-load-path' try to
	create a directory if does not exists.
2020-10-07 23:38:00 +02:00
Andrea Corallo
7041c32ec2 * Fix some nits in comp.el
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Use
	`cl-defmethod' where correct in place of `cl-defgeneric'.
	(comp-tampoline-compile): Add missing #.
2020-10-07 20:43:00 +02:00
Eli Zaretskii
7be18bbfe1 Improve documentation of 'isearch-group-N' faces
* etc/NEWS:
* doc/emacs/search.texi (Search Customizations): Improve and
clarify the wording of the 'isearch-group-N' faces description.

* lisp/isearch.el (search-highlight-submatches): Doc fix.
2020-10-07 12:12:06 +03:00
Eli Zaretskii
466db12df0 Fix last change in frame.el.
* lisp/frame.el (frame-set-background-mode): Fix last change: yet
another place where FRAME was not taken into account, using the
selected frame instead.  (Bug#43837)
2020-10-07 11:35:59 +03:00
Eli Zaretskii
bc2b63876b Fix face recalculation when frame's background mode changes
* lisp/frame.el (frame-set-background-mode): Use the FRAME
argument instead of the selected frame, when calling
'face-spec-match-p'.  (Bug#43837)
2020-10-07 10:02:20 +03:00
Andrea Corallo
58d85f4dbb * Do use echo area for async compilation started/finished messages
* lisp/emacs-lisp/comp.el (comp-run-async-workers)
	(native-compile-async): Do not write into the echo area.
2020-10-07 07:41:00 +02:00
Andrea Corallo
bd27257965 * Better libgccjit related error messaging during configure
* configure.ac: Distinguish the case when libgccjit is missing,
	its headers are missing, or libgccjit is broken.  Message the user
	based on that.
2020-10-07 08:40:00 +02:00
Lars Ingebrigtsen
4bea5574a5 Remove mention of the obsolete cust-print.el from the manual
* doc/lispref/edebug.texi (Printing in Edebug): Remove mention of
the obsolete cust-print.el (bug#37956) and adjust the text a bit.
2020-10-07 06:42:05 +02:00
Lars Ingebrigtsen
5bc2f37dfb Update documentation on this-command-keys to reflect new behavior
* doc/lispref/commands.texi (Command Loop Info):
`this-command-keys' does not include the C-u any more, so remove
that from the description and the example
(bug#22107).

* src/keyboard.c (Fthis_single_command_keys): Don't say that
`this-command-keys' returns the C-u prefix (bug#22111).
2020-10-07 06:09:18 +02:00
Alex Gramiak
0ab67a65f5 Default the grep commands to skip directories
* lisp/progmodes/grep.el (grep-compute-defaults): Skip directories
(bug#23590).
2020-10-07 05:41:23 +02:00
Lars Ingebrigtsen
c842bd993f Make artist-mode work when display-line-numbers-mode is on
* lisp/textmodes/artist.el (artist--adjust-x): New function.
(artist-mouse-draw-continously, artist-mouse-draw-poly)
(artist-mouse-draw-1point, artist-mouse-draw-2points): Use it to
take `display-line-numbers-mode' widths into account.
2020-10-07 05:23:26 +02:00
Lars Ingebrigtsen
95c7aa96af Remove reference to outdated Gnus variable from the manual
* doc/misc/gnus.texi (Startup Variables): Remove reference to
gnus-use-backend-marks, which was removed in 2011 (bug#43833).
2020-10-07 05:05:20 +02:00
Lars Ingebrigtsen
cc70a7b7a8 alist-get doc string further clarification
* lisp/subr.el (alist-get): Mention generalized variables again
for easier cross-referencing (bug#43836).
2020-10-07 04:50:52 +02:00
Hong Xu
c36cd48546 Clarify what ``chrooted environment means'' for TRAMP
* doc/misc/tramp.texi (Frequently Asked Questions): Clarify what
``chrooted environment means'' for TRAMP (bug#43839).
2020-10-07 04:41:29 +02:00
Mauro Aranda
7305437654 Make the State button in Custom use extended menus
* lisp/cus-edit.el (custom-actioned-widget): New variable.
Dynamically hold the widget for which to show the menu.
(custom-variable-extended-menu, custom-face-extended-menu)
(custom-group-extended-menu): Keymap menus for the State menu.  Use
custom-actioned-widget for the :enable and :selected forms.  Make
related items radio buttons.  (Bug#4787)
(custom-variable-menu, custom-face-menu, custom-group-menu): Keep for
backward compatibility, but default to nil, so we prefer the keymap
menus instead.
(custom-variable-action, custom-face-action, custom-group-action):
Pass the keymap menu to widget-choose when the simplified menus
are nil.
2020-10-07 04:35:58 +02:00
Stefan Monnier
891248be1c * test/lisp/progmodes/ruby-mode-tests.el: Fix obsolete warnings 2020-10-06 22:08:19 -04:00
Juri Linkov
46aa145d39 Add match-data to isearch state and repeat faces to highlight group matches
* lisp/isearch.el (isearch-match-data): New variable.
(isearch-mode): Set isearch-match-data to nil.
(isearch-update): Call isearch-highlight with isearch-match-data.
(isearch--state): Add isearch-match-data.
(isearch--set-state): Restore isearch-match-data.
(with-isearch-suspended): Preserve isearch-match-data.
(isearch-search): Set isearch-match-data to integers.
(isearch-group-1): Rename from isearch-group-odd and adjust colors.
(isearch-group-2): Rename from isearch-group-even and adjust colors.
(isearch-highlight): Add optional arg 'match-data'.
Rewrite search-highlight-submatches part to recycle faces.

* doc/emacs/search.texi (Search Customizations): Amend the
documentation for isearch-group faces.

(bug#6227, bug#43702)
2020-10-06 23:14:26 +03:00
Alan Third
ec705a6c34 Fix crash when creating new NS frame (bug#43812)
* src/nsterm.m (ns_clear_under_internal_border): Check the frame is
live.
2020-10-06 21:05:18 +01:00
Juri Linkov
fc6decdfbc Add check for bound and true 'ido-everywhere' in multi-occur--prompt
* lisp/replace.el (multi-occur--prompt): Check if 'ido-everywhere' is
bound and true (bug#41633).
2020-10-06 21:35:53 +03:00
Juri Linkov
c30f6da0da Fix args of truncate-string-to-width in ibuffer-compile-make-substring-form
* lisp/ibuffer.el (ibuffer-compile-make-substring-form): Fix args of
truncate-string-to-width call (bug#41250)
2020-10-06 21:33:20 +03:00