]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoRewrite sql-interactive-remove-continuation-prompt
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

2 years agoMake more buttons in *Help* respect `help-window-keep-selected'
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.

2 years agoFurther mm-base64-line-p bug fixes
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.

2 years agoFix mm-base64-line-p logic
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.

2 years ago* src/haiku_support.cc (DrawContent): Use right UI color.
Po Lu [Tue, 3 May 2022 08:19:41 +0000 (08:19 +0000)]
* src/haiku_support.cc (DrawContent): Use right UI color.

2 years ago; * lisp/tooltip.el (tooltip-show-help): Fix typo in last change.
Po Lu [Tue, 3 May 2022 08:13:59 +0000 (16:13 +0800)]
; * lisp/tooltip.el (tooltip-show-help): Fix typo in last change.

2 years agoMake menu bar help text work on macOS as well
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.

2 years agoFix default font in macOS font dialogs
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.

2 years agoFix some font parsing problems on NS
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.

2 years agoHandle GraphicsExpose events on scroll bars
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.

2 years agoMake sure rectangles are drawn correctly on X
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.

2 years agoFix glyphless glyph display on Haiku
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.

2 years agoFix font matching of "Fira Code Retina" and "Fira Code Regular" on Haiku
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.

2 years agoDon't leave temp files behind from undigest-tests
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.

2 years agoClean up X11 double buffering code
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.

2 years ago; * src/nsterm.m (syms_of_nsterm): Fix typo in defsym.
Po Lu [Tue, 3 May 2022 00:41:38 +0000 (08:41 +0800)]
; * src/nsterm.m (syms_of_nsterm): Fix typo in defsym.

2 years agoFix punctuation in the Eshell manual
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.

2 years ago; * etc/NEWS: Improve wording of "M-x scratch-buffer" entry.
Eli Zaretskii [Mon, 2 May 2022 16:06:45 +0000 (19:06 +0300)]
; * etc/NEWS: Improve wording of "M-x scratch-buffer" entry.

2 years ago; Fix typo and wording of a doc string
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.

2 years agoLoad multiple bibliographies with multibib package
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.

2 years agoWait for events from all displays in Xm dialogs even on XI2
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.

2 years agoMake the eval-in-debug error message prettier in non-recursive errors
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.

2 years agoMake non-recursive error messages in edebug 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.

2 years agoFix eldoc interaction with `when' and `unless'
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.

2 years agoAdd a command to recreate the *scratch* buffer
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.

2 years agoFix handling double-click-time nil or t
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.

2 years agoRe-fix Gcc header tokenization in Gnus
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).

2 years agoAllow reusing the *Help* window with `i'/`s/ commands
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.

2 years agoFix inconsistencies in Haiku font selection dialog
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.

2 years agoAllow show-paren to show matching parentheses inside comments
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).

2 years agoFix handling of some weights in the Haiku font driver
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.

2 years agoUse xref-goto-xref as the xref mouse binding
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.

2 years agoFix the OMIT-NULLS + "" case in string-lines
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.

2 years agoImprove font dialog on macOS
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.

2 years agoDefault to currently selected font in Haiku font dialogs
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.

2 years ago* lisp/gnus/gnus-util.el (gnus-byte-compile): Use `lexical-binding`
Stefan Monnier [Mon, 2 May 2022 05:14:17 +0000 (01:14 -0400)]
* lisp/gnus/gnus-util.el (gnus-byte-compile): Use `lexical-binding`

2 years agoFix race conditions with async input in some Haiku dialogs
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.

2 years agoFix the macOS build
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.

2 years agoMake the NS font dialog return more correct values
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.

2 years agoFix devices staying disabled in some cases
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.

2 years agoFix string-lines return for ""
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).

2 years agoChange string-lines semantics slightly
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.

2 years agoHandle escaped characters in Eshell special references (e.g. buffers)
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).

2 years agoHandle escaped characters in Eshell argument predicates/modifiers
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).

2 years agoUse a common set of string delimiters for all Eshell predicates/modifiers
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.

2 years ago* lisp/minibuffer.el (completion--replace): Fix bug#55205
Stefan Monnier [Sun, 1 May 2022 17:04:44 +0000 (13:04 -0400)]
* lisp/minibuffer.el (completion--replace): Fix bug#55205

2 years agoReplace NS code that implemented font panels in a different way
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.

2 years agoDon't enter the debugger from *Backtrace* or edebug on eval errors
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.

2 years agoCorrect Using Debugger lispref node
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).

2 years agoMake scroll-other-window respect target window remappings
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).

2 years agoImprove documentation of 'malloc-trim'
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'.

2 years agoAdd new function `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).

2 years agoFix specifying zero as a size for fonts on Haiku
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.

2 years agoImprove display of Haiku font dialog
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.

2 years agoFix the mm-decode-content-transfer-encoding overflow better
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.

2 years ago* lisp/menu-bar.el (menu-bar-search-menu): Remove extra separator.
Po Lu [Sun, 1 May 2022 07:20:25 +0000 (07:20 +0000)]
* lisp/menu-bar.el (menu-bar-search-menu): Remove extra separator.

2 years agoDocument 'help-window-select'
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)

2 years agoAllow specifying font size in the Haiku font selection dialog
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.

2 years agoUpdate publicsuffix.txt from upstream
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.

2 years agoAllow quitting inside font selection dialogs on Haiku
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'.

2 years agoAllow invoking fonts in the Haiku font dialog
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.

2 years agoImprovements to the Haiku font dialog
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'.

2 years agoAlso fix some compiler warnings in xterm.c that didn't show up
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.

2 years agoFix the GTK build
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.

2 years ago* src/xterm.c (x_dnd_begin_drag_and_drop): Fix typo.
Po Lu [Sun, 1 May 2022 01:41:16 +0000 (09:41 +0800)]
* src/xterm.c (x_dnd_begin_drag_and_drop): Fix typo.

2 years agoFix processing events from multiple displays during DND
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.

2 years agoClean up X Windows tooltip code
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.

2 years agoImplement font selection dialog on Haiku
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.

2 years agoFix failing image test on nox builds
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.

2 years agoMake `M-x apropos' respect help-window-select
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).

2 years agoMake load-path-shadows-mode a special mode
Lars Ingebrigtsen [Sat, 30 Apr 2022 18:34:35 +0000 (20:34 +0200)]
Make load-path-shadows-mode a special mode

* lisp/emacs-lisp/shadow.el (load-path-shadows-mode): Make the
mode inherit from special-mode so that the `q' command works.

2 years agoFix compilation-max-output-line-length type
Lars Ingebrigtsen [Sat, 30 Apr 2022 17:42:42 +0000 (19:42 +0200)]
Fix compilation-max-output-line-length type

* lisp/progmodes/compile.el (compilation-max-output-line-length):
Fix the type.

2 years agoAvoid regexp overflow in mm-decode-content-transfer-encoding
Lars Ingebrigtsen [Sat, 30 Apr 2022 17:14:35 +0000 (19:14 +0200)]
Avoid regexp overflow in mm-decode-content-transfer-encoding

* lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding):
The base64 may be huge, so avoid backtracking (bug#55195).

2 years agoFix Vx_show_tooltip_timeout in ns build, too
Lars Ingebrigtsen [Sat, 30 Apr 2022 16:21:51 +0000 (18:21 +0200)]
Fix Vx_show_tooltip_timeout in ns build, too

* src/nsfns.m (Fx_show_tip): Respect Vx_show_tooltip_timeout here,
too.

2 years agoFix compilation after recent x-show-tooltip-timeout changes
Lars Ingebrigtsen [Sat, 30 Apr 2022 16:20:19 +0000 (18:20 +0200)]
Fix compilation after recent x-show-tooltip-timeout changes

* src/dispnew.c (syms_of_display): Move x-show-tooltip-timeout to
a common file to avoid breaking other systems.

2 years agoRemove the "retro" Gnus/Message tool bars
Lars Ingebrigtsen [Sat, 30 Apr 2022 16:17:47 +0000 (18:17 +0200)]
Remove the "retro" Gnus/Message tool bars

* doc/misc/gnus.texi (Gravatars): Remove documentation.
* lisp/gnus/gmm-utils.el (gmm-tool-bar-style): Obsoleted.

* lisp/gnus/gnus-group.el (gnus-group-tool-bar): Use the "Gnome"
definition.
(gnus-group-tool-bar-gnome, gnus-group-tool-bar-retro)
(gnus-group-tool-bar-zap-list): Obsolete.

* lisp/gnus/gnus-sum.el (gnus-summary-tool-bar): Use the "Gnome"
definition.
(gnus-summary-tool-bar-gnome, gnus-summary-tool-bar-retro)
(gnus-summary-tool-bar-zap-list): Obsolete.

* lisp/gnus/message.el (message-tool-bar): Use the "Gnome"
definition.
(message-tool-bar-gnome, message-tool-bar-retro)
(message-tool-bar-zap-list): Obsolete.

2 years ago* lisp/gnus/deuglify.el (gnus-article-outlook-rearrange-citation): Add autoload cookie.
Andreas Schwab [Sat, 30 Apr 2022 12:46:28 +0000 (14:46 +0200)]
* lisp/gnus/deuglify.el (gnus-article-outlook-rearrange-citation): Add autoload cookie.

2 years agoUse x-show-tooltip-timeout in all the implementations
Lars Ingebrigtsen [Sat, 30 Apr 2022 15:38:34 +0000 (17:38 +0200)]
Use x-show-tooltip-timeout in all the implementations

* src/haikufns.c (Fx_show_tip): Use the timeout variable.
* src/pgtkfns.c (Fx_show_tip): Ditto.

* src/w32fns.c (Fx_show_tip): Ditto.

* src/xfns.c (Fx_show_tip): Doc fix.

2 years agoDon't hard code the default x-show-tip timeout
Lars Ingebrigtsen [Sat, 30 Apr 2022 15:09:02 +0000 (17:09 +0200)]
Don't hard code the default x-show-tip timeout

* src/xfns.c (Fx_show_tip): Use it.
(syms_of_xfns): Add a new x-show-tooltip-timeout variable
(bug#23341).

2 years agoMove the when-let family of macros to subr.el
Lars Ingebrigtsen [Sat, 30 Apr 2022 14:42:44 +0000 (16:42 +0200)]
Move the when-let family of macros to subr.el

* lisp/subr.el (internal--build-binding)
(internal--build-bindings): Moved from subr-x.el and rewritten to
not use the threading macro.
(if-let*, when-let*, and-let*, if-let, when-let): Moved from
subr-x.el.  This avoids breaking the build every time somebody
uses these macros in functions that end up being called during
bootstrap.

2 years agoAvoid using if-let in subr.el
Lars Ingebrigtsen [Sat, 30 Apr 2022 14:24:55 +0000 (16:24 +0200)]
Avoid using if-let in subr.el

* lisp/subr.el (string-lines): Avoid using if-let (from subr-x) in
subr (bug#55194).

2 years ago; * doc/lispref/strings.texi (Creating Strings): Fix a typo.
Eli Zaretskii [Sat, 30 Apr 2022 11:54:35 +0000 (14:54 +0300)]
; * doc/lispref/strings.texi (Creating Strings): Fix a typo.

2 years agoMake the xref--button-map more regular
Lars Ingebrigtsen [Sat, 30 Apr 2022 11:38:04 +0000 (13:38 +0200)]
Make the xref--button-map more regular

* lisp/progmodes/xref.el (xref--button-map): Remove the mouse-1
binding (bug#35353).

2 years agoMake Python evaluation work more reliably
Jin Choi [Sat, 30 Apr 2022 11:34:57 +0000 (13:34 +0200)]
Make Python evaluation work more reliably

* lisp/progmodes/python.el (python-shell-buffer-substring): Make
more regions valid Python code (bug#55174).

Copyright-paperwork-exempt: yes

2 years agoFix some cases of flicker on MS Windows
Po Lu [Sat, 30 Apr 2022 11:02:56 +0000 (19:02 +0800)]
Fix some cases of flicker on MS Windows

* src/w32term.c (w32_read_socket): Fix typo in check before
flipping buffers.

2 years agoTruncate output from grep
Lars Ingebrigtsen [Sat, 30 Apr 2022 10:56:18 +0000 (12:56 +0200)]
Truncate output from grep

* doc/emacs/building.texi (Compilation): Document it.
* lisp/progmodes/compile.el (compilation-max-output-line-length):
New user option (bug#44983).
(compilation-filter): Use it.
(compilation--insert-abbreviated-line): New function.

2 years agoMake grep-mode-font-lock-keywords more efficient
Lars Ingebrigtsen [Sat, 30 Apr 2022 10:47:50 +0000 (12:47 +0200)]
Make grep-mode-font-lock-keywords more efficient

* lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Make the
regexp less greedy so that long lines don't take forever to
font-lock (bug#44983).

2 years agoAdd a KEEP-NEWLINES argument to string-lines
Lars Ingebrigtsen [Sat, 30 Apr 2022 10:46:40 +0000 (12:46 +0200)]
Add a KEEP-NEWLINES argument to string-lines

* doc/lispref/strings.texi (Creating Strings): Document it.

* lisp/subr.el (string-lines): Add a KEEP-NEWLINES argument.

2 years agoFix display updating inside the minibuffer on MS Windows
Po Lu [Sat, 30 Apr 2022 10:54:34 +0000 (18:54 +0800)]
Fix display updating inside the minibuffer on MS Windows

* src/minibuf.c (read_minibuf): Call `w32_flip_buffers_if_dirty'
after changing the cursor position and redisplaying instead of
`flush_frame'.  (bug#55193)

* src/w32term.c (w32_flip_buffers_if_dirty): New function.
* src/w32term.h: Update prototypes.

2 years agoAvoid server roundtrip on wheel events from scroll bars on XI2
Po Lu [Sat, 30 Apr 2022 10:05:44 +0000 (18:05 +0800)]
Avoid server roundtrip on wheel events from scroll bars on XI2

* src/xterm.c (handle_one_xevent): Translate coordinates for
scroll bars correctly when handling XI2 wheel events.

2 years ago; * src/w32term.c (w32_read_socket): Add comment for recent change.
Eli Zaretskii [Sat, 30 Apr 2022 09:35:48 +0000 (12:35 +0300)]
; * src/w32term.c (w32_read_socket): Add comment for recent change.

2 years ago; Minor fixes of documentation of double-buffering on MS-Windows
Eli Zaretskii [Sat, 30 Apr 2022 09:00:33 +0000 (12:00 +0300)]
; Minor fixes of documentation of double-buffering on MS-Windows

* etc/NEWS: Improve and expand wording of the entry about
double-buffering on MS-Windows.

* src/w32fns.c (w32_set_inhibit_double_buffering): Fix commentary.

2 years ago* admin/CPP-DEFINES: Update for new features.
Po Lu [Sat, 30 Apr 2022 08:46:33 +0000 (16:46 +0800)]
* admin/CPP-DEFINES: Update for new features.

2 years agoProcess editres events not for frames correctly
Po Lu [Sat, 30 Apr 2022 07:57:11 +0000 (15:57 +0800)]
Process editres events not for frames correctly

* src/xterm.c (handle_one_xevent): Dispatch Editres events to
interested widgets.

2 years agoAdjustments to double buffering on MS Windows
Po Lu [Sat, 30 Apr 2022 07:49:06 +0000 (15:49 +0800)]
Adjustments to double buffering on MS Windows

* src/w32fns.c (w32_set_inhibit_double_buffering): Add comment
describing double buffering.
(w32_wnd_proc): Respect `w32-disable-double-buffering'.
(globals_of_w32fns): New variable
`w32-disable-double-buffering'.

* src/w32term.c (w32_show_back_buffer): Return immediately if
double buffering is disabled on the frame.
(w32_scroll_run): Use old scrolling code if
`w32-disable-double-buffering' is enabled.
(w32_scroll_bar_clear): Document why we don't clear scroll bars
when double buffering is enabled.
(w32_read_socket): Respect `w32-disable-double-buffering' and
clean up some code.

* src/w32xfns.c (get_frame_dc): Respect
`w32-disable-double-buffering'.

2 years agoFix use of kp-decimal in 'vhdl-stutter-mode'
Eli Zaretskii [Sat, 30 Apr 2022 07:10:07 +0000 (10:10 +0300)]
Fix use of kp-decimal in 'vhdl-stutter-mode'

* lisp/progmodes/vhdl-mode.el (vhdl-electric-period): Avoid
signaling an error when the user presses the kp-decimal key on the
numeric pad in 'vhdl-stutter-mode'.  (Bug#55079)

2 years agoHandle exposure in the widget's expose proc on X
Po Lu [Sat, 30 Apr 2022 06:29:33 +0000 (14:29 +0800)]
Handle exposure in the widget's expose proc on X

* src/widget.c (emacsFrameClassRec): Don't inherit expose proc.
(get_default_char_pixel_size):
(pixel_to_char_size):
(char_to_pixel_size):
(round_size_to_char):
(EmacsFrameInitialize):
(EmacsFrameRealize):
(EmacsFrameResize): Clean up coding style.
(EmacsFrameExpose): New function.  Expose the frame here to
satisfy the toolkit when it calls the expose proc by hand.

* src/xterm.c (handle_one_xevent): Handle exposure through the
widget instead.

2 years agoFix releasing the mouse on top of the tool bar on MS Windows
Po Lu [Sat, 30 Apr 2022 05:26:40 +0000 (13:26 +0800)]
Fix releasing the mouse on top of the tool bar on MS Windows

* src/w32term.c (w32_read_socket): Don't handle tool bar clicks
specially for button up events if no tool bar item was
previously pressed.

2 years agoFix palette freeing on MS Windows with double buffering
Po Lu [Sat, 30 Apr 2022 03:33:38 +0000 (11:33 +0800)]
Fix palette freeing on MS Windows with double buffering

* src/w32term.c (w32_release_paint_buffer): Also release target
DC palette.

2 years agoImplement double buffering on MS Windows
Po Lu [Fri, 29 Apr 2022 03:33:41 +0000 (11:33 +0800)]
Implement double buffering on MS Windows

* etc/NEWS: Announce changes.
* src/w32fns.c (w32_set_inhibit_double_buffering): New function.
(w32_wnd_proc):
(Fx_create_frame):
(w32_create_tip_frame): Set `inhibit-double-buffering' parameter.
(w32_frame_parm_handlers): Add new handler.

* src/w32term.c (w32_show_back_buffer):
(w32_release_paint_buffer): New functions.
(w32_frame_up_to_date): Show back buffer if applicable.
(w32_buffer_flipping_unblocked_hook): New hook.
(w32_scroll_run): Use BitBlt to scroll instead of window
scrolling functions.
(w32_scroll_bar_clear): Don't clear scroll bars when double
buffered.
(w32_read_socket): Flip buffers after reading input events in
some cases.
(w32_free_frame_resources): Free back buffer.
(w32_create_terminal): Add new hook.

* src/w32term.h (struct w32_output): New fields for handling
back buffers.
* src/w32xfns.c (select_palette): Fix indentation.
(get_frame_dc, release_frame_dc): Return back buffer when
appropriate and set dirty flag.