Commit graph

157524 commits

Author SHA1 Message Date
Stefan Kangas
feb88fa8ab Bind C-c C-c and C-c C-k in recentf-dialog-mode
* lisp/recentf.el (recentf-dialog-mode-map): Prefer defvar-keymap.
Bind `C-c C-c' and `C-c C-k' to confirm/cancel the dialog.
(recentf-cancel-dialog, recentf-edit-list-validate): Add
interactive mode tags for 'recentf-dialog-mode'.
(recentf-dialog-mode): Mark as non-interactive.
(recentf-edit-list): Display key binding.
2022-06-23 01:18:57 +02:00
Michael Albinus
ec1fffdeca Fix dnd-tests-open-remote-url on EMBA
* test/lisp/dnd-tests.el (dnd-tests-open-remote-url): Check for
ftp client.
2022-06-22 17:47:39 +02:00
Mattias Engdegård
47374d4416 duplicate-line: fix optional argument and add test (bug#46621)
The test assumes that the current semantics are intended and desired,
which may or may not be true, but it's better than not having any at
all.

* lisp/misc.el (duplicate-line): Don't crash if called with no argument.
* test/lisp/misc-tests.el (misc--duplicate-line): New test.
2022-06-22 16:03:46 +02:00
Richard Hansen
55c2102560 bindat (strz): Null terminate fixed-length strings if there is room
* lisp/emacs-lisp/bindat.el (bindat--pack-strz): For fixed-length strz
fields, explicitly write a null terminator after the packed string if
there is room (bug#56048).
* doc/lispref/processes.texi (Bindat Types): Update documentation.
* test/lisp/emacs-lisp/bindat-tests.el (bindat-test--str-strz-prealloc):
Update tests.
2022-06-22 16:55:40 +03:00
Richard Hansen
eff42dc0af ; bindat (strz): Move all pack logic to pack function (bug#56048)
Motivation/rationale:
  * Improve code readability.  Now `bindat--pack-strz` is used for all
    `strz` packing, not just variable-length `strz` packing.
  * Make it easier to change the behavior of fixed-length `strz`
    packing without also affecting the behavior of `str` packing.  (A
    future commit will modify `strz` to write a null terminator if
    there is room.)
2022-06-22 16:54:54 +03:00
Gerd Moellmann
5f1bd87247 Prevent GC of window referenced from EmacsScroller
* src/nsterm.m (EmacsScroller.mark, mark_nsterm): New functions.
* src/nsterm.h (EmacsScroller.mark, mark_nsterm): Declare.
* src/alloc.c (garbage_collect) [MAVE_NS]: Call mark_nsterm.
(Bug#56095)
2022-06-22 16:50:24 +03:00
Stefan Kangas
38ae6cf3ce Prefer Emacs mouse button event names to XEmacs names
* lisp/mwheel.el:
* lisp/vc/ediff-mult.el (ediff-meta-buffer-verbose-message)
(ediff-draw-dir-diffs, ediff-redraw-registry-buffer): Prefer Emacs
mouse button event names to XEmacs names.
2022-06-22 13:28:25 +02:00
Stefan Kangas
cc06be904c * lisp/bs.el (bs-mode-map): Prefer defvar-keymap. 2022-06-22 13:28:25 +02:00
Po Lu
18d412a513 Fix non-system-malloc build
* src/xterm.c (x_gc_free_ext_data_private): New function.
(x_gc_get_ext_data): Set it as the private data free function.
2022-06-22 18:37:41 +08:00
Stefan Kangas
f3c78c6ea7 Do interactive mode tagging in edmacro.el
* lisp/edmacro.el (edmacro-finish-edit, edmacro-insert-key):
Add interactive mode tag for edmacro-mode.
2022-06-22 12:14:06 +02:00
Stefan Kangas
ec9228eb81 Use short file names by default in recentf menu
* lisp/recentf.el (recentf-menu-filter): Set the default to
'recentf-show-abbreviated' to get short file names.  (Bug#56123)
2022-06-22 11:47:30 +02:00
Stefan Kangas
5b1109394c ; * lisp/edmacro.el: Minor doc fixes. 2022-06-22 10:03:16 +02:00
Sean Whitton
0301b295bb Don't drop existing escape char in eshell
* lisp/eshell/em-term.el (eshell-exec-visual): Don't drop existing
escape char.
2022-06-22 06:23:56 +02:00
Po Lu
582356c45f * src/xterm.c (x_scroll_bar_note_movement): Fix no-toolkit build. 2022-06-22 12:23:14 +08:00
Lars Ingebrigtsen
fa6d9c1e84 Mention the new Tetris user option 2022-06-22 05:25:48 +02:00
Po Lu
ff20b0192c Port x-selection-timeout to PGTK
* src/pgtkselect.c (pgtk_own_selection): Fix comment.
(wait_for_property_change, pgtk_get_foreign_selection): Respect
selection timeout.
(syms_of_pgtkselect): New variable `pgtk-selection-timeout'.
2022-06-22 10:02:09 +08:00
Po Lu
d5a3fbe7c8 Fix setting user time for mouse movement events
* src/xterm.c (x_note_mouse_movement, XTmouse_position)
(x_scroll_bar_note_movement, handle_one_xevent): Record whether
or not mouse movement was send_event before using the mouse
movement time.

* src/xterm.h (struct x_display_info): New field
`last_mouse_movement_time_send_event'.
2022-06-22 09:49:16 +08:00
Sam Steingold
6f5f2ebfb4 A trivial optimization and a formatting fix
* lisp/subr.el (internal--compiler-macro-cXXr): Re-use `head' for `n'.
Fix indentation and line length.
2022-06-21 18:41:42 -04:00
Tassilo Horn
5e40c5a3be Merge from origin/emacs-28
f3acc09377 ; Revert "Use file-in-directory-p instead of obsolete dire...
5082d74cfd ; * lisp/recentf.el: Fix typo.
3f66e2a903 * lisp/repeat.el (repeat-mode): Fix message format.
137539c125 Clarify autotype.texi text slightly
2022-06-21 21:53:57 +02:00
Lars Ingebrigtsen
de30e8c0de Fix logic in previous Tetris change
* lisp/play/tetris.el (tetris-new-shape): Fix logic in previous
change.
2022-06-21 21:52:11 +02:00
Timothee Denizou
ca6c8fc72c Allow different randomization of shapes in Tetris
* lisp/play/tetris.el (tetris-allow-repetitions): New user option.
(tetris--shuffle, tetris--seven-bag): New functions.
(tetris-new-shape): Use the option.

* Added 7 bag randomizer for tetris
A piece is selected from the bag and removed each time we want a piece
When the bag is empty, refill the bag with the seven piece and shuffle it

Copyright-paperwork-exempt: yes
2022-06-21 21:50:15 +02:00
Tassilo Horn
f3acc09377 ; Revert "Use file-in-directory-p instead of obsolete dired-in-this-tree-p"
Fixes bug#56126.

This reverts commit b425966b07.
2022-06-21 21:21:12 +02:00
Lars Ingebrigtsen
3833ce16af Fix shr--set-target-ids test for empty buffer
* lisp/net/shr.el (shr--set-target-ids): Fix the check for an
empty buffer (which may be narrowed).
2022-06-21 20:51:46 +02:00
Michael Heerdegen
406fd97921 Fix autoload generation of iter-defun forms
This fixes Bug#54648.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Add `iter-defun' and `cl-iter-defun' to the list of "complex cases"
that are macro-expanded and recursed on.
2022-06-21 19:50:10 +02:00
Philipp Stephani
dbbf38d43f Document and test 'no-byte-compile' behavior.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Document behavior
if 'no-byte-compile' is set.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-compile-file/no-byte-compile): New unit test.
* test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el: New test
file.
2022-06-21 19:11:05 +02:00
Lars Ingebrigtsen
16d48cf8a0 Fix too-long ediff defface doc strings
* lisp/vc/ediff-init.el (ediff-fine-diff-Ancestor):
(ediff-even-diff-Ancestor):
(ediff-odd-diff-Ancestor): Fix too-long doc strings.
2022-06-21 19:08:25 +02:00
Lars Ingebrigtsen
acf9dcdc51 Check defface doc strings
* lisp/emacs-lisp/bytecomp.el
(byte-compile-file-form-custom-declare-variable): We already warn
about missing groups from byte-compile-normal-call, so this would
be a double warning.
(custom-declare-face)
(byte-compile-file-form-custom-declare-face): Add doc string
checking for defface.
2022-06-21 19:08:25 +02:00
Lars Ingebrigtsen
1883e532d1 Untabify doc strings before displaying in Customize
* lisp/cus-edit.el (custom-variable-documentation): Untabify the
doc string since we'll be indenting it when displaying it (which
makes the tabs not align properly).
2022-06-21 19:08:25 +02:00
Manuel Giraud
0008003c3e Two typos captured on OpenBSD/clang
; * src/kqueue.c (kqueue_compare_dir_list): Indent typo.
; * src/sysdep.c (system_process_attributes): Unused variable on OpenBSD.
2022-06-21 18:46:53 +03:00
Po Lu
a4dcc8b9a9 Fix recent change to xlwmenu.c
* lwlib/xlwmenu.c (ungrab_all): Ungrab keyboard if it was
grabbed.  This handles `lucid--menu-grab-keyboard' changing
while the menu is open.

(XlwMenuDestroy):
(pop_up_menu): Record if the keyboard was grabbed.
2022-06-21 22:14:49 +08:00
Po Lu
be35c92c90 Rewrite PGTK selection code from scratch
* src/frame.c (delete_frame): Clear selections and swallow
special events.

* src/keyboard.c (kbd_buffer_get_event, process_special_events):
Also handle selection events on PGTK.

* src/keyboard.h (union buffered_input_event): Include selection
events on PGTK.

* src/pgtkselect.c (symbol_to_gtk_clipboard, LOCAL_SELECTION):
New functions and macros.
(selection_type_to_quarks, get_func, clear_func): Delete
functions.
(pgtk_selection_init, pgtk_selection_lost):
(pgtk_selection_usable): New functions.
(Fpgtk_own_selection_internal, Fpgtk_disown_selection_internal)
(Fpgtk_selection_exists_p, Fpgtk_selection_owner_p)
(Fpgtk_get_selection_internal): Complete rewrite.
(syms_of_pgtkselect): Update defsyms and add more hooks.

* src/pgtkselect.h: Delete file.

* src/pgtkterm.c (evq_enqueue): Set last user time based on the
event.
(pgtk_any_window_to_frame, button_event): Fix coding style.
(pgtk_set_event_handler): Add selection events.
(pgtk_find_selection_owner, pgtk_selection_event): New
functions.
(pgtk_term_init): Remove call to `pgtk_selection_init'.

* src/pgtkterm.h (struct pgtk_display_info): New field
`display'.
(enum selection_input_event): New struct.  New macros for
accessing its fields.
2022-06-21 22:05:21 +08:00
Eli Zaretskii
b1af8c2c00 ; * doc/lispref/os.texi (Batch Mode): Fix typo and wording. 2022-06-21 16:21:53 +03:00
Lars Ingebrigtsen
49137311a4 Fix previous -batch change for gc-cons-percentage
* src/emacs.c (main): Reset the default for gc-cons-percentage in
interactive Emacs.
2022-06-21 15:11:28 +02:00
Lars Ingebrigtsen
73a384a986 Increase gc-cons-percentage in -batch Emacs
* doc/lispref/os.texi (Batch Mode): Document it.

* src/emacs.c (main): Use a gc-cons-percentage of 1.0 in
noninteractive Emacsen.
2022-06-21 15:04:38 +02:00
Michael Albinus
0939465300 Tramp code cleanup
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Improve handling of "process-name" and "process-buffer" connection
properties.
2022-06-21 14:59:46 +02:00
Stefan Kangas
32906819ad Allow shortening filenames in recentf-mode menu
* lisp/recentf.el (recentf-show-abbreviated): New function.
(recentf--filter-names): New helper function.
(recentf-show-basenames): Use above new helper function.
(recentf-menu-filter): Allow setting user option to new value
'recentf-show-abbreviated'.
2022-06-21 14:38:45 +02:00
Eli Zaretskii
3518ab51d1 ; * lwlib/xlwmenu.c (ungrab_all): Fix typo. 2022-06-21 15:35:22 +03:00
Stefan Kangas
5082d74cfd ; * lisp/recentf.el: Fix typo. 2022-06-21 14:20:22 +02:00
Stefan Kangas
3f66e2a903 * lisp/repeat.el (repeat-mode): Fix message format. 2022-06-21 13:57:30 +02:00
kobarity
3491c7a322 Fix nested defuns handling in `python-nav-beginning-of-defun'
* lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix
handling of nested defuns (bug#56105).
2022-06-21 13:37:08 +02:00
Lars Ingebrigtsen
a5387dec4e Fix previous describe-key change
* lisp/help.el (describe-function-orig-buffer): Ensure we bind
dynamically.
2022-06-21 13:34:54 +02:00
Lars Ingebrigtsen
ef03c8852d Make describe-key do doc string command key substitution again
* lisp/help.el (describe-key): Do doc string command key
substitution (bug#56106).
2022-06-21 13:33:02 +02:00
Lars Ingebrigtsen
7934bad23b Fix fontification in describe-key
* lisp/help.el (describe-key): Use insert instead of princ so that
text properties on the key descriptions survive.
2022-06-21 13:25:19 +02:00
Kevin Brubeck Unhammer
97950f2bc4 Speed up mail-extr in some configurations
* lisp/mail/mail-extr.el (mail-extract-address-components):
(mail-extract-address-components): The buffer is already in
fundamental-mode, so don't re-enable it (bug#56113).
2022-06-21 13:02:05 +02:00
Earl Hyatt
137539c125 Clarify autotype.texi text slightly
* doc/misc/autotype.texi (Autoinserting): Make text slightly
clearer (bug#56118).
2022-06-21 12:52:36 +02:00
Lars Ingebrigtsen
3d4b389f32 Rename recently-introduced dired-omit-line-regexp user option
* lisp/dired-x.el (dired-omit-lines, dired-omit-mode): Rename
dired-omit-line-regexp to dired-omit-lines for consistency.
2022-06-21 12:44:00 +02:00
Lars Ingebrigtsen
649b43d20c Make Lucid menus work from the keyboard also when uninstalled
* lwlib/xlwmenu.c (ungrab_all, pop_up_menu): Use it.

* src/keyboard.c (syms_of_keyboard): New variable (bug#46990).
2022-06-21 12:15:11 +02:00
Po Lu
8cf3c3203b Allow toggling antialiasing inside the Haiku font dialog
* src/haiku_support.cc (struct font_selection_dialog_message):
New field `disable_antialias'.
(MessageReceived): Handle new message SET_DISABLE_ANTIALIASING.
(class DualLayoutView): Rename to `TripleLayoutView'.
(class TripleLayoutView): Rename from `DualLayoutView'.
(MinSize): Update computations for three views.

(class EmacsFontSelectionDialog, UpdatePreview)
(EmacsFontSelectionDialog): Add an antialiasing checkbox to
control antialiasing.
(be_select_font): New arguments `initial_antialias' and
`disable_antialias'.

* src/haiku_support.h: Update prototypes.

* src/haikufont.c (haikufont_pattern_from_object): Set
FSPEC_ANTIALIAS.
(Fx_select_font): Update accordingly.
2022-06-21 05:04:47 +00:00
Stefan Kangas
c175984e2c Merge from origin/emacs-28
2eb738f2b8 Support builds configured with a separate --bindir
cf4c204df8 * doc/misc/eww.texi (Overview, Basics): Fix typos.
2022-06-21 06:30:25 +02:00
Po Lu
1d681a5700 Add test for bug#56078 fix
* test/lisp/dnd-tests.el (dnd-tests-open-remote-url): New test.
2022-06-21 10:12:00 +08:00