]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months agoRemove some macros in image-dired (Bug#65403)
Manuel Giraud [Sun, 13 Aug 2023 12:48:01 +0000 (14:48 +0200)]
Remove some macros in image-dired (Bug#65403)

* lisp/image/image-dired.el (image-dired--movement-command)
(image-dired--movement-command-line): Change macros to functions.
(image-dired--update-after-move): New function for book-keeping
after a move in image-dired.
(image-dired-scroll): Use it.

14 months ago; Fix typo (bug#63829)
Dmitry Gutov [Wed, 23 Aug 2023 18:23:41 +0000 (21:23 +0300)]
; Fix typo (bug#63829)

14 months agoproject-key-prompt-style: New option.
Dmitry Gutov [Wed, 23 Aug 2023 16:36:35 +0000 (19:36 +0300)]
project-key-prompt-style: New option.

* lisp/progmodes/project.el (project-file-history-behavior):
Add :group and :version tags.
(project-key-prompt-style): New option (bug#64799).

* etc/NEWS: Mention it.

14 months ago; Fix typo in documentation
Po Lu [Wed, 23 Aug 2023 13:19:57 +0000 (21:19 +0800)]
; Fix typo in documentation

* doc/emacs/android.texi (Android Software): Insert `file'
before file name.

14 months agoRevert "; Reverse debug spec of cl-flet (bug#65344)"
Gerd Möllmann [Wed, 23 Aug 2023 11:03:43 +0000 (13:03 +0200)]
Revert "; Reverse debug spec of cl-flet (bug#65344)"

This reverts commit cc0f546825e0db9ff78f82c62615686aa480a133.

14 months ago; Update vhdl-mode and vera-mode URLs
Mattias Engdegård [Wed, 23 Aug 2023 10:32:48 +0000 (12:32 +0200)]
; Update vhdl-mode and vera-mode URLs

* lisp/progmodes/vera-mode.el:
* lisp/progmodes/vhdl-mode.el: Update to (currently) working URLs.

14 months agoTramp cleanup
Michael Albinus [Wed, 23 Aug 2023 09:01:58 +0000 (11:01 +0200)]
Tramp cleanup

* lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory):
Adapt docstring.

14 months ago* lisp/net/ange-ftp.el (ange-ftp-file-remote-p): Handle CONNECTED properly.
Michael Albinus [Wed, 23 Aug 2023 09:00:56 +0000 (11:00 +0200)]
* lisp/net/ange-ftp.el (ange-ftp-file-remote-p): Handle CONNECTED properly.

14 months ago* lisp/files.el (file-remote-p): Simplify.
Michael Albinus [Wed, 23 Aug 2023 09:00:34 +0000 (11:00 +0200)]
* lisp/files.el (file-remote-p): Simplify.

14 months agoEnable remote file name completion in eshell depending on command (bug#65356)
Michael Albinus [Wed, 23 Aug 2023 07:53:40 +0000 (09:53 +0200)]
Enable remote file name completion in eshell depending on command (bug#65356)

* lisp/eshell/em-cmpl.el (eshell-cmpl-remote-file-ignore):
New user option.
(eshell-cmpl-initialize): Use it.
(eshell-external-command-p): New defun.
(eshell-complete-parse-arguments):
Set `pcomplete-remote-file-ignore' depending on the command.

14 months agoRepair displaying compound glyph components with anchor points
Po Lu [Wed, 23 Aug 2023 04:09:08 +0000 (12:09 +0800)]
Repair displaying compound glyph components with anchor points

* src/sfnt.c (sfnt_interpret_compound_glyph_1): Move
initialization of x and y out of conditional.

14 months agoFix bibtex-font-lock-url-regexp
Roland Winkler [Wed, 23 Aug 2023 02:42:49 +0000 (21:42 -0500)]
Fix bibtex-font-lock-url-regexp

Fix bibtex-font-lock-url-regexp to allow line breaks
between the field name and the field string.

14 months agoUse current file name for more "other project" future history
Spencer Baugh [Wed, 23 Aug 2023 02:11:55 +0000 (05:11 +0300)]
Use current file name for more "other project" future history

In the previous commit we added support for using the current buffer's
file name as future history for project-find-file even when switching
to another project with project-switch-project.  Make this work for
project-find-dir and project-or-external-find-file too.

* lisp/progmodes/project.el (project--find-default-from): Add.
(project-find-file, project-or-external-find-file): Use
project--find-default-from with buffer-file-name.
(project-find-dir): Use project--find-default-from with
default-directory.

14 months agoSupport adjusting file-name-history to the current project
Spencer Baugh [Thu, 17 Aug 2023 19:41:04 +0000 (15:41 -0400)]
Support adjusting file-name-history to the current project

This adds project-file-history-behavior which has the effect described in
its docstring.  Implementing a sort of sharing of file-name-history
between projects.

* lisp/progmodes/project.el (project-file-history-behavior):
New option.  (bug#63829)
(project--transplant-file-name): Add.
(project--read-file-cpd-relative): Move history manipulations to
project--read-file-name.
(project--read-file-name): New function.  Refer to
project-file-history-behavior.
(project-find-file-in, project-find-dir): Use it.
(project-or-external-find-file): Bind the new option to t, to avoid
touching the external file names.

* etc/NEWS: Announce the new option.

Co-authored-by: Dmitry Gutov <dmitry@gutov.dev>
14 months agoMake org-mouse compatible with touch screen event emulation
Po Lu [Wed, 23 Aug 2023 01:56:35 +0000 (09:56 +0800)]
Make org-mouse compatible with touch screen event emulation

* lisp/org/org-mouse.el (org-mouse-down-mouse): Characterize as
an `ignored-mouse-command'.

14 months agoFix compatibility problems with several fonts
Po Lu [Wed, 23 Aug 2023 01:08:03 +0000 (09:08 +0800)]
Fix compatibility problems with several fonts

* src/sfnt.c (sfnt_lookup_glyph_8): Perform binary search
instead of combing through each group if the table is large.
(sfnt_read_simple_glyph): Avoid losing if the last byte of a
vector is identical to the last byte of the glyph data.
(sfnt_read_gvar_table): Don't overwrite gvar table data while
reading shared coordinates.

14 months agoExpand project file names before storing them
Spencer Baugh [Sat, 19 Aug 2023 12:24:45 +0000 (08:24 -0400)]
Expand project file names before storing them

Before, whatever project-root returned, we stored as the root
directory of the project in project-list and project-list-file.  This
could lead to duplicate entries or bad behavior if projects were
accessed by different file names, e.g. both /home/user/src/emacs and
~/src/emacs.

Now project-list-file contains only expanded paths and project--list
contains only abbreviated paths.  We abbreviate filenames before
setting project--list, and expand filenames before writing to
project-list-file.  We only do this for local files, though, to avoid
making remote connections; the situation will still be bad for remote
projects, but at least this is an improvement.

* lisp/progmodes/project.el (project--write-project-list): Call
expand-file-name.
(project--read-project-list, project-remember-project)
(project--remove-from-project-list): Call abbreviate-file-name.

14 months agoAdd a bit of logging for gnus-search search engine results
Eric Abrahamsen [Tue, 22 Aug 2023 16:27:33 +0000 (09:27 -0700)]
Add a bit of logging for gnus-search search engine results

Help users figure out the cause of unexpected "no search results"
situations.

14 months ago; * lisp/eshell/esh-io.el (eshell-virtual-target): Remove default constructor.
Jim Porter [Tue, 22 Aug 2023 16:11:13 +0000 (09:11 -0700)]
; * lisp/eshell/esh-io.el (eshell-virtual-target): Remove default constructor.

14 months ago; * lisp/eshell/esh-io.el (eshell-get-target): Fix docstring typos.
Jim Porter [Tue, 22 Aug 2023 16:07:51 +0000 (09:07 -0700)]
; * lisp/eshell/esh-io.el (eshell-get-target): Fix docstring typos.

14 months agoIllustrate more font problems
Po Lu [Tue, 22 Aug 2023 13:42:06 +0000 (21:42 +0800)]
Illustrate more font problems

* etc/PROBLEMS (Runtime problems specific to Android): Mention
problems with three other fonts users have inquired into.

14 months ago; Add another noise macro
Po Lu [Tue, 22 Aug 2023 09:53:40 +0000 (17:53 +0800)]
; Add another noise macro

* .dir-locals.el (c-mode) <c-noise-macro-names>: Classify
TEST_STATIC as a noise macro.

14 months agoAvoid crashes rescaling fonts with long names
Po Lu [Tue, 22 Aug 2023 09:34:41 +0000 (17:34 +0800)]
Avoid crashes rescaling fonts with long names

* src/font.c (font_rescale_ratio): Check NAME is not nil before
matching it against a regexp.

14 months ago; Amend doc strings of two functions
Po Lu [Tue, 22 Aug 2023 09:17:32 +0000 (17:17 +0800)]
; Amend doc strings of two functions

* src/dispnew.c (syms_of_display):

* src/frame.c (Fwindow_system): Revise doc strings to mention
the `android' value.

14 months agoOptimize format 12 cmap table lookup
Po Lu [Tue, 22 Aug 2023 08:44:53 +0000 (16:44 +0800)]
Optimize format 12 cmap table lookup

* src/sfnt.c (sfnt_compare_char): New function.
(sfnt_lookup_glyph_12): Detect ``large'' cmap tables of format
12 and perform a binary search.  Such tables are frequently
provided by CJK fonts.

14 months ago; Reverse debug spec of cl-flet (bug#65344)
Gerd Möllmann [Tue, 22 Aug 2023 08:16:40 +0000 (10:16 +0200)]
; Reverse debug spec of cl-flet (bug#65344)

14 months agoTake precautions against NULL returns from getPrimaryClip
Po Lu [Tue, 22 Aug 2023 07:28:38 +0000 (15:28 +0800)]
Take precautions against NULL returns from getPrimaryClip

* java/org/gnu/emacs/EmacsSdk11Clipboard.java (getClipboardData):
Return null if the clip data is not set.  Also delete superfluous
debugging code.  (bug#65445)
(getClipboard): Don't dereference NULL clip data.

14 months agoAvoid errors in posn-col-row if fonts disappear from an X server
Po Lu [Tue, 22 Aug 2023 04:35:33 +0000 (12:35 +0800)]
Avoid errors in posn-col-row if fonts disappear from an X server

* lisp/window.el (window-font-width, window-font-height): Resort
to frame-char-width/height should the font returned by font-info
be unavailable.

14 months ago; * etc/DEBUG: Fix typo.
Po Lu [Tue, 22 Aug 2023 02:45:29 +0000 (10:45 +0800)]
; * etc/DEBUG: Fix typo.

14 months ago* etc/DEBUG: Mention android_exception_check specifics. (bug#65445)
Po Lu [Tue, 22 Aug 2023 02:43:58 +0000 (10:43 +0800)]
* etc/DEBUG: Mention android_exception_check specifics.  (bug#65445)

14 months agoCorrect invalid Texinfo markup
Po Lu [Tue, 22 Aug 2023 02:01:22 +0000 (10:01 +0800)]
Correct invalid Texinfo markup

* doc/emacs/files.texi (Visiting): Don't enclose an entire form
within @var, use @code for the whole form and @var for
individual variables within instead.

* doc/lispref/commands.texi (Key Sequence Input): @xref must be
followed by either , or ..

* doc/lispref/processes.texi (Filter Functions): Introduce
punctuation absent from the last sentence of a paragraph.

14 months ago; * doc/misc/eshell.texi (Globbing): Fix duplicated index.
Jim Porter [Tue, 22 Aug 2023 01:45:36 +0000 (18:45 -0700)]
; * doc/misc/eshell.texi (Globbing): Fix duplicated index.

14 months agoMerge from origin/emacs-29
Jim Porter [Tue, 22 Aug 2023 01:23:12 +0000 (18:23 -0700)]
Merge from origin/emacs-29

b72f23a532b ; Fix 'desktop-restore-reuses-frames' customize values

14 months ago; Merge from origin/emacs-29
Jim Porter [Tue, 22 Aug 2023 01:23:12 +0000 (18:23 -0700)]
; Merge from origin/emacs-29

The following commit was skipped:

45cc57ac258 ; Silence byte-compiler

14 months agoMerge from origin/emacs-29
Jim Porter [Tue, 22 Aug 2023 01:23:11 +0000 (18:23 -0700)]
Merge from origin/emacs-29

3296031ad74 ; Another improvement for documentation of pixelwise scro...
baeb2d71ae7 Support defun navigation for DEFUN in c-ts-mode (bug#64442)
781ddd7e7d8 Fix touchpad scrolling on MS-Windows
c125bd060e2 Fix order in which package-vc dependencies are resolved
500ced133ad Fix building of VC package manuals with relative org link...
456ecabe9e8 Fix the documentation of 'cl-flet'
f6ebd1ef0d0 ; * src/treesit.c (Ftreesit_node_parent): Improve comment...
fac0e2d5334 Avoid false "wrong passphrase" messages in EPA
8f683b51d8b Fix jsx font-lock in older tree-sitter-js grammars
d9af79ae39d Fix cloning 'face-remapping-alist' for indirect buffers
636fb267c46 Improve documentation of case transfer in replacement com...
7856d51436b Fix horizontal scrolling of images with C-f
8cf5659ec2f ; Fix defcustom in completion.el
a8c8a4e3680 ; * src/fns.c (Fcopy_sequence): Doc fix.  (Bug#64960)
205d87cdca0 Fix unpacking ZIP archives on MS-Windows
3712e8bc385 ; Fix typos in lisp/keymap.el doc strings (bug#65329).
21b2ecee661 Fix command example in Eshell manual
26949819df0 ; lisp/progmodes/csharp-mode.el (treesit-query-capture): ...
221ed70b90a ; Improve documentation of 'define-alternatives'
32280205e27 Add user options mentioned in the Eshell manual to the va...
cf3145a486b * Add missing alias to `native-comp-enable-subr-trampolin...
922b6490286 * Add missing alias to `native-comp-enable-subr-trampolin...
6962823c83c ; * etc/PROBLEMS: Fix typo and clarify wording.

# Conflicts:
# doc/misc/eshell.texi

14 months ago; Fix issues running gitmerge
Jim Porter [Tue, 22 Aug 2023 01:19:24 +0000 (18:19 -0700)]
; Fix issues running gitmerge

* .gitattributes: Ignore whitespace issues in java/INSTALL.

* build-aux/git-hooks/pre-commit (git_diff): Explicitly allow
"ChangeLog.android".

* java/README: Remove extra trailing newline.

14 months agoImprove Android adaptive icon
Po Lu [Tue, 22 Aug 2023 01:20:47 +0000 (09:20 +0800)]
Improve Android adaptive icon

* java/res/drawable/emacs_background.xml: Delete trailing whitespace
and modify gradient offset to match emacs.svg.

* java/res/drawable/emacs_foreground.xml: Delete trailing
whitespace and remove redundant path.

14 months agoRepair desktop notification on Android 31
Po Lu [Tue, 22 Aug 2023 00:04:16 +0000 (08:04 +0800)]
Repair desktop notification on Android 31

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Provide FLAG_IMMUTABLE under Android S and later, not just
versions of Android after S.  (bug#65433)

14 months agoUse generics to define Eshell output targets
Jim Porter [Sun, 12 Mar 2023 02:44:43 +0000 (18:44 -0800)]
Use generics to define Eshell output targets

This is more flexible than before, since third-party code can add new
output target types without advising these functions.  It also
resolves an issue where redirecting to a symbol that has a value in
its function slot doesn't work.

* lisp/eshell/esh-io.el (eshell-virtual-target): New struct.
(eshell-get-target, eshell-output-object-to-target): Reimplement via
'cl-defgeneric'.
(eshell-close-target): Reimplement via 'cl-defgeneric' and simplify
'process' method.

14 months ago; Remove unused Eshell target type
Jim Porter [Sat, 11 Mar 2023 23:37:38 +0000 (15:37 -0800)]
; Remove unused Eshell target type

Eshell creates all output targets in 'eshell-get-target', and that
function never returns a cons cell.

* lisp/eshell/esh-io.el (eshell-close-target)
(eshell-output-object-to-target): Remove 'consp' condition.

14 months agoAllow splicing Eshell globs in-place
Jim Porter [Thu, 17 Aug 2023 19:23:26 +0000 (12:23 -0700)]
Allow splicing Eshell globs in-place

This means that Eshell globs can now expand the same way as if the
user had typed each matching file individually.

* lisp/eshell/em-glob.el (eshell-glob-splice-results): New option.
(eshell-no-command-globbing, eshell-add-glob-modifier): Handle spliced
globs.
(eshell-extended-glob): Always return a list when splicing.

* lisp/eshell/em-pred.el (eshell-parse-arg-modifier): Ensure
'eshell-splice-args' is always at the end of the list of modifiers if
present.

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/expand/splice-results)
(em-glob-test/expand/no-splice-results)
(em-glob-test/expand/explicitly-splice-results)
(em-glob-test/expand/explicitly-listify-results): New tests.
(em-glob-test/no-matches): Check result when
'eshell-glob-splice-results' is nil/non-nil.

* doc/misc/eshell.texi (Arguments): Expand explanation about argument
flattening.
(Globbing): Document splicing behavior of globs.

* etc/NEWS: Announce this change.

14 months ago; Fix 'desktop-restore-reuses-frames' customize values
Eli Zaretskii [Mon, 21 Aug 2023 18:18:08 +0000 (21:18 +0300)]
; Fix 'desktop-restore-reuses-frames' customize values

* lisp/desktop.el (desktop-restore-reuses-frames): Fix defcustom's
value.  (Bug#65435)

14 months ago; * test/lisp/cus-edit-tests.el: remove unused var (bug#63290)
Mattias Engdegård [Mon, 21 Aug 2023 15:04:44 +0000 (17:04 +0200)]
; * test/lisp/cus-edit-tests.el: remove unused var (bug#63290)

14 months agoDon't describe lexbound uncompiled function as 'closures'
Mattias Engdegård [Mon, 21 Aug 2023 14:58:24 +0000 (16:58 +0200)]
Don't describe lexbound uncompiled function as 'closures'

* lisp/help-fns.el (help-fns-function-description-header):
Describe lexbound uncompiled functions as functions.
Whether they technically close over any lexical variables isn't of
interest here.

14 months agoProperly enumerate GX fonts of the same family with divergent styles
Po Lu [Mon, 21 Aug 2023 12:44:23 +0000 (20:44 +0800)]
Properly enumerate GX fonts of the same family with divergent styles

* doc/emacs/android.texi (Android Fonts): Revise explanation of
GX font replacement during font enumeration.

* src/sfntfont.c (sfnt_replace_fonts_p): If PREV and DESC are of
the same family and both are GX fonts, restrict actions taken to
removing duplicate styles from PREV.  Reported by a user who
tried to install GX versions of Cascadia Mono, which are
distributed as two files providing the bold and italic variation
axes respectively.

14 months agoExplicitly disallow named-let in code using dynamic binding
Mattias Engdegård [Mon, 21 Aug 2023 11:50:03 +0000 (13:50 +0200)]
Explicitly disallow named-let in code using dynamic binding

There is no point in permitting named-let to be used in dynbound code;
our code transforms are simply not valid in that context, and it's not
worth the trouble to make it work (to the extent that it is at all
possible). (Bug#59576)

* lisp/emacs-lisp/subr-x.el (named-let):
Error if used with dynamic binding.
* doc/lispref/variables.texi (Local Variables): Amend manual.

14 months ago; * lisp/help-fns.el (help-display-function-type): Doc fix (bug#65288).
Eli Zaretskii [Mon, 21 Aug 2023 12:14:26 +0000 (15:14 +0300)]
; * lisp/help-fns.el (help-display-function-type): Doc fix (bug#65288).

14 months ago; Adjust commentary
Po Lu [Mon, 21 Aug 2023 08:02:53 +0000 (16:02 +0800)]
; Adjust commentary

* src/androidterm.c (android_text_to_string)
(android_update_selection, android_reset_conversion)
(android_set_build_fingerprint): Refine wording in commentary
and correct typos.

14 months agoFix debug spec of cl-flet (bug#65344)
Gerd Möllmann [Mon, 21 Aug 2023 07:16:17 +0000 (09:16 +0200)]
Fix debug spec of cl-flet (bug#65344)

* lisp/emacs-lisp/cl-macs.el (cl-flet): Fix debug spec.
(cl-defun): Allow only symbols as function names in debug spec.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-flet/edebug): New test
case.

14 months ago; * doc/lispref/os.texi (Desktop Notifications): Fix typo.
Po Lu [Mon, 21 Aug 2023 06:49:02 +0000 (14:49 +0800)]
; * doc/lispref/os.texi (Desktop Notifications): Fix typo.

14 months agoMake the Emacs icon ``adaptive''
Po Lu [Mon, 21 Aug 2023 06:35:45 +0000 (14:35 +0800)]
Make the Emacs icon ``adaptive''

* java/AndroidManifest.xml.in (EmacsApplication): Set icon to
@mipmap/emacs_icon.

* java/org/gnu/emacs/EmacsService.java (onStartCommand): Pick a
better name for the persistent notification channel.

* java/res/drawable/emacs_background.xml:

* java/res/drawable/emacs_foreground.xml:

* java/res/mipmap/emacs_icon.png:

* java/res/mipmap-v26/emacs_icon.xml: New files, comprising an
``adaptive icon'' required by some Android launchers.

14 months agoEnable providing icons for Android desktop notifications
Po Lu [Mon, 21 Aug 2023 01:36:52 +0000 (09:36 +0800)]
Enable providing icons for Android desktop notifications

* doc/lispref/os.texi (Desktop Notifications)
<android-notifications-notify>: Mention the :icon parameter.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification) <icon>: New field.
(<init>): New argument ICON.  Set this.icon to its value.
(display1): Use provided icon and always supply a pending intent
to open Emacs once the notification is clicked.

* java/res/layout/sdk8_notifications_view.xml
(sdk8_notifications_title, sdk8_notifications_content): Set
foreground color to #000000.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update signature of <init>.
(android_locate_icon): New function.
(android_notifications_notify_1): New arg ICON.
(Fandroid_notifications_notify): New parameter icon.
(syms_of_androidselect): <QCicon>: New symbol.

14 months ago* Introduce `help-display-function-type' customizable var (bug#65288).
Andrea Corallo [Sun, 20 Aug 2023 20:34:43 +0000 (22:34 +0200)]
* Introduce `help-display-function-type' customizable var (bug#65288).

* lisp/help-fns.el (help-display-function-type): New
customizable var.
(help-fns--signature): Make use of.

14 months ago; Silence byte-compiler
Stefan Kangas [Wed, 16 Aug 2023 19:34:11 +0000 (21:34 +0200)]
; Silence byte-compiler

* test/src/comp-tests.el (native-comp-eln-load-path): Declare.

(cherry picked from commit 508d24c8b9aee2c2a4c78ccfef3b5f551a1b2115)

14 months ago* lisp/isearch.el (isearch-resume): Add isearch-push-state (bug#65379).
Jens Schmidt [Sun, 20 Aug 2023 17:36:49 +0000 (20:36 +0300)]
* lisp/isearch.el (isearch-resume): Add isearch-push-state (bug#65379).

14 months agoDelete some Emacs 19/21 compat code
Stefan Kangas [Sun, 20 Aug 2023 12:29:27 +0000 (14:29 +0200)]
Delete some Emacs 19/21 compat code

* lisp/erc/erc-goodies.el (erc-occur):
* lisp/net/newst-plainview.el (newsticker--buffer-redraw): Delete
Emacs 21 compat code.
* lisp/progmodes/sql.el (sql-accumulate-and-indent): Delete Emacs
19 compat code.

14 months ago* lisp/term.el (term--update-term-menu): Simplify.
Stefan Kangas [Sat, 19 Aug 2023 11:23:24 +0000 (13:23 +0200)]
* lisp/term.el (term--update-term-menu): Simplify.

14 months agoRepair desktop notification display on Android 2.3 and 2.2
Po Lu [Sun, 20 Aug 2023 13:40:08 +0000 (21:40 +0800)]
Repair desktop notification display on Android 2.3 and 2.2

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Create a pending intent and set it as the contentIntent when
building a notification by hand.

14 months ago; * ChangeLog.android: Complete cleanup.
Po Lu [Sun, 20 Aug 2023 12:53:13 +0000 (20:53 +0800)]
; * ChangeLog.android: Complete cleanup.

14 months agoSupport desktop notifications on Android
Po Lu [Sun, 20 Aug 2023 12:23:56 +0000 (20:23 +0800)]
Support desktop notifications on Android

* doc/emacs/android.texi (Android Environment): Correct list of
permissions granted by default.

* doc/lispref/os.texi (Desktop Notifications): Document the new
function `android-notifications-notify' and its limitations.

* java/AndroidManifest.xml.in: Request notification permissions.

* java/org/gnu/emacs/EmacsDesktopNotification.java: New file.

* java/res/layout/sdk8_notifications_view.xml: New file holding
substitute notification widget definitions for Android versions
prior to 3.0.

* java/res/values/strings.xml: Remove inadvertently introduced
tag attribute.

* lisp/org/org-clock.el (haiku-notifications-notify): Correct
file name in function declaration.
(android-notifications-notify): New declaration.
(org-show-notification): Use `android-notifications-notify'.

* src/androidselect.c (android_init_emacs_desktop_notification)
(android_notifications_notify_1, Fandroid_notifications_notify):
New functions.
(init_androidselect, syms_of_androidselect): Initialize new
class and define new subr.

14 months ago; Fix documentation of last change
Eli Zaretskii [Sun, 20 Aug 2023 08:48:03 +0000 (11:48 +0300)]
; Fix documentation of last change

* lisp/net/eww.el (eww--open-url-in-new-buffer)
(eww-open-in-new-buffer):
* etc/NEWS:
* doc/misc/eww.texi (Basics): Improve the documentation of this
new feature.  (Bug#65346)

14 months agoAllow fetching URL at point without switching to it
Lin Sun [Wed, 16 Aug 2023 01:00:07 +0000 (01:00 +0000)]
Allow fetching URL at point without switching to it

* lisp/net/eww.el (eww-open-in-new-buffer):  Stay on current
buffer when invoked with prefix argument.  (Bug#65346)

14 months ago; Another improvement for documentation of pixelwise scrolling
Eli Zaretskii [Sun, 20 Aug 2023 08:09:40 +0000 (11:09 +0300)]
; Another improvement for documentation of pixelwise scrolling

* doc/lispref/commands.texi (Misc Events): More details about
pixelwise mouse-wheel scrolling events.  (Bug#65070)

14 months ago; Fix last change
Michael Albinus [Sun, 20 Aug 2023 07:47:00 +0000 (09:47 +0200)]
; Fix last change

14 months agoNew user option pcomplete-remote-file-ignore
Michael Albinus [Sun, 20 Aug 2023 07:41:07 +0000 (09:41 +0200)]
New user option pcomplete-remote-file-ignore

* etc/NEWS: Mention pcomplete-remote-file-ignore.

* lisp/pcomplete.el (pcomplete-remote-file-ignore):
New user option.
(pcomplete--entries): Use it.

* lisp/shell.el (shell-completion-vars):
Set 'pcomplete-remote-file-ignore'.

14 months agoFix libselinux object leaks
Po Lu [Sun, 20 Aug 2023 04:46:33 +0000 (12:46 +0800)]
Fix libselinux object leaks

* src/fileio.c (Fcopy_file, Fset_file_selinux_context): Call
freecon prior to signaling file errors.

14 months agoUpdate Android port
Po Lu [Sun, 20 Aug 2023 04:44:38 +0000 (12:44 +0800)]
Update Android port

* src/sfnt.c (sfnt_decompose_compound_glyph): New argument
GET_METRICS.  Call this function to retrieve glyph metrics used
to compute phantom points when a component glyph's anchor point
is one.
(sfnt_decompose_glyph, sfnt_build_glyph_outline): Plumb
GET_METRICS these two functions.
(sfnt_interpret_shc): Don't shift the provided reference point.
(sfnt_transform_f26dot6): Eschew looping through X and Y if no
offsets are provided.
(sfnt_interpret_compound_glyph_2): Discontinue initializing
phantom points here.
(sfnt_interpret_compound_glyph_1): Do not incorporate phantom
points into the ultimately produced glyph outline.  Correctly
provide for phantom childanchor points.
(sfnt_test_get_metrics, main): Update tests.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (struct sfntfont_get_glyph_outline_dcontext):
New fields `hmtx', `hhea' and `maxp'.
(sfntfont_get_metrics): New function.
(sfntfont_get_glyph_outline): Provide new tables and the new
callback function.

14 months agoSupport defun navigation for DEFUN in c-ts-mode (bug#64442)
Yuan Fu [Thu, 10 Aug 2023 21:27:29 +0000 (14:27 -0700)]
Support defun navigation for DEFUN in c-ts-mode (bug#64442)

Before this change, beginning/end-of-defun just ignores DEFUN in
c-ts-mode. After this change, beginning/end-of-defun can recognize
DEFUN, but a DEFUN definition is considered two defuns. Eg,
beginning/end-of-defun will stop at (1) (2) and (3) in the following
snippet:

(1)DEFUN ("treesit-node-parser",
       Ftreesit_node_parser, Streesit_node_parser,
       1, 1, 0,
       doc: /* Return the parser to which NODE belongs.  */)
  (Lisp_Object node)
(2){
  CHECK_TS_NODE (node);
  return XTS_NODE (node)->parser;
}
(3)

Ideally we want point to only stop at (1) and (3), but that'll be a
lot harder to do.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--defun-valid-p): Refactor to take in account of DEFUN body.
(c-ts-mode--emacs-defun-body-p): New function.
(c-ts-base-mode): Add DEFUN and DEFUN body to recognized types.
(c-ts-mode--emacs-defun-at-point): Now that we recognize both parts of
a DEFUN as defun, c-ts-mode--emacs-defun-at-point needs to be updated
to adapt to it.

14 months agoSkip hanging tests on Cygwin (bug#65325)
Ken Brown [Sat, 19 Aug 2023 18:18:57 +0000 (14:18 -0400)]
Skip hanging tests on Cygwin (bug#65325)

* test/lisp/server-tests.el (server-tests/can-create-frames-p):
Define to be nil on Cygwin unless Emacs has at least one of the
features gfilenotify, dbus, or threads.  This causes three tests
to be skipped.

* test/src/keyboard-tests.el (keyboard-unread-command-events):
Skip on Cygwin unless Emacs has at least one of the features
gfilenotify, dbus, or threads.

14 months agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 19 Aug 2023 17:32:29 +0000 (19:32 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

14 months agoExtend T
Michael Albinus [Sat, 19 Aug 2023 17:32:09 +0000 (19:32 +0200)]
Extend T

* lisp/net/tramp.el (tramp-completion-file-name-handler-alist):
Add `file-directory-p'.
(tramp-completion-handle-file-directory-p): New defun.

14 months agoAdd "lexical" LSP server for Elixir to Eglot
dalu [Thu, 17 Aug 2023 10:34:42 +0000 (18:34 +0800)]
Add "lexical" LSP server for Elixir to Eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Add lexical.
It does not support MS-Windows currently.  (Bug#65359)

Copyright-paperwork-exempt: yes

14 months agoFix touchpad scrolling on MS-Windows
Eli Zaretskii [Sat, 19 Aug 2023 14:01:18 +0000 (17:01 +0300)]
Fix touchpad scrolling on MS-Windows

* src/w32term.c (w32_construct_mouse_wheel): The number of lines
to scroll should always be positive in wheel-scroll events.
Whether to scroll up or down is encoded in the modifiers, which
produce either wheel-up or wheel-down event.  (Bug#65070)

* doc/lispref/commands.texi (Misc Events): Clarify the
documentation of 'wheel-up' and 'wheel-down' events.

14 months ago; * src/androidterm.c (android_text_to_string): Fix commentary.
Eli Zaretskii [Sat, 19 Aug 2023 11:29:25 +0000 (14:29 +0300)]
; * src/androidterm.c (android_text_to_string): Fix commentary.

14 months agoSimplify dictionary-close even more
Stefan Kangas [Sat, 19 Aug 2023 11:03:46 +0000 (13:03 +0200)]
Simplify dictionary-close even more

* lisp/net/dictionary.el (dictionary-close): Simplify.
Suggested by Philip Kaludercic <philipk@posteo.net>.

14 months agoRemove Emacs 24 compat code from reftex
Stefan Kangas [Sat, 19 Aug 2023 10:25:25 +0000 (12:25 +0200)]
Remove Emacs 24 compat code from reftex

* lisp/textmodes/reftex-index.el (reftex-display-index):
* lisp/textmodes/reftex-toc.el (reftex-toc): Assume that we have
'cursor-intangible-mode', which was added in Emacs 25.

14 months ago; Cleanup comments and doc strings in textconv.c
Eli Zaretskii [Sat, 19 Aug 2023 10:32:48 +0000 (13:32 +0300)]
; Cleanup comments and doc strings in textconv.c

* src/textconv.c (copy_buffer_text): Rename from 'copy_buffer'.
All callers changed.
(textconv_query, complete_edit_check, commit_text)
(finish_composing_text, set_composing_region)
(textconv_set_point_and_mark, delete_surrounding_text)
(request_point_update, textconv_barrier, get_extracted_text)
(get_surrounding_text, report_point_change)
(report_selected_window_change): Fix commentary.
(Fset_text_conversion_style, text-conversion-edits)
(overriding-text-conversion-style, text-conversion-face): Doc fix.

14 months agoRemove XEmacs compat code from reftex
Stefan Kangas [Sat, 19 Aug 2023 10:21:57 +0000 (12:21 +0200)]
Remove XEmacs compat code from reftex

* lisp/textmodes/reftex-toc.el (reftex-toc, reftex-toc-dframe-p)
(reftex-toc-revert, reftex-toc-toggle-dedicated-frame): Delete
XEmacs compat code.
* lisp/textmodes/reftex.el (reftex-window-height): Make into
obsolete function alias of 'window-height'.  Update all callers.
(reftex-create-customize-menu): Assume recent version of cus-edit.el.

14 months agoAdd command to start Emacs with specific packages
Philip Kaludercic [Tue, 15 Aug 2023 16:39:14 +0000 (18:39 +0200)]
Add command to start Emacs with specific packages

* lisp/emacs-lisp/package.el (package--dependencies): Extend function
to handle and return package descriptors.
(package-isolate): Add new command.
* etc/NEWS: Announce new command.

14 months agoFix order in which package-vc dependencies are resolved
Philip Kaludercic [Sat, 19 Aug 2023 09:27:02 +0000 (11:27 +0200)]
Fix order in which package-vc dependencies are resolved

* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
Avoid a type-mismatch when comparing two packages.  (Bug#65283)

14 months agoFix building of VC package manuals with relative org links/includes
Joseph Turner [Sat, 12 Aug 2023 08:40:07 +0000 (01:40 -0700)]
Fix building of VC package manuals with relative org links/includes

* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Ensure that default-default is the docs-directory around
org-export-to-file to ensure that links to relative files work
correctly.  (Bug#65243)

14 months agoFix the documentation of 'cl-flet'
Eli Zaretskii [Sat, 19 Aug 2023 08:50:09 +0000 (11:50 +0300)]
Fix the documentation of 'cl-flet'

* doc/misc/cl.texi (Function Bindings): Update the description.
(Bug#65362)

14 months agoSpecialize default-get for alist widgets (Bug#63290)
Mauro Aranda [Tue, 15 Aug 2023 22:35:39 +0000 (19:35 -0300)]
Specialize default-get for alist widgets (Bug#63290)

* lisp/wid-edit.el (widget-list-default-get)
(widget-alist-default-get): New functions.
(list, alist): Use it.
* test/lisp/cus-edit-tests.el (cus-edit-test-bug63290-option)
(cus-edit-test-bug63290-option-2): New test options.
(cus-edit-test-bug63290): New test.
* test/lisp/wid-edit-tests.el (widget-test-alist-default-value-1)
(widget-test-alist-default-value-2)
(widget-test-alist-default-value-3)
(widget-test-alist-default-value-4): New tests.

14 months agoAdapt test in minibuffer-tests.el
Michael Albinus [Sat, 19 Aug 2023 08:11:32 +0000 (10:11 +0200)]
Adapt test in minibuffer-tests.el

* test/lisp/minibuffer-tests.el (test-completion-all-sorted-completions):
Simplify function declaration.

14 months agoAdapt Tramp test
Michael Albinus [Sat, 19 Aug 2023 08:08:35 +0000 (10:08 +0200)]
Adapt Tramp test

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test44-user-group-ids): Extend test.

14 months agoSimplify use of Tramp messages
Michael Albinus [Sat, 19 Aug 2023 08:08:05 +0000 (10:08 +0200)]
Simplify use of Tramp messages

* doc/misc/tramp.texi (Traces and Profiles): Don't require a
minimum `tramp-verbose' level when `tramp-debug-command-messages'
is non-nil.

* lisp/net/tramp-message.el (tramp-debug-command-messages):
Adapt docstring.
(tramp-message, with-tramp-debug-message): Don't require a minimum
`tramp-verbose' level when `tramp-debug-command-messages' is non-nil.

14 months agoFix behavior of client frames when 'find-alternate-file' is used
Eli Zaretskii [Sat, 19 Aug 2023 07:34:07 +0000 (10:34 +0300)]
Fix behavior of client frames when 'find-alternate-file' is used

* lisp/files.el (find-alternate-file-dont-kill-client): New var.
(find-alternate-file): Bind it to a special value when invoking
kill-buffer-hook.
* lisp/server.el (server-delete-client): If NOFRAME is
'dont-kill-client', don't kill the client and its terminals.
(server-buffer-done): Pass 'find-alternate-file-dont-kill-client'
to 'server-delete-client'.  (Bug#65277)

14 months ago; * src/fileio.c (Fset_file_acl): Don't leak memory.
Eli Zaretskii [Sat, 19 Aug 2023 07:28:47 +0000 (10:28 +0300)]
; * src/fileio.c (Fset_file_acl): Don't leak memory.

14 months ago; * src/textconv.c (Fset_text_conversion_style): Fix typo.
Po Lu [Sat, 19 Aug 2023 05:37:55 +0000 (13:37 +0800)]
; * src/textconv.c (Fset_text_conversion_style): Fix typo.

14 months agoMake some file I/O operations more robust on Android
Po Lu [Sat, 19 Aug 2023 05:25:42 +0000 (13:25 +0800)]
Make some file I/O operations more robust on Android

* src/android.h (android_readlinkat): New prototype.
* src/androidvfs.c (struct android_vops): New function pointer
`readlink'.
(unix_vfs_ops, android_unix_readlink, afs_vfs_ops)
(android_afs_readlink, content_vfs_ops, android_content_mkdir)
(android_content_chmod, authority_vfs_ops)
(android_authority_readlink, saf_root_vfs_ops)
(android_saf_root_readlink, saf_tree_vfs_ops)
(android_saf_tree_readlink, saf_file_vfs_ops, saf_new_vfs_ops)
(android_saf_new_readlink, root_vfs_ops): Implement new
`readlink' vops for each vnode type.
(android_readlinkat): New function.

* src/fileio.c (Fcopy_file): Be more flexible about SELinux
errors under Android.
(emacs_readlinkat): Use `android_readlink' when built as
libemacs.so.

14 months ago; Remove set but unused variable
Po Lu [Sat, 19 Aug 2023 01:08:47 +0000 (09:08 +0800)]
; Remove set but unused variable

* src/androidvfs.c (android_check_content_access): Delete
`length'.

14 months agoDisable text conversion inside read-char-exclusive
Po Lu [Sat, 19 Aug 2023 00:51:44 +0000 (08:51 +0800)]
Disable text conversion inside read-char-exclusive

* src/lread.c (read_filtered_event): Disable text conversion if
merely ascii_required.  (bug#65370)

14 months agoDisable text conversion within read-char-from-minibuffer
Po Lu [Sat, 19 Aug 2023 00:48:20 +0000 (08:48 +0800)]
Disable text conversion within read-char-from-minibuffer

* lisp/subr.el (read-char-from-minibuffer): Disable text
conversion.  (bug#65370)
(y-or-n-p): Remove redundant binding of
`override-text-conversion-style', given that read-key already
disables text conversion.

* src/textconv.c (Fset_text_conversion_style): Always reset text
conversion for the selected frame in addition to any displaying
current_buffer.

14 months ago(Fmake_local_variable): Fix bug#65209
Stefan Monnier [Fri, 18 Aug 2023 23:22:17 +0000 (19:22 -0400)]
(Fmake_local_variable): Fix bug#65209

* src/data.c (Fmake_local_variable): Don't delegate to `Fset` since
they have to obey `let_shadows_buffer_binding_p` whereas we don't.

* test/src/data-tests.el (data-tests--bug65209): New var.
(data-tests-make-local-bug65209): New test.

14 months agoShow duration of compilation when it stops (bug#65251)
Mattias Engdegård [Fri, 18 Aug 2023 11:23:39 +0000 (13:23 +0200)]
Show duration of compilation when it stops (bug#65251)

Patch by Helmut Eller, lightly edited.

* lisp/progmodes/compile.el (compilation--start-time): New variable.
(compilation-start): Set it.
(compilation-handle-exit): Display duration.

14 months ago; * src/treesit.c (Ftreesit_node_parent): Improve commentary.
Eli Zaretskii [Fri, 18 Aug 2023 06:19:59 +0000 (09:19 +0300)]
; * src/treesit.c (Ftreesit_node_parent): Improve commentary.

14 months agoDon't disable terminfo on non-GUI Android builds
Po Lu [Fri, 18 Aug 2023 00:20:30 +0000 (08:20 +0800)]
Don't disable terminfo on non-GUI Android builds

* configure.ac (TERMINFO, LIBS_TERMCAP): Clear only if
REALLY_ANDROID.  (bug#65340)

14 months agoFix invocation with --debug-init and changes to debug-ignored-errors
Eli Zaretskii [Thu, 17 Aug 2023 18:35:20 +0000 (21:35 +0300)]
Fix invocation with --debug-init and changes to debug-ignored-errors

* src/eval.c (syms_of_eval) <debug-ignored-errors>: Mention in the
doc string the caveat with removing errors from the standard value
while invoking Emacs with --debug-init.

* lisp/startup.el (startup--load-user-init-file): If the user's
init files add to the value of 'debug-ignored-errors', make sure
the additions are preserved after restoring the value we reset
during loading the init file, if Emacs was invoked with
"--debug-init".  (Bug#65267)

14 months agoEscape braces in regexp in make-info-dir
Robert Pluim [Thu, 17 Aug 2023 10:15:44 +0000 (12:15 +0200)]
Escape braces in regexp in make-info-dir

This fixes a build failure on Alpine Linux.

* build-aux/make-info-dir (detexinfo): Escape the braces, since some
awk variants (such as BusyBox's) don't like regexp interval
specifications that aren't numbers.  Bug#65323

14 months agoIntroduce support for Desktop Notifications on Haiku
Po Lu [Thu, 17 Aug 2023 08:34:32 +0000 (08:34 +0000)]
Introduce support for Desktop Notifications on Haiku

* doc/lispref/os.texi (Desktop Notifications): Document Haiku
desktop notifications.

* etc/NEWS: Announce this change.

* lisp/org/org-clock.el (haiku-notifications-notify): New
declaration.
(org-show-notification): Employ that function.

* src/haiku_io.c (haiku_len) <NOTIFICATION_CLICK_EVENT>: Return
the length for this type of event.

* src/haiku_select.cc (my_team_id, be_display_notification): New
functions.

* src/haiku_support.cc (my_team_id, ArgvReceived): New
functions.

* src/haiku_support.h (enum haiku_event_type): New event type
NOTIFICATION_CLICK_EVENT.
(struct haiku_notification_click_event): New structure.

* src/haikuselect.c (haiku_notifications_notify_1)
(Fhaiku_notifications_notify): New functions.
(syms_of_haikuselect): Register new defsubr.

* src/haikuterm.c (haiku_read_socket):
* src/haikuselect.h:
* src/termhooks.h: Add new events for notification clicks on
Haiku.