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

175773 commits

Author SHA1 Message Date
Martin Rudalics
b5ba5cbacf Don't inhibit resizing when making a new frame (Bug#74750)
* src/frame.h (struct frame): Remove inhibit_horizontal_resize
and inhibit_vertical_resize slots.
* src/frame.c (frame_inhibit_resize, make_frame)
(Fframe_after_make_frame, gui_figure_window_size): Remove all
operations on frame's inhibit_horizontal_resize and
inhibit_vertical_resize slots (Bug#74750).
2024-12-16 16:36:59 +01:00
Stefan Kangas
eaf5bf736e Invert preprocessor condition to fix 'C-x 4 a'
Typing 'C-x 4 a' in the main function now correctly adds 'main' to the
generated ChangeLog, whereas before it added 'andreid_emacs_init'.
Inverting the preprocessor condition seems like an easier fix than
changing the add-change-log-entry-other-window heuristic.

* src/emacs.c (main): Invert preprocessor condition to appease the
'add-change-log-entry-other-window' heuristic.
2024-12-16 03:41:53 +01:00
Stefan Kangas
29058579e9 Prefer defvar-keymap in info.el
* lisp/info.el (Info-mode-line-node-keymap, Info-link-keymap):
Convert to defvar-keymap.
2024-12-16 00:18:18 +01:00
Stefan Kangas
bef0d80be8 Move pure+side-effect-free declarations to byte-opt.el
* src/json.c (syms_of_json): Move pure and side-effect-free declarations
for json-serialize and json-parse-string from here...
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
...to here.
2024-12-16 00:05:06 +01:00
Daniel Mendler
465544eb55 completion-eager-display: Use buffer content instead of INITIAL-INPUT
* lisp/minibuffer.el (completing-read-default): Use the
minibuffer content instead of handling INITIAL-INPUT directly.
2024-12-15 18:04:16 -05:00
Vitaliy Chepelev
7930fe2f44 image-dired: Don't croak on file names with regexp characters
* lisp/image/image-dired-dired.el (image-dired-mark-tagged-files):
* lisp/image/image-dired-tags.el (image-dired-get-comment)
(image-dired-write-comments, image-dired-list-tags)
(image-dired-remove-tag, image-dired-write-tags): Quote file name
for search-forward-regexp.  (Bug#73445)

Copyright-paperwork-exempt: yes
2024-12-15 19:55:24 +01:00
Stefan Kangas
32060cef1c ; * lisp/widget.el: Delete commented out code. 2024-12-15 19:20:04 +01:00
kobarity
3c247f86b7 Fix hangs caused by unbalanced braces in Python f-strings
* lisp/progmodes/python.el (python--font-lock-f-strings):
Temporarily bind forward-sexp-function to nil when calling
'up-list'.  (Bug#74738)
2024-12-15 10:03:02 -05:00
Eli Zaretskii
75e3ea0423 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-12-15 07:46:22 +02:00
Stephen Gildea
7dcc059871 ; * test/lisp/time-stamp-tests.el: make checkdoc happier 2024-12-14 10:46:15 -08:00
Stephen Gildea
33532c5899 time-stamp: fix search end, more compatibility suggestions
* lisp/time-stamp.el (time-stamp): Use a marker for the
search end limit so we don't insert past it.
(time-stamp-conv-warn): Include a second suggested conversion
that might be what was intended.
Include a link to variable 'time-stamp-format'.
* test/lisp/time-stamp-tests.el: more tests
2024-12-14 10:23:04 -08:00
Eli Zaretskii
4d602beea1 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-12-14 16:41:22 +02:00
Eli Zaretskii
567566ca08 Merge from origin/emacs-30
6942599dbb ; * etc/PROBLEMS: Document problem with menu-bar backgrou...
488801baf7 * lisp/time-stamp.el: Limit field width to two digits.
34bedcd58d ; * lisp/progmodes/executable.el: Remove stale comment (b...
327d3e56f6 ; * etc/TODO: Add an item for improving defgroups.
7ae9ccae0c ; * lisp/net/rcirc.el (rcirc-next-active-buffer): Doc fix...
3e51be94ae ; Fix :version tag in browse-url
dffd4a50c6 Revert "Attempt to install package first when upgrading"
fbcb357b9d Fix 'gnus-select-method' custom type
6fd5e02cb9 Fix typo in maps.texi
872a7336dc ; * etc/DEBUG: Mention "handle SIGINT" on MS-Windows.
b4bcbabf95 * doc/misc/tramp.texi (FUSE-based methods): Fix sshfs ref...
f8da72b41c Improve gnus.texi indexing
4a090bd7ea ; * lisp/net/eww.el (eww-browse-with-external-browser): F...
59fa0b1dd6 ; Improve doc strings in compile.el
3d8e49c41a Attempt to install package first when upgrading

# Conflicts:
#	lisp/net/browse-url.el
#	lisp/net/eww.el
2024-12-14 09:39:59 -05:00
Richard Lawrence
77f73abd92 Check for presuppositions in `calendar-date-is-valid-p'
Do not signal an error in `calendar-date-is-valid-p' if passed a
value which is not a three-element list of integers.  Signaling
an error makes the function unusable as a predicate for valid
date values. (Bug#74848)
* lisp/calendar/calendar.el (calendar-date-is-valid-p): Add the
check that input is a 3-element list.
* test/lisp/calendar/calendar-tests.el: New file with tests.
2024-12-14 14:42:15 +02:00
Daniel Mendler
fd021c0760 New customization variable `completion-eager-display'
The customization option can be set to t or nil, to respectively
always or never show the *Completions* buffer eagerly at the
beginning of a completion session.  Furthermore the option can
be set to the value auto.  In this case the *Completions* buffer
will only be shown if requested by the completion table.
Completion tables can use the `eager-display' completion
metadata to do so.  (Bug#74616, Bug#74617)

* lisp/minibuffer.el (completion-eager-display): New
customization variable.
(completion-metadata): Update docstring, document the
new `eager-display' completion metadata.
(completion-extra-properties): Update docstring, document the
new `:eager-display' completion metadata.
(completion-category-overrides): Add `eager-display' to the
custom type specification.
(completing-read-default): Handle the `completion-eager-display'
customization variable and the `eager-display' completion
metadata.
(completion-table-with-metadata): New function to create
a completion table with metadata.
(minibuffer-complete-defaults, minibuffer-complete-history):
Use it.
* lisp/ffap.el (ffap-menu-ask): Add `ffap-menu' completion
category and `eager-display' completion metadata.  Use
`completion-table-with-metadata'.
* lisp/imenu.el (imenu-eager-completion-buffer): Correct
docstring, which had been inverted.
(imenu--completion-buffer): Add `eager-display' completion
metadata.  Use `completion-table-with-metadata'.
* lisp/tmm.el (tmm-prompt): Add `tmm' completion category and
`eager-display' completion metadata.  Use
`completion-table-with-metadata'.  Add keymap setup.
(tmm-add-prompt): Remove keymap setup.
(tmm-goto-completions): Call `tmm-add-prompt' to ensure that a
*Completions* buffer is shown.
(tmm--completion-table): Remove unused internal function.
* etc/NEWS: Announce the change.
2024-12-14 14:38:29 +02:00
Lin Sun
64981660c9 Restore 'imenu-create-index-function' on exiting semantic
* lisp/cedet/semantic.el: Restore the
'imenu-create-index-function' on exiting.
* lisp/cedet/semantic/bovine/make.el:
* lisp/cedet/semantic/bovine/scm.el:
* lisp/cedet/semantic/html.el:
* lisp/cedet/semantic/texi.el:
* lisp/cedet/semantic/wisent/java-tags.el:
* lisp/cedet/semantic/wisent/javascript.el:
* lisp/cedet/semantic/wisent/python.el:
* lisp/cedet/srecode/template.el:
Store the original 'imenu-create-index-function' before
changing it.  (Bug#74803)
2024-12-14 12:38:38 +02:00
Daniel Mendler
ed1f3b8488 Add `browse-url-qutebrowser'
The browser launcher supports the NEW-WINDOW argument and
`browse-url-qutebrowser-new-window-is-tab' to open tabs.
Furthermore opening new URLs is sped up via Unix socket IPC if
available.
* lisp/net/browse-url.el (browse-url-qutebrowser-send): Function
to send command to Qutebrowser via IPC.
(browse-url-qutebrowser): New browser launcher.  Use
`browse-url-qutebrowser-send'.
(browse-url-qutebrowser-program, browse-url-qutebrowser-arguments)
(browse-url-qutebrowser-new-window-is-tab): New customizables.
(browse-url-mozilla-new-window-is-tab)
(browse-url-firefox-new-window-is-tab)
(browse-url-epiphany-new-window-is-tab): Improve docstrings.

* etc/NEWS: Announce the change.
(Bug#74781)
2024-12-14 12:25:47 +02:00
Eli Zaretskii
6942599dbb ; * etc/PROBLEMS: Document problem with menu-bar background (bug#74028). 2024-12-14 11:57:04 +02:00
Michael Albinus
83245d2269 Fix xt-mouse-tests.el in interactive mode
* test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Run only
when noninteractive.
2024-12-14 09:37:17 +01:00
Jared Finder
2719dccbe5 Fix for xt-mouse-tests.el broken in prior commit
xt-mouse-tests not turning on xterm-mouse-mode if it was already
on did not work with xterm-mouse-mode being set to t by default.
It turns out that xt-mouse-tests already does not report proper
results when called inside a running Emacs session so the code
path is not useful anyways.

* test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Always
turn on xterm-mouse-mode, even if it is already on.
2024-12-14 09:30:43 +01:00
Gerd Möllmann
b6807a7ddc Improve menu separator display on ttys slightly (bug#74854)
* src/xdisp.c (display_tty_menu_separator): New function displaying
separators with '-', '=', or ' '.
(display_tty_menu_item): Use it.
2024-12-14 08:21:42 +01:00
kobarity
71cd290c20 Fix font-lock of Python f-strings
* lisp/progmodes/python.el (python--font-lock-f-strings): Bind
'parse-sexp-ignore-comments' to nil so that we can look for
closing braces even if a hash is used in the format specifier.
* test/lisp/progmodes/python-tests.el
(python-font-lock-f-string-1): New test.  (Bug#74738)
2024-12-13 18:33:41 -05:00
Stefan Monnier
dde5d0a41e * lisp/help-fns.el (help-fns-short-filename): Skip relative file names 2024-12-13 17:47:22 -05:00
Stefan Monnier
5923d8ebef * lisp/org/ox-texinfo.el (org-texinfo-template): Fix direntry format
Apparently I was confused and `* FILE.  DESCRIPTION` is not
a valid format, so always use the longer form.
2024-12-13 16:14:45 -05:00
Eli Zaretskii
69a61f721d * nt/inc/netinet/tcp.h: New (empty) file. 2024-12-13 20:52:14 +02:00
Stephen Gildea
488801baf7 * lisp/time-stamp.el: Limit field width to two digits. 2024-12-13 08:56:41 -08:00
Eric Marsden
c265febd97 Add support for TCP_NODELAY on network streams
* src/process.c (socket_options): add entry for TCP_NODELAY.
* lisp/emacs-lisp/bytecomp.el: add :nodelay to valid keywords
  for make-network-process compiler-macro.
* doc/lispref/processes.texi: document :nodelay keyword argument
  to set-network-process-option and make-network-process.

(Bug#74793)
2024-12-13 14:12:39 +01:00
Eli Zaretskii
34bedcd58d ; * lisp/progmodes/executable.el: Remove stale comment (bug#74846). 2024-12-13 14:11:13 +02:00
Yuan Fu
989cdb2c35
Apply string syntax only to string in jsx (bug#73978)
The current code applies string syntax to too many things.  This
patch makes tsx-ts-mode (and friends) only apply string syntax
to actual text in tsx/jsx.

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts--s-p-query): Only capture jsx_text.
(tsx-ts--syntax-propertize-captures): handle the case when the
text is one character long.
2024-12-12 21:45:25 -08:00
Yuan Fu
9377ef5c23
Declare tree-sitter functions with a new macro
* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/elixir-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/heex-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/lua-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/python.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/c-ts-common.el:
* lisp/progmodes/prog-mode.el:
* lisp/progmodes/typescript-ts-mode.el: Use new macro.
* lisp/treesit.el (treesit-declare-unavailable-functions): New
macro.
2024-12-12 20:59:08 -08:00
Stefan Kangas
4bdadbdc21 Prefer defvar-keymap in perl-mode.el
* lisp/progmodes/perl-mode.el (perl-mode-map): Convert to
defvar-keymap.
2024-12-13 04:48:33 +01:00
Stefan Kangas
a9fcf55d5b Prefer defvar-keymap in f90.el
* lisp/progmodes/f90.el (f90-mode-map): Convert to defvar-keymap.
(f90-menu): Move definition to top level.
2024-12-13 04:46:07 +01:00
Stefan Kangas
65aa5608f2 Prefer defvar-keymap in dired.el
* lisp/dired.el (dired-mouse-drag-files-map)
(dired-click-to-select-map): Convert to defvar-keymap.
2024-12-13 04:40:26 +01:00
Stefan Kangas
020128e9dc Don't use obsolete mode delhpi-mode
* lisp/files.el (auto-mode-alist): Prefer opascal-mode to obsolete
delphi-mode.
2024-12-13 01:13:52 +01:00
Stefan Kangas
d1bde7b5cb Don't use obsolete filter-buffer-substring-functions in Org
This patch was also installed in Org mode, here:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=b9637ef142

* lisp/org/org-agenda.el (org-agenda-mode):
* lisp/org/org-indent.el (org-indent-mode): Don't use obsolete
filter-buffer-substring-functions.
2024-12-13 00:05:08 +01:00
Eli Zaretskii
327d3e56f6 ; * etc/TODO: Add an item for improving defgroups. 2024-12-12 18:03:19 +02:00
Scott Bell
7ae9ccae0c ; * lisp/net/rcirc.el (rcirc-next-active-buffer): Doc fix (bug#74773). 2024-12-12 13:04:28 +02:00
Jared Finder
9ccd459e84 Enable xterm-mouse-mode by default in xterm
* lisp/xt-mouse.el (xterm-mouse-mode): Change default value of
xterm-mouse-mode to t.
* lisp/term/xterm.el (xterm--init): Enable xterm-mouse-mode if
the default value is still set.
* etc/NEWS: Document new behavior.
2024-12-12 12:51:13 +02:00
Diancheng Wang
a4548739b8 Turn off current source line indicator when gdb buffer is killed
* lisp/progmodes/gud.el (gud-hide-current-line-indicator):
Turn off current-line indicator.  (Bug#74642)
2024-12-12 12:44:55 +02:00
Daniel Mendler
a3610381ff eww: Use browse-url-with-browser-kind in eww-browse-with-external-browser
Guarantee that an external browser is used by EWW if
`browse-url-secondary-browser-function' is set to
`eww-browse-url'.
* lisp/net/eww.el (eww-browse-with-external-browser): Use
`browse-url-secondary-browser-function' only if it is an
external browser, otherwise fall back to
`browse-url-with-browser-kind'.
(eww-follow-link): Use `eww-browse-with-external-browser' if the
EXTERNAL prefix argument is non-nil.  Improve docstring.
* lisp/net/browse-url.el (browse-url-secondary-browser-function):
Update docstring.  (Bug#74730)
2024-12-12 12:40:42 +02:00
Visuwesh
eb9ba4830e Revert Dired buffer when clicking on basename of directory
* lisp/dired.el (dired--make-directory-clickable): Make clicking
on basename of the directory revert the Dired buffer.
* etc/NEWS: Announce the change.  (Bug#74700)
2024-12-12 12:29:24 +02:00
Stefan Kangas
d181afa5d9 Add nntps and snews to browse-url heuristic
* lisp/net/browse-url.el (browse-url-button-regexp): Support "nntps" and
"snews" schemes.
2024-12-12 10:14:16 +01:00
Stefan Kangas
ab5040896e Shorten browse-url-default-scheme docstring
* lisp/net/browse-url.el (browse-url-default-scheme): Shorten
docstring by removing self-evident information.  Reflow.
2024-12-12 10:14:16 +01:00
Yuan Fu
a0e7c884d8
; * lisp/progmodes/c-ts-mode.el: Add missing declare-function form. 2024-12-11 22:07:22 -08:00
Eli Zaretskii
276a74f0f7 ; Fix documentation of a recent change in Eshell
* lisp/eshell/em-hist.el (eshell-history-isearch): Fix typo and
wording.  (Bug#74287)
2024-12-12 07:40:32 +02:00
Stefan Monnier
5f8a86992f minibuffer.el: Avoid accumulating adjustments in the metadata (bug#74718)
* lisp/minibuffer.el (completion--nth-completion): Remember the
adjustments applied, in an ad-hoc `completion--adjusted-metadata` entry.
2024-12-11 18:35:05 -05:00
Stefan Kangas
3e51be94ae ; Fix :version tag in browse-url
* lisp/net/browse-url.el (browse-url-button-regexp): Fix :version tag.
2024-12-11 22:41:10 +01:00
Pengji Zhang
3959ea6644 Rework history Isearch for Eshell
This is to make history Isearch for Eshell similar to that of
'comint-mode', by hooking into Isearch properly instead of
defining new commands to emulate Isearch (bug#74287).

* lisp/eshell/em-hist.el (eshell-history-isearch): New user
option.
(eshell-goto-history, eshell--isearch-setup)
(eshell-history-isearch-end, eshell-history-isearch-search)
(eshell-history-isearch-message, eshell-history-isearch-wrap)
(eshell-history-isearch-push-state): New functions.
(eshell-isearch-backward-regexp, eshell-isearch-forward-regexp):
New commands.
(eshell--history-isearch-message-overlay)
(eshell--stored-incomplete-input, eshell--force-history-isearch):
New internal variables.
(eshell-hist-mode-map): Bind 'M-r' to
'eshell-isearch-backward-regexp' and free 'M-s' binding for
normal in-buffer search commands.
(eshell-isearch-backward, eshell-isearch-forward): Use the new
way to start searching.
(eshell-hist-initialize): Use the new Isearch setup function.
(eshell-previous-matching-input): Use 'eshell-goto-history'.
Also inhibit messages when searching.
(eshell-isearch-map, eshell-isearch-repeat-backward)
(eshell-isearch-abort, eshell-isearch-delete-char)
(eshell-isearch-return, eshell-isearch-cancel)
(eshell-isearch-repeat-forward, eshell-test-imatch)
(eshell-return-to-prompt, eshell-prepare-for-search): Remove.
These are for the old history Isearch implementation.

* doc/misc/eshell.texi (History): Document changes.

* etc/NEWS: Annouce changes.
2024-12-11 11:56:45 -08:00
Michael Albinus
6a07dc19ac Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2024-12-11 09:19:10 +01:00
Michael Albinus
c0e1ff6b6b * test/infra/Dockerfile.emba (emacs-tree-sitter): Add jsdoc grammar. 2024-12-11 09:15:47 +01:00