1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-09 01:05:39 -08:00
Commit graph

173671 commits

Author SHA1 Message Date
Eli Zaretskii
ed48b0d657 ; * CONTRIBUTE: Ask not to use non-ASCII unless necessary. 2024-03-15 13:29:31 +02:00
Martin Rudalics
3858e4f229 Fix bug with CHECK_STRUCTS introduced by last buffer.h change
* src/pdumper.c (dump_buffer): Fix HASH_buffer_.  Assign
last_name_ field.
2024-03-15 11:53:31 +01:00
Martin Rudalics
5bba1b95b8 Further adjustments for restoring killed buffer windows (Bug#68235)
* etc/NEWS: Announce 'window-restore-killed-buffer-windows'.
* src/buffer.h (struct buffer) : New field last_name_.
* src/buffer.c (Fbuffer_last_name): New function to return last
name of buffer before it was killed or renamed.
(bset_last_name, Fget_buffer_create, Fmake_indirect_buffer)
(Frename_buffer, Fkill_buffer, init_buffer_once): Set buffer's
last_name_ field accordingly.
* src/window.c (window_restore_killed_buffer_windows): New
variable replacing Vwindow_kept_windows_functions.
(Fset_window_configuration): Use
window_restore_killed_buffer_windows instead of
Vwindow_kept_windows_functions.
* lisp/window.el (window--state-put-2, window-state-put): Use
'window-restore-killed-buffer-windows' instead of
'window-kept-windows-functions'.
* doc/lispref/windows.texi (Window Configurations): Describe
'window-restore-killed-buffer-windows' which replaces
'window-kept-windows-functions'.
2024-03-15 10:35:27 +01:00
Eli Zaretskii
1c4233b9a3 ; Fix documentation of 'flyspell-check-changes'
* lisp/textmodes/flyspell.el (flyspell-check-changes): Doc fixes.

* etc/NEWS: Improve wording of entry for 'flyspell-check-changes'.
2024-03-15 10:44:23 +02:00
Eli Zaretskii
ebd32040e0 ; * src/xwidget.c (xwidget-webkit-disable-javascript): Doc fix. 2024-03-15 10:29:06 +02:00
Juri Linkov
ffbf876a93 * lisp/vc/diff-mode.el (diff-mode-menu): Add menu item "Apply all hunks".
It's bound to the recently added command 'diff-apply-buffer'.
2024-03-15 09:45:48 +02:00
Spencer Baugh
9dcb28d601 With visible-completions, only bind RET when completion is selected
Previously, if minibuffer-visible-completions was non-nil, we bound RET
whenever the *Completions* buffer was visible.  This meant that RET in
completion-in-region would not enter a newline, which is a somewhat
annoying behavior change from minibuffer-visible-completions=nil.

Now, we only bind RET when a completion is selected.  This means
RET will newline in completion-in-region.

So that completion help continues to suggest the correct keys,
we also add minibuffer-visible-completions--always-bind.  When
let-bound to a non-nil value, it makes the
minibuffer-visible-completions binds always active.  We let-bind
it around substitute-command-keys.

* lisp/minibuffer.el (minibuffer-visible-completions--always-bind)
(minibuffer-visible-completions--filter): Add.
(minibuffer-visible-completions-bind): Use
minibuffer-visible-completions--filter.  (bug#68801)
* lisp/simple.el (minibuffer-visible-completions--always-bind)
(completion-setup-function): Let-bind
minibuffer-visible-completions--always-bind so the completion
help is correct.
2024-03-15 09:40:48 +02:00
Kévin Le Gouguec
09ab669351 Keep indenting text when 'shr-fill-text' is nil (bug#69555)
The 'shr-fill-...' functions handle both hard-filling (adding
newlines to break long lines) and indentation.  Setting
'shr-fill-text' to nil currently causes these functions to be
short-circuited completely, so e.g. blockquotes are no longer
indented, whereas the intent of this user option is only to
prevent hard-filling to let visual-line-mode reflow text.

* lisp/net/shr.el (shr-fill-lines): Document that the function
handles more than just filling; move the 'shr-fill-text' check...
(shr-fill-line): ... here, after indentation has been taken care
of.
* test/lisp/net/shr-resources/blockquote.html:
* test/lisp/net/shr-resources/blockquote.txt: New test resources.
* test/lisp/net/shr-tests.el (shr-test--rendering-check): Rename
from 'shr-test', to make the relationship with the 'rendering'
testcase clearer; prefer 'file-name-concat' to 'format'; raise
ERT failure if need be, calling (ert-fail ...) directly instead
of (should (not (list ...))).
(shr-test--rendering-extra-configs): New variable to easily check
that user customizations do not degrade rendering.
(rendering): Consult that new variable; delegate failure-raising
to reduce duplication.
2024-03-15 07:50:31 +01:00
Po Lu
1be33963f0 ; * src/androidselect.c (Fandroid_notifications_notify): Typo in doc string. 2024-03-15 11:52:11 +08:00
Po Lu
c453c82dc6 * src/sfntfont-android.c (init_sfntfont_android): Fix SDK check. 2024-03-15 11:52:11 +08:00
Dmitry Gutov
77a86d738e (project--value-in-dir): Ensure that the global value is still honored
* lisp/progmodes/project.el (project--value-in-dir):
Ensure that the global value of the variable is still honored,
when the variable is not in dir-locals.
2024-03-15 04:28:45 +02:00
Patrick Bader
5037b9eed7 fix: project submodule detection does not work for worktrees 2024-03-15 04:26:02 +02:00
Stefan Monnier
9422a67374 (set-auto-mode): Streamline to fix bug#67795
The old code tested if the mode function is `fboundp` but in an
inconsistent way and without paying attention to
`major-mode-remap`.

* lisp/files.el (set-auto-mode-0): Return `:keep` rather than nil if
the mode was already set.  And emit a warning when the mode function
doesn't exist.
(set-auto-mode): Remove checks that the mode function exists now that
`set-auto-mode-0` does it for us.  Adjust to the new return values of
that function, and simplify the code using a big `or` instead of
a sequence of steps each setting&testing `done`.
(hack-local-variables--find-variables): Use `major-mode-remap`
when skipping the "mode:" entries that specify modes we don't have.
Also, when (eq handle-mode t), don't bother building a list of results
only to return a single element in the end.
2024-03-14 22:15:41 -04:00
Stefan Monnier
c8c0d0a955 (customize-mode): Fix bug#69501
* lisp/cus-edit.el (customize-mode): Use the predicate arg of
`completing-read` instead of binding `completion-regexp-list`.
2024-03-14 22:00:14 -04:00
Po Lu
9a2c7d865f Fix last change
* src/xwidget.c (Fmake_xwidget): Cast boolean value to gboolean.
(syms_of_xwidget): Fix coding style and improve doc string.
2024-03-15 08:36:21 +08:00
Eli Zaretskii
b708e639d6 ; * src/lread.c (maybe_swap_for_eln): Clarify warning message. 2024-03-14 21:08:36 +02:00
Juri Linkov
f03f14165e * lisp/textmodes/flyspell.el (flyspell-check-changes): New user option.
(flyspell--mode-on): Add flyspell-check-changes to post-command-hook
when flyspell-check-changes is non-nil.
(flyspell--mode-off): Remove flyspell-check-changes from post-command-hook.
(flyspell-check-changes): New function (bug#61874).
2024-03-14 20:11:33 +02:00
Juri Linkov
bd6b64e0a8 * lisp/progmodes/project.el: Don't run modes from .dir-locals.el.
(project--value-in-dir): Use 'alist-get' on 'file-local-variables-alist'
to avoid calling 'hack-local-variables-apply' via
'hack-dir-local-variables-non-file-buffer' because it might enable
undesirable modes such as flyspell-mode in a temporary buffer (bug#69740).
2024-03-14 19:37:44 +02:00
Juri Linkov
f3deaa117a Context menu for project (bug#69566)
* lisp/menu-bar.el (menu-bar-project-item): New variable from
'project-menu-entry'.
(menu-bar-tools-menu): Use 'menu-bar-project-item'.

* lisp/mouse.el (context-menu-functions): Add
'context-menu-project' to choice.
(context-menu-project): New function.

* lisp/progmodes/project.el (project-menu-entry): Remove variable.
(project-mode-line-map): Use 'menu-bar-project-item' instead of
'project-menu-entry'.
2024-03-14 19:29:16 +02:00
Pankaj Jangid
eae2c73edb Add language server for Move to eglot
* lisp/progmodes/eglot.el (eglot-server-programs): Added
'move-analyzer' language server.  (Bug#69796)
2024-03-14 17:16:38 +02:00
Liu Hui
a7057745f5 Detect the readline support for Python shell completion
* lisp/progmodes/python.el
(python-shell-comint-watch-for-first-prompt-output-filter):
Detect the readline support.
(python-shell-readline-completer-delims): Update docstring.
(python-shell-completion-native-setup): Move the readline
detection code to ...
(python-shell-readline-detect): ... new function.
(python-shell-completion-native-turn-on-maybe): Skip if Python
has no readline support.
(python-shell-completion-at-point): Respect the delimiter of
readline completer in non-native completion.
* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-1)
(python-shell-completion-at-point-native-1)
(python-completion-at-point-1, python-completion-at-point-2)
(python-completion-at-point-pdb-1)
(python-completion-at-point-while-running-1)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Skip tests if
Python has no readline support.
(python-shell-completion-at-point-jedi-completer): Add test for
non-native Python shell completion. (bug#68559)
2024-03-14 15:09:56 +01:00
Adam Porter
c94d680f6e Handle the case where 'vtable-update-object' doesn't find old object
* lisp/emacs-lisp/vtable.el (vtable-update-object): If OLD-OBJECT
is not found, don't call ELT, since SEQ-POSITION may return nil.
(Bug#69664)
2024-03-14 12:46:46 +02:00
Tim Landscheidt
6d1c1fca0a ; Simplify (with-current-buffer (get-buffer ...) ...)
There's no need to call 'get-buffer', since 'with-current-buffer'
does that internally.
* lisp/calendar/todo-mode.el (todo-merge-category):
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/emacs-lisp/checkdoc.el (checkdoc-error):
* lisp/emacs-lisp/debug.el (debug, debugger-record-expression):
* lisp/emacs-lisp/eieio-opt.el (eieio-browse):
* lisp/emacs-lisp/re-builder.el (reb-restart-font-lock):
* lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command):
* lisp/eshell/em-unix.el (eshell-poor-mans-grep):
* lisp/gnus/gnus-group.el (gnus-add-mark):
* lisp/net/eww.el (eww-next-bookmark, eww-previous-bookmark):
* lisp/net/sieve.el (sieve-upload):
* lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers):
* lisp/obsolete/quickurl.el (quickurl-list-populate-buffer):
* lisp/org/ob-calc.el: (org-babel-execute:calc):
* lisp/org/org-agenda.el (org-agenda-use-sticky-p):
* lisp/pcomplete.el (pcomplete-show-completions):
* lisp/progmodes/bug-reference.el
(bug-reference--try-setup-gnus-article):
* lisp/progmodes/idlw-help.el
(idlwave-highlight-linked-completions):
* lisp/progmodes/verilog-mode.el (verilog-preprocess):
* lisp/replace.el (occur-1):
* lisp/term.el (term-dynamic-list-completions):
* lisp/time.el (world-clock-update):
* lisp/url/url-cache.el (url-store-in-cache):
* lisp/vc/vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news):
* lisp/vc/vc-rcs.el (vc-rcs-system-release):
* lisp/vc/vc-svn.el (vc-svn-merge, vc-svn-merge-news):
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export):
* test/lisp/erc/erc-dcc-tests.el
(pcomplete/erc-mode/DCC--get-1flag)
(pcomplete/erc-mode/DCC--get-2flags)
(pcomplete/erc-mode/DCC--get-2flags-reverse):
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--existing--noreuse):
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--reconnect-retry-nick):
* test/lisp/erc/erc-tests.el (erc--refresh-prompt):
Replace (with-current-buffer (get-buffer ...) ...) with
(with-current-buffer ...).
2024-03-14 12:40:26 +02:00
Phil Hagelberg
3807f380b3 bug#69685: Add language server for Fennel to eglot
* lisp/progmodes/eglot.el (eglot-server-programs): Add
fennel-ls language server.

Copyright-paperwork-exempt: yes
2024-03-14 11:52:06 +02:00
StrawberryTea
fd0a6cb172 ffap.el: Exclude angle brackets from file names in XML
* lisp/ffap.el (ffap-string-at-point-mode-alist): Add elements for
XML, to better recognize file names in XML buffers.

Copyright-paperwork-exempt: yes
2024-03-14 11:47:04 +02:00
Visuwesh
cb9ee24ea6 Add bounds-of-thing-at-point property for 'number'
* lisp/thingatpt.el (thing-at-point-decimal-regexp)
(thing-at-point-hexadecimal-regexp): Extract regexps from...
(number-at-point): ...here.  Use them in 'number-at-point'.
(number): Add 'bounds-of-thing-at-point' property as
`forward-word' does not always return the right boundary,
e.g., in latex-mode buffers.  (Bug#69239)
2024-03-14 11:39:33 +02:00
Eli Zaretskii
a60804ab95 ; Fix last change (bug#68604)
* lisp/xwidget.el (xwidget-webkit-disable-javascript): Move from
here...
* lisp/cus-start.el (standard): ...to here.

* src/xwidget.c (syms_of_xwidget)
<xwidget-webkit-disable-javascript>: Doc fix.

* doc/emacs/misc.texi (Embedded WebKit Widgets): Fix wording.
2024-03-14 11:32:00 +02:00
Noé Lopez
f6a27bc32d Add user option to disable JavaScript in xwidget webview
* src/xwidget.c: Add the 'xwidget-webkit-disable-javascript'
variable to disable JavaScript in WebKit sessions.  (Bug#68604)

* etc/NEWS:
* doc/emacs/misc.texi (Embedded Webkit Widgets): Document
the change.
2024-03-14 11:17:24 +02:00
Adam Porter
013114664e * lisp/emacs-lisp/vtable.el (vtable-update-object): Fix.
The order of the arguments to 'seq-position' was wrong, and it did not
compare the correct values.  (Bug#69664)
2024-03-14 10:48:29 +02:00
Eli Zaretskii
7971537d3c ; Fix last change to compile with mingw.org's MinGW
* src/w32xfns.c:
* src/w32fns.c (WTS_VIRTUAL_CLASS) [!MINGW_W64]: Declare.
* src/w32xfns.c: Include wtsapi32.h.
2024-03-14 10:22:52 +02:00
Raffael Stocker
e7b1743b79 Fix resetting keyboard hook state on MS-Windows
Register session notifications so Emacs is notified when the
computer is being locked, as required to reset the low level
keyboard hook state.  (Bug#69083).
* src/w32term.h:
* src/w32fns.c (setup_w32_kbdhook, remove_w32_kbdhook)
(w32_wnd_proc, globals_of_w32fns, maybe_pass_notification):
Register and manage session notifications in GUI Emacs.
* src/w32console.c (initialize_w32_display, find_ime_window):
* src/w32xfns.c (drain_message_queue): Register notifications
and reset keyboard hook state in console Emacs.
* src/w32.c (term_ntproc): Un-register session notifications
when terminating.
2024-03-14 10:01:06 +02:00
Po Lu
1b94f800ae * exec/trace.c (rpl_stpcpy): Replace stpcpy if absent. 2024-03-14 14:21:49 +08:00
Po Lu
30bc867aec Improve /proc/self/exe substitution on Android
* exec/configure.ac (USER_SWORD): New macro.

* exec/exec.c (format_pid): Export this function.

* exec/exec.h:

* exec/trace.c (canon_path): New function.
(handle_readlinkat, handle_openat): Test complete file name
against /proc/self/exe, and further check for /proc/pid/exe.
2024-03-14 13:45:48 +08:00
Po Lu
db5c8bda63 ; * java/org/gnu/emacs/EmacsDesktopNotification.java (display1): Another fix. 2024-03-14 08:24:42 +08:00
Gerd Möllmann
d95f2a882d ns_select fix for macOS terminals (bug#69561)
* src/nsterm.m (ns_select_1): Return early for terminals.
2024-03-13 20:27:20 +01:00
Eric Abrahamsen
c5945e0f9e Fix name of gnus-notification(s)-close; ignore argument
* lisp/gnus/gnus-notifications.el (gnus-notifications-close): Original
name was probably a typo.
2024-03-13 07:38:49 -07:00
Po Lu
e7e285ec34 Fix crash when displaying notifications on Android 3.0
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't call setPriority until Jelly Bean.
2024-03-13 15:35:40 +08:00
Gerd Möllmann
4ac4cec652 Prevent freezes on macOS (bug#69561)
* src/nsterm.m (ns_select_1): Store pending input_events. Always call
[NSApp run].
2024-03-13 07:09:09 +01:00
Po Lu
6b40d557c4 Port more notification senders to non-XDG systems
* doc/lispref/os.texi (Desktop Notifications): Document that
`:timeout' is now implemented.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification): New field delay.
(display1): Set delay on Android 8.0 and up.

* lisp/erc/erc-desktop-notifications.el
(erc-notifications-notify): Call Android or Haiku notification
functions on those systems.

* lisp/gnus/gnus-notifications.el (gnus-notifications-action)
(gnus-notification-close): Remove dismissed notifications from
the notification to message map.
(gnus-notifications-notify): Call android-notifications-notify
if possible.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update accordingly.
(android_notifications_notify_1): New argument TIMEOUT.
(Fandroid_notifications_notify): New argument QCtimeout.
(syms_of_androidselect) <QCtimeout>: New symbol.
2024-03-13 11:01:39 +08:00
Basil L. Contovounesios
db027a0697 ; Fix bibtex-biblatex-field-alist docstring typo. 2024-03-12 22:47:45 +01:00
Justin Burkett
96911a1d3f Merge remote-tracking branch 'origin/master' 2024-03-12 16:33:50 -04:00
Jeremy Bryant
afcea611a8 * which-key.el (which-key--create-pages): Untabify. 2024-03-12 16:32:47 -04:00
Jeremy Bryant
1f55b85887 * which-key.el (which-key--pad-column): Untabify. 2024-03-12 16:32:40 -04:00
Jeremy Bryant
af8a760ad2 ; * which-key.el (which-key--get-keymap-bindings-1): Use eql. 2024-03-12 16:32:33 -04:00
Jeremy Bryant
61f6c3ed72 ; * which-key.el (which-key--truncate-description): Untabify. 2024-03-12 16:32:22 -04:00
Jeremy Bryant
83bb45e167 Use string-empty-p for readability.
* which-key.el (which-key--maybe-get-prefix-title):
Use string-empty-p for readability.
2024-03-12 16:32:13 -04:00
Jeremy Bryant
33d6ce3324 Don't quote t
* which-key.el (which-key--replace-in-repl-list-many):
Don't quote t.
2024-03-12 16:32:04 -04:00
Jeremy Bryant
6e035b5e2f Use declare form instead of put for clarity
* which-key.el (which-key-add-keymap-based-replacements):
Use declare form instead of put property.
2024-03-12 16:31:58 -04:00
Stefan Monnier
4afafa0370 Try and avoid hardcoding lists of function types
* lisp/bind-key.el (bind-key--get-binding-description):
Show docstrings for compiled functions also.  Don't hardcode knowledge
about various particular kinds of functions.

* lisp/emacs-lisp/bytecomp.el (display-call-tree): Remove special
support for functions with a `byte-code` body since we never generate
that nowadays.  Don't hardcode knowledge
about various particular kinds of functions.
2024-03-12 16:09:23 -04:00
Stefan Monnier
8df6739077 Cleanup some type predicates
Use the new `cl--define-built-in-type` to reduce the manually
maintained list of built-in type predicates.
Also tweak docstrings to use "supertype" rather than "super type",
since it seems to be what we use elsewhere.

* lisp/subr.el (special-form-p): Remove redundant `fboundp` test.
(compiled-function-p): Don'Return nil for subrs that aren't functions.

* lisp/emacs-lisp/cl-macs.el (type predicates): Trim down the list.

* lisp/emacs-lisp/cl-preloaded.el (cl--define-built-in-type):
Register the corresponding predicate if applicable.
(atom, null): Specify the predicate name explicitly.
2024-03-12 15:43:43 -04:00