]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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 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 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.

3 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.

3 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.

3 years agoAdd support for pinch events to NS
Po Lu [Tue, 28 Dec 2021 06:05:32 +0000 (14:05 +0800)]
Add support for pinch events to NS

* lisp/face-remap.el (text-scale-pinch): Remove mistaken
assumption that angle is always 1.0 at the beginning of
a sequence.

* src/nsterm.c (- magnifyWithEvent): New function.

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

c0815aca18 Fix typos in in 'reset-language-environment'
ea65de7577 eshell-complete-parse-arguments: don't use string-match on...

3 years agoFix menu placement on multiple-display setups when using lwlib
Po Lu [Tue, 28 Dec 2021 02:46:58 +0000 (10:46 +0800)]
Fix menu placement on multiple-display setups when using lwlib

* lwlib/xlwmenu.c (fit_to_screen):
(pop_up_menu): Adjust menu position based on dimensions of the
current monitor's workarea.  (bug#52809)

* src/xfns.c (x_get_monitor_attributes): Stop testing for the
RandR extension here.
(xlw_monitor_dimensions_at_pos_1):
(xlw_monitor_dimensions_at_pos): New functions.

* src/xterm.c (x_term_init): Query for the RandR extension when
connecting to a display.
* src/xterm.h (xlw_monitor_dimensions_at_pos): New prototype.

3 years agoReplace uniquify.el's advice with direct calls
Stefan Monnier [Tue, 28 Dec 2021 00:47:23 +0000 (19:47 -0500)]
Replace uniquify.el's advice with direct calls

This fixes bug#1338.

* src/buffer.c (Frename_buffer): Call `uniquify--rename-buffer-advice`.
* lisp/files.el (create-file-buffer):
Call`uniquify--create-file-buffer-advice`.

* lisp/uniquify.el (uniquify--rename-buffer-advice)
(uniquify--create-file-buffer-advice): Don't add them as advice any more.
Adjust their calling convention accordingly.

3 years agoOnly rely on passive device grabs on XI2
Po Lu [Tue, 28 Dec 2021 01:28:04 +0000 (09:28 +0800)]
Only rely on passive device grabs on XI2

* src/xterm.c (xi_grab_or_ungrab_device): Remove function.
(handle_one_xevent): Stop setting non-passive grabs.

3 years agoFix read-multiple-choice tests
Stefan Kangas [Mon, 27 Dec 2021 23:09:08 +0000 (00:09 +0100)]
Fix read-multiple-choice tests

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Fix typo.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description)
(test-rmc--add-key-description/with-attributes)
(test-rmc--add-key-description/non-graphical-display): Fix tests.

3 years agoFix EIEIO tests to account for eieio-compat move
Stefan Monnier [Mon, 27 Dec 2021 22:24:52 +0000 (17:24 -0500)]
Fix EIEIO tests to account for eieio-compat move

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el:
Require `eieio-compat` explicitly.

* test/manual/cedet/tests/test.el (a-method, a-generic):
* doc/misc/srecode.texi (Compound Dictionary Values):
* doc/misc/ede.texi (ede-generic-project): Update sample code to use
cl-generic syntax.

3 years agoadmin.el: Move etc/NEWS to etc/NEWS.NN in one commit
Stefan Kangas [Mon, 27 Dec 2021 01:44:27 +0000 (02:44 +0100)]
admin.el: Move etc/NEWS to etc/NEWS.NN in one commit

This should preserve git history better for git blame, etc.
* admin/admin.el (admin-git-command): New variable.
(set-version): Move etc/NEWS to etc/NEWS.NN and prompt to commit
it immediately.  (Bug#52420)

3 years agodisabled-command: Explain what SPC means again
Stefan Kangas [Mon, 27 Dec 2021 19:30:41 +0000 (20:30 +0100)]
disabled-command: Explain what SPC means again

* lisp/novice.el (disabled-command-function): Explain what SPC means
again, an explanation that was lost in a recent change.

3 years agoread-multiple-choice: Improve key formatting
Stefan Kangas [Mon, 27 Dec 2021 19:25:50 +0000 (20:25 +0100)]
read-multiple-choice: Improve key formatting

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve
formatting of key missing in the description.  Use face help-key-name
on terminals that can't display underline.

3 years ago* etc/NEWS: Mention completion-wrap-movement.
Juri Linkov [Mon, 27 Dec 2021 19:14:00 +0000 (21:14 +0200)]
* etc/NEWS: Mention completion-wrap-movement.

3 years ago* doc/emacs/search.texi (Lax Search): Add char-fold-include.
Juri Linkov [Mon, 27 Dec 2021 19:05:19 +0000 (21:05 +0200)]
* doc/emacs/search.texi (Lax Search): Add char-fold-include.

3 years ago* lisp/tab-bar.el (tab-bar-history-mode-map): New defvar-keymap.
Juri Linkov [Mon, 27 Dec 2021 18:54:18 +0000 (20:54 +0200)]
* lisp/tab-bar.el (tab-bar-history-mode-map): New defvar-keymap.

3 years agoThe temprary "session" collection might not exist in Secret Service
Michael Albinus [Mon, 27 Dec 2021 18:53:00 +0000 (19:53 +0100)]
The temprary "session" collection might not exist in Secret Service

* doc/misc/auth.texi (Secret Service API):
* test/lisp/net/secrets-tests.el (secrets--test-delete-all-session-items)
(secrets-test02-collections, secrets-test03-items)
(secrets-test04-search): The temporary "session" collection might
not exist.

* lisp/net/secrets.el (secrets-struct-secret-content-type):
Remove compatibility hack.
(secrets-create-item): Adapt accordingly.

3 years agoUse `permission-denied' in Tramp tests, and more
Michael Albinus [Mon, 27 Dec 2021 18:51:58 +0000 (19:51 +0100)]
Use `permission-denied' in Tramp tests, and more

* lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection):
Simplify code.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-system-info):
Adapt for "mtp" method.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes):
Use `permission-denied' error.  Simplify code.
(tramp-test24-file-acl, tramp-test26-file-name-completion):
Simplify code.

3 years agoFix typos in in 'reset-language-environment'
Eli Zaretskii [Mon, 27 Dec 2021 17:00:33 +0000 (19:00 +0200)]
Fix typos in in 'reset-language-environment'

* lisp/international/mule-cmds.el (reset-language-environment):
Fix a typo in 'windows-nt'.  (Bug#52816)

3 years agoDoc fix; fix terminology in key binding functions
Stefan Kangas [Mon, 27 Dec 2021 15:24:18 +0000 (16:24 +0100)]
Doc fix; fix terminology in key binding functions

* lisp/keymap.el (keymap-set, key-valid-p):
* lisp/subr.el (define-keymap): Doc fix; improve terminology.

3 years agoeshell-complete-parse-arguments: don't use string-match on a list
Óscar Fuentes [Mon, 27 Dec 2021 15:01:09 +0000 (16:01 +0100)]
eshell-complete-parse-arguments: don't use string-match on a list

When there is more than one candidate for completion, `val' is a list.

Fixes bug#52794.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): protect
use of string-match with stringp.

3 years agoFix precision scrolling inside terminal buffers
Po Lu [Mon, 27 Dec 2021 09:55:23 +0000 (17:55 +0800)]
Fix precision scrolling inside terminal buffers

* lisp/term.el (term-goto-process-mark-maybe): Don't move point
to process mark if the event is a vertical wheel event.

3 years ago* lisp/emacs-list/eieio-compat.el: Really move to obsolete
Stefan Monnier [Mon, 27 Dec 2021 06:57:25 +0000 (01:57 -0500)]
* lisp/emacs-list/eieio-compat.el: Really move to obsolete

3 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 27 Dec 2021 05:32:28 +0000 (06:32 +0100)]
Merge from origin/emacs-28

d4e2850b32 Update to Org 9.5.2-3-geb9f34

3 years ago* src/pgtkterm.c (pgtk_handle_event): Add pinch event support.
Po Lu [Mon, 27 Dec 2021 04:43:11 +0000 (12:43 +0800)]
* src/pgtkterm.c (pgtk_handle_event): Add pinch event support.

3 years agoperl-mode: Recognize "when"/"given" keywords
Stefan Kangas [Mon, 27 Dec 2021 02:07:50 +0000 (03:07 +0100)]
perl-mode: Recognize "when"/"given" keywords

* lisp/progmodes/perl-mode.el (perl-font-lock-keywords-2): Add
keywords "when", "given" and "default".  (Bug#10560)
(perl--syntax-exp-intro-keywords): Add "printf".

* test/manual/indent/perl.perl: Add test for "when"/"given".

3 years agoFix menu window persistence and entry/leave events on Lucid on XI2
Po Lu [Mon, 27 Dec 2021 02:02:39 +0000 (10:02 +0800)]
Fix menu window persistence and entry/leave events on Lucid on XI2

* src/xmenu.c (x_activate_menubar): Always clear the XI2 grab on
Xt.
* src/xterm.c (handle_one_xevent): On XI2, ignore LeaveNotify
events coming from the shell widget and use `x_window_to_frame'
to find the frame when handling XI_Leave events.

3 years agoFix Lucid popup menu being stuck on XI2 builds
Po Lu [Mon, 27 Dec 2021 01:16:18 +0000 (09:16 +0800)]
Fix Lucid popup menu being stuck on XI2 builds

* src/xmenu.c (x_activate_menubar): Make some changes
conditional on XI2.
(create_and_show_popup_menu): Clear XI2 grab before showing
popup.
* src/xterm.c (xi_grab_or_ungrab_device): Don't grab device
if popup is activated on Lucid.

3 years agoStore sign separately when accumulating precision scroll momentum
Po Lu [Mon, 27 Dec 2021 01:02:20 +0000 (09:02 +0800)]
Store sign separately when accumulating precision scroll momentum

* lisp/pixel-scroll.el (pixel-scroll-kinetic-state): Return
vector in new format.
(pixel-scroll-accumulate-velocity): Use new sign field.

3 years agoUpdate to Org 9.5.2-3-geb9f34
Kyle Meyer [Sun, 26 Dec 2021 21:37:26 +0000 (16:37 -0500)]
Update to Org 9.5.2-3-geb9f34

3 years agoUse defvar-keymap in tests
Stefan Kangas [Sun, 26 Dec 2021 20:52:56 +0000 (21:52 +0100)]
Use defvar-keymap in tests

* test/lisp/button-tests.el (button-tests--map):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-keymap):
* test/lisp/help-tests.el (help-tests-remap-map)
(help-tests-major-mode-map, help-tests-minor-mode-map):
* test/lisp/kmacro-tests.el (kmacro-tests-keymap):
* test/lisp/repeat-tests.el (repeat-tests-map)
(repeat-tests-repeat-map):
* test/src/keymap-tests.el (keymap-tests-minor-mode-map)
(keymap-tests-major-mode-map): Use defvar-keymap.

3 years agoPrefer the defcustom :risky property in gnus
Stefan Kangas [Sun, 26 Dec 2021 16:51:15 +0000 (17:51 +0100)]
Prefer the defcustom :risky property in gnus

* lisp/gnus/gnus-art.el (gnus-button-alist)
(gnus-header-button-alist):
* lisp/gnus/gnus-group.el (gnus-group-highlight)
(gnus-group-icon-list):
* lisp/gnus/gnus-sum.el (gnus-summary-highlight):
* lisp/gnus/mm-util.el (mm-charset-eval-alist): Prefer the
defcustom :risky property to setting 'risky-local-variable
manually.

3 years ago; * lisp/subr.el (define-keymap): Fix typos.
Stefan Kangas [Sun, 26 Dec 2021 16:25:31 +0000 (17:25 +0100)]
; * lisp/subr.el (define-keymap): Fix typos.

3 years agoRewrite disabled-command to use read-multiple-choice
Stefan Kangas [Sun, 26 Dec 2021 15:52:54 +0000 (16:52 +0100)]
Rewrite disabled-command to use read-multiple-choice

* lisp/novice.el (disabled-command-function): Rewrite to use
read-multiple-choice.  Use command substitutions.

3 years agoread-multiple-choice: Display "SPC" instead of " "
Stefan Kangas [Sun, 26 Dec 2021 05:47:15 +0000 (06:47 +0100)]
read-multiple-choice: Display "SPC" instead of " "

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve display
of the keys TAB, RET, SPC, DEL, and ESC.  This fixes a bug where " "
was highlighted in the description in a confusing way.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description)
(test-rmc--add-key-description/with-attributes): Update tests for the
above change.

3 years agoread-multiple-choice: Add optional argument show-help
Stefan Kangas [Sun, 26 Dec 2021 00:27:39 +0000 (01:27 +0100)]
read-multiple-choice: Add optional argument show-help

* lisp/emacs-lisp/rmc.el (rmc--show-help): Factor out new function
from read-multiple-choice.
(read-multiple-choice): Add new optional argument show-help.
* doc/lispref/commands.texi (Reading One Event): Document above new
optional argument.

3 years agoread-multiple-choice: Add face when key not in name string
Stefan Kangas [Sat, 25 Dec 2021 23:45:50 +0000 (00:45 +0100)]
read-multiple-choice: Add face when key not in name string

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Add face
property also when key is not in the name string.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description/with-attributes)
(test-rmc--add-key-description/non-graphical-display): Update tests.