1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-10 16:20:17 -08:00
Commit graph

402 commits

Author SHA1 Message Date
Eli Zaretskii
1c9ddf3948 Merge from origin/emacs-29
e9b88f61cc Fix a defcustom :type
3216cd9695 Fix pulse-flag :type
2065ab5562 Fix defcustoms in timeclock.el
bdd3013249 ; * lisp/image-mode.el (image-mode-to-text, image-mode-as...
5c2d9ae48e ; * lisp/image-mode.el: Fix typos in doc strings (bug#663...
fa0d3f45ae ; Improve wording of last change
3ef259e28a Improve documentation of `ns-use-proxy-icon`
712505a82b Document assigning libraries to packages in make-tarball.txt
6bdc5cfe38 Doc fix; more consistently refer to "text terminals"
d210d761b1 ; Fix doc strings of overlay-arrow variables
4fd00ff1f7 Fix defcustoms in type-break.el (Bug#66210)
47770b0eca Fix term-scroll-to-bottom-on-output :type
f8bdc8dff0 ; Normalize GNU ELPA :core package statements
63ec6d998d ; * doc/emacs/custom.texi (Early Init File): Improve inde...
a4185f87bd ; Silence macOS 14 warning
d9d6e14a69 ; * lisp/vc/vc.el (vc-next-action): Improve commentary.
d558f38fe5 ; * lisp/emacs-lisp/let-alist.el (let-alist): Fix quoting...
71feee7930 Doc fix in let-alist for keys with nil value
72cc9cf2cd ; Fix typos
2023-10-07 03:46:48 -04:00
Stefan Kangas
f8bdc8dff0 ; Normalize GNU ELPA :core package statements
* lisp/emacs-lisp/let-alist.el:
* lisp/progmodes/project.el: Normalize GNU ELPA :core package
statement.
2023-10-01 01:35:23 +02:00
Dmitry Gutov
dd2053e8cd * lisp/progmodes/project.el: Bump version to 0.10.0. 2023-09-06 23:54:30 +03:00
Dmitry Gutov
62229fb2d1 (project-try-vc): When found non-VC project root, still search for the backend
* lisp/progmodes/project.el (project-try-vc): When finding a
non-VC project root, still try to search for the containing
responsible VC backend, if any (bug#65704).
2023-09-06 23:30:42 +03:00
Damien Cassou
c640e97887 project.el: Fix bug in project-ignores method for VC-aware backend
The variable `backend' was always nil preventing the 25-line long
`when' block from doing anything.  This bug was introduced in commit
785fa80159 "New user option:
project-vc-extra-root-markers". (Bug#65704)

* lisp/progmodes/project.el (project-ignores): Make sure the variable
is initialized, so that backend-specific code is used if any.
2023-09-03 03:12:23 +03:00
Stefan Kangas
9647ddb299 Clean up some safe-local-variable predicates
* lisp/progmodes/project.el: Add comments with a reminder to simplify
'safe-local-variable' predicates when Emacs 28 support is dropped.
(project-vc-ignores): Mark only a list of strings as safe-local.
* lisp/textmodes/reftex-vars.el (reftex-guess-label-type): Use
booleanp for 'safe-local-variable' predicate.  (Bug#65608)
2023-08-30 19:52:53 +02:00
Dmitry Gutov
3907c884f0 project.el: Fixup two recent defcustoms
* lisp/progmodes/project.el (project-file-history-behavior):
Adjust positions inside 'const' forms.
(project-key-prompt-style): Correct the :type form (bug#64799).
2023-08-24 15:26:00 +03:00
Dmitry Gutov
bfafc405fe project-key-prompt-style: New option.
* lisp/progmodes/project.el (project-file-history-behavior):
Add :group and :version tags.
(project-key-prompt-style): New option (bug#64799).

* etc/NEWS: Mention it.
2023-08-23 19:36:56 +03:00
Spencer Baugh
8933c1877d Use current file name for more "other project" future history
In the previous commit we added support for using the current buffer's
file name as future history for project-find-file even when switching
to another project with project-switch-project.  Make this work for
project-find-dir and project-or-external-find-file too.

* lisp/progmodes/project.el (project--find-default-from): Add.
(project-find-file, project-or-external-find-file): Use
project--find-default-from with buffer-file-name.
(project-find-dir): Use project--find-default-from with
default-directory.
2023-08-23 05:28:20 +03:00
Spencer Baugh
e3209923c3 Support adjusting file-name-history to the current project
This adds project-file-history-behavior which has the effect described in
its docstring.  Implementing a sort of sharing of file-name-history
between projects.

* lisp/progmodes/project.el (project-file-history-behavior):
New option.  (bug#63829)
(project--transplant-file-name): Add.
(project--read-file-cpd-relative): Move history manipulations to
project--read-file-name.
(project--read-file-name): New function.  Refer to
project-file-history-behavior.
(project-find-file-in, project-find-dir): Use it.
(project-or-external-find-file): Bind the new option to t, to avoid
touching the external file names.

* etc/NEWS: Announce the new option.

Co-authored-by: Dmitry Gutov <dmitry@gutov.dev>
2023-08-23 05:28:20 +03:00
Spencer Baugh
255b7e1a04 Expand project file names before storing them
Before, whatever project-root returned, we stored as the root
directory of the project in project-list and project-list-file.  This
could lead to duplicate entries or bad behavior if projects were
accessed by different file names, e.g. both /home/user/src/emacs and
~/src/emacs.

Now project-list-file contains only expanded paths and project--list
contains only abbreviated paths.  We abbreviate filenames before
setting project--list, and expand filenames before writing to
project-list-file.  We only do this for local files, though, to avoid
making remote connections; the situation will still be bad for remote
projects, but at least this is an improvement.

* lisp/progmodes/project.el (project--write-project-list): Call
expand-file-name.
(project--read-project-list, project-remember-project)
(project--remove-from-project-list): Call abbreviate-file-name.
2023-08-23 03:07:09 +03:00
Stefan Kangas
fe0d134f48 * lisp/term.el (term--update-term-menu): Simplify. 2023-08-20 18:23:16 +02:00
Spencer Baugh
f38bcf37dc (project-find-file): Allow current file name "other project"'s future history
* lisp/progmodes/project.el (project-find-file):
Allow using the relative file name of the current buffer in "other
project" as well (bug#63829).
2023-08-17 04:16:09 +03:00
Dmitry Gutov
155154f6f1 ; * lisp/progmodes/project.el (project-find-file-in): Update docstring. 2023-08-17 04:16:09 +03:00
Dmitry Gutov
28ae8440c6 Unbreak project-find-file's future history when cpd is not root
* lisp/progmodes/project.el (project-find-file): Pass in
buffer-file-name as absolute name (bug#63829).
(project--read-file-cpd-relative): Make it relative to the
appropriate common parent dir.
2023-08-12 03:58:53 +03:00
Dmitry Gutov
de093d49f2 (project--keymap-prompt): Use help-key-binding face
* lisp/progmodes/project.el (project--keymap-prompt): Use
help-key-binding face and adjust the prompt to fit (bug#64799).
2023-08-12 03:34:53 +03:00
Michael Albinus
479c0543b6 Merge from origin/emacs-29
f2b2c752a5 Fix documentation of saveplace facilities for Dired
4ed9d61c89 ; * lisp/tab-bar.el: Autoload cl--set-substring, as that ...
30976ecd8d ; * lisp/bindings.el (mode-line-modes): Fix typo (bug#650...
8574ef314c Fix loaddef generation with ";;;foo-autoload" cookies in ...
8cbd4a02a2 Delete comment saying that project.el is experimental
2023-08-05 18:18:30 +02:00
Stefan Kangas
8cbd4a02a2 Delete comment saying that project.el is experimental
* lisp/progmodes/project.el (Commentary): Delete comment saying that
the API is "still experimental".  It is to be considered stable
starting with the version released with Emacs 29.
Ref: https://lists.gnu.org/r/emacs-devel/2023-07/msg00415.html
2023-08-04 12:34:14 +02:00
Eli Zaretskii
6572dcc7f5 ; Documentation followup to last change
* lisp/progmodes/project.el (project-uniquify-dirname-transform):
* lisp/uniquify.el (uniquify-dirname-transform): Doc fixes.

* etc/NEWS: Announce the change.
2023-07-26 18:11:49 +03:00
Spencer Baugh
2aec67f4de Support transforming the dirname used by uniquify
By transforming the buffer's directory name, we can add
additional information to use during uniquifying.  A basic
one: uniquifying buffer names based on the project name.
* lisp/progmodes/project.el (project-uniquify-dirname-transform): Add.
* lisp/uniquify.el (uniquify-dirname-transform-default)
(uniquify-dirname-transform): Add.  (Bug#62621)
(uniquify-rationalize-file-buffer-names, uniquify-buffer-file-name):
Use 'uniquify-dirname-transform'.
* test/lisp/uniquify-tests.el (uniquify-home)
(uniquify-project-transform): Add tests.
2023-07-26 17:41:48 +03:00
Eshel Yaron
e0244f5804 ; * lisp/progmodes/project.el (project-current): Doc fix.
Avoid saying that 'project-current' asks specifically for a
directory, as it can also ask for a project's directory by other
identifiers, such as the project's name, when 'project-prompter'
is set to a different value than the default
'project-prompt-project-dir'.  (Bug#64266)
2023-07-13 09:14:28 +03:00
Juri Linkov
d8238df35a * lisp/progmodes/project.el (project-prompt-project-name): Fix order.
Reverse choices in this recently added new command to follow exactly
the same order as in the old function 'project-prompt-project-dir'.
2023-07-10 20:43:13 +03:00
Eli Zaretskii
970f94a2dd Merge from origin/emacs-29
ede3535051 ; Fix last change
8ec786349e Fix apostrophe handling in rust-ts-mode and go-ts-mode (B...
0eba9cf651 * test/infra/Dockerfile.emba (emacs-base): Install also g...
4897c98b6c Fix 'python-util-clone-local-variables'
6b2c8dc905 Revert "Enhance Python font-lock to support multilines"
348e4504c6 Fix typo in calc.texi
03663b8798 Update to Transient v0.4.1
dc7acb1aaf Avoid errors in 'delete-forward-char' deleting static com...
2f94f6de9d Make VS-15 and VS-16 compositions work correctly
753f8aa1f1 Fix project-name for vc-aware backend in non-file buffers
17c7915ab9 ; Fix 'package-install-upgrade-built-in' check for packag...
e252ce26ea Add type_predicate 'is' as keyword in typescript-ts-mode ...
0a354d6578 Fix infloop in info-look.el
83b22139e4 Fix several todo-mode.el item editing bugs (bug#63811)
ed4cd3eddf dockerfile-ts-mode: Prevent empty categories in imenu (Bu...
2e20e318da Brush up doc strings and terminology in plstore.el
372bc1278c Add internal documentation on plstore.el
23a14e7b90 Add compact_constructor_declaration font-locking to java-...
500abc4dc3 * lisp/tmm.el (tmm-completion-delete-prompt): Add more ch...
afc1f32935 Allow to disable the DWIMish behavior of 'x' in package menu
08104c0150 Allow dired to invoke secondary browser
a3063f0bc8 Add a binding for enriched-toggle-markup
d8ba28fa39 Fix order of tmm-menubar when 'tmm-mid-prompt' is nil

# Conflicts:
#	etc/NEWS
2023-06-03 05:50:58 -04:00
Dmitry Gutov
753f8aa1f1 Fix project-name for vc-aware backend in non-file buffers
* lisp/progmodes/project.el (project-name): Make sure
project-vc-name is picked up from dir-locals in all
non-file-visiting buffers too (mentioned in bug#63469).
2023-06-02 05:10:15 +03:00
Mattias Engdegård
5e7c826bfa ; * lisp/progmodes/project.el: avoid warning in loaddefs.
(cherry picked from commit 1eb5faa261)
2023-05-26 15:41:12 +03:00
Mattias Engdegård
1eb5faa261 ; * lisp/progmodes/project.el: avoid warning in loaddefs 2023-05-26 14:33:12 +02:00
Eli Zaretskii
e78318ad2e Merge from origin/emacs-29
aa5158630e Use 'font-lock-extend-region-functions' in python-mode
b7b82ecb2b Fix python-info-docstring-p
f42de74ebe ; * src/lread.c (read0, skip_lazy_string): Fix commentary...
b6b384023a Fix cancellation of Wdired
916c2a19bd Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
f535c0e49d Handle #@00 in new reader in a compatible way (bug#63722)
40a758f5ce ; Minor fixes in documentation of recently-changed VC com...
c0d7447e9d ; * etc/NEWS: Describe the Cairo XCB option.  (Bug#63589)
4205268675 Don't mark selection request events
9f5249d5c8 Disable cairo-xcb support by default
e5f42706ce * lisp/progmodes/project.el: Move :safe from defcustom to...
3afe4a42e9 * lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote v...
b62a2b08b8 Add vc-create/switch/print-branch to menu and update docu...
d292d28229 Fix rare crashes in 'try_window_reusing_current_matrix'
709d902002 Make last Tramp change less invasive
a72a1f24fc ; Fix last change.
5c6517a115 ; * lisp/menu-bar.el (popup-menu): Doc fix.
212884f2bf ; Fix last change.
1b9812af80 ; * etc/PROBLEMS: Document problem with GnuPG 2.4.1.  (Bu...
765edc204d ; Support SQLite3 extensions on macOS
5aadb87d6f Fix 'use-dialog-box-p' and friends

# Conflicts:
#	etc/NEWS
2023-05-26 07:04:03 -04:00
Eli Zaretskii
eacee3e536 Merge from origin/emacs-29
6f6071c526 Avoid duplicate load-path entry when generating package a...
117b29c6f6 ; Improve documentation of Isearch command properties
a347b26cba Disable loading SQLite3 extensions when SQLite3 version i...
fe22bf503f ; * lisp/progmodes/project.el (project-switch-use-entire-...
64dbbde3b7 Fix visiting HTML files encoded in iso-2022 variants
5c95239aca ; Fix markup of some treesit vars in Elisp manual.
6ad041939b Support 'isearch-allow-scroll' in 'pixel-scroll-precision...
ecccdc07a0 shr: allow moving between adjacent anchors
504ef25ef3 ; * etc/NEWS: Fix typos.
d6fb868cdd Fix multihop file name expansion in Tramp
dd3e4e14fd Remove obsolete information from Gnus manual
2a5c946f87 Preserve mark in comint-history-isearch
6b60c8142e Fix systemd unit completion for old versions of systemd
8c56557cd9 Fix Skeletons menu-bar menu in Python modes
58eb38cfb4 ; * etc/NEWS: missing definite article
cf40362869 ; * etc/NEWS: PGTK cannot switch to -new automatically (b...
ead3a2abbf Fix loading SQLite extensions
a6bddd1765 ; * etc/NEWS: Fix typos.
f49fe936ab * etc/NEWS: Note dotimes loop variable scoping change (bu...
cec9333dc5 Fix c-ts-mode--top-level-declarator
f571e8f1bb Improve c-ts-mode font-lock for function names (bug#63390)
42a28ffdc2 * lisp/tab-bar.el: Don't use 'minibuffer-selected-window'...
8e61d23f71 Split windows horizontally in places that use split to cr...
459d08c7fe Fix tree-sitter test (bug#63481)
3bc5efb87e ; * lisp/emacs-lisp/benchmark.el (benchmark-progn): Fix d...

# Conflicts:
#	etc/NEWS
2023-05-26 07:03:07 -04:00
Juri Linkov
e5f42706ce * lisp/progmodes/project.el: Move :safe from defcustom to autoload (bug#63469)
(project-vc-ignores, project-vc-merge-submodules)
(project-vc-include-untracked, project-vc-name)
(project-vc-extra-root-markers, project-kill-buffers-display-buffer-list):
Autoload the line that puts 'safe-local-variable' property on defcustom symbol
instead of using the :safe keyword.
2023-05-25 21:40:38 +03:00
Eli Zaretskii
fe22bf503f ; * lisp/progmodes/project.el (project-switch-use-entire-map): Doc fix. 2023-05-22 21:31:56 +03:00
Dmitry Gutov
4f3dae2b0d project--read-project-buffer: Fixup default-directory if needed
* lisp/progmodes/project.el (project--read-project-buffer):
Make sure that when the read buffer is new, its default-directory
belongs to the project (bug#62974).
2023-04-22 02:27:34 +03:00
Eli Zaretskii
79b5d1022f Merge from origin/emacs-29
db8f207e52 Fix some cases of incomplete code's indentation [c/c++-ts...
589959fb09 project-search: Pipe the list of files through 'file-regu...
2023-04-15 12:43:40 -04:00
Spencer Baugh
9efa6d2cf2 Add support for prompting for projects by name
* lisp/progmodes/project.el (project-prompter):
New user option (bug#62759).
(project-prompt-project-name): New function.
2023-04-11 02:14:57 +03:00
Dmitry Gutov
589959fb09 project-search: Pipe the list of files through 'file-regular-p'
* lisp/progmodes/project.el (project-search): Pipe the list of
files through 'file-regular-p' to skip directories (bug#62735).
2023-04-10 02:09:45 +03:00
Spencer Baugh
b26ccf488e project.el: Use project-name to calculate prefixed buffer name
* lisp/progmodes/project.el (project-prefixed-buffer-name):
Use project-name to calculate prefixed buffer name (bug#62548).
(project-compilation-buffer-name-function): Update doc.
2023-04-09 04:51:37 +03:00
Omar Polo
6c0d821017 (project-try-vc): Remove unused defvar/require
* lisp/progmodes/project.el (project-try-vc):
Remove unused defvar/require (bug#61577).
2023-02-18 15:11:13 +02:00
Dmitry Gutov
a40b1745d4 (project-vc-backend-markers-alist): Add entry for vc-got
* lisp/progmodes/project.el (project-vc-backend-markers-alist):
Add entry for vc-got (bug#61577).  Bump the version.
2023-02-18 00:55:03 +02:00
Dmitry Gutov
18e96ed7c8 project.el: Extract backend->marker association for a defvar
* lisp/progmodes/project.el (project-vc-backend-markers-alist):
Extract from 'project-try-vc'.
(project-try-vc): Update accordingly (bug#61577).
2023-02-18 00:54:39 +02:00
Dmitry Gutov
128a999bfe Make project-current not error out inside non-existent dirs
* lisp/progmodes/project.el (project-try-vc):
Use condition-case to catch 'file-missing' (bug#61107).

* test/lisp/progmodes/project-tests.el
(project-vc-nonexistent-directory-no-error): New test.
2023-01-28 03:20:29 +02:00
Dmitry Gutov
67ee627c38 (project-try-vc): Add string-start and string-end anchors to marker-re
* lisp/progmodes/project.el (project-try-vc):
Add string-start and string-end anchors to marker-re (bug#60956).
2023-01-20 18:44:17 +02:00
Dmitry Gutov
f16cc7c49c ; project.el: Bump version 2023-01-10 02:07:12 +02:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Juri Linkov
cfbfd393b4 * lisp/progmodes/project.el (project--read-file-cpd-relative): Optimize. 2022-12-19 21:47:28 +02:00
Juri Linkov
399433cc2b * lisp/progmodes/project.el: Filter out empty strings from history (bug#58447)
(project--read-file-cpd-relative): Do not include empty strings (when
prefix has the same length as the string).
2022-12-19 19:54:08 +02:00
Dmitry Gutov
c8d75046a2 When completing relative project file names, use relative history
* lisp/progmodes/project.el: Require 'cl-lib'.

* lisp/progmodes/project.el (project--read-file-cpd-relative):
Pre-process history entries around completing-read (bug#58447).

This includes both filtering by common-parent-directory prefix and
mapping into relative names.
2022-12-16 00:46:20 +02:00
Juri Linkov
a99d0e7e6c Support a function in the BUFFER-LIST arg of list-buffers-noselect (bug#59935)
* lisp/buff-menu.el (Buffer-menu-buffer-list): New buffer-local variable.
(list-buffers-noselect): Set Buffer-menu-buffer-list to 'buffer-list'
that now keeps the buffer-local value of the provided buffer list
or a function that returns the buffer list.
(list-buffers--refresh): Handle buffer-list and Buffer-menu-buffer-list
as a function and as a list.

* lisp/progmodes/project.el (project-list-buffers): Let-bind
'buffer-list-function' used by both legacy code and the new version
of list-buffers-noselect that supports its arg BUFFER-LIST as a function.
2022-12-13 19:48:45 +02:00
Dmitry Gutov
04b7e01885 ; project.el: Bump version. 2022-12-12 01:14:14 +02:00
Dmitry Gutov
33a8415eb7 Use 'project--value-in-dir' for 'project-vc-include-untracked' too
* lisp/progmodes/project.el (project--vc-list-files): Use
'project--value-in-dir' for 'project-vc-include-untracked' too.
So that is can be reliably set through dir-locals.
2022-12-09 23:21:28 +02:00
Dmitry Gutov
d268ab1c5d Bring back the project--value-in-dir logic
Essentialy revert commit 2389158a31, restoring the changes
and fixing the conflicts.  Motivated by the problem brought up in
bug#59722 (behavior of project-find-files/regexp when switching
projects).  We should find other ways to improve performance.

* lisp/progmodes/project.el
(project--value-in-dir, project--vc-merge-submodules-p): Restore.
(project-try-vc, project-files, project--vc-list-files)
(project-ignores, project-buffers): Use.

* test/lisp/progmodes/project-tests.el
(project-vc-supports-project-in-different-dir): New test.

* test/lisp/progmodes/project-resources/.dir-locals.el:
* test/lisp/progmodes/project-resources/foo:
* test/lisp/progmodes/project-resources/etc: New files.
2022-12-09 18:19:36 +02:00
Randy Taylor
1b567f5a67 Use file-name-nondirectory to determine default project-name
* lisp/progmodes/project.el (project-name):
Use file-name-nondirectory instead of file-name-base (bug#59756).
2022-12-02 17:12:43 +02:00