1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-25 05:52:42 -08:00
Commit graph

169690 commits

Author SHA1 Message Date
Rudi Schlatte
41b837b413 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)
2023-11-18 12:08:34 +02:00
Eli Zaretskii
d5799ce666 ; 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.
2023-11-18 12:02:25 +02:00
Wilhelm H Kirschbaum
09de967f6c 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)
2023-11-18 11:57:08 +02:00
Po Lu
6aa70c236f 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.
2023-11-18 17:42:19 +08:00
Eli Zaretskii
7b7a37ec7b ; * etc/NEWS: Add entry about new input methods. (Bug#66470) 2023-11-18 11:35:15 +02:00
Rahguzar
84e4bc6219 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.
2023-11-18 11:30:51 +02:00
Visuwesh
1c70458519 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.
2023-11-18 10:41:45 +02:00
Eli Zaretskii
bb64e3a798 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".
2023-11-18 10:13:37 +02:00
Eli Zaretskii
ae06e0275d ; 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.
2023-11-18 09:01:30 +02:00
Po Lu
669e754f5b 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.
2023-11-18 14:15:55 +08:00
Stefan Monnier
05213345c0 * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add null 2023-11-17 18:12:03 -05:00
Spencer Baugh
d8c1ac6c35 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)
2023-11-17 12:34:23 -05:00
Michael Albinus
b1b9082b3e 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.
2023-11-17 18:28:30 +01:00
Po Lu
7d6896253b 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.
2023-11-17 11:36:58 +08:00
Po Lu
643c7fc851 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.
2023-11-17 11:16:23 +08:00
Juri Linkov
ed24972849 ; * etc/NEWS: Add new section. 2023-11-16 19:37:21 +02:00
Stefan Monnier
cfb117fee1 * etc/NEWS: Mention incompatible change in pp (bug#67180) 2023-11-16 11:19:56 -05:00
Stefan Monnier
4194f9bd87 Merge branch 'derived-mode-add-parents' 2023-11-16 09:57:38 -05:00
Stefan Monnier
44b5761b44 (merge-ordered-lists): Dot a few more is
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.
2023-11-16 09:57:33 -05:00
Po Lu
ef6622bf04 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.
2023-11-16 21:07:01 +08:00
Po Lu
076c5f1f17 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.
2023-11-16 17:39:14 +08:00
Po Lu
dd0f009c51 ; Commit omitted change
* lisp/completion-preview.el (completion-preview-commands):
Substitute analyze-text-conversion for text-conversion, as this
list enumerates commands, not events.
2023-11-16 17:39:14 +08:00
Andrea Corallo
46c2fffd89 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.
2023-11-16 10:33:13 +01:00
Eli Zaretskii
6733f45383 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)
2023-11-16 11:22:58 +02:00
Andrea Corallo
4a2d39020c * lisp/emacs-lisp/nadvice.el (advice--add-function): Move func decl. 2023-11-16 09:05:27 +01:00
Juri Linkov
7c65ccfc80 * lisp/mail/emacsbug.el (submit-emacs-patch): Use pop-to-buffer-same-window.
This allows customization with 'display-buffer-alist' (bug#65387).
2023-11-16 09:25:23 +02:00
Eli Zaretskii
d72c974fd6 ; * lisp/simple.el (minibuffer-default-add-completions): Doc fix. 2023-11-16 08:55:08 +02:00
Stefan Monnier
dc61c0fd3a 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`.
2023-11-16 00:16:31 -05:00
Po Lu
d03677343e 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.
2023-11-16 11:29:58 +08:00
Juri Linkov
ff1f82cbe3 * 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.
2023-11-15 19:52:10 +02:00
Juri Linkov
94763aa521 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.
2023-11-15 19:44:04 +02:00
Juri Linkov
579ea5f6e2 * 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).
2023-11-15 19:37:30 +02:00
Eshel Yaron
e82d807a28 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.
2023-11-15 19:15:49 +02:00
Spencer Baugh
7cfe088bc3 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)
2023-11-15 19:12:46 +02:00
Eli Zaretskii
1a1f47e4a1 Fix 'tex-compile-commands'
* lisp/textmodes/tex-mode.el (tex-compile-commands): Respect
'tex-start-options' better.  (Bug#67030)
2023-11-15 15:58:17 +02:00
Spencer Baugh
f554872997 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)
2023-11-15 15:35:26 +02:00
Eli Zaretskii
8b458aea86 Fix query-replace at EOB
* lisp/replace.el (replace-match-maybe-edit): Avoid clobbering
match-data with outdated buffer position.  (Bug#67124)
2023-11-15 15:15:35 +02:00
Eli Zaretskii
8fd26c0307 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2023-11-15 15:10:29 +02:00
Po Lu
4913dc7557 ; * doc/lispref/commands.texi (Touchscreen Events): Correct typo. 2023-11-15 21:07:14 +08:00
Po Lu
a9a8d5e959 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.
2023-11-15 21:07:14 +08:00
nverno
f054e9924c 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)
2023-11-15 15:07:12 +02:00
john muhl
03d2e26108 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.
2023-11-15 15:00:59 +02:00
João Távora
58d9e735e7 * lisp/progmodes/eglot.el (eglot-server-programs): Fix previous commit. 2023-11-15 04:12:03 -06:00
Juri Linkov
7d42a76234 * lisp/vc/vc.el (vc-deduce-backend-nonvc-modes): New variable (bug#67145).
(vc-deduce-backend): Use it.
2023-11-14 09:44:42 +02:00
Po Lu
bda31b2c6d 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.
2023-11-14 10:57:18 +08:00
João Távora
1fe9498880 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.
2023-11-14 00:06:24 +00:00
Sean Whitton
6a6c2058f1 ; * etc/NEWS: Use setopt not setq for project-switch-commands. 2023-11-13 21:58:46 +00:00
Stefan Monnier
1124a9853f (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.
2023-11-13 13:25:03 -05:00
Harald Jörg
183d2c3e54 ; 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.
2023-11-13 16:39:20 +01:00
Mattias Engdegård
1247dc87ba 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.
2023-11-13 12:16:37 +01:00