1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 03:20:39 -08:00
Commit graph

154440 commits

Author SHA1 Message Date
Po Lu
bb33446f2a Better handle devices being enabled on XI2
* src/xterm.c (handle_one_xevent): Don't abort on DeviceChanged
if the device couldn't be found, instead regenerating the device
hierarchy to see if it was enabled.
2022-02-15 09:19:12 +08:00
Eric Abrahamsen
d43ca38556 Fix docstring and init of Gnus search -remove-prefix options
* lisp/gnus/gnus-search.el (*-remove-prefix): For all engine defaults,
remove incorrect docs stating this is a regexp (it's a string). Also,
use `expand-file-name' to get the correct default value, not `concat'
and (getenv "HOME").
2022-02-14 16:06:14 -08:00
Eric Abrahamsen
d6fba624e6 Fix manual documentation of Gnus tool bars
* doc/misc/gnus.texi: The options `gnus-use-toolbar',
`gnus-toolbar-thickness', and `gnus-summary-mail-toolbar' no longer
exist. Other options in this section have been renamed from "toolbar"
to "tool-bar".
2022-02-14 15:21:21 -08:00
Eric Abrahamsen
b444311e2c Be more explicit about the meaning of "remove prefix" in Gnus search
* doc/misc/gnus.texi (Search Engines): It's easy to get confused about
what we're removing and why.
2022-02-14 15:21:21 -08:00
Eli Zaretskii
8b34ba17b1 ; * doc/lispref/variables.texi (Setting Variables): Fix markup. 2022-02-14 19:47:44 +02:00
Eli Zaretskii
fa135ff305 ; Improve a recently added NEWS entry about 'command-query'. 2022-02-14 19:38:56 +02:00
Eli Zaretskii
fef0a6a2b4 Improve recent addition to documentation of face remapping
* doc/lispref/display.texi (Basic Faces): Make the list of basic
faces more complete.
(Face Remapping): Improve wording of a recent addition; add
cross-reference to "Basic Faces".
2022-02-14 19:23:28 +02:00
Eli Zaretskii
a90dc11e24 Improve format of values returned by 'file-size-human-readable'
* lisp/files.el (file-size-human-readable): Emit one digit of the
fractional part of the size only if there's just one digit before
the decimal point.
2022-02-14 18:59:38 +02:00
Lars Ingebrigtsen
3a3387f58e Fix typo in Face Remapping
* doc/lispref/display.texi (Face Remapping): Fix typo.
2022-02-14 15:16:42 +01:00
Lars Ingebrigtsen
d52d913fa0 Don't signal errors in abbrev-table-p
* lisp/abbrev.el (abbrev-table-p): Ignore the error.
* src/lread.c (oblookup): Signal `wrong-type-argument' instead of
`error' if it turns out that we're not really in an obarray (bug#53988).
2022-02-14 12:00:22 +01:00
Philip Kaludercic
35bb4c1c3c Improve stability of message-hide-headers
* message.el (message-hide-headers): Use a pointer instead of tracking
the "end-of-headers" point manually (bug#53991).
2022-02-14 11:51:48 +01:00
Po Lu
9844b152a5 Premultiply background color by alpha for images
* src/xterm.c (x_query_frame_background_color): Premultiply
colors as X wants them when built without Cairo.
2022-02-14 18:43:44 +08:00
Lars Ingebrigtsen
4c2701fad1 Fix typo in previous Face Remapping doc change
* doc/lispref/display.texi (Face Remapping): Fix typo.
2022-02-14 11:39:55 +01:00
Lars Ingebrigtsen
daf008e82b Note caveat about remapping basic faces
* doc/lispref/display.texi (Face Remapping): Note caveat about
basic faces (bug#53636).
2022-02-14 11:38:59 +01:00
Po Lu
b47d36f189 Improve Haiku selection handling
* lisp/select.el (gui--selection-value-internal): Use X types on
Haiku as well.

* lisp/term/haiku-win.el (haiku--selection-type-to-mime): Update
types to correspond better with X.

* src/haikuselect.c (Fhaiku_selection_data):
(Fhaiku_selection_put): Remove a great deal of ad hoc code now
handled by the regular selection machinery.
2022-02-14 10:26:29 +00:00
Lars Ingebrigtsen
13b9268374 Add a mechanism for querying before executing a command
* doc/emacs/custom.texi (Disabling): Document it.
* doc/lispref/commands.texi (Disabling Commands): Document the
low-level stuff.

* lisp/simple.el (command-execute): Respect the `(query ...)'
value for `disabled'.
(command-execute--query): New function.
(command-query): New function.
2022-02-14 11:20:41 +01:00
Po Lu
5fb262597f Handle allocation failures of fringe bitmaps on Haiku
* src/haikuterm.c (haiku_define_fringe_bitmap): Handle
allocation failures.
2022-02-14 07:12:17 +00:00
Po Lu
0ba1ecc816 * etc/TODO: Update some entires related to macOS and NS.
Xwidgets have worked on NS for a long time, "smooth scrolling"
is now available as `pixel-scroll-precision-mode' for all GUI
platforms, and some mouse gestures have been implemented on NS
and X.
2022-02-14 14:05:46 +08:00
Po Lu
32fbda5c37 Ensure bad values don't leak into scroll valuators after DeviceChange
* src/xterm.c (xi_reset_scroll_valuators_for_device_id): New
argument `pending_only'.
(handle_one_xevent): Reset pending scroll valuators on XI_Enter
and mark valuators updated via DeviceChanged events as pending.

* src/xterm.h (struct xi_scroll_valuator_t): New field
`pending_enter_reset'.
2022-02-14 13:14:54 +08:00
Po Lu
80f8dd6540 Restore valuator values after receiving a DeviceChanged event
* src/xterm.c (x_init_master_valuators): Generate valuators for
both master and slave devices.
(handle_one_xevent): Find current valuator info and use that to
populate scroll valuators after a device changed.
2022-02-14 11:51:22 +08:00
Po Lu
1bf30718dd Improve efficency of handling DeviceChanged events
* src/xterm.c (handle_one_xevent): Just update the device that
was changed on DeviceChanged and only do hierarchy recalculation
upon HierarchyChanged events.
2022-02-14 11:16:38 +08:00
Po Lu
27658a0a3b Try to reduce empty areas on GTK when a frame is being resized
* src/xterm.c (x_fill_rectangle):
(x_clear_rectangle, x_draw_image_glyph_string):
(x_clear_area): Don't use picture if frame background is opaque.
2022-02-14 09:52:05 +08:00
Po Lu
2fe4d93624 Fix wide fringe bitmap processing on Haiku
* src/haiku_support.cc (BBitmap_import_mono_bits): Rewrite to
use ImportBits.
(BBitmap_import_fringe_bitmap): New function.

* src/haiku_support.h: Update prototypes.

* src/haikuterm.c (haiku_define_fringe_bitmap): Pass entire
short array to BBitmap_import_fringe_bitmap instead.
2022-02-14 01:36:50 +00:00
Michael Albinus
bd07d4fac9 Improve Tramp's process-file implementations
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file)
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve implementation.  (Bug#53854)

* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp--test-check-files, tramp-test47-unload): Extend tests.
2022-02-13 20:50:51 +01:00
Juri Linkov
fc44bc6255 * lisp/faces.el (read-face-name-sample-text): Add defconst (bug#53960).
(read-face-name): Use it instead of hard-coded string.
2022-02-13 20:44:14 +02:00
Lars Ingebrigtsen
997dd86a9f Add a new macro `setopt'
* doc/emacs/custom.texi (Examining): Mention it.
(Init Syntax): Ditto.

* doc/emacs/windows.texi (Window Choice): Adjust example.

* doc/lispref/windows.texi (Choosing Window Options): Adjust examples.

* doc/lispref/variables.texi (Setting Variables): Document setopt.

* doc/misc/eudc.texi (Emacs-only Configuration): Adjust examples.

* lisp/cus-edit.el (setopt): New macro.
2022-02-13 16:29:26 +01:00
Eli Zaretskii
68b3273214 ; * lisp/simple.el (count-words): Doc fix. 2022-02-13 15:05:13 +02:00
Po Lu
7a702cfd42 * src/haikuterm.c (haiku_read_socket): Implement auto-lower. 2022-02-13 12:15:21 +00:00
Po Lu
7e612a26a8 Only get rid of IC focus if focus is really gone
* src/xterm.c (x_focus_changed): Only unset IC focus if the
focus state is empty.
2022-02-13 19:51:49 +08:00
Lars Ingebrigtsen
c189ce5a33 Remove the 'C-k' binding in ido-mode
* lisp/ido.el (ido-file-completion-map): Remove the `C-k' binding,
because it's too dangerous and probably not very useful (bug#44556).
2022-02-13 11:24:22 +01:00
Po Lu
6ed1994d27 Prevent crashes from illegal locale coding systems
* src/xfns.c (xic_preedit_draw_callback):
* src/xterm.c (handle_one_xevent): Don't pass invalid coding
systems to `setup_coding_system'.
2022-02-13 18:20:42 +08:00
Lars Ingebrigtsen
242a2765d3 Make `C-u M-x count-words' also give totals
* lisp/simple.el (count-words-region): Adjust callers.
(count-words): If given a prefix, give totals (bug#9959).
(count-words--buffer-format, count-words--format): Rename and
don't message, but return the string.
2022-02-13 10:56:20 +01:00
Lars Ingebrigtsen
eba9e30f9a Note meaning on nil HIST in Fread_from_minibuffer
* src/minibuf.c (Fread_from_minibuffer): Note the meaning of a nil
HIST parameter (bug#20063).
2022-02-13 10:12:27 +01:00
Lars Ingebrigtsen
9a4cc857aa Fix mouse clicking in read-face-name
* lisp/faces.el (read-face-name): Put the data in the right
position so that clicking on completions work (bug#53960).
2022-02-13 09:35:55 +01:00
Bob Rogers
51d44fd705 Fix ietf-drums-remove-whitespace unmatched " and (
* lisp/mail/ietf-drums.el:
+ (ietf-drums-skip-comment):  New helper function.
+ (ietf-drums-remove-comments):  Use ietf-drums-skip-comment.
+ (ietf-drums-remove-whitespace):  Handle unterminated quotes and
comments, as ietf-drums-remove-comments already does.
* test/lisp/mail/ietf-drums-tests.el:
+ Test unterminated quote and comment for
ietf-drums-remove-whitespace and ietf-drums-remove-comments (bug#53965).
2022-02-13 09:32:13 +01:00
Andreas Schwab
ae13948ff5 * src/eval.c (specpdl_unrewind): Remove empty statement. 2022-02-13 09:13:26 +01:00
Lars Ingebrigtsen
1e15500daf Avoid a compilation warning in eval.c
* src/eval.c (specpdl_unrewind): Avoid a compilation warning.
2022-02-13 08:26:55 +01:00
Po Lu
0c4f52066f Fix integer overflow with 32-bit visual
* src/xfns.c (x_set_border_pixel):
(x_set_border_color): Use `unsigned long' for border color.
2022-02-13 13:26:41 +08:00
Po Lu
79fd672dfc Work around tooltip bug on new versions of WebKitGTK
* src/xwidget.c (dummy_tooltip_string): New variable.
(xw_maybe_synthesize_crossing): Call `xg_prepare_tooltip' to
disable tooltips on WebKitGTK 2.34 or later.
(syms_of_xwidget): Make dummy string.
2022-02-13 11:29:44 +08:00
Po Lu
0b3692251c Stop quering for Xinerama inside x_get_monitor_attributes
* src/xfns.c (x_get_monitor_attributes): Remove Xinerama check
and use xinerama_supported_p instead.
* src/xterm.c (x_term_init): Set `xinerama_supported_p'
* src/xterm.h (struct x_display_info): New field
`xinerama_supported_p'.
2022-02-13 11:00:52 +08:00
Po Lu
ac02d53f6d * src/pgtkfns.c (Fx_create_frame): Set `was_invisible' flag. 2022-02-13 10:05:30 +08:00
Po Lu
e79f5574c5 Use better GC for visible bell on colormapped visuals
* src/xterm.c (XTflash): Use normal_gc if the visual is not
TrueColor.
2022-02-13 09:34:12 +08:00
Po Lu
d72e7c4fd4 Fix the Haiku port
* src/haiku_support.h [__cplusplus]: Define `specpdl_ref' type
on C++ since that code cannot include lisp.h.
2022-02-13 00:50:50 +00:00
Po Lu
ad2d50d762 Fix last change in xterm.c
* src/xterm.c (x_update_opaque_region): Remove check that f is
non-NULL.
(handle_one_xevent): If f is NULL and the configure event is for
any's edit widget, use that instead.
2022-02-13 08:40:36 +08:00
Stefan Monnier
8e0b043f49 * src/xterm.c (x_update_opaque_region): Avoid crash at startup in Lucid build 2022-02-12 17:47:21 -05:00
Stefan Monnier
b8460fcb8c Rewrite thread context switch code (bug#48990)
Make the context switch code handle buffer-local variables more
correctly by reusing the code originally written for `backtrace-eval`.
This has the side benefit of making the `saved_value` field unused.

* src/lisp.h (enum specbind_tag): Remove `saved_value` field.
(rebind_for_thread_switch, unbind_for_thread_switch): Delete decls.
(specpdl_unrewind): Declare function.

* src/eval.c (specpdl_saved_value): Delete function.
(specbind): Delete the code related to `saved_value`, and consolidate
common code between the different branches.
(rebind_for_thread_switch, -unbind_for_thread_switch): Move to `thread.c`.
(specpdl_unrewind): New function, extracted from `backtrace_eval_unrewind`.
Use `SET_INTERNAL_THREAD_SWITCH`.  Skip the buffer & excursion unwinds
depending on new arg `vars_only`.
(backtrace_eval_unrewind): Use it.
(mark_specpdl): Don't mark `saved_value`.

* src/thread.c (rebind_for_thread_switch, unbind_for_thread_switch):
Move from `eval.c` and rewrite using `specpdl_unrewind`.

* test/src/thread-tests.el (threads-test-bug48990): New test.

* test/Makefile.in (test_template): Add a + as suggested by make:
"warning: jobserver unavailable: using -j1.  Add '+' to parent make rule".
2022-02-12 15:25:53 -05:00
Mattias Engdegård
89bb5a5f35 Speed up = on fixnums in bytecode
Now that EQ has become expensive, use BASE_EQ where possible.

* src/bytecode.c (exec_byte_code): Use cheaper operation for Beqlsign.
2022-02-12 20:27:31 +01:00
Eli Zaretskii
a602e86bc1 ; * src/xdisp.c (syms_of_xdisp): Fix formatting of last change. 2022-02-12 20:45:06 +02:00
Eli Zaretskii
b5997c0f10 Optionally allow point to enter composed character sequences
This changeset is based on code originally posted by
Kenichi Handa <handa@gnu.org> as part of discussing bug#20140,
with a few adjustments and changes, mainly to support R2L
text and provide a user option to control the feature.
* src/xdisp.c (compute_stop_pos, next_element_from_buffer)
(composition_reseat_it): Don't allow auto-composing characters
past point when 'composition-break-at-point' is non-nil.
(syms_of_xdisp) <composition-break-at-point>: New boolean variable.
(redisplay_internal, redisplay_window): Disable "just move the
cursor" optimizations when 'composition-break-at-point' is non-nil.
* src/keyboard.c (command_loop_1): Force redisplay when
'composition-break-at-point' is non-nil.

* lisp/cus-start.el (standard): Provide customization form for
'composition-break-at-point'.

* etc/NEWS: Announce the new feature.
2022-02-12 20:38:51 +02:00
Mattias Engdegård
09fecae877 Count bytes, not records, in specpdl_ref
SPECPDL_INDEX becomes much faster because the pointer subtraction,
expensive because of the inconveniently sized specpdl records, is now
gone.  This translates to a useful speedup on a wide variety of code.

* src/lisp.h (specpdl_ref, wrap_specpdl_ref, unwrap_specpdl_ref):
Rename member.
(specpdl_count_to_ref, specpdl_ref_to_count)
(specpdl_ref_add, specpdl_ref_to_ptr, SPECPDL_INDEX):
Count offset in bytes rather than in records.
2022-02-12 18:21:34 +01:00