Eli Zaretskii [Wed, 4 May 2022 08:14:45 +0000 (11:14 +0300)]
Fix 'bidi-class' property of unassigned codepoints
* admin/unidata/unidata-gen.el (unidata-file-alist): Update the
default values of 'bidi-class' according to the latest Unicode
Standard.
* admin/notes/unicode: Mention possible changes in
DerivedBidiClass.txt that need to be reflected in unidata-gen.el.
* lisp/international/characters.el (#xfb50, #xfdf0): Fix the
Arabic block characters. (Bug#55256)
Lars Ingebrigtsen [Wed, 4 May 2022 07:34:56 +0000 (09:34 +0200)]
Flush the tool bar cache on all terminals when adding new entries
* lisp/tool-bar.el (tool-bar--flush-cache): Flush the cache for
the current tool bar on all terminals.
Po Lu [Wed, 4 May 2022 07:31:32 +0000 (15:31 +0800)]
Correctly encode and decode filenames on NS
* src/nsfns.m (Fns_read_file_name): Run dir through ENCODE_FILE
and fname through DECODE_FILE.
Po Lu [Wed, 4 May 2022 07:26:43 +0000 (07:26 +0000)]
Fix file name encoding on Haiku file dialogs
* src/haikufns.c (Fhaiku_read_file_name): Use ENCODE_FILE and
DECODE_FILE correctly.
Po Lu [Wed, 4 May 2022 05:46:24 +0000 (05:46 +0000)]
Set initial size in the Haiku font dialog
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(EmacsFontSelectionDialog): New argument `initial_size'.
(be_select_font): Likewise.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (Fx_select_font): Set font dialog size to the
pixel size of the current font.
Po Lu [Wed, 4 May 2022 03:26:28 +0000 (03:26 +0000)]
Encode and decode filenames correctly on Haiku
* src/haikufns.c (Fhaiku_read_file_name): Decode file names
correctly.
Po Lu [Wed, 4 May 2022 03:23:11 +0000 (03:23 +0000)]
Clean up Haiku file panel code
* lisp/term/haiku-win.el (x-file-dialog): Fix nil values of
`default-filename'.
* src/haiku_io.c (haiku_len): Remove `FILE_PANEL_EVENT'.
(record_c_unwind_protect_from_cxx, c_specpdl_idx_from_cxx)
(c_unbind_to_nil_from_cxx): Delete functions.
* src/haiku_support.cc (MessageReceived): Write pointer to
buffer to file panel port instead.
(struct popup_file_dialog_data): Delete strict.
(unwind_popup_file_dialog): Delete functions.
(be_popup_file_dialog): Accept a pointer to
`process_pending_signals' and run nested event loop as usual.
* src/haiku_support.h (enum haiku_event_type): Remove
`FILE_PANEL_EVENT'.
(struct haiku_file_panel_event): Delete struct.
* src/haikufns.c (unwind_popup): Delete function.
(Fhaiku_read_file_name): Update and quit on invalid filename.
* src/haikuterm.c (struct unhandled_event): Delete struct.
(haiku_read_socket): Remove "unhandled events".
Po Lu [Wed, 4 May 2022 01:42:11 +0000 (01:42 +0000)]
* src/haikufns.c (haiku_create_frame): Improve default border width.
Sean Whitton [Wed, 4 May 2022 01:08:14 +0000 (18:08 -0700)]
server-execute: Initialize the *scratch* buffer
* lisp/server.el: Require subr-x when compiling.
(server-execute): Initialize the *scratch* buffer in the same way that
the scratch-buffer command does, for consistency.
Po Lu [Wed, 4 May 2022 00:47:52 +0000 (00:47 +0000)]
Fix display of placeholder composite string on Haiku
* src/haikuterm.c
(haiku_draw_composite_glyph_string_foreground): Correct
translation of XDrawRectangle.
Po Lu [Wed, 4 May 2022 00:40:12 +0000 (08:40 +0800)]
Fix event mask and source indication of _NET_WM_STATE messages
* src/xselect.c (x_send_client_event): Make static.
* src/xterm.c (set_wm_state): Send event with correct mask and
source indication set.
* src/xterm.h: Update prototypes.
Lars Ingebrigtsen [Tue, 3 May 2022 20:30:39 +0000 (22:30 +0200)]
Make some recently added tests actually run
Lars Ingebrigtsen [Tue, 3 May 2022 20:06:31 +0000 (22:06 +0200)]
Make with-buffer-unmodified-if-unchanged more efficient
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Make more efficient.
Lars Ingebrigtsen [Tue, 3 May 2022 20:04:39 +0000 (22:04 +0200)]
Make with-buffer-unmodified-if-unchanged more resilient
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Make more resilient.
Stefan Monnier [Tue, 3 May 2022 19:35:47 +0000 (15:35 -0400)]
with-buffer-unmodified-if-unchanged: Tweak the implementation
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Skip the hash if the buffer was not modified at all.
Use `restore-buffer-modified-p`.
Also mention that it's imperative that the current buffer is preserved.
Lars Ingebrigtsen [Tue, 3 May 2022 19:29:47 +0000 (21:29 +0200)]
Add NEWS entry about incompatible sorting command behaviors
Lars Ingebrigtsen [Tue, 3 May 2022 19:23:40 +0000 (21:23 +0200)]
Make sorting not change buffer modification status always
* lisp/sort.el (sort-subr): Don't mark buffer modified if the
sorting didn't change anything (bug#4587).
Lars Ingebrigtsen [Tue, 3 May 2022 19:22:53 +0000 (21:22 +0200)]
Add new macro with-buffer-unmodified-if-unchanged
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
New macro.
* lisp/textmodes/fill.el (fill-paragraph): Macro code copied from
here. Adjust and use the macro.
Lars Ingebrigtsen [Tue, 3 May 2022 17:20:52 +0000 (19:20 +0200)]
Fix thinko in recent tool bar caching logic
* lisp/tool-bar.el (tool-bar--cache-key): New function.
(tool-bar--flush-cache, tool-bar-make-keymap): Use it.
Lars Ingebrigtsen [Tue, 3 May 2022 16:46:05 +0000 (18:46 +0200)]
Make tool bar caching more sensible
* lisp/tool-bar.el (tool-bar-keymap-cache): Make into a non-weak
EQ hash table, which should be faster and not lose the contents
after a GC (bug#43397).
(tool-bar--flush-cache, tool-bar-make-keymap): Use the terminal
only as the key.
(tool-bar-local-item, tool-bar-local-item-from-menu): Flush the
cache after altering the tool bar.
Eli Zaretskii [Tue, 3 May 2022 16:38:06 +0000 (19:38 +0300)]
; * doc/misc/eshell.texi (Arguments): Fix cross-references.
Eli Zaretskii [Tue, 3 May 2022 16:29:03 +0000 (19:29 +0300)]
Allow desktop to restore frames and windows on TTY frames
* lisp/frameset.el (frameset-persistent-filter-alist): Add 'top',
'left', 'bottom', and 'right' to frame parameters that are shelved
and unshelved when switching from GUI to TTY frames and vice
versa.
(frameset--restore-frame): Accept two optional arguments DX and
DY, and offset by them each frame restored from TTY desktop, to
make such restored frames more prominently visible. Force such
frames to be visible on GUI display, since the visibility
parameter is meaningless for TTY frames.
(frameset-restore): Pass DX and DY offsets to
'frameset--restore-frame', when restoring TTY frames on GUI
display.
* lisp/desktop.el (desktop-restore-frameset): Pass the
:force-onscreen argument of 'frameset-restore' as nil when
restoring frames on text-mode display.
(desktop-restore-forces-onscreen): Document that this option has
no real effect on restoring frames on text-mode display.
(desktop-restoring-frameset-p): Allow restoring frames in non-GUI
sessions, but disallow that when the selected frame is the
daemon's initial frame. (Bug#55070)
Jim Porter [Mon, 2 May 2022 23:56:49 +0000 (16:56 -0700)]
Improve the behavior of concatenating parts of Eshell arguments
Previously, concatenating a list to a string would first convert the
list to a string. Now, the string is concatenated with the last
element of the list.
* lisp/eshell/esh-util.el (eshell-to-flat-string): Make obsolete.
* lisp/eshell/esh-arg.el (eshell-concat, eshell-concat-1): New
functions.
(eshell-resolve-current-argument): Use 'eshell-concat'.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-concat-cmd):
Add check for concatenation of multiline output of subcommands.
(esh-var-test/quoted-interp-concat-cmd): New test.
* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-test-13): Use
'eshell-concat'.
* doc/misc/eshell.texi (Expansion): Document this behavior.
* etc/NEWS: Announce the change (bug#55236).
Jim Porter [Mon, 2 May 2022 05:09:17 +0000 (22:09 -0700)]
Return a list of numbers if all lines of an Eshell subcommand are numeric
* lisp/eshell/esh-util.el (eshell-convertible-to-number-p)
(eshell-convert-to-number): New functions...
(eshell-convert): ... use them.
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/interp-convert-cmd-string-newline): Add checks for
numeric output.
* doc/misc/eshell.texi (Dollars Expansion): Document the new behavior.
* etc/NEWS: Announce the change (bug#55236).
Jim Porter [Tue, 1 Mar 2022 01:38:39 +0000 (17:38 -0800)]
Eshell variable expansion should always return strings inside quotes
This is closer in behavior to regular shells, and gives Eshell users
greater flexibility in how variables are expanded.
* lisp/eshell/esh-util.el (eshell-convert): Add TO-STRING argument.
* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Add MODIFIER-P
argument and adjust how 'eshell-convert' and 'eshell-apply-indices'
are called.
(eshell-get-variable, eshell-apply-indices): Add QUOTED argument.
* test/lisp/eshell/esh-var-tests.el (eshell-test-value): New defvar.
(esh-var-test/interp-convert-var-number)
(esh-var-test/interp-convert-var-split-indices)
(esh-var-test/interp-convert-quoted-var-number)
(esh-var-test/interp-convert-quoted-var-split-indices)
(esh-var-test/interp-convert-cmd-string-newline)
(esh-var-test/interp-convert-cmd-multiline)
(esh-var-test/interp-convert-cmd-number)
(esh-var-test/interp-convert-cmd-split-indices)
(esh-var-test/quoted-interp-convert-var-number)
(esh-var-test/quoted-interp-convert-var-split-indices)
(esh-var-test/quoted-interp-convert-quoted-var-number)
(esh-var-test/quoted-interp-convert-quoted-var-split-indices)
(esh-var-test/quoted-interp-convert-cmd-string-newline)
(esh-var-test/quoted-interp-convert-cmd-multiline)
(esh-var-test/quoted-interp-convert-cmd-number)
(esh-var-test/quoted-interp-convert-cmd-split-indices): New tests.
* doc/misc/eshell.texi (Arguments): Expand this section, and document
the new behavior.
(Dollars Expansion): Provide more detail about '$(lisp)' and
'${command}' forms.
* etc/NEWS (Eshell): Announce this change (bug#55236).
Lars Ingebrigtsen [Tue, 3 May 2022 16:19:13 +0000 (18:19 +0200)]
Make adding things to the tool bar show up on next redisplay
* lisp/tool-bar.el (tool-bar--flush-cache): New function.
(tool-bar-add-item): Flush the cache (bug#43397).
Lars Ingebrigtsen [Tue, 3 May 2022 16:00:32 +0000 (18:00 +0200)]
Add new command 'package-update'
* doc/emacs/package.texi (Package Installation): Mention it.
* lisp/emacs-lisp/package.el (package-update): New command
(bug#18790).
Lars Ingebrigtsen [Tue, 3 May 2022 14:19:50 +0000 (16:19 +0200)]
Fix key-parse problem with C-x ( ... sequences
* lisp/keymap.el (key-parse): Move the read-kbd-macro compat code
from here...
* lisp/subr.el (kbd): ... to here. (And fix the logic, too.)
This allows `key-parse' to have a less puzzling result while
maintaining backwards compatibility (bug#38775).
Lars Ingebrigtsen [Tue, 3 May 2022 14:02:51 +0000 (16:02 +0200)]
Make TAB work in makefile mode when transient mark mode is on
* lisp/progmodes/make-mode.el (makefile-mode): Insert a tab
instead of removing it (bug#37087).
Michael Albinus [Tue, 3 May 2022 12:14:37 +0000 (14:14 +0200)]
Handle file name handler in write-region's VISIT arg
* lisp/net/tramp.el (tramp-skeleton-delete-directory): Move up.
(tramp-skeleton-write-region): New defmacro. Handle also file
name handler in VISIT. (Bug#55166)
(tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region): Use it.
Filipp Gunbin [Tue, 3 May 2022 10:35:34 +0000 (12:35 +0200)]
Rewrite sql-interactive-remove-continuation-prompt
* lisp/progmodes/sql.el (sql-starts-with-prompt-re): Remove.
(sql-ends-with-prompt-re): Remove
(sql-interactive-remove-continuation-prompt): Delete prompts from
anywhere in the process output, not just at the beginning of current
string. Streamline logic, describe it in docstring.
* test/lisp/progmodes/sql-tests.el: Add tests
Lars Ingebrigtsen [Tue, 3 May 2022 10:23:25 +0000 (12:23 +0200)]
Make more buttons in *Help* respect `help-window-keep-selected'
* lisp/help-mode.el (help-function-cmacro, help-variable-def)
(help-face-def): Also respect `help-window-keep-selected' like the
other commands.
Lars Ingebrigtsen [Tue, 3 May 2022 09:32:03 +0000 (11:32 +0200)]
Further mm-base64-line-p bug fixes
* lisp/gnus/mm-bodies.el (mm-base64-line-p): Fix parsing error
introduced by
d90f54d.
Lars Ingebrigtsen [Tue, 3 May 2022 09:28:59 +0000 (11:28 +0200)]
Fix mm-base64-line-p logic
* lisp/gnus/mm-bodies.el (mm-base64-line-p): Don't claim that an
empty line is base64.
Po Lu [Tue, 3 May 2022 08:19:41 +0000 (08:19 +0000)]
* src/haiku_support.cc (DrawContent): Use right UI color.
Po Lu [Tue, 3 May 2022 08:13:59 +0000 (16:13 +0800)]
; * lisp/tooltip.el (tooltip-show-help): Fix typo in last change.
Po Lu [Tue, 3 May 2022 08:12:24 +0000 (16:12 +0800)]
Make menu bar help text work on macOS as well
* lisp/tooltip.el (tooltip-show-help): Resort to displaying
messages in the echo area on NS.
* src/nsmenu.m ([EmacsMenu menu:willHighlightItem:]): Call
`show_help_echo' instead of storing an event into the keyboard
buffer.
Po Lu [Tue, 3 May 2022 08:05:46 +0000 (16:05 +0800)]
Fix default font in macOS font dialogs
* src/nsterm.m ([EmacsView noteUserSelectedFont]): Use current
font if none was selected.
Po Lu [Tue, 3 May 2022 08:02:02 +0000 (16:02 +0800)]
Fix some font parsing problems on NS
* src/nsterm.m (ns_font_desc_to_font_spec): Fix processing of
condensed width.
Po Lu [Tue, 3 May 2022 05:40:54 +0000 (13:40 +0800)]
Handle GraphicsExpose events on scroll bars
* src/xterm.c (x_scroll_bar_expose): Handle GraphicsExpose
events.
(handle_one_xevent): Give graphics exposures to scroll bars.
Po Lu [Tue, 3 May 2022 03:43:32 +0000 (11:43 +0800)]
Make sure rectangles are drawn correctly on X
* src/xfaces.c (prepare_face_for_display): Always use line-width
of 1.
* src/xfns.c (x_make_gc): Likewise.
* src/xterm.c (x_scroll_bar_expose): Comment out obsolete code.
Po Lu [Tue, 3 May 2022 03:18:11 +0000 (03:18 +0000)]
Fix glyphless glyph display on Haiku
* src/haikuterm.c
(haiku_draw_glyphless_glyph_string_foreground): Fix rectangle
width.
Po Lu [Tue, 3 May 2022 02:44:00 +0000 (02:44 +0000)]
Fix font matching of "Fira Code Retina" and "Fira Code Regular" on Haiku
* src/haiku_font_support.cc (font_family_style_matches_p): Don't
allow matches on fonts with an adstyle if none was specified in
the input pattern.
Glenn Morris [Tue, 3 May 2022 01:26:22 +0000 (18:26 -0700)]
Don't leave temp files behind from undigest-tests
Sadly the "temp" in with-temp-file refers to a buffer, not a file.
* test/lisp/mail/undigest-tests.el (rmail-undigest-test-rfc934-digest)
(rmail-undigest-test-rfc1153-digest-strict)
(rmail-undigest-test-rfc1153-less-strict-digest)
(rmail-undigest-test-rfc1153-sloppy-digest)
(rmail-undigest-test-rfc1521-mime-digest)
(rmail-undigest-test-multipart-mixed-digest):
Delete temporary files at end.
Po Lu [Tue, 3 May 2022 01:22:06 +0000 (09:22 +0800)]
Clean up X11 double buffering code
This fixes several latent bugs where code went down the path
with double buffering enabled when it wasn't, and vice versa.
* src/xfns.c (x_set_inhibit_double_buffering): Improve
commentary and only define when HAVE_XDBE.
(x_mark_frame_dirty): Only set buffer flip flag when HAVE_XDBE.
(initial_set_up_x_back_buffer): Clean up coding style and remove
unnecessary block_input pair.
(Fx_double_buffered_p): Always return nil if !HAVE_XDBE.
(x_frame_parm_handlers): Don't set double buffering handler if
!HAVE_XDBE.
* src/xftfont.c (xftfont_drop_xrender_surfaces, xftfont_driver):
Only define when XDBE is available.
* src/xterm.c (x_drop_xrender_surfaces): Likewise.
(x_clear_window): Don't test double buffering flags when
!HAVE_XDBE.
(show_back_buffer): Only define when HAVE_XDBE.
(x_flip_and_flush): Don't try to flip when !HAVE_XDBE.
(XTframe_up_to_date): Likewise.
(XTbuffer_flipping_unblocked_hook): Only define when Xdbe is
available.
(x_clear_area): Don't test double buffering flags when Xdbe is
not available.
(flush_dirty_back_buffer_on): Don't define if there's no DBE.
(handle_one_xevent, x_create_terminal): Likewise.
* src/xterm.h (FRAME_X_DRAWABLE): Fix coding style.
Po Lu [Tue, 3 May 2022 00:41:38 +0000 (08:41 +0800)]
; * src/nsterm.m (syms_of_nsterm): Fix typo in defsym.
Eli Zaretskii [Mon, 2 May 2022 16:16:59 +0000 (19:16 +0300)]
Fix punctuation in the Eshell manual
* doc/misc/eshell.texi (Argument Predication and Modification):
Fix whitespace.
Eli Zaretskii [Mon, 2 May 2022 16:06:45 +0000 (19:06 +0300)]
; * etc/NEWS: Improve wording of "M-x scratch-buffer" entry.
Eli Zaretskii [Mon, 2 May 2022 15:57:15 +0000 (18:57 +0300)]
; Fix typo and wording of a doc string
* lisp/textmodes/reftex-parse.el (reftex-using-biblatex-p): Fix
typo and wording of the doc string.
Arash Esbati [Mon, 2 May 2022 12:31:19 +0000 (14:31 +0200)]
Load multiple bibliographies with multibib package
* lisp/textmodes/reftex-parse.el (reftex-using-biblatex-p):
Recognize 'multibib' which allows multiple bibliography loading
macro calls.
(reftex-locate-bibliography-files): Prevent possible duplications
in bibliography database files.
Po Lu [Mon, 2 May 2022 12:16:53 +0000 (20:16 +0800)]
Wait for events from all displays in Xm dialogs even on XI2
* src/xfns.c (Fx_file_dialog): Always process events from all
displays.
Lars Ingebrigtsen [Mon, 2 May 2022 11:59:11 +0000 (13:59 +0200)]
Make the eval-in-debug error message prettier in non-recursive errors
* lisp/emacs-lisp/debug.el (debugger-eval-expression): Make the
error message (when recursive debugging is off) prettier.
Lars Ingebrigtsen [Mon, 2 May 2022 11:55:56 +0000 (13:55 +0200)]
Make non-recursive error messages in edebug prettier
* lisp/emacs-lisp/edebug.el (edebug-eval-expression): Make the
error message (when recursive debugging is off) prettier.
Lars Ingebrigtsen [Mon, 2 May 2022 10:30:19 +0000 (12:30 +0200)]
Fix eldoc interaction with `when' and `unless'
* lisp/subr.el (when, unless): Remove the (fn...) bits from the
doc string, because the advertised calling convention is correct
the way it is (bug#27229). This also makes eldoc highlight the
arguments correctly.
Lars Ingebrigtsen [Mon, 2 May 2022 10:26:31 +0000 (12:26 +0200)]
Add a command to recreate the *scratch* buffer
* doc/emacs/building.texi (Lisp Interaction): Mention it.
* lisp/simple.el (scratch-buffer): New command.
Stefan Kangas [Mon, 2 May 2022 10:03:08 +0000 (12:03 +0200)]
Fix handling double-click-time nil or t
* lisp/mouse.el (mouse-double-click-time): New function to always
return a number for `double-click-time'.
* lisp/emulation/viper-mous.el (viper-multiclick-timeout):
* lisp/foldout.el (foldout-mouse-swallow-events):
* lisp/help.el (help--read-key-sequence):
* lisp/org/org-mouse.el (org-mouse-show-context-menu): Use
'mouse-double-click-time' instead of 'double-click-time'.
* src/keyboard.c (syms_of_keyboard): Mention
'mouse-double-click-time' in doc string of 'double-click-time'.
* test/lisp/mouse-tests.el (mouse-test-mouse-double-click-time):
New test.
Lars Ingebrigtsen [Mon, 2 May 2022 09:37:35 +0000 (11:37 +0200)]
Re-fix Gcc header tokenization in Gnus
* lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Split the Gcc header
on commas, but allow group names to contain spaces (bug#55217).
Lars Ingebrigtsen [Mon, 2 May 2022 09:30:43 +0000 (11:30 +0200)]
Allow reusing the *Help* window with `i'/`s/ commands
* doc/emacs/help.texi (Help): Document it.
* lisp/help-mode.el (help-function-def--button-function): Use it.
* lisp/help-mode.el (help-goto-info): Use it.
* lisp/help.el (help-window-select): Mention it.
(help-window-keep-selected): New user option (bug#9054).
* lisp/info-look.el (info-lookup-symbol):
(info-lookup): Allow keeping the same window.
Po Lu [Mon, 2 May 2022 09:05:12 +0000 (09:05 +0000)]
Fix inconsistencies in Haiku font selection dialog
* src/haiku_font_support.cc (font_family_style_matches_p): Fix
coding style.
* src/haikufont.c (haikufont_pattern_from_object): Set slant and
width using correct object.
Lars Ingebrigtsen [Mon, 2 May 2022 09:02:01 +0000 (11:02 +0200)]
Allow show-paren to show matching parentheses inside comments
* lisp/paren.el (show-paren--default): Improve blinking when
inside a comment (bug#5410).
Po Lu [Mon, 2 May 2022 08:46:04 +0000 (08:46 +0000)]
Fix handling of some weights in the Haiku font driver
* src/haiku_font_support.cc (font_style_to_flags):
* src/haiku_support.h (enum haiku_font_weight):
* src/haikufont.c (haikufont_weight_to_lisp)
(haikufont_lisp_to_weight): Make `ultralight' and `extralight'
mean the same thing.
Lars Ingebrigtsen [Mon, 2 May 2022 08:01:55 +0000 (10:01 +0200)]
Use xref-goto-xref as the xref mouse binding
* lisp/progmodes/xref.el (xref--button-map): Keep the
xref-goto-xref binding instead of select-and-show to be more
similar to grep buffers.
Lars Ingebrigtsen [Mon, 2 May 2022 07:56:49 +0000 (09:56 +0200)]
Fix the OMIT-NULLS + "" case in string-lines
* lisp/subr.el (string-lines): Respect OMIT-NULLS when given an
empty string.
Po Lu [Mon, 2 May 2022 07:06:58 +0000 (15:06 +0800)]
Improve font dialog on macOS
* src/nsterm.m ([EmacsView changeFont:]): Don't exit loop here
on macOS.
([EmacsView noteUserSelectedFont]): New function.
([EmacsView showFontPanel]): Add explicit "OK" button on macOS.
Po Lu [Mon, 2 May 2022 05:48:48 +0000 (05:48 +0000)]
Default to currently selected font in Haiku font dialogs
* src/haiku_font_support.cc (be_find_font_indices): New
function.
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(UpdateStylesForIndex, EmacsFontSelectionDialog): Allow
specifying an initial font family and style.
(be_select_font): New parameters `initial_family' and
`initial_style'.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (haikufont_lisp_to_weight)
(haikufont_lisp_to_slant, haikufont_lisp_to_width): Handle
`regular'.
(haikufont_pattern_from_object): New function.
(haikufont_spec_or_entity_to_pattern): Fix coding style.
(Fx_select_font): Compute indices based on currently selected
font.
(syms_of_haikufont): New defsyms.
Stefan Monnier [Mon, 2 May 2022 05:14:17 +0000 (01:14 -0400)]
* lisp/gnus/gnus-util.el (gnus-byte-compile): Use `lexical-binding`
Po Lu [Mon, 2 May 2022 01:59:52 +0000 (01:59 +0000)]
Fix race conditions with async input in some Haiku dialogs
* src/haikufns.c (Fhaiku_save_session_reply):
* src/haikufont.c (Fx_select_font): Block sigio around system
calls.
Po Lu [Mon, 2 May 2022 01:38:36 +0000 (09:38 +0800)]
Fix the macOS build
* src/nsterm.m (ns_font_desc_to_font_spec, syms_of_nsterm):
Define missing symbols that are only on GNUstep.
Po Lu [Mon, 2 May 2022 01:32:54 +0000 (09:32 +0800)]
Make the NS font dialog return more correct values
* src/nsfns.m (Fx_select_font): Update doc string.
* src/nsterm.m (ns_font_desc_to_font_spec): New
function.
([EmacsView showFontPanel]): Return selected font as a
font spec instead.
Po Lu [Mon, 2 May 2022 00:49:40 +0000 (08:49 +0800)]
Fix devices staying disabled in some cases
* src/xterm.c (handle_one_xevent): Process queued disables
before handling an XIDeviceEnabled situation.
Lars Ingebrigtsen [Sun, 1 May 2022 21:05:06 +0000 (23:05 +0200)]
Fix string-lines return for ""
* lisp/subr.el (string-lines): Return the correct result on ""
(bug#55213).
Lars Ingebrigtsen [Sun, 1 May 2022 18:54:11 +0000 (20:54 +0200)]
Change string-lines semantics slightly
* lisp/subr.el (string-lines): Change the semantics slightly --
don't return an empty string for a trailing newline.
Jim Porter [Wed, 27 Apr 2022 04:53:00 +0000 (21:53 -0700)]
Handle escaped characters in Eshell special references (e.g. buffers)
* lisp/eshell/esh-arg.el (eshell-parse-special-reference): Unescape
escaped characters.
* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell): Restore
current buffer after evaluating BODY.
* test/lisp/eshell/eshell-tests.el (eshell-test/redirect-buffer)
(eshell-test/redirect-buffer-escaped): New tests (bug#55204).
Jim Porter [Wed, 27 Apr 2022 04:51:23 +0000 (21:51 -0700)]
Handle escaped characters in Eshell argument predicates/modifiers
* lisp/eshell/em-pred.el (eshell-get-delimited-modifier-argument):
Unescape escaped characters.
* test/lisp/eshell/em-pred-tests.el (em-pred-test/predicate-escaping):
New test (bug#55204).
Jim Porter [Mon, 28 Mar 2022 05:28:40 +0000 (22:28 -0700)]
Use a common set of string delimiters for all Eshell predicates/modifiers
* lisp/eshell/em-pred.el (eshell-pred-delimiter-pairs): New variable.
(eshell-get-comparison-modifier-argument)
(eshell-get-numeric-modifier-argument)
(eshell-get-delimited-modifier-argument): New functions...
(eshell-pred-user-or-group, eshell-pred-file-time)
(eshell-pred-file-links, eshell-pred-file-size)
(eshell-pred-substitute, eshell-join-memebers, eshell-split-members):
... and use them here.
(eshell-include-members): Pass 'mod-char' and use
'eshell-get-delimited-modifier-argument'.
(eshell-pred-file-type, eshell-pred-file-mode): Use 'when-let'.
(eshell-modifier-alist): Pass modifier char to
'eshell-include-members'.
* test/lisp/eshell/em-pred-tests.el
(em-pred-test/predicate-delimiters): New test.
(em-pred-test/predicate-uid, em-pred-test/predicate-gid,
em-pred-test/modifier-include, em-pred-test/modifier-exclude): Remove
cases covered by 'em-pred-test/predicate-delimiters'.
(em-pred-test/modifier-substitute): Add test cases for new delimiter
styles.
* doc/misc/eshell.texi (Argument Predication and Modification):
Explain how string parameters are delimited.
(Argument Modifiers): Document some special delimiter behavior with
the 's/PATTERN/REPLACE/' modifier (bug#55204).
* etc/NEWS: Announce this change, and move the
'eshell-eval-using-options' entry to the Eshell section.
Stefan Monnier [Sun, 1 May 2022 17:04:44 +0000 (13:04 -0400)]
* lisp/minibuffer.el (completion--replace): Fix bug#55205
Po Lu [Sun, 1 May 2022 13:39:33 +0000 (21:39 +0800)]
Replace NS code that implemented font panels in a different way
* doc/emacs/macos.texi (Mac / GNUstep Events): Document removal
of `ns-change-font' event. The font panels are now implemented
normally, via `x-select-font'.
* lisp/term/common-win.el (x-setup-function-keys): Likewise.
* lisp/term/ns-win.el (global-map, ns-popup-font-panel): Remove.
(x-select-font, mouse-set-font, ns-input-font):
(ns-input-fontsize): Remove.
(ns-respond-to-change-font): Delete function.
* src/nsfns.m (Fns_popup_font_panel): Delete function.
(Fx_select_font): New function.
(syms_of_nsfns): Update subrs.
* src/nsterm.h (@interface EmacsView):
* src/nsterm.m (ns_select_1): New function.
(ns_select): Wrap around that instead.
([EmacsView changeFont:]): Exit nested event loop
([EmacsView showFontPanel:]): New function.
Lars Ingebrigtsen [Sun, 1 May 2022 11:40:13 +0000 (13:40 +0200)]
Don't enter the debugger from *Backtrace* or edebug on eval errors
* doc/lispref/debugging.texi (Error Debugging): Document it.
* doc/lispref/edebug.texi (Edebug Eval): Mention it.
* lisp/emacs-lisp/debug.el (debug-allow-recursive-debug): New user
option (bug#36145).
(debugger-eval-expression): Use it.
* lisp/emacs-lisp/edebug.el (edebug-eval-expression): Ditto.
This patch is based on a patch by Noam Postavsky.
Lars Ingebrigtsen [Sun, 1 May 2022 11:07:14 +0000 (13:07 +0200)]
Correct Using Debugger lispref node
* doc/lispref/debugging.texi (Using Debugger): Make documentation
reflect reality (bug#36145).
Lars Ingebrigtsen [Sun, 1 May 2022 10:47:31 +0000 (12:47 +0200)]
Make scroll-other-window respect target window remappings
* lisp/window.el (scroll-other-window, scroll-other-window-down):
Moved from window.c and change implementation so that they respect
command remappings in the target window (bug#20236).
Eli Zaretskii [Sun, 1 May 2022 10:06:33 +0000 (13:06 +0300)]
Improve documentation of 'malloc-trim'
* src/alloc.c (Fmalloc_trim): Fix the doc string.
* etc/NEWS: Document which systems support 'malloc-trim'.
Lars Ingebrigtsen [Sun, 1 May 2022 09:51:35 +0000 (11:51 +0200)]
Add new function `malloc-trim'
* configure.ac (PGTK_LIBS): Check for malloc_trim.
* src/alloc.c (Fmalloc_trim): Add new function (bug#45200).
Po Lu [Sun, 1 May 2022 09:08:33 +0000 (09:08 +0000)]
Fix specifying zero as a size for fonts on Haiku
* src/haiku_support.cc (MessageReceived): Set `size_specified'
correctly.
Po Lu [Sun, 1 May 2022 08:53:51 +0000 (08:53 +0000)]
Improve display of Haiku font dialog
* src/haiku_support.cc (EmacsFontSelectionDialog)
(class EmacsFontSelectionDialog, FrameResized): Set minimum size
based on individual view dimensions and add label to size
control.
(BWindow_set_min_size): Delete function.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_update_size_hints): Stop setting min
size, since that doesn't work correctly on Haiku.
Lars Ingebrigtsen [Sun, 1 May 2022 08:20:07 +0000 (10:20 +0200)]
Fix the mm-decode-content-transfer-encoding overflow better
* lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding):
Use it.
(mm-base64-line-p): New function.
Po Lu [Sun, 1 May 2022 07:20:25 +0000 (07:20 +0000)]
* lisp/menu-bar.el (menu-bar-search-menu): Remove extra separator.
Eli Zaretskii [Sun, 1 May 2022 07:01:28 +0000 (10:01 +0300)]
Document 'help-window-select'
* etc/NEWS:
* doc/emacs/help.texi (Apropos, Help): Document
'help-window-select'; improve indexing. (Bug#46034)
Po Lu [Sun, 1 May 2022 05:41:33 +0000 (05:41 +0000)]
Allow specifying font size in the Haiku font selection dialog
* src/haiku_support.cc (struct font_selection_dialog_message):
New fields `size' and `size_specified'.
(class EmacsFontSelectionDialog): New `size_entry' control.
(MessageReceived): Set size from that control if available.
(EmacsFontSelectionDialog): Initialize that control.
(FrameResized): Handle layout for that control.
(be_select_font): New field `size'.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (Fx_select_font): Populate font spec with
size.
Stefan Kangas [Sun, 1 May 2022 04:01:28 +0000 (06:01 +0200)]
Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-04-30 19:52:14 UTC.
Po Lu [Sun, 1 May 2022 03:20:58 +0000 (03:20 +0000)]
Allow quitting inside font selection dialogs on Haiku
* src/haiku_support.cc (WaitForChoice): Accept new function for
checking quit flag.
(be_select_font): Pass that function.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (haikufont_should_quit_popup): New function.
(Fx_select_font): Give said function to `be_select_font'.
Po Lu [Sun, 1 May 2022 02:43:18 +0000 (02:43 +0000)]
Allow invoking fonts in the Haiku font dialog
* src/haiku_support.cc (MessageReceived): Handle invocations.
(EmacsFontSelectionDialog): Set style panel invocation message.
Po Lu [Sun, 1 May 2022 02:17:04 +0000 (02:17 +0000)]
Improvements to the Haiku font dialog
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(EmacsFontSelectionDialog, FrameResized): Fix colors and respect
monospace only.
(be_select_font): New parameter `allow_monospace_only'.
* src/haiku_support.h: Update prototype.
* src/haikufont.c (Fx_select_font): Respect
`exclude-proportional'.
Po Lu [Sun, 1 May 2022 01:44:46 +0000 (09:44 +0800)]
Also fix some compiler warnings in xterm.c that didn't show up
* src/xterm.c (x_dnd_begin_drag_and_drop): Don't define unused
variable on GTK builds.
Po Lu [Sun, 1 May 2022 01:43:08 +0000 (09:43 +0800)]
Fix the GTK build
* src/xterm.c (x_dnd_begin_drag_and_drop): Let GTK handle events
again.
Po Lu [Sun, 1 May 2022 01:41:16 +0000 (09:41 +0800)]
* src/xterm.c (x_dnd_begin_drag_and_drop): Fix typo.
Po Lu [Sun, 1 May 2022 01:37:12 +0000 (09:37 +0800)]
Fix processing events from multiple displays during DND
* src/xterm.c (x_next_event_from_any_display): New function.
Only used on no-toolkit builds.
(x_dnd_begin_drag_and_drop): Compute correct dpyinfo for
handle_one_xevent.
Po Lu [Sun, 1 May 2022 01:15:52 +0000 (09:15 +0800)]
Clean up X Windows tooltip code
* src/xfns.c (x_hide_tip): Remove "bloodcurdling hack".
* src/xterm.c (handle_one_xevent): Add a better version here
instead. The code is unlikely to be hit as well, since tooltip
frames are typically deleted, not just hidden.
Po Lu [Sun, 1 May 2022 00:59:55 +0000 (00:59 +0000)]
Implement font selection dialog on Haiku
* src/haiku_font_support.cc (font_style_to_flags): Handle style
allocation failures.
(be_font_style_to_flags): New function.
* src/haiku_support.cc (struct font_selection_dialog_message):
New struct.
(class EmacsFontSelectionDialog): New class.
(be_select_font): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (Fx_select_font): New function.
(syms_of_haikufont): Define new subr.
Basil L. Contovounesios [Sat, 30 Apr 2022 22:19:51 +0000 (01:19 +0300)]
Fix failing image test on nox builds
* test/lisp/image-tests.el (image-supported-file-p/built-in): Skip
test in --without-x builds.
Lars Ingebrigtsen [Sat, 30 Apr 2022 19:34:18 +0000 (21:34 +0200)]
Make `M-x apropos' respect help-window-select
* lisp/apropos.el (apropos-print): Respect help-window-select.
(apropos): Mention it (bug#46034).