]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoUse the real cursor beneath the pointer on xwidgets
Po Lu [Fri, 28 Jan 2022 08:38:02 +0000 (16:38 +0800)]
Use the real cursor beneath the pointer on xwidgets

* src/xwidget.c (define_cursors): Make manual cursor definition
code PGTK-only.
(xw_update_cursor_for_view):
(xw_last_crossing_cursor_cb): New functions.
(xw_maybe_synthesize_crossing): Attach and disconnect cursor
signal handler where appropriate.
(xwidget_init_view): Set the default cursor to the nontext
cursor.
(Fxwidget_delete_view): Disconnect last crossing signal if
appropriate.
* src/xwidget.h (struct xwidget_view): New field
`last_crossing_cursor_signal'.

3 years agoFix xwidget build on PGTK
Po Lu [Fri, 28 Jan 2022 08:08:10 +0000 (16:08 +0800)]
Fix xwidget build on PGTK

* src/xwidget.c (xw_forward_event_translate): Adjust calls to
`find_widget_at_pos' for recent changes.

3 years ago; Rename 'startup--require-comp-safetly'
Eli Zaretskii [Fri, 28 Jan 2022 07:37:28 +0000 (09:37 +0200)]
; Rename 'startup--require-comp-safetly'

* src/comp.c (maybe_defer_native_compilation):
* lisp/startup.el (startup--require-comp-safely): Rename from
'startup--require-comp-safetly'.  All callers changed.

3 years ago; Fix a typo in recent documentation changes
Eli Zaretskii [Fri, 28 Jan 2022 07:30:04 +0000 (09:30 +0200)]
; Fix a typo in recent documentation changes

* doc/lispref/os.texi (Startup Summary):
* doc/emacs/cmdargs.texi (Initial Options): Fix a typo.

3 years agoFix duplicate scroll events without XI2
Po Lu [Fri, 28 Jan 2022 06:06:38 +0000 (14:06 +0800)]
Fix duplicate scroll events without XI2

* src/xwidget.c (xwidget_button): Only generate scroll events
when the button was released.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 28 Jan 2022 05:32:22 +0000 (06:32 +0100)]
Merge from origin/emacs-28

3dd47bde7a * lisp/frame.el (clone-frame): Filter out 'parent-id' (bug...

3 years agoClear xwidget passive grab whenever a drag begins
Po Lu [Fri, 28 Jan 2022 03:08:20 +0000 (11:08 +0800)]
Clear xwidget passive grab whenever a drag begins

* src/xwidget.c (xv_drag_begin_cb): New function.
(xwidget_view_from_window): Attach said function to grab widget
when a grab starts.
* src/xwidget.h (struct xwidget_view): New field
`passive_grab_drag_signal'.

3 years ago* src/xterm.c (handle_one_xevent): Remove obsolete workaround.
Po Lu [Fri, 28 Jan 2022 02:51:33 +0000 (10:51 +0800)]
* src/xterm.c (handle_one_xevent): Remove obsolete workaround.

3 years agoFix inappropriate use of killed xwidgets
Po Lu [Fri, 28 Jan 2022 02:48:12 +0000 (10:48 +0800)]
Fix inappropriate use of killed xwidgets

* src/xwidget.c (x_draw_xwidget_webkit_view): Don't record
embedder or synthesize focus events if the widget is killed.

3 years agoImplement xwidget passive grabs
Po Lu [Fri, 28 Jan 2022 02:41:03 +0000 (10:41 +0800)]
Implement xwidget passive grabs

* src/xwidget.c (find_widget_at_pos): New parameters for
controlling whether to respect grabs.  All callers changed.
(window_coords_from_toplevel): Make work when the widget is
the toplevel.
(find_widget): Fix coding style.
(xwidget_button_1): Set and clear passive grabs if appropriate.
(xw_maybe_synthesize_crossing): Allow current_window to be NULL
if the mode is XW_CROSSING_LEFT.

3 years agoAdd new switch --init-directory
Lars Ingebrigtsen [Thu, 27 Jan 2022 22:38:13 +0000 (23:38 +0100)]
Add new switch --init-directory

* doc/emacs/cmdargs.texi (Initial Options): Mention it.
* lisp/startup.el (normal-top-level): Move the eln init to after
we've processed the command line arguments.
(command-line): Interpret the --init-directory switch.

* src/emacs.c (standard_args): Add.

3 years ago* lisp/doc-view.el (doc-view-epub-font-size): Fix type; add version.
Glenn Morris [Thu, 27 Jan 2022 22:21:15 +0000 (14:21 -0800)]
* lisp/doc-view.el (doc-view-epub-font-size): Fix type; add version.

Flagged by test-custom-opts.

3 years agoFix potential native compiler circular dependencies during load
Andrea Corallo [Thu, 27 Jan 2022 17:18:13 +0000 (18:18 +0100)]
Fix potential native compiler circular dependencies during load

* lisp/startup.el (startup--require-comp-safetly): New function.
(startup--honor-delayed-native-compilations): Make use of
`startup--require-comp-safetly'.
* src/comp.c (CALL0I): New define.
(maybe_defer_native_compilation): Make use of
`startup--require-comp-safetly'.

3 years agoFix up previous "Quit Emacs" from menu logic
Lars Ingebrigtsen [Thu, 27 Jan 2022 21:26:12 +0000 (22:26 +0100)]
Fix up previous "Quit Emacs" from menu logic

* lisp/files.el (files--buffers-needing-to-be-saved): Separated
out into its own function...
(save-some-buffers): ... from here.
(save-buffers-kill-emacs): Check that we have anything to save
before prompting the user.

3 years agoMake the save buffers prompt from Quit Emacs menu more understandable
Lars Ingebrigtsen [Thu, 27 Jan 2022 18:54:48 +0000 (19:54 +0100)]
Make the save buffers prompt from Quit Emacs menu more understandable

* lisp/files.el (save-buffers-kill-emacs): Use a much simpler (and
more understandable) prompt when exiting Emacs from the menu bar
(bug#4980).

* lisp/subr.el (use-dialog-box-p): Separate out into its own
function for reuse...
(y-or-n-p): ... from here.

3 years agoImprove detection of glyphless characters on TTY frames
Eli Zaretskii [Thu, 27 Jan 2022 18:35:22 +0000 (20:35 +0200)]
Improve detection of glyphless characters on TTY frames

* src/term.c (produce_glyphs): If the terminal can report for
which characters it has glyphs, use that to determine whether
a given character should be displayed as glyphless.

3 years ago* lisp/frame.el (clone-frame): Filter out 'parent-id' (bug#51883).
Juri Linkov [Thu, 27 Jan 2022 17:47:40 +0000 (19:47 +0200)]
* lisp/frame.el (clone-frame): Filter out 'parent-id' (bug#51883).

3 years agoAdd setx highlighting to bat-mode
Arni Magnusson [Thu, 27 Jan 2022 16:12:11 +0000 (17:12 +0100)]
Add setx highlighting to bat-mode

* lisp/progmodes/bat-mode.el (bat-font-lock-keywords):
(bat-font-lock-keywords): Highlight setx (bug#53568).

3 years agoMove some of the doc-view variables around to fix load errors
Lars Ingebrigtsen [Thu, 27 Jan 2022 16:10:13 +0000 (17:10 +0100)]
Move some of the doc-view variables around to fix load errors

3 years agoAdd support for EPUB, CBZ, FB2 and (O)XPS extension to doc view
Daniel Nicolai [Thu, 27 Jan 2022 16:03:38 +0000 (17:03 +0100)]
Add support for EPUB, CBZ, FB2 and (O)XPS extension to doc view

* doc/emacs/misc.texi (Document View): Add requirements for new
extensions (i.e. mutool).

* lisp/doc-view.el (doc-view): Additionally update preliminary comment
(doc-view-custom-set-epub-font-size): redraw image after setting
(doc-view-unoconv-program): Put code all on one line
(doc-view-doc-type): Update docstring.
(doc-view-kill-proc): Fix comment indentation
(doc-view-mode-p):
Add check for new extensions and alternative check for PDF
(doc-view-pdf/ps->png): Associate new extension with png converter
(doc-view-convert-current-doc): Handle new extensions like PDF's
(doc-view-set-doc-type): Set correct doc-type for new extensions.

* lisp/files.el (auto-mode-alist):
Associate new extension types with doc-view.

3 years agoTweak href/superscript fix in tex-mode
Lars Ingebrigtsen [Thu, 27 Jan 2022 15:30:12 +0000 (16:30 +0100)]
Tweak href/superscript fix in tex-mode

* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Fix
superscripts in href in a better way.

3 years agoRevert "Don't output spurious prefixes in read-char-exclusive"
Lars Ingebrigtsen [Thu, 27 Jan 2022 15:18:36 +0000 (16:18 +0100)]
Revert "Don't output spurious prefixes in read-char-exclusive"

This reverts commit 701ec0bda2b15fc97af6ca68fb842fb1ec9aac35.

This change broke display of `C-q-' when doing the `C-q' command,
so it has to be fixed a different way.

3 years agoImprove xwidget window ancestry calculations
Po Lu [Thu, 27 Jan 2022 13:36:52 +0000 (21:36 +0800)]
Improve xwidget window ancestry calculations

* src/xwidget.c (xw_find_common_ancestor):
(xw_notify_virtual_upwards_until)
(xw_notify_virtual_downwards_until): New functions.
(xw_maybe_synthesize_crossing): Synthesize virtual events like
GTK does for non-linear changes.

3 years ago* src/pdumper.c (dump_vectorlike): Handle PVEC_SYMBOL_WITH_POS.
Andreas Schwab [Thu, 27 Jan 2022 11:22:47 +0000 (12:22 +0100)]
* src/pdumper.c (dump_vectorlike): Handle PVEC_SYMBOL_WITH_POS.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 27 Jan 2022 10:57:16 +0000 (12:57 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years ago; Fix typo in doc/lispref/display.texi.
Zajcev Evgeny [Wed, 26 Jan 2022 13:29:13 +0000 (16:29 +0300)]
; Fix typo in doc/lispref/display.texi.

3 years ago* Fix `startup--honor-delayed-native-compilations' for (bug#53497)
Andrea Corallo [Thu, 27 Jan 2022 10:47:41 +0000 (11:47 +0100)]
* Fix `startup--honor-delayed-native-compilations' for (bug#53497)

* lisp/startup.el (startup--honor-delayed-native-compilations): Don't
forget to set `comp--loadable' when `comp--delayed-sources' is empty.

3 years ago* Have `benchmark-run-compiled' use the native compiler when available
Andrea Corallo [Thu, 27 Jan 2022 09:39:53 +0000 (10:39 +0100)]
* Have `benchmark-run-compiled' use the native compiler when available

* lisp/emacs-lisp/benchmark.el (benchmark-run-compiled): Use native
compiler when available.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 27 Jan 2022 08:45:49 +0000 (09:45 +0100)]
Merge from origin/emacs-28

c9524819ea Partially revert a fill-region-as-paragraph regression
6075ea0b79 Fix 'make_lispy_position' when there's an image at EOB

# Conflicts:
# test/lisp/textmodes/fill-tests.el

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 27 Jan 2022 08:07:56 +0000 (09:07 +0100)]
; Merge from origin/emacs-28

The following commits were skipped:

c5b0019e10 Fix copyright-find-copyright when searching from the end
ed18d08f6f Fix copyright.el comment and add a test

3 years ago* lisp/xwidget.el (xwidget-webkit-edit-mode-map): Pass C-backspace.
Po Lu [Thu, 27 Jan 2022 06:07:08 +0000 (14:07 +0800)]
* lisp/xwidget.el (xwidget-webkit-edit-mode-map): Pass C-backspace.

3 years agoImplement crossing event generation between windows for xwidgets on X
Po Lu [Thu, 27 Jan 2022 05:56:32 +0000 (13:56 +0800)]
Implement crossing event generation between windows for xwidgets on X

* src/xwidget.c (enum xw_crossing_mode): New enum.
(xwidget_motion_notify):
(xwidget_motion_or_crossing): Synthesize crossing events if the
pointer moved between different windows.
(window_coords_from_toplevel):
(xw_maybe_synthesize_crossing): New functions.
(xwidget_init_view): Initialize new field to NULL.
(Fdelete_xwidget_view): Clear last crossing window.

* src/xwidget.h (struct xwidget_view): New field
`last_crossing_window'.

3 years agoSilence byte-compiler slightly in tests
Stefan Kangas [Thu, 27 Jan 2022 03:23:18 +0000 (04:23 +0100)]
Silence byte-compiler slightly in tests

* test/src/comp-resources/comp-test-45603.el
(comp-test-45603--call-marked):
* test/src/comp-resources/comp-test-funcs.el
(comp-tests-discardn-f, comp-test-42360-f, comp-test-46824-1-f)
(comp-test-silly-frame2): Silence byte-compiler.

3 years agoDon't use obsolete second argument to byte-compile-file
Stefan Kangas [Thu, 27 Jan 2022 03:15:13 +0000 (04:15 +0100)]
Don't use obsolete second argument to byte-compile-file

* test/src/comp-resources/comp-test-funcs.el
(comp-test-big-interactive): Don't use obsolete second argument to
byte-compile-file.

3 years agoDon't discourage auto-mode-alist entries in autoloads
Stefan Kangas [Thu, 27 Jan 2022 02:56:49 +0000 (03:56 +0100)]
Don't discourage auto-mode-alist entries in autoloads

* lisp/files.el (auto-mode-alist, interpreter-mode-alist): Delete
comment discouraging entries in autoload directives.  (Bug#8158)

3 years agoImprove XI2 valuator reset logic
Po Lu [Thu, 27 Jan 2022 02:03:56 +0000 (10:03 +0800)]
Improve XI2 valuator reset logic

* src/xterm.c (handle_one_xevent): Clear valuators on XI_Leave
instead of XI_Enter.

3 years ago* src/xterm.c (x_focus_frame): Set input focus on outer window.
Po Lu [Thu, 27 Jan 2022 01:33:11 +0000 (09:33 +0800)]
* src/xterm.c (x_focus_frame): Set input focus on outer window.

3 years agoGet rid of unnecessary draw locking in haikumenu.c
Po Lu [Thu, 27 Jan 2022 01:25:20 +0000 (01:25 +0000)]
Get rid of unnecessary draw locking in haikumenu.c

* src/haikumenu.c (Fhaiku_menu_bar_open): Stop holding the draw
lock.

3 years agoApply fix for bug#52761 to GTK native input as well
Po Lu [Thu, 27 Jan 2022 01:20:25 +0000 (09:20 +0800)]
Apply fix for bug#52761 to GTK native input as well

* src/xgselect.c (xg_select): Apply said fix on regular GTK
builds when native input is being used.

3 years ago* Makefile.in (install-etc): Remove unnecessary chown.
Glenn Morris [Wed, 26 Jan 2022 21:58:21 +0000 (16:58 -0500)]
* Makefile.in (install-etc): Remove unnecessary chown.

Not needed since this rule was changed to not use tar, 2012-05-11.

3 years agoMake smerge-refine-ignore-whitespace into defcustom
Lars Ingebrigtsen [Wed, 26 Jan 2022 17:54:58 +0000 (18:54 +0100)]
Make smerge-refine-ignore-whitespace into defcustom

* lisp/vc/smerge-mode.el (smerge-refine-ignore-whitespace): Make
into defcustom (bug#12585).

3 years agoAdd tests for concat, vconcat and append
Mattias Engdegård [Wed, 26 Jan 2022 15:47:31 +0000 (16:47 +0100)]
Add tests for concat, vconcat and append

* test/src/fns-tests.el (fns-tests-concat)
(fns-concat, fns-vconcat, fns-append): New.

3 years agoMinor `concat` tweaks
Mattias Engdegård [Wed, 26 Jan 2022 10:28:33 +0000 (11:28 +0100)]
Minor `concat` tweaks

* src/fns.c (concat): Do things in the right order for speed.
(concat_strings): Initialise variable.

3 years agoPartially revert a fill-region-as-paragraph regression
Lars Ingebrigtsen [Wed, 26 Jan 2022 15:17:49 +0000 (16:17 +0100)]
Partially revert a fill-region-as-paragraph regression

* lisp/textmodes/fill.el (fill-region-as-paragraph): Revert
e186af261 (bug#53537), because it leads to regressions.  (But
leave tests in place.)

3 years agoFix 'make_lispy_position' when there's an image at EOB
Eli Zaretskii [Wed, 26 Jan 2022 14:44:14 +0000 (16:44 +0200)]
Fix 'make_lispy_position' when there's an image at EOB

* src/xdisp.c (move_it_to): Don't compare IT_CHARPOS with an
invalid TO_CHARPOS.  (Bug#53546)

3 years agoFix copyright-find-copyright when searching from the end
Lars Ingebrigtsen [Wed, 26 Jan 2022 14:02:00 +0000 (15:02 +0100)]
Fix copyright-find-copyright when searching from the end

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).

Do not merge to master.

3 years agoFix copyright.el comment and add a test
Lars Ingebrigtsen [Wed, 26 Jan 2022 13:53:07 +0000 (14:53 +0100)]
Fix copyright.el comment and add a test

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).

Do not merge to master.

3 years agoFix copyright-find-copyright when searching from the end
Lars Ingebrigtsen [Wed, 26 Jan 2022 14:02:00 +0000 (15:02 +0100)]
Fix copyright-find-copyright when searching from the end

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).

3 years agoFix copyright.el comment and add a test
Lars Ingebrigtsen [Wed, 26 Jan 2022 13:53:07 +0000 (14:53 +0100)]
Fix copyright.el comment and add a test

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).

3 years agoFix input of sharp-quoted symbols in Eshell with em-extpipe
Sean Whitton [Wed, 26 Jan 2022 13:13:00 +0000 (14:13 +0100)]
Fix input of sharp-quoted symbols in Eshell with em-extpipe

* lisp/eshell/em-extpipe.el (eshell-parse-external-pipeline): Fix
misinterpreting sharp-quoted symbols as the beginning of single-quoted
strings (Bug#53518).  Add protection against a possible infinite loop.
* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-test-17): New
test (bug#53518).

3 years agoAdapt tramp-tests
Michael Albinus [Wed, 26 Jan 2022 13:05:30 +0000 (14:05 +0100)]
Adapt tramp-tests

* test/lisp/net/tramp-tests.el (tramp--test-special-characters):
Adapt test candidates.

3 years agoFix insert-file-contents for tramp-crypt
Michael Albinus [Wed, 26 Jan 2022 13:05:11 +0000 (14:05 +0100)]
Fix insert-file-contents for tramp-crypt

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Use `tramp-handle-insert-file-contents'.

3 years agoAdd workaround for super modifier misconfiguration to non-XKB code
Po Lu [Wed, 26 Jan 2022 12:35:04 +0000 (20:35 +0800)]
Add workaround for super modifier misconfiguration to non-XKB code

* src/xterm.c (x_find_modifier_meanings): Don't let a modifier
be both Hyper and Super.

3 years agoMake use of NILP where possible
Andrea Corallo [Wed, 26 Jan 2022 11:19:59 +0000 (12:19 +0100)]
Make use of NILP where possible

* src/w32menu.c (menubar_selection_callback, w32_menu_show): Use NILP
where possible.
* src/w32fns.c (w32_set_mouse_color): Likewise.
* src/w16select.c (Fw16_selection_exists_p): Likewise.
* src/process.c (Fnetwork_lookup_address_info): Likewise.
* src/cygw32.c (Fcygwin_convert_file_name_to_windows)
(Fcygwin_convert_file_name_from_windows): Likewise.

3 years agoSimplify Haiku scrolling code
Po Lu [Wed, 26 Jan 2022 06:05:35 +0000 (06:05 +0000)]
Simplify Haiku scrolling code

* src/haikuterm.c (haiku_scroll_run): Remove code that can never
be reached since Cairo frames are always double buffered.

3 years agoFix GTK menu bar height reporting when scaled
Po Lu [Wed, 26 Jan 2022 05:53:20 +0000 (13:53 +0800)]
Fix GTK menu bar height reporting when scaled

* src/gtkutil.c (xg_update_frame_menubar): Multiply requisition
height by GDK scale.

3 years ago; * src/xterm.c (handle_one_xevent): Fix formatting of XI2 switch.
Po Lu [Wed, 26 Jan 2022 05:46:28 +0000 (13:46 +0800)]
; * src/xterm.c (handle_one_xevent): Fix formatting of XI2 switch.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 26 Jan 2022 05:30:26 +0000 (06:30 +0100)]
Merge from origin/emacs-28

7eca80b204 ; * src/composite.c (syms_of_composite) <auto-composition-...

3 years agoSimplify Haiku underline code
Po Lu [Wed, 26 Jan 2022 05:09:09 +0000 (05:09 +0000)]
Simplify Haiku underline code

* src/haikuterm.c (haiku_draw_text_decoration): Remove code left
over from when mouse face had to be set manually.

3 years agoMake `haiku-menu-bar-open' faster
Po Lu [Wed, 26 Jan 2022 01:20:48 +0000 (01:20 +0000)]
Make `haiku-menu-bar-open' faster

* src/haikumenu.c (Fhaiku_menu_bar_open): Get draw lock before
updating the menu bar.
* src/haikuterm.c (haiku_read_socket): Don't update menu bar if
b->no_lock.

3 years ago; * test/lisp/emacs-lisp/derived-tests.el: Silence byte-compiler.
Stefan Kangas [Tue, 25 Jan 2022 23:44:00 +0000 (00:44 +0100)]
; * test/lisp/emacs-lisp/derived-tests.el: Silence byte-compiler.

3 years ago* src/image.c (parse_image_spec): Use NILP.
Stefan Kangas [Tue, 25 Jan 2022 23:42:10 +0000 (00:42 +0100)]
* src/image.c (parse_image_spec): Use NILP.

3 years agoImprove how change-log-mode fills all-file-name lines
Lars Ingebrigtsen [Tue, 25 Jan 2022 13:55:26 +0000 (14:55 +0100)]
Improve how change-log-mode fills all-file-name lines

* lisp/vc/add-log.el (change-log-fill-file-list): New function to
improve how we fill all-file-name ChangeLog lines (bug#19341).
(change-log-indent): Use it.

3 years agoFix up Gnus FAQ entry
Lars Ingebrigtsen [Tue, 25 Jan 2022 13:37:50 +0000 (14:37 +0100)]
Fix up Gnus FAQ entry

* doc/misc/gnus-faq.texi (FAQ 3-9): Remove mention of
nnimap-list-pattern, which was removed some years ago (bug#53522).

3 years ago* src/comp.c (emit_lisp_obj_rval): Make use of NILP.
Andrea Corallo [Tue, 25 Jan 2022 21:15:51 +0000 (22:15 +0100)]
* src/comp.c (emit_lisp_obj_rval): Make use of NILP.

3 years ago;* src/fns.c (concat_strings): Add missing space.
Andrea Corallo [Tue, 25 Jan 2022 21:05:05 +0000 (22:05 +0100)]
;* src/fns.c (concat_strings): Add missing space.

3 years ago* src/comp.c (emit_limple_insn): Fix another int/Lisp_Object mixup
Stefan Monnier [Tue, 25 Jan 2022 19:36:48 +0000 (14:36 -0500)]
* src/comp.c (emit_limple_insn): Fix another int/Lisp_Object mixup

3 years agoTag an mml-sec test
Glenn Morris [Tue, 25 Jan 2022 17:38:50 +0000 (09:38 -0800)]
Tag an mml-sec test

* test/lisp/gnus/mml-sec-tests.el (mml-secure-en-decrypt-3):
Tag unstable on hydra.nixos.org due to repeated intermittent failures.

3 years ago; * src/fns.c (concat_strings): Fix comment style.
Eli Zaretskii [Tue, 25 Jan 2022 17:12:50 +0000 (19:12 +0200)]
; * src/fns.c (concat_strings): Fix comment style.

3 years ago* src/fns.c (concat_strings): Clean-up unused variable.
Andrea Corallo [Tue, 25 Jan 2022 16:52:43 +0000 (17:52 +0100)]
* src/fns.c (concat_strings): Clean-up unused variable.

3 years ago* `batch-byte+native-compile' produce .eln younger than .elc (bug#52912)
Andrea Corallo [Tue, 25 Jan 2022 11:01:55 +0000 (12:01 +0100)]
* `batch-byte+native-compile' produce .eln younger than .elc (bug#52912)

* lisp/emacs-lisp/comp.el (batch-native-compile): Add return
value.
(batch-byte+native-compile): Touch the produced .eln after the
corresponding .elc is produced.

3 years ago* lisp/emacs-lisp/comp.el (batch-byte+native-compile): Fix unwind form
Andrea Corallo [Mon, 24 Jan 2022 14:29:38 +0000 (15:29 +0100)]
* lisp/emacs-lisp/comp.el (batch-byte+native-compile): Fix unwind form

3 years ago* src/lisp.h (lisp_h_EQ, lisp_h_NILP): Fix length and indent
Stefan Monnier [Tue, 25 Jan 2022 15:03:01 +0000 (10:03 -0500)]
* src/lisp.h (lisp_h_EQ, lisp_h_NILP): Fix length and indent

3 years agoFaster concat, append, vconcat, copy-sequence, etc
Mattias Engdegård [Fri, 21 Jan 2022 09:00:19 +0000 (10:00 +0100)]
Faster concat, append, vconcat, copy-sequence, etc

Split the C auxiliary function `concat` into separate functions for
string and list/vector as target types, respectively.  This makes them
simpler and faster.

Implement `Fcopy_sequence` more efficiently for strings, lists and
vectors instead of using `concat`.

The result is a significant performance increase for the Lisp
built-ins concat, append, vconcat, copy-sequence and anything using
them such as mapconcat, copy-alist and propertize.

* src/fns.c (concat2, concat3, Fconcat): Use concat_strings.
(Fappend, Fvconcat): Adapt to changed signature of concat.
(Fcopy_sequence): Faster implementation for lists, strings, and vectors.
(concat_strings): New.
(concat): Strip code for string target, simplify, optimise.
(Fcopy_alist): Use Fcopy_sequence.

3 years agoDon't mutate literals in tabulated-list-widen-current-column
Lars Ingebrigtsen [Tue, 25 Jan 2022 13:21:22 +0000 (14:21 +0100)]
Don't mutate literals in tabulated-list-widen-current-column

* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-widen-current-column): Avoid mutating constants
(bug#53501).

3 years agoFix widening some columns in tabulated-list-widen-current-column
Lars Ingebrigtsen [Tue, 25 Jan 2022 12:58:30 +0000 (13:58 +0100)]
Fix widening some columns in tabulated-list-widen-current-column

* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-widen-current-column): Don't bug out on list-based
columns (bug#53498).

3 years agoTreat "-" as a positional arg in 'eshell-eval-using-options'
Jim Porter [Tue, 25 Jan 2022 05:08:50 +0000 (21:08 -0800)]
Treat "-" as a positional arg in 'eshell-eval-using-options'

* lisp/eshell/esh-opt.el (eshell--process-args): Treat "-" as a
positional arg.

* lisp/eshell/em-tramp.el (eshell/su): Simplify checking for "-".

* test/lisp/eshell/esh-opt-tests.el
(esh-opt-test/eval-using-options-stdin): New test.

3 years agoDon't manipulate args in-place for 'eshell-eval-using-options'
Jim Porter [Tue, 25 Jan 2022 05:03:42 +0000 (21:03 -0800)]
Don't manipulate args in-place for 'eshell-eval-using-options'

This is necessary for preserve the original arguments to forward on to
:external commands.  Previously, when :preserve-args was also set, the
original argument list could be altered, changing the meaning of the
command.

* lisp/eshell/esh-opt.el (eshell-eval-using-options): Copy MACRO-ARGS
when :preserve-args is set, and pass the original value to
'eshell--do-opts'.
(eshell--do-opts): Use the original arguments when calling an external
command.

* lisp/eshell/em-tramp.el (eshell/su, eshell/sudo): Don't copy the
original arguments, since 'eshell-eval-using-options' does this for
us.

* test/lisp/eshell/esh-opt-tests.el (esh-opt-process-args-test):
Split this test into...
(esh-opt-test/process-args)
(esh-opt-test/process-args-parse-leading-options-only)
(esh-opt-test/process-args-external): ... these.
(test-eshell-eval-using-options): Split this test into...
(esh-opt-test/eval-using-options-short)
(esh-opt-test/eval-using-options-long)
(esh-opt-test/eval-using-options-constant)
(esh-opt-test/eval-using-options-user-specified)
(esh-opt-test/eval-using-options-short-single-token)
(esh-opt-test/eval-using-options-terminate-options)
(esh-opt-test/eval-using-options-parse-leading-options-only)
(esh-opt-test/eval-using-options-unrecognized): ... these.
(esh-opt-test/eval-using-options-external): New test.

* test/lisp/eshell/em-tramp-tests.el: New tests.

3 years ago; * src/composite.c (syms_of_composite) <auto-composition-mode>: Doc fix.
Eli Zaretskii [Tue, 25 Jan 2022 12:15:36 +0000 (14:15 +0200)]
; * src/composite.c (syms_of_composite) <auto-composition-mode>: Doc fix.

3 years agoImprove the term-clear-full-screen-programs doc string
Lars Ingebrigtsen [Tue, 25 Jan 2022 11:51:23 +0000 (12:51 +0100)]
Improve the term-clear-full-screen-programs doc string

* lisp/term.el (term-clear-full-screen-programs): Improve the doc
string.

3 years agoImprove reliability of menu bar updates on Haiku
Po Lu [Tue, 25 Jan 2022 11:19:20 +0000 (11:19 +0000)]
Improve reliability of menu bar updates on Haiku

* src/haiku_support.cc (class EmacsWindow): New fields
`menu_update_cv', `menu_update_mutex' and `menu_updated_p'.
(~EmacsWindow): Destroy cv and mutex.
(MenusBeginning): Release lock and wait for condition to be
become true.
(EmacsWindow_signal_menu_update_complete): New function.
* src/haiku_support.h (struct haiku_menu_bar_state_event): New
field `no_lock'.
* src/haikumenu.c (Fhaiku_menu_bar_open): Always update menu
bar.
* src/haikuterm.c (haiku_read_socket): Always update menu bar
and signal the window thread after update completion.

3 years ago* src/haiku_support.cc (Highlight): Send events if !highlight_p.
Po Lu [Tue, 25 Jan 2022 10:18:35 +0000 (10:18 +0000)]
* src/haiku_support.cc (Highlight): Send events if !highlight_p.

3 years agoDon't send menu help events on Haiku if the pointer isn't in the menu
Po Lu [Tue, 25 Jan 2022 10:02:16 +0000 (10:02 +0000)]
Don't send menu help events on Haiku if the pointer isn't in the menu

* src/haiku_support.cc (Highlight): Only send help events
if the mouse cursor is actually in the menu.

3 years agoFix tool bar size reporting on GTK when the display is scaled
Po Lu [Tue, 25 Jan 2022 06:42:33 +0000 (14:42 +0800)]
Fix tool bar size reporting on GTK when the display is scaled

* src/gtkutil.c (xg_update_tool_bar_sizes): Multiply sizes to
turn them into device pixels.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 25 Jan 2022 05:31:03 +0000 (06:31 +0100)]
Merge from origin/emacs-28

c34d06e3d7 * configure.ac (LIBSECCOMP): Bump minimum version for facc...
335a5a9e0f Make the `f' command work in image-mode again

3 years agoImprove portability of X11 IM code
Po Lu [Tue, 25 Jan 2022 03:49:39 +0000 (11:49 +0800)]
Improve portability of X11 IM code

* configure.ac: Test for XICCallback.callback if X11R6 or later.
* src/xfns.c (Xxic_preedit_start_callback): Use XICCallback if
present.

3 years agoRemove some dubious uses of `interactive-form`
Stefan Monnier [Tue, 25 Jan 2022 02:31:53 +0000 (21:31 -0500)]
Remove some dubious uses of `interactive-form`

* lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): `commandp` and
`interactive-form` are for function values, not for source code.
* lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag):
Prefer `commandp` over `interactive-form`.

3 years agoFix invalid picture after toggling the tool bar or menu bar on GTK
Po Lu [Tue, 25 Jan 2022 02:14:28 +0000 (10:14 +0800)]
Fix invalid picture after toggling the tool bar or menu bar on GTK

* src/xterm.c (x_drop_xrender_surfaces): New function.
(handle_one_xevent): Call x_drop_xrender_surfaces instead of
just font_drop_xrender_surfaces.

3 years agoFix GTK native input on scaled displays
Po Lu [Tue, 25 Jan 2022 00:21:55 +0000 (08:21 +0800)]
Fix GTK native input on scaled displays

* src/xfns.c (xic_set_preeditarea): Scale preedit spot rectangle
before giving it to GTK.

3 years agoAdd Eshell syntax to more easily bypass Eshell's own pipelining
Sean Whitton [Mon, 17 Jan 2022 22:15:36 +0000 (15:15 -0700)]
Add Eshell syntax to more easily bypass Eshell's own pipelining

* etc/NEWS:
* doc/misc/eshell.texi (Input/Output): Document the new syntax.
* lisp/eshell/em-extpipe.el: New module (Bug#46351).
* test/lisp/eshell/em-extpipe-tests.el: New tests.
* lisp/eshell/esh-module.el (eshell-modules-list): Add `eshell-extpipe'.

3 years agoRework eshell-match-result for testing asynchronous commands
Sean Whitton [Sun, 23 Jan 2022 01:54:55 +0000 (18:54 -0700)]
Rework eshell-match-result for testing asynchronous commands

When using eshell-match-result via eshell-command-result-p to examine
the output of asynchronous Eshell commands, a newly emitted prompt is
included in the text against which the regexp is matched.  This makes
it awkward to match against the whole output; for example, to check
whether it is empty.  Rework the function to exclude the prompt.

* test/lisp/eshell/eshell-tests-helpers.el (eshell-match-result):
Exclude any newly emitted prompt from the text against which the
regexp is matched.  Additionally, the function no longer moves point.
* test/lisp/eshell/eshell-tests.el (eshell-test/flush-output): Update
and simplify test given how eshell-match-result no longer moves point.

3 years agoMove Eshell test helpers to their own file
Sean Whitton [Sat, 22 Jan 2022 05:32:22 +0000 (22:32 -0700)]
Move Eshell test helpers to their own file

* test/lisp/eshell/eshell-tests.el:
* test/lisp/eshell/eshell-tests-helpers.el: Move helpers to own file.

3 years agoMake hi-lock-face-defaults into a defcustom
Lars Ingebrigtsen [Mon, 24 Jan 2022 19:14:15 +0000 (20:14 +0100)]
Make hi-lock-face-defaults into a defcustom

* lisp/hi-lock.el (hi-lock-face-defaults): Make into defcustom.

3 years ago* lisp/hi-lock.el (hi-lock-use-overlays): New variable.
Juri Linkov [Mon, 24 Jan 2022 19:15:37 +0000 (21:15 +0200)]
* lisp/hi-lock.el (hi-lock-use-overlays): New variable.

(hi-lock-set-pattern): Use it.  Set overlay priority to 1.
(bug#53155)

3 years agoAdd NEWS entry for term-clear-full-screen-programs
Lars Ingebrigtsen [Mon, 24 Jan 2022 19:02:26 +0000 (20:02 +0100)]
Add NEWS entry for term-clear-full-screen-programs

3 years agoImplement alternative sub-buffer support in term.el
Miha Rihtaršič [Sun, 23 Jan 2022 20:13:24 +0000 (21:13 +0100)]
Implement alternative sub-buffer support in term.el

* etc/e/eterm-color.ti: Added termcaps for entering and leaving an
alternative sub-buffer.
* lisp/term.el (term-reset-size): Resize correctly in an alternative
sub-buffer is in use.
(term-clear-full-screen-programs): New user option.
(term-handle-ansi-escape):
(term-termcap-format): Handle termcaps for entering and leaving an
alternative sub-buffer.
(term-switch-to-alternate-sub-buffer): New (used to be commented out)
function to enter or leave an alternative sub-buffer.
bug#53485

3 years ago* lisp/info.el (Info-link-keymap): Fix repetitive clicks on the header line.
Juri Linkov [Mon, 24 Jan 2022 18:52:59 +0000 (20:52 +0200)]
* lisp/info.el (Info-link-keymap): Fix repetitive clicks on the header line.

Rebind [header-line mouse-1] from mouse-select-window to
Info-mouse-follow-link.  It selects the window anyway,
but also allows repetitively clicking on the Next button
on the Info header line (bug#53170).

3 years agoDon't list the default hi-lock faces twice in the future history
Lars Ingebrigtsen [Mon, 24 Jan 2022 18:51:55 +0000 (19:51 +0100)]
Don't list the default hi-lock faces twice in the future history

* lisp/hi-lock.el (hi-lock-read-face-name): Don't include faces
twice in the defaults (bug#19877).

3 years agoFix gnus-article-truncate-lines doc string
Lars Ingebrigtsen [Mon, 24 Jan 2022 18:41:15 +0000 (19:41 +0100)]
Fix gnus-article-truncate-lines doc string

* lisp/gnus/gnus-art.el (gnus-article-truncate-lines): Fix doc
string.

3 years ago* etc/NEWS: Mention 'replace-regexp-function' (bug#52558).
Juri Linkov [Mon, 24 Jan 2022 18:45:53 +0000 (20:45 +0200)]
* etc/NEWS: Mention 'replace-regexp-function' (bug#52558).