1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 05:51:21 -08:00
Commit graph

153902 commits

Author SHA1 Message Date
Mattias Engdegård
7392f2dc41 Byte code arity check micro-optimisation
* src/bytecode.c (exec_byte_code): Slight simplification.
2022-01-24 11:41:46 +01:00
Mattias Engdegård
65caf5b205 Pin bytecode strings to avoid copy at call time
Avoid making a copy (in the interpreter C stack frame) of the bytecode
string by making sure it won't be moved by the GC.  This is done by
reallocating it to the heap normally only used for large strings,
which isn't compacted.

This requires that we retain an explicit reference to the bytecode
string object (`bytestr`) lest it be GCed away should all other
references vanish during execution.  We allocate an extra stack slot
for that, as we already do for the constant vector object.

* src/alloc.c (allocate_string_data): Add `immovable` argument.
(resize_string_data, make_clear_multibyte_string): Use it.
(pin_string): New.
* src/pdumper.c (dump_string): Fix incorrect comment.
Update hash for Lisp_String (only comments changed, not contents).
* src/lread.c (read1):
* src/alloc.c (Fmake_byte_code, purecopy):
* src/bytecode.c (Fbyte_code): Pin bytecode on object creation.
(exec_byte_code): Don't copy bytecode.  Retain `bytestr` explicitly.
* src/lisp.h (Lisp_String): Explain special size_byte values.
(string_immovable_p): New.
2022-01-24 11:41:46 +01:00
Mattias Engdegård
ce1de3a8d9 Inline setcar and setcdr in byte-code interpreter
The function call overhead is nontrivial in comparison to the actual
code which makes this worthwhile.

* src/bytecode.c (exec_byte_code):
Inline code from Fsetcar and Fsetcdr.
2022-01-24 11:41:46 +01:00
Mattias Engdegård
6c000af611 Inline fixnum operations in bytecode interpreter
Since numeric operations are mostly done on fixnums, this gives a
speed-up for common code.

* src/bytecode.c (exec_byte_code): Inline fixnum comparisons and
operations with fixnum results: =, >, <, <=, >=, -, +, -, *, /, %, max
and min.
2022-01-24 11:41:46 +01:00
Mattias Engdegård
15961108c9 Short-circuit the recursive bytecode funcall chain
Inline parts of the code for function calls to speed up the common
case of calling lexbound byte-code.  By eliminating intermediate
functions, this also reduces C stack usage a little.

* src/bytecode.c (exec_byte_code): Inline parts of Ffuncall,
funcall_lambda and fetch_and_exec_byte_code in the Bcall opcode
handler.
* src/eval.c (backtrace_debug_on_exit): Inline and move to lisp.h.
(do_debug_on_call): Make global so that it can be called from
bytecode.c.
(funcall_general): New function, essentially the meat of Ffuncall.
* src/lisp.h (backtrace_debug_on_exit): Moved here from eval.c.
2022-01-24 11:41:46 +01:00
Lars Ingebrigtsen
bcf844b5fc Add "then" to sh--completion-keywords
* lisp/progmodes/sh-script.el (sh--completion-keywords): Allow
completing over "then" (bug#53490).
2022-01-24 11:16:30 +01:00
Lars Ingebrigtsen
842ea1e22f Fix Gnus registry key bindings
* lisp/gnus/gnus-registry.el (gnus-registry-install-shortcuts):
Don't overwrite all other M M commands (bug#53492).
2022-01-24 11:09:40 +01:00
Martin Rudalics
2dec6f59ec ; * src/xfns.c (xic_preedit_draw_callback): Init text_length to quieten gcc. 2022-01-24 10:43:56 +01:00
Martin Rudalics
1575afe8df Orderly inhibit frame resizing when activating tool or tab bar (Bug#52986)
* src/xdisp.c (redisplay_tab_bar, redisplay_tool_bar): If we do
not display a tool or tab bar in these functions, still set
f->tool/tab_bar_redisplayed and f->tool/tab_bar_resized.  This
avoids that when one of these are initially turned off, a later
activation resizes the frame despite of the fact that
'frame-inhibit-implied-resize' should prevent it (Bug#52986).
2022-01-24 10:33:15 +01:00
Po Lu
dee029e19f * src/xterm.c (x_composite_image): Use the display's picture format. 2022-01-24 16:22:54 +08:00
Po Lu
e606434be6 Scale coordinates when checking if a touch event falls inside menu bar
* src/xterm.c (handle_one_xevent): Apply scale to touch event
coordinates before intersecting them with the menu bar.
2022-01-24 15:37:24 +08:00
Paul Eggert
8d6fbc4b48 Avoid glitches in ELC lines in build output
* src/verbose.mk.in (AM_V_ELC, AM_V_ELN): Use ifneq not ifdef, as
we want have_working_info’s value expanded (Bug#53358).
2022-01-23 23:23:31 -08:00
Po Lu
eac4b924cb * src/xterm.c (handle_one_xevent): Drop frame picture on configure. 2022-01-24 12:54:26 +08:00
Po Lu
45208755d1 Add some code for transparent frame backgrounds without Cairo
* src/image.c (svg_load_image): Fix build without native image
transforms.

* src/xfns.c (set_up_x_back_buffer):
(tear_down_x_back_buffer): Free XR picture if present.

* src/xftfont.c (xftfont_get_xft_draw): Fix formatting issue.

* src/xterm.c (x_xr_ensure_picture): New function.
(FRAME_CR_CONTEXT, FRAME_CR_CONTEXT):
(FRAME_CR_SURFACE_DESIRED_WIDTH)
(FRAME_CR_SURFACE_DESIRED_HEIGHT): Move to separate USE_CAIRO
block so the ext data code can be used on builds with XRender as
well.

(x_xr_apply_ext_clip):
(x_xr_reset_ext_clip): New functions.
(x_set_clip_rectangles):
(x_reset_clip_rectangles): Set ext data on XRender as well.
(x_term_init): Look for a picture format appropriate for our
purposes.
(x_clear_area): Use XRenderFillRectangle to draw backgrounds if
available.
(x_xrender_color_from_gc_foreground):
(x_xrender_color_from_gc_background): New functions.

* src/xterm.h (FRAME_X_PICTURE):
(FRAME_X_PICTURE_FORMAT)
(FRAME_CHECK_XR_VERSION): New macros.

(struct x_gc_ext_data): Define on XRender as well.
(struct x_display_info): Define ext_codes when using XRender and
add new field `pict_format'.
(struct x_output): New field `picture'.
2022-01-24 12:44:55 +08:00
Po Lu
3a7b158ffd Get rid of compose status on XI2
* src/xterm.c (handle_one_xevent): Stop assuming compose
processing will occur on XI2.
2022-01-24 10:22:19 +08:00
Alan Mackenzie
dfae76c991 Expunge read-with-symbol-position and read-symbol-positions-list
These are remnants of the old way of determining byte compiler warning
positions.

* src/lread.c (read_internal_start, read1): Remove initializations amd
manipulations of these variables.
(syms_of_lread): Remove the declarations of the variables.

* lisp/emacs-list/bytecomp.el (compile-defun, byte-compile-from-buffer):
Remove bindings of the variables.
2022-01-24 01:08:03 +00:00
Po Lu
6cea4d1fdb Set IC preedit area on ConfigureNotify
* src/xterm.c (handle_one_xevent): Set the preedit spot when a
ConfigureNotify event is received.
2022-01-24 08:46:39 +08:00
Alan Mackenzie
f4af1137e6 Bind print-symbols-bare to t in byte-compile-from-buffer
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Bind
print-symbols-bare to t here for the benefit of non-defining forms in buffers.
2022-01-23 16:41:23 +00:00
Lars Ingebrigtsen
21a3bd9f36 Make message in hack-local-variables-confirm clearer
* lisp/files.el (hack-local-variables-confirm): Mention the
.dir-locals.el file in the message to be slightly less confusing
(bug#27066).
2022-01-23 17:09:55 +01:00
Lars Ingebrigtsen
a82c3557fc Make `C-x M-x insert-kbd-macro RET RET' work better
* lisp/macros.el (insert-kbd-macro): Don't give bogus output on
names that have no function definition (bug#30309).
2022-01-23 16:48:42 +01:00
Thuna
80098a2830 Fix tabulated-list-widen-current-column widening wrong column
* tabulated-list.el (tabulated-list-widen-current-column): Use correct
comparison operation when checking if point is within the column
bounds  (bug#53375).

Copyright-paperwork-exempt: yes
2022-01-23 15:55:48 +01:00
Lars Ingebrigtsen
d0f3de72b6 Allow using outline minor mode in `M-x apropos-value'
* lisp/apropos.el (apropos-mode): Set up outline minor mode
(bug#31094).
(apropos-value): Don't add "---" separators, because it doesn't
really seem to add anything much.
(apropos-value-internal): Escape newlines so that no values can be
confused for headings.
2022-01-23 15:43:19 +01:00
Lars Ingebrigtsen
a37da91a09 Make apropos-print-doc more resilient
* lisp/apropos.el (apropos-print-doc): Don't bug out on doc
strings that have invalid command key syntaxes.
2022-01-23 15:08:34 +01:00
Alan Mackenzie
3b0d848b54 Fix position argument to macroexp--warn-wrap in cconv--convert-funcbody
* lisp/emacs-lisp/cconv.el (cconv--convert-funcbody): Change the position
argument to macroexp--warn-wrap from BODY to ARG, to give correct positions in
warning messages.
2022-01-23 13:49:27 +00:00
Lars Ingebrigtsen
9f5048456a Improve `M-x speedbar' under emacs -nw very slightly
* lisp/speedbar.el (speedbar-frame-mode): `M-x speedbar' doesn't
seem to do anything visible under -nw, so issue a message in that
case to tell the user how to proceed (bug#32597).
2022-01-23 14:46:55 +01:00
Lars Ingebrigtsen
db454c98f1 Regenerate ldefs-boot.el 2022-01-23 14:37:32 +01:00
Lars Ingebrigtsen
838ad7037b Make kill-process into a command
* doc/lispref/processes.texi (Signals to Processes): Document it.
* src/process.c (Fkill_process): Make into a command (bug#32640).
2022-01-23 14:37:32 +01:00
Phil Sainty
1c1d5eee4c Add new function to prompt a user for a process name
* lisp/emacs-lisp/subr-x.el (read-process-name): New function
(bug#32640).
2022-01-23 14:37:32 +01:00
Po Lu
80b66d80ef Make sure cursors are drawn correctly after haiku_clear_frame
* src/haikuterm.c (haiku_clear_frame): Mark all cursors as off.
2022-01-23 13:34:03 +00:00
Alex Kost
0e833a1d5f Improve scheme-imenu-generic-expression
* lisp/progmodes/scheme.el (scheme-imenu-generic-expression):
Improve so that we match `define-public' etc (bug#33117).
2022-01-23 14:12:34 +01:00
Lars Ingebrigtsen
1bcbca3750 Make occur edit mode more resilient
* lisp/replace.el (occur-engine): Make the prefix read-only so
that it's preserved in edit mode (bug#53419).
2022-01-23 13:54:16 +01:00
Lars Ingebrigtsen
ab73a87858 Revert the other bits related to `load-read-file'
* src/lread.c (syms_of_lread): Revert the other bits related to
reverting `byte-compile-from-buffer'/`load-read-file'.
2022-01-23 13:43:53 +01:00
Po Lu
32e1894943 Fix menus on the no-toolkit build when using XI2
* src/xmenu.c (x_activate_menubar):
(create_and_show_popup_menu): Only ungrab the device if it is
actually grabbed.
(x_menu_show): Release XI2 passive grab.
2022-01-23 19:34:39 +08:00
Stefan Kangas
1319d108da Merge from origin/emacs-28
6d3608be88 Seccomp: improve support for newer versions of glibc (Bug#...
e58ecd01d5 EUDC: Fix a quoting bug in the BBDB backend
2022-01-23 06:30:31 +01:00
Po Lu
5d257a99b7 Fix documentation formatting error
* doc/lispref/streams.texi (Input Functions): Remove extraneous
@end defun.
2022-01-23 01:25:55 +00:00
Po Lu
bdcbe897d1 * src/haikumenu.c (run_menu_bar_help_event): Fix bounds sanity check. 2022-01-23 01:19:22 +00:00
Po Lu
7c16f69101 Clean up some of the X extension related code
* src/image.c (Fimage_transforms_p): Remove unused variables.
* src/xterm.c (x_probe_xfixes_extension):
(x_term_init): Probe for xfixes during terminal initialization
instead.
* src/xterm.h (struct x_display_info): New fields for xfixes
support.
2022-01-23 09:14:16 +08:00
Po Lu
27e080d009 * src/pgtkterm.c (pgtk_flash): Fix input blocking. 2022-01-23 08:46:19 +08:00
Eli Zaretskii
7922131bb2 Minor copyedits in "Symbols with Position"
* doc/lispref/symbols.texi (Symbols with Position): Fix wording
and improve indexing.
2022-01-22 20:47:10 +02:00
Alan Mackenzie
df49e3a3ab Merge branch 'master' of /home/acm/emacs/emacs.git/master 2022-01-22 18:02:01 +00:00
Alan Mackenzie
fd31ef21c5 Don't use 'load-read-function' in byte-compile-from-buffer
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Call
read-positioning-symbols directly, rather than binding load-read-function to
it.  This is so that a lower level use of load-read-function will not return a
form containing symbols with position.
2022-01-22 17:48:46 +00:00
Alan Mackenzie
88e1f8b020 Merge branch 'scratch/correct-warning-pos' 2022-01-22 17:41:03 +00:00
Lars Ingebrigtsen
f57f28935a Fix print-unreadable-function documentation
* doc/lispref/streams.texi (Output Variables): Fix description of
non-string values.
2022-01-22 17:20:57 +01:00
Philipp Stephani
6d3608be88 Seccomp: improve support for newer versions of glibc (Bug#51073)
* lib-src/seccomp-filter.c (main): Allow 'pread64' and 'faccessat2'
system calls.  Newer versions of glibc use these system call (starting
with commits 95c1056962a3f2297c94ce47f0eaf0c5b6563231 and
3d3ab573a5f3071992cbc4f57d50d1d29d55bde2, respectively).
2022-01-22 17:18:50 +01:00
Michael Albinus
6139a05241 Add direct remote copying in Tramp's scp support
* doc/misc/tramp.texi: Use @trampfn{} function where possible.
(Top, Configuration): Insert section 'Ssh setup' and remove
section 'Windows setup hints' in menu.
(Default Method): Mention tramp-use-scp-direct-remote-copying.
(Ssh setup): New node.
(Windows setup hints): Move it to that new node.
(Frequently Asked Questions): Move items about ssh config to that node.

* etc/NEWS: Add Tramp's direct remote copying feature.  Fix typos.

* lisp/net/tramp-sh.el (tramp-use-scp-direct-remote-copying):
New defcustom.
(tramp-methods) <scp, scpx>: Add "%y" marker.
(tramp-scp-direct-remote-copying): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Extend for direct
remote copying.

* lisp/net/tramp.el (tramp-methods): Extend docstring.
(tramp-password-prompt-not-unique): New defvar.
(tramp-read-passwd): Adapt docstring.
(tramp-read-passwd-without-cache): New defun.
(tramp-action-password): Call it.
2022-01-22 17:12:14 +01:00
Lars Ingebrigtsen
1edde2fc7a Mark nil vc-follow-symlinks as safe
* lisp/vc/vc-hooks.el (vc-follow-symlinks): A nil value should be
safe for file-local (bug#33264).
2022-01-22 16:44:25 +01:00
Lars Ingebrigtsen
79e54a1b75 Use load-read-function in byte-compile-from-buffer
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use
load-read-function.

* src/lread.c (syms_of_lread): Adjust doc string (bug#33723).
2022-01-22 16:37:14 +01:00
Lars Ingebrigtsen
3b33a14380 Clarify Vprint_unreadable_function doc string
* src/print.c (syms_of_print): Clarify Vprint_unreadable_function
doc string
2022-01-22 16:24:42 +01:00
Eli Zaretskii
71b433f035 Fix documentation of 'unprintable' stuff
* src/print.c (syms_of_print) <print-unreadable-function>:
* doc/lispref/streams.texi (Input Functions, Output Variables):
Improve the documentation of 'print-unreadable-function' and
'readablep'.  Add indexing and cross-references.
2022-01-22 16:49:06 +02:00
Lars Ingebrigtsen
41846901e2 Improve dired-do-create-files slightly
* lisp/dired-aux.el (dired-do-create-files): Expand slightly upon
the doc string (bug#35367).  Suggested by Mike Kupfer
<mkupfer@alum.berkeley.edu>.
2022-01-22 15:42:59 +01:00