]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoAdd support for the Batak script (bug #55694)
समीर सिंह Sameer Singh [Sun, 29 May 2022 13:25:58 +0000 (18:55 +0530)]
Add support for the Batak script (bug #55694)

* lisp/language/indonesian.el ("Batak"): New language environment.
Add composition rules for Batak.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Batak.
* lisp/leim/quail/indonesian.el ("batak"): New input method.
Rename TITLE of balinese, javanese and sundanese in
("quail-define-package").

* etc/HELLO: Add a Batak greeting.
* etc/NEWS: Announce the new language environment and its
input method.

2 years agoFix hfy-etags-cmd type
Lars Ingebrigtsen [Sun, 29 May 2022 14:40:53 +0000 (16:40 +0200)]
Fix hfy-etags-cmd type

* lisp/htmlfontify.el (hfy-etags-cmd): Fix the type -- this
variable usually ends up being nil.

2 years agoFix reference to help-enable-variable-value-editing
Daniel Martín [Sun, 29 May 2022 14:31:38 +0000 (16:31 +0200)]
Fix reference to help-enable-variable-value-editing

* lisp/help-mode.el (help-mode): Fix docstring to reference the
correct variable name.
* lisp/ldefs-boot.el (help-mode): Ditto (bug#55705).

2 years ago* etc/tutorial/TUTORIAL.cn (INSTALLING PACKAGES): Translate from English.
Po Lu [Sun, 29 May 2022 12:13:25 +0000 (20:13 +0800)]
* etc/tutorial/TUTORIAL.cn (INSTALLING PACKAGES): Translate from English.

2 years ago; * lisp/leim/quail/indonesian.el: Remove ineffective backslashes.
Mattias Engdegård [Sun, 29 May 2022 08:54:25 +0000 (10:54 +0200)]
; * lisp/leim/quail/indonesian.el: Remove ineffective backslashes.

2 years agoTraverse record literals in byte-compile--first-symbol-with-pos
Mattias Engdegård [Sun, 29 May 2022 08:49:13 +0000 (10:49 +0200)]
Traverse record literals in byte-compile--first-symbol-with-pos

* lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos):
Traverse record literals as well as vectors.  Either is rather
pointless but there were some strong feelings about it.

2 years ago* admin/alloc-colors.c: Fix missing declaration.
Po Lu [Sun, 29 May 2022 08:32:34 +0000 (16:32 +0800)]
* admin/alloc-colors.c: Fix missing declaration.

2 years ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sun, 29 May 2022 08:00:36 +0000 (11:00 +0300)]
; * etc/NEWS: Fix last change.

2 years agoMake `count-words' count sentences.
Manuel Giraud [Fri, 20 May 2022 11:52:28 +0000 (13:52 +0200)]
Make `count-words' count sentences.

* lisp/textmodes/paragraphs.el (count-sentences): New function.
* lisp/simple.el (count-words--format): Update format for showing
sentences.
(count-words): Also count sentences.

* lisp/simple.el (count-words):
* etc/NEWS:
* doc/emacs/basic.texi (Position Info): Update documentation for
sentence counting.

2 years agoKeep display mm width and height up to date after changes
Po Lu [Sun, 29 May 2022 07:49:48 +0000 (15:49 +0800)]
Keep display mm width and height up to date after changes

* src/xfns.c (Fx_display_mm_width, Fx_display_mm_height): Use
new fields if they are set.
* src/xterm.c (handle_one_xevent): Set new fields on RRNotify if
the screen is correct.
* src/xterm.h (struct x_display_info): New fields
`screen_mm_width', `screen_mm_height'.

2 years agoMake DND target list lifecycle a little clearer
Po Lu [Sun, 29 May 2022 04:55:54 +0000 (12:55 +0800)]
Make DND target list lifecycle a little clearer

* src/xfns.c (Fx_begin_drag): Pass target atoms and ntargets to
x_dnd_begin_drag_and_drop instead.
* src/xterm.c (x_set_dnd_targets): Make static.
(x_clear_dnd_targets): Delete function.
(x_dnd_begin_drag_and_drop): Adjust to set targets here instead.
* src/xterm.h: Update prototypes.

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

f9ee83bfb9 do_switch_frame: before leaving mini-window, check other (...
908e2e09d0 Fix commands used to produce on-line HTML docs
fff770fb97 Fix a bad cross-reference in elisp.pdf
ebea3415b0 Fix documentation of 'string-pad'

2 years agoFix pending window changes in haiku_set_window_size
Po Lu [Sun, 29 May 2022 01:05:54 +0000 (01:05 +0000)]
Fix pending window changes in haiku_set_window_size

* src/haikuterm.c (haiku_set_window_size): Wait for
FRAME_RESIZED events, then call `do_pending_window_change'.
(haiku_read_socket): Allow waiting for FRAME_RESIZED events.

2 years agoImprove error trapping on X
Po Lu [Sun, 29 May 2022 00:51:17 +0000 (08:51 +0800)]
Improve error trapping on X

* xterm.c (x_uncatch_errors, x_had_errors_p): Don't sync if no
request was made since the error trap was installed.

2 years agoFix Python Hideshow problem with backslash escaped newlines
kobarity [Sat, 28 May 2022 16:51:01 +0000 (18:51 +0200)]
Fix Python Hideshow problem with backslash escaped newlines

* lisp/progmodes/python.el (python-rx)
(python-nav-beginning-of-defun-regexp): Allow
python-nav-*-defun to handle backslash escaped newlines
(bug#55690).

2 years agopp--insert-lisp: Don't bug out on certain forms at beginning of buffer
Visuwesh [Sat, 28 May 2022 10:54:32 +0000 (12:54 +0200)]
pp--insert-lisp: Don't bug out on certain forms at beginning of buffer

* pp.el (pp--insert): Check if point is in beginning of buffer before
calling `looking-back' (bug#55677).

2 years agowith-connection-local-variables: Avoid code duplication
Stefan Monnier [Sat, 28 May 2022 16:02:15 +0000 (12:02 -0400)]
with-connection-local-variables: Avoid code duplication

Move the bulk of the code of `with-connection-local-variables` into
a separate function, which both avoids duplicating that code but also
avoids duplicating the code passed as the body of
a `with-connection-local-variables`.  Also makes it easier to
debug the code, or change the implementation of
`with-connection-local-variables` without having to recompile all
the users.

* lisp/files-x.el (with-connection-local-variables-1): New function,
extracted from `with-connection-local-variables`.
(with-connection-local-variables): Use it.

2 years agodo_switch_frame: before leaving mini-window, check other (mru) window is live
Alan Mackenzie [Sat, 28 May 2022 12:55:32 +0000 (12:55 +0000)]
do_switch_frame: before leaving mini-window, check other (mru) window is live

This fixes bug#55684.  There, with a minibuffer-only frame at start up,
Emacs tried to switch to this frame, whose selected window was the
mini-window.  There is no other active window in this frame, so the
attempt to swith to another window failed.

* src/frame.c (do_switch_frame): On switching to a frame whose selected
window is as above, before selecting the most recently used window, check
this ostensible window is an actual live window.  Otherwise leave the
mini-window selected.

2 years agoFix commands used to produce on-line HTML docs
Eli Zaretskii [Sat, 28 May 2022 11:57:55 +0000 (14:57 +0300)]
Fix commands used to produce on-line HTML docs

* admin/admin.el (manual-meta-string): Only include the first
line, and move the rest...
(manual-links-string): ...to this new string.
(manual-html-fix-headers): Don't remove the '<meta name=' elements
produced by makeinfo, especially not the 'name="viewport"' one,
which is essential for viewing the docs on mobile devices.
Reported by "Facundo Lander via RT" <webmasters-comment@gnu.org>,
see gnu.org ticket #1840138.

2 years agoSupport html template tag in shr
Valenoern [Sat, 28 May 2022 10:43:20 +0000 (12:43 +0200)]
Support html template tag in shr

* lisp/net/shr.el: Add shr-tag-template as a dummy tag.
Copyright-paperwork-exempt: yes

2 years agoFix native-comp of trampolines after previous change
Lars Ingebrigtsen [Sat, 28 May 2022 10:31:52 +0000 (12:31 +0200)]
Fix native-comp of trampolines after previous change

* lisp/emacs-lisp/comp.el (comp--native-compile): Don't delete the
explicitly specified output file, just temp files.

2 years ago; * lisp/leim/quail/indonesian.el ("sundanese"): Fix whitespace.
Eli Zaretskii [Sat, 28 May 2022 10:16:04 +0000 (13:16 +0300)]
; * lisp/leim/quail/indonesian.el ("sundanese"): Fix whitespace.

2 years agoAdd support for the Sundanese script (bug#55686)
समीर सिंह Sameer Singh [Thu, 26 May 2022 13:05:00 +0000 (18:35 +0530)]
Add support for the Sundanese script (bug#55686)

* lisp/language/indonesian.el ("Sundanese"): New language environment.
Add composition rules for Sundanese.  Add sample text and input
method.
Improve composition rules for Balinese and Javanese.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Sundanese.
* lisp/leim/quail/indonesian.el ("sundanese"): New input method.

* etc/HELLO: Add a Sundanese greeting.
* etc/NEWS: Announce the new language environment and its
input method.

2 years agoFix a bad cross-reference in elisp.pdf
Eli Zaretskii [Sat, 28 May 2022 08:51:15 +0000 (11:51 +0300)]
Fix a bad cross-reference in elisp.pdf

* doc/lispref/control.texi (pcase Macro): Fix a conditional
cross-reference (bug#55689).

2 years agoFix dired drag-and-drop for certain Motif programs
Po Lu [Sat, 28 May 2022 08:48:49 +0000 (16:48 +0800)]
Fix dired drag-and-drop for certain Motif programs

* lisp/dired.el (dired-mouse-drag): Announce _DT_NETFILE in
targets list as well.
* lisp/select.el (xselect--encode-string): New arg
`prefer-string-to-c-string'.
(xselect-convert-to-filename): Convert to TEXT instead of
C_STRING, but use STRING if the type would otherwise be
C_STRING.
(xselect-dt-netfile-available-p, xselect-tt-net-file)
(xselect-convert-to-dt-netfile): New functions.
(selection-converter-alist): New selection converter.

2 years agoFix documentation of 'string-pad'
Eli Zaretskii [Sat, 28 May 2022 07:55:01 +0000 (10:55 +0300)]
Fix documentation of 'string-pad'

* doc/lispref/strings.texi (Creating Strings): Fix description of
'string-pad'.  (Bug#55688)

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 28 May 2022 05:06:30 +0000 (07:06 +0200)]
Merge from origin/emacs-28

d3cde28b03 Fix more occurrences of renamed kmacro-keymap command
bd5c95a90d Mention "unspecified-fg" and "unspecified-bg" in some doc ...

2 years agoAdd more cursor bitmaps on Haiku
Po Lu [Sat, 28 May 2022 04:35:12 +0000 (04:35 +0000)]
Add more cursor bitmaps on Haiku

* src/haikufns.c (cursor_bitmaps_for_id): Add hourglass cursor.

2 years agoImprove documentation on what callers of `x-begin-drag' should do
Po Lu [Sat, 28 May 2022 02:30:45 +0000 (10:30 +0800)]
Improve documentation on what callers of `x-begin-drag' should do

* doc/lispref/frames.texi (Drag and Drop):
* src/xfns.c (Fx_begin_drag): Improve documentation of how the
chosen action should be performed.

2 years agoImprove documentation of `x-begin-drag'
Po Lu [Sat, 28 May 2022 02:21:52 +0000 (10:21 +0800)]
Improve documentation of `x-begin-drag'

* src/xfns.c (Fx_begin_drag): Fix typos and improve wording.

2 years agoImprove safety of various DND callbacks
Po Lu [Sat, 28 May 2022 02:09:19 +0000 (10:09 +0800)]
Improve safety of various DND callbacks

* src/xterm.c (x_dnd_begin_drag_and_drop): Restore selection
events if DND is no longer in progress and don't call
x-dnd-movement-function.

2 years agoFix frame destruction issues and misuse of x_get_atom_name
Po Lu [Sat, 28 May 2022 01:37:29 +0000 (09:37 +0800)]
Fix frame destruction issues and misuse of x_get_atom_name

* src/frame.c (delete_frame): Prevent deleting the dnd frame
while waiting for finish as well.
* src/xselect.c (Fx_get_atom_name): Clean up code and fix
uninitialized use of need_sync.
* src/xterm.c (x_dnd_send_unsupported_drop, x_dnd_send_drop)
(handle_one_xevent): Clean up usage of x_get_atom_name.
(x_get_atom_name): Accept NULL for need_sync.

* src/xterm.h: Update declarations.

2 years ago; * src/nsselect.m (ns_decode_data_to_pasteboard): Fix GNUstep build.
Po Lu [Sat, 28 May 2022 01:21:40 +0000 (09:21 +0800)]
; * src/nsselect.m (ns_decode_data_to_pasteboard): Fix GNUstep build.

2 years agoFix build on earlier versions of Mac OS X
Po Lu [Sat, 28 May 2022 01:19:33 +0000 (09:19 +0800)]
Fix build on earlier versions of Mac OS X

* src/nsselect.m (ns_decode_data_to_pasteboard): Respect
NS_USE_NSPasteboardTypeFileUrl.

2 years agoAdd file dragging support to NS port
Po Lu [Sat, 28 May 2022 01:18:09 +0000 (09:18 +0800)]
Add file dragging support to NS port

* lisp/dired.el (dired-mouse-drag-files): Document that
`dired-mouse-drag-files' now works on NS.

* lisp/term/ns-win.el (x-begin-drag): Handle FILE_NAME.
* src/nsselect.m (ns_decode_data_to_pasteboard): Handle file URL
type.
(ns_lisp_to_pasteboard, Fns_begin_drag): Handle new type `file'.

2 years agoImprove DND documentation
Po Lu [Sat, 28 May 2022 01:03:29 +0000 (09:03 +0800)]
Improve DND documentation

* doc/lispref/frames.texi (Drag and Drop):
* src/xfns.c (Fx_begin_drag): Document that x-begin-drag may
return immediately if no mouse buttons are held down.

2 years agoFix x_dnd_movement_frame detection on GTK builds
Po Lu [Sat, 28 May 2022 00:55:13 +0000 (08:55 +0800)]
Fix x_dnd_movement_frame detection on GTK builds

* src/xterm.c (x_dnd_begin_drag_and_drop): Make sure movement
frame is on the correct display.

2 years ago; * src/xterm.c (x_color_cache_bucket_size): Improve doc string.
Po Lu [Sat, 28 May 2022 00:48:29 +0000 (08:48 +0800)]
; * src/xterm.c (x_color_cache_bucket_size): Improve doc string.

2 years agoRemove stray decl of nonexistent var
Paul Eggert [Fri, 27 May 2022 23:33:25 +0000 (16:33 -0700)]
Remove stray decl of nonexistent var

* src/lisp.h (symbols_with_pos_enabled): Remove decl.

2 years agodecoded-time-set-defaults now leaves DST alone
Paul Eggert [Fri, 27 May 2022 19:19:43 +0000 (12:19 -0700)]
decoded-time-set-defaults now leaves DST alone

* lisp/calendar/time-date.el (decoded-time-set-defaults):
Don’t mess with decoded-time-dst (Bug#55635).

2 years agoFix unlikely null pointer dereference
Paul Eggert [Fri, 27 May 2022 18:44:34 +0000 (11:44 -0700)]
Fix unlikely null pointer dereference

* src/xselect.c (Fx_get_atom_name): Fix unlikely core dump when
build_string is called on a null pointer.  Found by GCC -fanalyzer.

2 years agoAdd ATTRIBUTE_DEALLOC to extern functions
Paul Eggert [Fri, 27 May 2022 18:27:08 +0000 (11:27 -0700)]
Add ATTRIBUTE_DEALLOC to extern functions

This can help static checking.  It’s not as important for static
functions, where GCC can figure this stuff out own its own.
* src/sysstdio.h (emacs_fopen): Add ATTRIBUTE_DEALLOC (fclose, 1).
* src/tparam.h (tparam): Add ATTRIBUTE_DEALLOC_FREE.
Include stdlib.h so that ‘free’ is declared.
* src/xterm.h (x_get_atom_name): Add ATTRIBUTE_DEALLOC_FREE.

2 years agoPacify gcc -Wsuggest-attribute-malloc
Paul Eggert [Fri, 27 May 2022 17:50:56 +0000 (10:50 -0700)]
Pacify gcc -Wsuggest-attribute-malloc

* src/xterm.h (x_get_atom_name): Add ATTRIBUTE_MALLOC.

2 years agoFix navigation in the *Completions* buffer and enable more tests (bug#54374)
Juri Linkov [Fri, 27 May 2022 16:13:09 +0000 (19:13 +0300)]
Fix navigation in the *Completions* buffer and enable more tests (bug#54374)

* lisp/ido.el: Use first-completion instead of next-completion.

* lisp/minibuffer.el (completion--insert): Put completion--string
text property on prefix and suffix as well.

* lisp/simple.el (first-completion, last-completion): New commands.
(next-completion): Rewrite to fix many bugs reported in
bug#54374, bug#55289, bug#55430.
(choose-completion): Use the text property completion--string that
allows to select a completion when point is on its prefix or suffix.
(switch-to-completions): Use first-completion instead of next-completion,
and last-completion instead of previous-completion.

* test/lisp/minibuffer-tests.el (completion-auto-select-test)
(completion-auto-wrap-test, completions-header-format-test)
(completions-affixation-navigation-test): Uncomment fixed lines.

2 years agoExtend 'C-x 8 =' to produce characters with macron
Eli Zaretskii [Fri, 27 May 2022 15:41:12 +0000 (18:41 +0300)]
Extend 'C-x 8 =' to produce characters with macron

* lisp/international/iso-transl.el (iso-transl-char-map): Add
several new sequences for characters with macron.  (Bug#55668)

2 years ago* lisp/shell.el (shell): Query shell file name from `interactive`
Stefan Monnier [Fri, 27 May 2022 13:14:40 +0000 (09:14 -0400)]
* lisp/shell.el (shell): Query shell file name from `interactive`

This avoids the use of the brittle `called-interactively-p`
and makes it easier to start a shell buffer running another shell than
your usual one.

2 years agoImprove font selection on MS-Windows
Eli Zaretskii [Fri, 27 May 2022 12:07:33 +0000 (15:07 +0300)]
Improve font selection on MS-Windows

The Arial Unicode MS font claims in its USB (Unicode Subset
Bitfields) values support for several scripts for which it
doesn't actually have glyphs.  This sometimes caused Emacs to
decide to use Arial Unicode MS for some script, only to
discover later that there are no glyphs for that script's
characters.  This change fixes the USB values according to
actual font coverage, as determined by BabelMap.
* src/w32font.c (add_font_entity_to_list): Fix USB values of Arial
Unicode MS font according to its actual coverage of scripts.

2 years agoMake make-decoded-time use -1 for dst unless given
Lars Ingebrigtsen [Fri, 27 May 2022 10:38:02 +0000 (12:38 +0200)]
Make make-decoded-time use -1 for dst unless given

* lisp/calendar/time-date.el (make-decoded-time): DST -1 is the
value for "doesn't know", not nil (bug#55635).

2 years agoMake package-update-all also refresh the list
Lars Ingebrigtsen [Fri, 27 May 2022 10:17:28 +0000 (12:17 +0200)]
Make package-update-all also refresh the list

* lisp/emacs-lisp/package.el (package-update-all): Also refresh
package list.

2 years agoFix GNUstep build
Po Lu [Fri, 27 May 2022 09:11:59 +0000 (17:11 +0800)]
Fix GNUstep build

* src/nsterm.h (NSPasteboardNameGeneral): Fix definition.

2 years agoFix NS drag and drop on macOS
Po Lu [Fri, 27 May 2022 09:11:07 +0000 (17:11 +0800)]
Fix NS drag and drop on macOS

* lisp/term/ns-win.el (gui-backend-set-selection):
* src/nsselect.m (Fns_begin_drag): Fix deprecation warnings and
selection/value mixup.

2 years agoMerge remote-tracking branch 'origin/master' into x-window-xwidget
Po Lu [Fri, 27 May 2022 08:34:28 +0000 (16:34 +0800)]
Merge remote-tracking branch 'origin/master' into x-window-xwidget

2 years agoImplement some drag and drop functions on NS
Po Lu [Fri, 27 May 2022 08:33:12 +0000 (16:33 +0800)]
Implement some drag and drop functions on NS

* lisp/term/ns-win.el (ns-selection-exists-p):
(gui-backend-set-selection):
(x-begin-drag): New functions and selection types.
* src/nsfns.m (Fns_get_resource):
(Fns_set_resource):
(Fx_server_max_request_size): Fix coding style.
* src/nsselect.m (ns_decode_data_to_pasteboard):
(ns_lisp_to_pasteboard):
(ns_dnd_action_to_operation):
(ns_dnd_action_from_operation):
(Fns_begin_drag): New functions.
(syms_of_nsselect): New subrs.
* src/nsterm.h (EmacsWindow): New fields and messages.
(NSPasteboardNameGeneral): New define.
* src/nsterm.m ([EmacsView mouseDown:]): Store last mouse event.
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Clear that event.
([EmacsWindow dealloc]): Free last mouse event.

2 years ago* lisp/progmodes/asm-mode.el: Minor doc fixes.
Stefan Kangas [Fri, 27 May 2022 08:03:44 +0000 (10:03 +0200)]
* lisp/progmodes/asm-mode.el: Minor doc fixes.

2 years agoPrefer defvar-keymap in some progmodes
Stefan Kangas [Tue, 17 May 2022 15:25:27 +0000 (17:25 +0200)]
Prefer defvar-keymap in some progmodes

* lisp/progmodes/asm-mode.el (asm-mode-map):
* lisp/progmodes/bug-reference.el (bug-reference-map):
* lisp/progmodes/erts-mode.el (erts-mode-map):
* lisp/progmodes/flymake.el (flymake-mode-map)
(flymake-diagnostics-buffer-mode-map):
* lisp/progmodes/icon.el (icon-mode-map):
* lisp/progmodes/js.el (js-mode-map):
* lisp/progmodes/m4-mode.el (m4-mode-map):
* lisp/progmodes/mixal-mode.el (mixal-mode-map):
* lisp/progmodes/scheme.el (scheme-mode-map): Prefer defvar-keymap.

2 years agoSilence byte-compiler warning about x-pointer-invisible
Stefan Kangas [Fri, 27 May 2022 07:42:12 +0000 (09:42 +0200)]
Silence byte-compiler warning about x-pointer-invisible

* lisp/avoid.el (x-pointer-invisible): Declare to silence
byte-compiler.

2 years agoFix more occurrences of renamed kmacro-keymap command
Juri Linkov [Fri, 27 May 2022 07:32:56 +0000 (10:32 +0300)]
Fix more occurrences of renamed kmacro-keymap command

* doc/emacs/kmacro.texi (Basic Keyboard Macro): Fix documentation
after recent kmacro-redisplay command name change.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Fri, 27 May 2022 06:42:39 +0000 (09:42 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoAdd support for the Javanese script (bug#55667)
समीर सिंह Sameer Singh [Thu, 26 May 2022 06:06:15 +0000 (11:36 +0530)]
Add support for the Javanese script (bug#55667)

* lisp/language/indonesian.el ("Javanese"): New language environment.
Add composition rules for Javanese.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars):
Support Javanese.
* lisp/leim/quail/indonesian.el ("javanese"): New input method.

* etc/NEWS: Announce the new language environment and its
input method.

2 years ago* etc/PROBLEMS: Document problems with PGTK input methods.
Po Lu [Fri, 27 May 2022 06:38:44 +0000 (14:38 +0800)]
* etc/PROBLEMS: Document problems with PGTK input methods.

2 years agoUpdate comments in some X code
Po Lu [Fri, 27 May 2022 06:32:09 +0000 (14:32 +0800)]
Update comments in some X code

* src/xterm.c (x_parse_color): Update comment.
(syms_of_xterm): Add new debugging option too.

2 years agoMention "unspecified-fg" and "unspecified-bg" in some doc strings
Eli Zaretskii [Fri, 27 May 2022 06:21:31 +0000 (09:21 +0300)]
Mention "unspecified-fg" and "unspecified-bg" in some doc strings

* lisp/faces.el (face-foreground, face-background)
(foreground-color-at-point, background-color-at-point):
* lisp/color.el (color-name-to-rgb): Mention "unspecified-fg" and
"unspecified-bg" pseudo-colors on TTY frames.  (Bug#55623)

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 27 May 2022 04:30:20 +0000 (06:30 +0200)]
Merge from origin/emacs-28

9283508fb2 Fix format specifiers in tramp-adb.el
a9f17ccce3 ; Fix some doc typos and minor language issues

2 years agoFix XI scroll valuator reset on X Toolkit builds
Po Lu [Fri, 27 May 2022 02:34:04 +0000 (10:34 +0800)]
Fix XI scroll valuator reset on X Toolkit builds

* src/xterm.c (handle_one_xevent): Reset valuators on XI_Leave
if leave->event is an edit widget as well.

2 years agoImprove lookup efficiency of color cache and prevent leaking
Po Lu [Fri, 27 May 2022 01:40:40 +0000 (09:40 +0800)]
Improve lookup efficiency of color cache and prevent leaking

* src/xterm.c (x_parse_color): Move recently used colors to the
start of the cache and free unused entries when there are too
many.
(x_term_init, x_delete_display): Initialize and free new fields.
* src/xterm.h (struct x_display_info): New field
`color_names_length'.

2 years agoHandle allocation errors when creating menu items on Haiku
Po Lu [Fri, 27 May 2022 00:24:12 +0000 (00:24 +0000)]
Handle allocation errors when creating menu items on Haiku

* src/haiku_support.cc (class EmacsMenuItem): Don't abort on
failed strdup.

2 years agoFix longjmp/siglongjmp mixup
Po Lu [Fri, 27 May 2022 00:12:52 +0000 (08:12 +0800)]
Fix longjmp/siglongjmp mixup

* src/xterm.c (xm_drag_window_io_error_handler)
(x_dnd_io_error_handler): Use `siglongjmp'.  Reported by Ken
Brown <kbrown@cornell.edu>.

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Thu, 26 May 2022 20:53:03 +0000 (22:53 +0200)]
Regenerated ldefs-boot.el

2 years agoMerge remote-tracking branch 'origin/scratch/bug-55156'
Stefan Monnier [Thu, 26 May 2022 20:46:11 +0000 (16:46 -0400)]
Merge remote-tracking branch 'origin/scratch/bug-55156'

2 years agopackage-activate-all: Use the quickstart more conservatively
Stefan Monnier [Thu, 26 May 2022 20:40:52 +0000 (16:40 -0400)]
package-activate-all: Use the quickstart more conservatively

* lisp/emacs-lisp/package.el (package-activate-all): Don't use the
quickstart file if some packages have already been activated.

2 years agoAvoid duplicates in `package-activated-list'
Sam Steingold [Thu, 26 May 2022 20:18:09 +0000 (16:18 -0400)]
Avoid duplicates in `package-activated-list'

* lisp/emacs-lisp/package.el (package-quickstart-refresh): Calling
`package-activate-all' twice leads to duplicates in
`package-activated-list' - avoid that.

2 years agoTest suite for Completions UI (bug#54374)
Juri Linkov [Thu, 26 May 2022 16:26:10 +0000 (19:26 +0300)]
Test suite for Completions UI (bug#54374)

* test/lisp/minibuffer-tests.el (completing-read-with-minibuffer-setup):
New macro based on xdisp-tests--in-minibuffer.
(completion-auto-help-test, completion-auto-select-test)
(completion-auto-wrap-test, completions-header-format-test)
(completions-affixation-navigation-test): New tests.

2 years agoeval.c: New functions `defvar-1` and `defconst-1` (bug#55156)
Stefan Monnier [Wed, 25 May 2022 21:53:39 +0000 (17:53 -0400)]
eval.c: New functions `defvar-1` and `defconst-1` (bug#55156)

The bytecode interpreter can't directly call special forms, so
the byte-compiler usually converts special forms into some sequence of
byte codes (basically, providing a duplicate definition of the special
form).  There are still two exceptions to this: `defconst` and `defvar`,
where the compiler instead generates a convoluted chunk of code like:

    (funcall '(lambda (x) (defvar <sym> x <doc>)) <value>)

where the quote makes sure we keep the function non-compiled, so as
to end up running the special form at run time.

Get rid of this workaround by introducing `defvar-1` and `defconst-1`
which provide a *functional* interface to the functionality of the
corresponding special form.

* src/eval.c (defvar, Fdefvar_1, Fdefconst_1): New functions, extracted from
`Fdefvar` and `Fdefconst`.
(Fdefvar, Fdefconst): Use them.
(syms_of_eval): `defsubr` the new functions.

* lisp/emacs-lisp/bytecomp.el (byte-compile-tmp-var): Delete const.
(byte-compile-defvar): Simplify using the new functions.

* doc/lispref/variables.texi (Defining Variables): Adjust the doc of
`defvar` to reflect the actual semantics implemented.

2 years ago* test/lisp/files-resources/compile-utf8.el: Use lexical-binding
Stefan Monnier [Thu, 26 May 2022 16:16:04 +0000 (12:16 -0400)]
* test/lisp/files-resources/compile-utf8.el: Use lexical-binding

2 years ago* etc/themes/leuven-dark-theme.el: Use lexical-binding
Stefan Monnier [Thu, 26 May 2022 16:15:06 +0000 (12:15 -0400)]
* etc/themes/leuven-dark-theme.el: Use lexical-binding

2 years agoFix format specifiers in tramp-adb.el
Hayden Shenk [Thu, 26 May 2022 16:09:56 +0000 (18:09 +0200)]
Fix format specifiers in tramp-adb.el

* lisp/net/tramp-adb.el (tramp-adb-get-device): Fix format
specifiers for port.  (Bug#55651)

Copyright-paperwork-exempt: yes

2 years agoAdd support for the Balinese script (bug#55648)
समीर सिंह Sameer Singh [Thu, 26 May 2022 00:04:30 +0000 (05:34 +0530)]
Add support for the Balinese script (bug#55648)

* lisp/language/indonesian.el ("Balinese"): New language environment.
Add composition rules for Balinese.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Balinese.
* lisp/leim/quail/indonesian.el ("balinese"): New input method.
* lisp/loadup.el: Preload lisp/language/indonesian.el.

* etc/HELLO: Add a Balinese greeting.
* etc/NEWS: Announce the new language environment and its
input method.

2 years agoFaster and less recursive byte-compile--first-symbol-with-pos
Mattias Engdegård [Thu, 26 May 2022 15:19:45 +0000 (17:19 +0200)]
Faster and less recursive byte-compile--first-symbol-with-pos

* lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos)
(byte-compile--warning-source-offset):
Remove recursion for cdr-traversal of lists, and optimise (bug#55414).

2 years agoHandle alternate actions for Motif drop targets
Po Lu [Thu, 26 May 2022 13:00:17 +0000 (21:00 +0800)]
Handle alternate actions for Motif drop targets

* src/xterm.c (xm_side_effect_from_action): Handle
`XdndActionAsk'.
(xm_operations_from_actions): New function.
(xm_send_top_level_leave_message, x_dnd_cleanup_drag_and_drop)
(x_dnd_update_state, handle_one_xevent, x_connection_closed):
Use those actions when building a side effect.
(x_dnd_begin_drag_and_drop): Keep track of the set of
alternative drag-and-drop actions.

2 years agoMake comp--native-compile delete the temp file it creates
Lars Ingebrigtsen [Thu, 26 May 2022 12:47:16 +0000 (14:47 +0200)]
Make comp--native-compile delete the temp file it creates

* lisp/emacs-lisp/comp.el (comp--native-compile): Delete the
temporary files we create (bug#55611).

2 years agoMake memory-report not bug out with symbols with positions
Lars Ingebrigtsen [Thu, 26 May 2022 11:04:50 +0000 (13:04 +0200)]
Make memory-report not bug out with symbols with positions

* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1):
Don't bug out when there are symbols with positions.

2 years ago; Fix up doc of recent elisp-eldoc-var-docstring-with-value addition
Štěpán Němec [Thu, 26 May 2022 08:58:22 +0000 (10:58 +0200)]
; Fix up doc of recent elisp-eldoc-var-docstring-with-value addition

2 years ago; Fix some doc typos and minor language issues
Štěpán Němec [Fri, 28 May 2021 09:38:59 +0000 (11:38 +0200)]
; Fix some doc typos and minor language issues

2 years agoFix the `x_trace_wire' option
Po Lu [Thu, 26 May 2022 06:37:27 +0000 (14:37 +0800)]
Fix the `x_trace_wire' option

* src/xterm.c (x_trace_wire):
(x_term_init): Fix debugging code for modern C and Xlib.

2 years agoUse x_get_atom_name for some more things
Po Lu [Thu, 26 May 2022 06:27:32 +0000 (14:27 +0800)]
Use x_get_atom_name for some more things

* src/xterm.c (x_dnd_send_unsupported_drop, x_dnd_send_drop):
Use x_get_atom_name instead of XGetAtomName.

2 years ago* src/xselect.c (Fx_register_dnd_atom): Use x_intern_cached_atom.
Po Lu [Thu, 26 May 2022 02:40:54 +0000 (10:40 +0800)]
* src/xselect.c (Fx_register_dnd_atom): Use x_intern_cached_atom.

2 years agoMake X error checking more asynchronous
Po Lu [Thu, 26 May 2022 02:22:24 +0000 (10:22 +0800)]
Make X error checking more asynchronous

This makes some operations (such as x-get-atom-name and
x-change-window-property) up to 2600x faster by avoiding calls
to XSync when setting up an error handler, and when checking for
or uncatching errors if all requests were already processed.

* src/xterm.c (X_COMPARE_SERIALS): New macro.
(struct x_error_message_stack): Add new field `first_request'.
(x_find_error_handler): New function.
(x_error_catcher): New parameter `stack'.  Use it instead.
(x_catch_errors_with_handler): Keep a record of the next
protocol request serial inside the stack entry.
(x_uncatch_errors, x_check_errors, x_had_errors_p, x_clear_errors)
(x_error_handler): Avoid XSync if all requests were processed by
the X server and look for the error handler matching the display
and request serial when processing errors.

2 years agoImprove x_get_atom_name for some predefined atoms
Po Lu [Thu, 26 May 2022 00:13:17 +0000 (08:13 +0800)]
Improve x_get_atom_name for some predefined atoms

* src/xterm.c (x_get_atom_name): Handle XSETTINGS and cm atoms.

2 years agoFix 32-bit warnings again
Po Lu [Thu, 26 May 2022 00:11:36 +0000 (08:11 +0800)]
Fix 32-bit warnings again

* src/print.c (struct print_stack_entry): Make
u.list.tortoise_idx intmax_t.

2 years ago; Fix documentation of recent additions of Indian scripts
Eli Zaretskii [Wed, 25 May 2022 18:40:22 +0000 (21:40 +0300)]
; Fix documentation of recent additions of Indian scripts

* lisp/language/indian.el ("Kannada", "Tirhuta", "Sharada")
("Siddham", "Syloti Nagri", "Modi", "Limbu"): Fix grammar of doc
string.  (Bug#55621)

2 years agoAdd support for the Limbu script (bug#55621)
समीर सिंह Sameer Singh [Wed, 25 May 2022 02:12:29 +0000 (07:42 +0530)]
Add support for the Limbu script (bug#55621)

* lisp/language/indian.el ("Limbu"): New language environment.
Add composition rules for Limbu.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Limbu.
* lisp/leim/quail/indian.el ("limbu"): New input method.

* etc/HELLO: Add a Limbu greeting.
* etc/NEWS: Announce the new language environment and its
input method.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Eli Zaretskii [Wed, 25 May 2022 18:08:01 +0000 (14:08 -0400)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years ago; * etc/NEWS.28: Fix merge of NEWS.28.
Eli Zaretskii [Wed, 25 May 2022 18:05:09 +0000 (14:05 -0400)]
; * etc/NEWS.28: Fix merge of NEWS.28.

2 years agoMerge from origin/emacs-28
Eli Zaretskii [Wed, 25 May 2022 17:57:59 +0000 (13:57 -0400)]
Merge from origin/emacs-28

86b49d5865 ; * etc/NEWS: Announce changes in 'desktop-kill'.  (Bug#55...
d5ccf2621a ; Fix last change
f1c1fd7184 Improve documentation of mail-user-agent.
b05d1e9b98 ; * lisp/desktop.el: Update the commentary.  (Bug#55560)
139bfa1a08 More fixes in abbrev.el doc strings
d80dea6036 Add note about Tramp completion to completion-styles doc s...
9e7c0cf57d Remove mention of removed nnimap-nov-is-evil variable
90aae0bca2 Improve documentation strings and prompts in abbrev.el
dfa3e6f424 Restore the Fselect_window call in gui_consider_frame_title.
de35e9728f Advise against settings in the MS-Windows system registry
3ffa3d3403 ; Minor addition to make-tarball.txt
7dc026f9ea Fix kmacro-keymap binding after previous change
4f0fd54bc4 Add glossary entries for "interactively"
af1c05a3c4 Fix the name of a kmacro command.

# Conflicts:
# etc/NEWS
# lisp/abbrev.el

2 years ago* lisp/subr.el (insert-for-yank): Add nil to run-hook-wrapped to keep looping.
Juri Linkov [Wed, 25 May 2022 17:45:49 +0000 (20:45 +0300)]
* lisp/subr.el (insert-for-yank): Add nil to run-hook-wrapped to keep looping.

2 years agoLower the roundtrip overhead of x-get-atom-name by 50% for common atoms
Po Lu [Wed, 25 May 2022 12:29:38 +0000 (20:29 +0800)]
Lower the roundtrip overhead of x-get-atom-name by 50% for common atoms

* src/xselect.c (Fx_get_atom_name):
* src/xterm.c (x_dnd_begin_drag_and_drop): Use that instead.  Don't
sync to handle errors if using `x_get_atom_name' resulted in no
protocol request being made.
(x_get_atom_name): New function.
* src/xterm.h: Update prototypes.

2 years agoMake yank-transform-functions into defvar
Lars Ingebrigtsen [Wed, 25 May 2022 12:23:56 +0000 (14:23 +0200)]
Make yank-transform-functions into defvar

* doc/lispref/text.texi (Yanking): Adjust.
* lisp/simple.el (yank-transform-functions): Make into defvar
because it's not that useful as a user option.

2 years agoReset 'eshell-in-pipeline-p' when interpolating commands
Jim Porter [Wed, 25 May 2022 01:56:50 +0000 (18:56 -0700)]
Reset 'eshell-in-pipeline-p' when interpolating commands

* lisp/eshell/esh-cmd.el (eshell-subcommand-bindings)
(eshell-command-to-value): Set 'eshell-in-pipeline-p' to nil.

* test/lisp/eshell/eshell-tests.el
(eshell-test/subcommand-reset-in-pipeline)
(eshell-test/lisp-reset-in-pipeline): New tests (bug#55620).

2 years agoChange variable which-func-unknown to "n/a"
Paul W. Rankin [Tue, 24 May 2022 22:19:57 +0000 (18:19 -0400)]
Change variable which-func-unknown to "n/a"

* lisp/progmodes/which-func.el (which-func-unknown): Change string
displayed in mode-line from "???" to "n/a"; the former appears to
indicate an error whereas the latter is more indicative that the
current function is not known.

2 years agoAdd more predefined atoms for the benefit of DND code
Po Lu [Wed, 25 May 2022 10:21:33 +0000 (18:21 +0800)]
Add more predefined atoms for the benefit of DND code

* src/xterm.c (x_intern_cached_atom): Handle `CARDINAL' and
`WINDOW' as well.