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

155589 commits

Author SHA1 Message Date
Jimmy Aguilar Mena
fd7bde612a Add new special text attribute cursor-face
Reuse the functions for highlight region.
* lisp/simple.el (redisplay-unhighlight-overlay-function) :
(redisplay-highlight-overlay-function) : New functions from previous
lambda
(redisplay-unhighlight-region-function) :
(redisplay-highlight-region-function) : Redefined with the new functions.
(redisplay--update-cursor-property-highlight) : New function for
pre-redisplay-functions.
2022-03-13 19:32:42 +01:00
Mattias Engdegård
3ed79cdbf2 Separate bytecode stack
Use a dedicated stack for bytecode, instead of using the C stack.
Stack frames are managed explicitly and we stay in the same
exec_byte_code activation throughout bytecode function calls and
returns.  In other words, exec_byte_code no longer uses recursion
for calling bytecode functions.

This results in better performance, and bytecode recursion is no
longer limited by the size of the C stack.  The bytecode stack is
currently of fixed size but overflow is handled gracefully by
signalling a Lisp error instead of the hard crash that we get now.

In addition, GC marking of the stack is now faster and more precise.
Full precision could be attained if desired.

* src/alloc.c (ATTRIBUTE_NO_SANITIZE_ADDRESS): Make non-static.
* src/bytecode.c (enum stack_frame_index, BC_STACK_SIZE)
(sf_get_ptr, sf_set_ptr, sf_get_lisp_ptr, sf_set_lisp_ptr)
(sf_get_saved_pc, sf_set_saved_pc, init_bc_thread, free_bc_thread)
(mark_bytecode, Finternal_stack_stats, valid_sp): New.
(exec_byte_code): Adapt to use the new bytecode stack.
(syms_of_bytecode): Add defsubr.
* src/eval.c (unwind_to_catch): Restore saved stack frame.
(push_handler_nosignal): Save stack frame.
* src/lisp.h (struct handler): Add act_rec member.
(get_act_rec, set_act_rec): New.
* src/thread.c (mark_one_thread): Call mark_bytecode.
(finalize_one_thread): Free bytecode thread state.
(Fmake_thread, init_threads): Set up bytecode thread state.
* src/thread.h (struct bc_thread_state): New.
(struct thread_state): Add bytecode thread state.
2022-03-13 17:51:49 +01:00
Mattias Engdegård
267f41c7ce Simplify exec_byte_code arguments
Pass the function object and encoded arity, not the other components.
This speeds up several call paths and is necessary for improvements to
come.

* src/bytecode.c (Fbyte_code): Make a new byte code object for
execution.  This is slower but performance isn't critical here.
(exec_byte_code): Retrieve components from the passed function.
* src/eval.c (fetch_and_exec_byte_code):
* src/lisp.h (exec_byte_code): Update signature.
2022-03-13 17:51:49 +01:00
Michael Albinus
35f75b63b5 * lisp/net/ange-ftp.el (ange-ftp-ls): Make a loop when sanitizing LSARGS. 2022-03-13 16:50:14 +01:00
Jimmy Aguilar Mena
49d1fe5222 Make minibuffer-hide-completions interactive.
Mainly to find a binding for it.
2022-03-13 16:04:58 +01:00
Jimmy Aguilar Mena
7a6c6f1668 Add completion-header-string.
* doc/emacs/mini.texi (completion-header-string): Remove
completion-header-text-property-list and completion-lazy-count.
(completion-header-string): Substitutes the removed variable.
2022-03-13 15:59:13 +01:00
Lars Ingebrigtsen
466a7e44d7 Add cl-defgeneric to find-func, too
* lisp/emacs-lisp/find-func.el (find-function-regexp): Add
cl-defgeneric, too (bug#54343).
2022-03-13 15:17:24 +01:00
Po Lu
49f70b603f Allow overscrolling on Haiku scroll bars that are full
* src/haiku_support.cc (MouseMoved): Allow overscrolling even if
portion is less than 1.0.
2022-03-13 12:58:06 +00:00
Po Lu
6ab04b59b1 Fix pointer event tracking on top of Haiku scroll bars
* src/haiku_support.cc (MouseDown): Set correct mouse event mask
in case the scroll bar widget decides to not do that.
2022-03-13 12:57:56 +00:00
Po Lu
1b8711f426 Fix splurious button events being generated on Haiku
* src/haiku_support.cc (MouseDown, MouseUp): Don't process if
the grab is not appropriate for the buttons that were pressed.
2022-03-13 12:33:09 +00:00
Po Lu
676dffff4b Fix setting IM spot after key press events
* src/xterm.c (handle_one_xevent): Check f is not NULL before
trying to set its status area and set preedit spot location
after KeyPress events.
2022-03-13 19:05:04 +08:00
Mattias Engdegård
c6287816f2 Fix esh-proc-tests on macOS
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline):
Add pattern matching output when killing a process on macOS (and
possibly other BSDs).
2022-03-13 11:01:59 +01:00
Eli Zaretskii
15b303dfc9 ; * etc/NEWS: Fix typo. 2022-03-13 11:40:55 +02:00
Eli Zaretskii
04ad6b2263 ; * etc/NEWS: Cleanups as followup to bug#50143. 2022-03-13 10:20:37 +02:00
Visuwesh
9a786aea73 * quail.el (quail-define-package): Describe VAR form in DOCSTRING better.
Bug#50143

Copyright-paperwork-exempt: yes
2022-03-13 10:19:18 +02:00
Visuwesh
b447fd1a3e Follow contemporary practices in the Tamil input methods
* lisp/language/ind-util.el (indian-tml-base-digits-table): New table
to translate digits.
(indian-tml-base-table): Don't translate digits.
(indian-tml-itrans-digits-v5-hash): Hashtable that translates digits.

* lisp/leim/quail/indian.el (quail-tamil-itrans-compute-signs-table)
(quail-tamil-itrans-various-signs-table)
(quail-tamil-itrans-various-signs-and-digits-table): Separate out the
digits from the signs table using the function
'quail-tamil-itrans-compute-signs-table'.
(tamil-itrans-digits, tamil-inscript-digits): New input methods that
translates digits.
(tamil-itrans, tamil-inscript): Fix table inclusion.

* etc/NEWS: Announce the change.

Fixes bug#50143.

Copyright-paperwork-exempt: yes
2022-03-13 10:17:09 +02:00
Eli Zaretskii
1ec4063017 ; * admin/make-tarball.txt: Minor updates. 2022-03-13 09:53:59 +02:00
Po Lu
6ea5b5e1b4 Fix small regression for horizontal scroll bars
* src/haikuterm.c (haiku_read_socket): Restore previous
horizontal scrollbar code, since the change it was intended for
was never made.
2022-03-13 07:27:24 +00:00
Po Lu
12f666c1d5 Improve overscrolling support on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New field
`real_max_value'.
(MessageReceived): Set real max value.
(MouseMoved): Get rid of magic numbers by using real max value
instead.
2022-03-13 07:22:59 +00:00
Po Lu
ae8c146332 ; * haiku_support.cc (MessageReceived): Fix 32-bit build. 2022-03-13 06:50:12 +00:00
Po Lu
8c1a068159 Allow dragging scroll bar for overscroll on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New fields
`in_overscroll', `can_overscroll', `last_overscroll',
`last_reported_overscroll_value' and `max_value'.
(ValueChanged): Make very sure extraneous value are not
generated.
(MouseUp): Clear overscroll if enabled.
(MouseMoved): If overscroll is enabled and dragging downwards
fails to dislodge the maximum value, enable overscrolling.
(BView_scroll_bar_update): New parameter `can_overscroll'
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_set_scroll_bar_thumb)
(haiku_set_horizontal_scroll_bar_thumb): Adjust parameters to
scroll bar update functions.
(haiku_read_socket): Take ceiling of bar position if
horizontal.
2022-03-13 06:45:46 +00:00
Stefan Kangas
9f4be0e6a5 ; Merge from origin/emacs-28
The following commit was skipped:

5ba9c8c364 Emacs pretest 28.0.92
2022-03-13 06:30:42 +01:00
Stefan Kangas
e5d48a2263 Merge from origin/emacs-28
e5b191465d ; * admin/authors.el (authors-canonical-file-name): Remove...
6b0fdf73cf ; Fix data structures in authors.el
2022-03-13 06:30:41 +01:00
Stefan Monnier
20d9c4b59f Flocate_file_internal: Protect from .eln remapping
Don't use `openp`s functionality to remap `.elc` files to `.eln` files
since `locate-file` is not specific to ELisp files.
This should be not just simpler but more robust than the current
hack which tries to undo the damage after the fact.

* src/lread.c (Flocate_file_internal): Don't map `.elc` to `.eln`.
* lisp/files.el (locate-file): Simplify accordingly.
2022-03-12 23:51:22 -05:00
Po Lu
e7ab69e762 Improve reliaibility of scroll bar dimensions adjustment on GTK 3
* src/gtkutil.c (xg_scroll_bar_size_allocate_cb): New function.
(xg_finish_scroll_bar_creation): Attach new signal.
(xg_update_scrollbar_pos)
(xg_update_horizontal_scrollbar_pos): Also set window dimensions
for the event box.
* src/xterm.c (x_scroll_bar_configure): New function.
* src/xterm.h: Update prototypes.
2022-03-13 09:28:58 +08:00
Lars Ingebrigtsen
49683652f8 Further locate-file fixes on nativecomp
* lisp/files.el (locate-file): Fix up previous locate-file change
-- don't unconditionally return .elc on nativecomp.
2022-03-12 22:54:38 +01:00
Lars Ingebrigtsen
07868952d1 Disable esh-proc-test/kill-pipeline on EMBA
Test esh-proc-test/kill-pipeline condition:
    (ert-test-failed
     ((should
       (string-match-p
	(rx ...)
	(buffer-substring-no-properties output-start ...)))
      :form
      (string-match-p "\\(?:\\(?:interrupt\\|killed\\)\n\\)" "")
2022-03-12 22:45:38 +01:00
Lars Ingebrigtsen
ed42d7ffb0 Fix EMBA failure for ert-test-record-backtrace
* test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Make
  this work with AOT.
2022-03-12 22:40:49 +01:00
Lars Ingebrigtsen
f8bb6cca33 Return the same file from locate-file in nativecomp and non
* lisp/files.el (locate-file): Return the .elc file (if it exists)
in nativecomp, too, to mimic the behaviour from non-nativecomp
builds (bug#51308).
2022-03-12 22:32:08 +01:00
Lars Ingebrigtsen
84f59f7585 Make find-function-regexp also find cl-defun/defmethod
* lisp/emacs-lisp/find-func.el (find-function-regexp): Also find
cl-defun and cl-defmethod (bug#54343).
2022-03-12 18:53:36 +01:00
Colin Woodbury
139042eb86 * lisp/progmodes/python.el: Account for new keywords.
* lisp/progmodes/python.el (python-font-lock-keywords-level-2): As
of Python 3.10, Python has structured pattern matching. This adds
two new keywords which need to be highlighted (bug#54345).
2022-03-12 18:46:55 +01:00
Alexander Adolf
f143fcc0ed Facilitate Customisation of Message-Mode Header Completion Behaviour
* lisp/gnus/message.el (message-email-recipient-header-regexp):
New user option.
(message-completion-alist): Use it here.
2022-03-12 18:15:24 +01:00
Mattias Engdegård
bea1a96335 ; * src/eval.c: (grow_specpdl): Remove another redundant declaration 2022-03-12 17:54:25 +01:00
Lars Ingebrigtsen
67be8a45a6 Mark tramp-test30-make-process unstable on EMBA
* test/lisp/net/tramp-tests.el (tramp-test30-make-process): This times
  out on EMBA.
2022-03-12 17:50:25 +01:00
Mattias Engdegård
b176b9d4d1 ; * src/lisp.h: Remove redundant declaration 2022-03-12 17:46:38 +01:00
Mattias Engdegård
2c54e9a1dd Remove never-used relative jump opcodes
* src/bytecode.c (BYTE_CODES, exec_byte_code):
Remove relative jump opcodes that seem to have been a short-lived
experiment, never used in a release.
2022-03-12 17:32:31 +01:00
Mattias Engdegård
88889212c7 Remove debug code for opcodes long gone
* src/bytecode.c (BYTE_CODES, enum byte_code_op, exec_byte_code):
Don't display custom messages in debug mode for Bscan_buffer and
Bset_mark which were removed long ago.
2022-03-12 17:32:31 +01:00
Mattias Engdegård
2fb98486e1 Faster bytecode immediate argument fetching
* src/bytecode.c (FETCH2):
Use `|` instead of `+` to combine the bytes forming a 16-bit immediate
argument so that GCC (prior to version 12) recognises the idiom and
generates a 16-bit load.  This applies for little-endian machines with
cheap unaligned accesses such as x86[-64], arm64 and power64le.

This 1-character change results in a measurable speed gain on many
kinds of Lisp code, as 16-bit immediates are used by all jump
instructions.

Clang performs this optimisation for both `+` and `|` from version 10.
2022-03-12 17:32:31 +01:00
Mattias Engdegård
fe65db05f4 Maintain end of specpdl instead of size
Keep track of the end of specpdl explicitly since that is what we are
comparing against on critical code paths.

* src/eval.c (init_eval_once_for_pdumper, signal_or_quit)
(grow_specpdl_allocation):
* src/fileio.c (Fdo_auto_save):
* src/lisp.h (grow_specpdl):
* src/thread.c (run_thread, Fmake_thread):
* src/thread.h (struct thread_state):
Replace specpdl_size with specpdl_end, according to the equation
specpdl_end = specpdl + specpdl_size.
2022-03-12 17:32:31 +01:00
Mattias Engdegård
213483124b Inline record_in_backtrace
It's critical in several function call paths.

* src/eval.c (grow_specpdl_allocation): Make non-static.
(grow_specpdl, record_in_backtrace): Move from here...
* src/lisp.h (grow_specpdl, record_in_backtrace): ... to here,
and declare inline.
2022-03-12 17:32:31 +01:00
Po Lu
6ef9dc7797 Fix the PGTK build
* src/gtkutil.c (xg_finish_scroll_bar_creation): Fix ifdefs
preventing x_window from being correctly set.
(xg_get_scroll_id_for_window): Ifdef out unused function.
2022-03-12 20:58:18 +08:00
Po Lu
82a454915c Try really hard to make GTK 3 scroll bars fit
* src/gtkutil.c (xg_get_widget_from_map): New argument DISPLAY.
All callers changed.
(find_scrollbar_cb): New function.
(xg_finish_scroll_bar_creation, xg_remove_scroll_bar)
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb)
(xg_set_toolkit_horizontal_scroll_bar_thumb, xg_initialize):
Stop using id_to_widget_map on X builds with GTK 3 and set the
event box as the x_window instead.
* src/xterm.c (x_window_to_scroll_bar): Don't look for ID on GTK
3.
(handle_one_xevent): If a ConfigureNotify event is found for a
scroll bar and the dimensions are wrong, resize the X window to
the right ones.
2022-03-12 20:44:35 +08:00
Eli Zaretskii
5ba9c8c364 Emacs pretest 28.0.92
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.0.92.

* etc/AUTHORS:
* lisp/ldefs-boot.el: Update for pretest 28.0.92.

* ChangeLog.3: Regenerate.
2022-03-12 04:44:46 -05:00
Eli Zaretskii
e5b191465d ; * admin/authors.el (authors-canonical-file-name): Remove debug leftover. 2022-03-12 03:32:47 -05:00
Eli Zaretskii
6b0fdf73cf ; Fix data structures in authors.el
* admin/authors.el (authors-aliases, authors-renamed-files-alist):
Update and correct the databases.
(authors-renamed-files-alist): Add commentary explaining how to
add entries for renamed/moved files.
(authors-canonical-file-name): Clarify the semantics of the
arguments.
2022-03-12 03:28:45 -05:00
Stefan Kangas
3af12cb8f2 Merge from origin/emacs-28
dbe6a3ecf7 Fix regression in 'custom-prompt-customize-unsaved-options'
a9920473f6 Improve documentation of 'map-charset-chars'
2022-03-12 06:34:05 +01:00
Po Lu
b5ac604b15 Fix some issues with input methods that depend on button state
* src/xterm.c (handle_one_xevent): Translate button state before
filtering events.
2022-03-12 13:03:00 +08:00
Po Lu
d0ff20f2e6 Fix horizontal scroll bar updating on Haiku
* src/haikuterm.c (haiku_set_horizontal_scroll_bar_thumb): Just
take portion and position without adjustments.
2022-03-12 03:16:00 +00:00
Po Lu
37cda51353 Use more reasonable default timeouts in Haiku menu loop
* src/haiku_support.cc (BMenu_run): Set default timeout to 10
seconds.
2022-03-12 03:02:03 +00:00
Po Lu
3ba3fdf7aa Make C-mouse-3 on scroll bars work on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New field
`handle_button'.
(MouseDown, MouseUp): Pass button events with ControlMask to
parent view.
2022-03-12 02:47:03 +00:00