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

156695 commits

Author SHA1 Message Date
Eli Zaretskii
aab560f0c1 Fix saveplace.el when desktop.el restores non-ASCII buffers
* lisp/saveplace.el (load-save-place-alist-from-file): Bind
'coding-system-for-read' to nil, so that the 'coding:' cookie in
the save-place file takes effect.  (Bug#55592)
2022-05-23 16:32:47 +03:00
Tino Calancha
6ac6919f74 zap-to-char: Fix interactive specification
* lisp/simple.el (zap-to-char): Include t in the list.
2022-05-23 14:52:01 +02:00
Po Lu
1799e5d35a Adapt last change to Haiku as well
* src/haikumenu.c (digest_menu_items, haiku_menu_show): Use
SAFE_ALLOCA for various temporary buffers.
2022-05-23 12:50:27 +00:00
Po Lu
cec2ef73a6 Fix stack overflows with large popup menus
* src/xmenu.c (x_menu_show): Allocate various stacks with
SAFE_ALLOCA.
2022-05-23 20:31:18 +08:00
Po Lu
ca6899a0ef Fix default child-frame-border-width on PGTK
* src/pgtkfns.c (Fx_create_frame): Make default
`child-frame-border-width' nil.  (bug#55588)
2022-05-23 20:16:46 +08:00
Lars Ingebrigtsen
250b728284 Improve command-error-function discoverability
* lisp/subr.el (error, user-error): Point to command-error-function.

* src/keyboard.c (syms_of_keyboard): Add an example (bug#40750).
2022-05-23 13:56:12 +02:00
समीर सिंह Sameer Singh
a3fce23e3b Add support for the Hanunoo script (bug#55581)
* lisp/language/philippine.el ("Hanunoo"): New language environment.
Add composition rules for Hanunoo.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Hanunoo.
* lisp/leim/quail/philippine.el ("hanunoo"): New input method.

* etc/HELLO: Add a Hanunoo greeting.
* etc/NEWS: Announce the new language environment and its
input method.
2022-05-23 14:46:43 +03:00
Lars Ingebrigtsen
e5d76634a2 Make remapped keys work in set-transient-map
* lisp/subr.el (set-transient-map): Make remapped keys work in
transient maps (bug#40096).
2022-05-23 13:10:04 +02:00
Po Lu
7ff88efc02 Fix coding style of recent change
* src/emacs.c (main): Fix coding style by putting the = operator
on the right row.
2022-05-23 18:31:11 +08:00
Po Lu
caec741c00 Implement monitor change functions on Haiku
* src/haiku_io.c (haiku_len): Handle new event type.
* src/haiku_support.cc (class EmacsScreenChangeMonitor): New
class.
(class Emacs, Emacs): Create new screen change monitor.
(DispatchMessage): Update fullscreen state if the screen
changed.
(SetFullscreen): Don't punt if fullscreen mode is identical.

* src/haiku_support.h (enum haiku_event_type): New event
`SCREEN_CHANGE_EVENT'.
(struct haiku_screen_changed_event): New struct.

* src/haikuterm.c (haiku_read_socket): Handle new event.
2022-05-23 10:23:59 +00:00
Lars Ingebrigtsen
4b15b88e71 Make `d' in Dired skip dot files
* lisp/dired.el (dired-mark): Skip dot files (bug#38729).  This
makes `C-u 10 d' (etc) consistent with marking the next ten lines
with the mouse and then hitting `d'.
2022-05-23 12:17:25 +02:00
Lars Ingebrigtsen
a9b393c773 Include development data in --version output
* src/emacs.c (main): Include development into in --version output
(bug#38657).
2022-05-23 11:58:22 +02:00
Juri Linkov
4766fe1daf * lisp/tab-bar.el (switch-to-buffer-other-tab): Use pop-to-buffer (bug#55582).
Replace display-buffer with pop-to-buffer that sets the current buffer
explicitly.
2022-05-23 10:48:15 +03:00
Lars Ingebrigtsen
1cfb89dc79 Allow extending 'save-some-buffers'
* lisp/abbrev.el (abbrev--possibly-save): Separated out from
`save-some-buffers'.
(save-some-buffers-functions): Add to the save function.

* lisp/files.el (save-some-buffers-functions): New variable.
(save-some-buffers): Use it.
(save-buffers-kill-emacs): Also use it to see if we have something
to save (bug#55579).
2022-05-23 09:45:35 +02:00
Lars Ingebrigtsen
f471eaf440 Make bootstrap remove more generated files
* Makefile.in (bootstrap-clean): Remove lisp/leim/ja-dic/.
2022-05-23 08:19:04 +02:00
Lars Ingebrigtsen
a6312d4217 Make bootstrap remove the native-lisp/ directory
* Makefile.in (bootstrap-clean): Remove the native-lisp/ directory.
2022-05-23 08:09:17 +02:00
Po Lu
b629cb3f54 Minor fixes to PGTK child frames
* src/gtkutil.c (xg_check_special_colors): Handle child frames
correctly.
* src/pgtkfns.c (pgtk_set_child_frame_border_width): Synchronize
code from X.  (bug#55588)
* src/pgtkmenu.c (pgtk_menu_show, pgtk_dialog_show): Allow in
child frames.  There are no problems here.
* src/pgtkterm.c (pgtk_mouse_position): Clean up coding style.
2022-05-23 13:30:33 +08:00
Po Lu
5346b67fc2 Implement monitor change functions on GNUstep
* src/nsfns.m (Fns_display_monitor_attributes_list): Fix coding
style.
* src/nsterm.m (nstrace_leave, nstrace_restore_global_trace_state)
(nstrace_fullscreen_type_name): Fix coding style.
(ns_displays_reconfigured, ns_term_init): Make a record of the
previous display attributes list and avoid storing duplicate
events.
([EmacsApp init]): Listen for
NSApplicationDidChangeScreenParametersNotification.
([EmacsApp updateMonitors:]): New method.
(syms_of_nsterm): New staticpro.
2022-05-23 11:13:45 +08:00
Po Lu
20662ecd21 Handle screen size changes if the RandR library isn't available
* src/xterm.c (handle_one_xevent): [!HAVE_XRANDR]: Store
MONITORS_CHANGED_EVENT upon root window reconfiguration.
2022-05-23 10:55:48 +08:00
Po Lu
7a709b36ef Fix `gui-backend-selection-owner-p' on Haiku
* src/haiku_select.cc (be_update_clipboard_count): New function.
(be_set_clipboard_data): Update clipboard counts.
(BClipboard_owns_clipboard, clipboard_owner_p)
(BClipboard_owns_primary, primary_owner_p)
(BClipboard_owns_secondary, secondary_owner_p): Rename functions
somewhat.
(be_clipboard_owner_p): New function.
* src/haikuselect.c (Fhaiku_selection_put)
(Fhaiku_selection_owner_p): Update selection counts as well.
* src/haikuselect.h: Update prototypes.
2022-05-23 01:57:19 +00:00
Po Lu
42e48f788a Use GDK for handling monitor changes when built with GTK
* src/xterm.c (x_monitors_changed_cb): New function.
(handle_one_xevent): Don't handle RRNotify and
RRScreenChangeNotify on GTK.
(x_term_init): Connect to GdkScreen::monitors-changed instead of
selecting for RRNotify events.
(mark_xterm): Also mark `last_monitor_attributes_list' on GTK.
* src/xterm.h (struct x_display_info): Enable
`last_monitor_attributes_list' on GTK builds as well.
2022-05-23 09:29:32 +08:00
F. Jason Park
73b40d8716 Recognize DCC SSEND when receiving files in erc-dcc
* lips/erc/erc-dcc.el (erc-dcc-open-network-stream): Use TLS
for new connections when :secure flag is set.
(erc-dcc-do-GET-command): Set secure flag when user explicitly passes
an "-s" option.
(erc-dcc-do-LIST-command): Show an "s" to indicate a secure connection
when applicable.
(erc-dcc-query-handler-alist): Add extra items for "SSEND", etc.
(erc-dcc-handle-ctcp-send): Set secure flag when a leading "S" appears
in the command type.
2022-05-22 18:04:52 -07:00
F. Jason Park
df1e553688 Accommodate nonstandard turbo file senders in erc-dcc
* lisp/erc/erc-dcc.el (erc-dcc-list): Document optional :turbo item.
(erc-message-english-dcc-list-{head,line,item}): Adjust format strings
to make room for "(T)" turbo indicator.
(erc-dcc-do-GET-command): Optionally set :turbo in `erc-dcc-list'
entry when passed "-t" in the "/DCC GET" slash command.  Also add
switch to command line in front-matter Commentary, but refrain from
publicizing further because our implementation is only defensive and
only for receiving.
(erc-dcc-do-LIST): Print message with new format specifier for turbo
status.
(erc-dcc-ctcp-query-send-regexp): Account for T- and S-prefixed
commands.  Receiving from an SSEND-capable sender will be added in a
subsequent commit.
(erc-dcc-handle-ctcp-send): Set :turbo item in `erc-dcc-list' member
when new match group is nonempty.
(erc-dcc--X-send-final-turbo-ack): New internal variable and potential
future option for extreme corner cases involving maverick turbo
senders, like WeeChat, who don't use the TSEND command variant.
(erc-dcc-get-filter): Don't send when turbo is active.

* test/lisp/erc/erc-dcc-tests.el: Add new file.
(Bug#54458)
2022-05-22 18:04:52 -07:00
F. Jason Park
758775f158 Allow matching against string values in erc-dcc-member
* lisp/erc/erc-dcc.el (erc-dcc-member): Be more tolerant in the
catch-all case by testing for equality instead of identity.
(erc-dcc-do-GET-command): Pass file name when querying
`erc-dcc-member'. (Bug#54458)
2022-05-22 18:04:52 -07:00
F. Jason Park
37e26fc537 Don't send reports in erc-dcc-get-filter when nested
* lisp/erc/erc-dcc.el (erc-dcc-get-filter): Don't bother sending a
"received so far" receipt if another attempt is still ongoing.
(Bug#54458)
2022-05-22 18:04:52 -07:00
F. Jason Park
93f9f6866a Summarize failed transfers in erc-dcc
* lisp/erc/erc-dcc.el (erc-dcc-get-sentinel): Display error when total
byte count received is lower than expected.
(erc-message-english-dcc-get-failed): Add `dcc-get-failed' to the
English messages catalog.
(erc-dcc-get-file): Tweak initialization of `erc-dcc-entry-data'.
(Bug#54458)
2022-05-22 18:03:04 -07:00
Stefan Monnier
8a677ffe57 * lisp/cedet/semantic/fw.el: Fix typo 2022-05-22 16:27:21 -04:00
Stefan Monnier
be0cf9e299 mode-local: Revert the deprecation of buffer-local overrides
Obviously, I did not understand how the <foo>--install-parser was invoked.

Revert "mode-local: Deprecate buffer-local overrides"
Revert "semantic-install-function-overrides: Declare obsolete"
Revert "wisent.el: Prefer `define-mode-local-override`"

This reverts commits 91bc24c467,
d2e0d1452b, and
3294ad44eb.
2022-05-22 16:13:17 -04:00
Lars Ingebrigtsen
8c153047e7 Fix bytecomp-test--with-suppressed-warnings test
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Adjust test to change
in warning message.
2022-05-22 20:16:01 +02:00
Lars Ingebrigtsen
f14f6180b7 Fix previous warning suppression change
* lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn)
(byte-compile-subr-wrong-args):
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
The `wrong-args' warning is really called `callargs'.
2022-05-22 20:14:03 +02:00
Lars Ingebrigtsen
3f746d44de Fix compilation warning in semantic-install-function-overrides
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
Suppress message about wrong number of arguments.
2022-05-22 20:07:22 +02:00
Lars Ingebrigtsen
a0524584e9 Allow suppressing messages about the wrong number of arguments
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Add
`wrong-args'.
* lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn)
(byte-compile-subr-wrong-args): Allow suppressing wrong number of
arguments.
2022-05-22 20:07:22 +02:00
Juri Linkov
b2a5bf142f Enable keys M-down, M-up, M-RET for in-buffer completion
* lisp/minibuffer.el (completion-in-region-mode-map): Add keybindings M-<up>
for minibuffer-previous-completion, M-<down> for minibuffer-next-completion,
M-RET for minibuffer-choose-completion.
(completion-in-region-mode): Set buffer-local
'minibuffer-completion-auto-choose' to nil.
(minibuffer-next-completion): Get the value of
'minibuffer-completion-auto-choose' from the minibuffer.
(minibuffer-previous-completion): Simplify by delegating to
'minibuffer-next-completion'.

* doc/emacs/programs.texi (Symbol Completion): Add description of keys
M-down, M-up, M-RET.

https://lists.gnu.org/archive/html/emacs-devel/2022-05/msg00916.html
2022-05-22 20:55:35 +03:00
Alan Mackenzie
2f68673a71 CC Mode: Restore string fence properties at each relevant external entry point
This fixes bug #55230.

* lisp/progmodes/cc-defs.el (c-string-fences-set-flag, c-with-string-fences):
New variable and macro.

* lisp/progmodes/cc-mode.el (c-called-from-text-property-change-p): Add
remove-text-properties to the list of accepted functions.
(c-clear-string-fences, c-restore-string-fences): Surround the functions'
innards with c-save-buffer-state to prevent text property changes causing
change functions to be called.
(c-before-change, c-after-change, c-font-lock-fontify-region): Replace the
explicit calls to c-restore-string-fences and c-clear-string-fences with
invocations of the new macro c-with-string-fences.

* lisp/progmodes/cc-awk.el (c-awk-extend-and-syntax-tablify-region)
(c-awk-end-of-defun)
* lisp/progmodes/cc-cmds.el (c-show-syntactic-information)
(c-electric-backspace, c-hungry-delete-backwards, c-electric-delete-forward)
(c-hungry-delete-forward, c-electric-pound, c-electric-brace)
(c-electric-slash, c-electric-star, c-electric-semi&comma, c-electric-colon)
(c-electric-lt-gt, c-electric-paren, c-beginning-of-defun, c-end-of-defun)
(c-display-defun-name, c-mark-function, c-beginning-of-statement)
(c-end-of-statement, c-indent-command, c-indent-exp, c-indent-defun)
(c-indent-line-or-region, c-fill-paragraph, c-indent-new-comment-line)
(c-context-line-break)
* lisp/progmodes/cc-guess.el (c-guess-region-no-install): These are all
"boundary" functions to CC Mode.  Surround each by c-with-string-fences.
2022-05-22 17:00:34 +00:00
kobarity
45694a2594 Don't font-lock invalid invalid class/function names
* lisp/progmodes/python.el (python-font-lock-keywords-level-1):
Don't font-lock invalid invalid class/function names (bug#55573).
2022-05-22 18:54:23 +02:00
Stefan Monnier
91bc24c467 mode-local: Deprecate buffer-local overrides
* lisp/cedet/mode-local.el (mode-local-bind): Make all args mandatory.
Deprecate the use of a nil `mode` argument.
2022-05-22 12:52:42 -04:00
Stefan Monnier
d2e0d1452b semantic-install-function-overrides: Declare obsolete
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
Declare obsolete.
2022-05-22 12:22:40 -04:00
Stefan Monnier
3294ad44eb wisent.el: Prefer define-mode-local-override
* lisp/cedet/semantic/wisent.el (wisent--parse-stream): Rename from
`wisent-parse-stream` and mark the old name obsolete.
(semantic-parse-stream): Override with `define-mode-local-override`.

* lisp/cedet/semantic/wisent/grammar.el
(semantic-grammar-setupcode-builder): Don't override
`semantic-parse-stream` manually here via
`semantic-install-function-overrides`.

* lisp/cedet/semantic/grm-wy-boot.el: Refresh.
2022-05-22 12:21:23 -04:00
Stefan Monnier
a1a6e6c5c4 wisent/grammar.el: Prefer define-mode-local-override
* lisp/cedet/semantic/wisent/grammar.el
(semantic-grammar-parsetable-builder, semantic-grammar-setupcode-builder):
Override with `define-mode-local-override`.
(wisent-grammar-mode): Don't override them with
`semantic-install-function-overrides`.
2022-05-22 12:17:45 -04:00
Stefan Monnier
2ca4925d2b cedet/html.el: Prefer define-mode-local-override
* lisp/cedet/semantic/html.el (semantic-tag-components): Override via
`define-mode-local-override`.
(semantic-default-html-setup): Don't override via
`semantic-install-function-overrides`.
2022-05-22 12:10:47 -04:00
Stefan Monnier
35afd1f246 bovine/grammar.el: Prefer define-mode-local-override
* lisp/cedet/semantic/bovine/grammar.el
(semantic-grammar-parsetable-builder, semantic-grammar-setupcode-builder):
Override with `define-mode-local-override`.
(bovine-grammar-mode): Don't override them with
`semantic-install-function-overrides`.
2022-05-22 11:22:29 -04:00
Stefan Monnier
f166e2dfc0 cedet/texi.el: prefer define-mode-local-override
* lisp/cedet/semantic/texi.el (semantic-parse-region)
(semantic-parse-changes): Override with `define-mode-local-override`.
(semantic-default-texi-setup): Don't override them with
`semantic-install-function-overrides`.
2022-05-22 11:13:27 -04:00
Stefan Monnier
42076e6986 comp.el: Cosmetic changes
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Tweak code.
(comp-run-async-workers): Don't set `buffer-read-only` directly.
(native--compile-async): Fix misuse of "path".
2022-05-22 10:48:58 -04:00
Stefan Monnier
cc878319f9 Run minibuffer-exit-hook in the right buffer
* src/minibuf.c (run_exit_minibuf_hook): Take the minibuffer as arg
and run the hook in that buffer.
(read_minibuf): Adjust accordingly.
2022-05-22 10:39:02 -04:00
Michael Albinus
5088ebc8eb * lisp/window.el (display-buffer-avoid-small-windows): Fix :type. 2022-05-22 14:48:30 +02:00
Po Lu
4c1af80322 Clean up Haiku code
* src/haiku_support.cc (movement_locker, class EmacsWindow)
(MouseMoved): Delete `movement_locker' and associated hack,
since it's superseeded by some code in haiku_read_socket.
(key_map, key_chars, dpy_color_space, popup_track_message)
(alert_popup_value, grab_view, grab_view_locker)
(drag_and_drop_in_progress): Write comments and fix
initializers.

* src/haikuterm.c (haiku_read_socket): Update comment.
2022-05-22 12:23:51 +00:00
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