1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-20 04:50:55 -07:00
Commit graph

156649 commits

Author SHA1 Message Date
kobarity
2b63fabcd3 Fix two typos in comments in python.el
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Fix typos in
comments (bug#55557).
2022-05-22 13:26:34 +02:00
Damien Cassou
959d041677 Fix submit-emacs-patch
submit-emacs-patch creates a new message and immediately inserts new
lines without first moving the point to the message body.  This
doesn't work with notmuch (and its notmuch-user-agent symbol) because
the point starts in the headers and nothing in Emacs specifies that
the mua should move point to the body automatically.

* lisp/mail/emacsbug.el (submit-emacs-patch): Make sure point is in
the body before inserting new lines (bug#55571).
2022-05-22 13:24:21 +02:00
Lele Gaifax
35d0190b0b Properly indent Python PEP634 match/case blocks
Python 3.10 introduced the "structural pattern matching" syntax, and
commit 139042eb86 told font-lock about the
new keywords. This adds them also as block-start statements, to enable
proper indentation of such blocks.

* lisp/progmodes/python.el (python-rx): Add "match" and "case" as
block-start keywords.
* test/lisp/progmodes/python-tests.el (python-indent-after-match-block,
python-indent-after-case-block): New tests to verify indentation of
"match" and "case" blocks (bug#55572).
2022-05-22 13:22:59 +02:00
Po Lu
ae8b1b8fd4 Implement `display-monitors-changed-functions' on MS Windows
* src/w32term.c (w32_read_socket): Handle WM_DISPLAYCHANGE by
sending monitor change events.
2022-05-22 17:15:10 +08:00
Po Lu
73df958411 Fix uninitialized use of xm drag receiver data
* src/xterm.c (xm_read_drag_receiver_info): Just return if the
protocol is invalid.  Reported by Jashank Jeremy
<jashank@rulingia.com.au>.
2022-05-22 15:56:20 +08:00
Po Lu
9988047f47 Fix build with --enable-check-lisp-object-type
* src/xterm.c (handle_one_xevent): Fix use of Fequal.  Reported
by Jashank Jeremy <jashank@rulingia.com.au>.
2022-05-22 15:34:21 +08:00
Eli Zaretskii
d97a04628a ; Fix documentation of Tagalog
* lisp/leim/quail/philippine.el ("tagalog"):
* lisp/language/philippine.el ("Tagalog"): Fix doc string.
(Bug#55529)
2022-05-22 10:23:35 +03:00
समीर सिंह Sameer Singh
97ca793651 Add support for the Tagalog script
* lisp/language/philippine.el ("Tagalog"): New language environment.
Add composition rules for Tagalog.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Tagalog.
* lisp/leim/quail/philippine.el ("tagalog"): New input method.
* lisp/loadup.el: Preload lisp/language/philippine.el.

* etc/HELLO: Add a Tagalog greeting.
* etc/NEWS: Announce the new language environment and its
input method.
(Bug#55529)
2022-05-22 10:17:20 +03:00
Po Lu
d52749202f Fix use-after-free in x_destroy_window
* src/xterm.c (x_destroy_window): Fix use after free of the
dpyinfo.
2022-05-22 13:13:01 +08:00
Po Lu
67685de75c Fix focus redirection to/from surrogate minibuffer frames on Haiku
* src/haikuterm.c (haiku_get_focus_frame): New function.
(haiku_create_terminal): Register new hook.
2022-05-22 05:03:12 +00:00
Po Lu
714970f596 Fix GNUstep build
* src/nsfns.m (ns_implicitly_set_icon_type): Don't use UTType if
GNUstep.
2022-05-22 11:18:32 +08:00
Po Lu
e5e474baae Fix compiler warnings on Mac OS X 10.12
* configure.ac: Check for Mac OS X 12 and link with
UniformTypeIdentifiers.framework.

* src/nsfns.m (IOMasterPort): Define to `IOMainPort' on Mac OS X
12.
(ns_implicitly_set_icon_type, Fns_read_file_name):
* src/nsxwidget.m: ([XwWebView
initWithFrame:configuration:xwidget:]): Fix uses of obsolete
things.
2022-05-22 11:02:24 +08:00
Po Lu
672af0a5da Set display size upon RRScreenChangeNotify
* src/xterm.c (handle_one_xevent): Handle RRScreenChangeNotify
correctly.
2022-05-22 09:38:21 +08:00
Po Lu
e465ea816d Don't unnecessarily call monitor change functions
* src/xterm.c (handle_one_xevent): If monitor attributes didn't
change, don't send monitor change event.
(x_term_init, mark_xterm): Mark and init new field.
* src/xterm.h (struct x_display_info): New field
`last_monitor_attributes_list'.
2022-05-22 09:27:46 +08:00
Sean Whitton
900700a03f ; * doc/emacs/dired.texi (Entering Dired): Fix typo. 2022-05-21 16:15:01 -07:00
Eli Zaretskii
208102fa47 ; Rename enable-theme and disable-theme hooks
* lisp/custom.el (enable-theme-functions)
(disable-theme-functions): Rename from enable-theme-hook and
disable-theme-hook.  All users changed.  (Bug#37802)
2022-05-21 16:55:15 +03:00
Michael Albinus
42af5bcbed Some cleanups in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare.
(tramp-test16-directory-files)
(tramp-test16-file-expand-wildcards)
(tramp-test26-file-name-completion, tramp--test-check-files): Use it.
(tramp--test-check-files): Delete directory recursively.
(tramp-test43-file-system-info): Make test more robust.
2022-05-21 15:44:22 +02:00
Michael Albinus
c32b92f2bd Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2022-05-21 15:43:34 +02:00
kobarity
a8acb9516e Fix recently introduced Python font lock breakage of chained assignments
* lisp/progmodes/python.el (python-font-lock-assignment-matcher):
Fix fontification of chained assignments (bug#54992).
2022-05-21 15:23:21 +02:00
Michael Albinus
61367a971b ; Merge from origin/emacs-28
The following commit was skipped:

fa6a0962c5 Fix Tramp sshfs tests (don't merge)
2022-05-21 15:20:10 +02:00
Michael Albinus
56e81ca25b Merge from origin/emacs-28
f836ed098f Some minor Tramp fixes
2022-05-21 15:20:10 +02:00
Lars Ingebrigtsen
22ae842b34 Add new hooks when enabling and disabling themes
* lisp/custom.el (enable-theme-hook, disable-theme-hook): New
hooks (bug#37802).
(enable-theme, disable-theme): Call them.
2022-05-21 14:56:13 +02:00
Eli Zaretskii
050fa501a2 ; * etc/NEWS: Fix wording of 'zap-to-char's entry. 2022-05-21 12:55:12 +03:00
Tino Calancha
212aea97f9 zap-to-char: case sensitive for upper-case characters
In interactive calls, behave case-sensitively if the given char
is an upper-case character.  Same for zap-up-to-char (Bug#54804).

This is analog to what the user-level incremental search feature does.

* lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE.
Perform a case-sensitive search when INTERACTIVE is non-nil and
CHAR is an upper-case character.
* lisp/simple.el (zap-to-char): Same.

* etc/NEWS (Editing Changes in Emacs 29.1): Announce this change.
* test/lisp/misc-tests.el (misc-test-zap-up-to-char): Add test cases.
* test/lisp/simple-tests.el (with-zap-to-char-test): Add helper macro.
(simple-tests-zap-to-char): Add a test.
2022-05-21 11:23:55 +02:00
Po Lu
92fa0df30b Improve doc for `display-monitors-changed-functions'
* doc/lispref/frames.texi (Multiple Terminals): Describe how to
retrieve the new monitor configuration inside
`display-monitor-attributes-list'.
2022-05-21 16:47:39 +08:00
Eli Zaretskii
69792e34a4 ; * etc/HELLO: Improve wording of preamble text. (Bug#55439) 2022-05-21 11:04:58 +03:00
Po Lu
cf21e38543 Fix compiler warnings in printer code on 32-bit systems
* print.c (enum print_entry_type, struct print_stack_entry):
Clean up coding style.
(struct print_stack): Make print_stack_entry.list.idx intmax_t,
like it was before the nonrecursive printing was installed.
Also clarify what "Brent cycle detection" means in the comments.
2022-05-21 14:46:57 +08:00
Po Lu
3e3fe06307 Compute frame workareas on Haiku
* lisp/frame.el (display-monitor-attributes-list): Implement
specially on Haiku as well.
* src/haiku_support.cc (get_zoom_rect): New function.  Extract
CalculateZoomRect here.
(class EmacsWindow, SetFullscreen): Use that instead of
CalculateZoomRect.
(be_get_explicit_workarea): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (Fhaiku_display_monitor_attributes_list): New
function.
(syms_of_haikufns): Register new subr.
2022-05-21 06:28:06 +00:00
Po Lu
b7b14e9203 Implement monitor change hooks on NS
This hasn't been tested with anything more complicated than
removing an emulated monitor.

* nsterm.m (ns_displays_reconfigured): New function.
(ns_term_init): Register display reconfiguration callbacks.
2022-05-21 11:50:08 +08:00
Po Lu
5a290eb7d3 Call XRRUpdateConfiguration when the root window geometry changes
* src/xterm.c (handle_one_xevent): Call XRRUpdateConfiguration
on RRScreenChangeNotify and upon ConfigureNotify events for the
root window.
2022-05-21 11:34:51 +08:00
Po Lu
98163f48a0 Implement `display-monitors-changed-hook' on PGTK
* src/pgtkterm.c (pgtk_draw_glyphless_glyph_string_foreground):
Pacify GCC 12.
(pgtk_monitors_changed_cb): New function.
(pgtk_term_init): Attach new signal handler.
2022-05-21 11:29:27 +08:00
Po Lu
edf9700c3c Add a hook run upon monitor configuration changes
* doc/lispref/frames.texi (Multiple Terminals): Document new
hook `display-monitors-changed-functions'.
* etc/NEWS: Announce new abnormal hook.

* src/keyboard.c (kbd_buffer_get_event): Handle
MONITORS_CHANGED_EVENT.
(syms_of_keyboard): New hook and defsyms.
* src/termhooks.h (enum event_kind): Add new event
`MONITORS_CHANGED_EVENT'.

* src/xterm.c (handle_one_xevent): Handle RRNotify and
RRScreenChangeNotify events.
(x_term_init): Select for RRScreenChange, RRCrtcChange and
RROutputChange.
* src/xterm.h (struct x_display_info): Improve RandR version
detection.
2022-05-21 11:17:34 +08:00
Stefan Kangas
1cbabe973b Remove compat code; assume imenu.el exists
* lisp/progmodes/antlr-mode.el (antlr-mode):
* lisp/progmodes/cperl-mode.el (cperl-menu):
* lisp/progmodes/f90.el (f90-mode-map):
* lisp/progmodes/fortran.el (fortran-menu):
* lisp/speedbar.el (speedbar-use-imenu-flag): Remove compat code;
assume imenu.el exists.
2022-05-20 21:03:56 +02:00
Po Lu
dd6a24ebed ; * src/xterm.c (struct x_client_list_window): Improve comment. 2022-05-20 20:08:31 +08:00
Po Lu
8db0acb0f0 Check for allocation errors when setting XdndActionDescription
* src/xterm.c (x_dnd_begin_drag_and_drop): Check for BadAlloc
when setting action descriptions.
2022-05-20 20:08:31 +08:00
Eli Zaretskii
e04cc584a8 ; * doc/lispref/text.texi (Yanking): Fix wording. 2022-05-20 15:06:44 +03:00
Eli Zaretskii
6265e0c540 Document 'enriched-toggle-markup'
* etc/enriched.txt: Document the new 'enriched-toggle-markup'
command.  (Bug#33855)
2022-05-20 15:03:06 +03:00
Eli Zaretskii
349284a40c ; * lisp/simple.el (yank-transform-functions): Doc fix. 2022-05-20 14:51:07 +03:00
Eli Zaretskii
eb71446de5 ; Improve documentation of 'display-buffer-avoid-small-windows'
* lisp/window.el (display-buffer-avoid-small-windows)
(get-lru-window):
* etc/NEWS:
* doc/lispref/windows.texi (Choosing Window Options): Improve
documentation of 'display-buffer-avoid-small-windows'.
(Bug#10186)
2022-05-20 14:35:03 +03:00
Lars Ingebrigtsen
3c82e96954 Add new user option display-buffer-avoid-small-windows
* doc/lispref/windows.texi (Choosing Window Options): Document it.
* lisp/window.el (display-buffer-avoid-small-windows): New user
option (bug#10186).
(get-lru-window): Use it.
2022-05-20 12:05:43 +02:00
Lars Ingebrigtsen
69f42faa50 Clarify select-active-regions doc string
* src/keyboard.c (syms_of_keyboard): Clarify doc string (bug#29889).
2022-05-20 12:05:43 +02:00
Po Lu
c1fbbc57a9 Fix race conditions processing zoom events on Haiku
* src/haiku_support.cc (Zoom):
* src/haiku_support.h (struct haiku_zoom_event): Include the
current fullscreen mode in the event.

* src/haikuterm.c (haiku_read_socket): Use that instead of the
current frame's fullscreen mode.
2022-05-20 09:29:08 +00:00
Lars Ingebrigtsen
bbe6c68d79 Re-fix previous `&' dired change
* lisp/dired-aux.el (dired-shell-stuff-it): Re-fix the previous
change -- the &wait was in the wrong place (bug#36331).
2022-05-20 10:37:24 +02:00
Philip Kaludercic
63eb015722 Add option to kill a shell buffer when the process ends
* shell.el (shell-kill-buffer-on-quit): Add new option (bug#55426).
(shell): Respect 'shell-kill-buffer-on-quit'.
* NEWS: Mention 'shell-kill-buffer-on-quit'.
2022-05-20 10:22:47 +02:00
Po Lu
efd3e78258 Fix NS port warnings with GCC 12
* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground):
Clear s->char2b after function returns.
2022-05-20 14:46:45 +08:00
Po Lu
726969a4b4 Remove flickering when toggling between different fullscreen states on Haiku
* src/haiku_support.cc (FrameMoved): Don't allow moving the
frame along the "filled" axis when fullwidth or fullheight.
(ClearFullscreen): New argument `mode'.  Return the previous
rect but don't revert the frame to it if the target mode is not
NONE.
(SetFullscreen): Use rect provided by ClearFullscreen instead.
2022-05-20 05:34:04 +00:00
Po Lu
242a4b49cb Minor cleanups to X drag-and-drop code
* src/xterm.c (struct x_client_list_window): Write comments
describing the meaning of each field.
(XM_DRAG_PROTOCOL_VERSION, xm_setup_dnd_targets)
(xm_setup_drag_info, xm_read_drag_receiver_info)
(x_dnd_compute_toplevels): Don't hard-code the supported Motif
protocol version.
2022-05-20 11:21:47 +08:00
Po Lu
8a7d8bb04b Implement `cross-disabled-images' on Haiku
* src/haiku_draw_support.cc (be_draw_cross_on_pixmap_1)
(be_draw_cross_on_pixmap): New functions.

* src/haiku_support.h: Update prototypes.

* src/image.c (image_pixmap_draw_cross, image_disable_image):
Implement drawing cross on Haiku.
2022-05-20 02:28:29 +00:00
Lars Ingebrigtsen
9d557d4d4a Rename compare-window-configurations and update doc
* doc/lispref/windows.texi (Window Configurations): Update name.
* lisp/strokes.el (strokes-window-configuration-changed-p):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Update
callers and references.

* lisp/subr.el (compare-window-configurations): Make into obsolete
alias.

* src/window.c (Fwindow_configuration_equal_p): Rename (bug#14964).
2022-05-20 04:23:32 +02:00
Lars Ingebrigtsen
7e32904998 Don't have the tutorial ask to save if we haven't moved
* lisp/tutorial.el (tutorial--save-on-kill): Don't ask if the user
hasn't moved point (bug#37326).
(help-with-tutorial): Set the start point.
2022-05-20 03:59:39 +02:00