1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-22 05:31:01 -08:00
Commit graph

317 commits

Author SHA1 Message Date
Dario Gjorgjevski
ddc4bba413 Do not search the global keymap in project--keymap-prompt
* lisp/progmodes/project.el: (project--keymap-prompt) Pass
project--keymap-prompt as a list to where-is-internal so that the
global keymap is not searched at all (bug#47501).
2021-04-05 18:15:16 +02:00
Dmitry Gutov
4798dc0c51 Fix C-u project-find-regexp's default dir
* lisp/progmodes/project.el (project-find-regexp):
Default read-directory-name to the current default-directory when
called with C-u (bug#47012).
2021-04-02 01:24:57 +03:00
Juri Linkov
b6552b1d7c * lisp/progmodes/project.el (project-regexp-history-variable): New variable.
(project--read-regexp): Use it as HISTORY arg of 'read-regexp' with
'grep-regexp-history' default (bug#47012).
2021-03-29 22:34:51 +03:00
Dmitry Gutov
c678b137ab Fix typo
* lisp/progmodes/project.el (project-remove-known-project):
Fix typo (bug#47287).
2021-03-25 01:20:26 +02:00
Theodor Thornhill
275be44dd4 Add command project-remove-known-project
* etc/NEWS: Mention the new command.

* lisp/progmodes/project.el (project--remove-from-project-list): Add
new argument, report-message, used to signal various messages when
removal has happened.

* lisp/progmodes/project.el (project-remove-known-project): New
command that removes the selected directory from the project-list-file.

* lisp/progmodes/project.el (project-current): Add the report message.

* doc/emacs/maintaining.text: Add information about the new command to
the manual.
2021-03-25 01:15:50 +02:00
Theodor Thornhill
70b64e0d04 Use pop-to-buffer-same-window for shell
* lisp/progmodes/project.el (project-shell): Behave the same way as
'M-x project-eshell'.
* lisp/shell.el (shell): Behave the same way as 'M-x eshell'.
* etc/NEWS: Add news entry describing the change.
* lisp/tutorial.el: Use lexical-binding.
2021-03-21 14:40:32 +02:00
Dmitry Gutov
c28ba11778 Leave signaling the exact error to cl-generic's internals
* lisp/progmodes/project.el (project-root): Extract default
definition to a new method, predicated on a context
(https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00771.html).
2021-03-18 02:35:10 +02:00
Dmitry Gutov
6e796b52e1 Stop project-root from going into infinite recursion
* lisp/progmodes/project.el (project--within-roots-fallback):
New variable.
(project-root, project-roots): Use it (bug#47168).
2021-03-17 18:49:14 +02:00
Basil L. Contovounesios
17cdb732a7 ; Fix some typos. 2021-03-11 22:51:42 +00:00
Dmitry Gutov
de9b19cbfd (project-switch-commands): Remove the ###autoload instruction
* lisp/progmodes/project.el (project-switch-commands):
Remove the ###autoload instruction.  It's unnecessary and can
cause surprises in some circumstances (bug#46986).
2021-03-10 03:08:37 +02:00
Dmitry Gutov
8538108132 Strip text properties from the default string
* lisp/progmodes/project.el (project--read-regexp):
Strip text properties from the default string (bug#47012).
2021-03-09 04:06:01 +02:00
Simen Heggestøyl
432c1aaa80 Use pop-to-buffer-same-window' in project-eshell'
* lisp/progmodes/project.el (project-eshell): Use
`pop-to-buffer-same-window' instead of `pop-to-buffer' to match the
behavior of `M-x eshell'.
2021-03-08 12:58:10 +01:00
Dmitry Gutov
06e1e5eeac Revert "Fix the previous change"
This reverts commit fc37dc298f.

That change was only needed in the release branch.
2021-02-06 22:59:00 +02:00
Glenn Morris
3c0f86312e Merge from origin/emacs-27
8c27af3ff4 Clarify how transient indentation modes are exited in the ...
fc37dc298f Fix the previous change
2021-02-06 08:05:29 -08:00
Dmitry Gutov
fc37dc298f Fix the previous change
* lisp/progmodes/project.el (project-find-regexp):
Fix the previous change (project-root is not defined in this version).
(project-or-external-find-regexp): Same.
2021-02-05 01:17:09 +02:00
Dmitry Gutov
b99848c72c Bind default-directory to the project root
* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.

(cherry picked from commit c07ebfcbe0)
2021-02-04 22:06:16 +02:00
Dmitry Gutov
c07ebfcbe0 Bind default-directory to the project root
* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.
2021-02-04 03:38:42 +02:00
João Távora
2a71831eb3 Allow project/xref packages to be used in Emacs 26.1
* lisp/progmodes/project.el: Change Package-Requires to Emacs 26.1
(bug#44671).

* lisp/progmodes/xref.el: Ditto.
2021-01-28 04:18:12 +01:00
Juri Linkov
5065698c81 Move the ‘declare’ form before the interactive spec in 10 functions.
* lisp/emacs-lisp/package.el (package-menu-hide-package):
* lisp/font-lock.el (font-lock-debug-fontify):
* lisp/image.el (image-jpeg-p):
* lisp/mail/flow-fill.el (fill-flowed-test):
* lisp/mh-e/mh-speed.el (mh-speed-toggle, mh-speed-view):
* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command, project-compile):
* lisp/progmodes/sh-script.el (sh-assignment):
Fix special forms to follow in this order: docstring, declare, interactive.
2021-01-20 21:19:23 +02:00
Dmitry Gutov
8725f7690a Declare some project commands interactive-only
* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command, project-compile):
Declare interactive-only (bug#45765).
2021-01-19 21:50:11 +02:00
Kévin Le Gouguec
1513ee37a4 Change default-directory before prompting in project-compile
This causes command completion to work from the project root, letting
users complete top-level folders, make targets, etc (bug#45765).

* lisp/progmodes/project.el (project-compile): Simplify using
call-interactively, as done with project(-async)-shell-command.
2021-01-16 06:00:22 +02:00
Dmitry Gutov
665b4e7c4e Proof some searches and file listings against symlinks
* lisp/progmodes/project.el (project--files-in-directory):
Make sure the directory includes the trailing slash in case it's
a symlink, discussed in
https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00345.html.

* lisp/progmodes/xref.el (xref-matches-in-directory): Same.

* lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search):
Same.
2021-01-06 23:07:22 +02:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
8c1fe1e5ef Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2021-01-01 00:32:32 -08:00
Dmitry Gutov
32e781b2f1 Jamie Beardslee <beardsleejamie@gmail.com>
* lisp/progmodes/project.el (project-execute-extended-command):
New command.
(project-prefix-map): Binding for it.

Copyright-paperwork-exempt: yes
2020-12-20 00:16:48 +02:00
Mattias Engdegård
6858119bcd ; * lisp/progmodes/project.el (project-switch-use-entire-map): Typo 2020-12-14 12:33:05 +01:00
Dmitry Gutov
51698f77dd Remove the duplication from project-switch-commands's config
Based on an older patch by Philip K (https://debbugs.gnu.org/41890#127).

* lisp/progmodes/project.el: (project-switch-commands): Change to
'defcustom', alter the value format, add :type.
(project-switch-use-entire-map): New option.
(project--keymap-prompt, project-switch-project):
Update accordingly, while keeping compatibility with user-defined
values in the previous format (for some transition period).

Co-authored-by: Philip K. <philipk@posteo.net>
2020-12-13 22:50:55 +02:00
Dmitry Gutov
2d790c6c57 Bump project.el version
* lisp/progmodes/project.el: Bump the version.
2020-12-13 04:12:35 +02:00
Dmitry Gutov
5af6a87d51 Allow specifying the project to switch to programmatically
* lisp/progmodes/project.el (project-switch-project):
Allow specifying the project to switch to programmatically
(bug#45134).
2020-12-09 22:56:48 +02:00
Dmitry Gutov
5f45fc7ee2 Improve .gitignore and project-vc-ignores handling
* lisp/progmodes/project.el (project-ignores):
Convert .gitignore entries more faithfully.
(project--vc-list-files): Convert "our" ignore entries to
"proper" globs, which is what Git pathspec requires.
2020-12-02 04:28:35 +02:00
Dmitry Gutov
e19c5d4348 Use project--value-in-dir
* lisp/progmodes/project.el (project-files):
Use 'project--value-in-dir'.  To have any changes in
'project-vc-ignores' take effect immediately.
2020-12-02 01:41:40 +02:00
Dmitry Gutov
fa2c942176 Improve docstrings
* lisp/progmodes/project.el (project-find-file)
(project-or-external-find-file): More accurate docstrings (bug#44588).
2020-11-30 03:33:14 +02:00
Lars Ingebrigtsen
b5ff3e0e0c project-or-external-find-file doc string fix
* lisp/progmodes/project.el (project-or-external-find-file): Doc
string fix -- it's not "recognizing" file names (bug#44588).
2020-11-14 16:24:38 +01:00
Lars Ingebrigtsen
b21015c9c2 Clarify project-find-file doc string
* lisp/progmodes/project.el (project-find-file): Don't say
anything about recognizing file names, as that may lead the user
to think that it'll check whether the string at point is an
existing file (bug#44588).
2020-11-12 13:36:19 +01:00
Juri Linkov
74de386a8a * lisp/progmodes/project.el: Don't truncate the saved project list.
* lisp/progmodes/project.el (project--write-project-list):
Let-bind print-length and print-level to nil to not truncate the
saved project list with unreadable ellipsis.
2020-11-08 21:45:02 +02:00
Manuel Uberti
43431f7108 * lisp/progmodes/project.el (project--files-in-directory): Fix formatting
Copyright-paperwork-exempt: yes
2020-11-04 10:42:20 -05:00
Lars Ingebrigtsen
8fb761af6b Fix undefined function in project-compile
* lisp/progmodes/project.el (project-compile): Require compile.el
before using functions from the file (bug#44009).
2020-10-15 13:20:22 +02:00
Dmitry Gutov
0a5e9cf262 Mention two more functions in the commentary
* lisp/progmodes/project.el:
Mention two more functions in the commentary (bug#43595).
2020-10-08 02:41:12 +03:00
Stefan Kangas
462dbc1cb2 ; Fix typos 2020-09-21 14:26:42 +02:00
Stefan Kangas
3b79ff6179 Fix typo in project-kill-buffers
* lisp/progmodes/project.el (project-kill-buffers): Fix typo.
Reported by Manuel Uberti <manuel.uberti@inventati.org>
2020-09-18 20:32:15 +02:00
Dmitry Gutov
1283d3a5b2 Fix typo, reported by Manuel Uberti
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Fix typo.
2020-09-18 12:15:46 +03:00
João Távora
5142149758 Unbreak project.el, the GNU Elpa package, for Emacs 26.3
Fixes: bug#43164

* lisp/progmodes/project.el: Bump to 0.5.2
(bound-and-true-p): Check that tab-prefix-map is bound before binding.
2020-09-03 13:42:55 +01:00
Stefan Kangas
8d3160ec08 Add commands to run shell commands in project root
* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command): New commands to run 'async-shell-command'
and 'shell-command' in project's root directory.
(project-prefix-map): Bind commands to '!' and '&'.
* doc/emacs/maintaining.texi (Project File Commands): Document the
new commands.
* etc/NEWS: Announce the new commands.
2020-08-28 19:27:47 +02:00
Dmitry Gutov
319463920c Unbreak project-find-regexp in Emacs 26.3 (bug#42765)
* lisp/progmodes/project.el: Depend on xref.  Bump the version.

* lisp/progmodes/xref.el: Remove 'project' from the list of
dependencies.  Depending on Emacs 26.3 already ensures that some
version is available.  Bump the version.
(xref--process-file-region): Move from project.el with a rename.
Update the sole caller.
(xref-backend-references): Make compatible with old project.el.
Update the docstring.
2020-08-14 17:21:55 +03:00
Philip K
cc365ca6d8 Remove usages of assoc-delete-all in project.el
assoc-delete-all is not available for users who have installed
project.el via ELPA on older Emacs versions (bug#42668).

* lisp/progmodes/project.el
(project-remember-project, project--remove-from-project-list):
Replace assoc-delete-all with equivalent alternatives.
2020-08-06 17:49:53 +03:00
Philip K
2ab66c9f9b Replace project-kill-buffers-ignores with project-kill-buffer-conditions
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Replace the project-kill-buffers-ignores user option.
(project--kill-buffer-check): New function.
(project--buffers-to-kill): New function.
(project-kill-buffers): Use them.  Add the NO-CONFIRM argument.
2020-07-29 01:21:56 +03:00
Dmitry Gutov
4d195bb7d0 Fix argument reference
* lisp/progmodes/project.el
(project-display-buffer-other-frame): Fix argument reference.
2020-07-27 03:05:16 +03:00
Dmitry Gutov
33667e02e6 Move project--value-in-dir to a different section
* lisp/progmodes/project.el (project--value-in-dir):
Move closer to its uses.
2020-07-27 03:04:09 +03:00
Dmitry Gutov
7551aff22c Bind switch-to-buffer-obey-display-actions to t
* lisp/progmodes/project.el (project--other-place-command):
Bind switch-to-buffer-obey-display-actions to t, so that
project-other-window-command and friends can affect
project-switch-to-buffer.
2020-07-27 02:57:06 +03:00
Sean Whitton
b63c5a7efc Add project other place commands
* lisp/progmodes/project.el (project-other-window-map,
project-other-frame-map, project--other-place-command,
project-other-window-command, project-other-frame-command,
project-other-tab-command): Add these functions and maps.
* lisp/progmodes/project.el: Bind project-other-window-command to C-x
4 p, project-other-frame-command to C-x 5 p and
project-other-tab-command to C-x t p (bug#42210).
2020-07-27 02:56:50 +03:00