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

8091 commits

Author SHA1 Message Date
Tassilo Horn
7d7bd1b2d3 ;Fix error in commit dcdf6d7124 2020-06-18 12:45:15 +02:00
Tassilo Horn
dcdf6d7124 Make bug-reference auto-setup work in vc-dir or Magit like modes
* lisp/progmodes/bug-reference.el (bug-reference-try-setup-from-vc):
Use default-directory if not in a file-visiting buffer to determine
VC URL.
2020-06-18 10:39:01 +02:00
Philip K
7c177ecb84 New command: project-kill-buffers
* lisp/progmodes/project.el
(project-kill-buffers-skip-conditions): New variable.
(project--buffer-list): New function.
(project-kill-buffers): New command (bug#41868).
2020-06-18 04:04:13 +03:00
Dmitry Gutov
4b9b9cb43a ; Add a heading and a binding 2020-06-18 02:11:51 +03:00
Theodor Thornhill
eb3b03c1c6 New command: project-switch-to-buffer
* lisp/progmodes/project.el (project-switch-to-buffer): New command.
2020-06-18 02:09:41 +03:00
Theodor Thornhill
2f231fcfb7 Add global bindings for project commands
* lisp/progmodes/project.el
(project-prefix-map): New variable.
Add the new keymap to ctl-x-map.
2020-06-18 02:05:31 +03:00
Dmitry Gutov
2cc48d3d10 Fix setting project-vc-merge-submodules via .dir-locals.el
* lisp/progmodes/project.el
(project--vc-merge-submodules-p): New function.
(project-try-vc, project--vc-list-files): Use it.
2020-06-18 01:30:32 +03:00
Tassilo Horn
5502eedf90 Auto-setup for bug-reference-mode
Tries to guess suitable bug-reference-bug-regexp and
bug-reference-url-format values based on version control URL (in file
buffers) and mail information (in Gnus summary and article buffers).

* lisp/progmodes/bug-reference.el
(bug-reference--maybe-setup-from-vc): New defun.
(bug-reference-setup-from-vc-alist): New defvar defining setup rules
based on version control URL.
(bug-reference-try-setup-from-vc): New defun using above defvar.
(bug-reference--maybe-setup-from-mail): New defun.
(bug-reference-setup-from-mail-alist): New defvar defining setup rules
based on mail/newsgroups and header values.
(bug-reference-try-setup-from-gnus): New defun using above defvar.
(bug-reference--try-setup-gnus-article): New defun.
(bug-reference--run-auto-setup): New defun.
(bug-reference-mode): Call bug-reference--run-auto-setup as
:after-hook.
(bug-reference-prog-mode): Call bug-reference--run-auto-setup as
:after-hook.
2020-06-17 22:03:50 +02:00
Dmitry Gutov
3bff583337 Bump the project.el package version
* lisp/progmodes/project.el: Bump the package version.
2020-06-17 01:27:37 +03:00
Dmitry Gutov
1d2c0a2527 Change the key for project-find-regexp
* lisp/progmodes/project.el (project-switch-commands):
Change the key for 'project-find-regexp' to 'g', which seems to be
the consensus.
2020-06-17 01:24:40 +03:00
Dmitry Gutov
6e777a6639 Make project file name completion adhere to customization
* lisp/progmodes/project.el (project-find-file-in):
Bind completion-ignore-case to the value of
read-file-name-completion-ignore-case (bug#41902).
2020-06-17 01:24:40 +03:00
Michael R. Mauger
82a632edc8 2020-03-29 Michael R. Mauger <michael@mauger.com>
* lisp/progmodes/sql.el (sql-add-product): Re-correct argument
       spec.  Previous change was due to my mistake; I have
       resolved back to the prior behavior (Bug#39960).
       * test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
       test to insure I don't make the same mistake again.
2020-06-13 18:36:27 -04:00
Philip K
f4b99b34ed Mark python-shell-virtualenv-root as safe for directories
* lisp/progmodes/python.el (python-shell-virtualenv-root):
Require a directory name.  (Bug#41619)
2020-06-13 10:40:13 +03:00
Konstantin Kharlamov
a3474c59de Highlight typed variables in Python
* progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Recognize
typed variables like "foo: int = 1" as well.  (Bug#41684)
2020-06-13 10:31:13 +03:00
Basil L. Contovounesios
9e04d0f289 ; Simplify last change
* lisp/progmodes/project.el (project--read-project-list): We are
already at BOB after insert-file-contents.
2020-06-10 01:00:01 +01:00
Simen Heggestøyl
d4e7087b68 Save project list as lisp data
Save the project list file as lisp data instead of line separated
strings to make it more extendable in the future.

* lisp/progmodes/project.el (project--read-project-list)
(project--write-project-list, project--add-to-project-list-front)
(project--remove-from-project-list): Adjust to `project--list' now
being an alist.
2020-06-09 20:45:55 +02:00
Alan Mackenzie
5a6e790247 Orthographical amendments to commit 145aab0672
* etc/NEWS: Correct the spelling of CC Mode.

* lisp/progmodes/cc-fonts.el (doxygen-font-lock-doc-comments): Replace curly
  quotes in comments by ASCII ones.
2020-06-09 16:58:52 +00:00
Alan Mackenzie
6cb557e7a5 * lisp/progmodes/js.el (js-mode): Remove second call to c-init-language-vars
This spurious second call fouled up already set configuration variables.
Fixes bug #41649.
2020-06-07 15:14:15 +00:00
Simen Heggestøyl
f4568bac56 Change default project list filename to "projects"
* lisp/progmodes/project.el (project-list-file): Change the default
filename to "projects".
2020-06-04 20:16:54 +02:00
Simen Heggestøyl
e7fb0a48a6 Use characters for keys in project-switch-commands
* lisp/progmodes/project.el (project-switch-commands): Use
characters for keys instead of string for better future
compatibility with 'read-multiple-choice'.
(project-switch-project): Adjust to above change.
2020-06-04 20:14:02 +02:00
Simen Heggestøyl
b41be0ee83 ; Small cleanup in project.el
* lisp/progmodes/project.el (project--add-to-project-list-front):
Minor simplification after recent changes.
2020-06-04 20:11:58 +02:00
Basil L. Contovounesios
74966904b0 ; Clean up recent project.el additions
* lisp/progmodes/project.el (project): Add :version tag.
(project-list-file): Fix custom :type and add :version tag.
2020-06-03 11:45:54 +01:00
Dmitry Gutov
1fe1c84b18 Small cleanup
* lisp/progmodes/project.el (project--add-to-project-list-front):
Small simplification.
(project--remove-from-project-list): Remove oudated comment.
2020-06-03 00:33:14 +03:00
Dmitry Gutov
8b71bfb891 project-list-file: New user option
* lisp/progmodes/project.el (project): New custom group.
(project-vc): Use it as parent.
(project-vc-merge-submodules): Tag with Emacs version.
(project-read-file-name-function): Assign to the 'project' group.
(project-list-file): New user option (bug#41600).
(project--write-project-list, project--read-project-list): Use it.
2020-06-03 00:27:29 +03:00
Simen Heggestøyl
9afcf2bd39 Write project list to file only when changed
* lisp/progmodes/project.el (project--add-to-project-list-front):
Write the project list to file only when it has changed.
2020-06-02 19:27:55 +02:00
Simen Heggestøyl
e7065459d9 Remove 'project--ensure-file-exists'
* lisp/progmodes/project.el (project--ensure-file-exists): Remove.
(project--read-project-list): Set 'project--list' to nil when the
project list file doesn't exist.
2020-06-02 19:12:19 +02:00
Paul Eggert
e10bd9e249 Merge from origin/emacs-27
44c0e074f7 * doc/emacs/buffers.texi (Icomplete): Mention icomplete-mi...
68b6dad1d8 Be more aggressive in marking objects during GC
36f508f589 ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.
cc340da1fe Fix bug #41618 "(byte-compile 'foo) errors when foo is a m...
41232e6797 Avoid crashes due to bidi cache being reset during redisplay
f72bb4ce36 * lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize ...
d3e0023aaa ; * etc/TODO: Fix formatting.  (Bug#41497)
a8ad94cd2f Fix mingw.org's MinGW GCC 9 warning about 'execve'

# Conflicts:
#	lisp/tab-bar.el
#	nt/inc/ms-w32.h
#	src/alloc.c
2020-06-01 22:26:32 -07:00
Juri Linkov
2c1e5b9e77 * lisp/progmodes/project.el (project-vc-dir, project-shell): New commands.
(project-compile): Add args and interactive spec like in 'compile'.
(project-switch-commands): Bind project-vc-dir to "v",
project-shell to "s", and rebind project-find-regexp from "s" to "r".

* doc/emacs/maintaining.texi (Project File Commands):
Describe project-vc-dir and project-shell.
2020-06-02 02:01:25 +03:00
Basil L. Contovounesios
6d6ec1bc1e ; Fix some recent byte-compilation warnings
For discussion of the autoloaded function declaration, see
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00910.html.

* lisp/dnd.el (dnd-handle-one-url): It is no longer necessary to
declare the autoloaded function browse-url-select-handler after
ldefs-boot.el was updated.
* lisp/progmodes/elisp-mode.el: Declare xref.el function to silence
byte-compiler.
2020-06-01 16:56:26 +01:00
Alan Mackenzie
1b6bd97440 Bug #41061 patch: Fix typos and amend code slightly
* lisp/progmodes/cc-align.el (c-lineup-ternary-bodies)
* doc/misc/cc-mode.texi (Operator Line-Up): Fix typos and amend code.
2020-06-01 15:21:54 +00:00
Dmitry Gutov
f929258646 Change xref-find-apropos to pass PATTERN to backend verbatim
* lisp/progmodes/xref.el (xref-backend-apropos): Rename this
generic's second arg to PATTERN, to clarify that it should be
handled entirely in the backend, with no pre-processing by the
command.
(xref-find-apropos): Update accordingly, but keep compatibility
with backends in older Emacs versions.
(xref-apropos-regexp): Extract from xref-find-apropos.

* lisp/progmodes/etags.el (xref-backend-apropos): Use it here.

* lisp/progmodes/elisp-mode.el (xref-backend-apropos): And here.
2020-06-01 05:28:43 +03:00
Dmitry Gutov
780f674a82 Don't return transient projects with MAYBE-PROMPT=nil
* lisp/progmodes/project.el (project-current): Only return
transient projects when called with non-nil MAYBE-PROMPT.
Also only update the known projects lists in this case.
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03375.html).
2020-05-30 19:57:38 +03:00
Dmitry Gutov
ba292ea330 project-prompt-project-dir: Use more consistent prompts
* lisp/progmodes/project.el (project-prompt-project-dir):
Use more consistent prompts.
2020-05-29 21:37:12 +03:00
Dmitry Gutov
7af4e72de2 ; project.el: Update TODO 2020-05-29 02:05:05 +03:00
Simen Heggestøyl
d97f224fd0 Merge branch 'feature/project-switching' 2020-05-28 17:02:17 +02:00
Simen Heggestøyl
b7dffcb501 Simplify the previous commit
* lisp/progmodes/project.el (project--read-project-list): Simplify the
previous commit by utilizing the optional OMIT-NULLS argument to
'split-string'.
2020-05-27 17:26:25 +02:00
Alan Mackenzie
5467aac131 Introduce some Objective-C 2.0 keywords. This fixes bug #5953
* lisp/progmodes/cc-langs.el (c-other-decl-kwds): New keywords @property,
@dynamic, @synthesize, @compatibility_alias.
(c-protection-kwds): New keywords @package, @required, @optional.
(c-block-stmt-1-kwds): New keyword @autoreleasepool.
(c-constant-kwds): New keywords IBAction, IBOutlet.
2020-05-26 20:08:15 +00:00
Simen Heggestøyl
449810bbe9 Avoid adding the empty string to the project list
* lisp/progmodes/project.el (project--read-project-list): Avoid adding
the empty string to the project list.
2020-05-26 17:42:32 +02:00
Simen Heggestøyl
5a48ede3ac Adapt project functions to the new 'project-root'
* lisp/progmodes/project.el (project-dired, project-eshell)
(project--read-project-list, project--write-project-list)
(project--add-to-project-list-front)
(project--remove-from-project-list): Adapt to the new 'project-root'.
2020-05-26 17:42:24 +02:00
Dmitry Gutov
0b057ca9bc Teach project-current to inhibit the prompt
* lisp/progmodes/project.el:
(project-current-inhibit-prompt): New variable.
(project-current, project-switch-project): Use it.
2020-05-26 17:41:45 +02:00
Simen Heggestøyl
70824683fd Rename 'project-switch-menu' to 'project-switch-commands'
* lisp/progmodes/project.el (project-switch-commands): Rename from
'project-switch-menu'.
(project--keymap-prompt, project-switch-project): Update after the
renaming.
2020-05-26 17:41:24 +02:00
Simen Heggestøyl
c6e80fdb65 Simplify 'project--keymap-prompt' a bit
* lisp/progmodes/project.el: Remove seq requirement.
(project--keymap-prompt): Simplify with 'mapconcat'.
2020-05-26 17:41:24 +02:00
Simen Heggestøyl
c6f56bd279 Turn project switch menu var into a public alist
* lisp/progmodes/project.el: Require seq.
(project--switch-alist): Remove in favor of the public
'project-switch-menu'.
(project-add-switch-command): Remove; not needed now that
'project-switch-menu' is a public alist.
(project-switch-menu): New variable mapping keys to project switching
menu entries.
(project--keymap-prompt, project-switch-project): Adjust to the new
'project-switch-menu' format.
2020-05-26 17:41:24 +02:00
Simen Heggestøyl
46bb2cbd00 Change dispatch binding of 'project-find-regexp'
* lisp/progmodes/project.el: Change default dispatch binding of
'project-find-regexp' to 's'.
2020-05-26 17:41:24 +02:00
Dmitry Gutov
02e1ee95a8 Integrate project-switch-project with project-find-regexp
* lisp/progmodes/project.el:
(project-find-regexp): Add to the list of 'switch' commands.
(project-switch-project): Use call-interactively so that the
former can read its arguments.
2020-05-26 17:41:24 +02:00
Dmitry Gutov
afb96da611 Move project-dired and project-eshell higher
* lisp/progmodes/project.el:
(project-dired, project-eshell): Move higher in the file,
according to their universal utility.
2020-05-26 17:41:24 +02:00
Dmitry Gutov
c8cca68751 Use an alist instead of a keymap
* lisp/progmodes/project.el:
(project--switch-alist): New variable to use instead of
project-switch-keymap, which remove.  Update all references.
2020-05-26 17:41:24 +02:00
Dmitry Gutov
9422fb5e68 Improve project name completion
* lisp/progmodes/project.el:
(project-prompt-project-dir): Use REQUIRE-MATCH=t.  Make sure the
'substring' completion style is used by default.
2020-05-26 17:41:24 +02:00
Dmitry Gutov
9f88356b67 Simplify a little, and avoid duplicate commands
* lisp/progmodes/project.el:
(project--transient-p) Remove, not needed.
(project-current): Move project-find based on the directory here.
(project--remove-from-project-list): Only write if the list changed.
(project-find-project): Rename to project-prompt-project-dir.
Simply return the directory selected by the user.
(project-switch-project-find-file): Remove.
(project-switch-project-dired): Rename to project-dired and make
it follow the convention of existing projec tcommands.
(project-switch-project-eshell): Ditto.
(project-switch-project): Instead of passing the project instance
to the command, just bind default-directory.
2020-05-26 17:41:24 +02:00
Simen Heggestøyl
afb7602a24 Add project switching functionality
* lisp/progmodes/project.el: Require subr-x.
(project--transient-p, project--ensure-file-exists)
(project--read-project-list, project--ensure-read-project-list)
(project--write-project-list)
(project--add-to-project-list-front)
(project--remove-from-project-list, project-find-project)
(project-switch-project-find-file, project-switch-project-dired)
(project-switch-project-eshell, project-add-switch-command)
(project--keymap-prompt, project-switch-project): New functions.
(project--list, project-switch-keymap): New variables.
(project-current): Call 'project-find-project' when no project is
current.
2020-05-26 17:41:22 +02:00