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

155589 commits

Author SHA1 Message Date
Po Lu
bacd7ae4b6 Avoid color leaks while better ensuring a close color is found
* src/xterm.c (x_alloc_nearest_color_1): Verify nearest can be
allocated, and use that color value.
2022-03-08 09:40:21 +08:00
Po Lu
b19db4861f Fix choice of visuals for XPM icon
* src/xterm.c (x_bitmap_icon): Allow using XPM icon on
StaticColor and StaticGray as well.
2022-03-08 08:41:15 +08:00
Lars Ingebrigtsen
530ac51f5b Remove lock file in --no-build-details, too
* src/filelock.c (current_lock_owner): Make file writes work when
using --no-build-details (bug#54294).
2022-03-07 18:03:14 +01:00
Lars Ingebrigtsen
324d8938c7 Mark ert-test-run-tests-batch-expensive unstable on EMBA 2022-03-07 17:39:00 +01:00
Kjartan Oli Agustsson
494daefda1 Add user stylesheet option for doc-view EPUB support
* lisp/doc-view.el (doc-view-start-process): Add user stylesheet to
process arguments when appropriate.

* lisp/doc-view.el (doc-view-mutool-user-stylesheet): New user option.

Copyright-paperwork-exempt: yes
2022-03-07 17:29:38 +01:00
Lars Ingebrigtsen
80736aef90 Fix which-func-update doc string
* lisp/progmodes/which-func.el (which-func-update): Make the doc
string match the code (bug#54288).
2022-03-07 16:19:27 +01:00
Stefan Monnier
d67ca6739c * lisp/emacs-lisp/seq.el (seq-concatenate): Accept non-sequencep sequences 2022-03-07 09:59:43 -05:00
Po Lu
418e5da5d3 Correctly handle exposure in oldXMenu
* oldXMenu/Activate.c (XMenuActivate): Call set expose_func if
no pane was found.
(XMenuActivateSetExposeFunction): New function.
* oldXMenu/XMenu.h: New typedef `expose_func'.  Update
prototypes.
* src/xmenu.c (x_menu_expose_event): New function.
(x_menu_show): Set expose event handler.
* src/xterm.c (x_dispatch_event): Make `static' only on GTK.
* src/xterm.h: Expose `x_dispatch_event' on no-toolkit builds.
2022-03-07 21:36:25 +08:00
Po Lu
8a7df412a6 Improve color handling on colormapped displays
* src/xfns.c (select_visual): Set `visual_info' field whenever
appropriate.
(x_create_tip_frame, XDisplayCells): Don't access private fields
of Visual.

* src/xterm.c (x_color_cells, x_alloc_nearest_color_1): Use
colormap_size instead of default cell count.
(XTflash, x_bitmap_icon, x_term_init):
* src/xterm.h (struct x_display_info, FRAME_X_VISUAL_INFO): Stop
accessing private fields of Visual.
2022-03-07 21:10:53 +08:00
Po Lu
4b0e1c6502 Handle color allocation failures caused by colormap changes
* src/xterm.c (x_alloc_nearest_color_1): Recompute color cells
if allocation of cached value failed.
2022-03-07 21:10:53 +08:00
Michael Albinus
3e4d4f472d Rework `abbreviate-file-name' in Tramp
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add 'tramp-get-home-directory'.

* lisp/net/tramp-compat.el (tramp-file-name-handler): Declare.
(tramp-compat-exec-path): Use it.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-gvfs-handle-expand-file-name): Rewrite tilde handling.
(tramp-gvfs-handle-get-home-directory): New defun.

* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-sh-handle-get-home-directory): New defun.
(tramp-sh-handle-expand-file-name): Rewrite tilde handling.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-smb-handle-expand-file-name): Rewrite tilde handling.
(tramp-smb-handle-get-home-directory): New defun.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-sudoedit-handle-expand-file-name): Rewrite tilde handling.
(tramp-sudoedit-handle-get-home-directory): New defun.

* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `tramp-get-home-directory'.
(tramp-get-home-directory): New defun.
(tramp-handle-abbreviate-file-name): Use it.
(tramp-set-file-uid-gid, tramp-get-remote-uid)
(tramp-get-remote-gid): Use `tramp-file-name-handler'.
(tramp-get-remote-null-device): Do not check for null VEC, it
doesn't happen anymore.

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative):
Reorder checks.
(tramp-test07-abbreviate-file-name):
(tramp--test-ange-ftp-p): Adapt tests.
2022-03-07 13:42:30 +01:00
Eli Zaretskii
d9e5ae5e20 Improve wording of 'dired-jump's description
* doc/emacs/dired.texi (Dired Enter): Clarify wording.  Reported
by Natalie <batalie@riseup.net>.
2022-03-07 14:38:01 +02:00
Po Lu
c7d3ebc7fd ; * src/xterm.c (x_alloc_nearest_color_1): Commit missing hunk (again). 2022-03-07 19:57:19 +08:00
Po Lu
9e1186a732 ; * src/xterm.c (x_alloc_nearest_color_1): Add missing part of change. 2022-03-07 19:56:23 +08:00
Po Lu
f2b58db280 Fix color leak
* src/xterm.c (x_alloc_nearest_color_1): Don't allocate colors
multiple times when searching for a closest match.
2022-03-07 19:53:52 +08:00
Stefan Kangas
8b66adfe06 Merge from origin/emacs-28
73f28fbde8 Add a comment for previous browse-url-of-dired-file change
9b74e84857 Restore documented Emacs 27.2 behaviour of browse-url-of-d...
cd77fd3b85 Update to Org 9.5.2-24-g668205
2022-03-07 06:33:56 +01:00
Manuel Giraud
29157a9f88 Fix bookmark-bmenu-list sorting.
Do not sort bookmarks in `bookmark-bmenu-list' if `bookmark-sort-flag'
is nil.

Also, make the default order of bookmark-bmenu-list be the LIFO order
defined in `bookmark-sort-flag's documentation.
2022-03-06 23:14:30 -06:00
Po Lu
03b07fd62e Fix maximum selection size reporting
* src/xselect.c (selection_quantum): Take into account extended
request size.
2022-03-07 13:09:41 +08:00
Lars Ingebrigtsen
5324722202 Fix typo in previous browse-url-file-url change
* lisp/net/browse-url.el (browse-url-file-url): Fix typo in
previous change.
2022-03-07 05:58:39 +01:00
Lars Ingebrigtsen
73f28fbde8 Add a comment for previous browse-url-of-dired-file change
* lisp/net/browse-url.el (browse-url-of-dired-file): Add a comment
for previous change.
2022-03-07 05:15:58 +01:00
Lars Ingebrigtsen
9b74e84857 Restore documented Emacs 27.2 behaviour of browse-url-of-dired-file
* lisp/net/browse-url.el (browse-url-of-dired-file): Restore the
documented behaviour -- open a web browser instead of passing to
the various handlers.
2022-03-07 05:13:19 +01:00
Lars Ingebrigtsen
4405d73069 Fix esh-proc-test/kill-pipeline-head loop syntax
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-pipeline-head): Fix syntax of loop.
2022-03-07 04:25:21 +01:00
Lars Ingebrigtsen
231a1ba30f Inhibit extpipe tests on EMBA, because they apparently time out?
https://emba.gnu.org/emacs/emacs/-/pipelines/16387
2022-03-07 04:09:27 +01:00
Po Lu
3e5baffd03 Fix clearing of scroll bars on builds with disabled double buffers
* src/xterm.c (x_scroll_bar_clear): Use XClearArea if the scroll
bar is not double-buffered.
2022-03-07 10:55:50 +08:00
Lars Ingebrigtsen
a185f2af96 Tweak how bibtex-mark-entry places point
* lisp/textmodes/bibtex.el (bibtex-mark-entry): Make `C-M-h'
behave like in other modes (with point at the beginning of the
region) (bug#4717).
2022-03-07 03:51:55 +01:00
Lars Ingebrigtsen
e07a36f267 Show SVN status on "." directories, too
* lisp/vc/vc-svn.el (vc-svn-after-dir-status): Allow tracking
state of the "." directory, too, since they may have modified
properties (bug#7861).
2022-03-07 03:47:13 +01:00
Lars Ingebrigtsen
e06319b39d Fix `W' in Dired with non-ASCII file names
* lisp/net/browse-url.el (browse-url--file-name-coding-system):
Factor out into own function.
(browse-url-file-url): Property encode non-ASCII characters so
that external browsers can understand them.
(browse-url-emacs): Make `W' in Dired work with non-ASCII file
names (bug#54271).
2022-03-07 03:28:32 +01:00
Kyle Meyer
cd77fd3b85 Update to Org 9.5.2-24-g668205 2022-03-06 20:18:26 -05:00
Po Lu
36b31d38cd Get rid of a loop through all frames when processing events
* src/xterm.c (handle_one_xevent): Just flip back buffer of f
and any instead.
(flush_dirty_back_buffer_on): New function.
(flush_dirty_back_buffers): Delete function.
2022-03-07 08:53:50 +08:00
Gustaf Waldemarson
f70bf8a21d Display complex data types in gdb-mi
* lisp/progmodes/gdb-mi.el (bindat): Require.
(gdb-invalidate-locals): Use `-stack-list-variables` instead of
the deprecated `-stack-list-locals`. Additionally, this allow
function arguments to be displayed in the locals buffer.
(gdb-locals-values-buffer, gdb-locals-values-buffer-name)
(gdb-locals-simple-values-only, gdb-locals-values-table): New
variables.
(gdb-locals-values-handler-custom): Create a new gdb buffer for
extracting local variable values. To
extract the values for 'complex' data-types, the command
`-stack-list-locals` is used with the `--all-values` flag.

The extracted values are then stored in a hash-table for later use in
the `gdb-locals-handler-custom` that performs the actual update of the
Local variable buffer.

All variable values are filtered to fit it into a single line, being
truncated as necessary by the user customizable option
`gdb-locals-value-limit`.

The old behavior of hiding complex values can be restored using the
customizable `gdb-locals-simple-values-only` option.

Patch amended by William Xu <william.xwl@gmail.com>.
2022-03-06 22:56:04 +01:00
Lars Ingebrigtsen
5b7ce98ea0 Fix syntax error in obsolete message function
* lisp/gnus/message.el (message-send-mail-function): Fix syntax error.
2022-03-06 19:34:54 +01:00
Lars Ingebrigtsen
75a1514130 Fix url-interactive-p type
* lisp/url/url-vars.el (url-interactive-pw): Fix typo in previous
checkin (bug#54275).
2022-03-06 19:02:45 +01:00
Lars Ingebrigtsen
56bdfe7820 Fix problem with fetching images via Cloudflare
* lisp/url/url-http.el (url-http): Factor out url-interactive-p.
* lisp/url/url-auth.el (url-basic-auth):
(url-basic-auth):
(url-digest-prompt-creds): Use it to not query the user.

* lisp/url/url-queue.el (url-queue-start-retrieve): Don't send a
bogus empty Authorization header (bug#54246) -- this triggers
Cloudflare's anti-attack software.  Instead rely on
url-request-noninteractive.

* lisp/url/url-vars.el (url-interactive-p): New utility function.
2022-03-06 17:41:28 +01:00
Stefan Monnier
93c2daa33d (ecomplete-add-item): Preserve the more complete text
Avoid replacing "John Doe <john@doe.ch>" with "john@doe.ch".

* lisp/ecomplete.el (ecomplete-add-item): Keep the longest text
2022-03-06 10:14:42 -05:00
Alan Mackenzie
68cdb95019 Restore call to byte-run-strip-symbol-positions in byte-compile-out
Also increment a loop counter.  This should fix bug #54248.

* lisp/emacs-lisp/byte-run.el (byte-run--strip-vector/record): increment the
loop counter 'i' in the main loop.

* lisp/emacs-lisp/bytecomp.el (byte-compile-out): call
byte-run-strip-symbol-positions on operands which are one-element lists.
2022-03-06 13:37:30 +00:00
Mattias Engdegård
6eeab90632 Don't accept whitespace or hex floats in rgbi: colour specs
`color-values-from-color-spec` (new in Emacs 28) erroneously accepted
leading whitespace and hex floats in rgbi: components.

Reported by Philip Kaludercic.

* src/xfaces.c (parse_float_color_comp): Disallow leading whitespace
and hex floats.
* test/src/xfaces-tests.el
(xfaces-internal-color-values-from-color-spec): Add test cases.
2022-03-06 14:07:26 +01:00
Po Lu
ea5a0142ce Respect inhibit-double-buffering on non-toolkit scroll bars
* src/xfns.c (x_set_inhibit_double_buffering): Force scroll bars
to be re-created on builds without toolkit scroll bars.

* src/xterm.c (x_scroll_bar_create): Don't initialize back
buffer if double buffering is disabled for the frame.
2022-03-06 21:04:34 +08:00
Po Lu
450f3f8725 Slightly fix mouse-highlight processing on Haiku
* src/haikuterm.c (haiku_read_socket): If no corresponding frame
was found for a keyboard event, clear mouse highlight.
2022-03-06 10:42:33 +00:00
Po Lu
0adb2d507c Implement frame cascading on Haiku
* haikufns.c (haiku_create_frame): Cascade frame position with
the focused frame if position is not user or programmer
specified.
2022-03-06 07:13:22 +00:00
Stefan Kangas
200627c255 Merge from origin/emacs-28
0090318c61 * lib-src/seccomp-filter.c (main): Use faccessat2 only if ...
3bb01a499b Fix regression in derived-mode-init-mode-variables
2022-03-06 06:32:23 +01:00
Po Lu
e09bbfc37d Implement "window cascading" on NS
* src/nsfns.m (Fx_create_frame): Cascade new frame position if
size hint flags are not USPosition or PPosition.
2022-03-06 10:43:25 +08:00
Po Lu
db2cb522e1 Reduce non-toolkit scroll bar flicker
* src/xterm.c (x_scroll_bar_create): Initialize double buffer
for scroll bar.
(x_scroll_bar_set_handle)
(x_scroll_bar_remove, x_scroll_bar_expose): Draw to back buffer
instead.
(x_scroll_bar_end_update): New function.
(x_scroll_bar_clear): Fill the scroll bar with the background
instead when double buffered.
* src/xterm.h (struct scroll_bar): New field `x_drawable'.
2022-03-06 10:02:03 +08:00
Po Lu
c9667e9b60 Fix reporting of menu bar wheel events on no toolkit builds
* src/xterm.c (x_toolkit_position): Handle menu bar position
on no-toolkit builds.
(x_create_terminal): Always add `toolkit_position_hook'.
2022-03-06 08:56:46 +08:00
Robert Pluim
98d2dc6522 Use pselect instead of select in nsterm.m
* src/nsterm.m ([EmacsApp fdhandler:]): Use pselect instead of
the single remaining use of select (because we try to avoid using
select directly) (bug#54245).
2022-03-05 20:00:09 +01:00
Lars Ingebrigtsen
d70ad7229a Fix emacs-module-test after recent changes
* test/Makefile.in ($(test_module)): Include libgnu.a in the
module test (because the module uses functions from gnulib)
(bug#32452).
2022-03-05 19:06:20 +01:00
Andreas Schwab
0090318c61 * lib-src/seccomp-filter.c (main): Use faccessat2 only if defined. 2022-03-05 14:41:22 +01:00
Po Lu
1e1d2f18c6 Obey decorator-specified width and height of tooltip frames on Haiku
* src/haiku_support.cc (BWindow_dimensions): New functions.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (Fx_show_tip): Use actual dimensions, because
the decorator might specify a minimum width and height for the
tooltip frame.
* src/haikuterm.c (haiku_update_size_hints): Ignore tooltip
frames.
2022-03-05 10:20:04 +00:00
Po Lu
8969953328 Garbage Haiku tooltip frames on size change
* haikuterm.c (haiku_read_socket): If tooltip frame dimensions
actually changed, garbage the frame.
2022-03-05 06:24:09 +00:00
Paul Eggert
2f5a8c4f27 Fix process-attributes time precision on BSD
* src/sysdep.c (timeval_to_timespec) [__FreeBSD__ || DARWIN_OS]:
Remove; no longer needed.
(make_lisp_s_us) [__FreeBSD__ || DARWIN_OS || __OpenBSD__]:
New function.
(make_lisp_timeval) [__FreeBSD__ || DARWIN_OS || __OpenBSD__]:
Rework in terms of make_lisp_s_us.
(system_process_attributes) [__FreeBSD__ || DARWIN_OS ||
__OpenBSD__]: Simplify by using the above.  This fixes some minor
problems where timestamps promised more precision than was
actually available.
2022-03-04 19:29:06 -08:00
Paul Eggert
2fbd48f733 Fix process-attributes time precision on GNU/Linux
* src/sysdep.c [GNU_LINUX]:
(time_from_jiffies): Simplify by using time-convert.  Change args
and result type.  All uses changed.
(ltime_from_jiffies): Remove; call time_from_jiffies instead.
(put_jiffies): New function.
(get_up_time): Return Lisp_Object not struct timespec.
All uses changed.  Simplify by using time-add.
(system_process_attributes): Simplify by using the above.
This fixes some minor problems where timestamps promised more
precision than was actually available.  When info is not
available (e.g., sysconf fails) do not place it into the alist.
* src/timefns.c (float_time): Now extern.
2022-03-04 19:29:05 -08:00