]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; * lisp/edmacro.el: Minor doc fixes.
Stefan Kangas [Wed, 22 Jun 2022 08:03:16 +0000 (10:03 +0200)]
; * lisp/edmacro.el: Minor doc fixes.

2 years agoDon't drop existing escape char in eshell
Sean Whitton [Wed, 22 Jun 2022 04:23:24 +0000 (06:23 +0200)]
Don't drop existing escape char in eshell

* lisp/eshell/em-term.el (eshell-exec-visual): Don't drop existing
escape char.

2 years ago* src/xterm.c (x_scroll_bar_note_movement): Fix no-toolkit build.
Po Lu [Wed, 22 Jun 2022 04:23:00 +0000 (12:23 +0800)]
* src/xterm.c (x_scroll_bar_note_movement): Fix no-toolkit build.

2 years agoMention the new Tetris user option
Lars Ingebrigtsen [Wed, 22 Jun 2022 03:25:48 +0000 (05:25 +0200)]
Mention the new Tetris user option

2 years agoPort x-selection-timeout to PGTK
Po Lu [Wed, 22 Jun 2022 02:02:09 +0000 (10:02 +0800)]
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'.

2 years agoFix setting user time for mouse movement events
Po Lu [Wed, 22 Jun 2022 01:49:16 +0000 (09:49 +0800)]
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'.

2 years agoA trivial optimization and a formatting fix
Sam Steingold [Tue, 21 Jun 2022 22:41:13 +0000 (18:41 -0400)]
A trivial optimization and a formatting fix

* lisp/subr.el (internal--compiler-macro-cXXr): Re-use `head' for `n'.
Fix indentation and line length.

2 years agoMerge from origin/emacs-28
Tassilo Horn [Tue, 21 Jun 2022 19:53:57 +0000 (21:53 +0200)]
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

2 years agoFix logic in previous Tetris change
Lars Ingebrigtsen [Tue, 21 Jun 2022 19:52:11 +0000 (21:52 +0200)]
Fix logic in previous Tetris change

* lisp/play/tetris.el (tetris-new-shape): Fix logic in previous
change.

2 years agoAllow different randomization of shapes in Tetris
Timothee Denizou [Tue, 21 Jun 2022 19:50:15 +0000 (21:50 +0200)]
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

2 years ago; Revert "Use file-in-directory-p instead of obsolete dired-in-this-tree-p"
Tassilo Horn [Tue, 21 Jun 2022 19:21:12 +0000 (21:21 +0200)]
; Revert "Use file-in-directory-p instead of obsolete dired-in-this-tree-p"

Fixes bug#56126.

This reverts commit b425966b072792b7b22b845b5f2e39ff4f60b5ab.

2 years agoFix shr--set-target-ids test for empty buffer
Lars Ingebrigtsen [Tue, 21 Jun 2022 18:51:33 +0000 (20:51 +0200)]
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).

2 years agoFix autoload generation of iter-defun forms
Michael Heerdegen [Fri, 1 Apr 2022 22:56:09 +0000 (00:56 +0200)]
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.

2 years agoDocument and test 'no-byte-compile' behavior.
Philipp Stephani [Tue, 21 Jun 2022 17:10:14 +0000 (19:10 +0200)]
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.

2 years agoFix too-long ediff defface doc strings
Lars Ingebrigtsen [Tue, 21 Jun 2022 17:08:16 +0000 (19:08 +0200)]
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.

2 years agoCheck defface doc strings
Lars Ingebrigtsen [Tue, 21 Jun 2022 17:07:46 +0000 (19:07 +0200)]
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.

2 years agoUntabify doc strings before displaying in Customize
Lars Ingebrigtsen [Tue, 21 Jun 2022 16:45:20 +0000 (18:45 +0200)]
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).

2 years agoTwo typos captured on OpenBSD/clang
Manuel Giraud [Tue, 21 Jun 2022 14:52:52 +0000 (16:52 +0200)]
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.

2 years agoFix recent change to xlwmenu.c
Po Lu [Tue, 21 Jun 2022 14:14:49 +0000 (22:14 +0800)]
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.

2 years agoRewrite PGTK selection code from scratch
Po Lu [Tue, 21 Jun 2022 14:03:42 +0000 (22:03 +0800)]
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.

2 years ago; * doc/lispref/os.texi (Batch Mode): Fix typo and wording.
Eli Zaretskii [Tue, 21 Jun 2022 13:21:53 +0000 (16:21 +0300)]
; * doc/lispref/os.texi (Batch Mode): Fix typo and wording.

2 years agoFix previous -batch change for gc-cons-percentage
Lars Ingebrigtsen [Tue, 21 Jun 2022 13:11:28 +0000 (15:11 +0200)]
Fix previous -batch change for gc-cons-percentage

* src/emacs.c (main): Reset the default for gc-cons-percentage in
interactive Emacs.

2 years agoIncrease gc-cons-percentage in -batch Emacs
Lars Ingebrigtsen [Tue, 21 Jun 2022 13:04:27 +0000 (15:04 +0200)]
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.

2 years agoTramp code cleanup
Michael Albinus [Tue, 21 Jun 2022 12:59:46 +0000 (14:59 +0200)]
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.

2 years agoAllow shortening filenames in recentf-mode menu
Stefan Kangas [Tue, 21 Jun 2022 12:27:51 +0000 (14:27 +0200)]
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'.

2 years ago; * lwlib/xlwmenu.c (ungrab_all): Fix typo.
Eli Zaretskii [Tue, 21 Jun 2022 12:35:22 +0000 (15:35 +0300)]
; * lwlib/xlwmenu.c (ungrab_all): Fix typo.

2 years ago; * lisp/recentf.el: Fix typo.
Stefan Kangas [Tue, 21 Jun 2022 12:20:22 +0000 (14:20 +0200)]
; * lisp/recentf.el: Fix typo.

2 years ago* lisp/repeat.el (repeat-mode): Fix message format.
Stefan Kangas [Tue, 21 Jun 2022 11:56:58 +0000 (13:56 +0200)]
* lisp/repeat.el (repeat-mode): Fix message format.

2 years agoFix nested defuns handling in `python-nav-beginning-of-defun'
kobarity [Tue, 21 Jun 2022 11:37:08 +0000 (13:37 +0200)]
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).

2 years agoFix previous describe-key change
Lars Ingebrigtsen [Tue, 21 Jun 2022 11:34:54 +0000 (13:34 +0200)]
Fix previous describe-key change

* lisp/help.el (describe-function-orig-buffer): Ensure we bind
dynamically.

2 years agoMake describe-key do doc string command key substitution again
Lars Ingebrigtsen [Tue, 21 Jun 2022 11:33:02 +0000 (13:33 +0200)]
Make describe-key do doc string command key substitution again

* lisp/help.el (describe-key): Do doc string command key
substitution (bug#56106).

2 years agoFix fontification in describe-key
Lars Ingebrigtsen [Tue, 21 Jun 2022 11:25:19 +0000 (13:25 +0200)]
Fix fontification in describe-key

* lisp/help.el (describe-key): Use insert instead of princ so that
text properties on the key descriptions survive.

2 years agoSpeed up mail-extr in some configurations
Kevin Brubeck Unhammer [Tue, 21 Jun 2022 11:02:05 +0000 (13:02 +0200)]
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).

2 years agoClarify autotype.texi text slightly
Earl Hyatt [Tue, 21 Jun 2022 10:52:28 +0000 (12:52 +0200)]
Clarify autotype.texi text slightly

* doc/misc/autotype.texi (Autoinserting): Make text slightly
clearer (bug#56118).

2 years agoRename recently-introduced dired-omit-line-regexp user option
Lars Ingebrigtsen [Tue, 21 Jun 2022 10:44:00 +0000 (12:44 +0200)]
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.

2 years agoMake Lucid menus work from the keyboard also when uninstalled
Lars Ingebrigtsen [Tue, 21 Jun 2022 10:15:11 +0000 (12:15 +0200)]
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).

2 years agoAllow toggling antialiasing inside the Haiku font dialog
Po Lu [Tue, 21 Jun 2022 05:04:24 +0000 (05:04 +0000)]
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.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 21 Jun 2022 04:30:25 +0000 (06:30 +0200)]
Merge from origin/emacs-28

2eb738f2b8 Support builds configured with a separate --bindir
cf4c204df8 * doc/misc/eww.texi (Overview, Basics): Fix typos.

2 years agoAdd test for bug#56078 fix
Po Lu [Tue, 21 Jun 2022 02:12:00 +0000 (10:12 +0800)]
Add test for bug#56078 fix

* test/lisp/dnd-tests.el (dnd-tests-open-remote-url): New test.

2 years agoRemove selection requests on the keyboard buffer when closing display
Po Lu [Tue, 21 Jun 2022 01:52:47 +0000 (09:52 +0800)]
Remove selection requests on the keyboard buffer when closing display

* src/xterm.c (X_NEXT_KBD_EVENT): New macro.
(x_defer_selection_requests): Set input_pending if the kbd
buffer was modified.
(x_delete_selection_requests): New function.
(x_delete_display): Call that.  Bug found when a display died
while the clipboard manager was sending an unreasonably high
number of requests.

2 years agoMove selection delayed message to a better location
Po Lu [Tue, 21 Jun 2022 01:35:07 +0000 (09:35 +0800)]
Move selection delayed message to a better location

* lisp/term/x-win.el (gui-backend-get-selection): Remove
`with-delayed-message' here.
* src/xselect.c (x_display_selection_waiting_message)
(x_cancel_atimer): New functions.
(x_get_foreign_selection): Add an atimer that displays the
message after a while.

2 years ago* lisp/edmacro.el: Add missing (require 'seq).
Sean Whitton [Tue, 21 Jun 2022 00:43:27 +0000 (17:43 -0700)]
* lisp/edmacro.el: Add missing (require 'seq).

2 years agoterm-set-escape-char: Remove old binding from term-raw-escape-map
Sean Whitton [Mon, 20 Jun 2022 21:33:51 +0000 (14:33 -0700)]
term-set-escape-char: Remove old binding from term-raw-escape-map

* lisp/term.el (term-set-escape-char): When replacing the escape char,
remove the binding of the old escape char in term-raw-escape-map.

2 years agoFix potential (goto-char nil) in byte-compile-warning-prefix
Alan Mackenzie [Mon, 20 Jun 2022 18:31:05 +0000 (18:31 +0000)]
Fix potential (goto-char nil) in byte-compile-warning-prefix

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): Replace a wrong
'or' form involving OFFSET with simply OFFSET.  This prevents OFFSET from
possibly being nil in the first branch of the containing `if' form.

2 years agoSupport builds configured with a separate --bindir
Eli Zaretskii [Mon, 20 Jun 2022 16:04:06 +0000 (19:04 +0300)]
Support builds configured with a separate --bindir

* src/emacs.c (load_pdump): Don't overwrite the leading
directories of the Emacs executable just because the pdumper file
was not found in the expected directory relative to the binary.
This is needed to support builds with a separate --bindir
configure-time option and native-compilation.  (Bug#55741)

2 years agoIssue a message if getting a selection takes a long time
Lars Ingebrigtsen [Mon, 20 Jun 2022 15:34:33 +0000 (17:34 +0200)]
Issue a message if getting a selection takes a long time

* lisp/term/x-win.el (gui-backend-get-selection): If getting the
selection takes a long time, issue a message after one second
(bug#46935).

2 years agoAdapt url-tramp-tests
Michael Albinus [Mon, 20 Jun 2022 13:45:46 +0000 (15:45 +0200)]
Adapt url-tramp-tests

* test/lisp/url/url-tramp-tests.el (url-tramp-test-convert-url-to-tramp)
(url-tramp-test-convert-tramp-to-url): Adapt tests.

2 years ago; * src/process.c (wait_reading_process_output): Fix typo.
Eli Zaretskii [Mon, 20 Jun 2022 13:08:46 +0000 (16:08 +0300)]
; * src/process.c (wait_reading_process_output): Fix typo.

2 years ago; Fix recent change of documentation of face-remap
Eli Zaretskii [Mon, 20 Jun 2022 13:05:05 +0000 (16:05 +0300)]
; Fix recent change of documentation of face-remap

* lisp/face-remap.el (text-scale-adjust):
* doc/emacs/display.texi (Text Scale): Fix wording of recent
changes to documentation.

2 years agoFix x-selection-timeout if some keyboard input arrives while waiting
Po Lu [Mon, 20 Jun 2022 12:56:49 +0000 (20:56 +0800)]
Fix x-selection-timeout if some keyboard input arrives while waiting

* src/process.c (wait_reading_process_output): Don't allow
skipping calls to select if detect_input_pending when just
waiting for a cell.  (bug#46935)

* src/xselect.c (x_get_foreign_selection): Add more debugging
code.

2 years ago; * lisp/help-mode.el (help-xref-button): Doc fix.
Eli Zaretskii [Mon, 20 Jun 2022 12:49:11 +0000 (15:49 +0300)]
; * lisp/help-mode.el (help-xref-button): Doc fix.

2 years ago; * lisp/image.el (find-image): Fix typos.
Eli Zaretskii [Mon, 20 Jun 2022 12:42:48 +0000 (15:42 +0300)]
; * lisp/image.el (find-image): Fix typos.

2 years agoPrefer defvar-keymap in hi-lock.el
Stefan Kangas [Mon, 20 Jun 2022 11:23:24 +0000 (13:23 +0200)]
Prefer defvar-keymap in hi-lock.el

* lisp/hi-lock.el: Prefer keymap-set in documentation.
(hi-lock-map): Prefer defvar-keymap.

2 years agoFix ns-reg-to-script definition
Po Lu [Mon, 20 Jun 2022 11:11:38 +0000 (19:11 +0800)]
Fix ns-reg-to-script definition

* src/nsfont.m (syms_of_nsfont): Fix definition.

2 years agoFix running temacs on Haiku
Po Lu [Mon, 20 Jun 2022 11:02:14 +0000 (11:02 +0000)]
Fix running temacs on Haiku

* src/emacs.c (main): Run init_haiku_select at the right place.

2 years agoFix initialization of Haiku font driver
Po Lu [Mon, 20 Jun 2022 10:57:17 +0000 (10:57 +0000)]
Fix initialization of Haiku font driver

* src/font.c (register_font_driver): Fix comment.

* src/haikufont.c (haikufont_booleans): New list.
(haikufont_filter_properties): New function.
(haikufont_driver): Register new hook.
(syms_of_haikufont_for_pdumper): Register font driver globally.
(syms_of_haikufont): Call it in a pdumper hook.

2 years agoFix problems with Tramp FTP and URL handler mode
Michael Albinus [Mon, 20 Jun 2022 10:47:27 +0000 (12:47 +0200)]
Fix problems with Tramp FTP and URL handler mode

* lisp/net/tramp-archive.el (tramp-archive-run-real-handler):
Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Prevent invocation
of `tramp-archive-file-name-handler'.  (Bug#56078)

* lisp/url/url-tramp.el (url-tramp-convert-url-to-tramp)
(url-tramp-convert-tramp-to-url): Make them more robust.

2 years agoIgnore pinch events from the wrong window
Po Lu [Mon, 20 Jun 2022 10:13:51 +0000 (18:13 +0800)]
Ignore pinch events from the wrong window

* src/xterm.c (handle_one_xevent): Use x_window_to_frame to find
frames for pinch events.

2 years agoMake images found through `find-image' be handled like `create-image'
David Ponce [Mon, 20 Jun 2022 09:39:56 +0000 (11:39 +0200)]
Make images found through `find-image' be handled like `create-image'

* lisp/image.el (find-image): Use `create-image' so that we get
auto-scaling of images (bug#40978).

2 years agoAllow using :width/:height as normal with xbm images
Lars Ingebrigtsen [Mon, 20 Jun 2022 09:18:31 +0000 (11:18 +0200)]
Allow using :width/:height as normal with xbm images

* doc/lispref/display.texi (XBM Images): Adjust the documentation.
* src/image.c (enum xbm_keyword_index): Add :data-width and
:data-height.
(xbm_format): Ditto.
(xbm_image_p): Allow passing in :width/:height for display.
(xbm_load): Use :data-width/:data-height.

2 years ago* doc/misc/eww.texi (Overview, Basics): Fix typos.
Stefan Kangas [Mon, 20 Jun 2022 09:08:08 +0000 (11:08 +0200)]
* doc/misc/eww.texi (Overview, Basics): Fix typos.

2 years agowhitespace: Redraw if indentation or line length changes
Richard Hansen [Mon, 20 Jun 2022 07:40:38 +0000 (09:40 +0200)]
whitespace: Redraw if indentation or line length changes

* lisp/whitespace.el (whitespace-color-on): Convert the indentation
matcher from a static regular expression to a function so that changes
to `indent-tabs-mode' and `tab-width' are picked up the next time
`font-lock-flush' runs.
(whitespace--indentation-matcher): The new function matcher.
(whitespace--variable-watcher): New variable watcher that calls
`font-lock-flush' if `whitespace-mode' is enabled for the buffer.
(whitespace--watched-vars): List of variables to watch.
(whitespace-unload-function): Un-watch the variables. (bug#56103).

2 years agoRespect `:antialias' on Haiku
Po Lu [Mon, 20 Jun 2022 02:16:34 +0000 (02:16 +0000)]
Respect `:antialias' on Haiku

* src/haiku_font_support.cc (BFont_find): Pass through
FSPEC_ANTIALIAS.
(be_set_font_antialiasing): New function.

* src/haiku_support.h (enum haiku_font_specification): New enum
FSPEC_ANTIALIAS.
(struct haiku_font_pattern): New field `use_antialiasing'.

* src/haikufont.c (haikufont_pattern_to_entity)
(haikufont_spec_or_entity_to_pattern, haikufont_open): Respect
antialiasing.
(syms_of_haikufont): New defsym `:indices'.

2 years agoDon't generate superfluous wheel events during drag and drop
Po Lu [Mon, 20 Jun 2022 01:17:21 +0000 (09:17 +0800)]
Don't generate superfluous wheel events during drag and drop

* src/xterm.c (handle_one_xevent): Only set user time and don't
create wheel events if DND is in progress.

2 years agoFix earlier change in xfaces.c for antialiasing in the mode line
Po Lu [Mon, 20 Jun 2022 01:16:41 +0000 (09:16 +0800)]
Fix earlier change in xfaces.c for antialiasing in the mode line

* src/xfaces.c (realize_gui_face): Don't put QCantialias in
empty spec if it doesn't exist in the original.

2 years agoxref-goto-xref: Set input focus in addition to selecting window
Miha Rihtaršič [Sun, 19 Jun 2022 13:29:59 +0000 (15:29 +0200)]
xref-goto-xref: Set input focus in addition to selecting window

* lisp/progmodes/xref.el (xref--show-location): Set input focus in
addition to selecting displayed window (Bug#55983).

2 years agoAllow removing quotes around links in *Help* buffers
Lars Ingebrigtsen [Mon, 20 Jun 2022 00:27:00 +0000 (02:27 +0200)]
Allow removing quotes around links in *Help* buffers

* doc/emacs/help.texi (Help Mode): Document it.
* lisp/help-mode.el (help-clean-buttons): New user option
(help-xref-button): Use it.

2 years agoTweak quoting in help-fns--compiler-macro
Lars Ingebrigtsen [Mon, 20 Jun 2022 00:12:06 +0000 (02:12 +0200)]
Tweak quoting in help-fns--compiler-macro

* lisp/help-fns.el (help-fns--compiler-macro): Fix quotes in help
text.

2 years agoFix bytecompiler infloop compiling infloops
Pip Cet [Sun, 19 Jun 2022 23:59:49 +0000 (01:59 +0200)]
Fix bytecompiler infloop compiling infloops

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Don't apply
optimization if we can't change anything (bug#46906).

2 years agoLet `dired-omit-mode' match lines, as well as file names
Drew Adams [Sun, 19 Jun 2022 23:49:24 +0000 (01:49 +0200)]
Let `dired-omit-mode' match lines, as well as file names

* lisp/dired-aux.el (dired-do-kill-lines): Adjust to use it.

* lisp/dired-x.el (dired-omit-line-regexp): New user option
(bug#46882).
(dired-omit-mode, dired-omit-expunge): Use the new user option.

2 years agoUpdate font scaling documentation to not talk about "face height"
Stefan Kangas [Sun, 19 Jun 2022 23:26:05 +0000 (01:26 +0200)]
Update font scaling documentation to not talk about "face height"

* lisp/play/gamegrid.el (gamegrid-init-buffer):
* lisp/mwheel.el (mouse-wheel-scroll-amount):
(mouse-wheel-text-scale):
* lisp/faces.el (set-face-attribute):
* lisp/face-remap.el (text-scale-mode-step):
(text-scale-increase):
(text-scale-adjust):
* lisp/cus-face.el (custom-face-attributes):
* doc/emacs/frames.texi (Mouse Commands):
* doc/emacs/display.texi (Text Scale): Talk about font sized instead
of "face height" (bug#46853).

2 years agoAllow appending to the kill ring with mouse selections
Lars Ingebrigtsen [Sun, 19 Jun 2022 22:59:14 +0000 (00:59 +0200)]
Allow appending to the kill ring with mouse selections

* lisp/bindings.el (ignore-preserving-kill-region): New function.
(global-map): Use it.

* lisp/mouse.el (mouse-set-region, mouse-drag-region)
(mouse-drag-track): Allow appending to kill ring with mouse
selections (bug#32747).

2 years agoFix last change in tramp-adb-handle-make-process
Michael Albinus [Sun, 19 Jun 2022 19:07:29 +0000 (21:07 +0200)]
Fix last change in tramp-adb-handle-make-process

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Fix process buffer management.

2 years agoFix starting eshell with missing/invalid modules defined
Stefan Kangas [Sun, 19 Jun 2022 14:35:08 +0000 (16:35 +0200)]
Fix starting eshell with missing/invalid modules defined

* lisp/eshell/esh-mode.el (eshell-mode): Warn instead of failing to
start when 'eshell-modules-list' has invalid entries.  (Bug#54976)

2 years agoMake describe-repeat-maps fontify key bindings
Lars Ingebrigtsen [Sun, 19 Jun 2022 14:21:14 +0000 (16:21 +0200)]
Make describe-repeat-maps fontify key bindings

* lisp/repeat.el (describe-repeat-maps): Fontify key bindings as
key bindings.

2 years agoMore conservative fix for bug#37473
Po Lu [Sun, 19 Jun 2022 13:57:11 +0000 (21:57 +0800)]
More conservative fix for bug#37473

* src/xfaces.c (realize_gui_face): Add more conservative fix,
since the last change makes C-x C-+ lead to weight weirdness on
my machine.

2 years agoMake M-S-x output better in mode that have bindings for `undefined'
Lars Ingebrigtsen [Sun, 19 Jun 2022 13:47:45 +0000 (15:47 +0200)]
Make M-S-x output better in mode that have bindings for `undefined'

* lisp/simple.el (command-completion-using-modes-p): Speed up case
when there's no command modes.
(execute-extended-command-for-buffer): Make M-S-x output better
(bug#46665).

2 years agoRecognize \' as a quoted quote in MySQL
Lars Ingebrigtsen [Sun, 19 Jun 2022 13:31:04 +0000 (15:31 +0200)]
Recognize \' as a quoted quote in MySQL

* lisp/progmodes/sql.el (sql-mode): Recognize \' as a quoted quote
in MySQL (bug#38302).

2 years agoDon't handle reverseVideo X resource specially
Lars Ingebrigtsen [Sun, 19 Jun 2022 13:29:21 +0000 (15:29 +0200)]
Don't handle reverseVideo X resource specially

* lisp/term/x-win.el (window-system-initialization): Don't handle
reverseVideo specially (bug#32921).

2 years agoSmall fix in font-lock-extend-region-multiline
Sébastien Miquel [Sun, 19 Jun 2022 13:12:44 +0000 (15:12 +0200)]
Small fix in font-lock-extend-region-multiline

* lisp/font-lock.el (font-lock-extend-region-multiline): Do not
extend the region if `font-lock-multiline' starts at
`font-lock-end' (bug#46558).

2 years agoDon't lose antialiasing info when hitting `C-x C-+'
Lars Ingebrigtsen [Sun, 19 Jun 2022 13:02:01 +0000 (15:02 +0200)]
Don't lose antialiasing info when hitting `C-x C-+'

* src/xfaces.c (realize_gui_face): Don't lose antialiasing info
when hitting `C-x C-+' (bug#37473).

2 years agoFix setting last user time during drag-and-drop
Po Lu [Sun, 19 Jun 2022 12:56:46 +0000 (20:56 +0800)]
Fix setting last user time during drag-and-drop

* src/xterm.c (handle_one_xevent): Set the last user time if a
button press happens during drag and drop.  Mysterious problems
were other seen with sending selections to a clipboard
immediately afterwards on Irix 6.5.

2 years agoAdd rudimentary font-locking to edmacro-mode
Stefan Kangas [Sun, 19 Jun 2022 11:16:19 +0000 (13:16 +0200)]
Add rudimentary font-locking to edmacro-mode

* lisp/edmacro.el (edmacro-label): New face.
(edmacro-mode-font-lock-keywords): New variable.
(edit-kbd-macro): Use font-lock in 'edmacro-mode'.  Minor
improvement to command substitution.

2 years ago* lisp/obsolete/eieio-compat.el: Add missing Obsolete-since line.
Stefan Kangas [Sun, 19 Jun 2022 01:36:45 +0000 (03:36 +0200)]
* lisp/obsolete/eieio-compat.el: Add missing Obsolete-since line.

2 years agoPrefer defvar-keymap in kmacro.el
Stefan Kangas [Sun, 19 Jun 2022 01:29:04 +0000 (03:29 +0200)]
Prefer defvar-keymap in kmacro.el

* lisp/kmacro.el (kmacro-keymap, kmacro-step-edit-map): Prefer
defvar-keymap.

2 years agoFix edebug parsing of .,
Lars Ingebrigtsen [Sun, 19 Jun 2022 12:25:37 +0000 (14:25 +0200)]
Fix edebug parsing of .,

* lisp/emacs-lisp/edebug.el (edebug-next-token-class): Parse .,
correctly (bug#37653).

2 years agoTune when to show "Quick Help" in Ediff mode-line
Michael Heerdegen [Tue, 14 Jun 2022 13:09:31 +0000 (15:09 +0200)]
Tune when to show "Quick Help" in Ediff mode-line

* lisp/vc/ediff-wind.el (ediff-refresh-mode-lines): Decide whether to
display "Quick Help" in the mode-line based on the value of
`ediff-use-long-help-message' instead of checking
`ediff-window-setup-function' (Bug#12840).

2 years agoMake checkdoc-defun-info parsing slightly less wrong
Lars Ingebrigtsen [Sun, 19 Jun 2022 12:17:05 +0000 (14:17 +0200)]
Make checkdoc-defun-info parsing slightly less wrong

* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info): Disregard
`interactive' in nested parts of the defun (bug#56052).

2 years agoAdd mechanism for gradually phasing in new byte compilation warnings
Lars Ingebrigtsen [Sun, 19 Jun 2022 11:37:10 +0000 (13:37 +0200)]
Add mechanism for gradually phasing in new byte compilation warnings

* lisp/Makefile.in (BYTE_COMPILE_FLAGS): Enable all byte
compilation warnings.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types): Add
docstrings-non-ascii-quotes and document new semantics for `all'
and t.
(byte-compile--emacs-build-warning-types): New constant.
(byte-compile-warning-enabled-p): Implement the new semantics.
(byte-compile-docstring-style-warn): Reinstate the Unicode quote
warning.

2 years agoIgnore emulated mouse clicks during drag-and-drop
Po Lu [Sun, 19 Jun 2022 07:21:46 +0000 (15:21 +0800)]
Ignore emulated mouse clicks during drag-and-drop

* src/xterm.c (handle_one_xevent): Don't set dpyinfo->grab and
last mouse frame for emulated mouse events during a
drag-and-drop operation.

2 years agoFix crashes when the _EMACS_DRAG_ATOM is the wrong type
Po Lu [Sun, 19 Jun 2022 05:32:27 +0000 (13:32 +0800)]
Fix crashes when the _EMACS_DRAG_ATOM is the wrong type

* src/xterm.c (xm_get_drag_atom_1): Don't use PropModeAppend if
rc != Success.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 19 Jun 2022 04:30:29 +0000 (06:30 +0200)]
Merge from origin/emacs-28

422f958030 Fix invalid defcustom :group when :predicate is used

2 years agoFix XDND from Firefox again
Po Lu [Sun, 19 Jun 2022 04:22:12 +0000 (12:22 +0800)]
Fix XDND from Firefox again

* lisp/x-dnd.el (x-dnd-handle-xdnd): Prevent nil from appearing
in format 32 list.
(x-dnd-handle-motif): Send reply if the user quit out of the
drop handler as well.

2 years agoCache the Motif drag window to avoid fetching it every time
Po Lu [Sun, 19 Jun 2022 03:35:12 +0000 (11:35 +0800)]
Cache the Motif drag window to avoid fetching it every time

* src/xterm.c (xm_get_drag_window_1): New function.
(xm_get_drag_window): Cache the window.  If it already exists,
just return it.
(xm_setup_dnd_targets): If a BadWindow error occurs, re-create
the Motif drag window.

* src/xterm.h (struct x_display_info): New field
`motif_drag_window'.

2 years agoFix timestamps recorded in Motif DND top level leave messages
Po Lu [Sun, 19 Jun 2022 02:31:33 +0000 (10:31 +0800)]
Fix timestamps recorded in Motif DND top level leave messages

* src/xterm.c (xm_send_top_level_leave_message): Use X_SHRT_MAX
since Motif treats x and y as signed.
(handle_one_xevent): Use correct time for lmsg.timestamp sent in
response to entering the return-frame.

2 years agoPrefer defvar-keymap in edmacro.el
Stefan Kangas [Sat, 18 Jun 2022 17:56:09 +0000 (19:56 +0200)]
Prefer defvar-keymap in edmacro.el

* lisp/edmacro.el (edmacro-mode-map): Prefer defvar-keymap.

2 years agoRespect no-face argument in literal key substitutions
Stefan Kangas [Sat, 18 Jun 2022 14:01:45 +0000 (16:01 +0200)]
Respect no-face argument in literal key substitutions

* lisp/help.el (substitute-command-keys): Respect 'no-face' argument
also in literal key substitutions.
* test/lisp/help-tests.el
(help-tests-substitute-key-bindings/help-key-binding-face): Rename
from help-tests-substitute-key-bindings/face-help-key-binding.
(help-tests-substitute-key-bindings/help-key-binding-no-face): New test.

2 years ago; * etc/NEWS: Move Bookmark items to separate heading.
Stefan Kangas [Sat, 18 Jun 2022 13:54:28 +0000 (15:54 +0200)]
; * etc/NEWS: Move Bookmark items to separate heading.

2 years agoFix last tty-select-active-regions change
Basil L. Contovounesios [Sat, 18 Jun 2022 16:52:31 +0000 (19:52 +0300)]
Fix last tty-select-active-regions change

* lisp/frame.el (tty-select-active-regions): Pacify warning about
missing defcustom :group by specifying the same group as
select-active-regions, as well as the frames group.
* src/keyboard.c (command_loop_1, syms_of_keyboard): Rename last
occurrences of xterm-select-active-regions to
tty-select-active-regions (bug#55883).

2 years agoCC Mode: Add accurate handling for backslash in C line and block comments
Alan Mackenzie [Sat, 18 Jun 2022 16:41:57 +0000 (16:41 +0000)]
CC Mode: Add accurate handling for backslash in C line and block comments

This is needed to handle the idiosyncratic meaning of backslash in comments in
the C and C++ standards.

* lisp/progmodes/cc-engine.el: Correct a spelling error.

* lisp/progmodes/cc-mode.el (c-before-change-fix-comment-escapes)
(c-after-change-fix-comment-escapes): New functions.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Add
c-before-change-fix-comment-escapes to the C/Objc and C++ values.
(c-before-font-lock-functions): Add c-after-change-fix-comment-escapes to the
C/Objc and C++ values.