]> git.eshelyaron.com Git - emacs.git/log
emacs.git
11 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:48 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

7b0e07c41ae Make Tramp aware of completion-regexp-list (don't merge)

11 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
Merge from origin/emacs-29

232a57a3e32 ; * doc/lispref/debugging.texi (Debugging): Add cross-ref...
c65ddf26a33 ; doc/lispref/debugging.texi: Add reference to Profiler d...
6f884d3aed9 Add 5 docstrings to abbrev.el (bug#67153)
b4d990bd637 ; Clarify wording about arguments in doc strings
c20ae7a30fb ; Improve cross-references in description of 'pcase'
42181b65df1 ; * src/editfns.c (Fline_beginning_position): Doc fix.
5f3309f6b0f ; Improve indexing in ELisp manual
4e406bb4208 Fix CBZ file detection in doc-view-mode

11 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

c1251ae1f93 * lisp/progmodes/eglot.el (eglot-server-programs): Fix pr...

11 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
Merge from origin/emacs-29

5a1808da5f3 ; * doc/misc/eglot.texi (Eglot Commands): Fix typos (bug#...

11 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

260ba357bbe Eglot: Send standard :language-id for typescript-language...

11 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
Merge from origin/emacs-29

32a32853ce9 Typofix in the doc/lispref/modes.texi
f98637b51b5 ; Fix 'add-face-text-property' shortdoc
3fff22eb20c Fix spell-checking email message with citations

11 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:47 +0000 (06:07 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

5bebd292c63 Pass only the local parts of Eshell's $PATH to 'tramp-rem...

11 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 18 Nov 2023 11:07:46 +0000 (06:07 -0500)]
Merge from origin/emacs-29

5612fd21a05 Add two doc strings to cl-extra.el

11 months ago; * etc/NEWS: Fix last change (bug#67225).
Eli Zaretskii [Sat, 18 Nov 2023 10:11:56 +0000 (12:11 +0200)]
; * etc/NEWS: Fix last change (bug#67225).

11 months agoAdd key translations 'C-x 8 a e' and 'C-x 8 A E'.
Rudi Schlatte [Thu, 16 Nov 2023 09:44:44 +0000 (10:44 +0100)]
Add key translations 'C-x 8 a e' and 'C-x 8 A E'.

* lisp/international/iso-transl.el (iso-transl-char-map): Add
new entries for ae and AE.  (Bug#67225)

11 months ago; Add commentary for exposing a mode hook to Custom
Eli Zaretskii [Sat, 18 Nov 2023 10:02:25 +0000 (12:02 +0200)]
; Add commentary for exposing a mode hook to Custom

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-hook): Add
commentary about the reasons for exposing the hook to Custom, per
the discussion in bug#67207.

11 months agoAdd elixir-ts-mode-hook to elixir-ts-mode
Wilhelm H Kirschbaum [Wed, 15 Nov 2023 18:13:02 +0000 (20:13 +0200)]
Add elixir-ts-mode-hook to elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-hook):
Make hook available to customize.  (Bug#67207)

11 months agoDocument Battery Optimization challenges on Android
Po Lu [Sat, 18 Nov 2023 09:41:51 +0000 (17:41 +0800)]
Document Battery Optimization challenges on Android

* etc/PROBLEMS (Runtime problems specific to Android): Mention
battery optimization, the way it impacts background execution,
and how it might be disabled.

11 months ago; * etc/NEWS: Add entry about new input methods. (Bug#66470)
Eli Zaretskii [Sat, 18 Nov 2023 09:35:15 +0000 (11:35 +0200)]
; * etc/NEWS: Add entry about new input methods.  (Bug#66470)

11 months agoAdd input methods for Urdu, Pashto and Sindhi (bug#66470)
Rahguzar [Sun, 29 Oct 2023 16:14:02 +0000 (17:14 +0100)]
Add input methods for Urdu, Pashto and Sindhi (bug#66470)

* lisp/leim/quail/pakistan.el ("urdu-keyboard")
("urdu-phonetic-keyboard", "urdu-custom", "sindhi-keyboard")
("pashto-keyboard"): New input methods.
(pakistan--define-quail-rules, pakistan--make-setter)
(pakistan--regenerate-translations, pakistan--set-prefixes)
(pakistan--define-numeral-translations)
(pakistan--set-numeral-translations):
Internal helper functions.
(pakistan-urdu-input): New customization group.
(pakistan-urdu-prefixes, pakistan-urdu-translations)
(pakistan-urdu-diacritics-and-other-symbols)
(pakistan-urdu-poetic-symbols, pakistan-urdu-religious-symbols)
(pakistan-extra-balochi-brahui-translations)
(pakistan-extra-pashto-translations)
(pakistan-extra-sindhi-translations)
(pakistan-extra-saraiki-hindko-translations)
(pakistan-urdu-use-roman-digits): New custom variables.
(pakistan): New package.

11 months agoDo interactive tagging for dired commands
Visuwesh [Sun, 29 Oct 2023 14:51:57 +0000 (20:21 +0530)]
Do interactive tagging for dired commands

* lisp/dired-aux.el (dired-diff, dired-backup-diff)
(dired-compare-directories, dired-do-chmod, dired-do-chgrp)
(dired-do-chown, dired-do-touch, dired-do-print, dired-clean-directory)
(dired-do-async-shell-command, dired-do-shell-command, dired-kill-line)
(dired-do-kill-lines, dired-do-compress-to, dired-do-compress)
(dired-do-byte-compile, dired-do-load, dired-do-redisplay)
(dired-reset-subdir-switches, dired-create-directory)
(dired-create-empty-file, dired-do-copy, dired-do-symlink)
(dired-do-relsymlink, dired-do-hardlink, dired-do-rename)
(dired-do-rename-regexp, dired-do-copy-regexp, dired-do-hardlink-regexp)
(dired-do-symlink-regexp, dired-do-relsymlink-regexp, dired-upcase)
(dired-downcase, dired-maybe-insert-subdir, dired-insert-subdir)
(dired-kill-tree, dired-prev-subdir, dired-mark-subdir-files)
(dired-kill-subdir, dired-tree-up, dired-tree-down, dired-hide-subdir)
(dired-hide-all, dired-isearch-filenames, dired-isearch-filenames-regexp)
(dired-do-isearch, dired-do-isearch-regexp, dired-do-search)
(dired-do-query-replace-regexp, dired-do-find-regexp)
(dired-do-find-regexp-and-replace, dired-show-file-type)
(dired-vc-next-action):
* lisp/dired-x.el (dired-mark-extension, dired-mark-suffix)
(dired-flag-extension, dired-clean-patch, dired-clean-tex)
(dired-very-clean-tex, dired-mark-omitted, dired-omit-expunge)
(dired-mark-unmarked-files, dired-do-find-marked-files, dired-vm)
(dired-rmail, dired-do-run-mail, dired-mark-sexp,
dired-x-bind-find-file):
* lisp/dired.el (dired-mouse-drag, dired-undo, dired-toggle-read-only)
(dired-next-line, dired-previous-line, dired-next-dirline)
(dired-prev-dirline, dired-up-directory, dired-get-file-for-visit)
(dired-find-file, dired-find-alternate-file, dired-mouse-find-file)
(dired-mouse-find-file-other-window, dired-mouse-find-file-other-frame)
(dired-view-file, dired-find-file-other-window, dired-display-file)
(dired-copy-filename-as-kill, dired-next-subdir)
(dired-build-subdir-alist, dired-goto-file, dired-do-flagged-delete)
(dired-do-delete, dired-next-marked-file, dired-prev-marked-file)
(dired-mark, dired-unmark, dired-flag-file-deletion)
(dired-unmark-backward, dired-toggle-marks, dired-mark-files-regexp)
(dired-number-of-marked-files, dired-mark-files-containing-regexp)
(dired-flag-files-regexp, dired-mark-symlinks, dired-mark-directories)
(dired-mark-executables, dired-flag-auto-save-files)
(dired-flag-garbage-files, dired-flag-backup-files, dired-change-marks)
(dired-unmark-all-marks, dired-unmark-all-files)
(dired-sort-toggle-or-edit, dired-mark-for-click)
(dired-enable-click-to-select-mode): Tag commands as applicable only
for dired-mode.

11 months agoAvoid loading cl-lib as result of invoking 'load-library'
Eli Zaretskii [Sat, 18 Nov 2023 08:13:37 +0000 (10:13 +0200)]
Avoid loading cl-lib as result of invoking 'load-library'

* lisp/emacs-lisp/find-func.el (find-function--any-subform-p):
Don't use 'cl-destructuring-bind'.
(find-library--from-load-history): Don't use 'cl-loop'.
* lisp/thingatpt.el (thing-at-point): Don't use 'cl-loop'.  This
avoids loading cl-lib whenever thingatpt.el is loaded, for
example, as result of "M-x load-library".

11 months ago; Improve documentation of recently added functions
Eli Zaretskii [Sat, 18 Nov 2023 07:01:30 +0000 (09:01 +0200)]
; Improve documentation of recently added functions

* src/androidfns.c (Fandroid_external_storage_available_p)
(Fandroid_request_storage_access):
* lisp/term/android-win.el (android-after-splash-screen): Improve
and clarify wording of doc strings.

11 months agoOffer to grant storage permissions if absent
Po Lu [Sat, 18 Nov 2023 06:15:55 +0000 (14:15 +0800)]
Offer to grant storage permissions if absent

* java/org/gnu/emacs/EmacsService.java (externalStorageAvailable)
(requestStorageAccess23, requestStorageAccess30)
(requestStorageAccess): New functions.

* lisp/startup.el (fancy-startup-tail, normal-splash-screen):
Call android-win functions for inserting the new storage
permission notice.

* lisp/term/android-win.el
(android-display-storage-permission-popup)
(android-after-splash-screen): New functions.

* src/android.c (android_init_emacs_service): Link to new Java
functions.
(android_external_storage_available_p)
(android_request_storage_access): New functions.

* src/android.h: Update prototypes.

* src/androidfns.c (Fandroid_external_storage_available_p)
(Fandroid_request_storage_access): New functions.
(syms_of_androidfns): Register new subrs.

11 months ago* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `null`
Stefan Monnier [Fri, 17 Nov 2023 23:12:03 +0000 (18:12 -0500)]
* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `null`

11 months agoReturn t from completion-emacs22-try-completion only for completions
Spencer Baugh [Thu, 16 Nov 2023 16:34:08 +0000 (11:34 -0500)]
Return t from completion-emacs22-try-completion only for completions

The emacs22 completion style ignores the text after point when
computing completions.  However, it still needs to take into account
the entire string it's given, to avoid returning incorrect values.

Previously, completion-emacs22-try-completion would return t if the
text before point was an exact completion.  But this is effectively
saying that the entire input string was an exact completion, which may
not be correct.  This would cause completing-read with REQUIRE-MATCH=t
to return a non-completion.

Now, completion-emacs22-try-completion only returns t if the entire
input string is an exact completion.

* lisp/minibuffer.el (completion-emacs22-try-completion): Return t
only if the entire input string is an exact completion.  (Bug#67210)

11 months agoMake Tramp aware of completion-regexp-list
Michael Albinus [Fri, 17 Nov 2023 17:28:30 +0000 (18:28 +0100)]
Make Tramp aware of completion-regexp-list

* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
New defmacro.
(tramp-completion-handle-file-name-all-completions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Use it.

11 months agoMake Tramp aware of completion-regexp-list (don't merge)
Michael Albinus [Fri, 17 Nov 2023 17:16:58 +0000 (18:16 +0100)]
Make Tramp aware of completion-regexp-list (don't merge)

* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
New defmacro.
(tramp-completion-handle-file-name-all-completions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Use it.

11 months ago; * doc/lispref/debugging.texi (Debugging): Add cross-references.
Eli Zaretskii [Fri, 17 Nov 2023 12:28:13 +0000 (14:28 +0200)]
; * doc/lispref/debugging.texi (Debugging): Add cross-references.

11 months ago; doc/lispref/debugging.texi: Add reference to Profiler docs (bug#67236).
Ihor Radchenko [Fri, 17 Nov 2023 09:47:46 +0000 (11:47 +0200)]
; doc/lispref/debugging.texi: Add reference to Profiler docs (bug#67236).

11 months agoAdd 5 docstrings to abbrev.el (bug#67153)
Jeremy Bryant [Wed, 15 Nov 2023 23:15:46 +0000 (23:15 +0000)]
Add 5 docstrings to abbrev.el (bug#67153)

* lisp/abbrev.el (prepare-abbrev-list-buffer, add-abbrev)
(inverse-add-abbrev, abbrev--describe)
(abbrev--possibly-save): Add doc strings.

11 months ago; Clarify wording about arguments in doc strings
Eli Zaretskii [Fri, 17 Nov 2023 07:04:20 +0000 (09:04 +0200)]
; Clarify wording about arguments in doc strings

* doc/lispref/tips.texi (Documentation Tips): Clarify "important
arguments".  (Bug#67217)

11 months agoCorrect initial scale calculation when pinching nonselected window
Po Lu [Fri, 17 Nov 2023 03:36:58 +0000 (11:36 +0800)]
Correct initial scale calculation when pinching nonselected window

* lisp/touch-screen.el (touch-screen-pinch): Retrieve present
scale within the window pinched.
(touch-screen-handle-point-update): Expunge inefficacious code
meant to disregard events sent during gesture navigation.

11 months agoCorrect generation of touchscreen-pinch events
Po Lu [Fri, 17 Nov 2023 03:16:23 +0000 (11:16 +0800)]
Correct generation of touchscreen-pinch events

* lisp/touch-screen.el (touch-screen-pinch): Check that posn-x-y
is available before scrolling to it.
(touch-screen-handle-aux-point-update): Don't provide posns for
windows besides the window where the touch sequence started in
touchscreen-pinch events.

12 months ago; Improve cross-references in description of 'pcase'
Eli Zaretskii [Thu, 16 Nov 2023 19:55:10 +0000 (21:55 +0200)]
; Improve cross-references in description of 'pcase'

* doc/lispref/control.texi (pcase Macro, Backquote Patterns):
Improve cross-references.

12 months ago; * etc/NEWS: Add new section.
Juri Linkov [Thu, 16 Nov 2023 17:37:21 +0000 (19:37 +0200)]
; * etc/NEWS: Add new section.

12 months ago* etc/NEWS: Mention incompatible change in `pp` (bug#67180)
Stefan Monnier [Thu, 16 Nov 2023 16:19:56 +0000 (11:19 -0500)]
* etc/NEWS: Mention incompatible change in `pp` (bug#67180)

12 months agoMerge branch 'derived-mode-add-parents'
Stefan Monnier [Thu, 16 Nov 2023 14:57:38 +0000 (09:57 -0500)]
Merge branch 'derived-mode-add-parents'

12 months ago(merge-ordered-lists): Dot a few more `i`s
Stefan Monnier [Thu, 16 Nov 2023 14:50:45 +0000 (09:50 -0500)]
(merge-ordered-lists): Dot a few more `i`s

Suggested by Mattias Engdegård.

* lisp/subr.el (merge-ordered-lists): Don't mutate the arg.

* test/lisp/subr-tests.el (subr-tests--merge-ordered-lists): Make the
test a bit more precise.

12 months agoDisable generation of mouse-1 events after ancillary tool presses
Po Lu [Thu, 16 Nov 2023 13:07:01 +0000 (21:07 +0800)]
Disable generation of mouse-1 events after ancillary tool presses

* lisp/touch-screen.el (touch-screen-handle-scroll): Correct
typo in comment.
(touch-screen-handle-point-update): Attempt to detect scroll
gestures and the like also when what is ancillary-tool.
(touch-screen-handle-point-up): Don't needlessly compute
relative xy when transforming aux tool into current tool.
(touch-screen-handle-touch): Set what field to ancillary-tool
rather than clear it when initializing the ancillary tool,
indicating to t-s-h-p-u that it must not generate mouse up
events.

12 months agoDon't pan horizontally when a pinch gesture represents a shrink
Po Lu [Thu, 16 Nov 2023 09:38:53 +0000 (17:38 +0800)]
Don't pan horizontally when a pinch gesture represents a shrink

* lisp/touch-screen.el (touch-screen-pinch): Don't pan left if
the event represents a shrink.

12 months ago; Commit omitted change
Po Lu [Thu, 16 Nov 2023 09:31:04 +0000 (17:31 +0800)]
; Commit omitted change

* lisp/completion-preview.el (completion-preview-commands):
Substitute analyze-text-conversion for text-conversion, as this
list enumerates commands, not events.

12 months agoClean-up some native-comp advice special handling.
Andrea Corallo [Thu, 16 Nov 2023 09:19:20 +0000 (10:19 +0100)]
Clean-up some native-comp advice special handling.

* lisp/emacs-lisp/nadvice.el (advice--add-function): Clean-up
nativecomp special handling.
* lisp/emacs-lisp/advice.el (ad-add-advice): Likewise.

12 months ago; * src/editfns.c (Fline_beginning_position): Doc fix.
Eli Zaretskii [Thu, 16 Nov 2023 09:30:48 +0000 (11:30 +0200)]
; * src/editfns.c (Fline_beginning_position): Doc fix.

12 months agoFix scrolling when continuation line starts with a display string
Eli Zaretskii [Thu, 16 Nov 2023 09:22:58 +0000 (11:22 +0200)]
Fix scrolling when continuation line starts with a display string

* src/xdisp.c (start_display): Compute continuation_lines_width
for starting display in strings and images as well.  (Bug#67201)

12 months ago* lisp/emacs-lisp/nadvice.el (advice--add-function): Move func decl.
Andrea Corallo [Thu, 16 Nov 2023 08:03:20 +0000 (09:03 +0100)]
* lisp/emacs-lisp/nadvice.el (advice--add-function): Move func decl.

12 months ago* lisp/mail/emacsbug.el (submit-emacs-patch): Use pop-to-buffer-same-window.
Juri Linkov [Thu, 16 Nov 2023 07:25:23 +0000 (09:25 +0200)]
* lisp/mail/emacsbug.el (submit-emacs-patch): Use pop-to-buffer-same-window.

This allows customization with 'display-buffer-alist' (bug#65387).

12 months ago; * lisp/simple.el (minibuffer-default-add-completions): Doc fix.
Eli Zaretskii [Thu, 16 Nov 2023 06:55:08 +0000 (08:55 +0200)]
; * lisp/simple.el (minibuffer-default-add-completions): Doc fix.

12 months ago; Improve indexing in ELisp manual
Eli Zaretskii [Thu, 16 Nov 2023 06:24:13 +0000 (08:24 +0200)]
; Improve indexing in ELisp manual

* doc/lispref/tips.texi (Documentation Tips, Coding Conventions)
(Key Binding Conventions, Programming Tips, Compilation Tips)
(Warning Tips, Comment Tips, Library Headers): Improve indexing.

12 months agotodo-mode.el: Don't let-bind `buffer-read-only`
Stefan Monnier [Thu, 16 Nov 2023 05:16:31 +0000 (00:16 -0500)]
todo-mode.el: Don't let-bind `buffer-read-only`

Prefer let-binding `inhibit-read-only` so the code can freely change
`buffer-read-only`.  While at it, prefer #' to quote function names.

* lisp/calendar/todo-mode.el (todo-rename-category)
(todo-delete-category, todo-delete-item)
(todo-edit-item--diary-inclusion, todo-edit-category-diary-inclusion)
(todo-edit-category-diary-nonmarking, todo-archive-done-item)
(todo-unarchive-items, todo-display-categories)
(todo-update-categories-display, todo-filter-items-1)
(todo-reset-nondiary-marker, todo-reset-done-separator-string)
(todo-reset-done-string, todo-reset-comment-string):
Bind `inhibit-read-only` instead of `buffer-read-only`.
(todo-mode, todo-archive-mode, todo-edit-mode, todo-categories-mode)
(todo-filtered-items-mode): Let `define-derived-mode` take care of
adding the keymap to the docstring.
(todo-mode, todo-archive-mode, todo-categories-mode)
(todo-filtered-items-mode): Let `define-derived-mode` set
`mode-class`.

12 months agoPan during touch screen pinch gestures
Po Lu [Thu, 16 Nov 2023 03:29:58 +0000 (11:29 +0800)]
Pan during touch screen pinch gestures

* doc/lispref/commands.texi (Touchscreen Events): Document new
ratio-diff parameter to touchscreen-pinch events.

* lisp/completion-preview.el (completion-preview-commands):
Account text-conversion events preview commands as well.

* lisp/touch-screen.el (touch-screen-aux-tool): Introduce two
new elements.
(touch-screen-pinch): Scroll window in accord with event deltas.
(touch-screen-handle-aux-point-update): Supply the ratio
difference in generated events.
(touch-screen-handle-touch): Create a vector with those two new
elements.

12 months ago* lisp/simple.el (minibuffer-default-add-completions): Improve (bug#64656).
Juri Linkov [Wed, 15 Nov 2023 17:52:10 +0000 (19:52 +0200)]
* lisp/simple.el (minibuffer-default-add-completions): Improve (bug#64656).

Return nil for some popular completions with undefined order that include
obarray.  Extend the docstring to explain how to disable this feature.

12 months agoEnable completion-in-region-mode in minibuffer-complete-history/defaults
Juri Linkov [Wed, 15 Nov 2023 17:44:04 +0000 (19:44 +0200)]
Enable completion-in-region-mode in minibuffer-complete-history/defaults

* lisp/minibuffer.el (minibuffer-complete-history)
(minibuffer-complete-defaults): Let-bind completion-in-region-mode-predicate
to lambda that checks if the "*Completions*" buffer window is visible.
This enables completion-in-region-mode that supports arrows
with minibuffer-visible-completions.

12 months ago* lisp/minibuffer.el (minibuffer-completion-help): Fix base-suffix for region.
Juri Linkov [Wed, 15 Nov 2023 17:37:30 +0000 (19:37 +0200)]
* lisp/minibuffer.el (minibuffer-completion-help): Fix base-suffix for region.

When used with completion-in-region where completion-in-region-mode-predicate
is non-nil, start base-suffix from point (bug#62700).

12 months agoAdd Completion Preview mode
Eshel Yaron [Thu, 2 Nov 2023 15:58:31 +0000 (16:58 +0100)]
Add Completion Preview mode

This adds a new minor mode, 'completion-preview-mode', that displays
in-buffer completion suggestions with an inline "preview" overlay.
(Bug#66948)

* lisp/completion-preview.el: New file.
* doc/emacs/programs.texi (Symbol Completion): Document it.
* etc/NEWS: Announce it.

12 months agoDon't infinite loop in map-y-or-n-p if at the end of kmacro
Spencer Baugh [Fri, 10 Nov 2023 16:27:10 +0000 (11:27 -0500)]
Don't infinite loop in map-y-or-n-p if at the end of kmacro

Previously, if map-y-or-n-p got -1 from read-event (indicating no
input due to the end of a keyboard macro), it would just infinite
loop.

Now it behaves like other commands which use read-event/read-char/etc,
and just errors when we try to look up -1 in our keymap and find
nothing.

Also, just for the sake of users, print a slightly prettier message
when this happens.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't loop if we reach
the end of a keyboard macro.  (Bug#67046)

12 months agoFix CBZ file detection in doc-view-mode
Morgan Smith [Sun, 12 Nov 2023 17:31:39 +0000 (12:31 -0500)]
Fix CBZ file detection in doc-view-mode

* lisp/doc-view.el (doc-view-set-doc-type): Fix CBZ file
detection.  (Bug#67133)

This fix is almost identical to the previous fix for ODF file
detection in bug#54947 which resulted in commit
b3ff4905388834994ff26d9d033d6bc62b094c1c

12 months agoFix 'tex-compile-commands'
Eli Zaretskii [Wed, 15 Nov 2023 13:58:17 +0000 (15:58 +0200)]
Fix 'tex-compile-commands'

* lisp/textmodes/tex-mode.el (tex-compile-commands): Respect
'tex-start-options' better.  (Bug#67030)

12 months agoSignal file-locked on lock conflict with noninteractive=t
Spencer Baugh [Fri, 10 Nov 2023 12:20:09 +0000 (07:20 -0500)]
Signal file-locked on lock conflict with noninteractive=t

Previously we would signal a generic error on lock conflict when
noninteractive=t.  That meant that non-interactively handling a lock
conflict would require catching all errors and checking the string in
DATA.

Now we just signal file-locked instead, which matches the interactive
behavior when the user says "q" at the prompt.

Also, when noninteractive, we signal before we write the prompt about
the lock conflict.  That prompt usually gets in the way of
noninteractively handling and suppress lock conflict errors.  The
signal data contains all the necessary information, we don't need to
write a separate message for noninteractive.

* lisp/userlock.el (ask-user-about-lock): Signal file-locked on
noninteractive lock conflict.  (bug#66993)

12 months agoFix query-replace at EOB
Eli Zaretskii [Wed, 15 Nov 2023 13:15:35 +0000 (15:15 +0200)]
Fix query-replace at EOB

* lisp/replace.el (replace-match-maybe-edit): Avoid clobbering
match-data with outdated buffer position.  (Bug#67124)

12 months agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Wed, 15 Nov 2023 13:10:04 +0000 (15:10 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

12 months ago; * doc/lispref/commands.texi (Touchscreen Events): Correct typo.
Po Lu [Wed, 15 Nov 2023 13:06:27 +0000 (21:06 +0800)]
; * doc/lispref/commands.texi (Touchscreen Events): Correct typo.

12 months agoRegister ``pinch to zoom'' touch screen gestures
Po Lu [Wed, 15 Nov 2023 12:58:46 +0000 (20:58 +0800)]
Register ``pinch to zoom'' touch screen gestures

* doc/emacs/input.texi (Touchscreens): Address pinch gestures.

* doc/lispref/commands.texi (Touchscreen Events): Address touch
screen pinch events and the process by which they are produced.

* java/org/gnu/emacs/EmacsWindow.java (figureChange)
<ACTION_POINTER_DOWN>: Supply pointer index to getX and getY,
correcting a mistake where the first touch point's coordinate
was saved here in lieu of the pointer that was pressed's.

* lisp/touch-screen.el (touch-screen-current-tool): Revise doc
string.
(touch-screen-aux-tool): New variable.
(touch-screen-scroll-point-to-y, touch-screen-pinch): New
functions.
(global-map): Bind [touchscreen-pinch] to touch-screen-pinch.
(touch-screen-handle-point-update): Revise doc string; set new
tenth field of t-s-c-t to POINT relative to its window, without
regard to whether an event has been sent.
(touch-screen-distance, touch-screen-centrum): New functions.
(touch-screen-handle-aux-point-update): New function; generate
and send touchscreen-pinch if need be.
(touch-screen-handle-point-up): If an ancillary tool exists,
transfer the information there into touch-screen-current-tool
and clear t-s-a-t.
(touch-screen-handle-touch): Call t-s-a-p-u as is proper; set
t-s-a-t if a touchscreen-down event arrives and t-s-c-t is set.

* src/androidterm.c (handle_one_android_event): Properly save
the event's X and Y when a new touch point is registered.

12 months agoFix font-lock for string escapes in lua-ts-mode
nverno [Sun, 12 Nov 2023 19:36:09 +0000 (11:36 -0800)]
Fix font-lock for string escapes in lua-ts-mode

* lua-ts-mode.el (lua-ts--font-lock-settings): Apply font-lock
to the entire string containing an escape sequence. (Bug#67135)

12 months agoFix flymake integration in lua-ts-mode (Bug#67152)
john muhl [Mon, 13 Nov 2023 22:06:07 +0000 (16:06 -0600)]
Fix flymake integration in lua-ts-mode (Bug#67152)

* lisp/progmodes/lua-ts-mode.el (lua-ts-flymake-luacheck): Use
'flymake-diag-region' to mark highlighted region.

12 months ago* lisp/progmodes/eglot.el (eglot-server-programs): Fix previous commit.
João Távora [Wed, 15 Nov 2023 10:12:03 +0000 (04:12 -0600)]
* lisp/progmodes/eglot.el (eglot-server-programs): Fix previous commit.

(cherry picked from commit 58d9e735e721ecf0187a5e15eefc7641112ace0b)

12 months ago* lisp/progmodes/eglot.el (eglot-server-programs): Fix previous commit.
João Távora [Wed, 15 Nov 2023 10:12:03 +0000 (04:12 -0600)]
* lisp/progmodes/eglot.el (eglot-server-programs): Fix previous commit.

12 months ago; * doc/misc/eglot.texi (Eglot Commands): Fix typos (bug#67159).
Eli Zaretskii [Tue, 14 Nov 2023 19:14:48 +0000 (21:14 +0200)]
; * doc/misc/eglot.texi (Eglot Commands): Fix typos (bug#67159).

Reported by Alfie John <alfie@rustjobs.com>.

12 months agoEglot: Send standard :language-id for typescript-language-server
João Távora [Tue, 14 Nov 2023 00:06:24 +0000 (00:06 +0000)]
Eglot: Send standard :language-id for typescript-language-server

bug#67150

* lisp/progmodes/eglot.el (eglot-server-programs): Update
language-id for languages handled by typescript-language-server.

(cherry picked from commit 1fe949888057b0275da041288709bd5690501974)

12 months agoTypofix in the doc/lispref/modes.texi
Zajcev Evgeny [Tue, 14 Nov 2023 10:32:57 +0000 (13:32 +0300)]
Typofix in the doc/lispref/modes.texi

12 months ago; Fix 'add-face-text-property' shortdoc
Eshel Yaron [Sun, 12 Nov 2023 20:42:25 +0000 (21:42 +0100)]
; Fix 'add-face-text-property' shortdoc

* lisp/emacs-lisp/shortdoc.el (text-properties): Add missing
':no-eval' keyword.  (Bug#67138)

12 months agoFix spell-checking email message with citations
Eli Zaretskii [Tue, 14 Nov 2023 13:14:01 +0000 (15:14 +0200)]
Fix spell-checking email message with citations

This became broken 7 years ago, when the 'boundp condition was
removed, and with it an important unrelated part of the code.
* lisp/textmodes/ispell.el (ispell-message): Fix cite-regexp.

12 months ago* lisp/vc/vc.el (vc-deduce-backend-nonvc-modes): New variable (bug#67145).
Juri Linkov [Tue, 14 Nov 2023 07:44:15 +0000 (09:44 +0200)]
* lisp/vc/vc.el (vc-deduce-backend-nonvc-modes): New variable (bug#67145).

(vc-deduce-backend): Use it.

12 months agoProperly merge EXTRA_EMAIL content with mailto URIs
Po Lu [Tue, 14 Nov 2023 02:57:18 +0000 (10:57 +0800)]
Properly merge EXTRA_EMAIL content with mailto URIs

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
EXTRA_EMAIL is an array rather than a string, so insert
its first element into an empty mailto URI.

12 months agoEglot: Send standard :language-id for typescript-language-server
João Távora [Tue, 14 Nov 2023 00:06:24 +0000 (00:06 +0000)]
Eglot: Send standard :language-id for typescript-language-server

bug#67150

* lisp/progmodes/eglot.el (eglot-server-programs): Update
language-id for languages handled by typescript-language-server.

12 months ago; * etc/NEWS: Use setopt not setq for project-switch-commands.
Sean Whitton [Mon, 13 Nov 2023 21:58:46 +0000 (21:58 +0000)]
; * etc/NEWS: Use setopt not setq for project-switch-commands.

12 months ago(wisent-python-lex-beginning-of-line): Fix compiler warning
Stefan Monnier [Mon, 13 Nov 2023 18:24:12 +0000 (13:24 -0500)]
(wisent-python-lex-beginning-of-line): Fix compiler warning

* lisp/cedet/semantic/wisent/python.el
(wisent-python-lex-beginning-of-line): Comment out unused test.

12 months ago; cperl-mode.el: Eliminate warnings about using obsolete functions
Harald Jörg [Mon, 13 Nov 2023 15:39:20 +0000 (16:39 +0100)]
; cperl-mode.el: Eliminate warnings about using obsolete functions

* lisp/progmodes/cperl-mode.el (cperl-info-on-current-command):
Use cperl-perldoc instead of cperl-info-on-command.
(cperl-imenu-on-info): Shortcut this function since the Perl info
file can no longer be installed.

12 months agoFix variable aliasing bytecode miscompilation (bug#67116)
Mattias Engdegård [Mon, 13 Nov 2023 10:49:32 +0000 (11:49 +0100)]
Fix variable aliasing bytecode miscompilation (bug#67116)

The compiler didn't cancel aliasing if the aliased variable was
modified in a variable binding in the same `let` that created
the alias.  For example,

 (let ((x A))
   (let ((y x)
         (z (setq x B)))
     y))

would incorrectly substitute y->x in the body form despite x being
already modified at that point, which normally should have cancelled
the aliasing.

Bug reported by Alan Mackenzie.

* lisp/emacs-lisp/byte-opt.el (byte-optimize--aliased-vars):
Now an alist that also contains the aliases; update the doc string.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form):
Detect aliasing early for `let`-bound variables as well.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.

12 months agoFix hanful-insert-character (bug#66970)
João Távora [Mon, 13 Nov 2023 10:11:09 +0000 (04:11 -0600)]
Fix hanful-insert-character (bug#66970)

* lisp/leim/quail/hangul.el (hangul-insert-character): Rework.

12 months ago; * etc/NEWS: Rearrange wrongly categorized entries.
Juri Linkov [Mon, 13 Nov 2023 07:18:49 +0000 (09:18 +0200)]
; * etc/NEWS: Rearrange wrongly categorized entries.

Move Project, Minibuffer and Completions, JS Mode
from "New Modes and Packages" to "Changes in Specialized Modes and Packages".

12 months ago* lisp/vc/vc-hooks.el (vc-display-status): New value 'no-backend' (bug#66464).
Juri Linkov [Mon, 13 Nov 2023 07:09:15 +0000 (09:09 +0200)]
* lisp/vc/vc-hooks.el (vc-display-status): New value 'no-backend' (bug#66464).

* lisp/vc/vc-hooks.el (vc-default-mode-line-string): Use it.
* lisp/vc/vc-git.el (vc-git-mode-line-string): Use it.
* lisp/vc/vc-hg.el (vc-hg-mode-line-string): Use it.

12 months ago; Prepare for ERC 5.6 release
F. Jason Park [Wed, 8 Nov 2023 07:51:27 +0000 (23:51 -0800)]
; Prepare for ERC 5.6 release

* doc/misc/erc.texi: Minor tweak in SASL section.
* etc/ERC-NEWS: Revise various sections under 5.6.
* lisp/erc/erc-button.el (erc-button-alist): Remove comment.
(erc-nick-popup-alist): Remove comment.
* lisp/erc/erc-fill.el (erc-fill-wrap-margin-width): Remove comment.
(erc-fill-wrap-margin-side): Remove comment.
(erc-fill-line-spacing): Remove comment.
(erc-fill-wrap-use-pixels): Remove comment.
(erc-fill-wrap-visual-keys): Remove comment.
(erc-fill-wrap-force-screen-line-movement): Remove comment.
(erc-fill-wrap-merge): Remove comment.
* lisp/erc/erc-goodies.el (erc-scrolltobottom-all): Remove comment.
(erc-keep-place-indicator-style): Remove comment.
(erc-keep-place-indicator-buffer-type): Remove comment.
(erc-keep-place-indicator-follow): Remove comment.
* lisp/erc/erc-networks.el (erc-server-alist): Remove comment.
* lisp/erc/erc-nicks.el (erc-nicks): Remove comment.
* lisp/erc/erc-speedbar.el
(erc-speedbar-nicknames-window-width): Remove comment.
(erc-speedbar-hide-mode-topic): Remove comment.
(erc-speedbar-my-nick-face): Remove comment.
* lisp/erc/erc-stamp.el (erc-timestamp-format-right): Remove comment.
(erc-echo-timestamp-zone): Remove comment.
(erc-timestamp-use-align-to): Remove comment.
* lisp/erc/erc-status-sidebar.el
(erc-status-sidebar-highlight-active-buffer): Remove comment.
(erc-status-sidebar-style): Remove comment.
(erc-status-sidebar-click-display-action): Remove comment.
* lisp/erc/erc.el: Bump required Compat version to 29.1.4.3 in
Package-Requires header.
(erc-notice-face): Remove comment.
(erc-action-face): Remove comment.
(erc-interactive-display): Remove comment.
(erc-auto-reconnect-display-timeout): Remove comment.
(erc-reconnect-display-server-buffers): Remove comment.
(erc-modules): Remove comment.
* test/lisp/erc/resources/base/display-message/multibuf.eld: Remove
reference to specific ERC version in QUIT command reason.
* test/lisp/erc/resources/base/assoc/reconplay/foonet.eld: Timeout.

12 months agoRevive erc-command-indicator as new module
F. Jason Park [Fri, 10 Nov 2023 21:34:31 +0000 (13:34 -0800)]
Revive erc-command-indicator as new module

* doc/misc/erc.texi: Add entry for `command-indicator' to Modules
chapter.
* etc/ERC-NEWS: Mention new module `command-indicator'.
* lisp/erc/erc-goodies.el (erc-noncommands-list): Replace the
nonexistent `erc-cmd-SMV' with function `erc-cmd-SAY'.
(erc-noncommands-mode, erc-noncommands-enable,
erc-noncommands-disable): Deprecate this module because it's a no-op.
(erc-command-indicator-face, erc-command-indicator): Migrate from main
library.
(erc-command-indicator-mode, erc-command-indicator-enable,
erc-command-indicator-disable): New module to take the spiritual place
of `noncommands'.
(erc-command-indicator): Move function here from main library, along
with option namesake mentioned above.
(erc-command-indicator-toggle-hidden): New command to toggle echoed
command-line visibility.
(erc--command-indicator-permit-insertion): New function.
(erc--command-indicator-display): New function, a slightly revised
version of the old `erc-display-command' from the main library.  Its
only call site was removed back in d1036d288de "backport: erc
bugfixes".  However, references were left behind to associated assets,
like `erc-command-indicator', etc.  The function was later commented
out in 0c599ee2e2c "* lisp/erc/erc.el: Use `run-hook-with-args` for
`erc-pre-send-functions`", and then removed by a63ed6f78a6 "Remove
duplicate ERC prompt on reconnect".
* lisp/erc/erc-match.el (erc-match-toggle-hidden-fools): Use new
non-module-specific name for `erc-match--toggle-hidden'.
(erc-match--toggle-hidden): Move to main library for shared use by
other modules.
* lisp/erc/erc.el (erc-hide-prompt): Leave note explaining updated
role.
(erc-command-indicator): Move option and function of same name to
erc-goodies.
(erc-command-indicator-face): Move to erc-goodies.
(erc-modules): Remove module `noncommands' from standard value and
Custom set.  Add `command-indicator' to set.
(erc--toggle-hidden): "New" function, a rebranded version of the
utility `erc-match--toggle-hidden' from erc-match.
(erc--send-input-lines): Accommodate modules wanting alternate
insertion functions.
(erc-load-irc-script-lines): Account for `erc-command-indicator' no
longer being defined in this library.
* test/lisp/erc/erc-scenarios-base-send-message.el
(erc-scenarios-base-send-message--command-indicator): New test.
* test/lisp/erc/erc-tests.el (erc-tests--modules): Remove
deprecated module `noncommands' from manifest.  (Bug#67031)

12 months agoSimplify default text props for ERC input
F. Jason Park [Thu, 9 Nov 2023 05:20:54 +0000 (21:20 -0800)]
Simplify default text props for ERC input

* lisp/erc/erc.el (erc--msg-props): Reformat doc string to improve
readability.
(erc-send-current-line): Don't bind `erc--msg-prop-overrides' because
doing so affects all scoped calls to `erc-display-message' made by
slash commands, etc. and makes handling overly complex and error
prone.
(erc-display-msg): Set `erc-msg' property to `msg' instead of `self'
because the only legitimate use of this function is for inserting
"echoed" prompt input.  (Bug#60936 and Bug#67031)

12 months agoAllow opting out of empty message padding in ERC
F. Jason Park [Mon, 18 Sep 2023 10:39:57 +0000 (03:39 -0700)]
Allow opting out of empty message padding in ERC

* lisp/erc/erc.el (erc--allow-empty-outgoing-lines-p): New internal
variable.
(erc-send-input-line, erc--run-send-hooks): Don't pad output when
`erc--allow-empty-outgoing-lines-p' is non-nil.  (Bug#67031)

12 months agoMake nested input handling more robust in ERC
F. Jason Park [Sat, 10 Jun 2023 04:00:03 +0000 (21:00 -0700)]
Make nested input handling more robust in ERC

* lisp/erc/erc.el (erc--send-action-function): New function-valued
variable for locally advising `erc-send-action' so that built-in
modules can elect to handle insertion and sending themselves.
(erc-send-action): Defer to `erc--send-action-function'.
(erc--send-action-perform-ctcp): Isolate the message-sending business
for CTCP ACTIONs that used to reside in `erc-send-action'.
(erc--send-action-display): Isolate the message-insertion business
formerly residing in `erc-send-action' for more granular use.  Fix a
minor bug involving inserted representations of CTCP ACTIONs not
having `erc-my-nick-face' applied to the speaker.
(erc--send-action): Perform the same displaying and sending of CTCP
ACTION messages formerly handled by `erc-send-action', but display
messages before sending them.
(erc--current-line-input-split): New variable bound to the post-review
`erc--input-split' object for the extent of display processing.  This
mainly benefits slash-command handlers and the utility functions they
employ, such as `erc-send-message'.
(erc-cmd-SAY): Defer to `erc--send-message'.
(erc--send-message-nested-function): New function-valued variable
supporting an internal interface for influencing how
`erc-send-message' inserts and sends prompt input.  Some handlers for
slash commands, like /SV, use `erc-send-message' to perform their own
insertion and sending, which is normally the domain of
`erc-send-current-line'.  When this happens, modules can't easily
leverage the normal hook-based API to do things like suppress
insertion but allow sending or vice-versa.  This variable provides an
internal seam for modules to exert such influence.
(erc-send-message): Behave specially when called by the default
interactive client via `erc-send-current-line' and friends.
(erc--send-message-external): New function to house the former body of
`erc-send-message', for third-party code needing to apply the
traditional behavior.
(erc--send-message-nested): New function for turning arbitrary text,
such as replacement prompt input, into outgoing message text by doing
things like ensuring "send" hooks run and invariants for prompt
markers are preserved.
(erc--make-input-split): New helper function for creating a standard
`erc--input-split' object from a string.  This is arguably less
confusing than adding another constructor to the struct definition.
(erc-send-current-line): Bind `erc--current-line-input-split' when
dispatching prompt-input handlers.  Use helper `erc--make-input-split'
to initialize working `erc--input-split' state object.
(erc--run-send-hooks): Honor existing `refoldp' slot from
`erc--input-split' object.
(erc--send-input-lines): Convert to generic function to allow modules
control over fundamental insertion and sending operations, which is
necessary for next-generation features, like multiline messages.
(erc-modes): Don't output non-modules.  That is, only list actual
modules created via `define-erc-module', and `quote' members of the
resulting list.
* test/lisp/erc/erc-scenarios-base-send-message.el: New test file.
* test/lisp/erc/resources/base/send-message/noncommands.eld: New data
file.  (Bug#67031)

12 months agoAlways run erc-server-send-queue via timer
F. Jason Park [Fri, 15 Jul 2022 12:02:35 +0000 (05:02 -0700)]
Always run erc-server-send-queue via timer

* lisp/erc/erc-backend.el (erc--server-send, erc-server-send): Convert
the latter into a wrapper that calls the former, a "new" internal
generic function, so that built-in modules can do things like prepend
tags to outgoing messages and send messages over other transports or
proxy protocols.  Extend the `no-penalty' parameter to mean ERC will
schedule an imminent send via a timer.  And always run the function
`erc-server-send-queue' on a timer.  (Bug#67031)

12 months agoMake ERC's error-notice formatting more consistent
F. Jason Park [Thu, 9 Nov 2023 03:14:55 +0000 (19:14 -0800)]
Make ERC's error-notice formatting more consistent

* lisp/erc/erc-backend.el (erc--server-propagate-failed-connection):
Include leading three-asterisk notice prefix when reporting process
exit status, and set the `erc-msg' text property to `notice-error'.
(erc-schedule-reconnect): Include leading notice prefix when inserting
`reconnecting' message.
* lisp/erc/erc.el (erc-process-input-line, erc-cmd-PART,
erc-cmd-TOPIC): Display `no-target' messages as "error notices".
(erc-message-english-disconnected,
erc-message-english-disconnected-noreconnect): Hard-code standard
value of `erc-notice-prefix' into message text for consistency during
formatting and insertion.
* test/lisp/erc/erc-tests.el (erc--refresh-prompt): Expect notice
prefix before `no-target' message.  (Bug#67031)

12 months agoOffer alternate pool-creation strategies in erc-nicks
F. Jason Park [Sun, 3 Sep 2023 23:05:59 +0000 (16:05 -0700)]
Offer alternate pool-creation strategies in erc-nicks

* lisp/erc/erc-nicks.el (erc-nicks-bg-color): Expand doc string.
(erc-nicks-colors): Add new choices `font-lock' and `ansi-color'.
(erc-nicks--adjust-contrast): Add assertion to prevent dependency bug
from resurfacing when hacking on module activation code.
(erc-nicks--create-pool-function): New function-valued variable to
specify a pool creation strategy.  Note in doc string that this could
form the basis for a possible user option should the need arise.
(erc-nicks--create-coerced-pool): New function for filtering
user-provided `erc-nicks-color' values.
(erc-nicks--create-pool, erc-nicks--create-culled-pool): Rename former
to latter.
(erc-nicks--init-pool): Call `erc-nicks--create-pool-function' to
actually create pool.  Account for new `erc-nicks-colors' values.
(erc-nicks-enable, erc-nicks-mode): Set `erc-nicks--fg-rgb' before
`erc-nicks--init-pool' to prevent type error in filters that depend on
that variable being initialized.  This is a bug fix.
(erc-nicks-refresh): Provide helpful user error instead of letting
`arith-error' propagate due to an empty pool.
(erc-nicks--colors-from-faces): New helper function.
* test/lisp/erc/erc-nicks-tests.el (erc-nicks--create-pool,
erc-nicks--create-culled-pool): Rename test from former to latter and
update function invocations to reflect that.
(erc-nicks--create-coerced-pool): New test.  (Bug#63569)

12 months agoDon't use func-arity to trigger API warning in url-irc
F. Jason Park [Mon, 6 Nov 2023 00:03:15 +0000 (16:03 -0800)]
Don't use func-arity to trigger API warning in url-irc

* lisp/url/url-irc.el (url-irc): Use more robust `condition-case'
pattern instead, which will still fail when met with various edge
cases.  The old way was only useful for non-variadic lambda lists
consisting entirely of named positional parameters.  (Bug#56514)

12 months agoSubject: (derived-mode-add-parents): Add documentation and one more test
Stefan Monnier [Sun, 12 Nov 2023 22:08:46 +0000 (17:08 -0500)]
Subject: (derived-mode-add-parents): Add documentation and one more test

* doc/lispref/modes.texi (Derived Modes): Document new derived-modes API.
* test/lisp/subr-tests.el (subt-tests--merge-ordered-lists): New test.

12 months agoPass only the local parts of Eshell's $PATH to 'tramp-remote-path'
Xiaoyue Chen [Sun, 12 Nov 2023 20:04:02 +0000 (12:04 -0800)]
Pass only the local parts of Eshell's $PATH to 'tramp-remote-path'

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Get the
local part of the $PATH (bug#67126).

Do not merge to master.

Copyright-paperwork-exempt: yes

12 months agoPass only the local parts of Eshell's $PATH to 'tramp-remote-path'
Xiaoyue Chen [Sun, 12 Nov 2023 20:04:02 +0000 (12:04 -0800)]
Pass only the local parts of Eshell's $PATH to 'tramp-remote-path'

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Get the
local part of the $PATH (bug#67126).

Copyright-paperwork-exempt: yes

12 months agoAdd two doc strings to cl-extra.el
Jeremy Bryant [Sun, 12 Nov 2023 15:07:23 +0000 (15:07 +0000)]
Add two doc strings to cl-extra.el

* lisp/emacs-lisp/cl-extra.el (cl--random-time)
(cl-find-class): Add docstrings.  (Bug#66949)

12 months ago; Fix docstring typo in Eshell tests
Jim Porter [Sun, 12 Nov 2023 19:08:40 +0000 (11:08 -0800)]
; Fix docstring typo in Eshell tests

* test/lisp/eshell/em-hist-tests.el (em-hist-test/check-history-file):
Fix typo.

12 months ago(derived-mode-all-parents): Fix handling of cycles
Stefan Monnier [Sun, 12 Nov 2023 16:37:38 +0000 (11:37 -0500)]
(derived-mode-all-parents): Fix handling of cycles

* lisp/subr.el (derived-mode-all-parents): Fix the handling of cycles
so that it doesn't fill the cache with incorrect results.
(merge-ordered-lists): Improve docstring.
(provided-mode-derived-p): Swap the loops since `modes` is usually
shorter than `ps`.

* test/lisp/subr-tests.el (subr-tests--parent-mode): Simplify.
(subr-tests--mode-A, subr-tests--mode-B, subr-tests--mode-C): New funs.
(subt-tests--derived-mode-add-parents): New test.

12 months agoAdd support in todo-mode.el for ISO date format
Stephen Berman [Sun, 12 Nov 2023 13:58:58 +0000 (14:58 +0100)]
Add support in todo-mode.el for ISO date format

* lisp/calendar/todo-mode.el (todo--date-pattern-groups): New defconst.
(todo-date-pattern): Use it to extend pattern matching of
`calendar-date-display-form' to support the ISO date format in
todo item date headers (bug#66395, bug#55284).
(todo-edit-item--header): Make it work with ISO date strings.

12 months agoHook 'bug-reference-mode' up to 'thing-at-point'
Jim Porter [Wed, 25 Oct 2023 22:24:28 +0000 (15:24 -0700)]
Hook 'bug-reference-mode' up to 'thing-at-point'

* lisp/progmodes/bug-reference.el (bug-reference--url-at-point): New
function.
(bug-reference-mode, bug-reference-prog-mode): Factor initialization
code out to...
(bug-reference--init): ... here.

* test/lisp/progmodes/bug-reference-tests.el (test-thing-at-point):
New test.

* etc/NEWS: Announce this change (bug#66752).

12 months agoAdjust dump file location under Android
Po Lu [Sun, 12 Nov 2023 03:44:58 +0000 (11:44 +0800)]
Adjust dump file location under Android

* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication)
<apkFileName>: New field.
(getApkFile): Move from EmacsService.java.
(findDumpFile): If the dump file is older than the APK, delete
it irrespective of whether the checksums agree.
(onCreate): Initialize apkFileName.

* java/org/gnu/emacs/EmacsService.java (onCreate): Use
EmacsApplication.apkFileName.

* src/android.c (android_on_low_memory): Correct arguments to
Fclear_image_cache.

* src/image.c (Fclear_image_cache): Check that animation_cache
is always a cons.

12 months agoMove EIEIO's C3 linearization code to `subr.el`
Stefan Monnier [Tue, 7 Nov 2023 23:57:03 +0000 (18:57 -0500)]
Move EIEIO's C3 linearization code to `subr.el`

The code was used to linearize the EIEIO class hierarchy, since
it results in saner results than things like BFS or DFS.
By moving it to `subr.el` we get to benefit from that same
advantage both in `cl--class-allparents` and
in `derived-mode-all-parents`.

* lisp/subr.el (merge-ordered-lists): New function.
(derived-mode-all-parents): Use it to improve parent ordering.

* lisp/emacs-lisp/eieio-core.el (eieio--c3-candidate)
(eieio--c3-merge-lists): Delete functions, replaced by
`merge-ordered-lists`.
(eieio--class-precedence-c3): Use `merge-ordered-lists`.

* lisp/emacs-lisp/cl-preloaded.el (cl--class-allparents):
Use `merge-ordered-lists` to improve parent ordering.
* lisp/emacs-lisp/cl-macs.el (cl--struct-all-parents): Delete function.
(cl--pcase-mutually-exclusive-p): Use `cl--class-allparents` instead.

12 months agoFix test failures in test/lisp/minibuffer-tests.el
João Távora [Sat, 11 Nov 2023 15:29:46 +0000 (15:29 +0000)]
Fix test failures in test/lisp/minibuffer-tests.el

bug#48841, bug#47711

In some instances the test code needed to be updated to make different
assumptions about implementation details.

In others, like the ones about the completions-first-difference face,
minor parts of the actual user-visible behaviour were broken.

* test/lisp/minibuffer-tests.el (completion-test1): Robustify test.
(completion--pcm-score): Don't assume completion-score is stored
in string as a property.

* lisp/minibuffer.el (completion--hilit-from-re): Take new parameter.
(completion-pcm--hilit-commonality): Use it.

12 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 11 Nov 2023 10:31:52 +0000 (05:31 -0500)]
Merge from origin/emacs-29

ce0ebb91f25 Improve documentation of read syntax and printed represen...
81f84b00a5d ; * doc/lispref/modes.texi (Other Font Lock Variables): A...
434592b0746 ; * lisp/dired.el (dired-use-ls-dired): Doc fix (bug#67053).
fe000236cf2 Improve documentation of signaling errors in batch mode
103ca678ac1 Fix treesit-simple-indent-presets docstring (bug#67007)
b7871cefe7b Prevent an infinite loop in todo-mode (bug#66994)
fa8cc4c9ee2 Fix cmake-ts-mode indentation (Bug#66845)
5bdc61bc0ef Update to Org 9.6.11
18e2de1bec9 ; * lisp/bindings.el (right-word, left-word): Doc fix.
4f0fc3bfda3 ; Document core input events problems with XInput2

12 months ago; * lisp/touch-screen.el (touch-screen-track-tap): Fix typo.
Po Lu [Sat, 11 Nov 2023 10:05:35 +0000 (18:05 +0800)]
; * lisp/touch-screen.el (touch-screen-track-tap): Fix typo.

12 months agoEnable canceling tap gestures
Po Lu [Sat, 11 Nov 2023 10:03:33 +0000 (18:03 +0800)]
Enable canceling tap gestures

* doc/lispref/commands.texi (Touchscreen Events): Relate new
THRESHOLD argument to touch-screen-track-tap.

* lisp/button.el (push-button):

* lisp/wid-edit.el (widget-button--check-and-call-button):
Provide a threshold to enable canceling button presses.

* lisp/touch-screen.el (touch-screen-track-tap): Enable
canceling tap gestures and resuming touch sequence translation
if the touch point exceeds a set threshold.