]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months agoUse erc-display-message instead of erc-make-notice
F. Jason Park [Thu, 5 Oct 2023 03:39:03 +0000 (20:39 -0700)]
Use erc-display-message instead of erc-make-notice

* lisp/erc/erc-backend.el (erc-server-JOIN): Let `erc-display-message'
handle formatting instead of baking out a string.  The text ultimately
inserted remains unchanged, but forwarding the original `format-spec'
arguments now has the side effect of influencing text properties, which
conveys richer meaning for modules to act upon when doing things like
deciding whether to hide a given message.
* lisp/erc/erc.el (erc-cmd-IGNORE, erc-cmd-UNIGNORE,
erc--unignore-user, erc-cmd-IDLE, erc-cmd-BANLIST, erc-cmd-MASSUNBAN):
Use `erc-display-message' with `notice' for the TYPE parameter instead
of composing `erc-make-notice' and `erc-display-line'.

14 months agoAllow spoofing process marker in erc-display-line-1
F. Jason Park [Tue, 3 Oct 2023 05:59:22 +0000 (22:59 -0700)]
Allow spoofing process marker in erc-display-line-1

* lisp/erc/erc.el (erc--insert-marker): New internal variable for
overriding `erc-insert-marker' when displaying messages at a
non-default location in the buffer.
(erc-display-line-1): Favor `erc--insert-marker' over
`erc-insert-marker' when non-nil.
; * test/lisp/erc/resources/base/assoc/multi-net/barnet.eld: Timeouts.
; * test/lisp/erc/resources/base/assoc/multi-net/foonet.eld: Timeouts.
; * test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld: Timeouts.
; * test/lisp/erc/resources/base/netid/bouncer/foonet-drop.eld: Timeouts.
; * test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld: Timeouts.
; * test/lisp/erc/resources/sasl/scram-sha-1.eld: Timeouts.
; * test/lisp/erc/resources/sasl/scram-sha-256.eld: Timeouts.

14 months agoSort and dedupe when loading modules in erc-open
F. Jason Park [Sat, 7 Oct 2023 00:34:04 +0000 (17:34 -0700)]
Sort and dedupe when loading modules in erc-open

* doc/misc/erc.texi: Add new subheading "Module Loading" under the
"Modules" chapter.
* lisp/erc/erc.el (erc--sort-modules): New utility function to sort
and dedupe modules.
(erc-modules): In `custom-set' function, factor out collation into
separate utility `erc--sort-modules'.
(erc-update-modules): Call `erc--update-modules' with an argument, the
current value of `erc-modules'.
(erc--aberrant-modules): New variable, a list of symbols whose modules
ERC suspects of being incorrectly defined.
(erc--warn-about-aberrant-modules): New function to print an error
message and emit a warning prior to connecting when
`erc--aberrant-modules' is non-nil.
(erc--find-mode): Make heuristic more robust by always checking for a
mode activation command rather than just a state variable.  This fixes
a compatibility bug, new in 5.6, affecting third-party modules that
autoload module definitions instead of their corresponding
mode-activation commands.
(erc--update-modules): Add new positional argument `modules'.
(erc--setup-buffer-hook): Add new default member,
`erc--warn-about-aberrant-modules'.
(erc-open): Pass sorted `erc-modules' to `erc--update-modules'.
* test/lisp/erc/erc-tests.el (erc--sort-modules): New test.
(erc-tests--update-modules): New fixture.
(erc--update-modules): Remove and rework as three separate tests
dedicated to specific contexts.  The existing one had poor coverage
and was difficult, if not impossible, to follow.
(erc--update-modules/unknown, erc--update-modules/local,
erc--update-modules/realistic): New tests.  (Bug#57955)

14 months agoHonor nil values in erc--restore-initialize-priors
F. Jason Park [Thu, 5 Oct 2023 07:16:46 +0000 (00:16 -0700)]
Honor nil values in erc--restore-initialize-priors

* lisp/erc/erc.el (erc--restore-initialize-priors): Don't produce
invalid "empty" `setq' form when parameter VARS contains defaults that
initialize to nil.  This function is mainly used by local modules,
which were first made usable in ERC 5.5 (bug#57955).
* test/lisp/erc/erc-tests.el (erc--restore-initialize-priors): Fix
expected expansion, which is now slightly leaner.  (Bug#60936)

14 months agoSkip post-minibuffer restore in erc-scrolltobottom-all
F. Jason Park [Wed, 11 Oct 2023 01:14:53 +0000 (18:14 -0700)]
Skip post-minibuffer restore in erc-scrolltobottom-all

* etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in
entry for module `scrolltobottom'.
* lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of
abandoned option `erc-scrolltobottom-relaxed'.
(erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed'
by recognizing a third value state, `relaxed'.  A separate option
would make more sense if other options also depended on
`erc-scrolltobottom-all'.
(erc-scrolltobottom-relaxed): Remove redundant option, which was to be
new in ERC 5.6.
(erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user
attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not
supported.
(erc--scrolltobottom-relaxed-commands,
erc--scrolltobottom-post-force-commands,
erc--scrolltobottom-relaxed-skip-commands): Remove unused variables.
(erc--scrolltobottom-on-pre-command,
erc--scrolltobottom-on-pre-command-relaxed,
erc--scrolltobottom-on-post-command-relaxed): Remove unused functions.
(erc--scrolltobottom-on-post-command): Remove conditional branch for
dealing with a non-nil `erc--scrolltobottom-window-info'.
(erc--scrolltobottom-setup): Convert from generic to normal function
and remove setup and teardown for unused hooks.  Set variable
`read-minibuffer-restore-windows' locally when option
`erc-scrolltobottom-all' is non-nil.
(erc--scrolltobottom-on-pre-insert): Replace reference to subsumed
option `erc-scrolltobottom-relaxed' with new value `relaxed' for
existing option `erc-scrolltobottom-all'.
* test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
(erc-scenarios-scrolltobottom--relaxed): Replace option
`erc-scrolltobottom-relaxed' with new value `relaxed' for
`erc-scrolltobottom-all'.  (Bug#64855)

14 months agoFix `ls-lisp-verbosity` custom type
Mattias Engdegård [Fri, 13 Oct 2023 14:36:46 +0000 (16:36 +0200)]
Fix `ls-lisp-verbosity` custom type

* lisp/ls-lisp.el (ls-lisp-verbosity): Include `modes` in the type
and doc string.

14 months agoFix c-in-knr-argdecl to avoid false recognition of K&R
Alan Mackenzie [Fri, 13 Oct 2023 14:27:18 +0000 (14:27 +0000)]
Fix c-in-knr-argdecl to avoid false recognition of K&R

In the OP's test case, the type of a declaration was a macro
with parentheses, which confused c-in-knr-argdecl.

* lisp/progmodes/cc-engine.el (c-in-knr-argdecl): Amend this
function to return nil if a "parameter declaration" can't be
parsed as a declaration.

14 months agoMerge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:18:06 +0000 (16:18 +0200)]
Merge from origin/emacs-29

c8ea14e7825 Handle quoted tilde in Tramp
30239759ee4 ; Set maintainer for elint.el to emacs-devel
eedd9db6190 Update to Org 9.6.10

# Conflicts:
# lisp/net/tramp-gvfs.el

14 months ago; Merge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:16:22 +0000 (16:16 +0200)]
; Merge from origin/emacs-29

The following commit was skipped:

73ccd9d2959 Don't call font-lock-mode in treesit-major-mode-setup (bu...

14 months agoMerge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:16:19 +0000 (16:16 +0200)]
Merge from origin/emacs-29

53292c5d818 Fix treesit-query-validate for string input (bug#66400)
81a0c1ed2e4 ; Improve documentation of VC commands
0590e3e69a9 Recommend `M-x man` in woman.el docs
809da7fc9a1 ; * doc/lispref/processes.texi (Process Buffers): More ac...
8f23a02a9ea Fix updating process-mark position in 'set-process-buffer'

14 months ago; Merge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:16:11 +0000 (16:16 +0200)]
; Merge from origin/emacs-29

The following commit was skipped:

247743bd1e9 ; * lisp/treesit.el (treesit-language-at-point-function):...

14 months agoHandle quoted tilde in Tramp
Michael Albinus [Fri, 13 Oct 2023 14:09:51 +0000 (16:09 +0200)]
Handle quoted tilde in Tramp

* lisp/net/tramp.el (tramp-handle-expand-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
* lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Handle quoted tilde.  (Bug#65685)

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-tilde):
New test.

14 months agoAdd convenience wrapper for regexp disassembly
Mattias Engdegård [Fri, 13 Oct 2023 13:21:26 +0000 (15:21 +0200)]
Add convenience wrapper for regexp disassembly

* lisp/emacs-lisp/disass.el (re-disassemble): New.
* etc/NEWS: Describe the new function instead of the internal
`re--describe-compiled`.

14 months agoverilog-mode.el: remove impossible cond clause
Mattias Engdegård [Fri, 13 Oct 2023 13:12:03 +0000 (15:12 +0200)]
verilog-mode.el: remove impossible cond clause

* lisp/progmodes/verilog-mode.el (verilog-set-auto-endcomments):
Remove can't-happen clause.

14 months agoSeparate `docstrings-wide` warning identifier
Mattias Engdegård [Fri, 13 Oct 2023 12:31:18 +0000 (14:31 +0200)]
Separate `docstrings-wide` warning identifier

This allows the docstring line width warning to be disabled without
also disabling the one checking for curly quotes etc.

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types)
(byte-compile-warnings, byte-compile-docstring-style-warn):
Add `docstrings-wide`.
* etc/NEWS: Annonuce.

14 months agoClarify java/INSTALL
Po Lu [Fri, 13 Oct 2023 04:57:30 +0000 (12:57 +0800)]
Clarify java/INSTALL

* java/INSTALL: Correct erroneous include exports and also
introduce those omitted within patches to external libraries.
(bug#66507)

14 months agoTry harder to generate tombstones upon emacs_abort
Po Lu [Fri, 13 Oct 2023 03:57:46 +0000 (11:57 +0800)]
Try harder to generate tombstones upon emacs_abort

* src/android.c (HAS_BUILTIN_TRAP): New macro definition.
(emacs_abort) [HAS_BUILTIN_TRAP]: Call __builtin_trap to abort,
in place of dereferencing NULL.

* src/androidterm.c (android_draw_fringe_bitmap): Correct
comment transplanted from X code.

14 months agoReset the Eshell prompt when signaling with no foreground process
Jim Porter [Fri, 13 Oct 2023 01:23:46 +0000 (18:23 -0700)]
Reset the Eshell prompt when signaling with no foreground process

This fixes a small regression from commit eef32d13da5.

* lisp/eshell/esh-proc.el (eshell-reset): Declare here.
(eshell-reset-after-proc): Move implementation to...
(eshell--reset-after-signal): ... here...
(eshell-interrupt-process, eshell-kill-process eshell-quit-process)
(eshell-stop-process, eshell-continue-process): ... and call it.

14 months agoFix a defcustom :type
Mauro Aranda [Thu, 12 Oct 2023 13:17:57 +0000 (10:17 -0300)]
Fix a defcustom :type

* lisp/progmodes/ruby-mode.el (ruby-insert-encoding-magic-comment):
Allow always-utf8.  (Bug#66498)

14 months ago; Correct typo
Po Lu [Thu, 12 Oct 2023 14:04:34 +0000 (22:04 +0800)]
; Correct typo

* etc/NEWS: Fix typo.

14 months agoEnable highlighting Gud execution lines without hl-line-mode
Po Lu [Thu, 12 Oct 2023 13:46:54 +0000 (21:46 +0800)]
Enable highlighting Gud execution lines without hl-line-mode

* doc/emacs/building.texi (Debugger Operation): Mention two new
options and the relationship between Gud and HL Line Mode.

* etc/NEWS (Editing Changes in Emacs 30.1): Mention the new
option.

* lisp/progmodes/gud.el (gud-highlight-current-line-overlay):
New variable.
(gud-sentinel) <signal, exit>: Delete that overlay if set.
(gud-highlight-current-line, gud-highlight-current-line-face):
New user options.
(gud-display-line): Create and move an overlay without employing
hl-line-mode, if so enjoined by the user.

14 months ago; Set maintainer for elint.el to emacs-devel
Stefan Kangas [Thu, 12 Oct 2023 11:23:38 +0000 (13:23 +0200)]
; Set maintainer for elint.el to emacs-devel

* lisp/emacs-lisp/elint.el: Set maintainer to emacs-devel.

14 months agoNew filenotify tests
Michael Albinus [Thu, 12 Oct 2023 09:02:53 +0000 (11:02 +0200)]
New filenotify tests

* src/inotify.c (Finotify_watch_list, Finotify_allocated_p):
Fix argument list.

* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Use `skip-when'.
(file-notify-test12-unmount, file-notify-test12-unmount-remote):
New tests.

14 months agoRespond to JNI errors around drawing operations
Po Lu [Thu, 12 Oct 2023 00:43:56 +0000 (08:43 +0800)]
Respond to JNI errors around drawing operations

* src/android.c (android_fill_polygon, android_draw_rectangle)
(android_draw_point, android_draw_line, android_lock_bitmap):
Check or clear errors around potential JNI errors; the penalty
incurred to performance is not as significant as was expected.

14 months agoFix behavior of Eshell prompt when yanking output into it
Jim Porter [Wed, 11 Oct 2023 18:38:27 +0000 (11:38 -0700)]
Fix behavior of Eshell prompt when yanking output into it

* lisp/eshell/esh-util.el (eshell--unmark-string-as-output): New
function...

* lisp/eshell/esh-mode.el (eshell-mode): ... use it.

* test/lisp/eshell/eshell-tests.el (eshell-test/yank-output): New test
(bug#66469).

14 months agoDocument cl-print.el in cl.texi.
Alan Mackenzie [Wed, 11 Oct 2023 15:03:43 +0000 (15:03 +0000)]
Document cl-print.el in cl.texi.

* doc/misc/cl.texi: (Printing): New chapter which documents
cl-print.el.

* NEWS (cl-print): Add "+++" markings to all the subitems,
which have now been documented.

14 months agoIn cl-prin1, enable raw printing for a byte-compiled function
Alan Mackenzie [Wed, 11 Oct 2023 13:26:01 +0000 (13:26 +0000)]
In cl-prin1, enable raw printing for a byte-compiled function

* lisp/emacs-lisp/cl-print.el (cl-print-compiled): document the
new option `raw'.
(cl-print-object/compiled-function): when cl-print-compiled is
`raw', just print the function using `prin1'.  Apply a button
to this output which, when activated disassembles the function.

* etc/NEWS (cl-print): Add an entry for this new feature.

14 months agoRemedy typo in android.texi
Po Lu [Wed, 11 Oct 2023 10:48:27 +0000 (18:48 +0800)]
Remedy typo in android.texi

* doc/emacs/android.texi (Android Fonts): Replace @xref with
@pxref.

14 months agoUpdate Android keysym list
Po Lu [Wed, 11 Oct 2023 08:58:01 +0000 (16:58 +0800)]
Update Android keysym list

* src/keyboard.c (lispy_function_keys): Introduce entries for
scroll lock, num lock, and input method keys.

14 months ago* lisp/progmodes/project.el (project-mode-line-face): New variable.
Juri Linkov [Wed, 11 Oct 2023 06:27:28 +0000 (09:27 +0300)]
* lisp/progmodes/project.el (project-mode-line-face): New variable.

(project-mode-line-format): Use it (bug#66317).

14 months agoFix erc-server-prevent-duplicates :type
Mauro Aranda [Tue, 10 Oct 2023 23:22:06 +0000 (20:22 -0300)]
Fix erc-server-prevent-duplicates :type

* lisp/erc/erc-backend.el (erc-server-prevent-duplicates): Change
:type to allow a variable-length list of strings.  (Bug#66456)

14 months agoRevert commits dafa6d6badd6 and 72c45fa9109a
Jim Porter [Wed, 6 Sep 2023 01:27:21 +0000 (18:27 -0700)]
Revert commits dafa6d6badd6 and 72c45fa9109a

These were there to work around deficiencies in how Eshell produces
completions for 'pcomplete-argument' (Eshell passed various non-string
objects to Pcomplete, which broke things).  Now, Eshell always returns
a stringified form of the argument, with the original value stored via
the text property 'pcomplete-arg-value'.

* lisp/pcomplete.el (pcomplete-arg): Revert changes back to a simpler
form.

14 months agoFile notifications report unmount events (bug#66381)
Michael Albinus [Tue, 10 Oct 2023 17:51:22 +0000 (19:51 +0200)]
File notifications report unmount events (bug#66381)

* doc/lispref/os.texi (File Notifications): Unmounting a watched
filesystem is reported now.

* etc/NEWS: File notifications report unmount events now.
Fix typos.

* lisp/filenotify.el (file-notify--callback-inotify)
(file-notify--add-watch-inotify): Handle `unmount'.
(file-notify--callback-kqueue, file-notify--add-watch-kqueue):
Handle `revoke'.
(file-notify--callback-gfilenotify): Handle `unmounted'.
(file-notify-callback): Handle `unmount' and `unmounted'.
(file-notify--add-watch-inotify):

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
Handle `unmounted'.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Handle `unmount' and `unmounted'.

* src/gfilenotify.c (dir_monitor_callback): Handle Qunmounted.

* src/inotify.c (symbol_to_inotifymask): Handle IN_IGNORED and
IN_UNMOUNT.

* src/kqueue.c (kqueue_callback, Fkqueue_add_watch):
Handle NOTE_REVOKE.
(Fkqueue_add_watch): Adapt docstring.
(syms_of_kqueue): Declare `revoke.

14 months ago; Fix spelling of my name in all source files
Ulrich Müller [Tue, 10 Oct 2023 14:31:53 +0000 (16:31 +0200)]
; Fix spelling of my name in all source files

14 months ago; * lisp/calc/calc-units.el (math-standard-units): Doc improvement.
Mattias Engdegård [Tue, 10 Oct 2023 13:18:52 +0000 (15:18 +0200)]
; * lisp/calc/calc-units.el (math-standard-units): Doc improvement.

14 months ago; * lisp/calc/calc-units.el: Fix spelling of my name.
Ulrich Müller [Tue, 10 Oct 2023 09:59:15 +0000 (11:59 +0200)]
; * lisp/calc/calc-units.el: Fix spelling of my name.

14 months agoUpdate astronomical length units in Calc
Ulrich Müller [Tue, 10 Oct 2023 09:58:03 +0000 (11:58 +0200)]
Update astronomical length units in Calc

* lisp/calc/calc-units.el (math-standard-units): Update the
astronomical unit and the parsec, using their definitions by the
International Astronomical Union.

14 months agoCorrect temperature names in Calc
Mattias Engdegård [Tue, 10 Oct 2023 12:20:05 +0000 (14:20 +0200)]
Correct temperature names in Calc

* doc/misc/calc.texi (The Units Table, Predefined Units):
* lisp/calc/calc-units.el (math-standard-units):
It's just Kelvin, not degree Kelvin.

14 months ago* lisp/calc/calc-units.el (math-standard-units): Document.
Mattias Engdegård [Tue, 10 Oct 2023 11:50:44 +0000 (13:50 +0200)]
* lisp/calc/calc-units.el (math-standard-units): Document.

Some guesswork, but at least it helps someone trying to make sense of
it next time.

14 months ago* doc/emacs/android.texi (Android Software): Fix typo.
Po Lu [Tue, 10 Oct 2023 12:13:50 +0000 (20:13 +0800)]
* doc/emacs/android.texi (Android Software): Fix typo.

14 months agoImprove documentation of 'project-mode-line'
Eli Zaretskii [Tue, 10 Oct 2023 11:46:08 +0000 (14:46 +0300)]
Improve documentation of 'project-mode-line'

* etc/NEWS:
* doc/emacs/maintaining.texi (Projects):
* lisp/progmodes/project.el (project-mode-line): Improve the
documentation of 'project-mode-line'.  (Bug#66317)

14 months agoRevise Android documentation
Po Lu [Tue, 10 Oct 2023 11:34:56 +0000 (19:34 +0800)]
Revise Android documentation

* doc/emacs/android.texi (Android Environment, Android Windowing)
(Android Fonts, Android Troubleshooting, Android Software):
Correct typos and improve wording.

14 months agoImprove documentation of inhibit-double-buffering
Po Lu [Tue, 10 Oct 2023 08:58:21 +0000 (16:58 +0800)]
Improve documentation of inhibit-double-buffering

* doc/lispref/frames.texi (Management Parameters): Reword joke
and mention the precise circumstances where
inhibit-double-double-buffering is useful.

14 months agoImplement frame restacking under Android
Po Lu [Tue, 10 Oct 2023 05:11:14 +0000 (13:11 +0800)]
Implement frame restacking under Android

* java/org/gnu/emacs/EmacsActivity.java (invalidateFocus1):
Synchronize with window.children for iteration through it.

* java/org/gnu/emacs/EmacsService.java (queryTree): Synchronize
with windowList for iteration through it.

* java/org/gnu/emacs/EmacsView.java (moveChildToBack): Correct
formatting mistake.
(moveAbove, moveBelow): New functions.

* java/org/gnu/emacs/EmacsWindow.java (destroyHandle, reparentTo)
(raise, lower): Remedy synchronization blunders.
(reconfigure): New function.

* src/android.c (android_init_emacs_window): Link with
`reconfigure'.
(android_reconfigure_wm_window): New wrapper function.

* src/androidfns.c (android_frame_restack): New function.
(Fandroid_frame_restack): Properly implement this function and
expunge outdated comment.

* src/androidgui.h (enum android_stack_mode)
(enum android_window_changes): New enumerators.

14 months agoUpdate to Org 9.6.10
Kyle Meyer [Tue, 10 Oct 2023 03:47:52 +0000 (23:47 -0400)]
Update to Org 9.6.10

14 months agoNew option 'project-mode-line' to show project name on mode line (bug#66317)
Juri Linkov [Mon, 9 Oct 2023 18:09:03 +0000 (21:09 +0300)]
New option 'project-mode-line' to show project name on mode line (bug#66317)

* lisp/bindings.el (standard-mode-line-format):
Add '(project-mode-line project-mode-line-format)'.

* lisp/progmodes/project.el (project-mode-line): New user option.
(project-menu-entry, project-mode-line-map): New variables.
(project-mode-line-format): New variable.
(project-mode-line-format): New function.

14 months ago* lisp/progmodes/xref.el: Show the number of matches on mode-line (bug#66332)
Juri Linkov [Mon, 9 Oct 2023 18:03:03 +0000 (21:03 +0300)]
* lisp/progmodes/xref.el: Show the number of matches on mode-line (bug#66332)

(xref-num-matches-found, xref-num-matches-face, xref-mode-line-matches):
New variables.
(xref--show-xref-buffer): Set xref-num-matches-found to the length of xrefs,
and buffer-local mode-line-process to xref-mode-line-matches.

14 months ago; cperl-mode.el: Don't override fontificaton in comments.
Harald Jörg [Mon, 9 Oct 2023 15:49:15 +0000 (17:49 +0200)]
; cperl-mode.el: Don't override fontificaton in comments.

* lisp/progmodes/cperl-mode.el (cperl-init-faces): Reorder the
matchers for fontification of array and hash elements and keys so
that they don't override comment and string fontification (Bug#66145).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-66145):
New test for all combinations of sigils and brackets/braces to
verify that strings and comments are left untouched.  This test
also works for perl-mode which has always done it correctly.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-66145.pl: New
resource file for the above test.

14 months agoDon't allow Services entries in pop-up menus on macOS (bug#66420)
Mattias Engdegård [Mon, 9 Oct 2023 15:18:17 +0000 (17:18 +0200)]
Don't allow Services entries in pop-up menus on macOS (bug#66420)

* src/nsmenu.m ([EmacsMenu runMenuAt:forFrame:keymaps:]):
Prevent the system from adding context menu plug-ins
(Services entries or sub-menu) to all our pop-up menus.

14 months ago; LLDB synthetic child provider
Gerd Möllmann [Mon, 9 Oct 2023 13:20:37 +0000 (15:20 +0200)]
; LLDB synthetic child provider

14 months agoImprove formatting of bindings in 'help-quick'
Philip Kaludercic [Mon, 9 Oct 2023 08:23:36 +0000 (10:23 +0200)]
Improve formatting of bindings in 'help-quick'

* lisp/help.el (help-quick): Prevent format's padding from extending
text properties beyond the initial string containing the key binding.

14 months agoUse text-mode as default value for 'rcirc-multiline-major-mode'
Philip Kaludercic [Mon, 9 Oct 2023 08:10:47 +0000 (10:10 +0200)]
Use text-mode as default value for 'rcirc-multiline-major-mode'

* lisp/net/rcirc.el (rcirc-multiline-major-mode): Update default value.

14 months agoDon't call font-lock-mode in treesit-major-mode-setup (bug#66223)
Yuan Fu [Wed, 27 Sep 2023 07:21:40 +0000 (00:21 -0700)]
Don't call font-lock-mode in treesit-major-mode-setup (bug#66223)

* lisp/treesit.el (treesit-major-mode-setup): Remove.

(cherry picked from commit a3a840c80a217db7d4d125c667ff7d4946507fbb)

14 months agoFix treesit-query-validate for string input (bug#66400)
nverno [Sun, 8 Oct 2023 02:36:44 +0000 (19:36 -0700)]
Fix treesit-query-validate for string input (bug#66400)

* lisp/treesit.el (treesit-query-validate): Don't expand if QUERY is
string.

14 months agoUpdate default font substitution list
Po Lu [Mon, 9 Oct 2023 01:30:56 +0000 (09:30 +0800)]
Update default font substitution list

* src/sfntfont-android.c (init_sfntfont_android): Account for
Android 4.x not distributing Noto Serif.

14 months agoMake package-vc-install-from-checkout NAME argument optional
Joseph Turner [Sun, 8 Oct 2023 21:29:23 +0000 (23:29 +0200)]
Make package-vc-install-from-checkout NAME argument optional

* lisp/emacs-lisp/package-vc.el (package-vc-install-from-checkout):
Allow nil NAME; update documentation.  (Bug#66393)

14 months agoDo not scrape :ignored-files for dependencies
Philip Kaludercic [Tue, 3 Oct 2023 08:08:52 +0000 (10:08 +0200)]
Do not scrape :ignored-files for dependencies

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): If a file
matches the ignored packages in :ignored-files, do not install any
dependencies it lists.

14 months agoRename 'vc-switch-backend' to 'vc-change-backend'
Philip Kaludercic [Tue, 3 Oct 2023 07:55:12 +0000 (09:55 +0200)]
Rename 'vc-switch-backend' to 'vc-change-backend'

* etc/NEWS: Mention the change
* lisp/vc/vc.el (vc-switch-backend): Rename and unobsolete.
(vc-transfer-file): Use new name.  (bug#50344)

14 months ago; Improve documentation of VC commands
Eli Zaretskii [Sun, 8 Oct 2023 08:29:29 +0000 (11:29 +0300)]
; Improve documentation of VC commands

* doc/emacs/maintaining.texi (Basic VC Editing)
(VC With A Merging VCS, VC With A Locking VCS, Advanced C-x v v)
(Registering, Pulling / Pushing, Merging): Improve wording,
accuracy, and indexing.

* lisp/vc/vc.el (vc-next-action): Doc fix.

14 months agoPort arc to Android
Po Lu [Sun, 8 Oct 2023 02:42:47 +0000 (10:42 +0800)]
Port arc to Android

* lisp/arc-mode.el (archive-zip-extract): Default to -q and -p
when the Android system unzip is being employed.

14 months agoIntroduce a tool bar for dictionary mode
Po Lu [Sun, 8 Oct 2023 01:13:11 +0000 (09:13 +0800)]
Introduce a tool bar for dictionary mode

* lisp/doc-view.el (doc-view-minor-mode-menu): Correct typo in
edit mode menu.

* lisp/net/dictionary.el (dictionary-mode-menu): New menu.
(dictionary-tool-bar-map): New variable; derive menu bar entries
from the dictionary-mode-menu.
(dictionary-mode): Set the tool bar map to
dictionary-tool-bar-map.

14 months agoRecommend `M-x man` in woman.el docs
Stefan Kangas [Sat, 7 Oct 2023 16:29:07 +0000 (18:29 +0200)]
Recommend `M-x man` in woman.el docs

* lisp/woman.el (Commentary, woman): Recommend using 'M-x man' where
available.  The added sentence is copied from the emacs manual.
Ref: https://lists.gnu.org/r/emacs-devel/2023-10/msg00090.html

14 months ago; * doc/lispref/processes.texi (Process Buffers): More accurate wording.
Eli Zaretskii [Sat, 7 Oct 2023 16:09:58 +0000 (19:09 +0300)]
; * doc/lispref/processes.texi (Process Buffers): More accurate wording.

14 months agoFix updating process-mark position in 'set-process-buffer'
Eli Zaretskii [Sat, 7 Oct 2023 14:58:54 +0000 (17:58 +0300)]
Fix updating process-mark position in 'set-process-buffer'

* src/process.c (update_process_mark): Update marker position only
if P's process-mark is not already associated with P's buffer.
(Bug#66313)

14 months ago; Produce fewer $nnn vars in LLDB
Gerd Möllmann [Sat, 7 Oct 2023 12:57:52 +0000 (14:57 +0200)]
; Produce fewer $nnn vars in LLDB

14 months ago; * lisp/treesit.el (treesit-language-at-point-function): Fix doc.
Yuan Fu [Wed, 27 Sep 2023 06:15:14 +0000 (23:15 -0700)]
; * lisp/treesit.el (treesit-language-at-point-function): Fix doc.

(cherry picked from commit 07ede5e92a58ac3739a0e5b0c9025bee2f75c5ba)
(Bug#66183)

14 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 7 Oct 2023 07:48:00 +0000 (03:48 -0400)]
Merge from origin/emacs-29

a74e51cfd15 Fix a defcustom :type
c27b90d04bf Fix 'ido--ffap-find-file'
1594d5f17ad Fix setting the pipe capacity for subprocesses
aad8b5d78f3 Handle LANG on macOS differently (bug#65908)

# Conflicts:
# src/process.c

14 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 7 Oct 2023 07:46:50 +0000 (03:46 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

6cf7e676e9d Silence macro expansion during completion at point

14 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 7 Oct 2023 07:46:48 +0000 (03:46 -0400)]
Merge from origin/emacs-29

e9b88f61ccc Fix a defcustom :type
3216cd96952 Fix pulse-flag :type
2065ab5562e Fix defcustoms in timeclock.el
bdd30132496 ; * lisp/image-mode.el (image-mode-to-text, image-mode-as...
5c2d9ae48ed ; * lisp/image-mode.el: Fix typos in doc strings (bug#663...
fa0d3f45aeb ; Improve wording of last change
3ef259e28a8 Improve documentation of `ns-use-proxy-icon`
712505a82b9 Document assigning libraries to packages in make-tarball.txt
6bdc5cfe384 Doc fix; more consistently refer to "text terminals"
d210d761b19 ; Fix doc strings of overlay-arrow variables
4fd00ff1f7e Fix defcustoms in type-break.el (Bug#66210)
47770b0eca4 Fix term-scroll-to-bottom-on-output :type
f8bdc8dff0b ; Normalize GNU ELPA :core package statements
63ec6d998d4 ; * doc/emacs/custom.texi (Early Init File): Improve inde...
a4185f87bd0 ; Silence macOS 14 warning
d9d6e14a698 ; * lisp/vc/vc.el (vc-next-action): Improve commentary.
d558f38fe5c ; * lisp/emacs-lisp/let-alist.el (let-alist): Fix quoting...
71feee79309 Doc fix in let-alist for keys with nil value
72cc9cf2cde ; Fix typos

14 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 7 Oct 2023 07:46:47 +0000 (03:46 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

356e79e47fc Fix tramp-test.el (don't merge with master)
34550ea8ce4 Improve Emacs 30 compatibility in tramp-tests.el (don't m...

14 months agoFix a defcustom :type
Mauro Aranda [Fri, 6 Oct 2023 20:02:37 +0000 (17:02 -0300)]
Fix a defcustom :type

* lisp/cedet/srecode/map.el (srecode-map-save-file): Expand :type to
allow nil.  (Bug#66377)

14 months agoFix 'ido--ffap-find-file'
Eli Zaretskii [Sat, 7 Oct 2023 06:46:04 +0000 (09:46 +0300)]
Fix 'ido--ffap-find-file'

* lisp/ido.el (ido--ffap-find-file): Make the signature consistent
with that of 'find-file', and pass the optional second argument to
'find-file'.  (Bug#66382)

14 months agoRevise font family translation lists under Android
Po Lu [Sat, 7 Oct 2023 01:25:23 +0000 (09:25 +0800)]
Revise font family translation lists under Android

* doc/emacs/android.texi (Android Environment): Revise paragraph
illustrating the startup notification.
(Android Fonts): Mention font family replacement.

* src/sfntfont-android.c (init_sfntfont_android): Translate
DejaVu Serif to either Droid Serif or Noto Serif.

14 months ago; Configure ObjC for clang-format
Gerd Möllmann [Fri, 6 Oct 2023 14:52:19 +0000 (16:52 +0200)]
; Configure ObjC for clang-format

14 months agoFix setting the pipe capacity for subprocesses
Eli Zaretskii [Fri, 6 Oct 2023 05:31:59 +0000 (08:31 +0300)]
Fix setting the pipe capacity for subprocesses

* src/process.c (create_process) [F_SETPIPE_SZ]: Set the pipe
capacity only if the required read-process-max is larger than the
default capacity of the pipe.  (Bug#66288)

14 months agoRevert slurp_image extraction for svg_load
Stefan Kangas [Thu, 5 Oct 2023 23:54:12 +0000 (01:54 +0200)]
Revert slurp_image extraction for svg_load

* src/image.c (svg_load): Inline slurp_image code again, as it didn't
build in its current form.
Reported by Andreas Schwab <schwab@linux-m68k.org>.

14 months agoExtract function slurp_image from image loading
Stefan Kangas [Thu, 5 Oct 2023 21:07:39 +0000 (23:07 +0200)]
Extract function slurp_image from image loading

* src/image.c (slurp_image): New function...
(xbm_load, xpm_load, pbm_load, webp_load, svg_load): ...extracted from
here.

14 months agoHandle LANG on macOS differently (bug#65908)
Gerd Möllmann [Thu, 5 Oct 2023 18:41:54 +0000 (20:41 +0200)]
Handle LANG on macOS differently (bug#65908)

* src/nsterm.m (ns_init_locale): If LANG is set, try to use that,
otherwise try to deduce what LANG should be.  Check is the result is
valid, and use LANG="en_US.UTF-8" if not.

14 months agoSet buffers-menu-max-size to 15 unconditionally
Stefan Kangas [Thu, 5 Oct 2023 18:10:16 +0000 (20:10 +0200)]
Set buffers-menu-max-size to 15 unconditionally

* lisp/menu-bar.el (buffers-menu-max-size): Set the default value to
15 unconditionally.  (Bug#64398)

14 months agoSilence macro expansion during completion at point
Jens Schmidt [Fri, 29 Sep 2023 20:04:43 +0000 (22:04 +0200)]
Silence macro expansion during completion at point

* lisp/emacs-lisp/macroexp.el (macroexp-inhibit-compiler-macros): Add
variable.
(macroexp--compiler-macro): Inspect that new variable and, if it is
non-nil, return the input form unchanged.
* lisp/progmodes/elisp-mode.el (elisp--local-variables): Silence
messages.  Avoid compiler macros.  (Bug#58148)

14 months agoSilence macro expansion during completion at point
Jens Schmidt [Tue, 26 Sep 2023 20:26:15 +0000 (22:26 +0200)]
Silence macro expansion during completion at point

To keep risk in the current release branch low, do not avoid compiler
macros as suggested by Stefan in the bug, but rather suppress all errors.

* lisp/progmodes/elisp-mode.el (elisp--local-variables): Silence
messages.  Suppress all errors during macro expansion.  (Bug#58148)

Do not merge to master.

14 months agoFix a defcustom :type
Mauro Aranda [Thu, 5 Oct 2023 13:25:52 +0000 (10:25 -0300)]
Fix a defcustom :type

* lisp/cedet/ede/base.el (ede-project-placeholder-cache-file): Expand
:type to allow nil.  (Bug#66361)

14 months agoUse key-translate instead of keyboard-translate
Robert Pluim [Thu, 7 Sep 2023 14:56:06 +0000 (16:56 +0200)]
Use key-translate instead of keyboard-translate

As a consequence of the discussions in Bug#65735, move to using the
new key-translate function instead of the deprecated
keyboard-translate.

For future maintainers: ?\C-? or ?\177 do not mean "DEL" with
key-translate, you have to use "DEL".

* lisp/simple.el (normal-erase-is-backspace-mode): Use key-translate.
* lisp/term/bobcat.el (terminal-init-bobcat): Use key-translate.

14 months agoOmit the `omake` compilation-mode rule by default
Mattias Engdegård [Wed, 4 Oct 2023 17:27:49 +0000 (19:27 +0200)]
Omit the `omake` compilation-mode rule by default

It keeps interfering with other rules, slowing everything down a
little bit and makes it harder to add or change other rules.  The rule
is still there and can easily be re-enabled by those who need it.

* etc/NEWS: Announce.
* lisp/progmodes/compile.el (compilation-error-regexp-alist):
Exclude `omake`.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data):
Actually test the `cucumber` rule. Remove the `omake` test case.
(compile-test-error-regexps):
Test `omake` here.  Test other rules without `omake` included.

14 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Thu, 5 Oct 2023 08:37:21 +0000 (08:37 +0000)]
; * admin/git-bisect-start: Update failing commits

14 months agoMake newly-created smerge-diff-buffers read-only
Spencer Baugh [Wed, 28 Jun 2023 12:48:01 +0000 (08:48 -0400)]
Make newly-created smerge-diff-buffers read-only

Buffers name *vc-diff* are usually created by vc, which makes them
read-only.  If we create such a buffer, let's make it read-only too.
If the buffer already exists, though, don't change that since the user
might have deliberately made it writable.

* lisp/vc/smerge-mode.el (smerge-diff): Make newly-created
smerge-diff-buffers read-only. (bug#64071)

14 months ago' Improve wording of compilation-error messages
Eli Zaretskii [Thu, 5 Oct 2023 08:01:41 +0000 (11:01 +0300)]
' Improve wording of compilation-error messages

* lisp/progmodes/compile.el (compilation-next-error): Improve
wording of user-error text.  (Bug#65713)

14 months agoImprove find-sibling-rules option type
Paul W. Rankin [Tue, 3 Oct 2023 10:27:38 +0000 (07:27 -0300)]
Improve find-sibling-rules option type

* lisp/files.el (find-sibling-rules): More helpful rules.

14 months agoNontext mouse cursor as default on {tab|tool}-bar
Manuel Giraud [Wed, 27 Sep 2023 17:05:10 +0000 (19:05 +0200)]
Nontext mouse cursor as default on {tab|tool}-bar

* src/xdisp.c (note_mouse_highlight): Always set the mouse cursor to
nontext when entering tab-bar and tool-bar.  (Bug#66243)

14 months agoIntroduce an input method callback required by Android 34
Po Lu [Thu, 5 Oct 2023 06:23:20 +0000 (14:23 +0800)]
Introduce an input method callback required by Android 34

* java/org/gnu/emacs/EmacsInputConnection.java (replaceText):
New function.

* java/org/gnu/emacs/EmacsNative.java (replaceText): Declare
native function.

* src/androidgui.h (enum android_ime_operation): New operation
ANDROID_IME_REPLACE_TEXT.

* src/androidterm.c (android_handle_ime_event): Decode text when
encountering an ANDROID_IME_REPLACE_TEXT operation.  Return if
decoding overflowed rather than presenting Qnil to textconv
functions.
(replaceText): New JNI function.

* src/frame.h (enum text_conversion_operation): New operation
TEXTCONV_REPLACE_TEXT.

* src/textconv.c (really_commit_text): Move point to start if
the composing region is set.
(really_replace_text): New function.
(handle_pending_conversion_events_1) <TEXTCONV_REPLACE_TEXT>:
New case.
(replace_text): New function.

* src/textconv.h: Update prototypes.

14 months agoPort Emacs to Android 34
Po Lu [Thu, 5 Oct 2023 03:57:26 +0000 (11:57 +0800)]
Port Emacs to Android 34

* configure.ac: Detect and require Android 34 headers.

* doc/emacs/android.texi (Android Environment): Mention new
permissions mandated by Android 34.

* java/AndroidManifest.xml.in: Introduce new permissions and
foreground service types prerequisite for background execution under
Android 34.

* java/INSTALL: Update installation documentation.

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity)
(Sdk7FontObject):

* java/org/gnu/emacs/EmacsService.java (onCreate): Silence deprecation
warnings.

* src/android.c: Update documentation.

14 months ago; * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): Typo.
Eli Zaretskii [Wed, 4 Oct 2023 17:04:53 +0000 (20:04 +0300)]
; * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): Typo.

14 months agoFix pulse-flag :type
Mauro Aranda [Wed, 4 Oct 2023 13:47:51 +0000 (10:47 -0300)]
Fix pulse-flag :type

* lisp/cedet/pulse.el (pulse-flag): Expand :type to allow 'never as
value.  (Bug#66341)

14 months agoCorrect local reference leaks
Po Lu [Wed, 4 Oct 2023 08:33:05 +0000 (16:33 +0800)]
Correct local reference leaks

* src/android.c (android_build_string): Accept a list of local
references to destroy upon an allocation failure, facilitating
the proper deallocation of local references in such situations.
(android_browse_url): Revise for new calling convention.

* src/android.h (android_build_string): Update declaration
correspondingly.

* src/androidmenu.c (android_menu_show, android_dialog_show):
Revise for new calling convention.

* src/androidselect.c (android_notifications_notify_1): Supply
each successive local reference to android_build_string as
notification text is being encoded.

* src/androidvfs.c (android_saf_exception_check): Introduce
absent va_end.

14 months ago* lisp/menu-bar.el (menu-bar-project-menu): Improve menu items.
Juri Linkov [Tue, 3 Oct 2023 17:13:58 +0000 (20:13 +0300)]
* lisp/menu-bar.el (menu-bar-project-menu): Improve menu items.

Remove ellipsis from menu items that don't read arguments from the minibuffer.

14 months agoregex.c: Fix recent regression with mutually_exclusive_p
Stefan Monnier [Tue, 3 Oct 2023 14:10:57 +0000 (10:10 -0400)]
regex.c: Fix recent regression with mutually_exclusive_p

The new analysis code ended up increasing the scope of an optimization
a bit too far.  Reign it in.

* src/regex-emacs.c (struct mutexcl_data): Add `unconstrained` field.
(mutually_exclusive_one): Use and set it.
(mutually_exclusive_p): Initialize it.

* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add test.

14 months agoFix defcustoms in timeclock.el
Mauro Aranda [Tue, 3 Oct 2023 11:03:47 +0000 (08:03 -0300)]
Fix defcustoms in timeclock.el

* lisp/calendar/timeclock.el (timeclock-get-project-function)
(timeclock-get-reason-function): Fix :type to allow nil.  (Bug#66320)

14 months agoCorrect the `cond' forms in cl-print-string-with-limit
Alan Mackenzie [Tue, 3 Oct 2023 10:22:26 +0000 (10:22 +0000)]
Correct the `cond' forms in cl-print-string-with-limit

In this function, calling with limit bound to t will cause an
error in any of the cond forms which set print-length, etc.
Correct them!

* lisp/emacs-lisp/cl-print.el (cl-print-string-with-limit):
Amend the doc string.  In the cond forms in the bindings for
print-length, etc., test the value t first.  Amend those for
print-length and print-level also to test for a zero value of
limit.

14 months agoEnsure, that Tramp uses GNU style emulation when calling ls-lisp
Michael Albinus [Tue, 3 Oct 2023 08:02:52 +0000 (10:02 +0200)]
Ensure, that Tramp uses GNU style emulation when calling ls-lisp

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Reorganize.

* lisp/net/tramp.el (ls-lisp-dirs-first, ls-lisp-emulation)
(ls-lisp-ignore-case, ls-lisp-verbosity): Declare.
(tramp-handle-insert-directory): Bind `ls-lisp-*' options.  Call
`ls-lisp-set-options'.

14 months agoSupport Eshell iterative evaluation in the background
Jim Porter [Sat, 23 Sep 2023 18:36:11 +0000 (11:36 -0700)]
Support Eshell iterative evaluation in the background

This really just generalizes Eshell's previous support for iterative
evaluation of a single current command to a list of multiple commands,
of which at most one can be in the foreground (bug#66066).

* lisp/eshell/esh-cmd.el (eshell-last-async-procs)
(eshell-current-command): Make obsolete in favor of...
(eshell-foreground-command): ... this
(eshell-background-commands): New variable.
(eshell-interactive-process-p): Make obsolete.
(eshell-head-process, eshell-tail-process): Use
'eshell-foreground-command'.
(eshell-cmd-initialize): Initialize new variables.
(eshell-add-command, eshell-remove-command)
(eshell-commands-for-process): New functions.
(eshell-parse-command): Make 'eshell-do-subjob' the outermost call.
(eshell-do-subjob): Call 'eshell-resume-eval' to split this command
off from its parent forms.
(eshell-eval-command): Use 'eshell-add-command'.
(eshell-resume-command): Use 'eshell-commands-for-process'.
(eshell-resume-eval): Take a COMMAND argument.  Return
':eshell-background' form for deferred background commands.
(eshell-do-eval): Remove check for 'eshell-current-subjob-p'.  This is
handled differently now.

* lisp/eshell/eshell.el (eshell-command): Wait for all processes to
exit when running synchronously.

* lisp/eshell/esh-mode.el (eshell-intercept-commands)
(eshell-watch-for-password-prompt):
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments):
* lisp/eshell/em-smart.el (eshell-smart-display-move): Use
'eshell-foreground-command'.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/background/simple-command)
(esh-cmd-test/background/subcommand): New tests.
(esh-cmd-test/throw): Use 'eshell-foreground-command'.

* test/lisp/eshell/eshell-tests.el (eshell-test/queue-input): Use
'eshell-foreground-command'.

* test/lisp/eshell/em-script-tests.el
(em-script-test/source-script/background): Make the test script more
complex.

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/pipeline-wait): New test.

* doc/misc/eshell.texi (Bugs and ideas): Remove implemented feature.