1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

169225 Commits

Author SHA1 Message Date
F. Jason Park
9c2f99b7d7 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'.
2023-10-13 07:47:01 -07:00
F. Jason Park
1950ddebac 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.
2023-10-13 07:47:00 -07:00
F. Jason Park
d46c016fbd 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)
2023-10-13 07:47:00 -07:00
F. Jason Park
9120d7a32e 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)
2023-10-13 07:47:00 -07:00
F. Jason Park
328a985651 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)
2023-10-13 07:47:00 -07:00
Mattias Engdegård
bd29713201 Fix ls-lisp-verbosity custom type
* lisp/ls-lisp.el (ls-lisp-verbosity): Include `modes` in the type
and doc string.
2023-10-13 16:38:54 +02:00
Alan Mackenzie
9795934965 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.
2023-10-13 14:27:18 +00:00
Michael Albinus
bbccef3ceb Merge from origin/emacs-29
c8ea14e782 Handle quoted tilde in Tramp
30239759ee ; Set maintainer for elint.el to emacs-devel
eedd9db619 Update to Org 9.6.10

# Conflicts:
#	lisp/net/tramp-gvfs.el
2023-10-13 16:18:06 +02:00
Michael Albinus
d40f9668f9 ; Merge from origin/emacs-29
The following commit was skipped:

73ccd9d295 Don't call font-lock-mode in treesit-major-mode-setup (bu...
2023-10-13 16:16:22 +02:00
Michael Albinus
9f83b46bee Merge from origin/emacs-29
53292c5d81 Fix treesit-query-validate for string input (bug#66400)
81a0c1ed2e ; Improve documentation of VC commands
0590e3e69a Recommend `M-x man` in woman.el docs
809da7fc9a ; * doc/lispref/processes.texi (Process Buffers): More ac...
8f23a02a9e Fix updating process-mark position in 'set-process-buffer'
2023-10-13 16:16:19 +02:00
Michael Albinus
fde5f1a1a3 ; Merge from origin/emacs-29
The following commit was skipped:

247743bd1e ; * lisp/treesit.el (treesit-language-at-point-function):...
2023-10-13 16:16:11 +02:00
Michael Albinus
c8ea14e782 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.
2023-10-13 16:09:51 +02:00
Mattias Engdegård
77daafbb36 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`.
2023-10-13 15:24:10 +02:00
Mattias Engdegård
5a32e5ce48 verilog-mode.el: remove impossible cond clause
* lisp/progmodes/verilog-mode.el (verilog-set-auto-endcomments):
Remove can't-happen clause.
2023-10-13 15:23:56 +02:00
Mattias Engdegård
a52d627b37 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.
2023-10-13 14:31:18 +02:00
Po Lu
963e3dd28d Clarify java/INSTALL
* java/INSTALL: Correct erroneous include exports and also
introduce those omitted within patches to external libraries.
(bug#66507)
2023-10-13 12:57:36 +08:00
Po Lu
29095d0b1c 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.
2023-10-13 11:58:10 +08:00
Jim Porter
e58b1d371f Reset the Eshell prompt when signaling with no foreground process
This fixes a small regression from commit eef32d13da.

* 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.
2023-10-12 18:23:46 -07:00
Mauro Aranda
ce3ed6e019 Fix a defcustom :type
* lisp/progmodes/ruby-mode.el (ruby-insert-encoding-magic-comment):
Allow always-utf8.  (Bug#66498)
2023-10-12 19:10:58 +03:00
Po Lu
57ffdfb59b ; Correct typo
* etc/NEWS: Fix typo.
2023-10-12 22:04:34 +08:00
Po Lu
c6f07e13ee 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.
2023-10-12 21:46:54 +08:00
Stefan Kangas
30239759ee ; Set maintainer for elint.el to emacs-devel
* lisp/emacs-lisp/elint.el: Set maintainer to emacs-devel.
2023-10-12 13:25:31 +02:00
Michael Albinus
088dd67f89 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.
2023-10-12 11:02:53 +02:00
Po Lu
963ccc05ac 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.
2023-10-12 08:43:56 +08:00
Jim Porter
60f6952853 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).
2023-10-11 12:44:31 -07:00
Alan Mackenzie
cfed3bb395 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.
2023-10-11 15:03:43 +00:00
Alan Mackenzie
aa45ea8a33 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.
2023-10-11 13:26:01 +00:00
Po Lu
41b83e8993 Remedy typo in android.texi
* doc/emacs/android.texi (Android Fonts): Replace @xref with
@pxref.
2023-10-11 18:48:27 +08:00
Po Lu
6265b7195d Update Android keysym list
* src/keyboard.c (lispy_function_keys): Introduce entries for
scroll lock, num lock, and input method keys.
2023-10-11 16:58:35 +08:00
Juri Linkov
960c98ce3a * lisp/progmodes/project.el (project-mode-line-face): New variable.
(project-mode-line-format): Use it (bug#66317).
2023-10-11 09:27:28 +03:00
Mauro Aranda
cdf369b012 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)
2023-10-10 19:37:40 -07:00
Jim Porter
239db5d516 Revert commits dafa6d6bad and 72c45fa910
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.
2023-10-10 13:00:38 -07:00
Michael Albinus
f7185ca29b 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.
2023-10-10 19:51:22 +02:00
Ulrich Müller
294567d171 ; Fix spelling of my name in all source files 2023-10-10 16:31:53 +02:00
Mattias Engdegård
7f60267cc2 ; * lisp/calc/calc-units.el (math-standard-units): Doc improvement. 2023-10-10 15:18:52 +02:00
Ulrich Müller
1e250df590 ; * lisp/calc/calc-units.el: Fix spelling of my name. 2023-10-10 15:00:12 +02:00
Ulrich Müller
36a8fe4ef2 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.
2023-10-10 15:00:12 +02:00
Mattias Engdegård
c34a425d4d 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.
2023-10-10 14:28:27 +02:00
Mattias Engdegård
2c6015437e * 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.
2023-10-10 14:28:27 +02:00
Po Lu
36d47f24db * doc/emacs/android.texi (Android Software): Fix typo. 2023-10-10 20:16:27 +08:00
Eli Zaretskii
d51f3165f7 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)
2023-10-10 14:46:08 +03:00
Po Lu
60e3071d57 Revise Android documentation
* doc/emacs/android.texi (Android Environment, Android Windowing)
(Android Fonts, Android Troubleshooting, Android Software):
Correct typos and improve wording.
2023-10-10 19:34:56 +08:00
Po Lu
b504faf003 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.
2023-10-10 16:58:21 +08:00
Po Lu
336c367411 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.
2023-10-10 13:11:14 +08:00
Kyle Meyer
eedd9db619 Update to Org 9.6.10 2023-10-09 23:47:52 -04:00
Juri Linkov
238292d657 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.
2023-10-09 21:09:03 +03:00
Juri Linkov
2cdf80bb8f * 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.
2023-10-09 21:03:03 +03:00
Harald Jörg
fc1f6688a2 ; 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.
2023-10-09 17:58:21 +02:00
Mattias Engdegård
156392fee5 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.
2023-10-09 17:39:32 +02:00
Gerd Möllmann
4da644edf6 ; LLDB synthetic child provider 2023-10-09 15:20:37 +02:00