1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

142293 commits

Author SHA1 Message Date
Andrea Corallo
e4e6bb7fdd * Introduce `comp-loop-insn-in-block'
* lisp/emacs-lisp/comp.el (comp-loop-insn-in-block): New macro.
	(comp-call-optim-func, comp-dead-assignments-func)
	(comp-remove-type-hints-func): Use `comp-loop-insn-in-block'.
2020-06-03 22:06:26 +01:00
Nicolás Bértolo
b619339b7a Fix DLL imports of gccjit version functions.
* src/comp.c (init_gccjit_functions): Use LOAD_DLL_FN_OPT macro to
load gcc_jit_version_major, gcc_jit_version_major and
gcc_jit_version_patchlevel.
* src/w32common.h (LOAD_DLL_FN_OPT): Add macro optionally load a
function from a DLL.
2020-06-02 23:25:24 +01:00
Nicolás Bértolo
9f6c12be55 * Throw an ICE when asked to emit a cast with sign extension.
* src/comp.c (cast_kind_of_type): Enum that specifies the kind of type
in the cast enum (unsigned, signed, pointer).
(emit_coerce): Throw an ICE when asked to emit a cast with sign
extension.
(define_cast_from_to): Return NULL for casts involving sign extension.
(define_cast_functions): Specify the kind of each type in the cast
union.
2020-06-01 21:24:33 +01:00
Nicolás Bértolo
035a91dd96 * Define casts using functions.
This is to dump prettier C files.
This does not affect compilation times in my tests.

* src/comp.c: Define a 15x15 cast matrix. Use it in emit_coerce().
2020-06-01 21:24:33 +01:00
Nicolás Bértolo
516575369b * Remove unnecessary DLL load of gcc_jit_block_add_assignment_op.
* src/comp.c (gcc_jit_block_add_assignment_op): Remove unnecessary
	func import.
2020-06-01 21:08:32 +01:00
Andrea Corallo
2e25eebfbd Store libgccjit version into generated code
* src/comp.c (emit_ctxt_code): Add libgccjit version into
	stored optimize qualities.
	(syms_of_comp): Define Qgccjit here.

	* src/w32fns.c (syms_of_w32fns): Move out Qgccjit definition.
2020-05-31 22:47:32 +01:00
Andrea Corallo
ce3c1ea83e * Optimize 'emit_static_object' for load-time
* src/comp.c (emit_static_object): Use a chunck size of 200 bytes
	on bugged GCCs and a longer one (1024) in sane ones. Rename
	str in buff to disambiguate and prefer xmalloc to a VLA given
	the buffer is not that small.
2020-05-31 22:22:23 +01:00
Andrea Corallo
c936e028c6 * Add `comp-libgccjit-version' subr
* src/comp.c (gcc_jit_version_major, gcc_jit_version_minor)
	(gcc_jit_version_patchlevel): Import.
	(Fcomp_libgccjit_version): New Lisp function.
	(syms_of_comp): Update for 'comp-libgccjit-version'.
2020-05-31 22:22:23 +01:00
Andrea Corallo
15d4fee69f Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-31 18:32:13 +01:00
Nicolás Bértolo
3efb2808d4 * Cut down compile-time emitting static data as string literals
This change drastically reduce compile time.  Apparently GCC optimizer
does not scale up well at all for long sequences of assignments into a
single array.

Nicolás Bértolo <nicolasbertolo@gmail.com>
Andrea Corallo  <akrl@sdf.org>

	* src/comp.c (gcc_jit_context_new_string_literal)
	(gcc_jit_block_add_assignment_op): New imports.
	(comp_t): New 'size_t_type' 'memcpy' fields.
	(emit_static_object): Define static objects using string literals
	and memcpy.
	(define_memcpy): New function.
	(Fcomp__init_ctxt): Define 'size_t_type' and 'memcpy'.
2020-05-31 17:50:07 +01:00
Andrea Corallo
5cf148cfef * Emit better debug comments in emit_static_object
* src/comp.c (emit_static_object): Do not truncate debug
	comments at the first NULL character.
2020-05-31 17:27:15 +01:00
Tom Tromey
f56830acbf Remove mhtml--extend-font-lock-region (Bug#41441)
* lisp/textmodes/mhtml-mode.el (mhtml--extend-font-lock-region):
Remove.
(mhtml-mode): Don't set font-lock-extend-region-functions.
2020-05-31 10:21:38 -06:00
Eli Zaretskii
dc4db3ef09 Protect bidi cache from inadvertent resets
* src/xdisp.c (Fline_pixel_height, Fmove_point_visually): Save and
restore the bidi cache, to avoid inadvertently resetting it by
starting a new iteration through buffer text.  This could cause
trouble if these functions are called during a redisplay cycle,
especially while we were processing RTL text.
2020-05-31 17:34:09 +03:00
Tino Calancha
abe7c22da9 occur: Add bindings for next-error-no-select
Make the navigation in the occur buffer closer
to the navigation in the compilation buffer.

Add bindings to navigate the occur matches (Bug#39121).
Honor `next-error-highlight' and `next-error-highlight-no-select'
when navigating the occurrences.

* lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay):
New variables.
(occur-1): Set `occur-highlight-regexp' to the searched regexp.
(occur-goto-locus-delete-o, occur--highlight-occurrence): New defuns.
(occur-mode-display-occurrence, occur-mode-goto-occurrence):
Use `occur--highlight-occurrence'.
(occur-mode-map): Bind n to `next-error-no-select'
and p to `previous-error-no-select'

* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
Announce this change.

* test/lisp/replace-tests.el (replace-tests-with-highlighted-occurrence):
Add helper macro.
(occur-highlight-occurrence): Add test.
2020-05-31 12:31:27 +02:00
Nicolás Bértolo
b818a49f66 Fix loading of libgccjit.dll while dumping in Windows.
loadup.el calls `native-comp-available-p', that calls
load_gccjit_if_necessary() in Windows. That function tries to load
libgccjit using the mappings defined in `dynamic-library-alist'. That
mapping is filled by term/w32-win.el, but that file may be loaded too
late.

* src/emacs.c (syms_of_emacs): Add libgccjit to the
`dynamic-library-alist' used when starting to dump so
`native-comp-available-p' always works in Windows.
2020-05-31 09:51:05 +01:00
Nicolás Bértolo
bb9c0188ea Do not call `gensym' too early when loading a dump file.
This happened when subr.eln was not the first native compilation unit
to be loaded. register_native_comp_unit() is called when loading a
native compilation unit and that in turn used to call `gensym', which
was not loaded yet. This led to a SIGSEGV.

* src/comp.c (register_native_comp_unit): Replace the call to `gensym'
with an ad-hoc counter.
2020-05-31 09:47:11 +01:00
Dmitry Gutov
780f674a82 Don't return transient projects with MAYBE-PROMPT=nil
* lisp/progmodes/project.el (project-current): Only return
transient projects when called with non-nil MAYBE-PROMPT.
Also only update the known projects lists in this case.
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03375.html).
2020-05-30 19:57:38 +03:00
immerrr
3dbe6530b1 Minor fix in 'find-alternate-file'
This fixes the use case when, for example, 'find-file-hooks'
fails.
* lisp/files.el (find-alternate-file): If buffer 'oname' exists,
kill it before renaming the new one.  (Bug#41359)
2020-05-30 15:25:34 +03:00
Eli Zaretskii
360d7c716d Remove private prototype for 'execve' and its uses in MinGW build
* src/sysdep.c (emacs_exec_file): Don't compile this function
anymore on WINDOWSNT, since it is not used there.  This function
was the only reason for having 'execve' prototype in ms-w32.h.

* nt/inc/ms-w32.h (execve): Remove prototype and the MinGW64 vs
ming.org mess that it causes.
2020-05-30 13:56:20 +03:00
Andrea Corallo
eeebbd5fcb Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-30 11:52:27 +01:00
Andrea Corallo
15c121ee0b * Avoid calling Ffile_exists_p too early
Being quite early in startup initialization is better not to rely on
Ffile_exists_p, this call Ffile_expand and not all the necessary
initialization already happened.

	* src/pdumper.c (dump_do_dump_relocation): Use fopen instead of
	Ffile_exists_p.
2020-05-30 11:45:19 +01:00
Eli Zaretskii
f42db4b6e1 Another fix of display of line-prefix with fringe bitmaps
* src/xdisp.c (redisplay_internal): Don't use "optimization 1"
if a glyph row from which to start display begins with a display
property that draws into the fringes.  (Bug#41584)
2020-05-29 23:02:10 +03:00
Stefan Monnier
187fe43108 * lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent
Use the new "space after paren" convention to get the desired indentation
2020-05-29 15:01:58 -04:00
Dmitry Gutov
ba292ea330 project-prompt-project-dir: Use more consistent prompts
* lisp/progmodes/project.el (project-prompt-project-dir):
Use more consistent prompts.
2020-05-29 21:37:12 +03:00
Eli Zaretskii
dc15e70ddd Fix display of line-prefix with fringe bitmaps
* src/xdisp.c (try_window_id): Don't use this optimization if a
glyph row from which to start display begins with a display
property that draws into the fringes.  (Bug#41584)
2020-05-29 17:00:52 +03:00
Eli Zaretskii
c74e24eacd Commit indian.el forgotten in previous change. 2020-05-29 16:30:44 +03:00
Michael Albinus
9050f0f1bc * lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_INVALID_PARAMETER". 2020-05-29 11:41:54 +02:00
akater
1b2a881c9b * lisp/emacs-lisp/lisp-mode.el: Add new indentation convention
(calculate-lisp-indent): To distinguish code and data when indenting,
introduce the convention that a space between an open paren and
a symbol indicate that this should be indented as a simple data list.
2020-05-29 00:26:09 -04:00
Arnold Noronha
df4991093b Create a buffer-local binding to improve performance
* lisp/ido.el (ido-make-buffer-list-1):
Create a buffer-local binding to improve performance when a lot of
buffers are open (bug#41029).

Copyright-paperwork-exempt: yes
2020-05-29 02:35:58 +03:00
Dmitry Gutov
7865820f6b next-error-find-buffer-function: Back to #'ignore
* lisp/simple.el (next-error-find-buffer-function):
Change the default back, to simplify the default behavior
(bug#40919).
2020-05-29 02:05:05 +03:00
Dmitry Gutov
7af4e72de2 ; project.el: Update TODO 2020-05-29 02:05:05 +03:00
James Thomas
7f692114cd Improve Malayalam language transliteration
The existing ITRANS scheme did not support some characters and
language quirks like 'chillu's.  The Inscript method had errors.
* lisp/language/ind-util.el (indian-mlm-base-table): Add archaic
chars, Mozhi combos; cleanup.
(indian-mlm-mozhi-table): New scheme Mozhi.
* lisp/leim/quail/indian.el (inscript-mlm-keytable): Correct
errors.  Add Inscript chillus & zero-width chars, Mozhi scheme.
* etc/NEWS: Mention the changes.
2020-05-28 20:29:56 +03:00
Simen Heggestøyl
d97f224fd0 Merge branch 'feature/project-switching' 2020-05-28 17:02:17 +02:00
Mattias Engdegård
2bdb2cd10d Document that {en,de}code-coding-string preserve match data
* lisp/international/mule.el (define-coding-system):
Require :pre-write-conversion and :post-read-conversion functions
to leave the match data untouched.
* src/coding.c (Fdecode_coding_string, Fencode_coding_string):
Document functions as match-data-preserving.

Suggested by Stefan Monnier (see bug#41445).
2020-05-28 16:58:57 +02:00
Glenn Morris
4939beacb3 Merge from origin/emacs-27
bd7b681dc4 (origin/emacs-27) Tiny texinfo markup fixes
d0dd0e0612 ; Fix more @var/@code mixups in Elisp manual
313dc0439e ; Fix another format-spec typo in the Elisp manual
9d7fd78421 Make next-error behavior a bit more flexible
0691d25295 * etc/NEWS.25: Belatedly announce upcase-dwim and downcase...
df91c94ca8 Fix access to single-byte characters in buffer text
2020-05-28 07:50:26 -07:00
Glenn Morris
a134691435 ; Merge from origin/emacs-27
The following commit was skipped:

478638e470 Revert "Fix eshell-mode-map initialization"
2020-05-28 07:50:26 -07:00
Glenn Morris
dc78327e32 Merge from origin/emacs-27
e7a3ed8a6d Fix tab-bar-tab-name-ellipsis initialization
4737d0af75 Fix Elisp manual entry for format-spec
0195809bb6 Fix rare assertion violations in 'etags'
cddb0079ff ; * lisp/format-spec.el (format-spec): Fix typo.
2020-05-28 07:50:25 -07:00
Simen Heggestøyl
9823c66b88 ; * doc/emacs/maintaining.texi: Fix typo. 2020-05-28 16:40:30 +02:00
Glenn Morris
bd7b681dc4 Tiny texinfo markup fixes
* doc/lispref/edebug.texi (Edebug Views):
* doc/lispref/loading.texi (Library Search):
* doc/lispref/os.texi (User Identification): Markup fixes.
2020-05-27 16:30:00 -07:00
Basil L. Contovounesios
d0dd0e0612 ; Fix more @var/@code mixups in Elisp manual
* doc/lispref/text.texi (Replacing): Fix markup for function
arguments.
2020-05-28 00:12:54 +01:00
Basil L. Contovounesios
313dc0439e ; Fix another format-spec typo in the Elisp manual
* doc/lispref/text.texi (Interpolated Strings): Correct markup for
function argument.
2020-05-27 23:43:14 +01:00
Dmitry Gutov
9d7fd78421 Make next-error behavior a bit more flexible
* lisp/simple.el (next-error-no-navigation-try-current):
Extract from the case #2 in next-error-find-buffer (bug#40919).
(next-error-find-buffer-function): Use it as the default.
2020-05-27 22:15:41 +03:00
Noam Postavsky
0691d25295 * etc/NEWS.25: Belatedly announce upcase-dwim and downcase-dwim. 2020-05-27 14:09:23 -04:00
Noam Postavsky
ae348f3286 Adjust NEWS for revert of eshell fix on emacs-27 (Bug#41370)
* etc/NEWS.27: Move "Eshell no longer re-initializes its keymap every
call" to...
* etc/NEWS: ... here.
2020-05-27 13:00:05 -04:00
Noam Postavsky
a824d5c87a Fix customizing of ido-mode (Bug#41557)
lisp/ido.el (ido-mode): When setting the user option to nil, pass 0 to
the function, so that it will be disabled as intended.
2020-05-27 13:00:03 -04:00
Paul Eggert
dcd96745b0 Fix crash with invalid bytecode vectors
* src/lread.c (read_vector): If the vector is to short to be for
bytecodes don’t do bytecode processing for it, as the processing
might run past the end of the vector.
2020-05-27 09:51:12 -07:00
Paul Eggert
9d11f127f1 --with-wide-int is a no-op on 64-bit hosts
* configure.ac: Clarify wording for --with-wide-int help.
* src/pdumper.c (dump_vectorlike_generic):
Do the eassert even if --with-wide-int was specified unnecessarily.
2020-05-27 09:51:12 -07:00
Paul Eggert
22446569cd Omit unnecessary USE_LAB_TAG #if
* src/lisp.h: Omit unnecessary #if; the condition is always false now.
2020-05-27 09:51:11 -07:00
Simen Heggestøyl
b7dffcb501 Simplify the previous commit
* lisp/progmodes/project.el (project--read-project-list): Simplify the
previous commit by utilizing the optional OMIT-NULLS argument to
'split-string'.
2020-05-27 17:26:25 +02:00
Mattias Engdegård
c5cf630ecd Don't clobber match data in utf-8-hfs conversion (bug#41445)
Reported by Ture Pålsson.

* lisp/international/ucs-normalize.el
(ucs-normalize-hfs-nfd-post-read-conversion)
(ucs-normalize-hfs-nfd-pre-write-conversion):
Use save-match-data to avoid match data clobber in normalisation.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-save-match-data): New test.
2020-05-27 16:29:43 +02:00