Update packages
This commit is contained in:
parent
dc69a7ed04
commit
3303f1ac3a
@ -1,4 +0,0 @@
|
|||||||
(define-package "erlang" "20160831.740" "Erlang major mode" 'nil)
|
|
||||||
;; Local Variables:
|
|
||||||
;; no-byte-compile: t
|
|
||||||
;; End:
|
|
@ -1,9 +1,9 @@
|
|||||||
;;; erlang-autoloads.el --- automatically extracted autoloads
|
;;; erlang-autoloads.el --- automatically extracted autoloads
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
|
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||||
|
|
||||||
;;;### (autoloads nil "erlang" "erlang.el" (22490 24938 259400 312000))
|
;;;### (autoloads nil "erlang" "erlang.el" (22518 4433 253987 51000))
|
||||||
;;; Generated autoloads from erlang.el
|
;;; Generated autoloads from erlang.el
|
||||||
|
|
||||||
(autoload 'erlang-mode "erlang" "\
|
(autoload 'erlang-mode "erlang" "\
|
||||||
@ -118,8 +118,8 @@ editing control characters:
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "erlang-start" "erlang-start.el" (22490 24938
|
;;;### (autoloads nil "erlang-start" "erlang-start.el" (22518 4433
|
||||||
;;;;;; 243400 358000))
|
;;;;;; 225986 910000))
|
||||||
;;; Generated autoloads from erlang-start.el
|
;;; Generated autoloads from erlang-start.el
|
||||||
|
|
||||||
(let ((a '("\\.erl\\'" . erlang-mode)) (b '("\\.hrl\\'" . erlang-mode))) (or (assoc (car a) auto-mode-alist) (setq auto-mode-alist (cons a auto-mode-alist))) (or (assoc (car b) auto-mode-alist) (setq auto-mode-alist (cons b auto-mode-alist))))
|
(let ((a '("\\.erl\\'" . erlang-mode)) (b '("\\.hrl\\'" . erlang-mode))) (or (assoc (car a) auto-mode-alist) (setq auto-mode-alist (cons a auto-mode-alist))) (or (assoc (car b) auto-mode-alist) (setq auto-mode-alist (cons b auto-mode-alist))))
|
||||||
@ -132,7 +132,7 @@ editing control characters:
|
|||||||
|
|
||||||
;;;### (autoloads nil nil ("erlang-eunit.el" "erlang-flymake.el"
|
;;;### (autoloads nil nil ("erlang-eunit.el" "erlang-flymake.el"
|
||||||
;;;;;; "erlang-pkg.el" "erlang-skels-old.el" "erlang-skels.el" "erlang-test.el"
|
;;;;;; "erlang-pkg.el" "erlang-skels-old.el" "erlang-skels.el" "erlang-test.el"
|
||||||
;;;;;; "erlang_appwiz.el") (22490 24938 297767 827000))
|
;;;;;; "erlang_appwiz.el") (22518 4433 269987 132000))
|
||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
4
elpa/erlang-20161005.305/erlang-pkg.el
Normal file
4
elpa/erlang-20161005.305/erlang-pkg.el
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
(define-package "erlang" "20161005.305" "Erlang major mode" 'nil)
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
@ -1512,8 +1512,6 @@ Other commands:
|
|||||||
(setq paragraph-separate paragraph-start)
|
(setq paragraph-separate paragraph-start)
|
||||||
(make-local-variable 'paragraph-ignore-fill-prefix)
|
(make-local-variable 'paragraph-ignore-fill-prefix)
|
||||||
(setq paragraph-ignore-fill-prefix t)
|
(setq paragraph-ignore-fill-prefix t)
|
||||||
(make-local-variable 'require-final-newline)
|
|
||||||
(setq require-final-newline t)
|
|
||||||
(make-local-variable 'defun-prompt-regexp)
|
(make-local-variable 'defun-prompt-regexp)
|
||||||
(setq defun-prompt-regexp erlang-defun-prompt-regexp)
|
(setq defun-prompt-regexp erlang-defun-prompt-regexp)
|
||||||
(make-local-variable 'comment-start)
|
(make-local-variable 'comment-start)
|
@ -3,8 +3,8 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||||
|
|
||||||
;;;### (autoloads nil "js2-imenu-extras" "js2-imenu-extras.el" (22508
|
;;;### (autoloads nil "js2-imenu-extras" "js2-imenu-extras.el" (22518
|
||||||
;;;;;; 49890 901948 818000))
|
;;;;;; 4413 133886 14000))
|
||||||
;;; Generated autoloads from js2-imenu-extras.el
|
;;; Generated autoloads from js2-imenu-extras.el
|
||||||
|
|
||||||
(autoload 'js2-imenu-extras-setup "js2-imenu-extras" "\
|
(autoload 'js2-imenu-extras-setup "js2-imenu-extras" "\
|
||||||
@ -19,8 +19,8 @@ Toggle Imenu support for frameworks and structural patterns.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "js2-mode" "js2-mode.el" (22508 49890 917948
|
;;;### (autoloads nil "js2-mode" "js2-mode.el" (22518 4413 157886
|
||||||
;;;;;; 854000))
|
;;;;;; 136000))
|
||||||
;;; Generated autoloads from js2-mode.el
|
;;; Generated autoloads from js2-mode.el
|
||||||
|
|
||||||
(autoload 'js2-highlight-unused-variables-mode "js2-mode" "\
|
(autoload 'js2-highlight-unused-variables-mode "js2-mode" "\
|
||||||
@ -56,7 +56,7 @@ variables (`sgml-basic-offset' et al) locally, like so:
|
|||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil nil ("js2-mode-pkg.el" "js2-old-indent.el")
|
;;;### (autoloads nil nil ("js2-mode-pkg.el" "js2-old-indent.el")
|
||||||
;;;;;; (22508 49890 913948 845000))
|
;;;;;; (22518 4413 149886 96000))
|
||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
(define-package "js2-mode" "20160926.1243" "Improved JavaScript editing mode"
|
(define-package "js2-mode" "20161005.1411" "Improved JavaScript editing mode"
|
||||||
'((emacs "24.1")
|
'((emacs "24.1")
|
||||||
(cl-lib "0.5"))
|
(cl-lib "0.5"))
|
||||||
:url "https://github.com/mooz/js2-mode/" :keywords
|
:url "https://github.com/mooz/js2-mode/" :keywords
|
@ -6395,14 +6395,14 @@ its relevant fields and puts it into `js2-ti-tokens'."
|
|||||||
js2-TEMPLATE_HEAD
|
js2-TEMPLATE_HEAD
|
||||||
js2-NO_SUBS_TEMPLATE))))
|
js2-NO_SUBS_TEMPLATE))))
|
||||||
|
|
||||||
(defun js2-read-regexp (start-tt)
|
(defun js2-read-regexp (start-tt start-pos)
|
||||||
"Called by parser when it gets / or /= in literal context."
|
"Called by parser when it gets / or /= in literal context."
|
||||||
(let (c err
|
(let (c err
|
||||||
in-class ; inside a '[' .. ']' character-class
|
in-class ; inside a '[' .. ']' character-class
|
||||||
flags
|
flags
|
||||||
(continue t)
|
(continue t)
|
||||||
(token (js2-new-token 0)))
|
(token (js2-new-token 0)))
|
||||||
(js2-record-text-property (1- js2-ts-cursor) js2-ts-cursor
|
(js2-record-text-property start-pos (1+ start-pos)
|
||||||
'syntax-table (string-to-syntax "\"/"))
|
'syntax-table (string-to-syntax "\"/"))
|
||||||
(setq js2-ts-string-buffer nil)
|
(setq js2-ts-string-buffer nil)
|
||||||
(if (eq start-tt js2-ASSIGN_DIV)
|
(if (eq start-tt js2-ASSIGN_DIV)
|
||||||
@ -10425,8 +10425,8 @@ array-literals, array comprehensions and regular expressions."
|
|||||||
(js2-parse-template-literal))
|
(js2-parse-template-literal))
|
||||||
((or (= tt js2-DIV) (= tt js2-ASSIGN_DIV))
|
((or (= tt js2-DIV) (= tt js2-ASSIGN_DIV))
|
||||||
;; Got / or /= which in this context means a regexp literal
|
;; Got / or /= which in this context means a regexp literal
|
||||||
(let ((px-pos (js2-current-token-beg))
|
(let* ((px-pos (js2-current-token-beg))
|
||||||
(flags (js2-read-regexp tt))
|
(flags (js2-read-regexp tt px-pos))
|
||||||
(end (js2-current-token-end)))
|
(end (js2-current-token-end)))
|
||||||
(prog1
|
(prog1
|
||||||
(make-js2-regexp-node :pos px-pos
|
(make-js2-regexp-node :pos px-pos
|
@ -3,8 +3,8 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||||
|
|
||||||
;;;### (autoloads nil "projectile" "projectile.el" (22516 57894 833479
|
;;;### (autoloads nil "projectile" "projectile.el" (22518 4419 65915
|
||||||
;;;;;; 951000))
|
;;;;;; 788000))
|
||||||
;;; Generated autoloads from projectile.el
|
;;; Generated autoloads from projectile.el
|
||||||
|
|
||||||
(autoload 'projectile-version "projectile" "\
|
(autoload 'projectile-version "projectile" "\
|
||||||
@ -408,6 +408,16 @@ entirely.")
|
|||||||
|
|
||||||
(custom-autoload 'projectile-mode-line "projectile" t)
|
(custom-autoload 'projectile-mode-line "projectile" t)
|
||||||
|
|
||||||
|
(defvar projectile-mode nil "\
|
||||||
|
Non-nil if Projectile mode is enabled.
|
||||||
|
See the `projectile-mode' command
|
||||||
|
for a description of this minor mode.
|
||||||
|
Setting this variable directly does not take effect;
|
||||||
|
either customize it (see the info node `Easy Customization')
|
||||||
|
or call the function `projectile-mode'.")
|
||||||
|
|
||||||
|
(custom-autoload 'projectile-mode "projectile" nil)
|
||||||
|
|
||||||
(autoload 'projectile-mode "projectile" "\
|
(autoload 'projectile-mode "projectile" "\
|
||||||
Minor mode to assist project management and navigation.
|
Minor mode to assist project management and navigation.
|
||||||
|
|
||||||
@ -423,27 +433,7 @@ Otherwise behave as if called interactively.
|
|||||||
|
|
||||||
\(fn &optional ARG)" t nil)
|
\(fn &optional ARG)" t nil)
|
||||||
|
|
||||||
(defvar projectile-global-mode nil "\
|
(define-obsolete-function-alias 'projectile-global-mode 'projectile-mode)
|
||||||
Non-nil if Projectile-Global mode is enabled.
|
|
||||||
See the `projectile-global-mode' command
|
|
||||||
for a description of this minor mode.
|
|
||||||
Setting this variable directly does not take effect;
|
|
||||||
either customize it (see the info node `Easy Customization')
|
|
||||||
or call the function `projectile-global-mode'.")
|
|
||||||
|
|
||||||
(custom-autoload 'projectile-global-mode "projectile" nil)
|
|
||||||
|
|
||||||
(autoload 'projectile-global-mode "projectile" "\
|
|
||||||
Toggle Projectile mode in all buffers.
|
|
||||||
With prefix ARG, enable Projectile-Global mode if ARG is positive;
|
|
||||||
otherwise, disable it. If called from Lisp, enable the mode if
|
|
||||||
ARG is omitted or nil.
|
|
||||||
|
|
||||||
Projectile mode is enabled in all buffers where
|
|
||||||
`projectile-mode' would do it.
|
|
||||||
See `projectile-mode' for more information on Projectile mode.
|
|
||||||
|
|
||||||
\(fn &optional ARG)" t nil)
|
|
||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
@ -1,2 +1,2 @@
|
|||||||
;;; -*- no-byte-compile: t -*-
|
;;; -*- no-byte-compile: t -*-
|
||||||
(define-package "projectile" "20161004.1340" "Manage and navigate projects in Emacs easily" '((pkg-info "0.4")) :url "https://github.com/bbatsov/projectile" :keywords '("project" "convenience"))
|
(define-package "projectile" "20161005.2209" "Manage and navigate projects in Emacs easily" '((pkg-info "0.4")) :url "https://github.com/bbatsov/projectile" :keywords '("project" "convenience"))
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
||||||
;; URL: https://github.com/bbatsov/projectile
|
;; URL: https://github.com/bbatsov/projectile
|
||||||
;; Package-Version: 20161004.1340
|
;; Package-Version: 20161005.2209
|
||||||
;; Keywords: project, convenience
|
;; Keywords: project, convenience
|
||||||
;; Version: 0.15.0-cvs
|
;; Version: 0.15.0-cvs
|
||||||
;; Package-Requires: ((pkg-info "0.4"))
|
;; Package-Requires: ((pkg-info "0.4"))
|
||||||
@ -318,6 +318,7 @@ The topmost match has precedence."
|
|||||||
".git" ; Git VCS root dir
|
".git" ; Git VCS root dir
|
||||||
".hg" ; Mercurial VCS root dir
|
".hg" ; Mercurial VCS root dir
|
||||||
".fslckout" ; Fossil VCS root dir
|
".fslckout" ; Fossil VCS root dir
|
||||||
|
"_FOSSIL_" ; Fossil VCS root DB on Windows
|
||||||
".bzr" ; Bazaar VCS root dir
|
".bzr" ; Bazaar VCS root dir
|
||||||
"_darcs" ; Darcs VCS root dir
|
"_darcs" ; Darcs VCS root dir
|
||||||
)
|
)
|
||||||
@ -357,7 +358,7 @@ containing a root file."
|
|||||||
"A list of files globally unignored by projectile."
|
"A list of files globally unignored by projectile."
|
||||||
:group 'projectile
|
:group 'projectile
|
||||||
:type '(repeat string)
|
:type '(repeat string)
|
||||||
:package-version '(projectile "0.14.0"))
|
:package-version '(projectile . "0.14.0"))
|
||||||
|
|
||||||
(defcustom projectile-globally-ignored-file-suffixes
|
(defcustom projectile-globally-ignored-file-suffixes
|
||||||
nil
|
nil
|
||||||
@ -372,6 +373,7 @@ containing a root file."
|
|||||||
".git"
|
".git"
|
||||||
".hg"
|
".hg"
|
||||||
".fslckout"
|
".fslckout"
|
||||||
|
"_FOSSIL_"
|
||||||
".bzr"
|
".bzr"
|
||||||
"_darcs"
|
"_darcs"
|
||||||
".tox"
|
".tox"
|
||||||
@ -386,7 +388,7 @@ containing a root file."
|
|||||||
"A list of directories globally unignored by projectile."
|
"A list of directories globally unignored by projectile."
|
||||||
:group 'projectile
|
:group 'projectile
|
||||||
:type '(repeat string)
|
:type '(repeat string)
|
||||||
:package-version '(projectile "0.14.0"))
|
:package-version '(projectile . "0.14.0"))
|
||||||
|
|
||||||
(defcustom projectile-globally-ignored-modes
|
(defcustom projectile-globally-ignored-modes
|
||||||
'("erc-mode"
|
'("erc-mode"
|
||||||
@ -564,6 +566,15 @@ projects."
|
|||||||
function)
|
function)
|
||||||
:package-version '(projectile . "0.13.0"))
|
:package-version '(projectile . "0.13.0"))
|
||||||
|
|
||||||
|
(defcustom projectile-track-known-projects-automatically t
|
||||||
|
"Controls whether Projectile will automatically register known projects.
|
||||||
|
|
||||||
|
When set to nil you'll have always add projects explicitly with
|
||||||
|
`projectile-add-known-project'."
|
||||||
|
:group 'projectile
|
||||||
|
:type 'boolean
|
||||||
|
:package-version '(projectile . "0.15.0"))
|
||||||
|
|
||||||
|
|
||||||
;;; Version information
|
;;; Version information
|
||||||
|
|
||||||
@ -733,9 +744,9 @@ The cache is created both in memory and on the hard drive."
|
|||||||
(not (projectile-ignored-project-p project-root)))
|
(not (projectile-ignored-project-p project-root)))
|
||||||
(projectile-cache-current-file))))
|
(projectile-cache-current-file))))
|
||||||
|
|
||||||
(defun projectile-cache-projects-find-file-hook ()
|
(defun projectile-track-known-projects-find-file-hook ()
|
||||||
"Function for caching projects with `find-file-hook'."
|
"Function for caching projects with `find-file-hook'."
|
||||||
(when (projectile-project-p)
|
(when (and projectile-track-known-projects-automatically (projectile-project-p))
|
||||||
(let ((known-projects (and (sequencep projectile-known-projects)
|
(let ((known-projects (and (sequencep projectile-known-projects)
|
||||||
(copy-sequence projectile-known-projects))))
|
(copy-sequence projectile-known-projects))))
|
||||||
(projectile-add-known-project (projectile-project-root))
|
(projectile-add-known-project (projectile-project-root))
|
||||||
@ -944,14 +955,18 @@ Files are returned as relative paths to the project root."
|
|||||||
"Command used by projectile to get the ignored files in a git project."
|
"Command used by projectile to get the ignored files in a git project."
|
||||||
:group 'projectile
|
:group 'projectile
|
||||||
:type 'string
|
:type 'string
|
||||||
:package-version '(projectile "0.14.0"))
|
:package-version '(projectile . "0.14.0"))
|
||||||
|
|
||||||
(defcustom projectile-hg-command "hg locate -f -0 -I ."
|
(defcustom projectile-hg-command "hg locate -f -0 -I ."
|
||||||
"Command used by projectile to get the files in a hg project."
|
"Command used by projectile to get the files in a hg project."
|
||||||
:group 'projectile
|
:group 'projectile
|
||||||
:type 'string)
|
:type 'string)
|
||||||
|
|
||||||
(defcustom projectile-fossil-command "fossil ls | tr '\\n' '\\0'"
|
(defcustom projectile-fossil-command (concat "fossil ls | "
|
||||||
|
(when (string-equal system-type
|
||||||
|
"windows-nt")
|
||||||
|
"dos2unix | ")
|
||||||
|
"tr '\\n' '\\0'")
|
||||||
"Command used by projectile to get the files in a fossil project."
|
"Command used by projectile to get the files in a fossil project."
|
||||||
:group 'projectile
|
:group 'projectile
|
||||||
:type 'string)
|
:type 'string)
|
||||||
@ -976,6 +991,15 @@ Files are returned as relative paths to the project root."
|
|||||||
:group 'projectile
|
:group 'projectile
|
||||||
:type 'string)
|
:type 'string)
|
||||||
|
|
||||||
|
(defcustom projectile-vcs-dirty-state '("edited" "unregistered" "needs-update" "needs-merge" "unlocked-changes" "conflict")
|
||||||
|
"List of states checked by `projectile-browse-dirty-projects'.
|
||||||
|
Possible checked states are:
|
||||||
|
\"edited\", \"unregistered\", \"needs-update\", \"needs-merge\", unlocked-changes\" and \"conflict\",
|
||||||
|
as defined in `vc.el'."
|
||||||
|
:group 'projectile
|
||||||
|
:type '(repeat (string))
|
||||||
|
:package-version '(projectile . "0.15.0"))
|
||||||
|
|
||||||
(defun projectile-get-ext-command ()
|
(defun projectile-get-ext-command ()
|
||||||
"Determine which external command to invoke based on the project's VCS."
|
"Determine which external command to invoke based on the project's VCS."
|
||||||
(let ((vcs (projectile-project-vcs)))
|
(let ((vcs (projectile-project-vcs)))
|
||||||
@ -1076,6 +1100,74 @@ they are excluded from the results of this function."
|
|||||||
(when cmd
|
(when cmd
|
||||||
(projectile-files-via-ext-command cmd))))
|
(projectile-files-via-ext-command cmd))))
|
||||||
|
|
||||||
|
(defun projectile-call-process-to-string (program &rest args)
|
||||||
|
"Invoke the executable PROGRAM with ARGS and return the output as a string."
|
||||||
|
(with-temp-buffer
|
||||||
|
(apply 'call-process program nil (current-buffer) nil args)
|
||||||
|
(buffer-string)))
|
||||||
|
|
||||||
|
(defun projectile-shell-command-to-string (command)
|
||||||
|
"Try to run COMMAND without actually using a shell and return the output.
|
||||||
|
|
||||||
|
The function `eshell-search-path' will be used to search the PATH
|
||||||
|
environment variable for an appropriate executable using the text
|
||||||
|
occuring before the first space. If no executable is found,
|
||||||
|
fallback to `shell-command-to-string'."
|
||||||
|
(cl-destructuring-bind
|
||||||
|
(the-command . args) (split-string command " ")
|
||||||
|
(let ((binary-path (eshell-search-path the-command)))
|
||||||
|
(if binary-path
|
||||||
|
(apply 'projectile-call-process-to-string binary-path args)
|
||||||
|
(shell-command-to-string command)))))
|
||||||
|
|
||||||
|
(defun projectile-check-vcs-status (&optional PROJECT-PATH)
|
||||||
|
"Check the status of the current project.
|
||||||
|
If PROJECT-PATH is a project, check this one instead."
|
||||||
|
(let* ((PROJECT-PATH (or PROJECT-PATH (projectile-project-root)))
|
||||||
|
(project-status nil))
|
||||||
|
(save-excursion
|
||||||
|
(vc-dir PROJECT-PATH)
|
||||||
|
;; wait until vc-dir is done
|
||||||
|
(while (vc-dir-busy) (sleep-for 0 100))
|
||||||
|
;; check for status
|
||||||
|
(save-excursion
|
||||||
|
(save-match-data
|
||||||
|
(dolist (check projectile-vcs-dirty-state)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(when (search-forward check nil t)
|
||||||
|
(setq project-status (cons check project-status))))))
|
||||||
|
(kill-buffer)
|
||||||
|
project-status)))
|
||||||
|
|
||||||
|
(defun projectile-check-vcs-status-of-known-projects ()
|
||||||
|
"Return the list of dirty projects.
|
||||||
|
The list is composed of sublists~: (project-path, project-status).
|
||||||
|
Raise an error if their is no dirty project."
|
||||||
|
(let ((projects projectile-known-projects)
|
||||||
|
(status ())
|
||||||
|
(tmp-status nil))
|
||||||
|
(dolist (project projects)
|
||||||
|
(condition-case nil
|
||||||
|
(setq tmp-status (projectile-check-vcs-status project))
|
||||||
|
(error nil))
|
||||||
|
(when tmp-status
|
||||||
|
(setq status (cons (list project tmp-status) status))))
|
||||||
|
(when (= (length status) 0)
|
||||||
|
(message "No dirty projects have been found"))
|
||||||
|
status))
|
||||||
|
|
||||||
|
(defun projectile-browse-dirty-projects ()
|
||||||
|
"Browse dirty version controlled projects."
|
||||||
|
(interactive)
|
||||||
|
(let ((status nil)
|
||||||
|
(mod-proj nil))
|
||||||
|
(message "Checking for modifications in known projects...")
|
||||||
|
(setq status (projectile-check-vcs-status-of-known-projects))
|
||||||
|
(while (not (= (length status) 0))
|
||||||
|
(setq mod-proj (cons (car (pop status)) mod-proj)))
|
||||||
|
(projectile-vc
|
||||||
|
(projectile-completing-read "Select project: " mod-proj))))
|
||||||
|
|
||||||
(defun projectile-files-via-ext-command (command)
|
(defun projectile-files-via-ext-command (command)
|
||||||
"Get a list of relative file names in the project root by executing COMMAND."
|
"Get a list of relative file names in the project root by executing COMMAND."
|
||||||
(split-string (shell-command-to-string command) "\0" t))
|
(split-string (shell-command-to-string command) "\0" t))
|
||||||
@ -1490,20 +1582,23 @@ Never use on many files since it's going to recalculate the
|
|||||||
project-root for every file."
|
project-root for every file."
|
||||||
(expand-file-name name (projectile-project-root)))
|
(expand-file-name name (projectile-project-root)))
|
||||||
|
|
||||||
(defun projectile-completing-read (prompt choices &optional initial-input)
|
(cl-defun projectile-completing-read (prompt choices &key initial-input action)
|
||||||
"Present a project tailored PROMPT with CHOICES."
|
"Present a project tailored PROMPT with CHOICES."
|
||||||
(let ((prompt (projectile-prepend-project-name prompt)))
|
(let ((prompt (projectile-prepend-project-name prompt))
|
||||||
|
res)
|
||||||
|
(setq res
|
||||||
(cond
|
(cond
|
||||||
((eq projectile-completion-system 'ido)
|
((eq projectile-completion-system 'ido)
|
||||||
(ido-completing-read prompt choices nil nil initial-input))
|
(ido-completing-read prompt choices nil nil initial-input))
|
||||||
((eq projectile-completion-system 'default)
|
((eq projectile-completion-system 'default)
|
||||||
(completing-read prompt choices nil nil initial-input))
|
(completing-read prompt choices nil nil initial-input))
|
||||||
((eq projectile-completion-system 'helm)
|
((eq projectile-completion-system 'helm)
|
||||||
(if (fboundp 'helm-comp-read)
|
(if (fboundp 'helm)
|
||||||
(helm-comp-read prompt choices
|
(helm :sources
|
||||||
:initial-input initial-input
|
`((name . ,prompt)
|
||||||
:candidates-in-buffer t
|
(candidates . ,choices)
|
||||||
:must-match 'confirm)
|
(action . ,(prog1 action
|
||||||
|
(setq action nil)))))
|
||||||
(user-error "Please install helm from \
|
(user-error "Please install helm from \
|
||||||
https://github.com/emacs-helm/helm")))
|
https://github.com/emacs-helm/helm")))
|
||||||
((eq projectile-completion-system 'grizzl)
|
((eq projectile-completion-system 'grizzl)
|
||||||
@ -1516,10 +1611,15 @@ https://github.com/d11wtq/grizzl")))
|
|||||||
(if (fboundp 'ivy-read)
|
(if (fboundp 'ivy-read)
|
||||||
(ivy-read prompt choices
|
(ivy-read prompt choices
|
||||||
:initial-input initial-input
|
:initial-input initial-input
|
||||||
|
:action (prog1 action
|
||||||
|
(setq action nil))
|
||||||
:caller 'projectile-completing-read)
|
:caller 'projectile-completing-read)
|
||||||
(user-error "Please install ivy from \
|
(user-error "Please install ivy from \
|
||||||
https://github.com/abo-abo/swiper")))
|
https://github.com/abo-abo/swiper")))
|
||||||
(t (funcall projectile-completion-system prompt choices)))))
|
(t (funcall projectile-completion-system prompt choices))))
|
||||||
|
(if action
|
||||||
|
(funcall action res)
|
||||||
|
res)))
|
||||||
|
|
||||||
(defun projectile-current-project-files ()
|
(defun projectile-current-project-files ()
|
||||||
"Return a list of files for the current project."
|
"Return a list of files for the current project."
|
||||||
@ -1560,7 +1660,7 @@ https://github.com/abo-abo/swiper")))
|
|||||||
|
|
||||||
;;; Interactive commands
|
;;; Interactive commands
|
||||||
(defcustom projectile-other-file-alist
|
(defcustom projectile-other-file-alist
|
||||||
'(;; handle C/C++ extensions
|
'( ;; handle C/C++ extensions
|
||||||
("cpp" . ("h" "hpp" "ipp"))
|
("cpp" . ("h" "hpp" "ipp"))
|
||||||
("ipp" . ("h" "hpp" "cpp"))
|
("ipp" . ("h" "hpp" "cpp"))
|
||||||
("hpp" . ("h" "ipp" "cpp" "cc"))
|
("hpp" . ("h" "ipp" "cpp" "cc"))
|
||||||
@ -1583,7 +1683,10 @@ https://github.com/abo-abo/swiper")))
|
|||||||
("lock" . (""))
|
("lock" . (""))
|
||||||
("gpg" . (""))
|
("gpg" . (""))
|
||||||
)
|
)
|
||||||
"Alist of extensions for switching to file with the same name, using other extensions based on the extension of current file.")
|
"Alist of extensions for switching to file with the same name,
|
||||||
|
using other extensions based on the extension of current
|
||||||
|
file."
|
||||||
|
:type 'alist)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun projectile-find-other-file (&optional flex-matching)
|
(defun projectile-find-other-file (&optional flex-matching)
|
||||||
@ -1798,10 +1901,12 @@ is presented.
|
|||||||
With a prefix ARG invalidates the cache first."
|
With a prefix ARG invalidates the cache first."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(projectile-maybe-invalidate-cache arg)
|
(projectile-maybe-invalidate-cache arg)
|
||||||
(let ((file (projectile-completing-read "Find file: "
|
(projectile-completing-read
|
||||||
(projectile-current-project-files))))
|
"Find file: "
|
||||||
(find-file (expand-file-name file (projectile-project-root)))
|
(projectile-current-project-files)
|
||||||
(run-hooks 'projectile-find-file-hook)))
|
:action `(lambda (file)
|
||||||
|
(find-file (expand-file-name file ,(projectile-project-root)))
|
||||||
|
(run-hooks 'projectile-find-file-hook))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun projectile-find-file-other-window (&optional arg)
|
(defun projectile-find-file-other-window (&optional arg)
|
||||||
@ -2603,7 +2708,10 @@ For hg projects `monky-status' is used if available."
|
|||||||
"Show a list of recently visited files in a project."
|
"Show a list of recently visited files in a project."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (boundp 'recentf-list)
|
(if (boundp 'recentf-list)
|
||||||
(find-file (projectile-expand-root (projectile-completing-read "Recently visited files: " (projectile-recentf-files))))
|
(find-file (projectile-expand-root
|
||||||
|
(projectile-completing-read
|
||||||
|
"Recently visited files: "
|
||||||
|
(projectile-recentf-files))))
|
||||||
(message "recentf is not enabled")))
|
(message "recentf is not enabled")))
|
||||||
|
|
||||||
(defun projectile-recentf-files ()
|
(defun projectile-recentf-files ()
|
||||||
@ -2770,6 +2878,10 @@ with a prefix ARG."
|
|||||||
(test-cmd (projectile-maybe-read-command arg default-cmd "Test command: "))
|
(test-cmd (projectile-maybe-read-command arg default-cmd "Test command: "))
|
||||||
(default-directory project-root))
|
(default-directory project-root))
|
||||||
(puthash project-root test-cmd projectile-test-cmd-map)
|
(puthash project-root test-cmd projectile-test-cmd-map)
|
||||||
|
(save-some-buffers (not compilation-ask-about-save)
|
||||||
|
(lambda ()
|
||||||
|
(projectile-project-buffer-p (current-buffer)
|
||||||
|
project-root)))
|
||||||
(projectile-run-compilation test-cmd)))
|
(projectile-run-compilation test-cmd)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
@ -2822,9 +2934,10 @@ With a prefix ARG invokes `projectile-commander' instead of
|
|||||||
(interactive "P")
|
(interactive "P")
|
||||||
(let (projects)
|
(let (projects)
|
||||||
(if (setq projects (projectile-relevant-known-projects))
|
(if (setq projects (projectile-relevant-known-projects))
|
||||||
(projectile-switch-project-by-name
|
(projectile-completing-read
|
||||||
(projectile-completing-read "Switch to project: " projects)
|
"Switch to project: " projects
|
||||||
arg)
|
:action (lambda (project)
|
||||||
|
(projectile-switch-project-by-name project arg)))
|
||||||
(error "There are no known projects"))))
|
(error "There are no known projects"))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
@ -2937,15 +3050,17 @@ See `projectile-cleanup-known-projects'."
|
|||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun projectile-remove-known-project (&optional project)
|
(defun projectile-remove-known-project (&optional project)
|
||||||
"Remove PROJECT from the list of known projects."
|
"Remove PROJECT from the list of known projects."
|
||||||
(interactive (list (projectile-completing-read "Remove from known projects: "
|
(interactive (list (projectile-completing-read
|
||||||
projectile-known-projects)))
|
"Remove from known projects: " projectile-known-projects
|
||||||
|
:action 'projectile-remove-known-project)))
|
||||||
|
(unless (called-interactively-p 'any)
|
||||||
(setq projectile-known-projects
|
(setq projectile-known-projects
|
||||||
(cl-remove-if
|
(cl-remove-if
|
||||||
(lambda (proj) (string= project proj))
|
(lambda (proj) (string= project proj))
|
||||||
projectile-known-projects))
|
projectile-known-projects))
|
||||||
(projectile-merge-known-projects)
|
(projectile-merge-known-projects)
|
||||||
(when projectile-verbose
|
(when projectile-verbose
|
||||||
(message "Project %s removed from the list of known projects." project)))
|
(message "Project %s removed from the list of known projects." project))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun projectile-remove-current-project-from-known-projects ()
|
(defun projectile-remove-current-project-from-known-projects ()
|
||||||
@ -3120,6 +3235,10 @@ is chosen."
|
|||||||
"Open project root in vc-dir or magit."
|
"Open project root in vc-dir or magit."
|
||||||
(projectile-vc))
|
(projectile-vc))
|
||||||
|
|
||||||
|
(def-projectile-commander-method ?V
|
||||||
|
"Browse dirty projects"
|
||||||
|
(projectile-browse-dirty-projects))
|
||||||
|
|
||||||
(def-projectile-commander-method ?r
|
(def-projectile-commander-method ?r
|
||||||
"Replace a string in the project."
|
"Replace a string in the project."
|
||||||
(projectile-replace))
|
(projectile-replace))
|
||||||
@ -3231,6 +3350,7 @@ is chosen."
|
|||||||
(define-key map (kbd "T") #'projectile-find-test-file)
|
(define-key map (kbd "T") #'projectile-find-test-file)
|
||||||
(define-key map (kbd "u") #'projectile-run-project)
|
(define-key map (kbd "u") #'projectile-run-project)
|
||||||
(define-key map (kbd "v") #'projectile-vc)
|
(define-key map (kbd "v") #'projectile-vc)
|
||||||
|
(define-key map (kbd "V") #'projectile-browse-dirty-projects)
|
||||||
(define-key map (kbd "x e") #'projectile-run-eshell)
|
(define-key map (kbd "x e") #'projectile-run-eshell)
|
||||||
(define-key map (kbd "x t") #'projectile-run-term)
|
(define-key map (kbd "x t") #'projectile-run-term)
|
||||||
(define-key map (kbd "x s") #'projectile-run-shell)
|
(define-key map (kbd "x s") #'projectile-run-shell)
|
||||||
@ -3268,6 +3388,7 @@ is chosen."
|
|||||||
["Search in project (ag)" projectile-ag]
|
["Search in project (ag)" projectile-ag]
|
||||||
["Replace in project" projectile-replace]
|
["Replace in project" projectile-replace]
|
||||||
["Multi-occur in project" projectile-multi-occur]
|
["Multi-occur in project" projectile-multi-occur]
|
||||||
|
["Browse dirty projects" projectile-browse-dirty-projects]
|
||||||
"--"
|
"--"
|
||||||
["Run shell" projectile-run-shell]
|
["Run shell" projectile-run-shell]
|
||||||
["Run eshell" projectile-run-eshell]
|
["Run eshell" projectile-run-eshell]
|
||||||
@ -3305,7 +3426,14 @@ entirely."
|
|||||||
:group 'projectile
|
:group 'projectile
|
||||||
:type 'sexp
|
:type 'sexp
|
||||||
:risky t
|
:risky t
|
||||||
:package-version '(projectile "0.12.0"))
|
:package-version '(projectile . "0.12.0"))
|
||||||
|
|
||||||
|
(defun projectile-find-file-hook-function ()
|
||||||
|
"Called by `find-file-hook' when `projectile-mode' is on."
|
||||||
|
(unless (file-remote-p default-directory)
|
||||||
|
(projectile-cache-files-find-file-hook)
|
||||||
|
(projectile-track-known-projects-find-file-hook)
|
||||||
|
(projectile-visit-project-tags-table)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-minor-mode projectile-mode
|
(define-minor-mode projectile-mode
|
||||||
@ -3324,6 +3452,7 @@ Otherwise behave as if called interactively.
|
|||||||
:keymap projectile-mode-map
|
:keymap projectile-mode-map
|
||||||
:group 'projectile
|
:group 'projectile
|
||||||
:require 'projectile
|
:require 'projectile
|
||||||
|
:global t
|
||||||
(cond
|
(cond
|
||||||
(projectile-mode
|
(projectile-mode
|
||||||
;; initialize the projects cache if needed
|
;; initialize the projects cache if needed
|
||||||
@ -3331,25 +3460,19 @@ Otherwise behave as if called interactively.
|
|||||||
(setq projectile-projects-cache
|
(setq projectile-projects-cache
|
||||||
(or (projectile-unserialize projectile-cache-file)
|
(or (projectile-unserialize projectile-cache-file)
|
||||||
(make-hash-table :test 'equal))))
|
(make-hash-table :test 'equal))))
|
||||||
(add-hook 'find-file-hook #'projectile-cache-files-find-file-hook t t)
|
(add-hook 'find-file-hook 'projectile-find-file-hook-function)
|
||||||
(add-hook 'find-file-hook #'projectile-cache-projects-find-file-hook t t)
|
(add-hook 'projectile-find-dir-hook #'projectile-track-known-projects-find-file-hook t)
|
||||||
(add-hook 'projectile-find-dir-hook #'projectile-cache-projects-find-file-hook)
|
(add-hook 'dired-before-readin-hook #'projectile-track-known-projects-find-file-hook t t)
|
||||||
(add-hook 'find-file-hook #'projectile-visit-project-tags-table t t)
|
|
||||||
(add-hook 'dired-before-readin-hook #'projectile-cache-projects-find-file-hook t t)
|
|
||||||
(ad-activate 'compilation-find-file)
|
(ad-activate 'compilation-find-file)
|
||||||
(ad-activate 'delete-file))
|
(ad-activate 'delete-file))
|
||||||
(t
|
(t
|
||||||
(remove-hook 'find-file-hook #'projectile-cache-files-find-file-hook t)
|
(remove-hook 'find-file-hook #'projectile-find-file-hook-function)
|
||||||
(remove-hook 'find-file-hook #'projectile-cache-projects-find-file-hook t)
|
(remove-hook 'dired-before-readin-hook #'projectile-track-known-projects-find-file-hook t)
|
||||||
(remove-hook 'find-file-hook #'projectile-visit-project-tags-table t)
|
|
||||||
(remove-hook 'dired-before-readin-hook #'projectile-cache-projects-find-file-hook t)
|
|
||||||
(ad-deactivate 'compilation-find-file)
|
(ad-deactivate 'compilation-find-file)
|
||||||
(ad-deactivate 'delete-file))))
|
(ad-deactivate 'delete-file))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-globalized-minor-mode projectile-global-mode
|
(define-obsolete-function-alias 'projectile-global-mode 'projectile-mode)
|
||||||
projectile-mode
|
|
||||||
projectile-mode)
|
|
||||||
|
|
||||||
(provide 'projectile)
|
(provide 'projectile)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user