Commit graph

175784 commits

Author SHA1 Message Date
Stefan Kangas
0d3cffe60c ; Fix indentation problem 2024-12-16 22:08:03 +01:00
Stefan Kangas
7c94898fa5 Ignore some more Python tooling directories when grepping
* lisp/progmodes/python.el (python-base-mode): Add Pytest and Rope
cache directories to 'grep-find-ignored-directories'.
2024-12-16 22:01:07 +01:00
Stefan Kangas
a07c89cf9b Make VC exclude Repo directories
* lisp/vc/vc-hooks.el (vc-directory-exclusion-list): Also ignore
".repo" directory created by Repo.
Ref: https://android.googlesource.com/tools/repo
2024-12-16 21:58:56 +01:00
Stefan Kangas
02a1e3052b Improve heuristic for Python walrus operator
* lisp/progmodes/python.el (python-base-mode): Improve heuristic for
Python walrus operator in 'electric-layout-mode'.
2024-12-16 21:48:45 +01:00
Stefan Kangas
5c1889c964 Use substitute-command-keys in map-y-or-n-p
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use
substitute-command-keys.
2024-12-16 21:46:12 +01:00
Stefan Kangas
826b11ddc6 Bind inhibit-read-only to t in substitute-command-keys
* lisp/help.el (substitute-command-keys): Bind inhibit-read-only to t,
to allow modifying strings that are intended for the minibuffer, and
therefore already use minibuffer-prompt-properties.
2024-12-16 21:43:29 +01:00
Juri Linkov
78b50603a2 ; * etc/NEWS: Add 'completion-table-with-metadata' to "Lisp Changes". 2024-12-16 21:12:52 +02:00
Daniel Mendler
3aceae113b Use `completion-table-with-metadata' (bug#74865)
Prefer `completion-table-with-metadata' over explicit completion
table lambdas for clarity.  Furthermore prefer it over
`completion-extra-properties' to avoid problems with recursive
minibuffers and recursive completion sessions, since the
completion metadata applies only to the outer completion session.

* lisp/bookmark.el (bookmark-completing-read):
* lisp/faces.el (read-face-name):
* lisp/international/emoji.el (emoji--read-emoji):
* lisp/net/dictionary.el (dictionary-completing-read-dictionary):
* lisp/net/rcirc.el (rcirc-completion-at-point):
* lisp/net/eww.el (eww-read-alternate-url):
* lisp/simple.el (read-from-kill-ring): Use it.
* lisp/calendar/calendar.el (calendar-read-date): Use
`completion-table-with-metadata' and `completion-table-case-fold'.
* lisp/proced.el (proced--read-signal): New function.
(proced-send-signal): Use it.
2024-12-16 20:19:49 +02:00
Juri Linkov
d2986e79b7 * lisp/comint.el (comint-complete-input-ring): New command (bug#74694).
(comint-mode-map): Bind 'comint-complete-input-ring' to 'C-x <up>'.
2024-12-16 20:12:25 +02:00
Ship Mints
61f1d7fc68 Support pixelwise frame cloning (Bug#74750)
* lisp/frame.el (clone-frame): Honor 'frame-resize-pixelwise'
when cloning a frame's geometry via the 'text-pixels' feature of
'make-frame' (Bug#74750).  Correctly specify source frame in
'display-graphic-p' test for tty selection behavior.
2024-12-16 17:58:10 +01:00
john muhl
d5b23b219d Add Qutebrowser to list of choices in customize
* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
Include 'browse-url-qutebrowser' so that it appears in the Choice
menus of 'browse-url-browser-function' and
'browse-url-secondary-browser-function'.  (Bug#74904)
2024-12-16 17:59:54 +02:00
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