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

155589 commits

Author SHA1 Message Date
Juri Linkov
7f7b418ae6 * lisp/hi-lock.el (hi-lock-use-overlays): New variable.
(hi-lock-set-pattern): Use it.  Set overlay priority to 1.
(bug#53155)
2022-01-24 21:15:37 +02:00
Lars Ingebrigtsen
ee08481712 Add NEWS entry for term-clear-full-screen-programs 2022-01-24 20:02:33 +01:00
Miha Rihtaršič
81886aeaff Implement alternative sub-buffer support in term.el
* etc/e/eterm-color.ti: Added termcaps for entering and leaving an
alternative sub-buffer.
* lisp/term.el (term-reset-size): Resize correctly in an alternative
sub-buffer is in use.
(term-clear-full-screen-programs): New user option.
(term-handle-ansi-escape):
(term-termcap-format): Handle termcaps for entering and leaving an
alternative sub-buffer.
(term-switch-to-alternate-sub-buffer): New (used to be commented out)
function to enter or leave an alternative sub-buffer.
bug#53485
2022-01-24 20:02:33 +01:00
Juri Linkov
b93902e22b * lisp/info.el (Info-link-keymap): Fix repetitive clicks on the header line.
Rebind [header-line mouse-1] from mouse-select-window to
Info-mouse-follow-link.  It selects the window anyway,
but also allows repetitively clicking on the Next button
on the Info header line (bug#53170).
2022-01-24 20:54:54 +02:00
Lars Ingebrigtsen
ee87c2f8ca Don't list the default hi-lock faces twice in the future history
* lisp/hi-lock.el (hi-lock-read-face-name): Don't include faces
twice in the defaults (bug#19877).
2022-01-24 19:52:02 +01:00
Lars Ingebrigtsen
8f16b1aef1 Fix gnus-article-truncate-lines doc string
* lisp/gnus/gnus-art.el (gnus-article-truncate-lines): Fix doc
string.
2022-01-24 19:52:02 +01:00
Juri Linkov
28a0d0037c * etc/NEWS: Mention 'replace-regexp-function' (bug#52558). 2022-01-24 20:45:53 +02:00
Juri Linkov
2166b1e65e * lisp/faces.el (read-face-name): Support a list of defaults for M-n.
When MULTIPLE is nil and the arg DEFAULT is a list, keep its elements
in the "future history" of the minibuffer retrieved by `M-n M-n ...'.
(bug#53255)
2022-01-24 20:28:10 +02:00
Glenn Morris
fbf4757784 * lisp/minibuffer.el (completions-sort): Fix type.
Flagged by test-custom-opts.
2022-01-24 10:16:36 -08:00
Lars Ingebrigtsen
701ec0bda2 Don't output spurious prefixes in read-char-exclusive
* src/keyboard.c (read_char): Don't touch the echo area if
Vecho_keystrokes is nil.
* src/lread.c (read_filtered_event): Bind echo_keystrokes to nil
to avoid outputting prefixes we're not going to act on anyway
(bug#19718).
2022-01-24 18:19:38 +01:00
Lars Ingebrigtsen
7e653ee73f Allow sorting in electric-buffer-list with `S'
* lisp/ebuff-menu.el (electric-buffer-menu-mode-map): Add the `S'
sorting command here, too (bug#20178).
2022-01-24 18:19:38 +01:00
Amin Bandali
f4bfe7834a
ERC: Add new comaintainer, F. Jason Park
* lisp/erc/erc*.el: Add J.P. as my comaintainer to headers.
2022-01-24 10:59:05 -05:00
Lars Ingebrigtsen
5909b27144 Fix \href{a_b} in tex-mode
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): Fontify
href parameters like constants so that _ aren't fontified like
subscripts.
2022-01-24 15:19:38 +01:00
Lars Ingebrigtsen
8c37b9042e Revert "Fix tex-mode handling of _ chars in href{} commands"
This reverts commit 487a0be7f7.

This will be fixed a different way.
2022-01-24 15:15:59 +01:00
Lars Ingebrigtsen
79d9f3982f Add derived-mode test for bug#24176 2022-01-24 15:10:18 +01:00
Lars Ingebrigtsen
ffb0e8c4ef Make anonymous functions work in auto-mode-alist
* lisp/files.el (set-auto-mode--apply-alist): Don't infloop on
anonymous functions in auto-mode-alist (bug#20709).
2022-01-24 15:06:39 +01:00
Mattias Engdegård
067e84116d ; * src/bytecode.c (exec_byte_code): Silence GCC warning 2022-01-24 15:03:20 +01:00
Lars Ingebrigtsen
edeb220d31 Don't loop so much in gud-query-cmdline on remote systems
* lisp/progmodes/gud.el (gud-query-cmdline): Avoid looping over
large numbers of files on remote systems (bug#21528).
2022-01-24 14:57:17 +01:00
Protesilaos Stavrou
a46421446f Make Completions sorting a user option
* etc/NEWS: Document the new user option.
* lisp/minibuffer.el (completions-sort): Add new user option.
(minibuffer-completion-help): Implement it for the Completions
buffer.  (Bug#53362)
2022-01-24 15:36:11 +02:00
Lars Ingebrigtsen
ead9547903 Allow jumping to ert failure definitions
* lisp/emacs-lisp/ert.el (ert-test):
(ert-deftest):  Store the file name.
(ert-test-location): New function.
(ert-run-tests-batch): Use it.

* lisp/emacs-lisp/find-func.el (find-ert-deftest-regexp): New
variable.
(find-function-regexp-alist): Add ert-deftest (bug#22471).

Based on code by Phillip Lord <phillip.lord@russet.org.uk>.
2022-01-24 14:01:06 +01:00
Yuuki Harano
d0b9e269ee * configure.ac: Remove forgotten GLIB_GSETTINGS call 2022-01-24 21:26:17 +09:00
Lars Ingebrigtsen
933ed56e55 Add NEWS item for `I' command 2022-01-24 13:02:00 +01:00
Lars Ingebrigtsen
031c2e4679 Add a *Help* command that'll take you to the lispref manual
* doc/emacs/help.texi (Help Mode): Document it.
* lisp/help-mode.el (help-mode-map): Add an `I' keystroke.
(help-goto-lispref-info): New command.

* lisp/info-look.el (:mode): Add an entry for the lispref manual.
2022-01-24 12:59:55 +01:00
Lars Ingebrigtsen
487a0be7f7 Fix tex-mode handling of _ chars in href{} commands
* lisp/textmodes/tex-mode.el (tex--current-command): New function
(bug#23102).
(tex-font-lock-suscript): Don't subscript _ chars in href.
2022-01-24 12:39:02 +01:00
Lars Ingebrigtsen
77b72f77b3 Make `font-lock-add-keywords' work in derived modes
* lisp/font-lock.el (font-lock-set-defaults): Make
`font-lock-add-keywords' work in derived modes (bug#24176).
2022-01-24 11:56:35 +01:00
Po Lu
806a121007 Remove redundant declarations from keyboard.h that are now in lisp.h
* src/keyboard.h (process_pending_signals)
(pending_signals): Remove declarations.
2022-01-24 18:49:54 +08:00
Mattias Engdegård
a8b713d83a Inline maybe_quit
Since `maybe_quit` is called on many critical paths, inline a slightly
cheaper condition (that ignores Vinhibit_quit).

* src/eval.c (maybe_quit): Rename to `probably_quit`.
* src/lisp.h (maybe_quit): New simplified inline function.
2022-01-24 11:41:47 +01:00
Mattias Engdegård
b7902a9b48 Bump specpdl inline, move reallocation out of line
The common case is just to increment `specpdl_ptr`; do that in-line,
but move the uncommon reallocation to a separate subroutine.

* src/eval.c (grow_specpdl): Now inline, most code moved...
(grow_specpdl_allocation): ...here.
2022-01-24 11:41:47 +01:00
Mattias Engdegård
4a0541a5dd Implement Ffuncall in terms of funcall_general
* src/eval.c (funcall_general, Ffuncall): Delegate the actual work in
Ffuncall to funcall_general which does exactly this.
This slows down some less used function call paths by a small amount
but the code duplication was just silly.
2022-01-24 11:41:47 +01:00
Mattias Engdegård
75c6564c92 ; * lisp/emacs-lisp/byte-opt.el: Remove outdated comments
These were optimisation ideas that have been implemented, have become
irrelevant, or were impractical to begin with.
2022-01-24 11:41:47 +01:00
Mattias Engdegård
11e1abd5cc Open-code aref and aset in bytecode interpreter
* src/bytecode.c (exec_byte_code): Inline aref and aset for
vectors and records, since this is important for code that makes heavy
use of arrays and/or objects.
2022-01-24 11:41:47 +01:00
Mattias Engdegård
721357b868 Remove the unused unbind-all bytecode
It was implemented but never generated, originally intended for
TCO in the pre-lexbind era (which was semantically dubious anyway).
Removing it speeds up the interpreter because there is no longer any
need for the outermost `count` variable unless checking is enabled.

* lisp/emacs-lisp/bytecomp.el:
* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst):
* src/bytecode.c (BYTE_CODES, exec_byte_code):
Remove definition and implementation of unbind-all, freeing up the opcode
for other purposes.
2022-01-24 11:41:46 +01:00
Mattias Engdegård
4ff1fb8eb4 Move a runtime interpreter check to debug mode
* src/bytecode.c (exec_byte_code): Perform bytecode unwinding error
check only when building with debugging (NDEBUG not defined, checking
enabled, or BYTE_CODE_SAFE enabled).  This improves speed in several
ways.
2022-01-24 11:41:46 +01:00
Mattias Engdegård
b3377e67a7 Remove nil check in exec_byte_code
Since we pass no arguments to a non-lexbind bytecode function, we can
specify its arity as 0 instead of nil and save a test and branch.

* src/bytecode.c (Fbyte_code, exec_byte_code):
* src/eval.c (fetch_and_exec_byte_code, funcall_lambda):
* src/lisp.h:
Change the args_template parameter type to ptrdiff_t, since it is now
always a small integer, in exec_byte_code and
fetch_and_exec_byte_code, all callers adjusted.
2022-01-24 11:41:46 +01:00
Mattias Engdegård
d05f387407 ; * src/bytecode.c (exec_byte_code): Cosmetic improvement
Implement point_max in the same way as point_min.
2022-01-24 11:41:46 +01:00
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
Philipp Stephani
c34d06e3d7 * configure.ac (LIBSECCOMP): Bump minimum version for faccessat2. 2022-01-24 11:38:43 +01:00
Lars Ingebrigtsen
335a5a9e0f Make the `f' command work in image-mode again
* lisp/image.el (image-show-frame): Protect against not having
computed the animation data yed (bug#53489).
2022-01-24 11:22:57 +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