1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 12:40:49 -08:00
Commit graph

154451 commits

Author SHA1 Message Date
Po Lu
3da5dc66ea Fix bit rot in the color allocation code
* src/xterm.c (x_alloc_nearest_color_1): Reintroduce an older
version of the code that would try to allocate a "compromise
delta".
2022-02-04 15:38:07 +08:00
Po Lu
8e2d9193ef * src/xwidget.c (xwidget_button): Always let button events through.
Filtering out emulated events is done in handle_one_xevent, so
all this accomplishes is to filter out legitimate button events.
2022-02-04 15:19:18 +08:00
Stefan Kangas
e0260f0fe2 Merge from origin/emacs-28
0591aa6cd3 Revert an erroneous change in tramp-cache.el
2022-02-04 06:30:30 +01:00
Po Lu
a42df6542a Fix toggling `x-gtk-use-native-input'.
* lisp/term/x-win.el (x-internal-focus-input-context):
(x-gtk-use-native-input-watcher): Update for changes to
`x-internal-focus-input-context'.

* src/xfns.c (Fx_internal_focus_input_context): New parameter
`focus'.
2022-02-04 13:13:49 +08:00
Po Lu
a654985bca Make Emacs build with some other XLib implementations
* configure.ac (HAVE_XKB): Check for functions that aren't
always implemented by various XLib implementations.

* src/xfns.c (select_visual): Handle NULL values of vinfo.
(XkbRefreshKeyboardMapping):
(XkbFreeNames):
(XDisplayCells):
(XDestroySubwindows): Define replacement functions where they
aren't available.

* src/xterm.c (x_find_modifier_meanings): Handle NULL values of
various fields.
2022-02-04 03:28:05 +00:00
Po Lu
52c4275283 * src/xfns.c (Fx_internal_focus_input_context): Fix typo. 2022-02-04 10:16:14 +08:00
Po Lu
334b362bf4 Make `x-gtk-use-native-input' take effect immediately
* lisp/term/x-win.el (x-internal-focus-input-context): New
declaration.
(x-gtk-use-native-input-watcher): New variable watcher.
* src/xfns.c (Fx_internal_focus_input_context): New function.
(syms_of_xfns): Define new subr.
2022-02-04 10:12:08 +08:00
Po Lu
748eb32cc5 Try to fix input method flicker on GTK builds
* src/xterm.c (x_focus_changed): Only focus GTK context if
native input is on.  (bug#53698)
2022-02-04 09:05:44 +08:00
Andrew G Cohen
634cedfea1 Improve compression of article lists in gnus/nnselect
* lisp/gnus/nnselect.el (nnselect-compress-artlist): Allow compressed list.
nnselect-uncompress-artlist): Properly loop over rsv values.
2022-02-04 09:04:20 +08:00
Po Lu
d539d00c42 Improve image depth handling
Emacs defaults to a 32-bit TrueColor visual, but if that happens
on a display which defaults to 16-bit TrueColor, yet happens to
have 32-bit color, and doesn't have the X Render Extension, an
error will occur in x_composite_image as libXpm will load
pixmaps of depth 16 instead of depth 32.

* src/image.c (x_create_x_image_and_pixmap): Explictly specify
display depth.
(x_create_xrender_picture):
(xpm_load):
(gs_load): Use dpyinfo->n_planes instead of
DefaultDepthOfScreen.
2022-02-04 08:54:01 +08:00
Lars Ingebrigtsen
12a6d319dc Improve the bookmark-default-handler doc string
* lisp/bookmark.el (bookmark-default-handler): Document the
`buffer' property (bug#20845).
2022-02-03 22:16:14 +01:00
Lars Ingebrigtsen
322daef439 Remove tarball instructions from gnus-faq.texi 2022-02-03 20:54:17 +01:00
Lars Ingebrigtsen
2ded593875 Make sort-numeric-fields resilient towards blank lines
* lisp/sort.el (sort-numeric-fields): Don't signal an error on
blank lines (bug#31800).
2022-02-03 20:33:58 +01:00
Jim Porter
e3516ec28f Use 'require' to load eshell-tests-helpers
* test/lisp/eshell/eshell-tests.el
* test/lisp/eshell/em-extpipe-tests.el: Load eshell-tests-helpers with
'require'.

* test/lisp/eshell/eshell-tests-helpers.el (eshell-history-file-name):
Define this here so individual test files don't have to.
2022-02-03 20:02:24 +01:00
Jim Porter
3a388ab4a6 When executing an Eshell pipeline, send input to the first process
Previously, input was sent to the last process in the pipeline,
resulting in unexpected behavior when running commands like
'tr a-z A-Z | rev'.

* lisp/eshell/esh-util.el (eshell-process-pair-p)
(eshell-make-process-pair): New functions.

* lisp/eshell/esh-cmd.el (eshell-last-async-proc): Rename to...
(eshell-last-async-procs): ... this, and store a pair of processes.
(eshell-interactive-process): Replace with...
(eshell-interactive-process-p, eshell-head-process)
(eshell-tail-process): ... these.
(eshell-cmd-initialize): Set 'eshell-last-async-procs'.
(eshell-do-pipelines): Set 'headproc'.
(eshell-execute-pipeline): Return 'headproc' and 'tailproc'.
(eshell-resume-eval): Use 'eshell-last-async-procs'.
(eshell-do-eval): Make sure we work with a pair of processes.

* lisp/eshell/esh-proc.el (eshell-send-eof-to-process): Move from
here...
* lisp/eshell/esh-mode.el (eshell-send-eof-to-process): ... to here,
and only send EOF to the head process.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments)
* lisp/eshell/esh-mode.el (eshell-intercept-commands)
(eshell-watch-for-password-prompt):
Use 'eshell-interactive-process-p'.

* lisp/eshell/em-rebind.el (eshell-delchar-or-maybe-eof)
* lisp/eshell/em-term.el (eshell-term-send-raw-string)
* lisp/eshell/esh-mode.el (eshell-self-insert-command)
(eshell-send-input, eshell-send-invisible):
Use 'eshell-head-process'.

* lisp/eshell/esh-cmd.el (eshell-as-subcommand):
Use 'eshell-tail-process'.

* lisp/eshell/eshell.el (eshell-command):
* test/lisp/eshell/eshell-tests-helpers.el
(eshell-wait-for-subprocess):
Use 'eshell-interactive-process-p' and 'eshell-tail-process'.

* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-headproc-stdin):
New test.
2022-02-03 20:02:22 +01:00
Jim Porter
2e60ef696a Ensure that tailproc is set for the last process in an Eshell pipeline
In particular, this used to fail for pipelines where the last process
in the pipeline came from the first element of the pipeline. This
could happen when a process was piped to an ordinary Lisp function,
like in '*echo hi | echo bye'.

* lisp/eshell/esh-cmd.el (eshell-do-pipelines): Set the tailproc even
for the first process in the pipeline.

* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-tailproc): New
test.
2022-02-03 20:02:20 +01:00
Eli Zaretskii
dcc97fec29 Allow ensuring that a window's starting point is never invisible
* src/xdisp.c (syms_of_xdisp) <make-window-start-visible>: New
buffer-local variable.
(redisplay_window): If 'make-window-start-visible' is non-nil,
don't accept window-start position that is in invisible text or is
covered by a "replacing" 'display' property.  (Bug#14582)
2022-02-03 19:36:43 +02:00
Michael Albinus
0591aa6cd3 Revert an erroneous change in tramp-cache.el
* lisp/net/tramp-cache.el (tramp-get-hash-table):
Use `string-match-p' instead of `string-search'.  The latter one
was introduced by accident.  Reported by Kai Tetzlaff <kai@tetzlaff.eu>.
2022-02-03 15:30:39 +01:00
Thomas Fitzsimmons
37eef19fd6 soap-client: Add minimum supported Emacs version
* lisp/net/soap-client.el: Add Emacs 24.1 to Package-Requires.
Bump version to 3.2.1.
2022-02-03 09:19:03 -05:00
Michael Albinus
895562a8b2 Implement file modification check in Tramp
* lisp/net/tramp.el (tramp-handle-lock-file): Check, whether FILE
is modified.

* test/lisp/net/tramp-tests.el (tramp-test39-detect-external-change):
New test.
2022-02-03 14:21:23 +01:00
Mattias Engdegård
3bd8a8bb91 Don't use string-replace in soap-client (bug#53744)
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Cease using `string-replace` since it requires Emacs 28.
2022-02-03 12:25:53 +01:00
Mattias Engdegård
1b0342628e Don't use string-search in soap-client (bug#53744)
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Since soap-client is a core ELPA package and may be used with
Emacs versions older than 28, it cannot use `string-search`;
revert to `string-match`.
2022-02-03 12:17:23 +01:00
Eli Zaretskii
abd59ad923 Fix "Buffers->Frames" submenu in daemon sessions
* lisp/menu-bar.el (menu-bar-update-buffers): Detect the initial
frame by its special terminal's name.  (Bug#53740)

* src/terminal.c (init_initial_terminal): Add comment about using
the initial-terminal's name in menu-bar.el.
2022-02-03 13:00:47 +02:00
Po Lu
9b0cdf461c * src/haikufont.c (haikufont_draw): Allocate string buffer on stack. 2022-02-03 10:34:50 +00:00
Po Lu
d35c4ee10a Stop creating cairo contexts in haiku_begin_cr_clip
* src/haikufont.c (haikufont_draw):
* src/ftcrfont.c (ftcrfont_draw): Stop holding the draw lock.
* src/haiku_support.cc (class EmacsView): New field
`cairo_context'.
(DetachCairoSurface): Destroy cairo_context.
(AttachCairoSurface): Create cairo_context from the surface.
(EmacsView_cairo_surface): Delete function.
(EmacsView_cairo_context): New function.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_begin_cr_clip):
(haiku_end_cr_clip): Retrieve the existing cairo context instead
of creating a new one.
* src/haikuterm.h (FRAME_CR_CONTEXT): New macro.
2022-02-03 07:50:36 +00:00
Po Lu
fc79118f19 Obtain draw lock outside haiku_start_clip
* src/haikuterm.c (haiku_start_clip):
(haiku_end_clip): Stop obtaining the draw lock.
(haiku_draw_glyph_string): Set draw lock here instead.
2022-02-03 07:16:10 +00:00
Stefan Kangas
dce93e397d Merge from origin/emacs-28
ab2f275422 Improve documentation of 'emacs-version'
2022-02-03 06:30:29 +01:00
Po Lu
3d7f17bf80 * src/haikuterm.c (haiku_draw_text_decoration): Don't lock for draws. 2022-02-03 05:21:33 +00:00
Po Lu
abdb198474 Simplify box display code on Haiku
* src/haikuterm.c (haiku_calculate_relief_colors): Remove
`rgbout_c' parameter.
(haiku_draw_relief_rect): Push state if performing additional
clipping.
(haiku_draw_string_box): Stop passing clip rects to the relief
drawing functions.
(haiku_draw_glyph_string): Fix calls to haiku_draw_string_box
for new parameters.
2022-02-03 05:16:35 +00:00
Po Lu
11ee58de9d Fix display of text decorations with defaulted foreground on Haiku
* src/haikuterm.c (haiku_draw_text_decoration): Remove parameter
`dcol' and use face->foreground instead.  All callers changed.
2022-02-03 01:57:00 +00:00
Po Lu
60fe17c958 Fix background daemon on Haiku
* src/emacs.c (DAEMON_MUST_EXEC): Define when using the Haiku
application kit.
2022-02-03 01:47:29 +00:00
Po Lu
aa67e10fe9 Prevent the initial frame from showing up in the frame menu
* lisp/menu-bar.el (menu-bar-update-buffers): Ignore initial
frame when generating frame list.  (bug#53740)
2022-02-03 09:29:31 +08:00
Stefan Kangas
7728f493cd New theme leuven-dark (Bug#53032)
* etc/themes/leuven-dark-theme.el: New file, written by
Fabrice Niessen and Thibault Polge.
2022-02-03 01:41:03 +01:00
Stefan Kangas
4f7fe8b1d3 * test/lisp/cedet/semantic/bovine/gcc-tests.el (ert-x): Require. 2022-02-03 01:41:03 +01:00
Lars Ingebrigtsen
00a8e365b9 Adjust test to adjusted code 2022-02-03 01:25:42 +01:00
Harald Jörg
c882b4ea02 ; cperl-mode.el: Detect prototypes in anonymous subroutines
My commit 3d49ad73e5 from 2021-09-143 had a flaw causing bad
fontification and indentation after anonymous subroutines with
a prototype.
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Correctly
process prototypes in anonymous subroutines
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-attrs-and-signatures): new tests for various
combinations of attributes, prototypes, and signatures
* test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl: new
	test source
2022-02-02 22:42:05 +01:00
Alan Mackenzie
aa795a6223 New file lisp/emacs-lisp/debug-early.el for backtraces in early bootstrap
This is also used in batch mode in general.

* lisp/debug-early.el (debug-early-backtrace, debug-early): New functions.

* lisp/loadup.el (top level): Load debug-early.el as first file.

* src/eval.c (signal_or_quit): Remove the condition in the batch mode section
of not being in dumping or bootstrap, since it is no longer needed.  Test that
'debug-early's symbol-function is bound.  Ensure there is enough working space
in specpdl and eval_depth.
(syms_of_eval): New DEFSYM for Qdebug_early.  Initialise Vdebugger to
Qdebug_early rather than Qnil.
2022-02-02 20:35:39 +00:00
Juri Linkov
b6a51e05c9 * lisp/replace.el (query-replace-read-from): Use default for empty input.
Set 'default' from non-empty 'query-replace-read-from-default'.
Use the default in non-regexp prompt and return it for empty input.
https://lists.gnu.org/archive/html/emacs-devel/2022-02/msg00044.html
2022-02-02 21:50:41 +02:00
Lars Ingebrigtsen
52af077d6a Improve the describe-key doc string
* lisp/help.el (describe-key): Say something about prefix keys
(bug#33320).
2022-02-02 20:16:04 +01:00
Lars Ingebrigtsen
6fbf37a575 Add some indexing for "compiler macro"
* doc/lispref/functions.texi (Inline Functions): Add a link to
where compiler macros are defined.
(Declare Form): Add a concept index.
2022-02-02 19:55:19 +01:00
Lars Ingebrigtsen
c86e4b0950 Mark vt-control and vc100-led obsolete since Emacs 29.1 2022-02-02 19:40:48 +01:00
Lars Ingebrigtsen
0ef371cb12 Move vt-control and vt100-led to obsolete (bug#37562) 2022-02-02 19:39:29 +01:00
Lars Ingebrigtsen
d34dd869d2 Fix decoding error in ietf-drums-parse-address
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Don't try to
decode the name if there is no name (bug#53716).
2022-02-02 19:07:37 +01:00
Alan Mackenzie
27c93778ef Fix bug with M-x compile-defun in a defconst/defvar
* lisp/emacs-lisp/bytecomp.el (compile-defun): Have symbols-with-pos-enabled
bound to non-nil when the eval takes place.
2022-02-02 18:03:00 +00:00
Eli Zaretskii
ab2f275422 Improve documentation of 'emacs-version'
* doc/emacs/trouble.texi (Checklist): Mention the possibility of
invoking 'emacs-version' with a prefix argument.

* lisp/version.el (emacs-version): Improve doc string.  (Bug#53720)
2022-02-02 19:38:56 +02:00
Eli Zaretskii
8fa8d5310b ; * etc/NEWS: Fix wording of a recently-added entry. 2022-02-02 19:23:07 +02:00
Po Lu
70a184b141 Improve correctness of generated xwidget events
* src/xwidget.c (xw_maybe_synthesize_crossing): Add new
parameters for controlling the crossing mode.  Also improve the
accuracy of generated crossing events when the mouse pointer
moves outside the toplevel from an inferior of it.  All callers
changed.
(xw_notify_virtual_upwards_until):
(xw_notify_virtual_downwards_until): New parameters for crossing
mode.  All callers changed.
2022-02-02 19:05:54 +08:00
Po Lu
fded822c80 Send button events before setting xwidget passive grab
* src/xwidget.c (xwidget_button_1): Send button event before
any grab processing.
2022-02-02 15:33:48 +08:00
Po Lu
e7047b4aba * src/nsselect.m (ns_get_foreign_selection): Fix GCC warning. 2022-02-02 15:19:52 +08:00
Po Lu
e3e0deb86d Make behaviour of `mouse-autoselect-window' consistent with X on NS
* src/nsterm.m ([EmacsView mouseMoved:]): Ignore if
`selected_window' is a minibuffer window.
2022-02-02 15:19:52 +08:00