1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-23 04:53:12 -08:00
Commit graph

175127 commits

Author SHA1 Message Date
Visuwesh
9ddeeda8ce Add imenu support for ODF files in doc-view
* lisp/doc-view.el (doc-view--outline): Pass the right file to
doc-view--pdf-outline.
* doc/emacs/misc.texi (DocView Navigation): Mention support for
Open Format Document (ODF) files too.
* etc/NEWS: Announce the change.  (bug#73719)
2024-10-10 12:33:06 +02:00
Juri Linkov
58bcd1dbe0 ; Fix typos 2024-10-10 09:17:00 +03:00
Wilson Snyder
cb0b6a4057 verilog-mode.el: Fix AUTOWIRE etc. range simplification with subtraction of negative number.
* lisp/progmodes/verilog-mode.el (verilog-simplify-range-expression):
Fix AUTOWIRE etc. range simplification with subtraction of negative
number (#1879).
2024-10-09 22:34:38 -04:00
Dmitry Gutov
a295d7de9e Make revision completion in vc-diff and vc-root-diff more predictable
* lisp/vc/vc.el (vc-root-version-diff):
Don't try calling 'vc-deduce-fileset', instead construct a fileset
suitable for the root directory right away.  This way the revision
completion for the root diff doesn't depend on the current buffer,
or the file at point (bug#73232).
(vc-diff-build-argument-list-internal): No special case when
invoked on a directory, or when the current file is not "dirty".
Make REV1-DEFAULT a string value.

* etc/NEWS: Mention the change.
2024-10-10 02:29:24 +03:00
Po Lu
9ed82c26a3 ; Fix coding style in w32fns.c
* src/w32fns.c (process_dropfiles, STDMETHODCALLTYPE)
(w32_createwindow): Fix coding style.
2024-10-09 09:37:07 +08:00
Dmitry Gutov
ef87ce0ffa help-setup-xref: Fix the previous changes
* lisp/help-mode.el (help-setup-xref): Instead of killing all
local variables directly, call the current major mode function, to
preserve its own locals while dropping the rest (bug#73637).
2024-10-09 04:04:04 +03:00
Visuwesh
44aa385b9a Make imenu index generation for PDFs more reliable
Do away with parsing the output of "mutool show FILE outline"
since the URI reported in its output may not include the page
number of the heading, and instead may contained "nameddest"
elements which cannot be resolved using "mutool".  Instead, use
a MuPDF JS script to generate the PDF outline allowing to
resolve such URIs.

* lisp/doc-view.el (doc-view--outline-rx): Remove as no longer
needed.
(doc-view--outline): Reflect that outline can be generated for
non-PDF files too.
(doc-view--mutool-pdf-outline-script): Add new variable to hold
the JS script used to generate the outline.
(doc-view--pdf-outline): Use the script.  (bug#73638)
2024-10-08 17:38:35 +02:00
Cecilio Pardo
9af36e70f8 Implement drag-n-drop for w32 with support for files and text
Implement drag-n-drop with IDropTarget for MS-Windows. This
allows for dropping files or text.
* lisp/term/w32-win.el (w32-drag-n-drop): Change to handle
files or strings.
* src/w32fns.c (process_dropfiles): New function to convert
DROPFILES struct to array of strings.
(w32_process_dnd_data): New function to process drop data.
(w32_try_get_data): Extract data from IDataObject.
(w32_createwindow): Assign an IDropTarget to each new frame.
(w32_name_of_message): New message.
(w32_msg_pump): Changed CoInitialize to OleInitialize, needed
by the drag-n-drop functions.
(w32_wnd_proc): New struct w32_drop_target, and
w32_drop_target_* functions to implement the IDropTarget
interface.
* src/w32term.c (w32_read_socket): Handle WM_EMACS_DROP and
remove WM_EMACS_DROPFILES.
* src/w32term.h: New message WM_EMACS_DROP.
(Bug#3468)

* etc/NEWS: Announce the new feature.
2024-10-08 16:13:24 +03:00
Eli Zaretskii
339ffd7986 New command-line options for 'etags'
This adds '--no-fallback-lang' and '--no-empty-file-entries'
options, and their opposites '--fallback-lang' and
'--empty-file-entries'.
* lib-src/etags.c (fallback_lang, empty_files): New toggles.
(main): Initialize them to 'true'.
(longopts) [!CTAGS]: Add the '--(no-)fallback-lang' and
'--(no-)empty-file-entries' options.
(find_entries): If 'fallback_lang' is false, don't attempt Fortran
and C/C++ fallbacks.
(print_help): Add help for new options.
(main): If 'empty_files' is false, don't output file entries for
files that have no tags.  (Bug#73484)

* doc/emacs/maintaining.texi (Create Tags Table):
* etc/NEWS:
* doc/man/etags.1: Document the new options.

* test/manual/etags/Makefile (check): Add test for new options.
* test/manual/etags/ETAGS.good_7: New file.
2024-10-08 15:39:33 +03:00
Michael Albinus
9c94363894 * doc/misc/tramp.texi (Customizing Methods): Add incus-tramp. 2024-10-08 12:45:13 +02:00
Eshel Yaron
6a272dedad
; Touch up 'buffer-to-register'
* lisp/register.el (buffer-to-register): Refine docstring
and interactive prompts; sharp-quote function name.
2024-10-08 09:01:47 +02:00
Barra Ó Catháin
c0f10fc3d4
; Fix 'add-hook' call in 'buffer-to-register'
* lisp/register.el (buffer-to-register): Add 'with-current-buffer'
so 'add-hook' correctly refers to buffer when given argument.
2024-10-08 08:46:35 +02:00
Dmitry Gutov
70d064dab7 poject--vc-list-files: Check that the current Emacs is 31+
* lisp/progmodes/project.el (project--vc-list-files):
Check that the current Emacs is 31+, to avoid breakage on remote
hosts with older Git (bug#73320).
2024-10-08 02:47:15 +03:00
Dmitry Gutov
7cd8108098 Detect Git version on remote hosts separately from the local one
* lisp/vc/vc-git.el (vc-git--program-version): Detect Git version
on remote hosts separately from the local one (buf#73320).
(vc-git-connection-default-profile): Set up collection-local
profile.  And use it for the 'vc-git' :application.
(vc-git--program-version): Operate on the connection-local value
of 'vc-git--program-version'.
2024-10-08 02:42:39 +03:00
Dmitry Gutov
2d139141a6 Support file creation and deletion in diff-apply-hunk
* lisp/vc/diff-mode.el (diff-find-file-name): Allow entering
non-existing file name when the corresponding hunk is of type
"create file" (bug#62731).  Default to file name with deleted
prefix if diff-buffer-type is Git or Hg.  Make sure not to add
such input to diff-remembered-files-alist, it would be hard to
change otherwise in case of typo.
(diff-setup-buffer-type):
Match against the diff header common to 'hg diff' output.
(diff-find-source-location): Look at the other source when the
buffer is applied in reverse.
(diff-apply-hunk): Delect file deletion and pass a different
argument to 'diff-find-source-location' in such case.  Bind
diff-vc-backend to nil to avoid older revision buffer being
returned.  In the end, offer to delete the file if the hunk was of
corresponding type and matched the existing contents.

* etc/NEWS: Mention the new capability.
2024-10-08 02:25:21 +03:00
Dmitry Gutov
9904376c79 Support calling 'project-current' with custom prompt
* lisp/progmodes/project.el (project-current): Treat being passed
a string in the MAYBE-CURRENT argument specially (bug#70833).
(project-prompt-project-dir, project-prompt-project-name):
Handle it.

* etc/NEWS: Mention that change.
2024-10-08 02:03:21 +03:00
Eli Zaretskii
ff4de9eff3 * lib-src/etags.c (C_entries): Fix assertion violation. 2024-10-07 21:06:34 +03:00
Jim Porter
49325e1356 ; Fix completion of variables in Eshell immediately after "$"
* lisp/eshell/esh-var.el (eshell-complete-variable-reference): Match
group 1 even when there's nothing after "$".
2024-10-07 10:21:09 -07:00
Eli Zaretskii
8c5d69998e ; Fix last change
* lisp/tmm.el (tmm-prompt):
* etc/NEWS: Fix last change.
2024-10-06 20:56:09 +03:00
Manuel Giraud
1adcbdb21c Add a shortcut to go up in the menu hierarchy.
* lisp/tmm.el (tmm-prompt): Add a shortcut to go up in the menu
hierarchy (bug#73498).
(tmm-completion-prompt): Document it in help message.
(tmm-define-keys): Add the shortcut in the keymap.
* etc/NEWS: Document the change.
2024-10-06 20:29:05 +03:00
Juri Linkov
9102f1eaaf * lisp/vc/diff-mode.el (diff-apply-buffer): Add more failures.
Add 'failures' as an argument to the 'message' call.
2024-10-06 20:16:21 +03:00
Dmitry Gutov
61c91389a4 help-setup-xref: Simplify further
* lisp/help-mode.el (help-setup-xref): Simplify, given that the
vars are marked 'permanent-local' already (bug#73637).
2024-10-06 16:31:42 +03:00
Daniel Colascione
500f5da5fb Simplify xref regular expression with rx
* lisp/progmodes/xref.el (xref--regexp-to-extended): switch to rx
regular expression for legibility
2024-10-05 22:40:23 -04:00
Dmitry Gutov
e776df2a3e help-setup-xref: Keep the local values only of some variables
* lisp/help-mode.el (help-setup-xref): Kill all local variables,
saving ones that are known to need to be preserved (bug#73637).
2024-10-06 04:32:00 +03:00
Alan Mackenzie
4c7a6dc1a0 CC Mode: Remove search limit to fontify first decl in xdisp.c
An unneeded 10,000 character search limit prevents the full
fontification of the first declaration of xdisp.c, since the
introductory commentary is longer than that.

* lisp/progmodes/cc-engine (c-find-decl-spots): Remove the
10,000 char limit.
2024-10-05 17:28:28 +00:00
Stefan Kangas
24fe762503 Remove redundant face specs in manoj-dark theme
* etc/themes/manoj-dark-theme.el (manoj-dark): Remove redundant face
specs.  ':bold t' duplicates ':weight bold', and ':italic t' duplicates
':slant italic'.
2024-10-05 18:31:50 +02:00
Eli Zaretskii
d54e7f1392 ; Fix warnings in register.el
* lisp/register.el (dired-current-directory): Declare.
(file-to-register): Doc fix.
2024-10-05 15:07:24 +03:00
Eli Zaretskii
7949452350 Merge from origin/emacs-30
b68b9f291c ; * lisp/progmodes/csharp-mode.el (treesit-query-compile)...
688201ef18 ; * lisp/window.el (switch-to-prev-buffer-skip-regexp): D...
ba44fc9a44 Restore comment/string check for 'electric-layout-mode'
5a462948e1 Update Arni Magnusson's email address
6b1271b169 Fix python-ts-mode-map docstring
aaaafddc94 Normalize "Commentary" section in eudc.el
d656be9794 Expand email abbrevs in X-Debbugs-Cc header.
e9dcf0c57d Fix 'list-tags' when invoked from a non-file buffer
51ef05f684 count-windows: Fix reference to walk-windows
5eaf0c784b * lisp/info-look.el (mapc): Add use-package manual's index.
705a5a1a9e ; * ChangeLog.4: Fix attribution of one change.
bf26ff0dc8 Update csharp-ts-mode font-lock (bug#73369)
4c866abab9 ; * doc/lispref/variables.texi (Creating Buffer-Local): F...
d42d7d474f ; * lisp/doc-view.el (doc-view-svg-face): Copy-edit docst...
f46f476bb8 ; * admin/MAINTAINERS: Take VC subsystem, add note about ...
d68e6d2689 ; rcirc-update-activity-string: Justify some existing beh...
e6a37869c8 Fix inconsistency in value of rcirc-activity-string
108b3179bd Revert "; Minor clarification in variables.texi"
44156c2140 ; Minor clarification in variables.texi
63058e1153 Tag interactive commands in 'lua-ts-mode'
84bea20eba ; * lisp/info-look.el: Add two more links.
96b87ad536 Mention LSP acronym in eglot defgroup docstring
9c904e8cea Change :group of 'eglot' defgroup to 'tools'
fd1a1b0780 Remove out-of-date documentation from python.el
11e3e0cadd Fix executing commands in Eshell using "env" with no loca...
c0ef8a9a1b Fix a typo in the calendar manual
36ff7138fe ; Fix a thinko in sieve-manage.el
7abecbcd63 ; * nt/INSTALL: Update MinGW notes URL.  (Bug#73528)

# Conflicts:
#	admin/MAINTAINERS
2024-10-05 07:41:22 -04:00
Eli Zaretskii
b68b9f291c ; * lisp/progmodes/csharp-mode.el (treesit-query-compile): Declare. 2024-10-05 14:38:48 +03:00
Eli Zaretskii
688201ef18 ; * lisp/window.el (switch-to-prev-buffer-skip-regexp): Doc fix (bug#73545). 2024-10-05 13:30:30 +03:00
Morgan Willcock
ba44fc9a44 Restore comment/string check for 'electric-layout-mode'
This reverts an accidental change which allowed
'electric-layout-mode' to insert newlines inside strings and
comments.  The new behavior can be obtained by setting the
new variable 'electric-layout-allow-in-comment-or-string' to a
non-nil value.
* lisp/electric.el (electric-layout-allow-in-comment-or-string):
New variable to determine whether inserting newlines is
permitted within comments or strings.
(electric-layout-post-self-insert-function-1): Restore the
previous default behavior of not inserting newlines within
comments or strings.
2024-10-05 13:11:04 +03:00
Eli Zaretskii
b2ebba1d3c ; * etc/NEWS: Fix formatting. 2024-10-05 13:07:25 +03:00
Barra Ó Catháin
048e72a403 Add file/buffer-to-register (Bug#73308)
* doc/emacs/regs.texi (File and Buffer Registers): Update
documentation to refer to 'file-to-register' and
'buffer-to-register'.
* etc/NEWS: Announce the new commands.
* lisp/bindings.el (ctl-x-r-map): Map new commands into the
register keymap.
* lisp/register.el (register-command-info): Register new commands.
(jump-to-register): Remove docstring line referring to using
set-register instead of new commands.
(file-to-register): Add function for storing files in registers.
(buffer-to-register): Add function for storing buffers in
registers.
(register-buffer-to-file-query): Add function for converting
buffer registers to file-query registers on killing a buffer.
2024-10-05 13:06:49 +03:00
Stefan Kangas
364801fcd6 Prefer defvar-keymap in python.el
It's okay to use defvar-keymap here since the 'compat' package backports
it for all versions of Emacs that we support (24.4 or later).

* lisp/progmodes/python.el (python-mode-map): Prefer defvar-keymap.
(python-menu): Move to toplevel.
2024-10-05 11:50:34 +02:00
Stefan Kangas
84c66625e5 ; Minor cleanup of python-interpreter variable
* lisp/progmodes/python.el (python-interpreter)
(python-shell-interpreter): Simplify definition.
2024-10-05 11:48:36 +02:00
Sean Whitton
50e5221236 ; Tweak line breaks in last change 2024-10-05 17:23:26 +08:00
Sean Whitton
a96954b982 icomplete-completions: Revise computation of prospects-len
* lisp/icomplete.el (icomplete-completions): Revise computation of
prospects-len (i) to avoid calling string-width on the entire
buffer-string, which could be slow; and (ii) to better handle minibuffer
prompts with embedded newlines (bug#72826).
2024-10-05 15:42:49 +08:00
Eshel Yaron
9f54f24e94
; Fix clean up of local variables in Help buffers
* lisp/help-mode.el (help-setup-xref): Kill local values of
'xref-backend-functions' and
'semantic-symref-filepattern-alist' regardless of
'outline-minor-mode'.
2024-10-05 08:55:26 +02:00
Sean Whitton
069ecc9c4c work-buffer--release: Bind inhibit-read-only
* lisp/emacs-lisp/subr-x.el (work-buffer--release): Bind
inhibit-read-only while erasing the buffer.
2024-10-05 09:15:46 +08:00
Stefan Kangas
5a462948e1 Update Arni Magnusson's email address
* .mailmap:
* doc/lispref/ChangeLog.1:
* doc/misc/ChangeLog.1:
* lisp/ChangeLog.16:
* lisp/ChangeLog.17:
* lisp/progmodes/bat-mode.el: Update email address of
Arni Magnusson.  (Bug#73631)
2024-10-05 02:30:41 +02:00
Stefan Kangas
6b1271b169 Fix python-ts-mode-map docstring
* lisp/progmodes/python.el (python-ts-mode-map): Fix docstring.
2024-10-05 01:58:50 +02:00
Stefan Kangas
6e8fc4f6ea Use python-mode for SCons build files
SCons is a build system whose associated files are Python scripts.
Ref: https://www.scons.org/doc/0.96/HTML/scons-user/x325.html

* lisp/progmodes/python.el (python--auto-mode-alist-regexp):
Use 'python-mode' for SCons build files.
2024-10-05 01:08:14 +02:00
Stefan Kangas
aaaafddc94 Normalize "Commentary" section in eudc.el
* lisp/net/eudc.el: Normalize "Commentary" section to make
'M-x describe-package RET eudc RET' more useful.
2024-10-05 00:45:54 +02:00
Stefan Kangas
e2b8e9d940 Also use "Python Module Index" for info lookup
* lisp/info-look.el (:mode): Also search Python module index.
2024-10-05 00:43:06 +02:00
Stefan Kangas
0cca6146dc Future-proof searching for Python info manual
* lisp/info-look.el (:mode): Python is released annually (PEP 602), so
search for minor version based on the current year.
2024-10-05 00:21:42 +02:00
Stefan Kangas
776ca54e8d ; * etc/NEWS: Document Python electric-layout-mode support. 2024-10-04 23:39:22 +02:00
Stefan Kangas
ee6e737fdf python: Better support := in electric-layout-mode
* lisp/progmodes/python.el (python-base-mode): Use heuristic to better
support the Python walrus operator := in electric-layout-rules.
2024-10-04 23:39:22 +02:00
Stefan Kangas
e9727982cf * lisp/info-look.el (:mode): Support IELM. 2024-10-04 23:36:12 +02:00
Stefan Kangas
ecac8ca62e Shorten info-lookup-mode docstring
* lisp/info-look.el (info-lookup-mode): Shorten variable docstring by
removing information that is auto-generated by 'describe-variable'.
2024-10-04 23:35:33 +02:00
Stefan Kangas
9ba20e8f39 Expose lambdas in info-look.el to byte-compiler
* lisp/info-look.el (:mode): Expose lambdas to byte-compiler.
2024-10-04 19:06:41 +02:00