]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; * doc/emacs/dired.texi (Entering Dired): Fix typo.
Sean Whitton [Sat, 21 May 2022 23:15:01 +0000 (16:15 -0700)]
; * doc/emacs/dired.texi (Entering Dired): Fix typo.

2 years ago; Rename enable-theme and disable-theme hooks
Eli Zaretskii [Sat, 21 May 2022 13:55:15 +0000 (16:55 +0300)]
; Rename enable-theme and disable-theme hooks

* lisp/custom.el (enable-theme-functions)
(disable-theme-functions): Rename from enable-theme-hook and
disable-theme-hook.  All users changed.  (Bug#37802)

2 years agoSome cleanups in tramp-tests.el
Michael Albinus [Sat, 21 May 2022 13:44:22 +0000 (15:44 +0200)]
Some cleanups in tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare.
(tramp-test16-directory-files)
(tramp-test16-file-expand-wildcards)
(tramp-test26-file-name-completion, tramp--test-check-files): Use it.
(tramp--test-check-files): Delete directory recursively.
(tramp-test43-file-system-info): Make test more robust.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 21 May 2022 13:43:34 +0000 (15:43 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoFix recently introduced Python font lock breakage of chained assignments
kobarity [Sat, 21 May 2022 13:23:21 +0000 (15:23 +0200)]
Fix recently introduced Python font lock breakage of chained assignments

* lisp/progmodes/python.el (python-font-lock-assignment-matcher):
Fix fontification of chained assignments (bug#54992).

2 years ago; Merge from origin/emacs-28
Michael Albinus [Sat, 21 May 2022 13:20:10 +0000 (15:20 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

fa6a0962c5 Fix Tramp sshfs tests (don't merge)

2 years agoMerge from origin/emacs-28
Michael Albinus [Sat, 21 May 2022 13:20:10 +0000 (15:20 +0200)]
Merge from origin/emacs-28

f836ed098f Some minor Tramp fixes

2 years agoAdd new hooks when enabling and disabling themes
Lars Ingebrigtsen [Sat, 21 May 2022 12:56:13 +0000 (14:56 +0200)]
Add new hooks when enabling and disabling themes

* lisp/custom.el (enable-theme-hook, disable-theme-hook): New
hooks (bug#37802).
(enable-theme, disable-theme): Call them.

2 years ago; * etc/NEWS: Fix wording of 'zap-to-char's entry.
Eli Zaretskii [Sat, 21 May 2022 09:55:12 +0000 (12:55 +0300)]
; * etc/NEWS: Fix wording of 'zap-to-char's entry.

2 years agozap-to-char: case sensitive for upper-case characters
Tino Calancha [Sat, 21 May 2022 09:23:17 +0000 (11:23 +0200)]
zap-to-char: case sensitive for upper-case characters

In interactive calls, behave case-sensitively if the given char
is an upper-case character.  Same for zap-up-to-char (Bug#54804).

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

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

* etc/NEWS (Editing Changes in Emacs 29.1): Announce this change.
* test/lisp/misc-tests.el (misc-test-zap-up-to-char): Add test cases.
* test/lisp/simple-tests.el (with-zap-to-char-test): Add helper macro.
(simple-tests-zap-to-char): Add a test.

2 years agoImprove doc for `display-monitors-changed-functions'
Po Lu [Sat, 21 May 2022 08:41:34 +0000 (16:41 +0800)]
Improve doc for `display-monitors-changed-functions'

* doc/lispref/frames.texi (Multiple Terminals): Describe how to
retrieve the new monitor configuration inside
`display-monitor-attributes-list'.

2 years ago; * etc/HELLO: Improve wording of preamble text. (Bug#55439)
Eli Zaretskii [Sat, 21 May 2022 08:04:58 +0000 (11:04 +0300)]
; * etc/HELLO: Improve wording of preamble text.  (Bug#55439)

2 years agoFix compiler warnings in printer code on 32-bit systems
Po Lu [Sat, 21 May 2022 06:46:57 +0000 (14:46 +0800)]
Fix compiler warnings in printer code on 32-bit systems

* print.c (enum print_entry_type, struct print_stack_entry):
Clean up coding style.
(struct print_stack): Make print_stack_entry.list.idx intmax_t,
like it was before the nonrecursive printing was installed.
Also clarify what "Brent cycle detection" means in the comments.

2 years agoCompute frame workareas on Haiku
Po Lu [Sat, 21 May 2022 06:28:06 +0000 (06:28 +0000)]
Compute frame workareas on Haiku

* lisp/frame.el (display-monitor-attributes-list): Implement
specially on Haiku as well.
* src/haiku_support.cc (get_zoom_rect): New function.  Extract
CalculateZoomRect here.
(class EmacsWindow, SetFullscreen): Use that instead of
CalculateZoomRect.
(be_get_explicit_workarea): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (Fhaiku_display_monitor_attributes_list): New
function.
(syms_of_haikufns): Register new subr.

2 years agoImplement monitor change hooks on NS
Po Lu [Sat, 21 May 2022 03:50:08 +0000 (11:50 +0800)]
Implement monitor change hooks on NS

This hasn't been tested with anything more complicated than
removing an emulated monitor.

* nsterm.m (ns_displays_reconfigured): New function.
(ns_term_init): Register display reconfiguration callbacks.

2 years agoCall XRRUpdateConfiguration when the root window geometry changes
Po Lu [Sat, 21 May 2022 03:34:51 +0000 (11:34 +0800)]
Call XRRUpdateConfiguration when the root window geometry changes

* src/xterm.c (handle_one_xevent): Call XRRUpdateConfiguration
on RRScreenChangeNotify and upon ConfigureNotify events for the
root window.

2 years agoImplement `display-monitors-changed-hook' on PGTK
Po Lu [Sat, 21 May 2022 03:29:22 +0000 (11:29 +0800)]
Implement `display-monitors-changed-hook' on PGTK

* src/pgtkterm.c (pgtk_draw_glyphless_glyph_string_foreground):
Pacify GCC 12.
(pgtk_monitors_changed_cb): New function.
(pgtk_term_init): Attach new signal handler.

2 years agoAdd a hook run upon monitor configuration changes
Po Lu [Sat, 21 May 2022 03:17:34 +0000 (11:17 +0800)]
Add a hook run upon monitor configuration changes

* doc/lispref/frames.texi (Multiple Terminals): Document new
hook `display-monitors-changed-functions'.
* etc/NEWS: Announce new abnormal hook.

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

* src/xterm.c (handle_one_xevent): Handle RRNotify and
RRScreenChangeNotify events.
(x_term_init): Select for RRScreenChange, RRCrtcChange and
RROutputChange.
* src/xterm.h (struct x_display_info): Improve RandR version
detection.

2 years agoRemove compat code; assume imenu.el exists
Stefan Kangas [Fri, 20 May 2022 18:56:54 +0000 (20:56 +0200)]
Remove compat code; assume imenu.el exists

* lisp/progmodes/antlr-mode.el (antlr-mode):
* lisp/progmodes/cperl-mode.el (cperl-menu):
* lisp/progmodes/f90.el (f90-mode-map):
* lisp/progmodes/fortran.el (fortran-menu):
* lisp/speedbar.el (speedbar-use-imenu-flag): Remove compat code;
assume imenu.el exists.

2 years ago; * src/xterm.c (struct x_client_list_window): Improve comment.
Po Lu [Fri, 20 May 2022 12:08:06 +0000 (20:08 +0800)]
; * src/xterm.c (struct x_client_list_window): Improve comment.

2 years agoCheck for allocation errors when setting XdndActionDescription
Po Lu [Fri, 20 May 2022 12:03:05 +0000 (20:03 +0800)]
Check for allocation errors when setting XdndActionDescription

* src/xterm.c (x_dnd_begin_drag_and_drop): Check for BadAlloc
when setting action descriptions.

2 years ago; * doc/lispref/text.texi (Yanking): Fix wording.
Eli Zaretskii [Fri, 20 May 2022 12:06:44 +0000 (15:06 +0300)]
; * doc/lispref/text.texi (Yanking): Fix wording.

2 years agoDocument 'enriched-toggle-markup'
Eli Zaretskii [Fri, 20 May 2022 12:03:06 +0000 (15:03 +0300)]
Document 'enriched-toggle-markup'

* etc/enriched.txt: Document the new 'enriched-toggle-markup'
command.  (Bug#33855)

2 years ago; * lisp/simple.el (yank-transform-functions): Doc fix.
Eli Zaretskii [Fri, 20 May 2022 11:51:07 +0000 (14:51 +0300)]
; * lisp/simple.el (yank-transform-functions): Doc fix.

2 years ago; Improve documentation of 'display-buffer-avoid-small-windows'
Eli Zaretskii [Fri, 20 May 2022 11:35:03 +0000 (14:35 +0300)]
; Improve documentation of 'display-buffer-avoid-small-windows'

* lisp/window.el (display-buffer-avoid-small-windows)
(get-lru-window):
* etc/NEWS:
* doc/lispref/windows.texi (Choosing Window Options): Improve
documentation of 'display-buffer-avoid-small-windows'.
(Bug#10186)

2 years agoAdd new user option display-buffer-avoid-small-windows
Lars Ingebrigtsen [Fri, 20 May 2022 10:05:34 +0000 (12:05 +0200)]
Add new user option display-buffer-avoid-small-windows

* doc/lispref/windows.texi (Choosing Window Options): Document it.
* lisp/window.el (display-buffer-avoid-small-windows): New user
option (bug#10186).
(get-lru-window): Use it.

2 years agoClarify select-active-regions doc string
Lars Ingebrigtsen [Fri, 20 May 2022 09:06:49 +0000 (11:06 +0200)]
Clarify select-active-regions doc string

* src/keyboard.c (syms_of_keyboard): Clarify doc string (bug#29889).

2 years agoFix race conditions processing zoom events on Haiku
Po Lu [Fri, 20 May 2022 09:28:19 +0000 (09:28 +0000)]
Fix race conditions processing zoom events on Haiku

* src/haiku_support.cc (Zoom):
* src/haiku_support.h (struct haiku_zoom_event): Include the
current fullscreen mode in the event.

* src/haikuterm.c (haiku_read_socket): Use that instead of the
current frame's fullscreen mode.

2 years agoRe-fix previous `&' dired change
Lars Ingebrigtsen [Fri, 20 May 2022 08:37:15 +0000 (10:37 +0200)]
Re-fix previous `&' dired change

* lisp/dired-aux.el (dired-shell-stuff-it): Re-fix the previous
change -- the &wait was in the wrong place (bug#36331).

2 years agoAdd option to kill a shell buffer when the process ends
Philip Kaludercic [Sun, 15 May 2022 00:09:46 +0000 (02:09 +0200)]
Add option to kill a shell buffer when the process ends

* shell.el (shell-kill-buffer-on-quit): Add new option (bug#55426).
(shell): Respect 'shell-kill-buffer-on-quit'.
* NEWS: Mention 'shell-kill-buffer-on-quit'.

2 years agoFix NS port warnings with GCC 12
Po Lu [Fri, 20 May 2022 06:46:45 +0000 (14:46 +0800)]
Fix NS port warnings with GCC 12

* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground):
Clear s->char2b after function returns.

2 years agoRemove flickering when toggling between different fullscreen states on Haiku
Po Lu [Fri, 20 May 2022 05:34:04 +0000 (05:34 +0000)]
Remove flickering when toggling between different fullscreen states on Haiku

* src/haiku_support.cc (FrameMoved): Don't allow moving the
frame along the "filled" axis when fullwidth or fullheight.
(ClearFullscreen): New argument `mode'.  Return the previous
rect but don't revert the frame to it if the target mode is not
NONE.
(SetFullscreen): Use rect provided by ClearFullscreen instead.

2 years agoMinor cleanups to X drag-and-drop code
Po Lu [Fri, 20 May 2022 03:21:47 +0000 (11:21 +0800)]
Minor cleanups to X drag-and-drop code

* src/xterm.c (struct x_client_list_window): Write comments
describing the meaning of each field.
(XM_DRAG_PROTOCOL_VERSION, xm_setup_dnd_targets)
(xm_setup_drag_info, xm_read_drag_receiver_info)
(x_dnd_compute_toplevels): Don't hard-code the supported Motif
protocol version.

2 years agoImplement `cross-disabled-images' on Haiku
Po Lu [Fri, 20 May 2022 02:27:06 +0000 (02:27 +0000)]
Implement `cross-disabled-images' on Haiku

* src/haiku_draw_support.cc (be_draw_cross_on_pixmap_1)
(be_draw_cross_on_pixmap): New functions.

* src/haiku_support.h: Update prototypes.

* src/image.c (image_pixmap_draw_cross, image_disable_image):
Implement drawing cross on Haiku.

2 years agoRename compare-window-configurations and update doc
Lars Ingebrigtsen [Fri, 20 May 2022 02:23:32 +0000 (04:23 +0200)]
Rename compare-window-configurations and update doc

* doc/lispref/windows.texi (Window Configurations): Update name.
* lisp/strokes.el (strokes-window-configuration-changed-p):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Update
callers and references.

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

* src/window.c (Fwindow_configuration_equal_p): Rename (bug#14964).

2 years agoDon't have the tutorial ask to save if we haven't moved
Lars Ingebrigtsen [Fri, 20 May 2022 01:59:03 +0000 (03:59 +0200)]
Don't have the tutorial ask to save if we haven't moved

* lisp/tutorial.el (tutorial--save-on-kill): Don't ask if the user
hasn't moved point (bug#37326).
(help-with-tutorial): Set the start point.

2 years agoImplement more data type conversions for Haiku selections
Po Lu [Fri, 20 May 2022 01:49:43 +0000 (01:49 +0000)]
Implement more data type conversions for Haiku selections

* src/haikuselect.c (haiku_message_to_lisp):
(lisp_to_type_code):
(haiku_lisp_to_message):
(Fhaiku_drag_message): Recognize `double' and `float' types.
(syms_of_haikuselect): New defsyms.

2 years agoFix font-locking of (defun foo (function ...))
Lars Ingebrigtsen [Fri, 20 May 2022 01:46:35 +0000 (03:46 +0200)]
Fix font-locking of (defun foo (function ...))

* lisp/emacs-lisp/lisp-mode.el (lisp--el-funcall-position-p):
Don't colorize the `function' in (defun foo (function ...)) as a
special form (bug#37074).

2 years agoMake diff--font-lock-prettify do less if we don't have a left fringe
Lars Ingebrigtsen [Fri, 20 May 2022 01:38:27 +0000 (03:38 +0200)]
Make diff--font-lock-prettify do less if we don't have a left fringe

* lisp/vc/diff-mode.el (diff--font-lock-prettify): Don't remove
insert/deletions from the buffer if we don't have a left fringe
(bug#37019).

2 years agoAdd a new command 'yank-in-context'
Lars Ingebrigtsen [Fri, 20 May 2022 01:24:30 +0000 (03:24 +0200)]
Add a new command 'yank-in-context'

* lisp/simple.el (escaped-string-quote): New variable.
(yank-in-context): New command.
(yank-in-context--transform): Helper function.

* lisp/progmodes/sh-script.el (sh-mode): Set up an
escaped-string-quote function.
* lisp/progmodes/sql.el (sql-mode): Define escaped-string-quote.

2 years agoFix session management detection of the first X display
Po Lu [Fri, 20 May 2022 01:11:38 +0000 (09:11 +0800)]
Fix session management detection of the first X display

* src/xterm.c (x_term_init): Check that there is no other
display in the chain instead of testing the terminal ID.

2 years agoClarify yank-transform-functions doc string
Lars Ingebrigtsen [Fri, 20 May 2022 00:09:43 +0000 (02:09 +0200)]
Clarify yank-transform-functions doc string

* lisp/simple.el (yank-transform-functions): Clarify calling
convention.

2 years agoMake completion in emacs-lisp-mode intern fewer symbols
Lars Ingebrigtsen [Fri, 20 May 2022 00:02:12 +0000 (02:02 +0200)]
Make completion in emacs-lisp-mode intern fewer symbols

* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Don't
intern the string before point just to check whether we're looking
at `ignore-error' (bug#55491).

2 years agoMake `&' in dired be more consistent wrt. user input
Lars Ingebrigtsen [Thu, 19 May 2022 23:35:58 +0000 (01:35 +0200)]
Make `&' in dired be more consistent wrt. user input

* lisp/dired-aux.el (dired-do-async-shell-command): Mention that
commands here don't accept input.

2 years agoAdd new command 'enriched-toggle-markup'
Lars Ingebrigtsen [Thu, 19 May 2022 23:17:02 +0000 (01:17 +0200)]
Add new command 'enriched-toggle-markup'

* lisp/textmodes/enriched.el (enriched-toggle-markup): New command
(bug#33855).

2 years agoAdd new user option 'yank-transform-functions'
Lars Ingebrigtsen [Thu, 19 May 2022 22:15:28 +0000 (00:15 +0200)]
Add new user option 'yank-transform-functions'

* doc/lispref/text.texi (Yanking): Mention it.
(Yanking): Document it.

* lisp/simple.el (yank-transform-functions): New user option.
(yank): Mention it.

* lisp/subr.el (insert-for-yank): Use it.

2 years ago; * etc/NEWS: Announce renaming of "Oriya" to "Odia". (Bug#55493)
Eli Zaretskii [Thu, 19 May 2022 12:34:29 +0000 (15:34 +0300)]
; * etc/NEWS: Announce renaming of "Oriya" to "Odia".  (Bug#55493)

2 years agoProvide Oriya language-environment alongside Odia
Eli Zaretskii [Thu, 19 May 2022 12:29:14 +0000 (15:29 +0300)]
Provide Oriya language-environment alongside Odia

* lisp/language/indian.el ("Oriya"): Add another name for the Odia
language-environment.  (Bug#55493)

2 years agoRename Oriya to Odia, and more
समीर सिंह Sameer Singh [Wed, 18 May 2022 19:38:14 +0000 (01:08 +0530)]
Rename Oriya to Odia, and more

Due to "The Orissa (Alteration of Name) Act, 2011"
(https://legislative.gov.in/sites/default/files/A2011-15.pdf)
Oriya has been renamed to Odia.

* lisp/language/indian.el (set-language-info-alist): Rename
Oriya to Odia.  Improve Oriya composition rules.
* lisp/leim/quail/indian.el ("odia"): New input method.
* lisp/erc/erc-lang.el: Obsolete the iso-638-languages variable
(which was a typo) and replace it with iso-639-1-languages.

* etc/HELLO: Rename Oriya to Odia.
Replace the old Odia greeting with the new one.
Add a Hindi greeting separate from the Devanagari one.
(Bug#55493)

2 years agoWhitelist some incorrectly labeled "color" fonts under Xft
Po Lu [Thu, 19 May 2022 12:10:19 +0000 (20:10 +0800)]
Whitelist some incorrectly labeled "color" fonts under Xft

* etc/PROBLEMS: Document problem with fonts incorrectly labeled
as color fonts under Xft.

* src/ftfont.c (xft_color_font_whitelisted_p): New function.
(ftfont_spec_pattern, ftfont_list): Respect whitelisting of
"color" fonts under Xft.
* src/xftfont.c (syms_of_xftfont): New variable
`xft-color-font-whitelist'.

2 years agoFix tooltip buffer flipping inside popup menus
Po Lu [Thu, 19 May 2022 09:36:24 +0000 (17:36 +0800)]
Fix tooltip buffer flipping inside popup menus

* src/xterm.c (x_flip_and_flush): Don't ignore if
`inhibit-redisplay' but F is a tooltip frame.  (bug#55519)

2 years agoFix error handling when allowing touch events
Po Lu [Thu, 19 May 2022 09:02:38 +0000 (17:02 +0800)]
Fix error handling when allowing touch events

* src/xterm.c (handle_one_xevent): Catch errors correctly when
linking touch points.

2 years ago; * doc/misc/efaq.texi: Replace copyright years with ranges.
Stefan Kangas [Thu, 19 May 2022 08:12:43 +0000 (10:12 +0200)]
; * doc/misc/efaq.texi: Replace copyright years with ranges.

2 years agoFix Flymake diagnostics reporting in non-UTF-8 locales
Eli Zaretskii [Thu, 19 May 2022 08:00:36 +0000 (11:00 +0300)]
Fix Flymake diagnostics reporting in non-UTF-8 locales

* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile)
(elisp-flymake--batch-compile-for-flymake): Bind I/O encoding to
UTF-8, instead of relying on the locale's defaults.  This is
needed because ELisp files use UTF-8 by default, but Flymake
doesn't know about that, since it isn't specific to ELisp.

2 years agoFix specifying terminal names to some functions on Haiku
Po Lu [Thu, 19 May 2022 06:46:21 +0000 (06:46 +0000)]
Fix specifying terminal names to some functions on Haiku

* src/haikufns.c (haiku_display_info_for_name): Implement
correctly.

2 years agoSatisfy Valgrind when iconifying frames
Po Lu [Thu, 19 May 2022 05:50:39 +0000 (13:50 +0800)]
Satisfy Valgrind when iconifying frames

* src/xterm.c (x_iconify_frame): Set the rest of data in the
WM_CHANGE_STATE message to 0 instead of leaving it
uninitialized.

2 years agoFix race conditions processing frame fullscreen state on Haiku
Po Lu [Thu, 19 May 2022 03:43:39 +0000 (03:43 +0000)]
Fix race conditions processing frame fullscreen state on Haiku

* doc/lispref/frames.texi (Size Parameters): Remove note saying
Haiku doesn't support `fullwidth' and `fullboth'.

* src/haiku_support.cc (subset_windows, class EmacsWindow)
(Unparent, ParentTo): Stop calling old fullscreen functions.
(ClearFullscreen, FullscreenRectForMode, SetFullscreen): New
functions.  Completely rewrite old zoom and fullscreen handling
code.
(Zoom): Send a ZOOM_EVENT and don't actually zoom.
(BWindow_zoom, EmacsWindow_make_fullscreen, EmacsWindow_unzoom):
Delete functions.
(be_set_window_fullscreen_mode): New function.

* src/haiku_support.h (struct haiku_zoom_event): Remove
`zoomed_p' parameter.
(enum haiku_fullscreen_mode): New enum.  Update prototypes.

* src/haikufns.c (Fx_display_pixel_height): Return height
instead of width.

* src/haikuterm.c (haiku_make_fullscreen_consistent)
(haiku_read_socket, haiku_fullscreen): Adjust to always set zoom
and fullscreen in the main thread instead of the UI threads.

* src/haikuterm.h (struct haiku_output): Remove flag `zoomed_p'
and add field `fullscreen_mode'.

2 years agoRespond to changes to the size of the root window
Po Lu [Thu, 19 May 2022 01:30:33 +0000 (09:30 +0800)]
Respond to changes to the size of the root window

* src/xterm.c (x_display_pixel_height, x_display_pixel_width):
Move here instead.
(handle_one_xevent): Handle ConfigureNotify for the root window.
(x_term_init): Select for structure events on the root window.

* src/xterm.h (struct x_display_info): New fields `screen_width'
and `screen_height'.
(x_display_pixel_height, x_display_pixel_width): Make
prototypes.

2 years agoDelete entry on SPC completes file names from FAQ
Stefan Kangas [Wed, 18 May 2022 23:41:44 +0000 (01:41 +0200)]
Delete entry on SPC completes file names from FAQ

* doc/misc/efaq.texi (SPC no longer completes file names): Delete
node: this is about a change that took place over 15 years ago and is
not likely to be a FAQ these days.

2 years agoDon't refer to obsolete Ultrix support in FAQ
Stefan Kangas [Wed, 18 May 2022 23:27:31 +0000 (01:27 +0200)]
Don't refer to obsolete Ultrix support in FAQ

* doc/misc/efaq.texi (Meta key does not work in xterm): Delete
reference to Ultrix; that platform support was removed in Emacs 23.1.

2 years agoAvoid formatting twice in flymake
Paul Eggert [Wed, 18 May 2022 19:39:30 +0000 (12:39 -0700)]
Avoid formatting twice in flymake

* lisp/progmodes/flymake.el (flymake-error): Don't format a
message twice, as that can translate quotes we don't want
translated.

2 years agoFix last change in minibuffer-lazy-highlight-setup
Augusto Stoffel [Sun, 15 May 2022 20:48:50 +0000 (22:48 +0200)]
Fix last change in minibuffer-lazy-highlight-setup

* lisp/isearch.el (minibuffer-lazy-highlight-setup): Apply advices
buffer-locally.

2 years ago; * lisp/progmodes/flymake.el (flymake-mode): Fix a typo.
Eli Zaretskii [Wed, 18 May 2022 13:53:49 +0000 (16:53 +0300)]
; * lisp/progmodes/flymake.el (flymake-mode): Fix a typo.

2 years agoAdd a new display-buffer-full-frame display action
Lars Ingebrigtsen [Wed, 18 May 2022 13:33:11 +0000 (15:33 +0200)]
Add a new display-buffer-full-frame display action

* doc/lispref/windows.texi (Buffer Display Action Functions):
Document it.

* lisp/window.el (display-buffer-full-frame): New display action
(bug#34169).
(display-buffer--action-function-custom-type): Add.
(display-buffer): Mention it.

2 years agoMention next-error-function in flymake-mode doc string
Lars Ingebrigtsen [Wed, 18 May 2022 12:13:16 +0000 (14:13 +0200)]
Mention next-error-function in flymake-mode doc string

* lisp/progmodes/flymake.el (flymake-mode): Note that you can set
next-error-function (bug#32322).

2 years agoImplement gamma-correction on Haiku
Po Lu [Wed, 18 May 2022 12:36:50 +0000 (12:36 +0000)]
Implement gamma-correction on Haiku

* src/dispextern.h: Add `gamma_correct' prototype on Haiku as
well.
* src/haikufns.c (gamma_correct): New function.
* src/haikuterm.c (haiku_defined_color): Gamma-correct colors if
their pixels are being allocated.

2 years agoImprove previous apropos-documentation-check-elc-file change
Lars Ingebrigtsen [Wed, 18 May 2022 11:20:26 +0000 (13:20 +0200)]
Improve previous apropos-documentation-check-elc-file change

* lisp/apropos.el (apropos-documentation-check-elc-file): Add
comment to explain what's going on and expand to lisp-directory
(bug#55492).

2 years agoFix M-x compile-defun when an interactive form is (list ...)
Alan Mackenzie [Wed, 18 May 2022 09:18:15 +0000 (09:18 +0000)]
Fix M-x compile-defun when an interactive form is (list ...)

This is for when lexical-binding is nil.  The problem fixed was M-x
compile-defun leaving symbols with position in the compiled function's arglist
and interactive form.  This fixes bug #55323.  Also ensure the doc string is
correctly stripped when lexical-binding is t.

* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): For a (list ...)
interactive form when lexical-binding is nil, strip the positions from the
symbols in the form.  Also strip the position from the symbols in the arglist.
(byte-compile-make-closure): (Twice) strip symbols from positions in the doc
string expression.  Add comments.

2 years agoClean up and simplify 'quit-restore-window' code
Martin Rudalics [Wed, 18 May 2022 09:09:58 +0000 (11:09 +0200)]
Clean up and simplify 'quit-restore-window' code

* lisp/window.el (window--quit-restore-select-window): New internal
name for 'quit-restore-select-window'.
(quit-restore-window): Use 'window--quit-restore-select-window'
instead of 'quit-restore-select-window'.  Simplify code.

2 years agoMake printing mostly non-recursive (bug#55481)
Mattias Engdegård [Fri, 13 May 2022 11:36:13 +0000 (13:36 +0200)]
Make printing mostly non-recursive (bug#55481)

Introduce explicit stacks for traversing common data types during
printing: conses, vectors, records, byte-code, hash-tables and
char-tables, all previously traversed using recursion in C.  This
greatly reduces the risk of crashing Emacs from C stack overflow
when printing deeply nested data.

* src/print.c (Fprinc, print, PRINT_CIRCLE_CANDIDATE_P):
Special-case Fprinc with a plain string argument to eliminate the need
for keeping track of print_depth during the preprocessing phase.
This also improves performance.
(struct print_pp_entry, struct print_pp_stack, ppstack)
(grow_pp_stack, pp_stack_push_value, pp_stack_push_values)
(pp_stack_empty_p, pp_stack_pop):
New stack for preprocessing.
(print_preprocess):
Make mostly nonrecursive, except for string properties.
(enum print_entry_type, struct print_stack_entry)
(struct print_stack, prstack, grow_print_stack)
(print_stack_push, print_stack_push_vector):
New stack for printing.
(print_vectorlike, print_object):
Make mostly nonrecursive, except for string properties and some less
heavily used types.
* test/src/print-tests.el (print-deeply-nested):
New test.

2 years ago; Fix thinko in etc/NEWS
Michael Albinus [Wed, 18 May 2022 08:05:32 +0000 (10:05 +0200)]
; Fix thinko in etc/NEWS

2 years agoAvoid dismissing GTK+ popup menus upon wheel movement
Po Lu [Wed, 18 May 2022 06:55:23 +0000 (14:55 +0800)]
Avoid dismissing GTK+ popup menus upon wheel movement

* src/xterm.c (handle_one_xevent): Don't forward XI button
events for wheel buttons to GTK+ when a popup menu is active.

2 years agoFix race conditions when calculating Haiku frame geometry
Po Lu [Wed, 18 May 2022 04:07:31 +0000 (04:07 +0000)]
Fix race conditions when calculating Haiku frame geometry

* src/haiku_support.cc (be_lock_window, be_unlock_window): New
functions.
* src/haiku_support.h: Update prototypes.

* src/haikufns.c (frame_geometry): Lock window before asking for
its dimensions and frame.

2 years agoDon't allow moving fullscreen frames on Haiku
Po Lu [Wed, 18 May 2022 01:23:32 +0000 (01:23 +0000)]
Don't allow moving fullscreen frames on Haiku

* src/haikuterm.c (haiku_set_window_size): Fix typo in comment.
(haiku_set_offset): Prevent offset from changing in fullboth
frames.

2 years agoFix a crash when an X connection is dropped in some situations
Po Lu [Wed, 18 May 2022 01:07:41 +0000 (09:07 +0800)]
Fix a crash when an X connection is dropped in some situations

* src/xterm.c (x_flip_and_flush): Don't try to flush if
`inhibit-redisplay' is t.

2 years agoFix apropos-documentation with universal argument
Lars Ingebrigtsen [Tue, 17 May 2022 23:22:18 +0000 (01:22 +0200)]
Fix apropos-documentation with universal argument

* lisp/apropos.el (apropos-documentation-check-elc-file): Look up
.elc files in the load path (and don't bug out on deleted .elc
files) (bug#55492).

2 years agoRecommend Wikipedia over Usenet in FAQ
Stefan Kangas [Tue, 17 May 2022 23:10:22 +0000 (01:10 +0200)]
Recommend Wikipedia over Usenet in FAQ

* doc/misc/efaq.texi (Origin of the term Emacs): Recommend
Wikipedia over Usenet to find out more about TECO.

2 years agoRemove some ancient Emacs compat code
Stefan Kangas [Tue, 17 May 2022 22:27:52 +0000 (00:27 +0200)]
Remove some ancient Emacs compat code

* lisp/cedet/mode-local.el (mode-local-describe-bindings-1):
* lisp/cedet/semantic/senator.el (senator-copy-tag-to-register):
* lisp/gnus/nnrss.el (nnrss-opml-export):
* lisp/net/newst-backend.el (newsticker-opml-export):
* lisp/textmodes/reftex.el (reftex-mode-menu):
* lisp/woman.el (woman-menu): Remove some ancient Emacs compat code.

2 years agoUpdate comment about comint-osc-handlers
Matthias Meulien [Tue, 17 May 2022 21:36:27 +0000 (23:36 +0200)]
Update comment about comint-osc-handlers

* lisp/comint.el: Update comment about comint-osc-handlers.

2 years agoAllow running several commands in compilation-start
Lars Ingebrigtsen [Tue, 17 May 2022 20:07:27 +0000 (22:07 +0200)]
Allow running several commands in compilation-start

* lisp/progmodes/compile.el (compilation-start): Allow not erasing
the contents of the buffer (bug#28892).

2 years agoUse better word for "buffer" in Greek TUTORIAL (bug#55332)
Protesilaos Stavrou [Tue, 17 May 2022 19:16:31 +0000 (22:16 +0300)]
Use better word for "buffer" in Greek TUTORIAL (bug#55332)

* TUTORIAL.el_GR: Replace all instances of "αποσβεστήρας" with the
more accurate "ενταμιευτής".

2 years agoFix bogus future history entries for `M-x grep'
Lars Ingebrigtsen [Tue, 17 May 2022 19:00:25 +0000 (21:00 +0200)]
Fix bogus future history entries for `M-x grep'

* lisp/net/mailcap.el (mailcap-file-default-commands): If we have
no matching MIME types, don't iterate over (nil) (bug#27236).

This fixes things like:

(mailcap-file-default-commands '("grep --color=auto -nH --null '' "))
=> ("/usr/bin/emacs -nw")

2 years agoExplain more about jit-lock-mode calling conventions
Lars Ingebrigtsen [Tue, 17 May 2022 18:01:11 +0000 (20:01 +0200)]
Explain more about jit-lock-mode calling conventions

* lisp/jit-lock.el (jit-lock-mode): Explicitly explain ARG
(bug#55451).

2 years agoFix pp-emacs-lisp-code printing of cons cells
Lars Ingebrigtsen [Tue, 17 May 2022 17:45:20 +0000 (19:45 +0200)]
Fix pp-emacs-lisp-code printing of cons cells

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Fix printing of cons
cells (bug#55478).

2 years agoCorrect cycle-spacing-actions type
Robert Pluim [Tue, 17 May 2022 15:38:18 +0000 (17:38 +0200)]
Correct cycle-spacing-actions type

* lisp/simple.el (cycle-spacing-actions): Fix type for predefined
action with fixed numeric arg case.

2 years agoClarify 'cycle-spacing-actions' docstring
Robert Pluim [Tue, 17 May 2022 15:23:03 +0000 (17:23 +0200)]
Clarify 'cycle-spacing-actions' docstring

* lisp/simple.el (cycle-spacing-actions): Clarify docstring.

2 years ago; * lisp/simple.el (cycle-spacing-actions): Fix typo
Robert Pluim [Tue, 17 May 2022 15:20:34 +0000 (17:20 +0200)]
; * lisp/simple.el (cycle-spacing-actions): Fix typo

2 years ago; Fix typos in etc/NEWS
Michael Albinus [Tue, 17 May 2022 15:27:15 +0000 (17:27 +0200)]
; Fix typos in etc/NEWS

2 years ago; * etc/NEWS: Rewrite entries for added support of old scripts.
Eli Zaretskii [Tue, 17 May 2022 13:21:34 +0000 (16:21 +0300)]
; * etc/NEWS: Rewrite entries for added support of old scripts.

2 years agoAvoid race conditions when computing real frame positions on Haiku
Po Lu [Tue, 17 May 2022 13:13:18 +0000 (13:13 +0000)]
Avoid race conditions when computing real frame positions on Haiku

* src/haiku_support.cc (DispatchMessage): Accept
SEND_MOVE_FRAME_EVENT.
(class EmacsWindow, FrameMoved): Include decorator frame in
MOVE_EVENT events.
(be_send_move_frame_event): New function.
* src/haiku_support.h (struct haiku_move_event): Include
decorator dimensions.  Update prototypes.

* src/haikufns.c (haiku_update_after_decoration_change): Ask for
a move frame event and don't do anything if configury is not yet
complete.

* src/haikuterm.c (haiku_read_socket): Adjust accordingly.

2 years agoAdd support for the Modi script
समीर सिंह Sameer Singh [Mon, 16 May 2022 23:03:57 +0000 (04:33 +0530)]
Add support for the Modi script

* lisp/language/indian.el ("Modi"): New language environment.
Add composition rules for Modi.  Add sample text and input
method.
Add sample text to various scripts.
Rename Punjabi to Gurmukhi.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Modi.
* lisp/leim/quail/indian.el ("modi"): New input method.
(Bug#55439)

* etc/HELLO: Add a Modi greeting.
Rename Hindi to Devanagari.
Add a Gurmukhi greeting.
Replace Odia greeting.
* etc/NEWS: Announce the new language environment and its
input method.

2 years agoCC Mode: Correct a rare error in the state cache
Alan Mackenzie [Tue, 17 May 2022 11:26:05 +0000 (11:26 +0000)]
CC Mode: Correct a rare error in the state cache

* lisp/progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache): Do
not record a position in a macro as the starting position in
c-state-brace-pair-desert.  Instead record the position at the beginning of
that macro.

2 years agoCorrect indentation of opening brace in xdisp.c, which isn't at start of defun
Alan Mackenzie [Tue, 17 May 2022 10:30:05 +0000 (10:30 +0000)]
Correct indentation of opening brace in xdisp.c, which isn't at start of defun

* xdisp.c (calc_pixel_width_or_height): indent the opening brace of a
substatement correctly.  It's previous position, in column 0, caused
indentation errors in C Mode.

2 years agoFix unused function warning on X
Po Lu [Tue, 17 May 2022 10:18:32 +0000 (18:18 +0800)]
Fix unused function warning on X

* src/xsettings.c (xg_settings_key_valid_p): Surround with
HAVE_PGTK and HAVE_GSETTINGS.

2 years agoFix font options compilation with gsettings disabled
Pieter van Prooijen [Mon, 16 May 2022 13:20:27 +0000 (15:20 +0200)]
Fix font options compilation with gsettings disabled

* src/xsettings.c (xsettings_get_font_options): Return a font_options
even if gsettings is not enabled.

2 years agoRewrite Haiku frame geometry code to handle decorator frames
Po Lu [Tue, 17 May 2022 09:40:57 +0000 (09:40 +0000)]
Rewrite Haiku frame geometry code to handle decorator frames

* doc/lispref/frames.texi (Frame Layout): Document changes to
Haiku frame layout.

* src/haiku_support.cc (class EmacsWindow, MoveToIncludingFrame)
(EmacsMoveTo, MakeFullscreen): Move to an offset including the
decorator frames.
(be_get_window_decorator_dimensions):
(be_get_window_decorator_frame): New functions.

* src/haiku_support.h: Update prototypes.

* src/haikufns.c (haiku_update_after_decoration_change): New
function.
(haiku_create_frame, haiku_set_undecorated)
(haiku_set_override_redirect): Call that function.
(frame_geometry): Actually calculate frame geometry based on
decorator and frame sizes.

* src/haikuterm.c (haiku_coords_from_parent): Use frame width
instead.
(haiku_read_socket): Set left and top positions based on
decorator width and height.
* src/haikuterm.h (struct haiku_output): New field `frame_x' and
`frame_y'.

2 years agoFix package-quickstart breakage
Lars Ingebrigtsen [Tue, 17 May 2022 09:48:12 +0000 (11:48 +0200)]
Fix package-quickstart breakage

* lisp/emacs-lisp/package.el (package-quickstart-refresh): Work
around syntax-ppss now clobbering match data (but it's not clear
whether that's supposed to be allowed) (bug#55447).

2 years agoImprove Finternal__define_uninitialized_variable erroring
Lars Ingebrigtsen [Tue, 17 May 2022 09:06:33 +0000 (11:06 +0200)]
Improve Finternal__define_uninitialized_variable erroring

* src/eval.c (Finternal__define_uninitialized_variable): Say what
symbol we're bugging out on for easier debugging.

2 years agoFix edebug-tests test failure after prin1 change
Lars Ingebrigtsen [Tue, 17 May 2022 08:09:48 +0000 (10:09 +0200)]
Fix edebug-tests test failure after prin1 change

* lisp/emacs-lisp/ert-x.el (ert--make-print-advice): Fix test
failures in edebug-tests.

2 years agoFix Tramp sshfs tests (don't merge)
Michael Albinus [Tue, 17 May 2022 07:14:36 +0000 (09:14 +0200)]
Fix Tramp sshfs tests (don't merge)

* test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare.
(tramp-test16-directory-files)
(tramp-test16-file-expand-wildcards)
(tramp-test26-file-name-completion, tramp--test-check-files): Use it.
(tramp--test-check-files): Delete directory recursively.