]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoMake last change compile
Po Lu [Sat, 1 Jan 2022 10:29:44 +0000 (10:29 +0000)]
Make last change compile

* src/haiku_support.cc (EmacsShow): Fix last change.
(TearDownDoubleBuffering): Likewise.
(Draw): Draw normally if not double buffered even if shown_flag
is true.

2 years agoFix expose events in non-double-buffered child frames on Haiku
Po Lu [Sat, 1 Jan 2022 10:24:38 +0000 (10:24 +0000)]
Fix expose events in non-double-buffered child frames on Haiku

* src/haiku_support.cc (EmacsShow): Set shown_flag to 1 only if
this view is double buffered.
(TearDownDoubleBuffering): Clear shown_flag.

2 years agoFix some more off-by-one errors in Haiku image code
Po Lu [Sat, 1 Jan 2022 09:56:14 +0000 (09:56 +0000)]
Fix some more off-by-one errors in Haiku image code

* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp):
(BView_DrawMask):
(BBitmap_transform_bitmap):
* src/haiku_support.cc (AttachCairoSurface): Adjust calculations
to take account of BRect width and height functions returning
(start - end) instead of the actual width and height of the
rectangle.

2 years agoFix deadlocks with invisible frames and threads in Haiku
Po Lu [Sat, 1 Jan 2022 09:33:15 +0000 (09:33 +0000)]
Fix deadlocks with invisible frames and threads in Haiku

* src/haiku_support.cc (class EmacsWindow): New field
`was_shown_p'.
(EmacsShow): Lock looper if the window wasn't ever visible.
(BWindow_new): Unlock window looper after creating it.

2 years agoSet display last user time when handling pinch events
Po Lu [Sat, 1 Jan 2022 07:23:55 +0000 (15:23 +0800)]
Set display last user time when handling pinch events

* src/xterm.c (handle_one_xevent): Set last user time for XI
pinch events.

2 years agoFix child frame synchronization order on Haiku
Po Lu [Sat, 1 Jan 2022 07:09:38 +0000 (07:09 +0000)]
Fix child frame synchronization order on Haiku

* src/haiku_support.cc (DoMove):
(FrameMoved): Fix locking and sync order semantics.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Sat, 1 Jan 2022 06:25:50 +0000 (07:25 +0100)]
; Auto-commit of loaddefs files.

2 years agoImplement numeric values of `mouse-highlight' on Haiku
Po Lu [Sat, 1 Jan 2022 06:16:59 +0000 (06:16 +0000)]
Implement numeric values of `mouse-highlight' on Haiku

* src/haikuterm.c (haiku_read_socket): Clear mouse face on
keyboard input if `mouse-highlight' is a fixnum.

2 years agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Sat, 1 Jan 2022 05:56:33 +0000 (06:56 +0100)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2021-12-31 02:56:06 UTC.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 1 Jan 2022 05:51:58 +0000 (06:51 +0100)]
Merge from origin/emacs-28

67400da412 Improve doc strings of fringe indicator variables
a6adfe21e4 * lisp/tab-line.el (tab-line--get-tab-property): New funct...

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sat, 1 Jan 2022 05:51:58 +0000 (06:51 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

89f205084b Avoid assertion violations with variable-weight fonts

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 1 Jan 2022 05:51:56 +0000 (06:51 +0100)]
Merge from origin/emacs-28

f2031d0ddb Minor improvement in user documentation of completion style
1e3076e2db Fix bug where bookmark-jump used (point), not (point-at-bol)

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Sat, 1 Jan 2022 05:36:23 +0000 (05:36 +0000)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoFlush frames after mouse face is cleared on a child frame in Haiku
Po Lu [Sat, 1 Jan 2022 05:32:42 +0000 (05:32 +0000)]
Flush frames after mouse face is cleared on a child frame in Haiku

* src/haiku_support.cc (~EmacsWindow):
(UpwardsSubsetChildren):
(UpwardsUnSubsetChildren): Fix locking semantics.

* src/haikuterm.c (haiku_read_socket): Flush dirty back buffers
after clearing mouse face because the pointer was moved out of a
frame.

2 years agoPrint dead xwidgets specially
Po Lu [Sat, 1 Jan 2022 00:54:51 +0000 (08:54 +0800)]
Print dead xwidgets specially

* src/print.c (print_vectorlike) <PVEC_XWIDGET>: Print "killed
xwidget" for dead xwidgets.

2 years agoImprove doc strings of fringe indicator variables
Eli Zaretskii [Fri, 31 Dec 2021 19:58:42 +0000 (21:58 +0200)]
Improve doc strings of fringe indicator variables

* src/buffer.c (syms_of_buffer): Fix doc strings of
'indicate-empty-lines' and 'indicate-buffer-boundaries'.

2 years agoUse defvar-keymap in play/*.el
Stefan Kangas [Fri, 31 Dec 2021 16:17:16 +0000 (17:17 +0100)]
Use defvar-keymap in play/*.el

* lisp/play/5x5.el (5x5-mode-map):
* lisp/play/blackbox.el (blackbox-mode-map):
* lisp/play/bubbles.el (bubbles-mode-map):
* lisp/play/decipher.el (decipher-mode-map):
* lisp/play/doctor.el (doctor-mode-map):
* lisp/play/gametree.el (gametree-mode-map):
* lisp/play/gomoku.el (gomoku-mode-map):
* lisp/play/mpuz.el (mpuz-mode-map):
* lisp/play/pong.el (pong-mode-map):
* lisp/play/solitaire.el (solitaire-mode-map): Use defvar-keymap.

2 years ago`make-finalizer' now has to be called with a function, so adjust test
Lars Ingebrigtsen [Fri, 31 Dec 2021 15:50:50 +0000 (16:50 +0100)]
`make-finalizer' now has to be called with a function, so adjust test

2 years agoDocumentation update for Secret Service
Michael Albinus [Fri, 31 Dec 2021 13:36:49 +0000 (14:36 +0100)]
Documentation update for Secret Service

* doc/misc/auth.texi (Secret Service API): Precise "session" collection.

* lisp/auth-source.el (auth-sources): Adapt custom label.

* lisp/net/secrets.el: Adjust comments.

2 years agoFix copyright dates in some files belonging to the pgtk port
Po Lu [Fri, 31 Dec 2021 13:08:23 +0000 (21:08 +0800)]
Fix copyright dates in some files belonging to the pgtk port

* src/pgtkgui.h:
* src/pgtkim.c:
* src/pgtkmenu.c:
* src/pgtkselect.c:
* src/pgtkselect.h:
* src/pgtkterm.c:
* src/pgtkterm.h: Fix copyright dates to say '2021'.

2 years agoOn Haiku, sync a frames's connection to the app sever after raising
Po Lu [Fri, 31 Dec 2021 13:03:07 +0000 (13:03 +0000)]
On Haiku, sync a frames's connection to the app sever after raising

* src/haiku_support.h: (BWindow_sync)
* src/haiku_support.cc (BWindow_sync): New function.
* src/haikuterm.c (haiku_frame_raise_lower): Synchronize window
after raising it to avoid situations where raising windows is
done out-of-order, such as when ediff raises a frame.

2 years agoFix child frame unlinking on Haiku
Po Lu [Fri, 31 Dec 2021 10:59:53 +0000 (10:59 +0000)]
Fix child frame unlinking on Haiku

* src/haiku_support.cc (UnlinkChild): Fix obvious mistake.
(DoMove): Lock child frame window before moving it.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Fri, 31 Dec 2021 09:38:41 +0000 (09:38 +0000)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoUse a single global lock for the child frame state on Haiku
Po Lu [Fri, 31 Dec 2021 09:31:27 +0000 (09:31 +0000)]
Use a single global lock for the child frame state on Haiku

Each BWindows (and various system callbacks) runs in a separate
thread, so there are very complicated locking semantics that
used to be handled manually.  This changes child frame state to
use a single global lock, which makes things much easier.

* src/haiku_support.cc (child_frame_lock): New variable.
(class EmacsWindow):
(~EmacsWindow):
(Unparent):
(ParentTo):
(MoveChild):
(FrameMoved):
(EmacsHide):
(EmacsShow):
(GetParentWidthHeight):
(OffsetChildRect):
(MakeFullscreen):
(SetUpDoubleBuffering): Use a single lock for controlling access
to child frame state.

2 years agoFix handling of webkit xwidget bookmarks
Stephen Berman [Fri, 31 Dec 2021 09:25:52 +0000 (10:25 +0100)]
Fix handling of webkit xwidget bookmarks

Make jumping to a bookmarked webkit xwidget in another window or
another frame show the xwidget only in that window or frame and
refactor new session code used by the bookmark code (bug#52856).
In addition, make xwidget-webkit-clone-* commands work.

* lisp/xwidget.el (xwidget-webkit-clone-and-split-below)
(xwidget-webkit-clone-and-split-right): Unbreak these functions by
passing just the URL to them, not the message displaying it.
(xwidget-webkit-bookmark-jump-new-session): Adjust doc string,
rephrasing and removing a customization suggestion that cannot
take effect.
(xwidget-webkit-bookmark-jump-handler): New autoloaded function.
(xwidget-webkit-bookmark-make-record): Use it.
(xwidget-webkit--create-new-session-buffer): New function
extracted from `xwidget-webkit-new-session'.
(xwidget-webkit-new-session): Use it.

2 years ago* lisp/tab-line.el (tab-line--get-tab-property): New function (bug#52881).
Juri Linkov [Fri, 31 Dec 2021 09:20:51 +0000 (11:20 +0200)]
* lisp/tab-line.el (tab-line--get-tab-property): New function (bug#52881).

(tab-line-auto-hscroll): Use ‘tab-line--get-tab-property’ instead of
‘get-pos-property 1’, and ‘get-text-property’ instead of
‘get-pos-property’.
(tab-line-select-tab, tab-line-close-tab): Use tab-line--get-tab-property.

2 years agoMinor improvements of 'lisp-directory' docs
Eli Zaretskii [Fri, 31 Dec 2021 08:56:28 +0000 (10:56 +0200)]
Minor improvements of 'lisp-directory' docs

* lisp/startup.el (lisp-directory):
* etc/NEWS:
* doc/lispref/loading.texi (Library Search): Improve wording of
documentation of 'lisp-directory' and related features.

2 years agoPrevent double buffering from being disabled on USE_BE_CAIRO builds
Po Lu [Fri, 31 Dec 2021 07:29:30 +0000 (07:29 +0000)]
Prevent double buffering from being disabled on USE_BE_CAIRO builds

The direct rendering code used in that situation never
completely worked, and the BDirectWindow destructor is also
buggy.  Completely remove that code in order to let us inherit
from BWindow, so as to prevent the buggy destructor from being
run.

* src/haiku_support.cc (cairo_format_from_color_space): Delete
function.
(class EmacsWindow): Inherit from BWindow.
(EmacsWindow): Call BWindow constructor instead.
(MessageReceived):
(DispatchMessage):
(FrameResized):
(FrameMoved):
(Zoom): Call BWindow functions instead.
(EmacsView_cairo_surface): Stop looking for surfaces in the
window.
(EmacsWindow_begin_cr_critical_section):
(EmacsWindow_end_cr_critical_section): Stop locking the window.

* src/haikufns.c (haiku_set_inhibit_double_buffering): Always
enable double buffering on Cairo builds.

2 years agoDon't select for gesture events on xwidgets if the server is too old
Po Lu [Fri, 31 Dec 2021 06:04:40 +0000 (14:04 +0800)]
Don't select for gesture events on xwidgets if the server is too old

* src/xwidget.c (x_draw_xwidget_glyph_string): Only select for
XI gesture events if the server supports XI 2.4 or later.

2 years ago(Fmake_finalizer): Check the arg is a function
Stefan Monnier [Fri, 31 Dec 2021 05:16:03 +0000 (00:16 -0500)]
(Fmake_finalizer): Check the arg is a function

* src/eval.c (syms_of_eval): Add `Qfunctionp`.
* src/alloc.c (Fmake_finalizer): Check the arg is a function.

2 years ago* lisp/emacs-lisp/package.el (package-get-version): Add fallback
Stefan Monnier [Fri, 31 Dec 2021 05:03:35 +0000 (00:03 -0500)]
* lisp/emacs-lisp/package.el (package-get-version): Add fallback

2 years agoDon't store docstrings of preloaded .el files in etc/DOC
Stefan Monnier [Fri, 31 Dec 2021 04:17:45 +0000 (23:17 -0500)]
Don't store docstrings of preloaded .el files in etc/DOC

Since the location of those files changes between build time and
installation time, this requires to tweak the file name used in those
(#$ . NNN) references during the dump so they don't hardcode the build
directory.  We do it in the same way as was already done for those
same file names in `load-history`, except we convert them back to
absolute file names more lazily (i.e. when fetching the actual
docstring rather than at startup), which requires remembering the
`lisp-dir` computed at startup in the new `lisp-directory` variable.

* src/Makefile.in ($(etc)/DOC): Don't scan Lisp files any more.

* src/lread.c (Fload): Use relative file names for `load-file-name`
when preloading for the dump, like we already did for `current-load-list`.
(read_list): Don't zero-out dynamic docstring references during the
preload since they won't be filled later by Snarf-documentation any more.
(read1): Remove the hash-hack for doc references that were zeroed.

* lisp/startup.el (lisp-directory): New variable.
(command-line): Set it.

* src/doc.c (get_doc_string): Use `lisp-directory` for dynamic
docstring references using relative file names.
(syms_of_doc): Add `Qlisp_directory`.

* lib-src/make-docfile.c (scan_file): Don't handle `.el` or `.elc`
files any more.
(IS_SLASH): Remove macro, not used any more.
(skip_white, read_lisp_symbol, search_lisp_doc_at_eol)
(scan_lisp_file): Remove functions, not used any more.

* doc/lispref/loading.texi (Library Search): Mention `lisp-directory`.

2 years agoAdd pinch event support to xwidgets
Po Lu [Fri, 31 Dec 2021 02:07:30 +0000 (10:07 +0800)]
Add pinch event support to xwidgets

* src/xterm.c (handle_one_xevent): Pass through pinch events to
xwidgets and provide root coordinates when translating motion
events.
* src/xwidget.c (xwidget_motion_notify): Use provided root
window coordinates.
(xwidget_pinch): New function.
* src/xwidget.h (xwidget_motion_notify): Update prototype.
(xwidget_pinch): New function prototype.

2 years agoRestore original xwidget embedder after performing a lispy event
Po Lu [Fri, 31 Dec 2021 01:27:12 +0000 (09:27 +0800)]
Restore original xwidget embedder after performing a lispy event

* src/xwidget.c (Fxwidget_perform_lispy_event): Restore original
embedder after performing event.
(Fdelete_xwidget_view): Block input around non-reentrant
section.

2 years ago* src/xwidget.c (Fxwidget_perform_lispy_event): Use FRAME_WINDOW_P.
Po Lu [Fri, 31 Dec 2021 01:18:56 +0000 (09:18 +0800)]
* src/xwidget.c (Fxwidget_perform_lispy_event): Use FRAME_WINDOW_P.

2 years agoAvoid assertion violations with variable-weight fonts
Eli Zaretskii [Thu, 30 Dec 2021 18:28:58 +0000 (20:28 +0200)]
Avoid assertion violations with variable-weight fonts

* src/font.c (font_score, font_delete_unmatched): Don't assume
weight, slant, and width properties of the font must be fixnums:
some variable-weight fonts violate that assumption.  Reported
by Sean Whitton <spwhitton@spwhitton.name>.  Do not merge to
master.  (Bug#52888)

2 years agoMinor improvement in user documentation of completion style
Eli Zaretskii [Thu, 30 Dec 2021 18:07:29 +0000 (20:07 +0200)]
Minor improvement in user documentation of completion style

* doc/emacs/mini.texi (Completion Styles): Add reference to
"Completion Variables" in the ELisp manual.  (Bug#52901)

2 years ago* lisp/window.el (display-comint-buffer-action): Fix type.
Glenn Morris [Thu, 30 Dec 2021 17:25:02 +0000 (09:25 -0800)]
* lisp/window.el (display-comint-buffer-action): Fix type.

2 years ago* lisp/emacs-lisp/ert.el (ert-select-tests): Document new error.
Philipp Stephani [Thu, 30 Dec 2021 16:59:07 +0000 (17:59 +0100)]
* lisp/emacs-lisp/ert.el (ert-select-tests): Document new error.

2 years ago* lisp/emacs-lisp/ert.el (ert-select-tests): Simplify nested switch
Philipp Stephani [Thu, 30 Dec 2021 16:18:54 +0000 (17:18 +0100)]
* lisp/emacs-lisp/ert.el (ert-select-tests): Simplify nested switch

2 years agoProperly report errors about unbound ERT test symbols.
Philipp Stephani [Thu, 30 Dec 2021 15:59:16 +0000 (16:59 +0100)]
Properly report errors about unbound ERT test symbols.

Assertions should only be used to check internal consistency within a
package, not to check arguments passed by callers.  Instead, define
and use a new error symbol.

* lisp/emacs-lisp/ert.el (ert-test-unbound): New error symbol.
(ert-select-tests): Use it.

* test/lisp/emacs-lisp/ert-tests.el (ert-test-select-undefined): New
unit test.

* etc/NEWS: Document new behavior.

2 years ago; * lisp/emacs-lisp/ert.el: Update reference to 'cl-assert'
Philipp Stephani [Thu, 30 Dec 2021 15:22:32 +0000 (16:22 +0100)]
; * lisp/emacs-lisp/ert.el: Update reference to 'cl-assert'

2 years agoFix multisession-tests on MS-Windows
Eli Zaretskii [Thu, 30 Dec 2021 14:44:13 +0000 (16:44 +0200)]
Fix multisession-tests on MS-Windows

* test/lisp/emacs-lisp/multisession-tests.el
(multi-test-files-simple): On MS-Windows and Haiku, wait before
invoking the Emacs sub-process, not after, to ensure the later
update is detected with 1-sec file time resolution.

2 years agoMake sure widget buttons always have a left box line
Po Lu [Thu, 30 Dec 2021 11:43:58 +0000 (19:43 +0800)]
Make sure widget buttons always have a left box line

* lisp/wid-edit.el (widget-specify-button): Add an invisible
before-string to the button overlay.  (bug#51550)

2 years agoCC Mode: Prevent rapid alternation of fontification of "found types"
Alan Mackenzie [Thu, 30 Dec 2021 11:32:25 +0000 (11:32 +0000)]
CC Mode: Prevent rapid alternation of fontification of "found types"

This fixes bug #52863.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When a new type is
found, postpone entering it into c-found-types (and thus triggering the
fontification of that type throughout the buffer) until the end of the
function, when we're sure that the "type" found actually is a type.

2 years agoFix previous change in 'pop_it'
Eli Zaretskii [Thu, 30 Dec 2021 11:32:14 +0000 (13:32 +0200)]
Fix previous change in 'pop_it'

* src/xdisp.c (restore_face_box_flags): New function.
(pop_it): Use 'restore_face_box_flags'.  (Bug#51550)

2 years agoFix start-of-box-face display after display and overlay strings
Eli Zaretskii [Thu, 30 Dec 2021 11:21:01 +0000 (13:21 +0200)]
Fix start-of-box-face display after display and overlay strings

* src/xdisp.c (pop_it): Recompute the 'start_of_box_run_p' flag,
like we do in 'handle_fontified_prop', when faces change while
iterating over a buffer or string.  (Bug#51550)

2 years ago* lisp/tab-line.el (tab-line-tab-name-format-default): Add help-echo.
Juri Linkov [Thu, 30 Dec 2021 08:08:37 +0000 (10:08 +0200)]
* lisp/tab-line.el (tab-line-tab-name-format-default): Add help-echo.

(bug#52889)

2 years agoMake xwidget motion commands hscroll the window of wide widgets
Po Lu [Thu, 30 Dec 2021 07:04:18 +0000 (15:04 +0800)]
Make xwidget motion commands hscroll the window of wide widgets

* lisp/xwidget.el (xwidget-info): New function declaration.
(xwidget-webkit-scroll-forward):
(xwidget-webkit-scroll-backward): Hscroll the window if the
widget is wider than the text area.  (bug#52885)

* src/xwidget.c (xwidget_scroll, xwidget_motion_notify): Apply
clip offsets to coordinates.

2 years agoFix bug where bookmark-jump used (point), not (point-at-bol)
Campbell Barton [Thu, 30 Dec 2021 06:20:45 +0000 (17:20 +1100)]
Fix bug where bookmark-jump used (point), not (point-at-bol)

This matches changes from e852822f3db469c985bf022651f184d6ff2c518a,
regression in 7fe88446c30279285e3171091189b3d1af697c05.
* lisp/bookmark.el (bookmark--jump-via): Look at overlays at BOL.
Otherwise the fringe bookmark indication is not deleted with the
bookmark.

Copyright-paperwork-exempt: yes

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 30 Dec 2021 05:30:43 +0000 (06:30 +0100)]
Merge from origin/emacs-28

06545bc0cc CC Mode: c-update-brace-stack: After struct foo *, do not ...
f11779f01b Improve documentation of 'M-X' and related features

# Conflicts:
# etc/NEWS

2 years agoWork around xwidgets releasing the passive grab on an entry event
Po Lu [Thu, 30 Dec 2021 03:18:42 +0000 (11:18 +0800)]
Work around xwidgets releasing the passive grab on an entry event

* src/xterm.c (handle_one_xevent): Don't send XI_Enter events to
xwidgets if button 1 is pressed.

2 years agoUse XRandR 1.5 to generate monitor attributes if available
Po Lu [Thu, 30 Dec 2021 02:04:29 +0000 (10:04 +0800)]
Use XRandR 1.5 to generate monitor attributes if available

* src/xfns.c (x_get_monitor_attributes_xrandr): Use XRR 1.5 if
present.
(xlw_monitor_dimensions_at_pos_1): Remove redundant XRR 1.5
code.
(xlw_monitor_dimensions_at_pos): Rely on
`x_get_monitor_attributes_xrandr' to retrieve the workarea
instead.

2 years agoTranslate crossing event mode when sending them to xwidgets
Po Lu [Thu, 30 Dec 2021 01:24:30 +0000 (09:24 +0800)]
Translate crossing event mode when sending them to xwidgets

* src/xwidget.c (xi_translate_notify_detail): Use XI constants
instead.
(xwidget_motion_or_crossing): Translate XI entry event mode.

2 years ago* lisp/textmodes/paragraphs.el (repunctuate-sentences-filter): New function.
Juri Linkov [Wed, 29 Dec 2021 19:10:04 +0000 (21:10 +0200)]
* lisp/textmodes/paragraphs.el (repunctuate-sentences-filter): New function.

(repunctuate-sentences): Use it on isearch-filter-predicate
to skip unnecessary matches.  (bug#52769)

2 years agoCC Mode: c-update-brace-stack: After struct foo *, do not expect a brace.
Alan Mackenzie [Wed, 29 Dec 2021 19:05:11 +0000 (19:05 +0000)]
CC Mode: c-update-brace-stack: After struct foo *, do not expect a brace.

This fixes bug #52796.

* lisp/progmodes/cc-engine.el (c-update-brace-stack): Handle a "*" like a
semicolon, cancelling the expectation of a brace.

* lisp/progmodes/cc-langs.el (c-brace-stack-thing-key): Add a "*" into the
sets of significant characters.

2 years ago* lisp/textmodes/sgml-mode.el (sgml-mode): Set skeleton-end-newline to nil.
Juri Linkov [Wed, 29 Dec 2021 18:52:11 +0000 (20:52 +0200)]
* lisp/textmodes/sgml-mode.el (sgml-mode): Set skeleton-end-newline to nil.

Prevent skeleton.el from adding a newline to each inserted
skeleton.  Those which do want a newline do that explicitly in
their define-skeleton form.  This is what texinfo-mode does (bug#52864).

2 years ago; * lisp/replace.el (replace-regexp-function): Doc fix. (Bug#52558)
Eli Zaretskii [Wed, 29 Dec 2021 18:25:02 +0000 (20:25 +0200)]
; * lisp/replace.el (replace-regexp-function): Doc fix.  (Bug#52558)

2 years agoFix documentation of 'define-keymap'
Eli Zaretskii [Wed, 29 Dec 2021 17:45:06 +0000 (19:45 +0200)]
Fix documentation of 'define-keymap'

* doc/lispref/keymaps.texi (Creating Keymaps)
(Changing Key Bindings): Fix typos, improve wording.

2 years agoFix recent changes in 'keymap-lookup' documentation
Eli Zaretskii [Wed, 29 Dec 2021 17:30:23 +0000 (19:30 +0200)]
Fix recent changes in 'keymap-lookup' documentation

* doc/lispref/keymaps.texi (Functions for Key Lookup): Improve
wording, correct typos.

2 years agoRevert "Revert "Fix fontification in diff--font-lock-prettify""
Tassilo Horn [Wed, 29 Dec 2021 17:00:52 +0000 (18:00 +0100)]
Revert "Revert "Fix fontification in diff--font-lock-prettify""

This reverts commit 3cadd72673d8095df7eeb8e847db87ae42b5e2f6.

2 years agoRevert "Fix fontification in diff--font-lock-prettify"
Tassilo Horn [Wed, 29 Dec 2021 17:00:30 +0000 (18:00 +0100)]
Revert "Fix fontification in diff--font-lock-prettify"

This reverts commit 1da392d62d1ae743151f7fda83d0725ec6053686.

3 years agoFix fontification in diff--font-lock-prettify
Matthias Meulien [Wed, 29 Dec 2021 16:25:35 +0000 (17:25 +0100)]
Fix fontification in diff--font-lock-prettify

* lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix
diff--font-lock-prettify on created or deleted files
(bug#52810).

3 years agoDocument keymap-set-after in Modifying Menus in lispref
Lars Ingebrigtsen [Wed, 29 Dec 2021 16:20:08 +0000 (17:20 +0100)]
Document keymap-set-after in Modifying Menus in lispref

* doc/lispref/keymaps.texi (Modifying Menus): Document
keymap-set-after (bug#52819).

3 years agoDocument `keymap-lookup' in the lipsref manual
Lars Ingebrigtsen [Wed, 29 Dec 2021 16:11:31 +0000 (17:11 +0100)]
Document `keymap-lookup' in the lipsref manual

* doc/lispref/keymaps.texi (Functions for Key Lookup): Document
`keymap-lookup' instead of `lookup-key' (bug#52820).

3 years agoMove define-keymap manual entry to Creating Keymaps
Lars Ingebrigtsen [Wed, 29 Dec 2021 15:56:16 +0000 (16:56 +0100)]
Move define-keymap manual entry to Creating Keymaps

* doc/lispref/keymaps.texi (Creating Keymaps)
(Changing Key Bindings): Move `define-keymap'/`defvar-keymap' to
the Creating Keymaps node.

3 years agoAllow the user to specify shr-width in mm-shr
Lars Ingebrigtsen [Wed, 29 Dec 2021 15:48:34 +0000 (16:48 +0100)]
Allow the user to specify shr-width in mm-shr

* lisp/gnus/mm-decode.el (mm-shr): Allow the user to specify the
width by setting `shr-width' (bug#52825).

3 years agoMake multi-test-files-busy shorter
Lars Ingebrigtsen [Wed, 29 Dec 2021 15:09:22 +0000 (16:09 +0100)]
Make multi-test-files-busy shorter

3 years agoIgnore manual/ directory made by admin/make-manuals
Lars Ingebrigtsen [Wed, 29 Dec 2021 15:06:50 +0000 (16:06 +0100)]
Ignore manual/ directory made by admin/make-manuals

3 years agoAdjust multi-test-files-simple test for Windows
Lars Ingebrigtsen [Wed, 29 Dec 2021 15:06:32 +0000 (16:06 +0100)]
Adjust multi-test-files-simple test for Windows

* test/lisp/emacs-lisp/multisession-tests.el
(multi-test-files-simple): Adjust test to Emacs timestamp
resolution on Windows.

3 years agoImprove documentation of 'M-X' and related features
Eli Zaretskii [Wed, 29 Dec 2021 14:39:20 +0000 (16:39 +0200)]
Improve documentation of 'M-X' and related features

* doc/emacs/m-x.texi (M-x): Index 'M-X'.
* doc/lispref/commands.texi (Interactive Call, Command Modes):
Mention 'M-X' and 'execute-extended-command-for-buffer'.

* etc/NEWS: Clarify that the '(declare (completion ...' and
'(declare (modes ...' forms have no effect by default.  Likewise
for '(interactive "..." MODE)' specs.  (Bug#52839)

3 years agoFix a hang on servers that don't support the X Keyboard Extension
Po Lu [Wed, 29 Dec 2021 10:59:47 +0000 (18:59 +0800)]
Fix a hang on servers that don't support the X Keyboard Extension

* src/xfns.c (Fx_backspace_delete_keys_p): Don't block input
before checking for Xkb.

3 years agoTranslate state of XI2 entry events when sending them to xwidgets
Po Lu [Wed, 29 Dec 2021 10:37:04 +0000 (18:37 +0800)]
Translate state of XI2 entry events when sending them to xwidgets

* src/xwidget.c (xi_translate_notify_detail): New function.
(xwidget_motion_or_crossing): Translate detail and state of
GenericEvents before sending them to the widget.

3 years agoGet rid of obsolete xwidget-related code on PGTK
Po Lu [Wed, 29 Dec 2021 10:06:34 +0000 (18:06 +0800)]
Get rid of obsolete xwidget-related code on PGTK

* src/emacsgtkfixed.c (emacs_fixed_class_init): Stop setting
obsolete methods.

(EMACS_FIXED_GET_CLASS, struct GtkFixedPrivateL):
(emacs_fixed_gtk_widget_size_allocate): Delete obsolete things.

* src/xwidget.c (x_draw_xwidget_glyph_string): Work around
mysterious bug.

3 years agoTest for Xkb support when opening a display
Po Lu [Wed, 29 Dec 2021 09:49:42 +0000 (17:49 +0800)]
Test for Xkb support when opening a display

* src/xfns.c (Fx_backspace_delete_keys_p): Use
dpyinfo->supports_xkb instead of testing for its presence
manually.

* src/xterm.c (x_term_init): Test for Xkb presence
and set supports_xkb appropriately.

* src/xterm.h (struct x_display_info): New field `supports_xkb'.

3 years agoQueue xwidget views for allocation in more places
Po Lu [Wed, 29 Dec 2021 06:59:41 +0000 (14:59 +0800)]
Queue xwidget views for allocation in more places

* src/xwidget.c (Fmake_xwidget) [HAVE_PGTK]:
(Fxwidget_resize) [HAVE_PGTK]: Queue xwidgets and views for
allocation.

3 years agoImprove xwidget event handling on XI2
Po Lu [Wed, 29 Dec 2021 06:37:49 +0000 (14:37 +0800)]
Improve xwidget event handling on XI2

* src/xterm.c (handle_one_xevent): Pass XI2 entry and leave
events to xwidgets and fix scroll valuator reset logic for
xwidgets.

* src/xwidget.c (xwidget_button_1): Stop ungrabbing all devices
XI2 builds.
(xwidget_motion_or_crossing): Learn to pass through XI2 crossing
events.
(x_draw_xwidget_glyph_string): Add crossing events to the XI2
event mask.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 29 Dec 2021 05:51:46 +0000 (06:51 +0100)]
Merge from origin/emacs-28

06dcd2be5d Improve rectangle-mark-mode documentation regarding mark a...

3 years agoTranslate buttons when sending XI2 motion events to xwidgets
Po Lu [Wed, 29 Dec 2021 05:30:46 +0000 (13:30 +0800)]
Translate buttons when sending XI2 motion events to xwidgets

* src/xterm.c (handle_one_xevent): Translate all three buttons
when passing XI2 motion events to xwidgets.

3 years agoUse XI2 to handle xwidget button events
Po Lu [Wed, 29 Dec 2021 05:13:15 +0000 (13:13 +0800)]
Use XI2 to handle xwidget button events

* src/xterm.c (handle_one_xevent): Handle xwidget views when
handling XI_ButtonPress or XI_ButtonRelease events.
* src/xwidget.c (x_draw_xwidget_glyph_string): Add appropriate
values to the XI2 event mask.

3 years agoFix embedder calculation for xwidgets on PGTK
Po Lu [Wed, 29 Dec 2021 04:59:46 +0000 (12:59 +0800)]
Fix embedder calculation for xwidgets on PGTK

* src/xwidget.c (Fmake_xwidget):
(x_draw_xwidget_glyph_string): Defer focus event synthesis on
PGTK as well.
(record_osr_embedder): Use view window on PGTK.
(to_embedder):
(from_embedder): Rectify accordingly.

3 years agoFix NS xwidget build
Po Lu [Wed, 29 Dec 2021 02:06:37 +0000 (10:06 +0800)]
Fix NS xwidget build

* src/xwidget.c (kill_frame_xwidget_views):
* src/xwidget.h (kill_frame_xwidget_views): Disable on NS.

3 years ago* src/xwidget.c (syms_of_xwidget): Fix typo.
Po Lu [Wed, 29 Dec 2021 02:01:49 +0000 (10:01 +0800)]
* src/xwidget.c (syms_of_xwidget): Fix typo.

3 years agoAdd support for xwidgets to the PGTK port
Po Lu [Wed, 29 Dec 2021 01:53:42 +0000 (09:53 +0800)]
Add support for xwidgets to the PGTK port

* src/emacsgtkfixed.c (EMACS_FIXED_GET_CLASS): New function.
(struct GtkFixedPrivateL): New struct.
(emacs_fixed_gtk_widget_size_allocate):
(emacs_fixed_class_init): New functions.

* src/keyboard.h: Declare lispy_function_keys also when
HAVE_PGTK.

* src/pgtkterm.c (x_free_frame_resources): Destroy all xwidget
views.
(pgtk_scroll_run): Move xwidget views that overlap with the
scrolled area.
(pgtk_emacs_to_gtk_modifiers): Expose function.

* src/pgtkterm.h: Wrap in include guard.
(pgtk_emacs_to_gtk_modifiers): New prototype.

* src/xwidget.c (xw_forward_event_translate):
(xw_forward_event_from_view): New functions.
(Fmake_xwidget): Remove obsolete PGTK specific code.
(Fxwidget_perform_lispy_event): Convert modifiers correctly on
PGTK.
(define_cursors): Use GDK functions to define cursors on PGTK.
(xwidget_view_from_window): Disable on non-PGTK builds.
(xwidget_show_view):
(xwidget_hide_view): Implement on PGTK.
(xv_do_draw): Disable on non-PGTK builds.
(offscreen_damage_event): Queue xwidget views for draw.
(xwidget_expose): Disable on non-PGTK builds.
(xwidget_init_view):
(x_draw_xwidget_glyph_string):
(Fdelete_xwidget_view): Implement for PGTK.
(syms_of_xwidget): Don't initialize XID to widget table on PGTK.
(lower_frame_xwidget_views): Disable on PGTK.
* src/xwidget.h (struct xwidget_view): New fields for PGTK
builds.
(kill_frame_xwidget_views): Enable on PGTK.

3 years ago; * doc/misc/gnus.texi (Server Commands): Fix typo.
Stefan Kangas [Wed, 29 Dec 2021 00:21:34 +0000 (01:21 +0100)]
; * doc/misc/gnus.texi (Server Commands): Fix typo.

3 years agoFix bug#52467 by adding a new custom variable 'display-comint-buffer-action'
Sam Steingold [Tue, 28 Dec 2021 22:27:41 +0000 (17:27 -0500)]
Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action'

* lisp/window.el (display-comint-buffer-action): New `defcustom`,
defaults to 'display-buffer-same-window' for backward compatibility.
* lisp/cmuscheme.el (run-scheme, switch-to-scheme): Pass
'display-comint-buffer-action' to 'pop-to-buffer' instead
of using 'pop-to-buffer-same-window'.
* lisp/eshell/eshell.el (eshell): Likewise.
* lisp/shell.el (shell): Likewise.
* lisp/org/ol-eshell.el (org-eshell-open): Likewise.
* lisp/progmodes/inf-lisp.el (inferior-lisp): Likewise.
* lisp/progmodes/project.el (project-shell, project-eshell): Likewise.
* lisp/textmodes/tex-mode.el (tex-display-shell, tex-compile-default)
(tex-recenter-output-buffer): Pass 'display-comint-buffer-action'
to 'pop-to-buffer'.

3 years agoFix test lisp/cedet/semantic/bovine/gcc-tests on macOS (Bug#52431)
Philipp Stephani [Tue, 28 Dec 2021 20:05:23 +0000 (21:05 +0100)]
Fix test lisp/cedet/semantic/bovine/gcc-tests on macOS (Bug#52431)

* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): Also detect Apple
clang on macOS Monterey.

3 years ago* lisp/textmodes/paragraphs.el (repunctuate-sentences): Region for NO-QUERY.
Juri Linkov [Tue, 28 Dec 2021 19:51:54 +0000 (21:51 +0200)]
* lisp/textmodes/paragraphs.el (repunctuate-sentences): Region for NO-QUERY.

Use region boundaries also for the case when NO-QUERY arg is non-nil
(bug#52769).

3 years ago* lisp/textmodes/paragraphs.el (repunctuate-sentences): Support region.
Juri Linkov [Tue, 28 Dec 2021 19:19:25 +0000 (21:19 +0200)]
* lisp/textmodes/paragraphs.el (repunctuate-sentences): Support region.

Add optional args 'start' and 'end', and pass them as region boundaries
to query-replace-regexp (bug#52769).

3 years ago* lisp/replace.el (replace-regexp-function): New function (bug#52558).
Juri Linkov [Tue, 28 Dec 2021 19:14:55 +0000 (21:14 +0200)]
* lisp/replace.el (replace-regexp-function): New function (bug#52558).

(replace-search, replace-highlight): Use it.

3 years ago; * lisp/term.el (term-goto-process-mark-maybe): Fix typo in doc string.
Eli Zaretskii [Tue, 28 Dec 2021 18:09:42 +0000 (20:09 +0200)]
; * lisp/term.el (term-goto-process-mark-maybe): Fix typo in doc string.

3 years ago; * lisp/keymap.el (key-valid-p): Fix wording of doc string.
Eli Zaretskii [Tue, 28 Dec 2021 18:07:54 +0000 (20:07 +0200)]
; * lisp/keymap.el (key-valid-p): Fix wording of doc string.

3 years ago; * doc/emacs/search.texi (Lax Search): Fix wording.
Eli Zaretskii [Tue, 28 Dec 2021 18:02:07 +0000 (20:02 +0200)]
; * doc/emacs/search.texi (Lax Search): Fix wording.

3 years ago; * etc/NEWS: Fix punctuation.
Eli Zaretskii [Tue, 28 Dec 2021 17:53:42 +0000 (19:53 +0200)]
; * etc/NEWS: Fix punctuation.

3 years agoImprove rectangle-mark-mode documentation regarding mark activation
Sean Whitton [Mon, 27 Dec 2021 19:58:25 +0000 (12:58 -0700)]
Improve rectangle-mark-mode documentation regarding mark activation

* doc/emacs/killing.texi: Describe how rectangle-mark-mode works when
Transient Mark mode is off.  Qualify discussion of
rectangle-exchange-point-and-mark to say that it cycles the four
corners only when the region is active.
* lisp/rect.el (rectangle-mark-mode): State that rectangle-mark-mode
does not activate the mark when Transient Mark mode is off.  Reword
sentence about how long the mode lasts to account for when Transient
Mark mode is off.  (Bug#42663)

3 years ago* Fix native comp for non trivial function names (bug#52833)
Andrea Corallo [Tue, 28 Dec 2021 11:12:16 +0000 (12:12 +0100)]
* Fix native comp for non trivial function names (bug#52833)

* lisp/emacs-lisp/comp.el (comp-c-func-name): Fix native compilation
for functions with function names containing non trivial
characters (bug#52833).

3 years ago* etc/NEWS (eieio-compat): Rewrite
Stefan Monnier [Tue, 28 Dec 2021 14:44:05 +0000 (09:44 -0500)]
* etc/NEWS (eieio-compat): Rewrite

3 years ago* lwlib/xlwmenu.c (fit_to_screen): Adjust correctly for child menus.
Po Lu [Tue, 28 Dec 2021 09:53:20 +0000 (17:53 +0800)]
* lwlib/xlwmenu.c (fit_to_screen): Adjust correctly for child menus.

3 years ago* lisp/vc/vc.el (vc-revert): Use generate-new-buffer, not just new buffer name
Juri Linkov [Tue, 28 Dec 2021 08:45:27 +0000 (10:45 +0200)]
* lisp/vc/vc.el (vc-revert): Use generate-new-buffer, not just new buffer name

3 years agoDocument a problem with IBus and the C-. key
Po Lu [Tue, 28 Dec 2021 07:30:31 +0000 (15:30 +0800)]
Document a problem with IBus and the C-. key

* etc/PROBLEMS: Document an IBus emoji panel problem.