From f2993e57fd4ebdd31879b2624fc81e4400877b32 Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Tue, 4 Feb 2020 14:53:29 +0100 Subject: [PATCH] Add packages for javascript --- bundle/custom.el | 4 +- elpa/ag-20190726.9/ag-autoloads.el | 128 + elpa/ag-20190726.9/ag-pkg.el | 2 + elpa/ag-20190726.9/ag.el | 689 + elpa/ag-20190726.9/ag.elc | Bin 0 -> 23108 bytes .../js2-imenu-extras.el | 349 + .../js2-imenu-extras.elc | Bin 0 -> 13937 bytes .../js2-mode-autoloads.el | 85 + elpa/js2-mode-20190815.1327/js2-mode-pkg.el | 15 + elpa/js2-mode-20190815.1327/js2-mode.el | 12940 ++++++++++++++++ elpa/js2-mode-20190815.1327/js2-mode.elc | Bin 0 -> 1298041 bytes elpa/js2-mode-20190815.1327/js2-old-indent.el | 712 + .../js2-mode-20190815.1327/js2-old-indent.elc | Bin 0 -> 15904 bytes .../js2-refactor-autoloads.el | 123 + .../js2-refactor-pkg.el | 10 + .../js2-refactor.el | 238 + .../js2-refactor.elc | Bin 0 -> 5767 bytes .../js2r-conditionals.el | 57 + .../js2r-conditionals.elc | Bin 0 -> 1425 bytes .../js2r-conveniences.el | 242 + .../js2r-conveniences.elc | Bin 0 -> 7309 bytes .../js2r-formatting.el | 251 + .../js2r-formatting.elc | Bin 0 -> 9468 bytes .../js2r-functions.el | 537 + .../js2r-functions.elc | Bin 0 -> 20942 bytes .../js2r-helpers.el | 220 + .../js2r-helpers.elc | Bin 0 -> 9213 bytes elpa/js2-refactor-20190630.2108/js2r-iife.el | 92 + elpa/js2-refactor-20190630.2108/js2r-iife.elc | Bin 0 -> 2273 bytes .../js2r-paredit.el | 227 + .../js2r-paredit.elc | Bin 0 -> 6430 bytes elpa/js2-refactor-20190630.2108/js2r-vars.el | 375 + elpa/js2-refactor-20190630.2108/js2r-vars.elc | Bin 0 -> 11801 bytes .../js2r-wrapping.el | 76 + .../js2r-wrapping.elc | Bin 0 -> 1619 bytes .../mc-cycle-cursors.el | 119 + .../mc-cycle-cursors.elc | Bin 0 -> 3262 bytes .../mc-edit-lines.el | 110 + .../mc-edit-lines.elc | Bin 0 -> 2749 bytes .../mc-hide-unmatched-lines-mode.el | 107 + .../mc-hide-unmatched-lines-mode.elc | Bin 0 -> 4364 bytes .../mc-mark-more.el | 709 + .../mc-mark-more.elc | Bin 0 -> 22722 bytes .../mc-mark-pop.el | 22 + .../mc-mark-pop.elc | Bin 0 -> 773 bytes .../mc-separate-operations.el | 150 + .../mc-separate-operations.elc | Bin 0 -> 4826 bytes .../multiple-cursors-autoloads.el | 362 + .../multiple-cursors-core.el | 852 + .../multiple-cursors-core.elc | Bin 0 -> 30115 bytes .../multiple-cursors-pkg.el | 5 + .../multiple-cursors.el | 203 + .../multiple-cursors.elc | Bin 0 -> 790 bytes .../rectangular-region-mode.el | 125 + .../rectangular-region-mode.elc | Bin 0 -> 4877 bytes .../xref-js2-autoloads.el | 27 + elpa/xref-js2-20190915.2032/xref-js2-pkg.el | 2 + elpa/xref-js2-20190915.2032/xref-js2.el | 273 + elpa/xref-js2-20190915.2032/xref-js2.elc | Bin 0 -> 8655 bytes 59 files changed, 20436 insertions(+), 2 deletions(-) create mode 100644 elpa/ag-20190726.9/ag-autoloads.el create mode 100644 elpa/ag-20190726.9/ag-pkg.el create mode 100644 elpa/ag-20190726.9/ag.el create mode 100644 elpa/ag-20190726.9/ag.elc create mode 100644 elpa/js2-mode-20190815.1327/js2-imenu-extras.el create mode 100644 elpa/js2-mode-20190815.1327/js2-imenu-extras.elc create mode 100644 elpa/js2-mode-20190815.1327/js2-mode-autoloads.el create mode 100644 elpa/js2-mode-20190815.1327/js2-mode-pkg.el create mode 100644 elpa/js2-mode-20190815.1327/js2-mode.el create mode 100644 elpa/js2-mode-20190815.1327/js2-mode.elc create mode 100644 elpa/js2-mode-20190815.1327/js2-old-indent.el create mode 100644 elpa/js2-mode-20190815.1327/js2-old-indent.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2-refactor-autoloads.el create mode 100644 elpa/js2-refactor-20190630.2108/js2-refactor-pkg.el create mode 100644 elpa/js2-refactor-20190630.2108/js2-refactor.el create mode 100644 elpa/js2-refactor-20190630.2108/js2-refactor.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-conditionals.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-conditionals.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-conveniences.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-conveniences.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-formatting.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-formatting.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-functions.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-functions.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-helpers.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-helpers.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-iife.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-iife.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-paredit.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-paredit.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-vars.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-vars.elc create mode 100644 elpa/js2-refactor-20190630.2108/js2r-wrapping.el create mode 100644 elpa/js2-refactor-20190630.2108/js2r-wrapping.elc create mode 100644 elpa/multiple-cursors-20191210.1759/mc-cycle-cursors.el create mode 100644 elpa/multiple-cursors-20191210.1759/mc-cycle-cursors.elc create mode 100644 elpa/multiple-cursors-20191210.1759/mc-edit-lines.el create mode 100644 elpa/multiple-cursors-20191210.1759/mc-edit-lines.elc create mode 100644 elpa/multiple-cursors-20191210.1759/mc-hide-unmatched-lines-mode.el create mode 100644 elpa/multiple-cursors-20191210.1759/mc-hide-unmatched-lines-mode.elc create mode 100644 elpa/multiple-cursors-20191210.1759/mc-mark-more.el create mode 100644 elpa/multiple-cursors-20191210.1759/mc-mark-more.elc create mode 100644 elpa/multiple-cursors-20191210.1759/mc-mark-pop.el create mode 100644 elpa/multiple-cursors-20191210.1759/mc-mark-pop.elc create mode 100644 elpa/multiple-cursors-20191210.1759/mc-separate-operations.el create mode 100644 elpa/multiple-cursors-20191210.1759/mc-separate-operations.elc create mode 100644 elpa/multiple-cursors-20191210.1759/multiple-cursors-autoloads.el create mode 100644 elpa/multiple-cursors-20191210.1759/multiple-cursors-core.el create mode 100644 elpa/multiple-cursors-20191210.1759/multiple-cursors-core.elc create mode 100644 elpa/multiple-cursors-20191210.1759/multiple-cursors-pkg.el create mode 100644 elpa/multiple-cursors-20191210.1759/multiple-cursors.el create mode 100644 elpa/multiple-cursors-20191210.1759/multiple-cursors.elc create mode 100644 elpa/multiple-cursors-20191210.1759/rectangular-region-mode.el create mode 100644 elpa/multiple-cursors-20191210.1759/rectangular-region-mode.elc create mode 100644 elpa/xref-js2-20190915.2032/xref-js2-autoloads.el create mode 100644 elpa/xref-js2-20190915.2032/xref-js2-pkg.el create mode 100644 elpa/xref-js2-20190915.2032/xref-js2.el create mode 100644 elpa/xref-js2-20190915.2032/xref-js2.elc diff --git a/bundle/custom.el b/bundle/custom.el index e257b466..fe382ba9 100644 --- a/bundle/custom.el +++ b/bundle/custom.el @@ -84,8 +84,8 @@ '(package-enable-at-startup t) '(package-selected-packages (quote - (elm-mode dashboard pickle poet-theme flymake-eslint json-mode elpy darkroom dockerfile-mode ein spacemacs-theme flucui-themes leuven-theme htmlize scss-mode berrys-theme web-mode python-docstring sphinx-doc sphinx-frontend sphinx-mode ox-nikola racket-mode slime gherkin-mode powershell typescript-mode ob-http ob-ipython ob-restclient nord-theme restclient request restclient-test yaml-mode magit))) - '(python-shell-interpreter "python3" t) + (ag xref-js2 js2-refactor js2-mode elm-mode dashboard pickle poet-theme flymake-eslint json-mode elpy darkroom dockerfile-mode ein spacemacs-theme flucui-themes leuven-theme htmlize scss-mode berrys-theme web-mode python-docstring sphinx-doc sphinx-frontend sphinx-mode ox-nikola racket-mode slime gherkin-mode powershell typescript-mode ob-http ob-ipython ob-restclient nord-theme restclient request restclient-test yaml-mode magit))) + '(python-shell-interpreter "python3") '(register-preview-delay 2) '(register-separator 43) '(request-log-level (quote debug)) diff --git a/elpa/ag-20190726.9/ag-autoloads.el b/elpa/ag-20190726.9/ag-autoloads.el new file mode 100644 index 00000000..e7cc3a30 --- /dev/null +++ b/elpa/ag-20190726.9/ag-autoloads.el @@ -0,0 +1,128 @@ +;;; ag-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "ag" "ag.el" (0 0 0 0)) +;;; Generated autoloads from ag.el + +(autoload 'ag "ag" "\ +Search using ag in a given DIRECTORY for a given literal search STRING, +with STRING defaulting to the symbol under point. + +If called with a prefix, prompts for flags to pass to ag. + +\(fn STRING DIRECTORY)" t nil) + +(autoload 'ag-files "ag" "\ +Search using ag in a given DIRECTORY for a given literal search STRING, +limited to files that match FILE-TYPE. STRING defaults to the +symbol under point. + +If called with a prefix, prompts for flags to pass to ag. + +\(fn STRING FILE-TYPE DIRECTORY)" t nil) + +(autoload 'ag-regexp "ag" "\ +Search using ag in a given directory for a given regexp. +The regexp should be in PCRE syntax, not Emacs regexp syntax. + +If called with a prefix, prompts for flags to pass to ag. + +\(fn STRING DIRECTORY)" t nil) + +(autoload 'ag-project "ag" "\ +Guess the root of the current project and search it with ag +for the given literal search STRING. + +If called with a prefix, prompts for flags to pass to ag. + +\(fn STRING)" t nil) + +(autoload 'ag-project-files "ag" "\ +Search using ag for a given literal search STRING, +limited to files that match FILE-TYPE. STRING defaults to the +symbol under point. + +If called with a prefix, prompts for flags to pass to ag. + +\(fn STRING FILE-TYPE)" t nil) + +(autoload 'ag-project-regexp "ag" "\ +Guess the root of the current project and search it with ag +for the given regexp. The regexp should be in PCRE syntax, not +Emacs regexp syntax. + +If called with a prefix, prompts for flags to pass to ag. + +\(fn REGEXP)" t nil) + +(defalias 'ag-project-at-point 'ag-project) + +(defalias 'ag-regexp-project-at-point 'ag-project-regexp) + +(autoload 'ag-dired "ag" "\ +Recursively find files in DIR matching literal search STRING. + +The PATTERN is matched against the full path to the file, not +only against the file name. + +The results are presented as a `dired-mode' buffer with +`default-directory' being DIR. + +See also `ag-dired-regexp'. + +\(fn DIR STRING)" t nil) + +(autoload 'ag-dired-regexp "ag" "\ +Recursively find files in DIR matching REGEXP. +REGEXP should be in PCRE syntax, not Emacs regexp syntax. + +The REGEXP is matched against the full path to the file, not +only against the file name. + +Results are presented as a `dired-mode' buffer with +`default-directory' being DIR. + +See also `find-dired'. + +\(fn DIR REGEXP)" t nil) + +(autoload 'ag-project-dired "ag" "\ +Recursively find files in current project matching PATTERN. + +See also `ag-dired'. + +\(fn PATTERN)" t nil) + +(autoload 'ag-project-dired-regexp "ag" "\ +Recursively find files in current project matching REGEXP. + +See also `ag-dired-regexp'. + +\(fn REGEXP)" t nil) + +(autoload 'ag-kill-buffers "ag" "\ +Kill all `ag-mode' buffers. + +\(fn)" t nil) + +(autoload 'ag-kill-other-buffers "ag" "\ +Kill all `ag-mode' buffers other than the current buffer. + +\(fn)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ag" '("ag-" "ag/"))) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; ag-autoloads.el ends here diff --git a/elpa/ag-20190726.9/ag-pkg.el b/elpa/ag-20190726.9/ag-pkg.el new file mode 100644 index 00000000..013aa250 --- /dev/null +++ b/elpa/ag-20190726.9/ag-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "ag" "20190726.9" "A front-end for ag ('the silver searcher'), the C ack replacement." '((dash "2.8.0") (s "1.9.0") (cl-lib "0.5")) :commit "bd81d68466e44301505629454dfc689b6c17d94b" :authors '(("Wilfred Hughes" . "me@wilfred.me.uk")) :maintainer '("Wilfred Hughes" . "me@wilfred.me.uk")) diff --git a/elpa/ag-20190726.9/ag.el b/elpa/ag-20190726.9/ag.el new file mode 100644 index 00000000..98d7f647 --- /dev/null +++ b/elpa/ag-20190726.9/ag.el @@ -0,0 +1,689 @@ +;;; ag.el --- A front-end for ag ('the silver searcher'), the C ack replacement. + +;; Copyright (C) 2013-2014 Wilfred Hughes +;; +;; Author: Wilfred Hughes +;; Created: 11 January 2013 +;; Version: 0.48 +;; Package-Version: 20190726.9 +;; Package-Requires: ((dash "2.8.0") (s "1.9.0") (cl-lib "0.5")) +;;; Commentary: + +;; Please see README.md for documentation, or read it online at +;; https://github.com/Wilfred/ag.el/#agel + +;;; License: + +;; This file is not part of GNU Emacs. +;; However, it is distributed under the same license. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: +(require 'cl-lib) ;; cl-letf, cl-defun +(require 'dired) ;; dired-sort-inhibit +(require 'dash) +(require 's) +(require 'find-dired) ;; find-dired-filter + +(defgroup ag nil + "A front-end for ag - The Silver Searcher." + :group 'tools + :group 'matching) + +(defcustom ag-executable + "ag" + "Name of the ag executable to use." + :type 'string + :group 'ag) + +(defcustom ag-arguments + (list "--smart-case" "--stats") + "Additional arguments passed to ag. + +Ag.el internally uses --column, --line-number and --color +options (with specific colors) to match groups, so options +specified here should not conflict. + +--line-number is required on Windows, as otherwise ag will not +print line numbers when the input is a stream." + :type '(repeat (string)) + :group 'ag) + +(defcustom ag-dired-arguments + (list "--nocolor" "-S") + "Additional arguments passed to ag-dired." + :type '(repeat (string)) + :group 'ag) + +(defcustom ag-context-lines nil + "Number of context lines to include before and after a matching line." + :type 'integer + :group 'ag) + +(defcustom ag-group-matches t + "Group matches in the same file together. + +If nil, the file name is repeated at the beginning of every match line." + :type 'boolean + :group 'ag) + +(defcustom ag-highlight-search nil + "Non-nil means we highlight the current search term in results. + +This requires the ag command to support --color-match, which is only in v0.14+" + :type 'boolean + :group 'ag) + +(defcustom ag-reuse-buffers nil + "Non-nil means we reuse the existing search results buffer or +dired results buffer, rather than creating one buffer per unique +search." + :type 'boolean + :group 'ag) + +(defcustom ag-reuse-window nil + "Non-nil means we open search results in the same window, +hiding the results buffer." + :type 'boolean + :group 'ag) + +(defcustom ag-project-root-function nil + "A function to determine the project root for `ag-project'. + +If set to a function, call this function with the name of the +file or directory for which to determine the project root +directory. + +If set to nil, fall back to finding VCS root directories." + :type '(choice (const :tag "Default (VCS root)" nil) + (function :tag "Function")) + :group 'ag) + +(defcustom ag-ignore-list nil + "A list of patterns for files/directories to ignore when searching." + :type '(repeat (string)) + :group 'ag) +(make-variable-buffer-local 'ag-ignore-list) +(put 'ag-ignore-list 'safe-local-variable #'listp) + +(require 'compile) + +;; Although ag results aren't exactly errors, we treat them as errors +;; so `next-error' and `previous-error' work. However, we ensure our +;; face inherits from `compilation-info-face' so the results are +;; styled appropriately. +(defface ag-hit-face '((t :inherit compilation-info)) + "Face name to use for ag matches." + :group 'ag) + +(defface ag-match-face '((t :inherit match)) + "Face name to use for ag matches." + :group 'ag) + +(defvar ag-search-finished-hook nil + "Hook run when ag completes a search in a buffer.") + +(defun ag/run-finished-hook (buffer how-finished) + "Run the ag hook to signal that the search has completed." + (with-current-buffer buffer + (run-hooks 'ag-search-finished-hook))) + +(defmacro ag/with-patch-function (fun-name fun-args fun-body &rest body) + "Temporarily override the definition of FUN-NAME whilst BODY is executed. + +Assumes FUNCTION is already defined (see http://emacs.stackexchange.com/a/3452/304)." + `(cl-letf (((symbol-function ,fun-name) + (lambda ,fun-args ,fun-body))) + ,@body)) + +(defun ag/next-error-function (n &optional reset) + "Open the search result at point in the current window or a +different window, according to `ag-reuse-window'." + (if ag-reuse-window + ;; prevent changing the window + (ag/with-patch-function + 'pop-to-buffer (buffer &rest args) (switch-to-buffer buffer) + (compilation-next-error-function n reset)) + + ;; just navigate to the results as normal + (compilation-next-error-function n reset))) + +;; Note that we want to use as tight a regexp as we can to try and +;; handle weird file names (with colons in them) as well as possible. +;; E.g. we use [1-9][0-9]* rather than [0-9]+ so as to accept ":034:" +;; in file names. +(defvar ag/file-column-pattern-nogroup + "^\\(.+?\\):\\([1-9][0-9]*\\):\\([1-9][0-9]*\\):" + "A regexp pattern that groups output into filename, line number and column number.") + +(defvar ag/file-column-pattern-group + "^\\([[:digit:]]+\\):\\([[:digit:]]+\\):" + "A regexp pattern to match line number and column number with grouped output.") + +(defun ag/compilation-match-grouped-filename () + "Match filename backwards when a line/column match is found in grouped output mode." + (save-match-data + (save-excursion + (when (re-search-backward "^File: \\(.*\\)$" (point-min) t) + (list (match-string 1)))))) + +(define-compilation-mode ag-mode "Ag" + "Ag results compilation mode" + (set (make-local-variable 'compilation-error-regexp-alist) + '(compilation-ag-nogroup compilation-ag-group)) + (set (make-local-variable 'compilation-error-regexp-alist-alist) + (list (cons 'compilation-ag-nogroup (list ag/file-column-pattern-nogroup 1 2 3)) + (cons 'compilation-ag-group (list ag/file-column-pattern-group + 'ag/compilation-match-grouped-filename 1 2)))) + (set (make-local-variable 'compilation-error-face) 'ag-hit-face) + (set (make-local-variable 'next-error-function) #'ag/next-error-function) + (set (make-local-variable 'compilation-finish-functions) + #'ag/run-finished-hook) + (add-hook 'compilation-filter-hook 'ag-filter nil t)) + +(define-key ag-mode-map (kbd "p") #'compilation-previous-error) +(define-key ag-mode-map (kbd "n") #'compilation-next-error) +(define-key ag-mode-map (kbd "k") '(lambda () (interactive) + (let (kill-buffer-query-functions) (kill-buffer)))) + +(defun ag/buffer-name (search-string directory regexp) + "Return a buffer name formatted according to ag.el conventions." + (cond + (ag-reuse-buffers "*ag search*") + (regexp (format "*ag search regexp:%s dir:%s*" search-string directory)) + (:else (format "*ag search text:%s dir:%s*" search-string directory)))) + +(defun ag/format-ignore (ignores) + "Prepend '--ignore' to every item in IGNORES." + (apply #'append + (mapcar (lambda (item) (list "--ignore" item)) ignores))) + +(cl-defun ag/search (string directory + &key (regexp nil) (file-regex nil) (file-type nil) (files '("."))) + "Run ag searching for the STRING given in DIRECTORY. +If `files` is passed, tell ag to look only on those files. +If REGEXP is non-nil, treat STRING as a regular expression." + (let ((default-directory (file-name-as-directory directory)) + (arguments ag-arguments) + (shell-command-switch "-c")) + ;; Add double dashes at the end of command line if not specified in + ;; ag-arguments. + (unless (equal (car (last arguments)) "--") + (setq arguments (append arguments '("--")))) + (setq arguments + (append '("--line-number" "--column" "--color" "--color-match" "30;43" + "--color-path" "1;32") + arguments)) + (if ag-group-matches + (setq arguments (cons "--group" arguments)) + (setq arguments (cons "--nogroup" arguments))) + (unless regexp + (setq arguments (cons "--literal" arguments))) + (when (or (eq system-type 'windows-nt) (eq system-type 'cygwin)) + ;; Use --vimgrep to work around issue #97 on Windows. + (setq arguments (cons "--vimgrep" arguments))) + (when (char-or-string-p file-regex) + (setq arguments (append `("--file-search-regex" ,file-regex) arguments))) + (when file-type + (setq arguments (cons (format "--%s" file-type) arguments))) + (if (integerp current-prefix-arg) + (setq arguments (cons (format "--context=%d" (abs current-prefix-arg)) arguments)) + (when ag-context-lines + (setq arguments (cons (format "--context=%d" ag-context-lines) arguments)))) + (when ag-ignore-list + (setq arguments (append (ag/format-ignore ag-ignore-list) arguments))) + (unless (file-exists-p default-directory) + (error "No such directory %s" default-directory)) + (let ((command-string + (mapconcat #'shell-quote-argument + (append (list ag-executable) arguments (append `(,string) files)) + " "))) + ;; If we're called with a prefix, let the user modify the command before + ;; running it. Typically this means they want to pass additional arguments. + ;; The numeric value is used for context lines: positive is just context + ;; number (no modification), negative allows further modification. + (when (and current-prefix-arg (not (and (integerp current-prefix-arg) (> current-prefix-arg 0)))) + ;; Make a space in the command-string for the user to enter more arguments. + (setq command-string (ag/replace-first command-string " -- " " -- ")) + ;; Prompt for the command. + (let ((adjusted-point (- (length command-string) (length string) 5))) + (setq command-string + (read-from-minibuffer "ag command: " + (cons command-string adjusted-point))))) + ;; Call ag. + (compilation-start + command-string + #'ag-mode + `(lambda (mode-name) ,(ag/buffer-name string directory regexp)))))) + +(defun ag/dwim-at-point () + "If there's an active selection, return that. +Otherwise, get the symbol at point, as a string." + (cond ((use-region-p) + (buffer-substring-no-properties (region-beginning) (region-end))) + ((symbol-at-point) + (substring-no-properties + (symbol-name (symbol-at-point)))))) + +(defun ag/buffer-extension-regex () + "If the current buffer has an extension, return +a PCRE pattern that matches files with that extension. +Returns an empty string otherwise." + (let ((file-name (buffer-file-name))) + (if (stringp file-name) + (format "\\.%s$" (ag/escape-pcre (file-name-extension file-name))) + ""))) + +(defun ag/longest-string (&rest strings) + "Given a list of strings and nils, return the longest string." + (let ((longest-string nil)) + (dolist (string (-non-nil strings)) + (when (< (length longest-string) + (length string)) + (setq longest-string string))) + longest-string)) + +(defun ag/replace-first (string before after) + "Replace the first occurrence of BEFORE in STRING with AFTER." + (replace-regexp-in-string + (concat "\\(" (regexp-quote before) "\\)" ".*\\'") + after string + nil nil 1)) + +(autoload 'vc-git-root "vc-git") + +(require 'vc-svn) +;; Emacs 23.4 doesn't provide vc-svn-root. +(unless (functionp 'vc-svn-root) + (defun vc-svn-root (file) + (vc-find-root file vc-svn-admin-directory))) + +(autoload 'vc-hg-root "vc-hg") + +(autoload 'vc-bzr-root "vc-bzr") + +(defun ag/project-root (file-path) + "Guess the project root of the given FILE-PATH. + +Use `ag-project-root-function' if set, or fall back to VCS +roots." + (if ag-project-root-function + (funcall ag-project-root-function file-path) + (or (ag/longest-string + (vc-git-root file-path) + (vc-svn-root file-path) + (vc-hg-root file-path) + (vc-bzr-root file-path)) + file-path))) + +(defun ag/dired-align-size-column () + (beginning-of-line) + (when (looking-at "^ ") + (forward-char 2) + (search-forward " " nil t 4) + (let* ((size-start (point)) + (size-end (search-forward " " nil t)) + (width (and size-end (- size-end size-start)))) + (when (and size-end + (< width 12) + (> width 1)) + (goto-char size-start) + (insert (make-string (- 12 width) ? )))))) + +(defun ag/dired-filter (proc string) + "Filter the output of ag to make it suitable for `dired-mode'." + (let ((buf (process-buffer proc)) + (inhibit-read-only t)) + (if (buffer-name buf) + (with-current-buffer buf + (save-excursion + (save-restriction + (widen) + (let ((beg (point-max))) + (goto-char beg) + (insert string) + (goto-char beg) + (or (looking-at "^") + (progn + (ag/dired-align-size-column) + (forward-line 1))) + (while (looking-at "^") + (insert " ") + (ag/dired-align-size-column) + (forward-line 1)) + (goto-char beg) + (beginning-of-line) + + ;; Remove occurrences of default-directory. + (while (search-forward (concat " " default-directory) nil t) + (replace-match " " nil t)) + + (goto-char (point-max)) + (if (search-backward "\n" (process-mark proc) t) + (progn + (dired-insert-set-properties (process-mark proc) + (1+ (point))) + (move-marker (process-mark proc) (1+ (point))))))))) + (delete-process proc)))) + +(defun ag/dired-sentinel (proc state) + "Update the status/modeline after the process finishes." + (let ((buf (process-buffer proc)) + (inhibit-read-only t)) + (if (buffer-name buf) + (with-current-buffer buf + (let ((buffer-read-only nil)) + (save-excursion + (goto-char (point-max)) + (insert "\n ag " state) + (forward-char -1) ;Back up before \n at end of STATE. + (insert " at " (substring (current-time-string) 0 19)) + (forward-char 1) + (setq mode-line-process + (concat ":" (symbol-name (process-status proc)))) + ;; Since the buffer and mode line will show that the + ;; process is dead, we can delete it now. Otherwise it + ;; will stay around until M-x list-processes. + (delete-process proc) + (force-mode-line-update))) + (run-hooks 'dired-after-readin-hook) + (message "%s finished." (current-buffer)))))) + +(defun ag/kill-process () + "Kill the `ag' process running in the current buffer." + (interactive) + (let ((ag (get-buffer-process (current-buffer)))) + (and ag (eq (process-status ag) 'run) + (eq (process-filter ag) (function find-dired-filter)) + (condition-case nil + (delete-process ag) + (error nil))))) + +(defun ag/escape-pcre (regexp) + "Escape the PCRE-special characters in REGEXP so that it is +matched literally." + (let ((alphanum "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")) + (apply #'concat + (mapcar + (lambda (c) + (cond + ((not (string-match-p (regexp-quote c) alphanum)) + (concat "\\" c)) + (t c))) + (mapcar #'char-to-string (string-to-list regexp)))))) + +;;;###autoload +(defun ag (string directory) + "Search using ag in a given DIRECTORY for a given literal search STRING, +with STRING defaulting to the symbol under point. + +If called with a prefix, prompts for flags to pass to ag." + (interactive (list (ag/read-from-minibuffer "Search string") + (read-directory-name "Directory: "))) + (ag/search string directory)) + +;;;###autoload +(defun ag-files (string file-type directory) + "Search using ag in a given DIRECTORY for a given literal search STRING, +limited to files that match FILE-TYPE. STRING defaults to the +symbol under point. + +If called with a prefix, prompts for flags to pass to ag." + (interactive (list (ag/read-from-minibuffer "Search string") + (ag/read-file-type) + (read-directory-name "Directory: "))) + (apply #'ag/search string directory file-type)) + +;;;###autoload +(defun ag-regexp (string directory) + "Search using ag in a given directory for a given regexp. +The regexp should be in PCRE syntax, not Emacs regexp syntax. + +If called with a prefix, prompts for flags to pass to ag." + (interactive "sSearch regexp: \nDDirectory: ") + (ag/search string directory :regexp t)) + +;;;###autoload +(defun ag-project (string) + "Guess the root of the current project and search it with ag +for the given literal search STRING. + +If called with a prefix, prompts for flags to pass to ag." + (interactive (list (ag/read-from-minibuffer "Search string"))) + (ag/search string (ag/project-root default-directory))) + +;;;###autoload +(defun ag-project-files (string file-type) + "Search using ag for a given literal search STRING, +limited to files that match FILE-TYPE. STRING defaults to the +symbol under point. + +If called with a prefix, prompts for flags to pass to ag." + (interactive (list (ag/read-from-minibuffer "Search string") + (ag/read-file-type))) + (apply 'ag/search string (ag/project-root default-directory) file-type)) + +(defun ag/read-from-minibuffer (prompt) + "Read a value from the minibuffer with PROMPT. +If there's a string at point, offer that as a default." + (let* ((suggested (ag/dwim-at-point)) + (final-prompt + (if suggested + (format "%s (default %s): " prompt suggested) + (format "%s: " prompt))) + ;; Ask the user for input, but add `suggested' to the history + ;; so they can use M-n if they want to modify it. + (user-input (read-from-minibuffer + final-prompt + nil nil nil nil suggested))) + ;; Return the input provided by the user, or use `suggested' if + ;; the input was empty. + (if (> (length user-input) 0) + user-input + suggested))) + +;;;###autoload +(defun ag-project-regexp (regexp) + "Guess the root of the current project and search it with ag +for the given regexp. The regexp should be in PCRE syntax, not +Emacs regexp syntax. + +If called with a prefix, prompts for flags to pass to ag." + (interactive (list (ag/read-from-minibuffer "Search regexp"))) + (ag/search regexp (ag/project-root default-directory) :regexp t)) + +(autoload 'symbol-at-point "thingatpt") + +;;;###autoload +(defalias 'ag-project-at-point 'ag-project) +(make-obsolete 'ag-project-at-point 'ag-project "0.19") + +;;;###autoload +(defalias 'ag-regexp-project-at-point 'ag-project-regexp) +(make-obsolete 'ag-regexp-project-at-point 'ag-project-regexp "0.46") + +;;;###autoload +(defun ag-dired (dir string) + "Recursively find files in DIR matching literal search STRING. + +The PATTERN is matched against the full path to the file, not +only against the file name. + +The results are presented as a `dired-mode' buffer with +`default-directory' being DIR. + +See also `ag-dired-regexp'." + (interactive "DDirectory: \nsFile pattern: ") + (ag-dired-regexp dir (ag/escape-pcre string))) + +;;;###autoload +(defun ag-dired-regexp (dir regexp) + "Recursively find files in DIR matching REGEXP. +REGEXP should be in PCRE syntax, not Emacs regexp syntax. + +The REGEXP is matched against the full path to the file, not +only against the file name. + +Results are presented as a `dired-mode' buffer with +`default-directory' being DIR. + +See also `find-dired'." + (interactive "DDirectory: \nsFile regexp: ") + (let* ((dired-buffers dired-buffers) ;; do not mess with regular dired buffers + (orig-dir dir) + (dir (file-name-as-directory (expand-file-name dir))) + (buffer-name (if ag-reuse-buffers + "*ag dired*" + (format "*ag dired pattern:%s dir:%s*" regexp dir))) + (cmd (if (string= system-type "windows-nt") + (concat ag-executable " " (combine-and-quote-strings ag-dired-arguments " ") " -g \"" regexp "\" " + (shell-quote-argument dir) + " | grep -v \"^$\" | sed \"s/'/\\\\\\\\'/g\" | xargs -I '{}' " + insert-directory-program " " + dired-listing-switches " '{}' &") + (concat ag-executable " " (combine-and-quote-strings ag-dired-arguments " ") " -g '" regexp "' " + (shell-quote-argument dir) + " | grep -v '^$' | sed s/\\'/\\\\\\\\\\'/g | xargs -I '{}' " + insert-directory-program " " + dired-listing-switches " '{}' &")))) + (with-current-buffer (get-buffer-create buffer-name) + (switch-to-buffer (current-buffer)) + (widen) + (kill-all-local-variables) + (if (fboundp 'read-only-mode) + (read-only-mode -1) + (setq buffer-read-only nil)) + (let ((inhibit-read-only t)) (erase-buffer)) + (setq default-directory dir) + (run-hooks 'dired-before-readin-hook) + (shell-command cmd (current-buffer)) + (insert " " dir ":\n") + (insert " " cmd "\n") + (dired-mode dir) + (let ((map (make-sparse-keymap))) + (set-keymap-parent map (current-local-map)) + (define-key map "\C-c\C-k" 'ag/kill-process) + (use-local-map map)) + (set (make-local-variable 'dired-sort-inhibit) t) + (set (make-local-variable 'revert-buffer-function) + `(lambda (ignore-auto noconfirm) + (ag-dired-regexp ,orig-dir ,regexp))) + (if (fboundp 'dired-simple-subdir-alist) + (dired-simple-subdir-alist) + (set (make-local-variable 'dired-subdir-alist) + (list (cons default-directory (point-min-marker))))) + (let ((proc (get-buffer-process (current-buffer)))) + (set-process-filter proc #'ag/dired-filter) + (set-process-sentinel proc #'ag/dired-sentinel) + ;; Initialize the process marker; it is used by the filter. + (move-marker (process-mark proc) 1 (current-buffer))) + (setq mode-line-process '(":%s"))))) + +;;;###autoload +(defun ag-project-dired (pattern) + "Recursively find files in current project matching PATTERN. + +See also `ag-dired'." + (interactive "sFile pattern: ") + (ag-dired-regexp (ag/project-root default-directory) (ag/escape-pcre pattern))) + +;;;###autoload +(defun ag-project-dired-regexp (regexp) + "Recursively find files in current project matching REGEXP. + +See also `ag-dired-regexp'." + (interactive "sFile regexp: ") + (ag-dired-regexp (ag/project-root default-directory) regexp)) + +;;;###autoload +(defun ag-kill-buffers () + "Kill all `ag-mode' buffers." + (interactive) + (dolist (buffer (buffer-list)) + (when (eq (buffer-local-value 'major-mode buffer) 'ag-mode) + (kill-buffer buffer)))) + +;;;###autoload +(defun ag-kill-other-buffers () + "Kill all `ag-mode' buffers other than the current buffer." + (interactive) + (let ((current-buffer (current-buffer))) + (dolist (buffer (buffer-list)) + (when (and + (eq (buffer-local-value 'major-mode buffer) 'ag-mode) + (not (eq buffer current-buffer))) + (kill-buffer buffer))))) + +;; Based on grep-filter. +(defun ag-filter () + "Handle escape sequences inserted by the ag process. +This function is called from `compilation-filter-hook'." + (save-excursion + (forward-line 0) + (let ((end (point)) beg) + (goto-char compilation-filter-start) + (forward-line 0) + (setq beg (point)) + ;; Only operate on whole lines so we don't get caught with part of an + ;; escape sequence in one chunk and the rest in another. + (when (< (point) end) + (setq end (copy-marker end)) + (when ag-highlight-search + ;; Highlight ag matches and delete marking sequences. + (while (re-search-forward "\033\\[30;43m\\(.*?\\)\033\\[0m\033\\[K" end 1) + (replace-match (propertize (match-string 1) + 'face nil 'font-lock-face 'ag-match-face) + t t))) + ;; Add marker at start of line for files. This is used by the match + ;; in `compilation-error-regexp-alist' to extract the file name. + (when ag-group-matches + (goto-char beg) + (while (re-search-forward "\033\\[1;32m\\(.*\\)\033\\[0m\033\\[K" end 1) + (replace-match + (concat "File: " (propertize (match-string 1) 'face nil 'font-lock-face + 'compilation-info)) + t t))) + ;; Delete all remaining escape sequences + (goto-char beg) + (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1) + (replace-match "" t t)))))) + +(defun ag/get-supported-types () + "Query the ag executable for which file types it recognises." + (let* ((ag-output (shell-command-to-string (format "%s --list-file-types" ag-executable))) + (lines (-map #'s-trim (s-lines ag-output))) + (types (--keep (when (s-starts-with? "--" it) (s-chop-prefix "--" it )) lines)) + (extensions (--map (s-split " " it) (--filter (s-starts-with? "." it) lines)))) + (-zip types extensions))) + +(defun ag/read-file-type () + "Prompt the user for a known file type, or let them specify a PCRE regex." + (let* ((all-types-with-extensions (ag/get-supported-types)) + (all-types (mapcar 'car all-types-with-extensions)) + (file-type + (completing-read "Select file type: " + (append '("custom (provide a PCRE regex)") all-types))) + (file-type-extensions + (cdr (assoc file-type all-types-with-extensions)))) + (if file-type-extensions + (list :file-type file-type) + (list :file-regex + (read-from-minibuffer "Filenames which match PCRE: " + (ag/buffer-extension-regex)))))) + +(provide 'ag) +;;; ag.el ends here diff --git a/elpa/ag-20190726.9/ag.elc b/elpa/ag-20190726.9/ag.elc new file mode 100644 index 0000000000000000000000000000000000000000..6a1e370e9d5de73e24473dc22882aec52152dcbc GIT binary patch literal 23108 zcmd5^3wPVbl~y9w@o*ylWg1(6-Sa|NCXIylH8=0W!dqjv0dAJq@j8Yks!sI z1Q>#}t+czpeZTMC84!G^b-U>~>qHVT7|i3&oqNCg7~DSj)$z|(R#w(--@a{*)4{OU zkK1z7OU%h2YGvkCJj!}$VuJc^Ri3==jn7Tg@0)Zu?hSh1M`JwBcGu+L^YdP2I%vgA zvN$vCizFKKTBe=0vhk>wbhBG{I?Bc-YPaLI$$Rk+c7ub3HrgrLNYb%srO7x#<;l3? z?V}{|j-DMqd}vzd(I{$-F~nQaeU!9KmYPJC)4D(Wu{xM`nDEia}NT z1quF7|2TmE>%Xnzyr~v%!s1QM-PG|;qgmzq zzK@>(KUMoT{Pf?nWxs|J)bvp^K+OO(1J=Y(rBSRE;N2j^58jYkd~2~5+Nq+QD%-(N zb!l5wj)S$>9&2$F3vE@=Lly0Xc3dH9F4hX!18RgEA8K4u3q46KJNip%aZYTD)VQ>* z8fvgs4K-M+wsej)JI9)xV{KuMHS|_<3t2;#e5H;C3+-Ro}M>wJpF>S(B*6aR+R zl!s`d!PkoqD~+=Gb`*a%>5XF3>U;g(nQ7y?ZQ4J`MXn!(DZW#}>OkyvY49+lp3Ltrwj+zMtBt)ax7Ll0^ z<5sT&VTd==QMSWAgepep1jz`=Wn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e --- /dev/null +++ b/elpa/js2-mode-20190815.1327/js2-imenu-extras.el @@ -0,0 +1,349 @@ +;;; js2-imenu-extras.el --- Imenu support for additional constructs + +;; Copyright (C) 2012-2014 Free Software Foundation, Inc. + +;; Author: Dmitry Gutov +;; Keywords: languages, javascript, imenu + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This package adds Imenu support for additional framework constructs and +;; structural patterns to `js2-mode'. + +;; Usage: + +;; (add-hook 'js2-mode-hook 'js2-imenu-extras-mode) + +;; To customize how it works: +;; M-x customize-group RET js2-imenu RET + +(eval-when-compile + (require 'cl)) + +(require 'js2-mode) + +(defvar js2-imenu-extension-styles + `((:framework jquery + :call-re "\\_<\\(?:jQuery\\|\\$\\|_\\)\\.extend\\s-*(" + :recorder js2-imenu-record-jquery-extend) + + (:framework jquery-ui + :call-re "^\\s-*\\(?:jQuery\\|\\$\\)\\.widget\\s-*(" + :recorder js2-imenu-record-string-declare) + + (:framework dojo + :call-re "^\\s-*dojo.declare\\s-*(" + :recorder js2-imenu-record-string-declare) + + (:framework backbone + :call-re ,(concat "\\_<" js2-mode-identifier-re "\\.extend\\s-*(") + :recorder js2-imenu-record-backbone-extend) + + (:framework enyo + :call-re "\\_9lZTkOU=I zB)|ZmY}N7q{(if601hPdk-GJaXaaY)cefwE-P>C}eDeL{PnMRJRvtclC>}?XX)yMO z{1AlV$;2BZ;>eGaAPR-u-D-2on;<<9-gqpcX&Ov|e|jmJldTnQ+&c&oF#;7aOZ-F( zk3(+~48$-RBxxLk`^i1D#z`u?;m{w7d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#SDgBorF)X3(N!|#L??bsA7x4MXeVVHj*7~{-N4R5WM$Z}P1KJYm55mt@|z!Q-ns6!eA zbnekNI4&N-@MHBTo8SHc4J`*_TkV}C@^kc^FBrJVZjq6rL;#siCiy-3qj(i0DRpH# zt9()2Y~p)Iu7J9c+v6NP*^Y@bY2rbkbm?0ub^KCEUOrdRIvUAl!WEQ;;Fk`#1IG_6 zj{NblIpqq;1{_(oJ@q?@1~R~sEsbj9`7Gg|f_#?X{96?#4o%NBm+dkC)KusIVb}@qOY$iN#8{^>GMe7%!K;)Ndh=b zW^h!1yAm`J%+Zge`q3;LV#uqk-tw;SW~jo(Qb;w9MIS#INbtiL{Lp2Sf2f6lfDlHqZ|D0W&}**zKZ=pJi~s-t literal 0 HcmV?d00001 diff --git a/elpa/js2-mode-20190815.1327/js2-mode-autoloads.el b/elpa/js2-mode-20190815.1327/js2-mode-autoloads.el new file mode 100644 index 00000000..ccea7e09 --- /dev/null +++ b/elpa/js2-mode-20190815.1327/js2-mode-autoloads.el @@ -0,0 +1,85 @@ +;;; js2-mode-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "js2-imenu-extras" "js2-imenu-extras.el" (0 +;;;;;; 0 0 0)) +;;; Generated autoloads from js2-imenu-extras.el + +(autoload 'js2-imenu-extras-setup "js2-imenu-extras" "\ + + +\(fn)" nil nil) + +(autoload 'js2-imenu-extras-mode "js2-imenu-extras" "\ +Toggle Imenu support for frameworks and structural patterns. + +\(fn &optional ARG)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "js2-imenu-extras" '("js2-imenu-"))) + +;;;*** + +;;;### (autoloads nil "js2-mode" "js2-mode.el" (0 0 0 0)) +;;; Generated autoloads from js2-mode.el + +(autoload 'js2-highlight-unused-variables-mode "js2-mode" "\ +Toggle highlight of unused variables. + +\(fn &optional ARG)" t nil) + +(autoload 'js2-minor-mode "js2-mode" "\ +Minor mode for running js2 as a background linter. +This allows you to use a different major mode for JavaScript editing, +such as `js-mode', while retaining the asynchronous error/warning +highlighting features of `js2-mode'. + +\(fn &optional ARG)" t nil) + +(autoload 'js2-mode "js2-mode" "\ +Major mode for editing JavaScript code. + +\(fn)" t nil) + +(autoload 'js2-jsx-mode "js2-mode" "\ +Major mode for editing JSX code in Emacs 26 and earlier. + +To edit JSX code in Emacs 27, use `js-mode' as your major mode +with `js2-minor-mode' enabled. + +To customize the indentation for this mode, set the SGML offset +variables (`sgml-basic-offset' et al) locally, like so: + + (defun set-jsx-indentation () + (setq-local sgml-basic-offset js2-basic-offset)) + (add-hook \\='js2-jsx-mode-hook #\\='set-jsx-indentation) + +\(fn)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "js2-mode" '("js2-"))) + +;;;*** + +;;;### (autoloads nil "js2-old-indent" "js2-old-indent.el" (0 0 0 +;;;;;; 0)) +;;; Generated autoloads from js2-old-indent.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "js2-old-indent" '("js2-"))) + +;;;*** + +;;;### (autoloads nil nil ("js2-mode-pkg.el") (0 0 0 0)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; js2-mode-autoloads.el ends here diff --git a/elpa/js2-mode-20190815.1327/js2-mode-pkg.el b/elpa/js2-mode-20190815.1327/js2-mode-pkg.el new file mode 100644 index 00000000..1db2b805 --- /dev/null +++ b/elpa/js2-mode-20190815.1327/js2-mode-pkg.el @@ -0,0 +1,15 @@ +(define-package "js2-mode" "20190815.1327" "Improved JavaScript editing mode" + '((emacs "24.1") + (cl-lib "0.5")) + :keywords + '("languages" "javascript") + :authors + '(("Steve Yegge" . "steve.yegge@gmail.com") + ("mooz" . "stillpedant@gmail.com") + ("Dmitry Gutov" . "dgutov@yandex.ru")) + :maintainer + '("Steve Yegge" . "steve.yegge@gmail.com") + :url "https://github.com/mooz/js2-mode/") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/js2-mode-20190815.1327/js2-mode.el b/elpa/js2-mode-20190815.1327/js2-mode.el new file mode 100644 index 00000000..c05be211 --- /dev/null +++ b/elpa/js2-mode-20190815.1327/js2-mode.el @@ -0,0 +1,12940 @@ +;;; js2-mode.el --- Improved JavaScript editing mode -*- lexical-binding: t -*- + +;; Copyright (C) 2009, 2011-2018 Free Software Foundation, Inc. + +;; Author: Steve Yegge +;; mooz +;; Dmitry Gutov +;; URL: https://github.com/mooz/js2-mode/ +;; http://code.google.com/p/js2-mode/ +;; Version: 20190219 +;; Keywords: languages, javascript +;; Package-Requires: ((emacs "24.1") (cl-lib "0.5")) + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This JavaScript editing mode supports: + +;; - strict recognition of the Ecma-262 language standard +;; - support for most Rhino and SpiderMonkey extensions from 1.5 and up +;; - parsing support for ECMAScript for XML (E4X, ECMA-357) +;; - accurate syntax highlighting using a recursive-descent parser +;; - on-the-fly reporting of syntax errors and strict-mode warnings +;; - undeclared-variable warnings using a configurable externs framework +;; - "bouncing" line indentation to choose among alternate indentation points +;; - smart line-wrapping within comments and strings +;; - code folding: +;; - show some or all function bodies as {...} +;; - show some or all block comments as /*...*/ +;; - context-sensitive menu bar and popup menus +;; - code browsing using the `imenu' package +;; - many customization options + +;; Installation: +;; +;; To install it as your major mode for JavaScript editing: + +;; (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) + +;; Alternatively, to install it as a minor mode just for JavaScript linting, +;; you must add it to the appropriate major-mode hook. Normally this would be: + +;; (add-hook 'js-mode-hook 'js2-minor-mode) + +;; You may also want to hook it in for shell scripts running via node.js: + +;; (add-to-list 'interpreter-mode-alist '("node" . js2-mode)) + +;; Use Emacs 27 and want to write JSX? Then use `js2-minor-mode' as described +;; above. Use Emacs 26 or earlier? Then use `js2-jsx-mode': + +;; (add-to-list 'auto-mode-alist '("\\.jsx?\\'" . js2-jsx-mode)) +;; (add-to-list 'interpreter-mode-alist '("node" . js2-jsx-mode)) + +;; Note that linting of JSX code may fail in both modes. + +;; To customize how it works: +;; M-x customize-group RET js2-mode RET + +;; Notes: + +;; This mode includes a port of Mozilla Rhino's scanner, parser and +;; symbol table. Ideally it should stay in sync with Rhino, keeping +;; `js2-mode' current as the EcmaScript language standard evolves. + +;; Unlike cc-engine based language modes, js2-mode's line-indentation is not +;; customizable. It is a surprising amount of work to support customizable +;; indentation. The current compromise is that the tab key lets you cycle among +;; various likely indentation points, similar to the behavior of python-mode. + +;; This mode does not yet work with "multi-mode" modes such as `mmm-mode' +;; and `mumamo', although it could be made to do so with some effort. +;; This means that `js2-mode' is currently only useful for editing JavaScript +;; files, and not for editing JavaScript within