added neotree and removed folders

This commit is contained in:
Raymundo Vásquez Ruiz
2020-01-05 12:22:55 +01:00
parent 343c5ea260
commit 6d8c01e254
568 changed files with 19 additions and 489541 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
projectile-bookmarks.eld
*.dat
*~
/elpa/
/themes/

View File

@@ -1,18 +0,0 @@
This global minor mode provides a simple way to switch between layouts and
the buffers you left open before you switched (unless you closed it).
It doesn't require any setup at all more than:
(0blayout-mode)
When you start Emacs with 0blayout loaded, you will have a default layout
named "default", and then you can create new layouts (<prefix> C-c), switch
layouts (<prefix> C-b), and kill the current layout (<prefix> C-k).
The default <prefix> is (C-c C-l), but you can change it using:
(0blayout-add-keybindings-with-prefix "<your prefix>")
You can also customize-variable to change the name of the default session.
The project is hosted at https://github.com/etu/0blayout
There you can leave bug-reports and suggestions.
Another comparable mode is eyebrowse which have been developed for longer.

View File

@@ -1,62 +0,0 @@
;;; ac-js2-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "ac-js2" "ac-js2.el" (0 0 0 0))
;;; Generated autoloads from ac-js2.el
(autoload 'ac-js2-expand-function "ac-js2" "\
Expand the function definition left of point.
Expansion will only occur for candidates whose documentation
string contain a function prototype.
\(fn)" t nil)
(autoload 'ac-js2-completion-function "ac-js2" "\
Function for `completions-at-point'.
\(fn)" nil nil)
(autoload 'ac-js2-company "ac-js2" "\
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(autoload 'ac-js2-jump-to-definition "ac-js2" "\
Jump to the definition of an object's property, variable or function.
Navigation to a property definend in an Object literal isn't
implemented.
\(fn)" t nil)
(autoload 'ac-js2-mode "ac-js2" "\
A minor mode that provides auto-completion and navigation for Js2-mode.
\(fn &optional ARG)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ac-js2" '("ac-js2-")))
;;;***
;;;### (autoloads nil "ac-js2-tests" "ac-js2-tests.el" (0 0 0 0))
;;; Generated autoloads from ac-js2-tests.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ac-js2-tests" '("completion-frontend-test")))
;;;***
;;;### (autoloads nil nil ("ac-js2-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; ac-js2-autoloads.el ends here

View File

@@ -1,11 +0,0 @@
(define-package "ac-js2" "20190101.933" "Auto-complete source for Js2-mode, with navigation"
'((js2-mode "20090723")
(skewer-mode "1.4"))
:authors
'(("Scott Barnett" . "scott.n.barnett@gmail.com"))
:maintainer
'("Scott Barnett" . "scott.n.barnett@gmail.com")
:url "https://github.com/ScottyB/ac-js2")
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@@ -1,76 +0,0 @@
;;; Tests for ac-js2
(require 'ert)
(require 'skewer-mode)
(require 'js2-mode)
(require 'ac-js2)
;;; Must have a skewer client connected before running the tests
;; Need to call httpd-stop from main Emacs if running tests in batch mode
(unless skewer-clients
(run-skewer))
(ert-deftest ac-js2-candidates-test ()
"Test the major function that returns candidates for all frontends."
(let (property
property-dot
func-call
var)
(with-temp-buffer
(insert "
var temp = function(param1, param2) {
var localParam = 15;
return param1 + param2;
};
var look;
temp.aFun = function(lolParam) {};
temp.anotherFunction = function() { return {about: 3};}")
(setq ac-js2-evaluate-calls t)
(setq ac-js2-external-libraries nil)
(js2-mode)
(ac-js2-mode t)
(js2-parse)
(insert "tem")
(ac-js2-candidates)
(setq var ac-js2-skewer-candidates)
(delete-char -3)
(insert "temp.")
(js2-parse)
(ac-js2-candidates)
(setq property-dot ac-js2-skewer-candidates)
(delete-char -5)
(insert "temp.aF")
(js2-parse)
(ac-js2-candidates)
(setq property ac-js2-skewer-candidates))
(should (assoc 'anotherFunction property-dot))
(print property)
(should (assoc 'aFun property))
(should (assoc 'temp var))))
(defmacro completion-frontend-test (test-name completion-function)
"Utility for testing completion front ends.
TODO: cover more cases"
`(ert-deftest ,test-name ()
(let (var)
(with-temp-buffer
(insert "var testComplete = function(param1, param2) {};")
(js2-mode)
(ac-js2-mode t)
(js2-parse)
(insert "testComplet")
(funcall ',completion-function)
(setq var (thing-at-point 'word)))
(should (string= var "testComplete")))))
(completion-frontend-test auto-complete-test auto-complete)
(completion-frontend-test completion-at-point-test completion-at-point)

View File

@@ -1,608 +0,0 @@
;;; ac-js2.el --- Auto-complete source for Js2-mode, with navigation
;; Copyright (C) 2013 Scott Barnett
;; Author: Scott Barnett <scott.n.barnett@gmail.com>
;; URL: https://github.com/ScottyB/ac-js2
;; Version: 1.0
;; Package-Requires: ((js2-mode "20090723")(skewer-mode "1.4"))
;; This program 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.
;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; An attempt to get context sensitive Javascript completion in Emacs.
;; Basic completions are obtained by parsing Javascript code with
;; Js2-mode's parser.
;;
;; Installation
;;
;; Easiest way to get ac-js2 is to install it from MELPA. You may need
;; this snippet
;;
;; `(add-to-list 'package-archives
;; '("melpa" . "http://melpa.milkbox.net/packages/") t)'
;;
;; if you don't have it already to fetch packages from MELPA.
;;
;; Enable ac-js2 in js2-mode as follows:
;;
;; (add-hook 'js2-mode-hook 'ac-js2-mode)
;;
;; Ac-js2 does not require auto-complete mode but I suggest you grab
;; it anyway as ac-js2 is designed to work with a completion frontend.
;; Support for Company mode is on its way.
;;
;; For more comprehensive completions you can opt to evaluate the code
;; for candidates. A browser needs to be connected to Emacs for the
;; evaluation completions to work. Put this in your init.el file.
;;
;; `(setq ac-js2-evaluate-calls t)'
;;
;; To add completions for external libraries add something like this:
;;
;; (add-to-list 'ac-js2-external-libraries "path/to/lib/library.js")
;;
;; Then connect a browser to Emacs by calling `(run-skewer)'. You may
;; need to save the buffer for completions to start.
;;
;; If auto-complete mode is installed on your system then completions
;; should start showing up otherwise use `completion-at-point'.
;;
;; Note: library completions will only work if `ac-js2-evaluate-calls'
;; is set and a browser is connected to Emacs.
;;
;; Bonus: M-. is bound to `ac-js2-jump-to-definition' which will jump
;; to Javascript definitions found in the same buffer. Given the
;; following proprety reference:
;;
;; foo.bar.baz();
;;
;; placing the cursor on `foo', `bar' or `baz' and executing M-. will
;; take you straight to their respective definitions. Use M-, to jump
;; back to where you were. Also works for object literals.
;;
;; Recently added `ac-js2-expand-function' that will expand a function's
;; parameters bound to `C-c C-c`. Expansion will only work if the cursor
;; is after the function.
;;
;; If you have any issues or suggestions please create an issue on Github:
;; https://github.com/ScottyB/ac-js2
;;; History:
;; Version 1.0
;; * Navigation within current buffer
;; * Completion and docstring for objects via Skewer
;; * External library support
;; * Basic completions of objects in current buffer
;;; Code:
(require 'js2-mode)
(require 'skewer-mode)
(require 'cl-lib)
(require 'etags)
(defgroup ac-js2 nil
"Auto-completion for js2-mode."
:group 'completion
:prefix "ac-js2-")
;;; Configuration variables
(defcustom ac-js2-add-ecma-262-externs t
"If non-nil add `js2-ecma-262-externs' to completion candidates.")
(defcustom ac-js2-add-browser-externs t
"If non-nil add `js2-browser-externs' to completion candidates.")
(defcustom ac-js2-add-keywords t
"If non-nil add `js2-keywords' to completion candidates.")
(defcustom ac-js2-add-prototype-completions t
"When non-nil traverse the prototype chain adding to completion candidates.")
(defcustom ac-js2-external-libraries '()
"List of absolute paths to external Javascript libraries.")
(defcustom ac-js2-evaluate-calls nil
"Warning. When true function calls will be evaluated in the browser.
This may cause undesired side effects however it will
provide better completions. Use at your own risk.")
(defcustom ac-js2-force-reparse t
"Force Js2-mode to reparse buffer before fetching completion candidates.")
;;; Internal variables
(defvar ac-js2-keywords '()
"Cached string version of `js2-keywords'.")
(defvar ac-js2-candidates '())
;; Types of skewer completion methods available
(defconst ac-js2-method-eval 0)
(defconst ac-js2-method-global 1
"Return candidates for the global object.
Only keys of the object are returned as the other properties come
from js2-mode's externs.")
(defvar ac-js2-data-root (file-name-directory load-file-name)
"Location of data files needed for `ac-js2-on-skewer-load'.")
;;; Skewer integration
(defvar ac-js2-skewer-candidates '()
"Cadidates obtained from skewering.")
(defun ac-js2-on-skewer-load ()
"Inject skewer addon and evaluate external libraries in browser."
(insert-file-contents (expand-file-name "skewer-addon.js" ac-js2-data-root))
(and ac-js2-evaluate-calls
(mapcar (lambda (library)
(with-temp-buffer
(insert-file-contents (expand-file-name library))
(skewer-eval (buffer-string)
nil
:type "complete"))) ac-js2-external-libraries)))
(defun ac-js2-skewer-completion-candidates ()
"Get completions returned from skewer."
(mapcar (lambda (candidate) (symbol-name (car candidate))) ac-js2-skewer-candidates))
(defun ac-js2-skewer-document-candidates (name)
"Return document string for NAME from skewer."
(let ((doc (cdr (assoc-string name ac-js2-skewer-candidates))))
(or (ac-js2-format-function doc) doc)))
(defun ac-js2-get-object-properties (name)
"Find properties of NAME for completion."
(ac-js2-skewer-eval-wrapper name `((prototypes . ,ac-js2-add-prototype-completions))))
(defun ac-js2-skewer-result-callback (result)
"Process the RESULT passed from the browser."
(let ((value (cdr (assoc 'value result))))
(if (and (skewer-success-p result) value)
(setq ac-js2-skewer-candidates (append value nil)))))
(defun ac-js2-skewer-eval-wrapper (str &optional extras)
"Wrap `skewer-eval-synchronously' to check if a skewer-client is avilable.
STR is the text to send to the browser for evaluation. Extra
parameters can be passed to the browser using EXTRAS. EXTRAS must
be of the form (param-string . value) where param-string is the
reference and value is the value that can be retrieved from the
request object in Javacript."
(setq ac-js2-skewer-candidates nil)
(if skewer-clients
(if (or ac-js2-evaluate-calls
(not (ac-js2-has-function-calls str)))
(ac-js2-skewer-result-callback
(skewer-eval-synchronously str
:type "complete"
:extra extras)))
(setq skewer-queue nil)))
;; Generate candidates
(defun ac-js2-candidates ()
"Main function called to gather candidates for auto-completion."
(if ac-js2-force-reparse (js2-reparse))
(let ((node (js2-node-parent (js2-node-at-point (1- (point)))))
beg
(prop-get-regex "[a-zA-Z)]\\.")
name)
(setq ac-js2-candidates nil)
(cond
((looking-back "\\.")
;; TODO: Need to come up with a better way to extract object than this regex!!
(save-excursion
(setq beg (and (skip-chars-backward "[a-zA-Z_$][0-9a-zA-Z_$#\"())]+\\.") (point))))
(setq name (buffer-substring-no-properties beg (1- (point))))
(ac-js2-get-object-properties name)
(setq node (ac-js2-initialized-node (if (string-match prop-get-regex name)
(reverse (split-string name prop-get-regex)) name)))
(if (js2-object-node-p node)
(setq ac-js2-candidates
(mapcar (lambda (elem)
(ac-js2-format-node (js2-node-string (js2-object-prop-node-left elem))
elem))
(js2-object-node-elems node))))
(append (mapcar 'cl-first ac-js2-candidates)
(ac-js2-skewer-completion-candidates)))
((js2-prop-get-node-p node)
(setq node (js2-prop-get-node-left node))
(setq name (js2-node-string node))
(ac-js2-get-object-properties name)
(ac-js2-skewer-completion-candidates))
(t
(ac-js2-skewer-eval-wrapper "" `((method . ,ac-js2-method-global)))
(append (ac-js2-skewer-completion-candidates)
(ac-js2-add-extra-completions
(mapcar 'cl-first (ac-js2-get-names-in-scope))))))))
(defun ac-js2-document (name)
"Show documentation for NAME from local buffer if present
otherwise use documentation obtained from skewer."
(let* ((docs (cdr (assoc name ac-js2-candidates)))
(doc (if (listp docs) (cl-first docs) docs)))
(if doc doc (ac-js2-skewer-document-candidates name))))
;; Auto-complete settings
(defun ac-js2-ac-candidates ()
"Completion candidates for auto-complete mode."
(ac-js2-candidates))
(defun ac-js2-ac-document (name)
"Documentation to be shown for auto-complete mode."
(ac-js2-document name))
(defun ac-js2-ac-prefix()
(or (ac-prefix-default) (ac-prefix-c-dot)))
(defun ac-js2-save ()
"Called on `before-save-hook' to evaluate buffer."
(interactive)
(when (string= major-mode "js2-mode")
(ac-js2-skewer-eval-wrapper (buffer-string)))
t)
;;;###autoload
(defun ac-js2-expand-function()
"Expand the function definition left of point.
Expansion will only occur for candidates whose documentation
string contain a function prototype."
(interactive)
(let* ((word (progn
(if (featurep 'auto-complete) (ac-complete))
(substring-no-properties (or (thing-at-point 'word) ""))))
(candidate (ac-js2-ac-document word)))
(if (and (looking-back word) (stringp candidate))
(when (string-match "^function" candidate)
(cond ((featurep 'yasnippet)
(yas-expand-snippet
(concat "("
(replace-regexp-in-string "\\([a-zA-Z0-9]+\\)"
(lambda (txt) (concat "${" txt "}"))
(cl-second (split-string candidate "[()]")))
")$0"))))))))
(defun ac-js2-setup-auto-complete-mode ()
"Setup ac-js2 to be used with auto-complete-mode."
(add-to-list 'ac-sources 'ac-source-js2)
(auto-complete-mode)
(ac-define-source "js2"
'((candidates . ac-js2-ac-candidates)
(document . ac-js2-ac-document)
(prefix . ac-js2-ac-prefix)
(requires . -1))))
;;; Completion at point function
;;;###autoload
(defun ac-js2-completion-function ()
"Function for `completions-at-point'."
(save-excursion
(let ((bounds (if (looking-back "\\.")
(cons (point) (point))
(bounds-of-thing-at-point 'word))))
(list (car bounds) (cdr bounds) (ac-js2-candidates)))))
;;; Company
;;;###autoload
(defun ac-js2-company (command &optional arg &rest ignored)
(interactive (list 'interactive))
(if (not (featurep 'company))
(message "Company is not installed")
(cl-case command
(interactive (company-begin-backend 'ac-js2-company))
(prefix (when ac-js2-mode
(or (company-grab-symbol)
'stop)))
(candidates (all-completions arg (ac-js2-candidates)))
(duplicates t)
(meta (let ((doc (ac-js2-document arg)))
(when doc
(with-temp-buffer
(insert doc)
(js-mode)
(if (fboundp 'font-lock-ensure)
(font-lock-ensure)
(with-no-warnings
(font-lock-fontify-buffer)))
(buffer-string))))))))
;;; Helper functions
(defun ac-js2-build-prop-name-list (prop-node)
"Build a list of names from a PROP-NODE."
(let* (names
left
left-node)
(unless (js2-prop-get-node-p prop-node)
(error "Node is not a property prop-node"))
(while (js2-prop-get-node-p prop-node)
(push (js2-name-node-name (js2-prop-get-node-right prop-node)) names)
(setq left-node (js2-prop-get-node-left prop-node))
(when (js2-name-node-p left-node)
(setq left (js2-name-node-name left-node)))
(setq prop-node (js2-node-parent prop-node)))
(append names `(,left))))
(defun ac-js2-prop-names-left (name-node)
"Create a list of all of the names in the property NAME-NODE.
NAME-NODE must have a js2-prop-get-node as parent. Only adds
properties to the left of point. This is so individual jump
points can be found for each property in the chain."
(let* (name
(parent (js2-node-parent name-node))
left
names)
(unless (or (js2-prop-get-node-p parent) (js2-name-node-p name-node))
(error "Not a name node or doesn't have a prop-get-node as parent"))
(setq name (js2-name-node-name name-node)
left (js2-prop-get-node-left parent))
(if (and (js2-name-node-p left)
(string= name (js2-name-node-name left)))
(setq names name)
(js2-visit-ast
parent
(lambda (node endp)
(unless endp
(if (js2-name-node-p node)
(push (js2-name-node-name node) names)
t))))
names)))
(defun ac-js2-has-function-calls (string)
"Check if the Javascript code in STRING has a Js2-call-node."
(with-temp-buffer
(insert string)
(let* ((ast (js2-parse)))
(catch 'call-node
(js2-visit-ast-root
ast
(lambda (node end-p)
(unless end-p
(if (js2-call-node-p node)
(throw 'call-node t)
t))))))))
(defun ac-js2-add-extra-completions (completions)
"Add extra candidates to COMPLETIONS."
(append completions
(if ac-js2-add-keywords (or ac-js2-keywords (setq ac-js2-keywords (mapcar 'symbol-name js2-keywords))))
(if ac-js2-add-ecma-262-externs js2-ecma-262-externs)
(if ac-js2-add-browser-externs js2-browser-externs)))
(defun ac-js2-root-or-node ()
"Return the current node or js2-ast-root node."
(let ((node (js2-node-at-point)))
(if (js2-ast-root-p node)
node
(js2-node-get-enclosing-scope node))))
(defun ac-js2-get-names-in-scope ()
"Fetches all symbols in scope and formats them for completion."
(let* ((scope (ac-js2-root-or-node))
result)
(while scope
(setq result (append result
(cl-loop for item in (js2-scope-symbol-table scope)
if (not (assoc (car item) result))
collect item)))
(setq scope (js2-scope-parent-scope scope)))
(setq ac-js2-candidates
(mapcar #'(lambda (x)
(let* ((name (symbol-name (car x)))
(init (ac-js2-initialized-node name)))
(ac-js2-format-node name init)))
result))))
(defun ac-js2-initialized-node (name)
"Return initial value assigned to NAME.
NAME may be either a variable, a function or a variable that
holds a function. NAME may also be a list of names that make up a
object property. Returns nil if no initial value can be found."
(let* ((node (if (listp name) (ac-js2-find-property name)
(ac-js2-name-declaration name)))
(parent (if node (js2-node-parent node)))
(init (cond
((js2-function-node-p parent)
parent)
((js2-function-node-p node)
node)
((js2-var-init-node-p parent)
(js2-var-init-node-initializer parent))
((js2-assign-node-p parent)
(js2-assign-node-right parent))
(t
nil))))
init))
(defun ac-js2-name-declaration (name)
"Return the declaration node for node named NAME."
(let* ((node (ac-js2-root-or-node))
(scope-def (js2-get-defining-scope node name))
(scope (if scope-def (js2-scope-get-symbol scope-def name) nil))
(symbol (if scope (js2-symbol-ast-node scope) nil)))
(if (not symbol)
(ac-js2-get-function-node name scope-def)
symbol)))
;;; Completion candidate formatting
(defun ac-js2-format-node (name node)
"Format NAME and NODE for completion.
Returned format is a list where the first element is the NAME of
the node (shown in completion candidate list) and the last
element is the text to show as documentation."
(let ((node (if (js2-object-prop-node-p node) (js2-object-prop-node-right node) node))
(name-format (replace-regexp-in-string "\"" "" name))
(doc (if (and (js2-function-node-p node)
(cl-find name (js2-function-node-params node)
:test '(lambda (name param) (string= name (js2-name-node-name param)))))
"Function parameter"
(ac-js2-format-node-doc node))))
`(,name-format . ,doc)))
(defun ac-js2-format-object-node-doc (obj-node)
"Format OBJ-NODE to display as documentation."
(let (elems)
(unless (js2-object-node-p obj-node)
(error "Node is not an object node"))
(setq elems (js2-object-node-elems obj-node))
(if (not elems)
"{}"
(mapconcat #'(lambda (x) (ac-js2-format-js2-object-prop-doc x)) elems "\n"))))
(defun ac-js2-format-node-doc (node)
"Format NODE for displaying in a document string."
(let* ((node-above (and node (js2-node-at-point
(save-excursion
(goto-char (js2-node-abs-pos node))
(forward-line -1)
(point)))))
(comment (if (js2-comment-node-p node-above)
(ac-js2-format-comment (js2-node-string node-above))))
(doc (cond
((js2-function-node-p node)
(ac-js2-format-function node))
((js2-object-node-p node)
(ac-js2-format-object-node-doc node))
((js2-object-prop-node-p node)
(ac-js2-format-node-doc (js2-object-prop-node-right node)))
(t
(if (js2-node-p node) (js2-node-string node) "")))))
(if comment (concat comment "\n" doc) doc)))
(defun ac-js2-format-js2-object-prop-doc (obj-prop)
"Format an OBJ-PROP for displaying as a document string."
(unless (js2-object-prop-node-p obj-prop)
(error "Node is not an object property node"))
(let* ((left (js2-object-prop-node-left obj-prop))
(right (js2-object-prop-node-right obj-prop)))
(concat (js2-node-string left) " : "
(ac-js2-format-node-doc right))))
(defun ac-js2-format-function (func)
"Formats a function for a document string.
FUNC can be either a function node or a string starting with
'function'. Returns nil if neither."
(let ((str (or (and (js2-function-node-p func) (js2-node-string func))
(and (stringp func) (eq 0 (string-match "function" func)) func))))
(if str (substring str 0 (1+ (string-match ")" str))))))
(defun ac-js2-format-comment (comment)
"Prepare a COMMENT node for displaying in a popup."
(let* ((node-string (if (js2-comment-node-p comment)
(js2-node-string comment)
comment))
(string (replace-regexp-in-string "[ \t]$" ""
(replace-regexp-in-string "^[ \t\n*/*]+" "" node-string))))
string))
;;; Navigation commands for js2-mode
(defun ac-js2-find-property (list-names)
"Find the property definition that consists of LIST-NAMES.
Supports navigation to 'foo.bar = 3' and 'foo = {bar: 3}'."
(catch 'prop-found
(js2-visit-ast-root
js2-mode-ast
(lambda (node endp)
(let ((parent (js2-node-parent node)))
(unless endp
(if (or (and (js2-prop-get-node-p node)
(not (or (js2-elem-get-node-p parent) (js2-call-node-p parent)))
(equal list-names (ac-js2-build-prop-name-list node)))
(and (js2-name-node-p node)
(js2-object-prop-node-p parent)
(string= (js2-name-node-name node)
(cl-first list-names))))
(throw 'prop-found node))
t))))))
(defun ac-js2-get-function-node (name scope)
"Return node of function named NAME in SCOPE."
(catch 'function-found
(js2-visit-ast
scope
(lambda (node end-p)
(when (and (not end-p)
(string= name (ac-js2-get-function-name node)))
(throw 'function-found node))
t))
nil))
;;;###autoload
(defun ac-js2-jump-to-definition ()
"Jump to the definition of an object's property, variable or function.
Navigation to a property definend in an Object literal isn't
implemented."
(interactive)
(ring-insert find-tag-marker-ring (point-marker))
(let* ((node (js2-node-at-point))
(parent (js2-node-parent node))
(prop-names (if (js2-prop-get-node-p parent)
(ac-js2-prop-names-left node)))
(name (if (and (js2-name-node-p node)
(not (js2-object-prop-node-p parent)))
(js2-name-node-name node)
(error "Node is not a supported jump node")))
(node-init (if (and prop-names (listp prop-names))
(ac-js2-find-property prop-names)
(ac-js2-name-declaration name))))
(unless node-init
(pop-tag-mark)
(error "No jump location found"))
(goto-char (js2-node-abs-pos node-init))))
(defun ac-js2-get-function-name (fn-node)
"Return the name of the function FN-NODE.
Value may be either function name or the variable name that holds
the function."
(let ((parent (js2-node-parent fn-node)))
(if (js2-function-node-p fn-node)
(or (js2-function-name fn-node)
(if (js2-var-init-node-p parent)
(js2-name-node-name (js2-var-init-node-target parent)))))))
(defvar ac-js2-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "M-.") 'ac-js2-jump-to-definition)
(define-key map (kbd "M-,") 'pop-tag-mark)
(define-key map (kbd "C-c C-c") 'ac-js2-expand-function)
map)
"Keymap for `ac-js2-mode'.")
;;; Minor mode
;;;###autoload
(define-minor-mode ac-js2-mode
"A minor mode that provides auto-completion and navigation for Js2-mode."
:keymap ac-js2-mode-map
(if (featurep 'auto-complete)
(ac-js2-setup-auto-complete-mode))
(set (make-local-variable 'completion-at-point-functions)
(cons 'ac-js2-completion-function completion-at-point-functions))
(ac-js2-skewer-eval-wrapper (buffer-string))
(add-hook 'before-save-hook 'ac-js2-save nil t)
(add-hook 'skewer-js-hook 'ac-js2-on-skewer-load))
(provide 'ac-js2)
;;; ac-js2.el ends here

Binary file not shown.

View File

@@ -1,116 +0,0 @@
/**
* @fileOverview Completion request handler for skewer.js
* @requires skewer
* @version 1.0
*/
/**
* Handles a completion request from Emacs.
* @param request The request object sent by Emacs
* @returns The completions and init values to be returned to Emacs
*/
skewer.fn.complete = function(request) {
var result = {
type : request.type,
id : request.id,
strict : request.strict,
status : "success"
},
/**
* Methods for generating candidates
*/
METHOD = {
EVAL : 0,
GLOBAL : 1
},
/**
* Add the properties from object to extendObject. Properties
* may be from the prototype but we still want to add them.
*/
extend = function(extendObject, object) {
for(var key in object) {
extendObject[key] = object[key];
}
},
globalCompletion = function() {
var global = Function('return this')(),
keys = Object.keys(global);
candidates = buildCandidates(global, keys);
},
evalCompletion = function(evalObject) {
var obj = (eval, eval)(evalObject);
if (typeof obj === "object") {
candidates = buildCandidates(obj) || {};
while (request.prototypes && (obj = Object.getPrototypeOf(obj)) !== null) {
extend(candidates, buildCandidates(obj));
}
} else if (typeof obj === "function"){
candidates = buildCandidates(obj) || {};
extend(candidates, buildCandidates(Object.getPrototypeOf(obj)));
if (request.prototypes) {
var protoObject = Object.getPrototypeOf(obj.prototype);
if (protoObject !== null) {
extend(candidates, buildCandidates(protoObject));
} else {
extend(candidates, buildCandidates(obj.prototype));
}
}
}
},
/**
* Completion candidates sent back to Emacs. Keys are
* completion candidates the values are the inital items or
* function interfaces.
*/
candidates = {},
/**
* Build the candiates to return to Emacs.
* @param obj The object to get candidates from
* @param items The selected keys from obj to create candidates for
* @return object containing completion candidates and documentation strings
*/
buildCandidates = function(obj, items) {
var keys = items || Object.getOwnPropertyNames(obj), values = {};
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key === "callee" || key === "caller" || key === "arguments") continue;
if (Object.prototype.toString.call(obj[key]) === "[object Function]") {
values[key] = obj[key].toString();
} else if (typeof obj[key] === "object"){
values[key] = "[object Object]";
} else if (typeof obj[key] === "number") {
if (!(obj instanceof Array)) {
values[key] = obj[key].toString();
}
} else if (typeof obj[key] === "string") {
values[key] = obj[key].toString();
} else if(obj[key] === true) {
values[key] = "true";
} else if (obj[key] === false) {
values[key] = "false";
} else {
values[key] = "";
}
}
return values;
};
try {
switch (request.method) {
case METHOD.GLOBAL:
globalCompletion();
break;
default:
evalCompletion(request.eval);
}
result.value = candidates;
} catch (error){
skewer.errorResult(error, result, request);
}
return result;
};

View File

@@ -1,35 +0,0 @@
The core library of the `ac-php' package. Acts like a backend for the
following components:
- `ac-php'
- `company-php'
- `helm-ac-php-apropros'
Can be used as an API to build your own components. This engine currently
provides:
- Support of PHP code completion
- Support of jumping to definition/declaration/inclusion-file
When creating this package, the ideas of the following packages were used:
- auto-java-complete
- `ac-php-remove-unnecessary-items-4-complete-method'
- `ac-php-split-string-with-separator'
- auto-complete-clang
- rtags
- `ac-php-location-stack-index'
Many options available under Help:Customize
Options specific to ac-php-core are in
Convenience/Completion/Auto Complete
Known to work with Linux and macOS. Windows support is in beta stage.
For more info and examples see URL `https://github.com/xcwen/ac-php' .
Bugs: Bug tracking is currently handled using the GitHub issue tracker
(see URL `https://github.com/xcwen/ac-php/issues')

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2019-11-09T11:05:07+0100 using RSA

File diff suppressed because it is too large Load Diff

View File

@@ -1,174 +0,0 @@
;;; async-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "async" "async.el" (0 0 0 0))
;;; Generated autoloads from async.el
(autoload 'async-start-process "async" "\
Start the executable PROGRAM asynchronously. See `async-start'.
PROGRAM is passed PROGRAM-ARGS, calling FINISH-FUNC with the
process object when done. If FINISH-FUNC is nil, the future
object will return the process object when the program is
finished. Set DEFAULT-DIRECTORY to change PROGRAM's current
working directory.
\(fn NAME PROGRAM FINISH-FUNC &rest PROGRAM-ARGS)" nil nil)
(autoload 'async-start "async" "\
Execute START-FUNC (often a lambda) in a subordinate Emacs process.
When done, the return value is passed to FINISH-FUNC. Example:
(async-start
;; What to do in the child process
(lambda ()
(message \"This is a test\")
(sleep-for 3)
222)
;; What to do when it finishes
(lambda (result)
(message \"Async process done, result should be 222: %s\"
result)))
If FINISH-FUNC is nil or missing, a future is returned that can
be inspected using `async-get', blocking until the value is
ready. Example:
(let ((proc (async-start
;; What to do in the child process
(lambda ()
(message \"This is a test\")
(sleep-for 3)
222))))
(message \"I'm going to do some work here\") ;; ....
(message \"Waiting on async process, result should be 222: %s\"
(async-get proc)))
If you don't want to use a callback, and you don't care about any
return value from the child process, pass the `ignore' symbol as
the second argument (if you don't, and never call `async-get', it
will leave *emacs* process buffers hanging around):
(async-start
(lambda ()
(delete-file \"a remote file on a slow link\" nil))
'ignore)
Note: Even when FINISH-FUNC is present, a future is still
returned except that it yields no value (since the value is
passed to FINISH-FUNC). Call `async-get' on such a future always
returns nil. It can still be useful, however, as an argument to
`async-ready' or `async-wait'.
\(fn START-FUNC &optional FINISH-FUNC)" nil nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "async" '("async-")))
;;;***
;;;### (autoloads nil "async-bytecomp" "async-bytecomp.el" (0 0 0
;;;;;; 0))
;;; Generated autoloads from async-bytecomp.el
(autoload 'async-byte-recompile-directory "async-bytecomp" "\
Compile all *.el files in DIRECTORY asynchronously.
All *.elc files are systematically deleted before proceeding.
\(fn DIRECTORY &optional QUIET)" nil nil)
(defvar async-bytecomp-package-mode nil "\
Non-nil if Async-Bytecomp-Package mode is enabled.
See the `async-bytecomp-package-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 `async-bytecomp-package-mode'.")
(custom-autoload 'async-bytecomp-package-mode "async-bytecomp" nil)
(autoload 'async-bytecomp-package-mode "async-bytecomp" "\
Byte compile asynchronously packages installed with package.el.
Async compilation of packages can be controlled by
`async-bytecomp-allowed-packages'.
\(fn &optional ARG)" t nil)
(autoload 'async-byte-compile-file "async-bytecomp" "\
Byte compile Lisp code FILE asynchronously.
Same as `byte-compile-file' but asynchronous.
\(fn FILE)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "async-bytecomp" '("async-byte")))
;;;***
;;;### (autoloads nil "dired-async" "dired-async.el" (0 0 0 0))
;;; Generated autoloads from dired-async.el
(defvar dired-async-mode nil "\
Non-nil if Dired-Async mode is enabled.
See the `dired-async-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 `dired-async-mode'.")
(custom-autoload 'dired-async-mode "dired-async" nil)
(autoload 'dired-async-mode "dired-async" "\
Do dired actions asynchronously.
\(fn &optional ARG)" t nil)
(autoload 'dired-async-do-copy "dired-async" "\
Run dired-do-copy asynchronously.
\(fn &optional ARG)" t nil)
(autoload 'dired-async-do-symlink "dired-async" "\
Run dired-do-symlink asynchronously.
\(fn &optional ARG)" t nil)
(autoload 'dired-async-do-hardlink "dired-async" "\
Run dired-do-hardlink asynchronously.
\(fn &optional ARG)" t nil)
(autoload 'dired-async-do-rename "dired-async" "\
Run dired-do-rename asynchronously.
\(fn &optional ARG)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "dired-async" '("dired-async-")))
;;;***
;;;### (autoloads nil "smtpmail-async" "smtpmail-async.el" (0 0 0
;;;;;; 0))
;;; Generated autoloads from smtpmail-async.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smtpmail-async" '("async-smtpmail-")))
;;;***
;;;### (autoloads nil nil ("async-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; async-autoloads.el ends here

View File

@@ -1,210 +0,0 @@
;;; async-bytecomp.el --- Compile elisp files asynchronously -*- lexical-binding: t -*-
;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
;; Authors: John Wiegley <jwiegley@gmail.com>
;; Thierry Volpiatto <thierry.volpiatto@gmail.com>
;; Keywords: dired async byte-compile
;; X-URL: https://github.com/jwiegley/dired-async
;; This program 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 2, or (at
;; your option) any later version.
;; This program 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;;
;; This package provide the `async-byte-recompile-directory' function
;; which allows, as the name says to recompile a directory outside of
;; your running emacs.
;; The benefit is your files will be compiled in a clean environment without
;; the old *.el files loaded.
;; Among other things, this fix a bug in package.el which recompile
;; the new files in the current environment with the old files loaded, creating
;; errors in most packages after upgrades.
;;
;; NB: This package is advicing the function `package--compile'.
;;; Code:
(require 'cl-lib)
(require 'async)
(defcustom async-bytecomp-allowed-packages
;; FIXME: Arguably the default should be `all', but currently
;; this minor mode is silently/forcefully enabled by Helm and Magit to ensure
;; they get compiled asynchronously, so this conservative default value is
;; here to make sure that the mode can be enabled without the user's
;; explicit consent.
'(async forge helm helm-core helm-ls-git helm-ls-hg magit)
"Packages in this list will be compiled asynchronously by `package--compile'.
All the dependencies of these packages will be compiled async too,
so no need to add dependencies to this list.
The value of this variable can also be the symbol `all', in this case
all packages are always compiled asynchronously."
:group 'async
:type '(choice
(const :tag "All packages" all)
(repeat symbol)))
(defvar async-byte-compile-log-file
(concat user-emacs-directory "async-bytecomp.log"))
;;;###autoload
(defun async-byte-recompile-directory (directory &optional quiet)
"Compile all *.el files in DIRECTORY asynchronously.
All *.elc files are systematically deleted before proceeding."
(cl-loop with dir = (directory-files directory t "\\.elc\\'")
unless dir return nil
for f in dir
when (file-exists-p f) do (delete-file f))
;; Ensure async is reloaded when async.elc is deleted.
;; This happen when recompiling its own directory.
(load "async")
(let ((call-back
(lambda (&optional _ignore)
(if (file-exists-p async-byte-compile-log-file)
(let ((buf (get-buffer-create byte-compile-log-buffer))
(n 0))
(with-current-buffer buf
(goto-char (point-max))
(let ((inhibit-read-only t))
(insert-file-contents async-byte-compile-log-file)
(compilation-mode))
(display-buffer buf)
(delete-file async-byte-compile-log-file)
(unless quiet
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^.*:Error:" nil t)
(cl-incf n)))
(if (> n 0)
(message "Failed to compile %d files in directory `%s'" n directory)
(message "Directory `%s' compiled asynchronously with warnings" directory)))))
(unless quiet
(message "Directory `%s' compiled asynchronously with success" directory))))))
(async-start
`(lambda ()
(require 'bytecomp)
,(async-inject-variables "\\`\\(load-path\\)\\|byte\\'")
(let ((default-directory (file-name-as-directory ,directory))
error-data)
(add-to-list 'load-path default-directory)
(byte-recompile-directory ,directory 0 t)
(when (get-buffer byte-compile-log-buffer)
(setq error-data (with-current-buffer byte-compile-log-buffer
(buffer-substring-no-properties (point-min) (point-max))))
(unless (string= error-data "")
(with-temp-file ,async-byte-compile-log-file
(erase-buffer)
(insert error-data))))))
call-back)
(unless quiet (message "Started compiling asynchronously directory %s" directory))))
(defvar package-archive-contents)
(defvar package-alist)
(declare-function package-desc-reqs "package.el" (cl-x))
(defun async-bytecomp--get-package-deps (pkgs)
;; Same as `package--get-deps' but parse instead `package-archive-contents'
;; because PKG is not already installed and not present in `package-alist'.
;; However fallback to `package-alist' in case PKG no more present
;; in `package-archive-contents' due to modification to `package-archives'.
;; See issue #58.
(let ((seen '()))
(while pkgs
(let ((pkg (pop pkgs)))
(unless (memq pkg seen)
(let ((pkg-desc (cadr (or (assq pkg package-archive-contents)
(assq pkg package-alist)))))
(when pkg-desc
(push pkg seen)
(setq pkgs (append (mapcar #'car (package-desc-reqs pkg-desc))
pkgs)))))))
seen))
(defadvice package--compile (around byte-compile-async)
(let ((cur-package (package-desc-name pkg-desc))
(pkg-dir (package-desc-dir pkg-desc)))
(if (or (member async-bytecomp-allowed-packages '(t all (all)))
(memq cur-package (async-bytecomp--get-package-deps
async-bytecomp-allowed-packages)))
(progn
(when (eq cur-package 'async)
(fmakunbound 'async-byte-recompile-directory))
;; Add to `load-path' the latest version of async and
;; reload it when reinstalling async.
(when (string= cur-package "async")
(cl-pushnew pkg-dir load-path)
(load "async-bytecomp"))
;; `async-byte-recompile-directory' will add directory
;; as needed to `load-path'.
(async-byte-recompile-directory (package-desc-dir pkg-desc) t))
ad-do-it)))
;;;###autoload
(define-minor-mode async-bytecomp-package-mode
"Byte compile asynchronously packages installed with package.el.
Async compilation of packages can be controlled by
`async-bytecomp-allowed-packages'."
:group 'async
:global t
(if async-bytecomp-package-mode
(ad-activate 'package--compile)
(ad-deactivate 'package--compile)))
;;;###autoload
(defun async-byte-compile-file (file)
"Byte compile Lisp code FILE asynchronously.
Same as `byte-compile-file' but asynchronous."
(interactive "fFile: ")
(let ((call-back
(lambda (&optional _ignore)
(let ((bn (file-name-nondirectory file)))
(if (file-exists-p async-byte-compile-log-file)
(let ((buf (get-buffer-create byte-compile-log-buffer))
start)
(with-current-buffer buf
(goto-char (setq start (point-max)))
(let ((inhibit-read-only t))
(insert-file-contents async-byte-compile-log-file)
(compilation-mode))
(display-buffer buf)
(delete-file async-byte-compile-log-file)
(save-excursion
(goto-char start)
(if (re-search-forward "^.*:Error:" nil t)
(message "Failed to compile `%s'" bn)
(message "`%s' compiled asynchronously with warnings" bn)))))
(message "`%s' compiled asynchronously with success" bn))))))
(async-start
`(lambda ()
(require 'bytecomp)
,(async-inject-variables "\\`load-path\\'")
(let ((default-directory ,(file-name-directory file)))
(add-to-list 'load-path default-directory)
(byte-compile-file ,file)
(when (get-buffer byte-compile-log-buffer)
(setq error-data (with-current-buffer byte-compile-log-buffer
(buffer-substring-no-properties (point-min) (point-max))))
(unless (string= error-data "")
(with-temp-file ,async-byte-compile-log-file
(erase-buffer)
(insert error-data))))))
call-back)))
(provide 'async-bytecomp)
;;; async-bytecomp.el ends here

View File

@@ -1,6 +0,0 @@
(define-package "async" "20191030.2138" "Asynchronous processing in Emacs" 'nil :keywords
'("async")
:url "https://github.com/jwiegley/emacs-async")
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@@ -1,408 +0,0 @@
;;; async.el --- Asynchronous processing in Emacs -*- lexical-binding: t -*-
;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
;; Author: John Wiegley <jwiegley@gmail.com>
;; Created: 18 Jun 2012
;; Version: 1.9.3
;; Keywords: async
;; X-URL: https://github.com/jwiegley/emacs-async
;; This program 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 2, or (at
;; your option) any later version.
;; This program 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Adds the ability to call asynchronous functions and process with ease. See
;; the documentation for `async-start' and `async-start-process'.
;;; Code:
(eval-when-compile (require 'cl-lib))
(defgroup async nil
"Simple asynchronous processing in Emacs"
:group 'emacs)
(defcustom async-variables-noprops-function #'async--purecopy
"Default function to remove text properties in variables."
:group 'async
:type 'function)
(defvar async-debug nil)
(defvar async-send-over-pipe t)
(defvar async-in-child-emacs nil)
(defvar async-callback nil)
(defvar async-callback-for-process nil)
(defvar async-callback-value nil)
(defvar async-callback-value-set nil)
(defvar async-current-process nil)
(defvar async--procvar nil)
(defun async--purecopy (object)
"Remove text properties in OBJECT.
Argument OBJECT may be a list or a string, if anything else it
is returned unmodified."
(cond ((stringp object)
(substring-no-properties object))
((consp object)
(cl-loop for elm in object
;; A string.
if (stringp elm)
collect (substring-no-properties elm)
else
;; Proper lists.
if (and (consp elm) (null (cdr (last elm))))
collect (async--purecopy elm)
else
;; Dotted lists.
;; We handle here only dotted list where car and cdr
;; are atoms i.e. (x . y) and not (x . (x . y)) or
;; (x . (x y)) which should fit most cases.
if (and (consp elm) (cdr (last elm)))
collect (let ((key (car elm))
(val (cdr elm)))
(cons (if (stringp key)
(substring-no-properties key)
key)
(if (stringp val)
(substring-no-properties val)
val)))
else
collect elm))
(t object)))
(defun async-inject-variables
(include-regexp &optional predicate exclude-regexp noprops)
"Return a `setq' form that replicates part of the calling environment.
It sets the value for every variable matching INCLUDE-REGEXP and
also PREDICATE. It will not perform injection for any variable
matching EXCLUDE-REGEXP (if present) or representing a syntax-table
i.e. ending by \"-syntax-table\".
When NOPROPS is non nil it tries to strip out text properties of each
variable's value with `async-variables-noprops-function'.
It is intended to be used as follows:
(async-start
`(lambda ()
(require 'smtpmail)
(with-temp-buffer
(insert ,(buffer-substring-no-properties (point-min) (point-max)))
;; Pass in the variable environment for smtpmail
,(async-inject-variables \"\\`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
(smtpmail-send-it)))
'ignore)"
`(setq
,@(let (bindings)
(mapatoms
(lambda (sym)
(let* ((sname (and (boundp sym) (symbol-name sym)))
(value (and sname (symbol-value sym))))
(when (and sname
(or (null include-regexp)
(string-match include-regexp sname))
(or (null exclude-regexp)
(not (string-match exclude-regexp sname)))
(not (string-match "-syntax-table\\'" sname)))
(unless (or (stringp value)
(memq value '(nil t))
(numberp value)
(vectorp value))
(setq value `(quote ,value)))
(when noprops
(setq value (funcall async-variables-noprops-function
value)))
(when (or (null predicate)
(funcall predicate sym))
(setq bindings (cons value bindings)
bindings (cons sym bindings)))))))
bindings)))
(defalias 'async-inject-environment 'async-inject-variables)
(defun async-handle-result (func result buf)
(if (null func)
(progn
(set (make-local-variable 'async-callback-value) result)
(set (make-local-variable 'async-callback-value-set) t))
(unwind-protect
(if (and (listp result)
(eq 'async-signal (nth 0 result)))
(signal (car (nth 1 result))
(cdr (nth 1 result)))
(funcall func result))
(unless async-debug
(kill-buffer buf)))))
(defun async-when-done (proc &optional _change)
"Process sentinel used to retrieve the value from the child process."
(when (eq 'exit (process-status proc))
(with-current-buffer (process-buffer proc)
(let ((async-current-process proc))
(if (= 0 (process-exit-status proc))
(if async-callback-for-process
(if async-callback
(prog1
(funcall async-callback proc)
(unless async-debug
(kill-buffer (current-buffer))))
(set (make-local-variable 'async-callback-value) proc)
(set (make-local-variable 'async-callback-value-set) t))
(goto-char (point-max))
(backward-sexp)
(async-handle-result async-callback (read (current-buffer))
(current-buffer)))
(set (make-local-variable 'async-callback-value)
(list 'error
(format "Async process '%s' failed with exit code %d"
(process-name proc) (process-exit-status proc))))
(set (make-local-variable 'async-callback-value-set) t))))))
(defun async--receive-sexp (&optional stream)
(let ((sexp (decode-coding-string (base64-decode-string
(read stream)) 'utf-8-auto))
;; Parent expects UTF-8 encoded text.
(coding-system-for-write 'utf-8-auto))
(if async-debug
(message "Received sexp {{{%s}}}" (pp-to-string sexp)))
(setq sexp (read sexp))
(if async-debug
(message "Read sexp {{{%s}}}" (pp-to-string sexp)))
(eval sexp)))
(defun async--insert-sexp (sexp)
(let (print-level
print-length
(print-escape-nonascii t)
(print-circle t))
(prin1 sexp (current-buffer))
;; Just in case the string we're sending might contain EOF
(encode-coding-region (point-min) (point-max) 'utf-8-auto)
(base64-encode-region (point-min) (point-max) t)
(goto-char (point-min)) (insert ?\")
(goto-char (point-max)) (insert ?\" ?\n)))
(defun async--transmit-sexp (process sexp)
(with-temp-buffer
(if async-debug
(message "Transmitting sexp {{{%s}}}" (pp-to-string sexp)))
(async--insert-sexp sexp)
(process-send-region process (point-min) (point-max))))
(defun async-batch-invoke ()
"Called from the child Emacs process' command-line."
;; Make sure 'message' and 'prin1' encode stuff in UTF-8, as parent
;; process expects.
(let ((coding-system-for-write 'utf-8-auto))
(setq async-in-child-emacs t
debug-on-error async-debug)
(if debug-on-error
(prin1 (funcall
(async--receive-sexp (unless async-send-over-pipe
command-line-args-left))))
(condition-case err
(prin1 (funcall
(async--receive-sexp (unless async-send-over-pipe
command-line-args-left))))
(error
(prin1 (list 'async-signal err)))))))
(defun async-ready (future)
"Query a FUTURE to see if it is ready.
I.e., if no blocking
would result from a call to `async-get' on that FUTURE."
(and (memq (process-status future) '(exit signal))
(let ((buf (process-buffer future)))
(if (buffer-live-p buf)
(with-current-buffer buf
async-callback-value-set)
t))))
(defun async-wait (future)
"Wait for FUTURE to become ready."
(while (not (async-ready future))
(sleep-for 0.05)))
(defun async-get (future)
"Get the value from process FUTURE when it is ready.
FUTURE is returned by `async-start' or `async-start-process' when
its FINISH-FUNC is nil."
(and future (async-wait future))
(let ((buf (process-buffer future)))
(when (buffer-live-p buf)
(with-current-buffer buf
(async-handle-result
#'identity async-callback-value (current-buffer))))))
(defun async-message-p (value)
"Return true of VALUE is an async.el message packet."
(and (listp value)
(plist-get value :async-message)))
(defun async-send (&rest args)
"Send the given messages to the asychronous Emacs PROCESS."
(let ((args (append args '(:async-message t))))
(if async-in-child-emacs
(if async-callback
(funcall async-callback args))
(async--transmit-sexp (car args) (list 'quote (cdr args))))))
(defun async-receive ()
"Send the given messages to the asychronous Emacs PROCESS."
(async--receive-sexp))
;;;###autoload
(defun async-start-process (name program finish-func &rest program-args)
"Start the executable PROGRAM asynchronously. See `async-start'.
PROGRAM is passed PROGRAM-ARGS, calling FINISH-FUNC with the
process object when done. If FINISH-FUNC is nil, the future
object will return the process object when the program is
finished. Set DEFAULT-DIRECTORY to change PROGRAM's current
working directory."
(let* ((buf (generate-new-buffer (concat "*" name "*")))
(proc (let ((process-connection-type nil))
(apply #'start-process name buf program program-args))))
(with-current-buffer buf
(set (make-local-variable 'async-callback) finish-func)
(set-process-sentinel proc #'async-when-done)
(unless (string= name "emacs")
(set (make-local-variable 'async-callback-for-process) t))
proc)))
(defvar async-quiet-switch "-Q"
"The Emacs parameter to use to call emacs without config.
Can be one of \"-Q\" or \"-q\".
Default is \"-Q\" but it is sometimes useful to use \"-q\" to have a
enhanced config or some more variables loaded.")
;;;###autoload
(defun async-start (start-func &optional finish-func)
"Execute START-FUNC (often a lambda) in a subordinate Emacs process.
When done, the return value is passed to FINISH-FUNC. Example:
(async-start
;; What to do in the child process
(lambda ()
(message \"This is a test\")
(sleep-for 3)
222)
;; What to do when it finishes
(lambda (result)
(message \"Async process done, result should be 222: %s\"
result)))
If FINISH-FUNC is nil or missing, a future is returned that can
be inspected using `async-get', blocking until the value is
ready. Example:
(let ((proc (async-start
;; What to do in the child process
(lambda ()
(message \"This is a test\")
(sleep-for 3)
222))))
(message \"I'm going to do some work here\") ;; ....
(message \"Waiting on async process, result should be 222: %s\"
(async-get proc)))
If you don't want to use a callback, and you don't care about any
return value from the child process, pass the `ignore' symbol as
the second argument (if you don't, and never call `async-get', it
will leave *emacs* process buffers hanging around):
(async-start
(lambda ()
(delete-file \"a remote file on a slow link\" nil))
'ignore)
Note: Even when FINISH-FUNC is present, a future is still
returned except that it yields no value (since the value is
passed to FINISH-FUNC). Call `async-get' on such a future always
returns nil. It can still be useful, however, as an argument to
`async-ready' or `async-wait'."
(let ((sexp start-func)
;; Subordinate Emacs will send text encoded in UTF-8.
(coding-system-for-read 'utf-8-auto))
(setq async--procvar
(async-start-process
"emacs" (file-truename
(expand-file-name invocation-name
invocation-directory))
finish-func
async-quiet-switch "-l"
;; Using `locate-library' ensure we use the right file
;; when the .elc have been deleted.
(locate-library "async")
"-batch" "-f" "async-batch-invoke"
(if async-send-over-pipe
"<none>"
(with-temp-buffer
(async--insert-sexp (list 'quote sexp))
(buffer-string)))))
(if async-send-over-pipe
(async--transmit-sexp async--procvar (list 'quote sexp)))
async--procvar))
(defmacro async-sandbox(func)
"Evaluate FUNC in a separate Emacs process, synchronously."
`(async-get (async-start ,func)))
(defun async--fold-left (fn forms bindings)
(let ((res forms))
(dolist (binding bindings)
(setq res (funcall fn res
(if (listp binding)
binding
(list binding)))))
res))
(defmacro async-let (bindings &rest forms)
"Implements `let', but each binding is established asynchronously.
For example:
(async-let ((x (foo))
(y (bar)))
(message \"%s %s\" x y))
expands to ==>
(async-start (foo)
(lambda (x)
(async-start (bar)
(lambda (y)
(message \"%s %s\" x y)))))"
(declare (indent 1))
(async--fold-left
(lambda (acc binding)
(let ((fun (pcase (cadr binding)
((and (pred functionp) f) f)
(f `(lambda () ,f)))))
`(async-start ,fun
(lambda (,(car binding))
,acc))))
`(progn ,@forms)
(reverse bindings)))
(provide 'async)
;;; async.el ends here

Binary file not shown.

View File

@@ -1,408 +0,0 @@
;;; dired-async.el --- Asynchronous dired actions -*- lexical-binding: t -*-
;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
;; Authors: John Wiegley <jwiegley@gmail.com>
;; Thierry Volpiatto <thierry.volpiatto@gmail.com>
;; Keywords: dired async network
;; X-URL: https://github.com/jwiegley/dired-async
;; This program 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 2, or (at
;; your option) any later version.
;; This program 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; This file provide a redefinition of `dired-create-file' function,
;; performs copies, moves and all what is handled by `dired-create-file'
;; in the background using a slave Emacs process,
;; by means of the async.el module.
;; To use it, put this in your .emacs:
;; (dired-async-mode 1)
;; This will enable async copy/rename etc...
;; in dired and helm.
;;; Code:
(require 'cl-lib)
(require 'dired-aux)
(require 'async)
(eval-when-compile
(defvar async-callback))
(defgroup dired-async nil
"Copy rename files asynchronously from dired."
:group 'dired)
(defcustom dired-async-env-variables-regexp
"\\`\\(tramp-\\(default\\|connection\\|remote\\)\\|ange-ftp\\)-.*"
"Variables matching this regexp will be loaded on Child Emacs."
:type 'regexp
:group 'dired-async)
(defcustom dired-async-message-function 'dired-async-mode-line-message
"Function to use to notify result when operation finish.
Should take same args as `message'."
:group 'dired-async
:type 'function)
(defcustom dired-async-log-file "/tmp/dired-async.log"
"File use to communicate errors from Child Emacs to host Emacs."
:group 'dired-async
:type 'string)
(defcustom dired-async-mode-lighter '(:eval
(when (eq major-mode 'dired-mode)
" Async"))
"Mode line lighter used for `dired-async-mode'."
:group 'dired-async
:risky t
:type 'sexp)
(defface dired-async-message
'((t (:foreground "yellow")))
"Face used for mode-line message."
:group 'dired-async)
(defface dired-async-failures
'((t (:foreground "red")))
"Face used for mode-line message."
:group 'dired-async)
(defface dired-async-mode-message
'((t (:foreground "Gold")))
"Face used for `dired-async--modeline-mode' lighter."
:group 'dired-async)
(define-minor-mode dired-async--modeline-mode
"Notify mode-line that an async process run."
:group 'dired-async
:global t
:lighter (:eval (propertize (format " [%s Async job(s) running]"
(length (dired-async-processes)))
'face 'dired-async-mode-message))
(unless dired-async--modeline-mode
(let ((visible-bell t)) (ding))))
(defun dired-async-mode-line-message (text face &rest args)
"Notify end of operation in `mode-line'."
(message nil)
(let ((mode-line-format (concat
" " (propertize
(if args
(apply #'format text args)
text)
'face face))))
(force-mode-line-update)
(sit-for 3)
(force-mode-line-update)))
(defun dired-async-processes ()
(cl-loop for p in (process-list)
when (cl-loop for c in (process-command p) thereis
(string= "async-batch-invoke" c))
collect p))
(defun dired-async-kill-process ()
(interactive)
(let* ((processes (dired-async-processes))
(proc (car (last processes))))
(and proc (delete-process proc))
(unless (> (length processes) 1)
(dired-async--modeline-mode -1))))
(defun dired-async-after-file-create (total operation failures skipped)
"Callback function used for operation handled by `dired-create-file'."
(unless (dired-async-processes)
;; Turn off mode-line notification
;; only when last process end.
(dired-async--modeline-mode -1))
(when operation
(if (file-exists-p dired-async-log-file)
(progn
(pop-to-buffer (get-buffer-create dired-log-buffer))
(goto-char (point-max))
(setq inhibit-read-only t)
(insert "Error: ")
(insert-file-contents dired-async-log-file)
(special-mode)
(shrink-window-if-larger-than-buffer)
(delete-file dired-async-log-file))
(run-with-timer
0.1 nil
(lambda ()
;; First send error messages.
(cond (failures
(funcall dired-async-message-function
"%s failed for %d of %d file%s -- See *Dired log* buffer"
'dired-async-failures
(car operation) (length failures)
total (dired-plural-s total)))
(skipped
(funcall dired-async-message-function
"%s: %d of %d file%s skipped -- See *Dired log* buffer"
'dired-async-failures
(car operation) (length skipped) total
(dired-plural-s total))))
(when dired-buffers
(cl-loop for (_f . b) in dired-buffers
when (buffer-live-p b)
do (with-current-buffer b
(when (and (not (file-remote-p default-directory nil t))
(file-exists-p default-directory))
(revert-buffer nil t)))))
;; Finally send the success message.
(funcall dired-async-message-function
"Asynchronous %s of %s on %s file%s done"
'dired-async-message
(car operation) (cadr operation)
total (dired-plural-s total)))))))
(defun dired-async-maybe-kill-ftp ()
"Return a form to kill ftp process in child emacs."
(quote
(progn
(require 'cl-lib)
(let ((buf (cl-loop for b in (buffer-list)
thereis (and (string-match
"\\`\\*ftp.*"
(buffer-name b)) b))))
(when buf (kill-buffer buf))))))
(defvar overwrite-query)
(defun dired-async-create-files (file-creator operation fn-list name-constructor
&optional _marker-char)
"Same as `dired-create-files' but asynchronous.
See `dired-create-files' for the behavior of arguments."
(setq overwrite-query nil)
(let ((total (length fn-list))
failures async-fn-list skipped callback
async-quiet-switch)
(let (to)
(dolist (from fn-list)
(setq to (funcall name-constructor from))
(if (and (equal to from)
(null (eq file-creator 'backup-file)))
(progn
(setq to nil)
(dired-log "Cannot %s to same file: %s\n"
(downcase operation) from)))
(if (not to)
(setq skipped (cons (dired-make-relative from) skipped))
(let* ((overwrite (and (null (eq file-creator 'backup-file))
(file-exists-p to)))
(dired-overwrite-confirmed ; for dired-handle-overwrite
(and overwrite
(let ((help-form `(format "\
Type SPC or `y' to overwrite file `%s',
DEL or `n' to skip to next,
ESC or `q' to not overwrite any of the remaining files,
`!' to overwrite all remaining files with no more questions." ,to)))
(dired-query 'overwrite-query "Overwrite `%s'?" to)))))
;; Handle the `dired-copy-file' file-creator specially
;; When copying a directory to another directory or
;; possibly to itself or one of its subdirectories.
;; e.g "~/foo/" => "~/test/"
;; or "~/foo/" =>"~/foo/"
;; or "~/foo/ => ~/foo/bar/")
;; In this case the 'name-constructor' have set the destination
;; TO to "~/test/foo" because the old emacs23 behavior
;; of `copy-directory' was to not create the subdirectory
;; and instead copy the contents.
;; With the new behavior of `copy-directory'
;; (similar to the `cp' shell command) we don't
;; need such a construction of the target directory,
;; so modify the destination TO to "~/test/" instead of "~/test/foo/".
(let ((destname (file-name-directory to)))
(when (and (file-directory-p from)
(file-directory-p to)
(eq file-creator 'dired-copy-file))
(setq to destname))
;; If DESTNAME is a subdirectory of FROM, not a symlink,
;; and the method in use is copying, signal an error.
(and (eq t (car (file-attributes destname)))
(eq file-creator 'dired-copy-file)
(file-in-directory-p destname from)
(error "Cannot copy `%s' into its subdirectory `%s'"
from to)))
(if overwrite
(or (and dired-overwrite-confirmed
(push (cons from to) async-fn-list))
(progn
(push (dired-make-relative from) failures)
(dired-log "%s `%s' to `%s' failed\n"
operation from to)))
(push (cons from to) async-fn-list)))))
;; Fix tramp issue #80 with emacs-26, use "-q" only when needed.
(setq async-quiet-switch
(if (and (boundp 'tramp-cache-read-persistent-data)
async-fn-list
(cl-loop for (_from . to) in async-fn-list
thereis (file-remote-p to)))
"-q" "-Q"))
;; When failures have been printed to dired log add the date at bob.
(when (or failures skipped) (dired-log t))
;; When async-fn-list is empty that's mean only one file
;; had to be copied and user finally answer NO.
;; In this case async process will never start and callback
;; will have no chance to run, so notify failures here.
(unless async-fn-list
(cond (failures
(funcall dired-async-message-function
"%s failed for %d of %d file%s -- See *Dired log* buffer"
'dired-async-failures
operation (length failures)
total (dired-plural-s total)))
(skipped
(funcall dired-async-message-function
"%s: %d of %d file%s skipped -- See *Dired log* buffer"
'dired-async-failures
operation (length skipped) total
(dired-plural-s total)))))
;; Setup callback.
(setq callback
(lambda (&optional _ignore)
(dired-async-after-file-create
total (list operation (length async-fn-list)) failures skipped)
(when (string= (downcase operation) "rename")
(cl-loop for (file . to) in async-fn-list
for bf = (get-file-buffer file)
for destp = (file-exists-p to)
do (and bf destp
(with-current-buffer bf
(set-visited-file-name to t t))))))))
;; Start async process.
(when async-fn-list
(async-start `(lambda ()
(require 'cl-lib) (require 'dired-aux) (require 'dired-x)
,(async-inject-variables dired-async-env-variables-regexp)
(let ((dired-recursive-copies (quote always))
(dired-copy-preserve-time
,dired-copy-preserve-time))
(setq overwrite-backup-query nil)
;; Inline `backup-file' as long as it is not
;; available in emacs.
(defalias 'backup-file
;; Same feature as "cp -f --backup=numbered from to"
;; Symlinks are copied as file from source unlike
;; `dired-copy-file' which is same as cp -d.
;; Directories are omitted.
(lambda (from to ok)
(cond ((file-directory-p from) (ignore))
(t (let ((count 0))
(while (let ((attrs (file-attributes to)))
(and attrs (null (nth 0 attrs))))
(cl-incf count)
(setq to (concat (file-name-sans-versions to)
(format ".~%s~" count)))))
(condition-case err
(copy-file from to ok dired-copy-preserve-time)
(file-date-error
(dired-log "Can't set date on %s:\n%s\n" from err)))))))
;; Now run the FILE-CREATOR function on files.
(cl-loop with fn = (quote ,file-creator)
for (from . dest) in (quote ,async-fn-list)
do (condition-case err
(funcall fn from dest t)
(file-error
(dired-log "%s: %s\n" (car err) (cdr err)))
nil))
(when (get-buffer dired-log-buffer)
(dired-log t)
(with-current-buffer dired-log-buffer
(write-region (point-min) (point-max)
,dired-async-log-file))))
,(dired-async-maybe-kill-ftp))
callback)
;; Run mode-line notifications while process running.
(dired-async--modeline-mode 1)
(message "%s proceeding asynchronously..." operation))))
(defvar wdired-use-interactive-rename)
(defun dired-async-wdired-do-renames (old-fn &rest args)
;; Perhaps a better fix would be to ask for renaming BEFORE starting
;; OLD-FN when `wdired-use-interactive-rename' is non-nil. For now
;; just bind it to nil to ensure no questions will be asked between
;; each rename.
(let (wdired-use-interactive-rename)
(apply old-fn args)))
(defadvice wdired-do-renames (around wdired-async)
(let (wdired-use-interactive-rename)
ad-do-it))
(defadvice dired-create-files (around dired-async)
(dired-async-create-files file-creator operation fn-list
name-constructor marker-char))
;;;###autoload
(define-minor-mode dired-async-mode
"Do dired actions asynchronously."
:group 'dired-async
:lighter dired-async-mode-lighter
:global t
(if dired-async-mode
(if (fboundp 'advice-add)
(progn (advice-add 'dired-create-files :override #'dired-async-create-files)
(advice-add 'wdired-do-renames :around #'dired-async-wdired-do-renames))
(ad-activate 'dired-create-files)
(ad-activate 'wdired-do-renames))
(if (fboundp 'advice-remove)
(progn (advice-remove 'dired-create-files #'dired-async-create-files)
(advice-remove 'wdired-do-renames #'dired-async-wdired-do-renames))
(ad-deactivate 'dired-create-files)
(ad-deactivate 'wdired-do-renames))))
(defmacro dired-async--with-async-create-files (&rest body)
"Evaluate BODY with dired-create-files set to dired-async-create-files."
(declare (indent 0))
`(cl-letf (((symbol-function 'dired-create-files) #'dired-async-create-files))
,@body))
;;;###autoload
(defun dired-async-do-copy (&optional arg)
"Run dired-do-copy asynchronously."
(interactive "P")
(dired-async--with-async-create-files
(dired-do-copy arg)))
;;;###autoload
(defun dired-async-do-symlink (&optional arg)
"Run dired-do-symlink asynchronously."
(interactive "P")
(dired-async--with-async-create-files
(dired-do-symlink arg)))
;;;###autoload
(defun dired-async-do-hardlink (&optional arg)
"Run dired-do-hardlink asynchronously."
(interactive "P")
(dired-async--with-async-create-files
(dired-do-hardlink arg)))
;;;###autoload
(defun dired-async-do-rename (&optional arg)
"Run dired-do-rename asynchronously."
(interactive "P")
(dired-async--with-async-create-files
(dired-do-rename arg)))
(provide 'dired-async)
;;; dired-async.el ends here

View File

@@ -1,73 +0,0 @@
;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously -*- lexical-binding: t -*-
;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
;; Author: John Wiegley <jwiegley@gmail.com>
;; Created: 18 Jun 2012
;; Keywords: email async
;; X-URL: https://github.com/jwiegley/emacs-async
;; This program 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 2, or (at
;; your option) any later version.
;; This program 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Send e-mail with smtpmail.el asynchronously. To use:
;;
;; (require 'smtpmail-async)
;;
;; (setq send-mail-function 'async-smtpmail-send-it
;; message-send-mail-function 'async-smtpmail-send-it)
;;
;; This assumes you already have smtpmail.el working.
;;; Code:
(defgroup smtpmail-async nil
"Send e-mail with smtpmail.el asynchronously"
:group 'smptmail)
(require 'async)
(require 'smtpmail)
(require 'message)
(defvar async-smtpmail-before-send-hook nil
"Hook running in the child emacs in `async-smtpmail-send-it'.
It is called just before calling `smtpmail-send-it'.")
(defun async-smtpmail-send-it ()
(let ((to (message-field-value "To"))
(buf-content (buffer-substring-no-properties
(point-min) (point-max))))
(message "Delivering message to %s..." to)
(async-start
`(lambda ()
(require 'smtpmail)
(with-temp-buffer
(insert ,buf-content)
(set-buffer-multibyte nil)
;; Pass in the variable environment for smtpmail
,(async-inject-variables
"\\`\\(smtpmail\\|async-smtpmail\\|\\(user-\\)?mail\\)-\\|auth-sources\\|epg\\|nsm"
nil "\\`\\(mail-header-format-function\\|smtpmail-address-buffer\\|mail-mode-abbrev-table\\)")
(run-hooks 'async-smtpmail-before-send-hook)
(smtpmail-send-it)))
(lambda (&optional _ignore)
(message "Delivering message to %s...done" to)))))
(provide 'smtpmail-async)
;;; smtpmail-async.el ends here

View File

@@ -1,71 +0,0 @@
;;; auto-complete-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "auto-complete" "auto-complete.el" (0 0 0 0))
;;; Generated autoloads from auto-complete.el
(autoload 'auto-complete "auto-complete" "\
Start auto-completion at current point.
\(fn &optional SOURCES)" t nil)
(autoload 'auto-complete-mode "auto-complete" "\
AutoComplete mode
\(fn &optional ARG)" t nil)
(defvar global-auto-complete-mode nil "\
Non-nil if Global Auto-Complete mode is enabled.
See the `global-auto-complete-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 `global-auto-complete-mode'.")
(custom-autoload 'global-auto-complete-mode "auto-complete" nil)
(autoload 'global-auto-complete-mode "auto-complete" "\
Toggle Auto-Complete mode in all buffers.
With prefix ARG, enable Global Auto-Complete mode if ARG is positive;
otherwise, disable it. If called from Lisp, enable the mode if
ARG is omitted or nil.
Auto-Complete mode is enabled in all buffers where
`auto-complete-mode-maybe' would do it.
See `auto-complete-mode' for more information on Auto-Complete mode.
\(fn &optional ARG)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "auto-complete" '("auto-complete-mode" "ac-")))
;;;***
;;;### (autoloads nil "auto-complete-config" "auto-complete-config.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from auto-complete-config.el
(autoload 'ac-config-default "auto-complete-config" "\
\(fn)" nil nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "auto-complete-config" '("ac-")))
;;;***
;;;### (autoloads nil nil ("auto-complete-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; auto-complete-autoloads.el ends here

View File

@@ -1,551 +0,0 @@
;;; auto-complete-config.el --- auto-complete additional configuations
;; Copyright (C) 2009, 2010 Tomohiro Matsuyama
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
;; Keywords: convenience
;; Version: 1.5.0
;; This program 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.
;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'cl-lib)
(require 'auto-complete)
(declare-function semantic-analyze-current-context "semantic/analyze")
(declare-function semantic-tag-class "semantic/tag")
(declare-function semantic-tag-function-arguments "semantic/tag")
(declare-function semantic-format-tag-type "semantic/format")
(declare-function semantic-format-tag-name "semantic/format")
(declare-function yas-expand-snippet "yasnippet")
(declare-function oref "eieio" (obj slot))
;;;; Additional sources
;; imenu
(defvar ac-imenu-index nil)
(ac-clear-variable-every-10-minutes 'ac-imenu-index)
(defun ac-imenu-candidates ()
(cl-loop with i = 0
with stack = (progn
(unless (local-variable-p 'ac-imenu-index)
(make-local-variable 'ac-imenu-index))
(or ac-imenu-index
(setq ac-imenu-index
(ignore-errors
(with-no-warnings
(imenu--make-index-alist))))))
with result
while (and stack (or (not (integerp ac-limit))
(< i ac-limit)))
for node = (pop stack)
if (consp node)
do
(let ((car (car node))
(cdr (cdr node)))
(if (consp cdr)
(mapc (lambda (child)
(push child stack))
cdr)
(when (and (stringp car)
(string-match (concat "^" (regexp-quote ac-prefix)) car))
;; Remove extra characters
(if (string-match "^.*\\(()\\|=\\|<>\\)$" car)
(setq car (substring car 0 (match-beginning 1))))
(push car result)
(cl-incf i))))
finally return (nreverse result)))
(ac-define-source imenu
'((depends imenu)
(candidates . ac-imenu-candidates)
(symbol . "s")))
;; gtags
(defface ac-gtags-candidate-face
'((t (:inherit ac-candidate-face :foreground "navy")))
"Face for gtags candidate"
:group 'auto-complete)
(defface ac-gtags-selection-face
'((t (:inherit ac-selection-face :background "navy")))
"Face for the gtags selected candidate."
:group 'auto-complete)
(defun ac-gtags-candidate ()
(ignore-errors
(split-string (shell-command-to-string (format "global -ciq %s" ac-prefix)) "\n")))
(ac-define-source gtags
'((candidates . ac-gtags-candidate)
(candidate-face . ac-gtags-candidate-face)
(selection-face . ac-gtags-selection-face)
(requires . 3)
(symbol . "s")))
;; yasnippet
(defface ac-yasnippet-candidate-face
'((t (:inherit ac-candidate-face
:background "sandybrown" :foreground "black")))
"Face for yasnippet candidate."
:group 'auto-complete)
(defface ac-yasnippet-selection-face
'((t (:inherit ac-selection-face :background "coral3")))
"Face for the yasnippet selected candidate."
:group 'auto-complete)
(defun ac-yasnippet-table-hash (table)
(cond
((fboundp 'yas/snippet-table-hash)
(yas/snippet-table-hash table))
((fboundp 'yas/table-hash)
(yas/table-hash table))))
(defun ac-yasnippet-table-parent (table)
(cond
((fboundp 'yas/snippet-table-parent)
(yas/snippet-table-parent table))
((fboundp 'yas/table-parent)
(yas/table-parent table))))
(defun ac-yasnippet-candidate-1 (table)
(with-no-warnings
(let ((hashtab (ac-yasnippet-table-hash table))
(parent (ac-yasnippet-table-parent table))
candidates)
(maphash (lambda (key value)
(push key candidates))
hashtab)
(setq candidates (all-completions ac-prefix (nreverse candidates)))
(if parent
(setq candidates
(append candidates (ac-yasnippet-candidate-1 parent))))
candidates)))
(defun ac-yasnippet-candidates ()
(with-no-warnings
(cond (;; 0.8 onwards
(fboundp 'yas-active-keys)
(all-completions ac-prefix (yas-active-keys)))
(;; >0.6.0
(fboundp 'yas/get-snippet-tables)
(apply 'append (mapcar 'ac-yasnippet-candidate-1
(condition-case nil
(yas/get-snippet-tables major-mode)
(wrong-number-of-arguments
(yas/get-snippet-tables)))))
)
(t
(let ((table
(if (fboundp 'yas/snippet-table)
;; <0.6.0
(yas/snippet-table major-mode)
;; 0.6.0
(yas/current-snippet-table))))
(if table
(ac-yasnippet-candidate-1 table)))))))
(ac-define-source yasnippet
'((depends yasnippet)
(candidates . ac-yasnippet-candidates)
(action . yas/expand)
(candidate-face . ac-yasnippet-candidate-face)
(selection-face . ac-yasnippet-selection-face)
(symbol . "a")))
;; semantic
(defun ac-semantic-candidates (prefix)
(with-no-warnings
(delete "" ; semantic sometimes returns an empty string
(mapcar (lambda (elem)
(cons (semantic-tag-name elem)
(semantic-tag-clone elem)))
(ignore-errors
(or (semantic-analyze-possible-completions
(semantic-analyze-current-context))
(senator-find-tag-for-completion prefix)))))))
(defun ac-semantic-doc (symbol)
(with-no-warnings
(let* ((proto (semantic-format-tag-summarize-with-file symbol nil t))
(doc (semantic-documentation-for-tag symbol))
(res proto))
(when doc
(setq res (concat res "\n\n" doc)))
res)))
(defun ac-semantic-action ()
(when (and (boundp 'yas-minor-mode) yas-minor-mode)
(let* ((tag (car (last (oref (semantic-analyze-current-context) prefix))))
(class (semantic-tag-class tag))
(args))
(when (eq class 'function)
(setq args (semantic-tag-function-arguments tag))
(yas-expand-snippet
(concat "("
(mapconcat
(lambda (arg)
(let ((arg-type (semantic-format-tag-type arg nil))
(arg-name (semantic-format-tag-name arg nil)))
(concat "${"
(if (string= arg-name "")
arg-type
(concat arg-type " " arg-name))
"}")))
args
", ")
")$0"))))))
(ac-define-source semantic
'((available . (or (require 'semantic-ia nil t)
(require 'semantic/ia nil t)))
(candidates . (ac-semantic-candidates ac-prefix))
(document . ac-semantic-doc)
(action . ac-semantic-action)
(prefix . cc-member)
(requires . 0)
(symbol . "m")))
(ac-define-source semantic-raw
'((available . (or (require 'semantic-ia nil t)
(require 'semantic/ia nil t)))
(candidates . (ac-semantic-candidates ac-prefix))
(document . ac-semantic-doc)
(action . ac-semantic-action)
(symbol . "s")))
;; eclim
(defun ac-eclim-candidates ()
(with-no-warnings
(cl-loop for c in (eclim/java-complete)
collect (nth 1 c))))
(ac-define-source eclim
'((candidates . ac-eclim-candidates)
(prefix . c-dot)
(requires . 0)
(symbol . "f")))
;; css
;; Copied from company-css.el
(defconst ac-css-property-alist
;; see http://www.w3.org/TR/CSS21/propidx.html
'(("azimuth" angle "left-side" "far-left" "left" "center-left" "center"
"center-right" "right" "far-right" "right-side" "behind" "leftwards"
"rightwards")
("background" background-color background-image background-repeat
background-attachment background-position)
("background-attachment" "scroll" "fixed")
("background-color" color "transparent")
("background-image" uri "none")
("background-position" percentage length "left" "center" "right" percentage
length "top" "center" "bottom" "left" "center" "right" "top" "center"
"bottom")
("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat")
("border" border-width border-style border-color)
("border-bottom" border)
("border-bottom-color" border-color)
("border-bottom-style" border-style)
("border-bottom-width" border-width)
("border-collapse" "collapse" "separate")
("border-color" color "transparent")
("border-left" border)
("border-left-color" border-color)
("border-left-style" border-style)
("border-left-width" border-width)
("border-right" border)
("border-right-color" border-color)
("border-right-style" border-style)
("border-right-width" border-width)
("border-spacing" length length)
("border-style" border-style)
("border-top" border)
("border-top-color" border-color)
("border-top-style" border-style)
("border-top-width" border-width)
("border-width" border-width)
("bottom" length percentage "auto")
("caption-side" "top" "bottom")
("clear" "none" "left" "right" "both")
("clip" shape "auto")
("color" color)
("content" "normal" "none" string uri counter "attr()" "open-quote"
"close-quote" "no-open-quote" "no-close-quote")
("counter-increment" identifier integer "none")
("counter-reset" identifier integer "none")
("cue" cue-before cue-after)
("cue-after" uri "none")
("cue-before" uri "none")
("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize"
"ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize"
"w-resize" "text" "wait" "help" "progress")
("direction" "ltr" "rtl")
("display" "inline" "block" "list-item" "run-in" "inline-block" "table"
"inline-table" "table-row-group" "table-header-group" "table-footer-group"
"table-row" "table-column-group" "table-column" "table-cell"
"table-caption" "none")
("elevation" angle "below" "level" "above" "higher" "lower")
("empty-cells" "show" "hide")
("float" "left" "right" "none")
("font" font-style font-variant font-weight font-size "/" line-height
font-family "caption" "icon" "menu" "message-box" "small-caption"
"status-bar")
("font-family" family-name generic-family)
("font-size" absolute-size relative-size length percentage)
("font-style" "normal" "italic" "oblique")
("font-variant" "normal" "small-caps")
("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400"
"500" "600" "700" "800" "900")
("height" length percentage "auto")
("left" length percentage "auto")
("letter-spacing" "normal" length)
("line-height" "normal" number length percentage)
("list-style" list-style-type list-style-position list-style-image)
("list-style-image" uri "none")
("list-style-position" "inside" "outside")
("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero"
"lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin"
"armenian" "georgian" "lower-alpha" "upper-alpha" "none")
("margin" margin-width)
("margin-bottom" margin-width)
("margin-left" margin-width)
("margin-right" margin-width)
("margin-top" margin-width)
("max-height" length percentage "none")
("max-width" length percentage "none")
("min-height" length percentage)
("min-width" length percentage)
("orphans" integer)
("outline" outline-color outline-style outline-width)
("outline-color" color "invert")
("outline-style" border-style)
("outline-width" border-width)
("overflow" "visible" "hidden" "scroll" "auto")
("padding" padding-width)
("padding-bottom" padding-width)
("padding-left" padding-width)
("padding-right" padding-width)
("padding-top" padding-width)
("page-break-after" "auto" "always" "avoid" "left" "right")
("page-break-before" "auto" "always" "avoid" "left" "right")
("page-break-inside" "avoid" "auto")
("pause" time percentage)
("pause-after" time percentage)
("pause-before" time percentage)
("pitch" frequency "x-low" "low" "medium" "high" "x-high")
("pitch-range" number)
("play-during" uri "mix" "repeat" "auto" "none")
("position" "static" "relative" "absolute" "fixed")
("quotes" string string "none")
("richness" number)
("right" length percentage "auto")
("speak" "normal" "none" "spell-out")
("speak-header" "once" "always")
("speak-numeral" "digits" "continuous")
("speak-punctuation" "code" "none")
("speech-rate" number "x-slow" "slow" "medium" "fast" "x-fast" "faster"
"slower")
("stress" number)
("table-layout" "auto" "fixed")
("text-align" "left" "right" "center" "justify")
("text-decoration" "none" "underline" "overline" "line-through" "blink")
("text-indent" length percentage)
("text-transform" "capitalize" "uppercase" "lowercase" "none")
("top" length percentage "auto")
("unicode-bidi" "normal" "embed" "bidi-override")
("vertical-align" "baseline" "sub" "super" "top" "text-top" "middle"
"bottom" "text-bottom" percentage length)
("visibility" "visible" "hidden" "collapse")
("voice-family" specific-voice generic-voice "*" specific-voice
generic-voice)
("volume" number percentage "silent" "x-soft" "soft" "medium" "loud"
"x-loud")
("white-space" "normal" "pre" "nowrap" "pre-wrap" "pre-line")
("widows" integer)
("width" length percentage "auto")
("word-spacing" "normal" length)
("z-index" "auto" integer))
"A list of CSS properties and their possible values.")
(defconst ac-css-value-classes
'((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large"
"xx-large")
(border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove"
"ridge" "inset" "outset")
(color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy"
"olive" "orange" "purple" "red" "silver" "teal" "white" "yellow"
"rgb")
(counter "counter")
(family-name "Courier" "Helvetica" "Times")
(generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace")
(generic-voice "male" "female" "child")
(margin-width "auto") ;; length percentage
(relative-size "larger" "smaller")
(shape "rect")
(uri "url"))
"A list of CSS property value classes and their contents.")
(defconst ac-css-pseudo-classes
'("active" "after" "before" "first" "first-child" "first-letter" "first-line"
"focus" "hover" "lang" "left" "link" "right" "visited")
"Identifiers for CSS pseudo-elements and pseudo-classes.")
(defvar ac-css-property nil
"Current editing property.")
(defun ac-css-prefix ()
(when (save-excursion (re-search-backward "\\_<\\(.+?\\)\\_>\\s *:[^;]*\\=" nil t))
(setq ac-css-property (match-string 1))
(or (ac-prefix-symbol) (point))))
(defun ac-css-property-candidates ()
(let ((list (assoc-default ac-css-property ac-css-property-alist)))
(if list
(cl-loop with seen
with value
while (setq value (pop list))
if (symbolp value)
do (unless (memq value seen)
(push value seen)
(setq list
(append list
(or (assoc-default value ac-css-value-classes)
(assoc-default (symbol-name value) ac-css-property-alist)))))
else collect value)
ac-css-pseudo-classes)))
(ac-define-source css-property
'((candidates . ac-css-property-candidates)
(prefix . ac-css-prefix)
(requires . 0)))
;; slime
(ac-define-source slime
'((depends slime)
(candidates . (car (slime-simple-completions ac-prefix)))
(symbol . "s")
(cache)))
;; ghc-mod
(ac-define-source ghc-mod
'((depends ghc)
(candidates . (ghc-select-completion-symbol))
(symbol . "s")
(cache)))
;;;; Not maintained sources
;; ropemacs
(defvar ac-ropemacs-loaded nil)
(defun ac-ropemacs-require ()
(with-no-warnings
(unless ac-ropemacs-loaded
(pymacs-load "ropemacs" "rope-")
(if (boundp 'ropemacs-enable-autoimport)
(setq ropemacs-enable-autoimport t))
(setq ac-ropemacs-loaded t))))
(defun ac-ropemacs-setup ()
(ac-ropemacs-require)
;(setq ac-sources (append (list 'ac-source-ropemacs) ac-sources))
(setq ac-omni-completion-sources '(("\\." ac-source-ropemacs))))
(defun ac-ropemacs-initialize ()
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
(add-hook 'python-mode-hook 'ac-ropemacs-setup)
t)
(defvar ac-ropemacs-completions-cache nil)
(defvar ac-source-ropemacs
'((init
. (lambda ()
(setq ac-ropemacs-completions-cache
(mapcar
(lambda (completion)
(concat ac-prefix completion))
(ignore-errors
(rope-completions))))))
(candidates . ac-ropemacs-completions-cache)))
;; rcodetools
(defvar ac-source-rcodetools
'((init . (lambda ()
(require 'rcodetools)
(condition-case x
(save-excursion
(rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles"))
(error) (setq rct-method-completion-table nil))))
(candidates . (lambda ()
(all-completions
ac-prefix
(mapcar
(lambda (completion)
(replace-regexp-in-string "\t.*$" "" (car completion)))
rct-method-completion-table))))))
;;;; Default settings
(defun ac-common-setup ()
;(add-to-list 'ac-sources 'ac-source-filename)
)
(defun ac-emacs-lisp-mode-setup ()
(setq ac-sources (append '(ac-source-features ac-source-functions ac-source-yasnippet ac-source-variables ac-source-symbols) ac-sources)))
(defun ac-cc-mode-setup ()
(setq ac-sources (append '(ac-source-yasnippet ac-source-gtags) ac-sources)))
(defun ac-ruby-mode-setup ())
(defun ac-css-mode-setup ()
(setq ac-sources (append '(ac-source-css-property) ac-sources)))
;;;###autoload
(defun ac-config-default ()
(setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
(add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup)
(add-hook 'c-mode-common-hook 'ac-cc-mode-setup)
(add-hook 'ruby-mode-hook 'ac-ruby-mode-setup)
(add-hook 'css-mode-hook 'ac-css-mode-setup)
(add-hook 'auto-complete-mode-hook 'ac-common-setup)
(global-auto-complete-mode t))
(provide 'auto-complete-config)
;;; auto-complete-config.el ends here

View File

@@ -1,6 +0,0 @@
(define-package "auto-complete" "20170125.245" "Auto Completion for GNU Emacs"
'((popup "0.5.0")
(cl-lib "0.5")))
;; Local Variables:
;; no-byte-compile: t
;; End:

File diff suppressed because it is too large Load Diff

View File

@@ -1,72 +0,0 @@
abort
abs
abstract
accept
access
aliased
all
and
array
at
begin
body
case
constant
declare
delay
delta
digits
do
else
elsif
end
entry
exception
exit
for
function
generic
goto
if
in
interface
is
limited
loop
mod
new
not
null
of
or
others
out
overriding
package
pragma
private
procedure
protected
raise
range
record
rem
renames
requeue
return
reverse
select
separate
subtype
synchronized
tagged
task
terminate
then
type
until
use
when
while
with
xor

View File

@@ -1,99 +0,0 @@
alignas
alignof
and
and_eq
asm
auto
bitand
bitor
bool
break
case
catch
char
char16_t
char32_t
class
compl
concept
const
const_cast
constexpr
continue
decltype
default
define
defined
delete
do
double
dynamic_cast
elif
else
endif
enum
error
explicit
export
extern
false
final
float
for
friend
goto
if
ifdef
ifndef
include
inline
int
line
long
mutable
namespace
new
noexcept
not
not_eq
nullptr
operator
or
or_eq
override
pragma
_Pragma
private
protected
public
register
reinterpret_cast
requires
return
short
signed
sizeof
static
static_assert
static_cast
struct
switch
template
this
thread_local
throw
true
try
typedef
typeid
typename
union
unsigned
using
virtual
void
volatile
wchar_t
while
xor
xor_eq

View File

@@ -1,55 +0,0 @@
auto
_Alignas
_Alignof
_Atomic
_Bool
break
case
char
_Complex
const
continue
default
define
defined
do
double
elif
else
endif
enum
error
extern
float
for
goto
_Generic
if
ifdef
ifndef
_Imaginary
include
inline
int
line
long
_Noreturn
pragma
register
restrict
return
short
signed
sizeof
static
struct
switch
_Static_assert
typedef
_Thread_local
undef
union
unsigned
void
volatile
while

View File

@@ -1,231 +0,0 @@
# OCaml 3.12.1
# Keywords
and
as
assert
begin
class
constraint
do
done
downto
else
end
exception
external
false
for
fun
function
functor
if
in
include
inherit
initializer
lazy
let
match
method
module
mutable
new
object
of
open
or
private
rec
sig
struct
then
to
true
try
type
val
virtual
when
while
with
# Pervasives
!
!=
&
&&
*
**
*.
+
+.
-
-.
/
/.
:=
<
<=
<>
=
==
>
>=
@
FP_infinite
FP_nan
FP_normal
FP_subnormal
FP_zero
LargeFile
Open_append
Open_binary
Open_creat
Open_nonblock
Open_rdonly
Open_text
Open_trunc
Open_wronly
Oupen_excl
^
^^
abs
abs_float
acos
asin
asr
at_exit
atan
atan2
bool_of_string
ceil
char_of_int
classify_float
close_in
close_in_noerr
close_out
close_out_noerr
compare
cos
cosh
decr
do_at_exit
epsilon_float
exit
exp
expm1
failwith
float
float_of_int
float_of_string
floor
flush
flush_all
format
format4
format_of_string
fpclass
frexp
fst
ignore
in_channel
in_channel_length
incr
infinity
input
input_binary_int
input_byte
input_char
input_line
input_value
int_of_char
int_of_float
int_of_string
invalid_arg
land
ldexp
lnot
log
log10
log1p
lor
lsl
lsr
lxor
max
max_float
max_int
min
min_float
min_int
mod
mod_float
modf
nan
neg_infinity
not
open_flag
open_in
open_in_bin
open_in_gen
open_out
open_out_bin
open_out_gen
or
out_channel
out_channel_length
output
output_binary_int
output_byte
output_char
output_string
output_value
pos_in
pos_out
pred
prerr_char
prerr_endline
prerr_float
prerr_int
prerr_newline
prerr_string
print_char
print_endline
print_float
print_int
print_newline
print_string
raise
read_float
read_int
read_line
really_input
ref
seek_in
seek_out
set_binary_mode_in
set_binary_mode_out
sin
sinh
snd
sqrt
stderr
stdin
stdout
string_of_bool
string_of_float
string_of_format
string_of_int
succ
tan
tanh
truncate
unsafe_really_input
valid_float_lexem
||
~
~+
~+.
~-
~-.

View File

@@ -1,580 +0,0 @@
*agent*
*allow-unresolved-vars*
*assert*
*clojure-version*
*command-line-args*
*compile-files*
*compile-path*
*compiler-options*
*data-readers*
*default-data-reader-fn*
*err*
*file*
*flush-on-newline*
*fn-loader*
*in*
*math-context*
*ns*
*out*
*print-dup*
*print-length*
*print-level*
*print-meta*
*print-readably*
*read-eval*
*source-path*
*unchecked-math*
*use-context-classloader*
*verbose-defrecords*
*warn-on-reflection*
->ArrayChunk
->Vec
->VecNode
->VecSeq
-cache-protocol-fn
-reset-methods
accessor
aclone
add-classpath
add-watch
agent
agent-error
agent-errors
aget
alength
alias
all-ns
alter
alter-meta!
alter-var-root
amap
ancestors
and
apply
areduce
array-map
as->
aset
aset-boolean
aset-byte
aset-char
aset-double
aset-float
aset-int
aset-long
aset-short
assert
assoc
assoc!
assoc-in
associative?
atom
await
await-for
await1
bases
bean
bigdec
bigint
biginteger
binding
bit-and
bit-and-not
bit-clear
bit-flip
bit-not
bit-or
bit-set
bit-shift-left
bit-shift-right
bit-test
bit-xor
boolean
boolean-array
booleans
bound-fn
bound-fn*
bound?
butlast
byte
byte-array
bytes
case
cast
char
char-array
char-escape-string
char-name-string
char?
chars
chunk
chunk-append
chunk-buffer
chunk-cons
chunk-first
chunk-next
chunk-rest
chunked-seq?
class
class?
clear-agent-errors
clojure-version
coll?
comment
commute
comp
comparator
compare
compare-and-set!
compile
complement
concat
cond
cond->
cond->>
condp
conj
conj!
cons
constantly
construct-proxy
contains?
count
counted?
create-ns
create-struct
cycle
dec
dec'
decimal?
declare
default-data-readers
definline
definterface
defmacro
defmethod
defmulti
defn
defn-
defonce
defprotocol
defrecord
defstruct
deftype
delay
delay?
deliver
denominator
deref
derive
descendants
destructure
disj
disj!
dissoc
dissoc!
distinct
distinct?
doall
doc
dorun
doseq
dosync
dotimes
doto
double
double-array
doubles
drop
drop-last
drop-while
dtype
empty
empty?
ensure
enumeration-seq
error-handler
error-mode
eval
even?
every-pred
every?
ex-data
ex-info
extend
extend-class
extend-protocol
extend-type
extenders
extends?
false?
ffirst
file-seq
filter
filterv
find
find-doc
find-keyword
find-ns
find-protocol-impl
find-protocol-method
find-var
first
flatten
float
float-array
float?
floats
flush
fn
fn?
fnext
fnil
for
force
format
frequencies
future
future-call
future-cancel
future-cancelled?
future-done?
future?
gen-class
gen-interface
gensym
get
get-in
get-method
get-proxy-class
get-thread-bindings
get-validator
group-by
hash
hash-combine
hash-map
hash-set
identical?
identity
if-let
if-not
ifn?
import
in-ns
inc
inc'
init-proxy
instance?
int
int-array
integer?
interleave
intern
interpose
into
into-array
ints
io!
isa?
iterate
iterator-seq
juxt
keep
keep-indexed
key
keys
keyword
keyword?
last
lazy-cat
lazy-seq
let
letfn
line-seq
list
list*
list?
load
load-file
load-reader
load-string
loaded-libs
locking
long
long-array
longs
loop
macroexpand
macroexpand-1
make-array
make-hierarchy
map
map-indexed
map?
mapcat
mapv
max
max-key
memfn
memoize
merge
merge-with
meta
method-sig
methods
min
min-key
mod
munge
name
namespace
namespace-munge
neg?
newline
next
nfirst
nil?
nnext
not
not-any?
not-empty
not-every?
not=
ns
ns-aliases
ns-imports
ns-interns
ns-map
ns-name
ns-publics
ns-refers
ns-resolve
ns-unalias
ns-unmap
nth
nthnext
nthrest
num
number?
numerator
object-array
odd?
or
parents
partial
partition
partition-all
partition-by
pcalls
peek
persistent!
pmap
pop
pop!
pop-thread-bindings
pos?
pr
pr-str
prefer-method
prefers
primitives-classnames
print
print-ctor
print-dup
print-method
print-namespace-doc
print-simple
print-str
printf
println
println-str
prn
prn-str
promise
proxy
proxy-call-with-super
proxy-mappings
proxy-name
proxy-super
push-thread-bindings
pvalues
quot
rand
rand-int
rand-nth
range
ratio?
rational?
rationalize
re-find
re-groups
re-matcher
re-matches
re-pattern
re-seq
read
read-line
read-string
realized?
reduce
reduce-kv
reduced
reduced?
reductions
ref
ref-history-count
ref-max-history
ref-min-history
ref-set
refer
refer-clojure
reify
release-pending-sends
rem
remove
remove-all-methods
remove-method
remove-ns
remove-watch
repeat
repeatedly
replace
replicate
require
reset!
reset-meta!
resolve
rest
restart-agent
resultset-seq
reverse
reversible?
rseq
rsubseq
satisfies?
second
select-keys
send
send-off
send-via
seq
seq?
seque
sequence
sequential?
set
set-agent-send-executor!
set-agent-send-off-executor!
set-error-handler!
set-error-mode!
set-validator!
set?
short
short-array
shorts
shuffle
shutdown-agents
slurp
some
some->
some->>
some-fn
sort
sort-by
sorted-map
sorted-map-by
sorted-set
sorted-set-by
sorted?
special-form-anchor
special-symbol?
spit
split-at
split-with
str
stream?
string?
struct
struct-map
subs
subseq
subvec
supers
swap!
symbol
symbol?
sync
syntax-symbol-anchor
take
take-last
take-nth
take-while
test
the-ns
thread-bound?
time
to-array
to-array-2d
trampoline
transient
tree-seq
true?
type
unchecked-add
unchecked-add-int
unchecked-byte
unchecked-char
unchecked-dec
unchecked-dec-int
unchecked-divide
unchecked-divide-int
unchecked-double
unchecked-float
unchecked-inc
unchecked-inc-int
unchecked-int
unchecked-long
unchecked-multiply
unchecked-multiply-int
unchecked-negate
unchecked-negate-int
unchecked-remainder
unchecked-remainder-int
unchecked-short
unchecked-subtract
unchecked-subtract-int
underive
unquote
unquote-splicing
update-in
update-proxy
use
val
vals
var-get
var-set
var?
vary-meta
vec
vector
vector-of
vector?
when
when-first
when-let
when-not
while
with-bindings
with-bindings*
with-in-str
with-loading-context
with-local-vars
with-meta
with-open
with-out-str
with-precision
with-redefs
with-redefs-fn
xml-seq
zero?
zipmap

View File

@@ -1,475 +0,0 @@
*agent*
*clojure-version*
*command-line-args*
*compile-files*
*compile-path*
*err*
*file*
*flush-on-newline*
*in*
*ns*
*out*
*print-dup*
*print-length*
*print-level*
*print-meta*
*print-readably*
*read-eval*
*warn-on-reflection*
accessor
aclone
add-classpath
add-watch
agent
agent-error
agent-errors
aget
alength
alias
all-ns
alter
alter-meta!
alter-var-root
amap
ancestors
and
apply
areduce
array-map
aset
aset-boolean
aset-byte
aset-char
aset-double
aset-float
aset-int
aset-long
aset-short
assert
assoc
assoc!
assoc-in
associative?
atom
await
await-for
bases
bean
bigdec
bigint
binding
bit-and
bit-and-not
bit-clear
bit-flip
bit-not
bit-or
bit-set
bit-shift-left
bit-shift-right
bit-test
bit-xor
boolean
boolean-array
booleans
bound-fn
bound-fn*
butlast
byte
byte-array
bytes
case
cast
char
char-array
char-escape-string
char-name-string
char?
chars
class
class?
clear-agent-errors
clojure-version
coll?
comment
commute
comp
comparator
compare
compare-and-set!
compile
complement
concat
cond
condp
conj
conj!
cons
constantly
construct-proxy
contains?
count
counted?
create-ns
create-struct
cycle
dec
decimal?
declare
definline
defmacro
defmethod
defmulti
defn
defn-
defonce
defprotocol
defstruct
deftype
delay
delay?
deliver
deref
derive
descendants
disj
disj!
dissoc
dissoc!
distinct
distinct?
doall
doc
dorun
doseq
dosync
dotimes
doto
double
double-array
doubles
drop
drop-last
drop-while
dtype
empty
empty?
ensure
enumeration-seq
error-handler
error-mode
eval
even?
every?
extend
extend-class
extend-protocol
extend-type
extenders
extends?
false?
ffirst
file-seq
filter
find
find-doc
find-ns
find-var
first
float
float-array
float?
floats
flush
fn
fn?
fnext
for
force
format
future
future-call
future-cancel
future-cancelled?
future-done?
future?
gen-class
gen-interface
gensym
get
get-in
get-method
get-proxy-class
get-thread-bindings
get-validator
hash
hash-map
hash-set
identical?
identity
if-let
if-not
ifn?
import
in-ns
inc
init-proxy
instance?
int
int-array
integer?
interleave
intern
interpose
into
into-array
ints
io!
isa?
iterate
iterator-seq
juxt
key
keys
keyword
keyword?
last
lazy-cat
lazy-seq
let
letfn
line-seq
list
list*
list?
load
load-file
load-reader
load-string
loaded-libs
locking
long
long-array
longs
loop
macroexpand
macroexpand-1
make-array
make-hierarchy
map
map?
mapcat
max
max-key
memfn
memoize
merge
merge-with
meta
methods
min
min-key
mod
name
namespace
neg?
newline
next
nfirst
nil?
nnext
not
not-any?
not-empty
not-every?
not=
ns
ns-aliases
ns-imports
ns-interns
ns-map
ns-name
ns-publics
ns-refers
ns-resolve
ns-unalias
ns-unmap
nth
nthnext
num
number?
object-array
odd?
or
parents
partial
partition
pcalls
peek
persistent!
pmap
pop
pop!
pop-thread-bindings
pos?
pr
pr-str
prefer-method
prefers
print
print-namespace-doc
print-str
printf
println
println-str
prn
prn-str
promise
proxy
proxy-mappings
proxy-super
push-thread-bindings
pvalues
quot
rand
rand-int
range
ratio?
rationalize
re-find
re-groups
re-matcher
re-matches
re-pattern
re-seq
read
read-line
read-string
reduce
ref
ref-history-count
ref-max-history
ref-min-history
ref-set
refer
refer-clojure
reify
release-pending-sends
rem
remove
remove-method
remove-ns
remove-watch
repeat
repeatedly
replace
replicate
require
reset!
reset-meta!
resolve
rest
restart-agent
resultset-seq
reverse
reversible?
rseq
rsubseq
satisfies?
second
select-keys
send
send-off
seq
seq?
seque
sequence
sequential?
set
set-error-handler!
set-error-mode!
set-validator!
set?
short
short-array
shorts
shutdown-agents
slurp
some
sort
sort-by
sorted-map
sorted-map-by
sorted-set
sorted-set-by
sorted?
special-form-anchor
special-symbol?
split-at
split-with
str
stream?
string?
struct
struct-map
subs
subseq
subvec
supers
swap!
symbol
symbol?
sync
syntax-symbol-anchor
take
take-last
take-nth
take-while
test
the-ns
time
to-array
to-array-2d
trampoline
transient
tree-seq
true?
type
unchecked-add
unchecked-dec
unchecked-divide
unchecked-inc
unchecked-multiply
unchecked-negate
unchecked-remainder
unchecked-subtract
underive
update-in
update-proxy
use
val
vals
var-get
var-set
var?
vary-meta
vec
vector
vector-of
vector?
when
when-first
when-let
when-not
while
with-bindings
with-bindings*
with-in-str
with-local-vars
with-meta
with-open
with-out-str
with-precision
xml-seq
zero?
zipmap

View File

@@ -1,278 +0,0 @@
# Generated by the following form.
# (loop for regexp in (append
# coq-solve-tactics
# coq-keywords
# coq-reserved
# coq-tactics
# coq-tacticals
# (list "Set" "Type" "Prop"))
# append (split-string regexp (regexp-quote "\\s-+")) into words
# finally (loop initially (goto-char (point-max))
# for word in (delete-dups (sort words 'string<))
# do (insert word) (newline)))
Abort
About
Abstract
Add
Admit
Admitted
All
Arguments
AutoInline
Axiom
Bind
Canonical
Cd
Chapter
Check
Close
CoFixpoint
CoInductive
Coercion
Coercions
Comments
Conjecture
Constant
Constructors
Corollary
Declare
Defined
Definition
Delimit
Dependent
Depth
Derive
End
Eval
Export
Extern
Extract
Extraction
Fact
False
Field
File
Fixpoint
Focus
Function
Functional
Goal
Hint
Hypotheses
Hypothesis
Hyps
Identity
If
Immediate
Implicit
Import
Inductive
Infix
Inline
Inlined
Inspect
Inversion
Language
Lemma
Let
Library
Limit
LoadPath
Local
Locate
Ltac
ML
Module
Morphism
Next Obligation
NoInline
Notation
Notations
Obligation
Obligations
Off
On
Opaque
Open
Optimize
Parameter
Parameters
Path
Print
Printing
Program
Proof
Prop
Pwd
Qed
Rec
Record
Recursive
Remark
Remove
Require
Reserved
Reset
Resolve
Rewrite
Ring
Save
Scheme
Scope
Search
SearchAbout
SearchPattern
SearchRewrite
Section
Semi
Set
Setoid
Show
Solve
Sort
Strict
Structure
Synth
Tactic
Test
Theorem
Time
Transparent
True
Type
Undo
Unfocus
Unfold
Unset
Variable
Variables
Width
Wildcard
abstract
absurd
after
apply
as
assert
assumption
at
auto
autorewrite
beta
by
case
cbv
change
clear
clearbody
cofix
coinduction
compare
compute
congruence
constructor
contradiction
cut
cutrewrite
decide
decompose
delta
dependent
dest
destruct
discrR
discriminate
do
double
eapply
eauto
econstructor
eexists
eleft
elim
else
end
equality
esplit
exact
exists
fail
field
first
firstorder
fix
fold
forall
fourier
fun
functional
generalize
hnf
idtac
if
in
induction
info
injection
instantiate
into
intro
intros
intuition
inversion
inversion_clear
iota
lapply
lazy
left
let
linear
load
match
move
omega
pattern
pose
progress
prolog
quote
record
red
refine
reflexivity
rename
repeat
replace
return
rewrite
right
ring
set
setoid
setoid_replace
setoid_rewrite
simpl
simple
simplify_eq
solve
specialize
split
split_Rabs
split_Rmult
stepl
stepr
struct
subst
sum
symmetry
tauto
then
transitivity
trivial
try
unfold
until
using
with
zeta

View File

@@ -1,874 +0,0 @@
!important
@font-face
@font-feature-values
@keyframes
ActiveBorder
ActiveCaption
Alpha
AppWorkspace
Background
Barn
BasicImage
Blinds
Blur
ButtonFace
ButtonHighlight
ButtonShadow
ButtonText
CaptionText
CheckerBoard
Chroma
Compositor
CradientWipe
DXImageTransform
DropShadow
Emboss
Engrave
Fade
FlipH
FlipV
Glow
Gray
GrayText
Highlight
HighlightText
Hz
ICMFilter
InactiveBorder
InactiveCaption
InactiveCaptionText
InfoBackground
InfoText
Inset
Invert
Iris
Light
MaskFilter
Matrix
Menu
MenuText
Microsoft
MotionBlur
Pixelate
RadialWipe
RandomBars
RandomDissolve
RevealTrans
Scrollbar
Shadow
Slide
Spiral
Stretch
Strips
ThreeDDarkShadow
ThreeDFace
ThreeDHighlight
ThreeDLightShadow
ThreeDShadow
Wave
Wheel
Window
WindowFrame
WindowText
Xray
Zigzag
_azimuth
_background
_background-position-x
_background-position-y
_border
_bottom
_caption
_clear
_clip
_color
_content
_counter
_cue
_cursor
_direction
_display
_elevation
_empty
_filter
_filter:progid:DXImageTransform.Microsoft
_float
_font
_height
_ime
_ime-mode
_layout
_layout-flow
_layout-grid
_layout-grid-char
_layout-grid-line
_layout-grid-mode
_layout-grid-type
_left
_letter
_line
_line-break
_list
_margin
_orphans
_outline
_overflow
_overflow-x
_overflow-y
_padding
_page
_pause
_pitch
_play
_position
_quotes
_richness
_right
_ruby
_ruby-align
_ruby-overhang
_ruby-position
_scrollbar
_scrollbar-3dlight-color
_scrollbar-arrow-color
_scrollbar-base-color
_scrollbar-darkshadow-color
_scrollbar-face-color
_scrollbar-highlight-color
_scrollbar-track-color
_speak
_speech
_stress
_table
_text
_text-align-last
_text-autospace
_text-justify
_text-kashida-space
_text-overflow
_text-underline-position
_top
_unicode
_vertical
_visibility
_voice
_volume
_white
_widows
_width
_word
_word-break
_word-wrap
_writing
_writing-mode
_z
_zoom
above
active
adjust
after
aliceblue
align
align-content
align-items
align-self
always
animation
animation-delay
animation-direction
animation-duration
animation-fill-mode
animation-iteration-count
animation-name
animation-play-state
animation-timing-function
antiquewhite
aqua
aquamarine
armenian
arrow
attachment
auto
autospace
avoid
azimuth
azure
backface-visibility
background
background-attachment
background-clip
background-color
background-image
background-origin
background-position
background-repeat
background-size
bar
base
baseline
before
behind
beige
below
bidi
bidi-override
bisque
black
blanchedalmond
blink
block
blue
blueviolet
bold
bolder
border
border-bottom
border-bottom-color
border-bottom-left-radius
border-bottom-right-radius
border-bottom-style
border-bottom-width
border-collapse
border-color
border-image
border-image-outset
border-image-repeat
border-image-slice
border-image-source
border-image-width
border-left
border-left-color
border-left-style
border-left-width
border-radius
border-right
border-right-color
border-right-style
border-right-width
border-spacing
border-style
border-top
border-top-color
border-top-left-radius
border-top-right-radius
border-top-style
border-top-width
border-width
both
bottom
box
box-decoration-break
box-shadow
box-sizing
break
break-after
break-before
break-inside
brown
burlwood
cadetblue
capitalize
caps
caption
caption-side
cell
cells
center
center-left
center-right
char
chartreuse
chocolate
circle
cjk
cjk-ideographic
clear
clip
close
close-quote
cm
code
collapse
color
column
column-count
column-fill
column-gap
column-rule
column-rule-color
column-rule-style
column-rule-width
column-span
column-width
columns
compact
condensed
content
continuous
coral
cornflowerblue
cornsilk
counter
counter-increment
counter-reset
crimson
crop
cross
crosshair
cue
cue-after
cue-before
cursive
cursor
cyan
darkblue
darkcyan
darkgoldenrod
darkgray
darkgreen
darkkhaki
darkmagenta
darkolivegreen
darkorange
darkorchid
darkred
darksalmon
darkseagreen
darkshadow
darkslateblue
darkslategray
darkturquoise
darkviolet
dashed
decimal
decimal-leading-zero
decoration
deeppink
deepskyblue
default
deg
digits
dimgray
direction
disc
display
dodgerblue
dotted
double
during
e
e-resize
elevation
em
embed
empty
empty-cells
ex
expanded
extra
extra-condensed
extra-expanded
face
family
fantasy
far
far-left
far-right
fast
faster
filter
firebrick
first
first-child
first-letter
first-line
fixed
flex
flex-basis
flex-direction
flex-flow
flex-grow
flex-shrink
flex-wrap
float
floralwhite
flow
focus
font
font-family
font-feature-setting
font-kerning
font-language-override
font-size
font-size-adjust
font-stretch
font-style
font-synthesis
font-variant
font-variant-alternates
font-variant-caps
font-variant-east-asian
font-variant-ligatures
font-variant-numeric
font-variant-position
font-weight
footer
forestgreen
fuchsia
gainsboro
georgian
ghostwhite
gold
goldenrod
gray
greek
green
greenyellow
grid
groove
group
hanging-punctuation
header
hebrew
height
help
hidden
hide
high
higher
hiragana
hiragana-iroha
honeydew
hotpink
hover
hyphens
icon
ideographic
image
image-orientation
image-rendering
image-resolution
ime-mode
in
increment
indent
index
indianred
indigo
inherit
inline
inline-block
inline-table
inset
inside
iroha
italic
item
ivory
justify
justify-content
kHz
kashida
katakana
katakana-iroha
khaki
landscape
lang()
large
larger
last
latin
lavender
lavenderblush
lawngreen
layout
leading
left
left-side
leftwards
lenonchiffon
letter
letter-spacing
level
lightblue
lightcoral
lightcyan
lighter
lightgoldenrodyellow
lightgray
lightgreen
lightgrey
lightpink
lightsalmon
lightseagreen
lightskyblue
lightslategray
lightsteelblue
lightyellow
lime
limegreen
line
line-break
line-height
line-through
linen
link
list
list-item
list-style
list-style-image
list-style-position
list-style-type
loud
low
lower
lower-alpha
lower-greek
lower-latin
lower-roman
lowercase
ltr
magenta
margin
margin-bottom
margin-left
margin-right
margin-top
mark
mark-after
mark-before
marker
marker-offset
marks
maroon
marquee-direction
marquee-play-count
marquee-speed
marquee-style
mask
mask-type
max
max-height
max-width
medium
mediumaquamarine
mediumblue
mediumorchid
mediumpurple
mediumseagreen
mediumslateblue
mediumspringgreen
mediumturquoise
mediumvioletred
menu
message
message-box
middle
midnightblue
min
min-height
min-width
mintcream
mistyrose
mix
mm
moccasin
mode
monospace
move
ms
n
n-resize
naby
narrower
nav-down
nav-index
nav-left
nav-right
nav-up
navajowhite
ne
ne-resize
no
no-close-quote
no-open-quote
no-repeat
none
normal
nowrap
number
numeral
nw
nw-resize
object-fit
object-position
oblique
offset
oldlace
olive
olivedrab
once
opacity
open
open-quote
orange
orangered
orchid
order
orphans
out
outline
outline-color
outline-offset
outline-style
outline-width
outset
outside
overflow
overflow-wrap
overflow-x
overflow-y
overhang
overline
override
padding
padding-bottom
padding-left
padding-right
padding-top
page
page-break-after
page-break-before
page-break-inside
palegoldenrod
palegreen
paleturquoise
palevioletred
papayawhip
pause
pause-after
pause-before
pc
peachpuff
perspective
perspective-origin
peru
phonemes
pink
pitch
pitch-range
play
play-during
plum
pointer
portrait
position
powderblue
pre
pre-line
pre-wrap
progid
progress
pt
punctuation
purple
px
quote
quotes
rad
range
rate
red
relative
repeat
repeat-x
repeat-y
reset
resize
rest
rest-after
rest-before
richness
ridge
right
right-side
rightwards
roman
rosybrown
row
royalblue
rtl
run
run-in
s
s-resize
saddlebrown
salmon
sandybrown
sans-serif
scroll
se
se-resize
seagreen
seashell
semi
semi-condensed
semi-expanded
separate
serif
shadow
show
side
sienna
silent
silever
silver
size
skyblue
slateblue
slategray
slow
slower
small
small-caps
small-caption
smaller
snow
soft
solid
space
spacing
speak
speak-header
speak-numeral
speak-punctuation
specific
specific-voice
speech
speech-rate
spell
spell-out
springgreen
square
static
status
status-bar
steelblue
stress
stretch
style
sub
super
sw
sw-resize
tab-size
table
table-caption
table-cell
table-column
table-column-group
table-footer-group
table-header-group
table-layout
table-row
table-row-group
tan
teal
text
text-align
text-align-last
text-bottom
text-combine-horizontal
text-decoration
text-decoration-color
text-decoration-line
text-decoration-style
text-indent
text-justify
text-orientation
text-overflow
text-shadow
text-top
text-transform
text-underline-position
thick
thin
thistle
through
tomato
top
track
transform
transform-origin
transform-style
transition
transition-delay
transition-duration
transition-property
transition-timing-function
transparent
turquoise
type
ultra
ultra-condensed
ultra-expanded
underline
unicode
unicode-bidi
upper
upper-alpha
upper-latin
upper-roman
uppercase
variant
vertical
vertical-align
violet
visibility
visible
visited
voice
voice-balance
voice-duration
voice-family
voice-pitch
voice-pitch-range
voice-rate
voice-stress
voice-volume
volume
w
w-resize
wait
weight
wheat
white
white-space
whitesmoke
wider
widows
width
word
word-break
word-spacing
word-wrap
wrap
writing-mode
x
x-fast
x-high
x-large
x-loud
x-low
x-slow
x-small
x-soft
xx
xx-large
xx-small
y
yellow
yellowgreen
z
z-index
zero

View File

@@ -1,216 +0,0 @@
after
begin
catch
case
cond
end
fun
if
let
of
query
receive
try
when
and
andalso
band
bnot
bor
bsl
bsr
bxor
div
not
or
orelse
rem
xor
is_atom
is_binary
is_bitstring
is_boolean
is_float
is_function
is_integer
is_list
is_number
is_pid
is_port
is_record
is_reference
is_tuple
atom
binary
bitstring
boolean
function
integer
list
number
pid
port
record
reference
tuple
abs
adler32
adler32_combine
alive
apply
atom_to_binary
atom_to_list
binary_to_atom
binary_to_existing_atom
binary_to_list
binary_to_term
bit_size
bitstring_to_list
byte_size
check_process_code
contact_binary
crc32
crc32_combine
date
decode_packet
delete_module
disconnect_node
element
erase
exit
float
float_to_list
garbage_collect
get
get_keys
group_leader
halt
hd
integer_to_list
internal_bif
iolist_size
iolist_to_binary
is_alive
is_atom
is_binary
is_bitstring
is_boolean
is_float
is_function
is_integer
is_list
is_number
is_pid
is_port
is_process_alive
is_record
is_reference
is_tuple
length
link
list_to_atom
list_to_binary
list_to_bitstring
list_to_existing_atom
list_to_float
list_to_integer
list_to_pid
list_to_tuple
load_module
make_ref
module_loaded
monitor_node
node
node_link
node_unlink
nodes
notalive
now
open_port
pid_to_list
port_close
port_command
port_connect
port_control
pre_loaded
process_flag
process_info
processes
purge_module
put
register
registered
round
self
setelement
size
spawn
spawn_link
spawn_monitor
spawn_opt
split_binary
statistics
term_to_binary
time
throw
tl
trunc
tuple_size
tuple_to_list
unlink
unregister
whereis
append_element
bump_reductions
cancel_timer
demonitor
display
fun_info
fun_to_list
function_exported
get_cookie
get_stacktrace
hash
integer_to_list
is_builtin
list_to_integer
loaded
localtime
localtime_to_universaltime
make_tuple
max
md5
md5_final
md5_init
md5_update
memory
min
monitor
monitor_node
phash
phash2
port_call
port_info
port_to_list
ports
process_display
read_timer
ref_to_list
resume_process
send
send_after
send_nosuspend
set_cookie
start_timer
suspend_process
system_flag
system_info
system_monitor
system_profile
trace
trace_delivered
trace_info
trace_pattern
universaltime
universaltime_to_localtime
yield

View File

@@ -1,37 +0,0 @@
abstract
break
case
catch
const
continue
do
else
elseif
end
eval
export
false
finally
for
function
global
if
ifelse
immutable
import
importall
in
let
macro
module
otherwise
quote
return
switch
throw
true
try
type
typealias
using
while

View File

@@ -1,25 +0,0 @@
break
case
chan
const
continue
default
defer
else
fallthrough
for
func
go
goto
if
import
interface
map
package
range
return
select
struct
switch
type
var

View File

@@ -1,679 +0,0 @@
Arrows
BangPatterns
Bool
Bounded
CPP
Char
Complex
ConstrainedClassMethods
Control.Applicative
Control.Arrow
Control.Category
Control.Concurrent
Control.Concurrent.MVar
Control.Concurrent.QSem
Control.Concurrent.QSemN
Control.Concurrent.STM
Control.Concurrent.STM.TArray
Control.Concurrent.STM.TChan
Control.Concurrent.STM.TMVar
Control.Concurrent.STM.TVar
Control.Concurrent.SampleVar
Control.Exception
Control.Exception.Base
Control.Monad
Control.Monad.Cont
Control.Monad.Cont.Class
Control.Monad.Error
Control.Monad.Error.Class
Control.Monad.Fix
Control.Monad.Identity
Control.Monad.Instances
Control.Monad.List
Control.Monad.RWS
Control.Monad.RWS.Class
Control.Monad.RWS.Lazy
Control.Monad.RWS.Strict
Control.Monad.Reader
Control.Monad.Reader.Class
Control.Monad.ST
Control.Monad.ST.Lazy
Control.Monad.ST.Strict
Control.Monad.STM
Control.Monad.State
Control.Monad.State.Class
Control.Monad.State.Lazy
Control.Monad.State.Strict
Control.Monad.Trans
Control.Monad.Writer
Control.Monad.Writer.Class
Control.Monad.Writer.Lazy
Control.Monad.Writer.Strict
Control.OldException
Control.Parallel
Control.Parallel.Strategies
DEPRECATED
Data.Array
Data.Array.Diff
Data.Array.IArray
Data.Array.IO
Data.Array.IO.Internals
Data.Array.MArray
Data.Array.Paralell
Data.Array.Paralell.Arr
Data.Array.Paralell.Base
Data.Array.Paralell.Int
Data.Array.Paralell.Lifted
Data.Array.Paralell.PArray
Data.Array.Paralell.Prelude
Data.Array.Paralell.Prelude.Double
Data.Array.Paralell.Stream
Data.Array.Paralell.Unlifted
Data.Array.Paralell.Unlifted.Distributed
Data.Array.Paralell.Unlifted.Paralell
Data.Array.Paralell.Unlifted.Sqeuential
Data.Array.Paralell.Word8
Data.Array.ST
Data.Array.Storable
Data.Array.Unboxed
Data.Bits
Data.Bool
Data.ByteString
Data.ByteString.Char8
Data.ByteString.Fusion
Data.ByteString.Internal
Data.ByteString.Lazy
Data.ByteString.Lazy.Char8
Data.ByteString.Lazy.Fusion
Data.ByteString.Lazy.Internal
Data.ByteString.Unsafe
Data.Char
Data.Complex
Data.Data
Data.Dynamic
Data.Either
Data.Eq
Data.Fixed
Data.Foldable
Data.Function
Data.Generics
Data.Generics.Aliases
Data.Generics.Basics
Data.Generics.Instances
Data.Generics.Schemes
Data.Generics.Text
Data.Generics.Twins
Data.Graph
Data.HashTable
Data.IORef
Data.Int
Data.IntMap
Data.IntSet
Data.Ix
Data.List
Data.Map
Data.Maybe
Data.Monoid
Data.Ord
Data.Ratio
Data.STRef
Data.STRef.Lazy
Data.STRef.Strict
Data.Sequence
Data.Set
Data.String
Data.Time
Data.Time.Calendar
Data.Time.Calendar.Easter
Data.Time.Calendar.Julian
Data.Time.Calendar.MonthDay
Data.Time.Calendar.OrdinalDate
Data.Time.Calendar.WeekDate
Data.Time.Clock
Data.Time.Clock.POSIX
Data.Time.Clock.TAI
Data.Time.Format
Data.Time.LocalTime
Data.Traversable
Data.Tree
Data.Tuple
Data.Typeable
Data.Unique
Data.Version
Data.Word
Debug.Trace
DeriveDataTypeable
DisambiguateRecordFields
Distribution.Compat.ReadP
Distribution.Compiler
Distribution.InstalledPackageInfo
Distribution.License
Distribution.Make
Distribution.ModuleName
Distribution.Package
Distribution.PackageDescription
Distribution.PackageDescription.Check
Distribution.PackageDescription.Configuration
Distribution.PackageDescription.Parse
Distribution.ParseUtils
Distribution.ReadE
Distribution.Simple
Distribution.Simple.Build
Distribution.Simple.Build.Macros
Distribution.Simple.Build.PathsModule
Distribution.Simple.BuildPaths
Distribution.Simple.Command
Distribution.Simple.Compiler
Distribution.Simple.Configure
Distribution.Simple.GHC
Distribution.Simple.Haddock
Distribution.Simple.Hugs
Distribution.Simple.Install
Distribution.Simple.InstallDirs
Distribution.Simple.JHC
Distribution.Simple.LocalBuildInfo
Distribution.Simple.NHC
Distribution.Simple.PackageIndex
Distribution.Simple.PreProcess
Distribution.Simple.PreProcess.Unlit
Distribution.Simple.Program
Distribution.Simple.Register
Distribution.Simple.Setup
Distribution.Simple.SrcDist
Distribution.Simple.UserHooks
Distribution.Simple.Utils
Distribution.System
Distribution.Text
Distribution.Verbosity
Distribution.Version
Double
EQ
Either
EmptyDataDecls
Enum
Eq
ExistentialQuantification
ExtendedDefaultRules
False
FilePath
FlexibleContexts
FlexibleInstances
Float
Floating
Foreign
Foreign.C
Foreign.C.Error
Foreign.C.String
Foreign.C.Types
Foreign.Concurrent
Foreign.ForeignPtr
Foreign.Marshal
Foreign.Marshal.Alloc
Foreign.Marshal.Array
Foreign.Marshal.Error
Foreign.Marshal.Pool
Foreign.Marshal.Utils
Foreign.Ptr
Foreign.StablePtr
Foreign.Storable
ForeignFunctionInterface
Fractional
FunctionnalDependencies
Functor
GADTs
GHC.Arr
GHC.Bool
GHC.Conc
GHC.ConsoleHandler
GHC.Desugar
GHC.Environment
GHC.Err
GHC.Exts
GHC.Generics
GHC.Handle
GHC.Ordering
GHC.PArr
GHC.Prim
GHC.PrimopWrappers
GHC.Tuple
GHC.Types
GHC.Unicode
GHC.Unit
GT
GeneralizedNewtypeDeriving
Generics
INCLUDE
INLINE
IO
IOError
IOException
ImplicitParams
ImplicitPrelude
ImpredicativeTypes
IncoherentInstances
Int
Integer
Integral
Just
KindSignatures
LANGUAGE
LINE
LT
Language.Haskell.Extension
Language.Haskell.Lexer
Language.Haskell.ParseMonad
Language.Haskell.ParseUtils
Language.Haskell.Parser
Language.Haskell.Pretty
Language.Haskell.Syntax
Language.Haskell.TH
Language.Haskell.TH.Lib
Language.Haskell.TH.Ppr
Language.Haskell.TH.PprLib
Language.Haskell.TH.Quote
Language.Haskell.TH.Syntax
Left
LiberalTypeSynonyms
MagicHash
Maybe
Monad
MonoPatBinds
MonomorphismRestriction
MultiParamTypeClasses
NOINLINE
NamedFieldPuns
Network
Network.BSD
Network.Socket
Network.URI
NewQualifiedOperators
NoArrows
NoBangPatterns
NoCPP
NoConstrainedClassMethods
NoDeriveDataTypeable
NoDisambiguateRecordFields
NoEmptyDataDecls
NoExistentialQuantification
NoExtendedDefaultRules
NoFlexibleContexts
NoFlexibleInstances
NoForeignFunctionInterface
NoFunctionnalDependencies
NoGADTs
NoGeneralizedNewtypeDeriving
NoGenerics
NoImplicitParams
NoImplicitPrelude
NoImpredicativeTypes
NoIncoherentInstances
NoKindSignatures
NoLiberalTypeSynonyms
NoMagicHash
NoMonoPatBinds
NoMonomorphismRestriction
NoMultiParamTypeClasses
NoNamedFieldPuns
NoNewQualifiedOperators
NoOverlappingInstances
NoOverloadedStrings
NoPArr
NoPackageImports
NoParallelListComp
NoPatternGuards
NoPolymorphicComponents
NoQuasiQuotes
NoRank2Types
NoRankNTypes
NoRecordWildCards
NoRecursiveDo
NoRelaxedPolyRec
NoScopedTypeVariables
NoStandaloneDeriving
NoTemplateHaskell
NoTransformListComp
NoTypeFamilies
NoTypeOperators
NoTypeSynonymInstances
NoUnboxedTuples
NoUndecidableInstances
NoUnicodeSyntax
NoUnliftedFFITypes
NoViewPatterns
Nothing
Num
Numeric
OPTIONS_GHC
Ord
Ordering
OverlappingInstances
OverloadedStrings
PArr
PackageImports
ParallelListComp
PatternGuards
PolymorphicComponents
Prelude
QuasiQuotes
RULES
Rank2Types
RankNTypes
Ratio
Read
ReadS
Real
RealFloat
RealFrac
RecordWildCards
RecursiveDo
RelaxedPolyRec
Right
SOURCE
SPECIALIZE
ScopedTypeVariables
ShowS
StandaloneDeriving
String
System.CPUTime
System.Cmd
System.Console.Editline
System.Console.GetOpt
System.Console.Readline
System.Directory
System.Environment
System.Exit
System.FilePath
System.FilePath.Posix
System.FilePath.Windows
System.IO
System.IO.Error
System.IO.Unsafe
System.Info
System.Locale
System.Mem
System.Mem.StableName
System.Mem.Weak
System.Posix
System.Posix.Directory
System.Posix.DynamicLinker
System.Posix.DynamicLinker.Module
System.Posix.DynamicLinker.Prim
System.Posix.Env
System.Posix.Error
System.Posix.Files
System.Posix.IO
System.Posix.Process
System.Posix.Process.Internals
System.Posix.Resource
System.Posix.Semaphore
System.Posix.SharedMem
System.Posix.Signals
System.Posix.Signals.Exts
System.Posix.Temp
System.Posix.Terminal
System.Posix.Time
System.Posix.Types
System.Posix.Unistd
System.Posix.User
System.Process
System.Random
System.Time
System.Timeout
TemplateHaskell
Test.HUnit
Test.HUnit.Base
Test.HUnit.Lang
Test.HUnit.Terminal
Test.HUnit.Text
Test.QuickCheck
Test.QuickCheck.Batch
Test.QuickCheck.Poly
Test.QuickCheck.Utils
Text.Html
Text.Html.BlockTable
Text.ParserCombinators.Parsec
Text.ParserCombinators.Parsec.Char
Text.ParserCombinators.Parsec.Combinator
Text.ParserCombinators.Parsec.Error
Text.ParserCombinators.Parsec.Expr
Text.ParserCombinators.Parsec.Language
Text.ParserCombinators.Parsec.Perm
Text.ParserCombinators.Parsec.Pos
Text.ParserCombinators.Parsec.Prim
Text.ParserCombinators.Parsec.Token
Text.ParserCombinators.ReadP
Text.ParserCombinators.ReadPrec
Text.PrettyPrint
Text.PrettyPrint.HughesPJ
Text.Printf
Text.Read
Text.Read.Lex
Text.Regex.Base
Text.Regex.Base.Context
Text.Regex.Base.Impl
Text.Regex.Base.RegexLike
Text.Regex.Posix
Text.Regex.Posix.ByteString
Text.Regex.Posix.String
Text.Regex.Posix.Wrap
Text.Show
Text.Show.Functions
Text.XHtml
Text.XHtml.Debug
Text.XHtml.Frameset
Text.XHtml.Strict
Text.XHtml.Table
Text.XHtml.Transitional
Trace.Hpc.Mix
Trace.Hpc.Reflect
Trace.Hpc.Tix
Trace.Hpc.Util
TransformListComp
True
TypeFamilies
TypeOperators
TypeSynonymInstances
UNPACK
UnboxedTuples
UndecidableInstances
UnicodeSyntax
UnliftedFFITypes
Unsafe.Coerce
ViewPatterns
WARNING
abs
acos
acosh
all
and
any
appendFile
as
asTypeOf
asin
asinh
atan
atan2
atanh
break
case
catch
ceiling
class
compare
concat
concatMap
const
cos
cosh
curry
cycle
data
decodeFloat
default
deriving
div
divMod
do
drop
dropWhile
either
elem
else
encodeFloat
enumFrom
enumFromThen
enumFromThenTo
enumFromTo
error
exp
exponent
fail
filter
flip
floatDigits
floatRadix
floatRange
floor
fmap
fold
fold1
foldr
foldr1
fromEnum
fromInteger
fromIntegral
fromRational
fst
gcd
getChar
getContents
getLine
head
hiding
id
if
import
in
infix
infixl
infixr
init
instance
intract
ioError
isDenormalized
isIEEE
isInfinite
isNan
isNegativeZero
iterate
last
lcm
length
let
lex
lines
log
logBase
lookup
map
mapM
mapM_
max
maxBound
maximum
maybe
min
minBound
minimum
mod
module
negate
newtype
not
notElem
null
odd
of
or
otherwise
pi
pred
print
product
properFraction
putChar
putStr
putStrLn
qualified
quot
quotRem
read
readFile
readIO
readList
readLn
readParen
reads
readsPrec
realtoFrac
recip
rem
repeat
replicate
return
reverse
round
scaleFloat
scanl
scanl1
scanr
scanr1
seq
sequence
sequence_
show
showChar
showList
showParen
showString
shows
showsPrec
significand
signum
sin
sinh
snd
span
splitAt
sqrt
subtract
succ
sum
tail
take
takeWhile
tan
tanh
then
toEnum
toInteger
toRational
truncate
type
uncurry
undefined
unlines
until
unwords
unzip
unzip3
userError
where
words
writeFile
zip
zip3
zipWith
zipWith3

View File

@@ -1,53 +0,0 @@
abstract
assert
boolean
break
byte
case
catch
char
class
const
continue
default
do
double
else
enum
extends
final
finally
float
for
goto
if
implements
import
instanceof
int
interface
long
native
new
package
private
protected
public
return
short
static
strictfp
super
switch
synchronized
this
throw
throws
transient
try
void
volatile
while
@Override
@Deprecated
@SuppressWarnings

View File

@@ -1,148 +0,0 @@
Anchor
Area
Array
Boolean
Button
Checkbox
Date
Document
Element
FileUpload
Form
Frame
Function
Hidden
History
Image
Infinity
JavaArray
JavaClass
JavaObject
JavaPackage
Link
Location
Math
MimeType
NaN
Navigator
Number
Object
Option
Packages
Password
Plugin
Radio
RegExp
Reset
Select
String
Submit
Text
Textarea
Window
alert
arguments
assign
blur
break
callee
caller
captureEvents
case
clearInterval
clearTimeout
close
closed
comment
confirm
constructor
continue
default
defaultStatus
delete
do
document
else
escape
eval
export
find
focus
for
frames
function
getClass
history
home
if
import
in
innerHeight
innerWidth
isFinite
isNan
java
label
length
location
locationbar
menubar
moveBy
moveTo
name
navigate
navigator
netscape
new
onBlur
onError
onFocus
onLoad
onUnload
open
opener
outerHeight
outerWidth
pageXoffset
pageYoffset
parent
parseFloat
parseInt
personalbar
print
prompt
prototype
ref
releaseEvents
resizeBy
resizeTo
return
routeEvent
scroll
scrollBy
scrollTo
scrollbars
self
setInterval
setTimeout
status
statusbar
stop
sun
switch
taint
this
toString
toolbar
top
typeof
unescape
untaint
unwatch
valueOf
var
void
watch
while
window
with

View File

@@ -1,37 +0,0 @@
abstract
break
case
catch
const
continue
do
else
elseif
end
eval
export
false
finally
for
function
global
if
ifelse
immutable
import
importall
in
let
macro
module
otherwise
quote
return
switch
throw
true
try
type
typealias
using
while

View File

@@ -1,21 +0,0 @@
and
break
do
else
elseif
end
false
for
function
if
in
local
nil
not
or
repeat
return
then
true
until
while

View File

@@ -1,70 +0,0 @@
addr
and
as
asm
atomic
bind
block
break
case
cast
concept
const
continue
converter
defer
discard
distinct
div
do
elif
else
end
enum
except
export
finally
for
from
func
generic
if
import
in
include
interface
is
isnot
iterator
let
macro
method
mixin
mod
nil
not
notin
object
of
or
out
proc
ptr
raise
ref
return
shl
shr
static
template
try
tuple
type
using
var
when
while
with
without
xor
yield

View File

@@ -1,161 +0,0 @@
auto
break
case
char
const
continue
default
do
double
else
enum
extern
float
for
goto
if
inline
int
long
register
restrict
return
short
signed
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
while
_Alignas
_Alignof
_Atomic
_Bool
_Complex
_Generic
_Imaginary
_Noreturn
_Static_assert
_Thread_local
alignas
alignof
atomic_
bool
complex
imaginary
noreturn
static_assert
thread_local
#if
#elif
#else
#endif
defined
#ifdef
#ifndef
#define
#undef
#include
#line
#error
#pragma
_Pragma
asm
fortran
#import
self
_cmd
instancetype
__bridge
__bridge_transfer
__bridge_retained
__bridge_retain
@not_keyword
@class
@compatibility_alias
@defs
@encode
@end
@implementation
@interface
@private
@protected
@protocol
@public
@selector
@throw
@try
@catch
@finally
@synchronized
@autoreleasepool
@property
@package
@required
@optional
@synthesize
@dynamic
@import
@available
__attribute__((visibility("default")))
__attribute__((visibility("hidden")))
__attribute__((deprecated))
__attribute__((unavailable))
__attribute__((objc_exception))
__attribute__((objc_root_class))
__covariant
__contravariant
__kindof
getter=
setter=
readonly
readwrite
assign
retain
copy
nonatomic
atomic
strong
weak
unsafe_unretained
nonnull
nullable
null_unspecified
null_resettable
class
__attribute__((deprecated))
in
out
inout
oneway
bycopy
byref
nonnull
nullable
null_unspecified
__attribute__((unused))
super
true
false
__objc_yes
__objc_no
Class
id
SEL
IMP
BOOL
STR
NSInteger
NSUInteger
YES
NO
Nil
nil
__strong
__unsafe_unretained
__autoreleasing

View File

@@ -1,46 +0,0 @@
# GNU Octave, and probably proprietary MATLAB
# https://www.gnu.org/software/octave/doc/interpreter/Keywords.html
__FILE__
__LINE__
break
case
catch
classdef
continue
do
else
elseif
end
end_try_catch
end_unwind_protect
endclassdef
endenumeration
endevents
endfor
endfunction
endif
endmethods
endparfor
endproperties
endswitch
endwhile
enumeration
events
for
function
global
if
methods
otherwise
parfor
persistent
properties
return
static
switch
try
unitl
unwind_protect
unwind_protect_cleanup
while

File diff suppressed because it is too large Load Diff

View File

@@ -1,379 +0,0 @@
ArithmeticError
AssertionError
AttributeError
BaseException
BufferError
BytesWarning
DeprecationWarning
EOFError
Ellipsis
EnvironmentError
Exception
False
FloatingPointError
FutureWarning
GeneratorExit
IOError
ImportError
ImportWarning
IndentationError
IndexError
KeyError
KeyboardInterrupt
LookupError
MemoryError
NameError
None
NotImplemented
NotImplementedError
OSError
OverflowError
PendingDeprecationWarning
ReferenceError
RuntimeError
RuntimeWarning
StandardError
StopIteration
SyntaxError
SyntaxWarning
SystemError
SystemExit
TabError
True
TypeError
UnboundLocalError
UnicodeDecodeError
UnicodeEncodeError
UnicodeError
UnicodeTranslateError
UnicodeWarning
UserWarning
ValueError
Warning
ZeroDivisionError
__builtins__
__debug__
__doc__
__file__
__future__
__import__
__init__
__main__
__name__
__package__
_dummy_thread
_thread
abc
abs
aifc
all
and
any
apply
argparse
array
as
assert
ast
asynchat
asyncio
asyncore
atexit
audioop
base64
basestring
bdb
bin
binascii
binhex
bisect
bool
break
buffer
builtins
bytearray
bytes
bz2
calendar
callable
cgi
cgitb
chr
chuck
class
classmethod
cmath
cmd
cmp
code
codecs
codeop
coerce
collections
colorsys
compile
compileall
complex
concurrent
configparser
contextlib
continue
copy
copyreg
copyright
credits
crypt
csv
ctypes
curses
datetime
dbm
decimal
def
del
delattr
dict
difflib
dir
dis
distutils
divmod
doctest
dummy_threading
elif
else
email
enumerate
ensurepip
enum
errno
eval
except
exec
execfile
exit
faulthandler
fcntl
file
filecmp
fileinput
filter
finally
float
fnmatch
for
format
formatter
fpectl
fractions
from
frozenset
ftplib
functools
gc
getattr
getopt
getpass
gettext
glob
global
globals
grp
gzip
hasattr
hash
hashlib
heapq
help
hex
hmac
html
http
id
if
imghdr
imp
impalib
import
importlib
in
input
inspect
int
intern
io
ipaddress
is
isinstance
issubclass
iter
itertools
json
keyword
lambda
len
license
linecache
list
locale
locals
logging
long
lzma
macpath
mailbox
mailcap
map
marshal
math
max
memoryview
mimetypes
min
mmap
modulefinder
msilib
msvcrt
multiprocessing
netrc
next
nis
nntplib
not
numbers
object
oct
open
operator
optparse
or
ord
os
ossaudiodev
parser
pass
pathlib
pdb
pickle
pickletools
pipes
pkgutil
platform
plistlib
poplib
posix
pow
pprint
print
profile
property
pty
pwd
py_compiler
pyclbr
pydoc
queue
quit
quopri
raise
random
range
raw_input
re
readline
reduce
reload
repr
reprlib
resource
return
reversed
rlcompleter
round
runpy
sched
select
selectors
self
set
setattr
shelve
shlex
shutil
signal
site
slice
smtpd
smtplib
sndhdr
socket
socketserver
sorted
spwd
sqlite3
ssl
stat
staticmethod
statistics
str
string
stringprep
struct
subprocess
sum
sunau
super
symbol
symtable
sys
sysconfig
syslog
tabnanny
tarfile
telnetlib
tempfile
termios
test
textwrap
threading
time
timeit
tkinter
token
tokenize
trace
traceback
tracemalloc
try
tty
tuple
turtle
type
types
unichr
unicode
unicodedata
unittest
urllib
uu
uuid
vars
venv
warnings
wave
weakref
webbrowser
while
winsound
winreg
with
wsgiref
xdrlib
xml
xmlrpc
xrange
yield
zip
zipfile
zipimport
zlib

View File

@@ -1,183 +0,0 @@
AlignBottom
AlignCenter
AlignHCenter
AlignLeft
AlignRight
AlignTop
AlignVCenter
AnchorAnimation
AnchorChanges
Audio
Behavior
Binding
BorderImage
ColorAnimation
Column
Component
Connections
Easing
Flickable
Flipable
Flow
FocusScope
GestureArea
Grid
GridView
Horizontal
Image
InBack
InBounce
InCirc
InCubic
InElastic
InExpo
InOutBack
InOutBounce
InOutCirc
InOutCubic
InOutElastic
InOutExpo
InOutQuad
InOutQuart
InOutQuint
InQuad
InQuart
InQuint
InQuint
InSine
Item
LayoutItem
LeftButton
Linear
ListElement
ListModel
ListView
Loader
MidButton
MiddleButton
MouseArea
NoButton
NumberAnimation
OutBack
OutBounce
OutCirc
OutCubic
OutElastic
OutExpo
OutInBack
OutInBounce
OutInCirc
OutInCubic
OutInElastic
OutInExpo
OutInQuad
OutInQuart
OutInQuint
OutQuad
OutQuart
OutQuint
OutSine
Package
ParallelAnimation
ParentAnimation
ParentChange
ParticleMotionGravity
ParticleMotionLinear
ParticleMotionWander
Particles
Path
PathAttribute
PathCubic
PathLine
PathPercent
PathQuad
PathView
PauseAnimation
PropertyAction
PropertyAnimation
PropertyChanges
Qt
QtObject
Rectangle
Repeater
RightButton
Rotation
RotationAnimation
Row
Scale
ScriptAction
SequentialAnimation
SmoothedAnimation
SoundEffect
SpringFollow
State
StateChangeScript
StateGroup
SystemPalette
Text
TextEdit
TextInput
Timer
Transition
Translate
Vertical
Video
ViewsPositionersMediaEffects
VisualDataModel
VisualItemModel
WebView
WorkerScript
XmlListModel
XmlRole
alias
as
bool
break
case
catch
color
const
continue
date
debugger
default
delete
do
double
else
enum
false
false
finally
for
function
if
import
import
in
instanceof
int
let
new
null
on
parent
property
real
return
signal
string
switch
this
throw
true
try
typeof
undefined
url
var
variant
void
while
with
yield

View File

@@ -1,181 +0,0 @@
$!
$"
$$
$&
$'
$*
$+
$,
$-0
$-F
$-I
$-K
$-a
$-d
$-i
$-l
$-p
$-v
$-w
$.
$/
$0
$1
$10
$11
$2
$3
$4
$5
$6
$7
$8
$9
$:
$;
$<
$=
$>
$?
$@
$DEBUG
$FILENAME
$KCODE
$LOADED_FEATURES
$LOAD_PATH
$PROGRAM_NAME
$SAFE
$VERBOSE
$\
$_
$`
$deferr
$defout
$stderr
$stdin
$stdout
$~
ARGF
ARGV
Array
BEGIN
DATA
END
ENV
FALSE
Float
Integer
NIL
PLATFORM
RELEASE_DATE
RUBY_COPYRIGHT
RUBY_DESCRIPTION
RUBY_PATCHLEVEL
RUBY_PLATFORM
RUBY_RELEASE_DATE
RUBY_VERSION
SCRIPT_LINES__
STDERR
STDIN
STDOUT
String
TOPLEVEL_BINDING
TRUE
VERSION
__method__
`
abort
alias
and
at_exit
autoload
autoload?
begin
binding
block_given
break
callcc
caller
case
catch
chomp
chomp!
chop
chop
class
def
defined?
do
else
elsif
end
ensure
eval
exec
exit
exit!
fail
false
for
fork
format
getc
gets
global_variables
gsub
gsub!
if
in
iterator?
lambda
load
local_variables
loop
module
next
nil
not
open
or
p
printf
proc
putc
puts
raise
rand
readline
readlines
redo
require
require_relative
rescue
retry
return
scan
select
self
set_trace_func
sleep
split
sprintf
srand
sub
sub!
super
syscall
system
test
then
throw
trace_var
trap
true
undef
unless
until
untrace_var
warn
when
while
yield

File diff suppressed because it is too large Load Diff

View File

@@ -1,216 +0,0 @@
case-lambda
call/cc
class
define-class
exit-handler
field
import
inherit
init-field
interface
let*-values
let-values
let/ec
mixin
opt-lambda
override
protect
provide
public
rename
require
require-for-syntax
syntax
syntax-case
syntax-error
unit/sig
unless
when
with-syntax
and
begin
call-with-current-continuation
call-with-input-file
call-with-output-file
case
cond
define
define-syntax
delay
do
dynamic-wind
else
for-each
if
lambda
let
let*
let-syntax
letrec
letrec-syntax
map
or
syntax-rules
abs
acos
angle
append
apply
asin
assoc
assq
assv
atan
boolean?
caar
cadr
call-with-input-file
call-with-output-file
call-with-values
car
cdddar
cddddr
cdr
ceiling
char->integer
char-alphabetic?
char-ci<=?
char-ci<?
char-ci=?
char-ci>=?
char-ci>?
char-downcase
char-lower-case?
char-numeric?
char-ready?
char-upcase
char-upper-case?
char-whitespace?
char<=?
char<?
char=?
char>=?
char>?
char?
close-input-port
close-output-port
complex?
cons
cos
current-input-port
current-output-port
denominator
display
eof-object?
eq?
equal?
eqv?
eval
even?
exact->inexact
exact?
exp
expt
#f
floor
force
gcd
imag-part
inexact->exact
inexact?
input-port?
integer->char
integer?
interaction-environment
lcm
length
list
list->string
list->vector
list-ref
list-tail
list?
load
log
magnitude
make-polar
make-rectangular
make-string
make-vector
max
member
memq
memv
min
modulo
negative?
newline
not
null-environment
null?
number->string
number?
numerator
odd?
open-input-file
open-output-file
output-port?
pair?
peek-char
port?
positive?
procedure?
quasiquote
quote
quotient
rational?
rationalize
read
read-char
real-part
real?
remainder
reverse
round
scheme-report-environment
set!
set-car!
set-cdr!
sin
sqrt
string
string->list
string->number
string->symbol
string-append
string-ci<=?
string-ci<?
string-ci=?
string-ci>=?
string-ci>?
string-copy
string-fill!
string-length
string-ref
string-set!
string<=?
string<?
string=?
string>=?
string>?
string?
substring
symbol->string
symbol?
#t
tan
transcript-off
transcript-on
truncate
values
vector
vector->list
vector-fill!
vector-length
vector-ref
vector-set!

File diff suppressed because it is too large Load Diff

View File

@@ -1,182 +0,0 @@
# Bash Family Shell Dictionary
# http://www.gnu.org/software/bash/manual/bash.html
.
:
[
alias
bg
bind
break
builtin
caller
cd
command
compgen
complete
compopt
continue
declare
dirs
disown
echo
enable
eval
exec
exit
export
fc
fg
getopts
hash
help
history
jobs
kill
let
local
logout
mapfile
popd
printf
pushd
pwd
read
readarray
readonly
return
set
shift
shopt
source
suspend
test
times
trap
type
typeset
ulimit
umask
unalias
unset
wait
!
[[
]]
case
do
done
elif
else
esac
fi
for
function
if
in
select
then
time
until
while
{
}
!
#
$
*
-
0
?
@
_
BASH
BASH_ALIASES
BASH_ARGC
BASH_ARGV
BASH_CMDS
BASH_COMMAND
BASH_ENV
BASH_EXECUTION_STRING
BASH_LINENO
BASH_REMATCH
BASH_SOURCE
BASH_SUBSHELL
BASH_VERSINFO
BASH_VERSION
BASH_XTRACEFD
BASHOPTS
BASHPID
CDPATH
COLUMNS
COMP_CWORD
COMP_KEY
COMP_LINE
COMP_POINT
COMP_TYPE
COMP_WORDBREAKS
COMP_WORDS
COMPREPLY
DIRSTACK
EMACS
EUID
FCEDIT
FIGNORE
FUNCNAME
GLOBIGNORE
GROUPS
HISTCMD
HISTCONTROL
HISTFILE
HISTFILESIZE
HISTIGNORE
HISTSIZE
HISTTIMEFORMAT
HOME
HOSTFILE
HOSTNAME
HOSTTYPE
IFS
IGNOREEOF
INPUTRC
LANG
LC_ALL
LC_COLLATE
LC_CTYPE
LC_MESSAGES
LC_MESSAGES
LC_NUMERIC
LINENO
LINES
MACHTYPE
MAIL
MAILCHECK
MAILPATH
OLDPWD
OPTARG
OPTERR
OPTIND
OSTYPE
PATH
PIPESTATUS
POSIXLY_CORRECT
PPID
PROMPT_COMMAND
PROMPT_DIRTRIM
PS1
PS2
PS3
PS4
PWD
RANDOM
REPLY
SECONDS
SHELL
SHELLOPTS
SHLVL
TEXTDOMAIN
TEXTDOMAINDIR
TIMEFORMAT
TMOUT
TMPDIR
UID

View File

@@ -1,87 +0,0 @@
associatedtype
class
deinit
enum
extension
func
import
init
inout
let
operator
precedencegroup
protocol
struct
subscript
typealias
var
fileprivate
internal
private
public
static
undef
sil
sil_stage
sil_vtable
sil_global
sil_witness_table
sil_default_witness_table
sil_coverage_map
sil_scope
defer
if
guard
do
repeat
else
for
in
while
return
break
continue
fallthrough
switch
case
default
where
catch
as
Any
false
is
nil
rethrows
super
self
Self
throw
true
try
throws
__FILE__
__LINE__
__COLUMN__
__FUNCTION__
__DSO_HANDLE__
_
#if
#else
#elseif
#endif
#keyPath
#line
#sourceLocation
#selector
#available
#fileLiteral
#imageLiteral
#colorLiteral
#FileReference
#Image
#Color
#file
#column
#function
#dsohandle

View File

@@ -1,172 +0,0 @@
after
append
apply
array
auto_execok
auto_import
auto_load
auto_load_index
auto_mkindex
auto_mkindex_old
auto_qualify
auto_reset
bell
binary
bind
bindtags
break
button
canvas
case
catch
cd
chan
checkbutton
clipboard
clock
close
concat
continue
destroy
dict
encoding
entry
eof
error
eval
event
exec
exit
expr
fblocked
fconfigure
fcopy
file
fileevent
flush
focus
font
for
foreach
format
frame
gets
glob
global
grab
grid
if
image
incr
info
interp
join
label
labelframe
lappend
lassign
lindex
linsert
list
listbox
llength
load
lower
lrange
lrepeat
lreplace
lreverse
lsearch
lset
lsort
menu
menubutton
message
namespace
open
option
pack
package
panedwindow
pid
pkg_mkIndex
place
proc
puts
pwd
radiobutton
raise
read
regexp
registry
regsub
rename
return
scale
scan
scrollbar
seek
selection
set
socket
source
spinbox
split
string
subst
switch
tclLog
tclPkgSetup
tclPkgUnknown
tcl_findLibrary
tell
text
time
tk
tk_chooseColor
tk_chooseDirectory
tk_getOpenFile
tk_getSaveFile
tk_menuSetFocus
tk_messageBox
tk_popup
tk_textCopy
tk_textCut
tk_textPaste
tkwait
toplevel
ttk::button
ttk::checkbutton
ttk::combobox
ttk::entry
ttk::focusFirst
ttk::frame
ttk::label
ttk::labelframe
ttk::menubutton
ttk::notebook
ttk::paned
ttk::panedwindow
ttk::progressbar
ttk::radiobutton
ttk::scale
ttk::scrollbar
ttk::separator
ttk::setTheme
ttk::sizegrip
ttk::style
ttk::takefocus
ttk::themes
ttk::treeview
trace
unknown
unload
unset
update
uplevel
upvar
variable
vwait
while
winfo
wm

View File

@@ -1,797 +0,0 @@
absRefPrefix
accessibility
accessibilityWrap
accessKey
ACT
ACTIFSUB
ACTIVSUBRO
ACTRO
addAttributes
addExtUrlsAndShortCuts
additionalHeaders
additionalParams
addParams
addQueryString
addQueryString
adjustItemsH
adjustSubItemsH
adminPanelStyles
after
age
align
align.field
all
allowedAttribs
allowedGroups
allowEdit
allowNew
allowTags
allStdWrap
allWrap
alternativeSortingField
alternativeTempPath
altImgResource
altTarget
altText
alwaysActivePIDlist
alwaysLink
andWhere
angle
antiAlias
append
applyTotalH
applyTotalW
arrayReturnMode
arrowACT
arrowImgParams
arrowNO
ATagBeforeWrap
ATagParams
ATagTitle
atLeast
atMost
authcodeFields
autoInsertPID
autostart
backColor
badMess
base64
baseURL
beforeImg
beforeImgLink
beforeImgTagParams
beforeROImg
beforeWrap
begin
begin
beginAtLevel
beLoginLinkIPList
beLoginLinkIPList_login
beLoginLinkIPList_logout
beUserLogin
bgImg
blankStrEqFalse
blur
bm
bodyTag
bodyTag
bodyTagAdd
bodyTagCObject
bodyTagMargins
border
border
borderCol
bordersWithin
borderThick
bottomContent
bottomHeight
br
breakSpace
breakWidth
brTag
bytes
c
cache_clearAtMidnight
cached
cache_period
caption
captionAlign
captionSplit
case
case
CASE
casesensitiveComp
cellpadding
cellspacing
char
charcoal
clearCacheOfPages
cMargins
COA
COA_INT
cObject
cObjNum
code
collapse
color
color1
color2
color3
color.default
color.field
colRelations
cols
cols
colSpace
COLUMNS
COMMENT
commentWrap
compensateFieldWidth
compX
compY
concatenateJsAndCss
conf
config
config
CONFIG
constants
CONTENT
content_fallback
content_from_pid_allowOutsideDomain
controllerActionName
controllerExtensionName
controllerName
crop
cropHTML
csConv
cssInline
CSS_inlineStyle
CTABLE
CUR
CURIFSUB
CURIFSUBRO
current
CURRO
cWidth
data
dataArray
dataWrap
date
debug
debugData
debugFunc
debugItemConf
debugRenumberedObject
decimals
dec_point
default
defaultAlign
defaultCmd
defaultCode
defaultGetVars
delete
denyTags
depth
dimensions
directImageLink
directionLeft
directionUp
directReturn
disableAllHeaderCode
disableAltText
disableCharsetHeader
disableImgBorderAttr
disablePageExternalUrl
disablePrefixComment
disablePreviewNotification
displayActiveOnLoad
displayActiveOnLoad
displayrecord
distributeX
distributeY
doctype
doctypeSwitch
doNotLinkIt
doNotShowLink
doNotStripHTML
dontCheckPid
dontFollowMouse
dontHideOnMouseUp
dontLinkIfSubmenu
dontMd5FieldNames
dontWrapInTable
doubleBrTag
doublePostCheck
dWorkArea
edge
edit
editIcons
editIcons
editPanel
EDITPANEL
EDITPANEL
effects
email
emailMess
emboss
emptyTitleHandling
emptyTitleHandling
emptyTitleHandling
enable
enableContentLengthHeader
encapsLines
encapsLinesStdWrap
encapsTagList
entryLevel
equalH
equals
evalErrors
evalFunc
excludeDoktypes
excludeNoSearchPages
excludeUidList
expAll
explode
ext
extbase
externalBlocks
extOnReady
extTarget
face.default
face.field
FEData
fe_userEditSelf
fe_userOwnSelf
field
fieldPrefix
fieldRequired
fieldWrap
file
FILE
filelink
fileList
fileTarget
firstLabel
firstLabelGeneral
flip
flop
foldSpeed
foldTimer
fontFile
fontSize
fontSizeMultiplicator
fontTag
footerData
forceAbsoluteUrl
forceTypeValue
FORM
format
formName
formurl
frame
frameReloadIfNotInFrameset
frameSet
freezeMouseover
ftu
gamma
gapBgCol
gapLineCol
gapLineThickness
gapWidth
gif
GIFBUILDER
globalNesting
GMENU
goodMess
gray
gr_list
groupBy
headerComment
headerData
headTag
height
hiddenFields
hide
hideButCreateMap
hideMenuTimer
hideMenuWhenNotOver
hideNonTranslated
highColor
HMENU
hover
hoverStyle
HRULER
HTML
html5
htmlmail
HTMLparser
htmlSpecialChars
htmlTag_dir
htmlTag_langKey
htmlTag_setParams
http
icon
iconCObject
icon_image_ext_list
icon_link
icon_thumbSize
if
ifBlank
ifEmpty
IFSUB
IFSUBRO
ignore
IMAGE
image_compression
image_effects
image_frames
imgList
imgMap
imgMapExtras
imgMax
imgNameNotRandom
imgNamePrefix
imgObjNum
imgParams
imgPath
imgStart
IMGTEXT
import
inBranch
includeCSS
includeJS
includeJSFooter
includeJSFooterlibs
includeJSlibs
includeLibrary
includeLibs
includeNotInMenu
incT3Lib_htmlmail
index_descrLgd
index_enable
index_externals
index_metatags
infomail
inlineJS
inlineLanguageLabel
inlineSettings
inlineStyle2TempFile
innerStdWrap_all
innerWrap
innerWrap2
inputLevels
insertClassesFromRTE
insertData
intensity
intTarget
intval
invert
IProcFunc
isFalse
isGreaterThan
isInList
isLessThan
isPositive
isTrue
itemArrayProcFunc
items
iterations
javascriptLibs
join
jpg
jsFooterInline
jsInline
JSMENU
JSwindow
JSwindow.altUrl
JSwindow.altUrl_noDefaultParams
JSwindow.expand
JSwindow.newWindow
JSwindow_params
jumpurl
jumpurl_enable
jumpurl_mailto_disable
keep
keepNonMatchedTags
keywords
keywordsField
labelStdWrap
labelWrap
lang
language
language_alt
languageField
layer_menu_id
layerStyle
layout
layoutRootPath
leftjoin
leftOffset
levels
limit
lineColor
lineThickness
linkAccessRestrictedPages
linkParams
linkVars
linkWrap
list
listNum
lm
LOAD_REGISTER
locale_all
localNesting
locationData
lockFilePath
lockPosition
lockPosition_addSelf
lockPosition_adjust
loginUser
longdescURL
loop
lowColor
lower
mailto
main
mainScript
makelinks
markers
markerWrap
mask
max
maxAge
maxH
maxHeight
maxItems
maxW
maxWidth
maxWInText
m.bgImg
m.bottomImg
m.bottomImg_mask
md5
meaningfulTempFilePrefix
menuBackColor
menuHeight
menuOffset
menuWidth
message_page_is_being_generated
message_preview
message_preview_workspace
meta
metaCharset
method
minH
minifyCSS
minifyJS
minItems
minItems
minW
m.mask
moveJsFromHeaderToFooter
MP_defaults
MP_disableTypolinkClosestMPvalue
MP_mapRootPoints
MULTIMEDIA
name
namespaces
negate
newRecordFromTable
newRecordInPid
next
niceText
NO
noAttrib
noBlur
no_cache
noCols
noLink
noLinkUnderline
nonCachedSubst
none
nonTypoTagStdWrap
nonTypoTagUserFunc
nonWrappedTag
noOrderBy
noPageTitle
noResultObj
normalWhenNoLanguage
noRows
noScale
noScaleUp
noscript
noStretchAndMarginCells
notification_email_charset
notification_email_encoding
notification_email_urlmode
noTrimWrap
noValueInsert
noWrapAttr
numberFormat
numRows
obj
offset
offset
_offset
offsetWrap
onlyCurrentPid
opacity
options
orderBy
OTABLE
outerWrap
outline
output
outputLevels
override
overrideAttribs
overrideEdit
overrideId
PAGE
pageGenScript
pageRendererTemplateFile
pageTitleFirst
parameter
params
parseFunc
parseFunc
parseValues
partialRootPath
path
pidInList
pixelSpaceFontSizeRef
plainTextStdWrap
pluginNames
png
postCObject
postUserFunc
postUserFunkInt
preCObject
prefixComment
prefixLocalAnchors
prefixLocalAnchors
prefixRelPathWith
preIfEmptyListNum
prepend
preUserFunc
prev
previewBorder
printBeforeContent
prioriCalc
processScript
properties
protect
protectLvar
quality
quality
radioInputWrap
radioWrap
range
range
rawUrlEncode
recipient
RECORDS
recursive
redirect
reduceColors
relativeToParentLayer
relativeToTriggerItem
relPathPrefix
remap
remapTag
removeBadHTML
removeDefaultJS
removeIfEquals
removeIfFalse
removeObjectsOfDummy
removePrependedNumbers
removeTags
removeWrapping
renderCharset
renderObj
renderWrap
REQ
required
required
resources
resultObj
returnKey
returnLast
reverseOrder
rightjoin
rm
rmTagIfNoAttrib
RO_chBgColor
rootline
rotate
rows
rowSpace
sample
sample
section
sectionIndex
select
sendCacheHeaders
sendCacheHeaders_onlyWhenLoginDeniedInBranch
separator
setContentToCurrent
setCurrent
setfixed
setFixedHeight
setFixedWidth
setJS_mouseOver
setJS_openPic
setKeywords
shadow
sharpen
shear
short
shortcutIcon
showAccessRestrictedPages
showActive
showFirst
simulateStaticDocuments
simulateStaticDocuments_addTitle
simulateStaticDocuments_dontRedirectPathInfoError
simulateStaticDocuments_noTypeIfNoTitle
simulateStaticDocuments_pEnc
simulateStaticDocuments_pEnc_onlyP
simulateStaticDocuments_replacementChar
sitetitle
size
size.default
size.field
slide
smallFormFields
solarize
source
space
spaceAfter
spaceBefore
spaceBelowAbove
spaceLeft
spaceRight
spacing
spamProtectEmailAddresses
spamProtectEmailAddresses_atSubst
spamProtectEmailAddresses_lastDotSubst
SPC
special
split
splitRendering
src
stat
stat_apache
stat_apache_logfile
stat_apache_niceTitle
stat_apache_noHost
stat_apache_noRoot
stat_apache_notExtended
stat_apache_pagenames
stat_excludeBEuserHits
stat_excludeIPList
stat_mysql
stat_pageLen
stat_titleLen
stat_typeNumList
stayFolded
stdWrap
stdWrap2
strftime
stripHtml
stripProfile
stylesheet
submenuObjSuffixes
subMenuOffset
subparts
subst_elementUid
subst_elementUid
substMarksSeparately
substring
swirl
sword
sword_noMixedCase
sword_standAlone
sys_language_mode
sys_language_overlay
sys_language_softExclude
sys_language_softMergeIfNotBlank
sys_language_uid
sys_page
table
tableParams
tables
tableStdWrap
tableStyle
tags
target
TCAselectItem
TDparams
template
TEMPLATE
templateFile
text
TEXT
textMargin
textMargin_outOfText
textMaxLength
textObjNum
textPos
textStyle
thickness
thousands_sep
title
titleTagFunction
titleText
titleText
tm
TMENU
token
topOffset
totalWidth
transparentBackground
transparentColor
trim
twice
typeNum
types
typolink
typolinkCheckRootline
typolinkEnableLinksAcrossDomains
typolinkLinkAccessRestrictedPages
typolinkLinkAccessRestrictedPages_addParams
uid
uidInList
uniqueGlobal
uniqueLinkVars
uniqueLocal
unset
unsetEmpty
upper
url
useCacheHash
useLargestItemX
useLargestItemY
USER
USERDEF1
USERDEF1RO
USERDEF2RO
USERFEF2
userFunc
userFunc_updateArray
userIdColumn
USER_INT
USERNAME_substToken
USERUID_substToken
USR
USRRO
value
variables
wave
where
width
wordSpacing
workArea
workOnSubpart
wrap
wrap2
wrap3
wrapAlign
wrapFieldName
wrapItemAndSub
wrapNoWrappedLines
wraps
xhtml_11
xhtml_2
xhtml_basic
xhtml_cleaning
xhtmlDoctype
xhtml_frames
xhtml+rdfa_10
xhtml_strict
xhtml_trans
xml_10
xml_11
xmlprologue
xPosOffset
yPosOffset

View File

@@ -1,231 +0,0 @@
# OCaml 3.12.1
# Keywords
and
as
assert
begin
class
constraint
do
done
downto
else
end
exception
external
false
for
fun
function
functor
if
in
include
inherit
initializer
lazy
let
match
method
module
mutable
new
object
of
open
or
private
rec
sig
struct
then
to
true
try
type
val
virtual
when
while
with
# Pervasives
!
!=
&
&&
*
**
*.
+
+.
-
-.
/
/.
:=
<
<=
<>
=
==
>
>=
@
FP_infinite
FP_nan
FP_normal
FP_subnormal
FP_zero
LargeFile
Open_append
Open_binary
Open_creat
Open_nonblock
Open_rdonly
Open_text
Open_trunc
Open_wronly
Oupen_excl
^
^^
abs
abs_float
acos
asin
asr
at_exit
atan
atan2
bool_of_string
ceil
char_of_int
classify_float
close_in
close_in_noerr
close_out
close_out_noerr
compare
cos
cosh
decr
do_at_exit
epsilon_float
exit
exp
expm1
failwith
float
float_of_int
float_of_string
floor
flush
flush_all
format
format4
format_of_string
fpclass
frexp
fst
ignore
in_channel
in_channel_length
incr
infinity
input
input_binary_int
input_byte
input_char
input_line
input_value
int_of_char
int_of_float
int_of_string
invalid_arg
land
ldexp
lnot
log
log10
log1p
lor
lsl
lsr
lxor
max
max_float
max_int
min
min_float
min_int
mod
mod_float
modf
nan
neg_infinity
not
open_flag
open_in
open_in_bin
open_in_gen
open_out
open_out_bin
open_out_gen
or
out_channel
out_channel_length
output
output_binary_int
output_byte
output_char
output_string
output_value
pos_in
pos_out
pred
prerr_char
prerr_endline
prerr_float
prerr_int
prerr_newline
prerr_string
print_char
print_endline
print_float
print_int
print_newline
print_string
raise
read_float
read_int
read_line
really_input
ref
seek_in
seek_out
set_binary_mode_in
set_binary_mode_out
sin
sinh
snd
sqrt
stderr
stdin
stdout
string_of_bool
string_of_float
string_of_format
string_of_int
succ
tan
tanh
truncate
unsafe_really_input
valid_float_lexem
||
~
~+
~+.
~-
~-.

View File

@@ -1,313 +0,0 @@
`define
`else
`endif
`ifdef
`ifndef
`macromodule
`module
`primitive
`timescale
above
abs
absdelay
ac_stim
acos
acosh
alias
aliasparam
always
always_comb
always_ff
always_latch
analog
analysis
and
asin
asinh
assert
assign
assume
atan
atan2
atanh
automatic
before
begin
bind
bins
binsof
bit
branch
break
buf
bufif0
bufif1
byte
case
casex
casez
cell
chandle
class
clocking
cmos
config
connectmodule
connectrules
const
constraint
context
continue
cos
cosh
cover
covergroup
coverpoint
cross
ddt
ddx
deassign
default
define
defparam
design
disable
discipline
dist
do
driver_update
edge
else
end
endcase
endclass
endclocking
endconfig
endconnectrules
enddiscipline
endfunction
endgenerate
endgroup
endif
endinterface
endmodule
endnature
endpackage
endparamset
endprimitive
endprogram
endproperty
endsequence
endspecify
endtable
endtask
enum
event
exclude
exp
expect
export
extends
extern
final
final_step
first_match
flicker_noise
floor
flow
for
force
foreach
forever
fork
forkjoin
from
function
generate
genvar
ground
highz0
highz1
hypot
idt
idtmod
if
ifdef
iff
ifndef
ifnone
ignore_bins
illegal_bins
import
incdir
include
inf
initial
initial_step
inout
input
inside
instance
int
integer
interface
intersect
join
join_any
join_none
laplace_nd
laplace_np
laplace_zd
laplace_zp
large
last_crossing
liblist
library
limexp
ln
local
localparam
log
logic
longint
macromodule
mailbox
matches
max
medium
min
modport
module
nand
nand
nature
negedge
net_resolution
new
nmos
nmos
noise_table
nor
noshowcancelled
not
notif0
notif1
null
or
output
package
packed
parameter
paramset
pmos
pmos
posedge
potential
pow
primitive
priority
program
property
protected
pull0
pull1
pullup
pulsestyle_ondetect
pulsestyle_onevent
pure
rand
randc
randcase
randcase
randsequence
rcmos
real
realtime
ref
reg
release
repeat
return
rnmos
rpmos
rtran
rtranif0
rtranif1
scalared
semaphore
sequence
shortint
shortreal
showcancelled
signed
sin
sinh
slew
small
solve
specify
specparam
sqrt
static
string
strong0
strong1
struct
super
supply
supply0
supply1
table
tagged
tan
tanh
task
then
this
throughout
time
timeprecision
timer
timescale
timeunit
tran
tran
tranif0
tranif1
transition
tri
tri
tri0
tri1
triand
trior
trireg
type
typedef
union
unique
unsigned
use
uwire
var
vectored
virtual
void
wait
wait_order
wand
weak0
weak1
while
white_noise
wildcard
wire
with
within
wor
wreal
xnor
xor
zi_nd
zi_np
zi_zd

View File

@@ -1,219 +0,0 @@
;;; cargo-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "cargo" "cargo.el" (0 0 0 0))
;;; Generated autoloads from cargo.el
(autoload 'cargo-minor-mode "cargo" "\
Cargo minor mode. Used to hold keybindings for cargo-mode.
\\{cargo-minor-mode-map}
\(fn &optional ARG)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "cargo" '("cargo-minor-mode")))
;;;***
;;;### (autoloads nil "cargo-process" "cargo-process.el" (0 0 0 0))
;;; Generated autoloads from cargo-process.el
(autoload 'cargo-process-bench "cargo-process" "\
Run the Cargo bench command.
With the prefix argument, modify the command's invocation.
Cargo: Run the benchmarks.
\(fn)" t nil)
(autoload 'cargo-process-build "cargo-process" "\
Run the Cargo build command.
With the prefix argument, modify the command's invocation.
Cargo: Compile the current project.
\(fn)" t nil)
(autoload 'cargo-process-clean "cargo-process" "\
Run the Cargo clean command.
With the prefix argument, modify the command's invocation.
Cargo: Remove the target directory.
\(fn)" t nil)
(autoload 'cargo-process-doc "cargo-process" "\
Run the Cargo doc command.
With the prefix argument, modify the command's invocation.
Cargo: Build this project's and its dependencies' documentation.
\(fn)" t nil)
(autoload 'cargo-process-doc-open "cargo-process" "\
Run the Cargo doc command with the --open switch.
With the prefix argument, modify the command's invocation.
Cargo: Open this project's documentation.
\(fn)" t nil)
(autoload 'cargo-process-new "cargo-process" "\
Run the Cargo new command.
With the prefix argument, modify the command's invocation.
NAME is the name of your application.
If BIN is t then create a binary application, otherwise a library.
Cargo: Create a new cargo project.
\(fn NAME &optional BIN)" t nil)
(autoload 'cargo-process-init "cargo-process" "\
Run the Cargo init command.
With the prefix argument, modify the command's invocation.
DIRECTORY is the directory you want to create a cargo project in.
If BIN is t then create a binary application, otherwise a library.
Cargo: Create a new cargo project in current directory.
DIRECTORY is created if necessary.
\(fn DIRECTORY &optional BIN)" t nil)
(autoload 'cargo-process-run "cargo-process" "\
Run the Cargo run command.
With the prefix argument, modify the command's invocation.
Cargo: Build and execute src/main.rs.
\(fn)" t nil)
(autoload 'cargo-process-run-bin "cargo-process" "\
Run the Cargo run command --bin <name>.
With the prefix argument, modify the command's invocation.
Cargo: Build and execute a specific binary
\(fn COMMAND)" t nil)
(autoload 'cargo-process-run-example "cargo-process" "\
Run the Cargo run command --example <name>.
With the prefix argument, modify the command's invocation.
Cargo: Build and execute with --example <name>.
\(fn COMMAND)" t nil)
(autoload 'cargo-process-search "cargo-process" "\
Run the Cargo search command.
With the prefix argument, modify the command's invocation.
SEARCH-TERM is used as the search term for the Cargo registry.
Cargo: Search registry for crates.
\(fn SEARCH-TERM)" t nil)
(autoload 'cargo-process-test "cargo-process" "\
Run the Cargo test command.
With the prefix argument, modify the command's invocation.
Cargo: Run the tests.
\(fn)" t nil)
(autoload 'cargo-process-current-test "cargo-process" "\
Run the Cargo test command for the current test.
With the prefix argument, modify the command's invocation.
Cargo: Run the tests.
\(fn)" t nil)
(autoload 'cargo-process-current-file-tests "cargo-process" "\
Run the Cargo test command for the current file.
With the prefix argument, modify the command's invocation.
Cargo: Run the tests.
\(fn)" t nil)
(autoload 'cargo-process-update "cargo-process" "\
Run the Cargo update command.
With the prefix argument, modify the command's invocation.
Cargo: Update dependencies listed in Cargo.lock.
\(fn)" t nil)
(autoload 'cargo-process-fmt "cargo-process" "\
Run the Cargo fmt command.
With the prefix argument, modify the command's invocation.
Requires Cargo Fmt to be installed.
\(fn)" t nil)
(autoload 'cargo-process-outdated "cargo-process" "\
Run the Cargo outdated command.
With the prefix argument, modify the command's invocation.
Requires Cargo Outdated to be installed.
\(fn)" t nil)
(autoload 'cargo-process-check "cargo-process" "\
Run the Cargo check command.
With the prefix argument, modify the command's invocation.
Cargo: Check compile the current project.
Requires cargo-check to be installed.
\(fn)" t nil)
(autoload 'cargo-process-clippy "cargo-process" "\
Run the Cargo clippy command.
With the prefix argument, modify the command's invocation.
Cargo: Clippy compile the current project.
Requires Cargo clippy to be installed.
\(fn)" t nil)
(autoload 'cargo-process-add "cargo-process" "\
Run the Cargo add command.
With the prefix argument, modify the command's invocation.
CRATES is the name of the crate to add.
Cargo: This command allows you to add a dependency to a Cargo.toml manifest file.
\(fn CRATE)" t nil)
(autoload 'cargo-process-audit "cargo-process" "\
Run the Cargo audit command.
With the prefix argument, modify the command's invocation.
Cargo: Audit checks the current project's Cargo.lock for security vulnerabilities.
Requires Cargo Audit to be installed.
\(fn)" t nil)
(autoload 'cargo-process-rm "cargo-process" "\
Run the Cargo rm command.
With the prefix argument, modify the command's invocation.
CRATE is the name of the crate to remove.
Cargo: Remove a dependency from a Cargo.toml manifest file.
\(fn CRATE)" t nil)
(autoload 'cargo-process-upgrade "cargo-process" "\
Run the Cargo update command.
With the prefix argument, modify the command's invocation.
If ALL is t then update all crates, otherwise specify CRATES.
Cargo: Upgrade dependencies as specified in the local manifest file
\(fn &optional ALL CRATES)" t nil)
(autoload 'cargo-process-repeat "cargo-process" "\
Run the last cargo-process command.
\(fn)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "cargo-process" '("cargo-process-" "manifest-path-argument" "set-rust-backtrace" "rustc-errno")))
;;;***
;;;### (autoloads nil nil ("cargo-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; cargo-autoloads.el ends here

View File

@@ -1,13 +0,0 @@
(define-package "cargo" "20191121.1116" "Emacs Minor Mode for Cargo, Rust's Package Manager."
'((emacs "24.3")
(rust-mode "0.2.0")
(markdown-mode "2.4"))
:keywords
'("tools")
:authors
'(("Kevin W. van Rooijen" . "kevin.van.rooijen@attichacker.com"))
:maintainer
'("Kevin W. van Rooijen" . "kevin.van.rooijen@attichacker.com"))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@@ -1,692 +0,0 @@
;;; cargo-process.el --- Cargo Process Major Mode -*-lexical-binding: t-*-
;; Copyright (C) 2015 Kevin W. van Rooijen
;; Author: Kevin W. van Rooijen <kevin.van.rooijen@attichacker.com>
;; Keywords: processes, tools
;; This program 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.
;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Cargo Process Major mode.
;; Used to run Cargo background processes.
;; Current supported Cargo functions:
;; * cargo-process-bench - Run the benchmarks.
;; * cargo-process-build - Compile the current project.
;; * cargo-process-clean - Remove the target directory.
;; * cargo-process-doc - Build this project's and its dependencies' documentation.
;; * cargo-process-doc-open - Open this project's documentation.
;; * cargo-process-new - Create a new cargo project.
;; * cargo-process-init - Create a new cargo project inside an existing directory.
;; * cargo-process-run - Build and execute src/main.rs.
;; * cargo-process-run-example - Build and execute with --example <name>.
;; * cargo-process-run-bin - Build and execute a specific binary.
;; * cargo-process-search - Search registry for crates.
;; * cargo-process-test - Run all unit tests.
;; * cargo-process-update - Update dependencies listed in Cargo.lock.
;; * cargo-process-repeat - Run the last cargo-process command.
;; * cargo-process-current-test - Run the current unit test.
;; * cargo-process-current-file-tests - Run the current file unit tests.
;; * cargo-process-fmt - Run the optional cargo command fmt.
;; * cargo-process-check - Run the optional cargo command check.
;; * cargo-process-clippy - Run the optional cargo command clippy.
;; * cargo-process-add - Run the optional cargo command add.
;; * cargo-process-rm - Run the optional cargo command rm.
;; * cargo-process-upgrade - Run the optional cargo command upgrade.
;; * cargo-process-outdated - Run the optional cargo command outdated.
;; * cargo-process-audit - Run the optional cargo command audit.
;;
;;; Code:
(require 'compile)
(require 'button)
(require 'rust-mode)
(require 'markdown-mode)
(defgroup cargo-process nil
"Cargo Process group."
:prefix "cargo-process-"
:group 'cargo)
(defcustom cargo-process--custom-path-to-bin
(or (executable-find "cargo")
(expand-file-name "cargo" "~/.cargo/bin")
"/usr/local/bin/cargo")
"Custom path to the cargo executable"
:type 'file
:group 'cargo-process)
(defcustom cargo-process--rustc-cmd
(or (executable-find "rustc")
(expand-file-name "rustc" "~/.cargo/bin")
"/usr/local/bin/rustc")
"Custom path to the rustc executable"
:type 'file
:group 'cargo-process)
(defcustom cargo-process--enable-rust-backtrace nil
"Set RUST_BACKTRACE environment variable to 1 for tasks test and run"
:type 'boolean
:group 'cargo-process)
(defcustom cargo-process--command-flags ""
"Flags to be added to every cargo command when run."
:group 'cargo-process)
(defvar cargo-process-mode-map
(nconc (make-sparse-keymap) compilation-mode-map)
"Keymap for Cargo major mode.")
(defvar cargo-process--no-manifest-commands
'("New" "Init" "Search" "Fmt" "Audit")
"These commands should not specify a manifest file.")
(defvar cargo-process-last-command nil "Command used last for repeating.")
(make-variable-buffer-local 'cargo-process-last-command)
(defcustom cargo-process--command-bench "bench"
"Subcommand used by `cargo-process-bench'.")
(defcustom cargo-process--command-build "build"
"Subcommand used by `cargo-process-build'.")
(defcustom cargo-process--command-clean "clean"
"Subcommand used by `cargo-process-clean'.")
(defcustom cargo-process--command-doc "doc"
"Subcommand used by `cargo-process-doc'.")
(defcustom cargo-process--command-doc-open "doc --open"
"Subcommand used by `cargo-process-doc'.")
(defcustom cargo-process--command-new "new"
"Subcommand used by `cargo-process-new'.")
(defcustom cargo-process--command-init "init"
"Subcommand used by `cargo-process-init'.")
(defcustom cargo-process--command-run "run"
"Subcommand used by `cargo-process-run'.")
(defcustom cargo-process--command-run-bin "run --bin"
"Subcommand used by `cargo-process-run-bin'.")
(defcustom cargo-process--command-run-example "run --example"
"Subcommand used by `cargo-process-run-example'.")
(defcustom cargo-process--command-search "search"
"Subcommand used by `cargo-process-search'.")
(defcustom cargo-process--command-test "test"
"Subcommand used by `cargo-process-test'.")
(defcustom cargo-process--command-current-test "test"
"Subcommand used by `cargo-process-current-test'.")
(defcustom cargo-process--command-current-file-tests "test"
"Subcommand used by `cargo-process-current-file-tests'.")
(defcustom cargo-process--command-update "update"
"Subcommand used by `cargo-process-update'.")
(defcustom cargo-process--command-fmt "fmt"
"Subcommand used by `cargo-process-fmt'.")
(defcustom cargo-process--command-outdated "outdated -R"
"Subcommand used by `cargo-process-outdated'.")
(defcustom cargo-process--command-check "check"
"Subcommand used by `cargo-process-check'.")
(defcustom cargo-process--command-clippy "clippy"
"Subcommand used by `cargo-process-clippy'.")
(defcustom cargo-process--command-add "add"
"Subcommand used by `cargo-process-add'.")
(defcustom cargo-process--command-rm "rm"
"Subcommand used by `cargo-process-rm'.")
(defcustom cargo-process--command-upgrade "upgrade"
"Subcommand used by `cargo-process-upgrade'.")
(defcustom cargo-process--command-audit "audit -f"
"Subcommand used by `cargo-process-audit'.")
(defvar cargo-process-favorite-crates nil)
(defface cargo-process--ok-face
'((t (:inherit success)))
"Ok face"
:group 'cargo-process)
(defface cargo-process--error-face
'((t (:inherit error)))
"Error face"
:group 'cargo-process)
(defface cargo-process--warning-face
'((t (:inherit warning)))
"Warning face"
:group 'cargo-process)
(defface cargo-process--pointer-face
'((t (:inherit font-lock-negation-char-face)))
"Pointer face"
:group 'cargo-process)
(defface cargo-process--standard-face
'((t (:inherit font-lock-comment-face)))
"Standard face"
:group 'cargo-process)
(defface cargo-process--errno-face
'((t (:inherit link)))
"Error number face"
:group 'cargo-process)
(defconst cargo-process--rust-backtrace "RUST_BACKTRACE")
(defconst cargo-process-test-regexp "^[[:space:]]*fn[[:space:]]*"
"Regex to find Rust unit test function.")
(defconst cargo-process-test-mod-regexp "^[[:space:]]*mod[[:space:]]+[[:word:][:multibyte:]_][[:word:][:multibyte:]_[:digit:]]*[[:space:]]*{")
(defconst cargo-process-font-lock-keywords
'(("^error\\:?" . 'cargo-process--error-face)
("^warning\\:?" . 'cargo-process--warning-face)
("^\s*\\^\\~*\s*$" . 'cargo-process--pointer-face)
("^\s*Compiling.*" . 'cargo-process--standard-face)
("^\s*Running.*" . 'cargo-process--standard-face)
("^\s*Updating.*" . 'cargo-process--standard-face)
("test result: FAILED." . 'cargo-process--error-face)
("test result: ok." . 'cargo-process--ok-face)
("test\s.*\sFAILED" . 'cargo-process--error-face)
("test\s.*\sok" . 'cargo-process--ok-face))
"Minimal highlighting expressions for cargo-process mode.")
;; Bind `case-fold-search' to nil before using the regex.
(defconst cargo-process--errno-regex "\\bE[0-9]\\{4\\}\\b"
"A regular expression to match Rust error number.")
(define-button-type 'rustc-errno
'follow-link t
'face 'cargo-process--errno-face
'action #'cargo-process--explain-action)
(defun cargo-process--defun-at-point-p ()
(string-match cargo-process-test-regexp
(buffer-substring-no-properties (line-beginning-position)
(line-end-position))))
(defun cargo-process--project-root (&optional extra)
"Find the root of the current Cargo project."
(let ((root (locate-dominating-file (or buffer-file-name default-directory) "Cargo.toml")))
(when root
(file-truename (concat root extra)))))
(define-derived-mode cargo-process-mode compilation-mode "Cargo-Process."
"Major mode for the Cargo process buffer."
(use-local-map cargo-process-mode-map)
(setq major-mode 'cargo-process-mode)
(setq mode-name "Cargo-Process")
(setq-local truncate-lines t)
(run-hooks 'cargo-process-mode-hook)
(add-hook 'compilation-filter-hook #'cargo-process--add-errno-buttons)
(font-lock-add-keywords nil cargo-process-font-lock-keywords))
(defun cargo-process--finished-sentinel (process event)
"Execute after PROCESS return and EVENT is 'finished'."
(compilation-sentinel process event)
(when (equal event "finished\n")
(message "Cargo Process finished.")))
(defun cargo-process--activate-mode (buffer)
"Execute commands BUFFER at process start."
(with-current-buffer buffer
(funcall 'cargo-process-mode)
(setq-local window-point-insertion-type t)))
(defun set-rust-backtrace (command)
"Set RUST_BACKTRACE variable depending on the COMMAND used.
Always set to nil if cargo-process--enable-rust-backtrace is nil"
(if (and cargo-process--enable-rust-backtrace
(string-match "\\(test\\|run\\)" command))
(setenv cargo-process--rust-backtrace "1")
(setenv cargo-process--rust-backtrace nil)))
(defun cargo-process--workspace-root ()
"Find the workspace root using `cargo metadata`."
(when (cargo-process--project-root)
(let* ((metadata-text (shell-command-to-string
(concat (shell-quote-argument cargo-process--custom-path-to-bin)
" metadata --format-version 1 --no-deps")))
(metadata-json (json-read-from-string metadata-text))
(workspace-root (cdr (assoc 'workspace_root metadata-json))))
workspace-root)))
(defun manifest-path-argument (name)
(let ((manifest-filename (cargo-process--project-root "Cargo.toml")))
(when (and manifest-filename
(not (member name cargo-process--no-manifest-commands)))
(concat "--manifest-path " (shell-quote-argument manifest-filename)))))
(defun cargo-process--start (name command &optional last-cmd opens-external)
"Start the Cargo process NAME with the cargo command COMMAND.
OPENS-EXTERNAL is non-nil if the COMMAND is expected to open an external application.
Returns the created process."
(set-rust-backtrace command)
(let* ((buffer (concat "*Cargo " name "*"))
(project-root (cargo-process--project-root))
(cmd
(or last-cmd
(cargo-process--maybe-read-command
(cargo-process--augment-cmd-for-os opens-external
(mapconcat #'identity (list (shell-quote-argument cargo-process--custom-path-to-bin)
command
(manifest-path-argument name)
cargo-process--command-flags)
" ")))))
(default-directory (or project-root default-directory)))
(save-some-buffers (not compilation-ask-about-save)
(lambda ()
(and project-root
buffer-file-name
(string-prefix-p project-root (file-truename buffer-file-name)))))
(setq cargo-process-last-command (list name command cmd))
(let ((default-directory (or (cargo-process--workspace-root)
default-directory)))
(compilation-start cmd 'cargo-process-mode (lambda(_) buffer)))
(let ((process (get-buffer-process buffer)))
(set-process-sentinel process 'cargo-process--finished-sentinel)
process)))
(defun cargo-process--explain-action (button)
"Action called when the user activates Rust errno BUTTON."
(cargo-process--explain-help (button-label button)))
(defun cargo-process--explain-help (errno)
"Display a detailed explaination of ERRNO in a markdown buffer."
(pop-to-buffer
(let ((current-window (selected-window))
(inhibit-message t))
(with-current-buffer (get-buffer-create "*rust errno*")
(let ((buffer-read-only nil))
(erase-buffer)
(insert (shell-command-to-string
(concat cargo-process--rustc-cmd " --explain=" errno))))
(markdown-view-mode)
(setq-local markdown-fontify-code-blocks-natively t)
(setq-local markdown-fontify-code-block-default-mode 'rust-mode)
(setq-local kill-buffer-hook (lambda ()
(when (window-live-p current-window)
(select-window current-window))))
(setq
header-line-format
(concat (propertize " " 'display
`(space :align-to (- right-fringe ,(1+ (length errno)))))
(propertize errno 'face 'error)))
(markdown-toggle-markup-hiding 1)
(goto-char 1)
(current-buffer)))))
(defun cargo-process--add-errno-buttons ()
"Turn error numbers into clickable links in Cargo process output.
Meant to be run as a `compilation-filter-hook'."
(save-excursion
(let ((start compilation-filter-start)
(end (point))
(case-fold-search nil))
(goto-char start)
(while (re-search-forward cargo-process--errno-regex end t)
(make-button (match-beginning 0)
(match-end 0)
:type 'rustc-errno)))))
(defun cargo-process--get-current-test ()
"Return the current test."
(save-excursion
(unless (cargo-process--defun-at-point-p)
(rust-beginning-of-defun))
(beginning-of-line)
(search-forward "fn ")
(let* ((line (buffer-substring-no-properties (point)
(line-end-position)))
(lines (split-string line "("))
(function-name (car lines)))
function-name)))
(defun cargo-process--get-current-mod ()
"Return the current mod."
(save-excursion
(when (search-backward-regexp cargo-process-test-mod-regexp nil t)
(let* ((line (buffer-substring-no-properties (line-beginning-position)
(line-end-position)))
(line (string-trim-left line))
(lines (split-string line " \\|{"))
(mod (cadr lines)))
mod))))
(defun cargo-process--get-current-test-fullname ()
(if (cargo-process--get-current-mod)
(concat (cargo-process--get-current-mod)
"::"
(cargo-process--get-current-test))
(cargo-process--get-current-test)))
(defun cargo-process--maybe-read-command (default)
"Prompt to modify the DEFAULT command when the prefix argument is present.
Without the prefix argument, return DEFAULT immediately."
(if current-prefix-arg
(read-shell-command "Cargo command: " default)
default))
(defun cargo-process--get-dependencies (&optional manifest)
"Extract the list of dependencies from the
MANIFEST (i.e. Cargo.toml)."
(with-current-buffer (find-file-noselect (or manifest
(cargo-process--project-root "Cargo.toml")))
(save-excursion
(let ((deps-list))
(widen)
(goto-char (point-min))
(search-forward "[dependencies]" nil t)
(while (re-search-forward "^[a-zA-Z\-\_]* *=" nil t)
(beginning-of-line)
(setq deps-list
(cons (thing-at-point 'sexp t) deps-list))
(end-of-line))
deps-list))))
(defun cargo-process--augment-cmd-for-os (opens-external cmd)
"Augment the cargo CMD according to OS. OPENS-EXTERNAL is non-nil
if the CMD is expected to open and external application."
(if (and opens-external
(not (member system-type '(windows-nt ms-dos)))
(executable-find "setsid"))
(concat "setsid -w " cmd)
cmd))
;;;###autoload
(defun cargo-process-bench ()
"Run the Cargo bench command.
With the prefix argument, modify the command's invocation.
Cargo: Run the benchmarks."
(interactive)
(cargo-process--start "Bench" cargo-process--command-bench))
;;;###autoload
(defun cargo-process-build ()
"Run the Cargo build command.
With the prefix argument, modify the command's invocation.
Cargo: Compile the current project."
(interactive)
(cargo-process--start "Build" cargo-process--command-build))
;;;###autoload
(defun cargo-process-clean ()
"Run the Cargo clean command.
With the prefix argument, modify the command's invocation.
Cargo: Remove the target directory."
(interactive)
(cargo-process--start "Clean" cargo-process--command-clean))
;;;###autoload
(defun cargo-process-doc ()
"Run the Cargo doc command.
With the prefix argument, modify the command's invocation.
Cargo: Build this project's and its dependencies' documentation."
(interactive)
(cargo-process--start "Doc" cargo-process--command-doc))
;;;###autoload
(defun cargo-process-doc-open ()
"Run the Cargo doc command with the --open switch.
With the prefix argument, modify the command's invocation.
Cargo: Open this project's documentation."
(interactive)
(cargo-process--start "Doc" cargo-process--command-doc-open nil t))
;;;###autoload
(defun cargo-process-new (name &optional bin)
"Run the Cargo new command.
With the prefix argument, modify the command's invocation.
NAME is the name of your application.
If BIN is t then create a binary application, otherwise a library.
Cargo: Create a new cargo project."
(interactive "sProject name: ")
(let ((bin (if (or bin
(y-or-n-p "Create Bin Project? "))
" --bin"
" --lib")))
(cargo-process--start "New" (concat cargo-process--command-new
" "
name
bin))))
;;;###autoload
(defun cargo-process-init (directory &optional bin)
"Run the Cargo init command.
With the prefix argument, modify the command's invocation.
DIRECTORY is the directory you want to create a cargo project in.
If BIN is t then create a binary application, otherwise a library.
Cargo: Create a new cargo project in current directory.
DIRECTORY is created if necessary."
(interactive
(list (read-directory-name "Directory: " nil default-directory nil)))
(let* ((bin (if (or bin (y-or-n-p "Create Bin Project? "))
" --bin"
" --lib"))
(process
(cargo-process--start "Init" (concat cargo-process--command-init
" "
directory
bin))))
(set-process-sentinel
process
(lambda (process event)
(cargo-process--open-manifest process
event
(expand-file-name "Cargo.toml" directory))))))
(defun cargo-process--open-manifest (process event manifest-path)
"Open the manifest file when process ends."
(when (equal event "finished\n")
(find-file manifest-path)))
;;;###autoload
(defun cargo-process-run ()
"Run the Cargo run command.
With the prefix argument, modify the command's invocation.
Cargo: Build and execute src/main.rs."
(interactive)
(cargo-process--start "Run" cargo-process--command-run))
;;;###autoload
(defun cargo-process-run-bin (command)
"Run the Cargo run command --bin <name>.
With the prefix argument, modify the command's invocation.
Cargo: Build and execute a specific binary"
(interactive "sBinary name: ")
(cargo-process--start (concat "Run " command)
(concat cargo-process--command-run-bin " " command)))
;;;###autoload
(defun cargo-process-run-example (command)
"Run the Cargo run command --example <name>.
With the prefix argument, modify the command's invocation.
Cargo: Build and execute with --example <name>."
(interactive "sExample name: ")
(cargo-process--start (concat "Example " command)
(concat cargo-process--command-run-example " " command)))
;;;###autoload
(defun cargo-process-search (search-term)
"Run the Cargo search command.
With the prefix argument, modify the command's invocation.
SEARCH-TERM is used as the search term for the Cargo registry.
Cargo: Search registry for crates."
(interactive "sSearch: ")
(cargo-process--start "Search"
(concat cargo-process--command-search " " search-term)))
;;;###autoload
(defun cargo-process-test ()
"Run the Cargo test command.
With the prefix argument, modify the command's invocation.
Cargo: Run the tests."
(interactive)
(cargo-process--start "Test" cargo-process--command-test))
;;;###autoload
(defun cargo-process-current-test ()
"Run the Cargo test command for the current test.
With the prefix argument, modify the command's invocation.
Cargo: Run the tests."
(interactive)
(cargo-process--start "Test"
(concat cargo-process--command-current-test
" "
(cargo-process--get-current-test-fullname))))
;;;###autoload
(defun cargo-process-current-file-tests ()
"Run the Cargo test command for the current file.
With the prefix argument, modify the command's invocation.
Cargo: Run the tests."
(interactive)
(cargo-process--start "Test" (concat cargo-process--command-current-file-tests
" "
(cargo-process--get-current-mod))))
;;;###autoload
(defun cargo-process-update ()
"Run the Cargo update command.
With the prefix argument, modify the command's invocation.
Cargo: Update dependencies listed in Cargo.lock."
(interactive)
(cargo-process--start "Update" cargo-process--command-update))
;;;###autoload
(defun cargo-process-fmt ()
"Run the Cargo fmt command.
With the prefix argument, modify the command's invocation.
Requires Cargo Fmt to be installed."
(interactive)
(cargo-process--start "Fmt" cargo-process--command-fmt))
;;;###autoload
(defun cargo-process-outdated ()
"Run the Cargo outdated command.
With the prefix argument, modify the command's invocation.
Requires Cargo Outdated to be installed."
(interactive)
(cargo-process--start "Outdated" cargo-process--command-outdated))
;;;###autoload
(defun cargo-process-check ()
"Run the Cargo check command.
With the prefix argument, modify the command's invocation.
Cargo: Check compile the current project.
Requires cargo-check to be installed."
(interactive)
(cargo-process--start "Check" cargo-process--command-check))
;;;###autoload
(defun cargo-process-clippy ()
"Run the Cargo clippy command.
With the prefix argument, modify the command's invocation.
Cargo: Clippy compile the current project.
Requires Cargo clippy to be installed."
(interactive)
(cargo-process--start "Clippy" cargo-process--command-clippy))
;;;###autoload
(defun cargo-process-add (crate)
"Run the Cargo add command.
With the prefix argument, modify the command's invocation.
CRATES is the name of the crate to add.
Cargo: This command allows you to add a dependency to a Cargo.toml manifest file."
(interactive (list
(completing-read "Crate(s) to add: " cargo-process-favorite-crates)))
(cargo-process--start "Add" (concat cargo-process--command-add
" "
crate)))
;;;###autoload
(defun cargo-process-audit ()
"Run the Cargo audit command.
With the prefix argument, modify the command's invocation.
Cargo: Audit checks the current project's Cargo.lock for security vulnerabilities.
Requires Cargo Audit to be installed."
(interactive)
(cargo-process--start "Audit" (concat cargo-process--command-audit
" "
(cargo-process--project-root "Cargo.lock"))))
;;;###autoload
(defun cargo-process-rm (crate)
"Run the Cargo rm command.
With the prefix argument, modify the command's invocation.
CRATE is the name of the crate to remove.
Cargo: Remove a dependency from a Cargo.toml manifest file."
(interactive
(list
(let ((deplist (cargo-process--get-dependencies)))
(when deplist
(completing-read "Crate to remove: "
deplist nil t)))))
(if crate (cargo-process--start "Remove" (concat cargo-process--command-rm
" "
crate))
(message "No crates used in current project.")))
;;;###autoload
(defun cargo-process-upgrade (&optional all crates)
"Run the Cargo update command.
With the prefix argument, modify the command's invocation.
If ALL is t then update all crates, otherwise specify CRATES.
Cargo: Upgrade dependencies as specified in the local manifest file"
(interactive)
(let ((deplist (cargo-process--get-dependencies)))
(if deplist
(let* ((all (when (or all
(y-or-n-p "Upgrade all crates? "))
"--all"))
(crates (when (not all)
(completing-read "Crate(s) to upgrade: " deplist nil 'confirm))))
(cargo-process--start "Upgrade" (concat cargo-process--command-upgrade
" "
all
" "
crates)))
(message "No crates used in current project."))))
;;;###autoload
(defun cargo-process-repeat ()
"Run the last cargo-process command."
(interactive)
(if cargo-process-last-command
(apply 'cargo-process--start cargo-process-last-command)
(message "No last Cargo command.")))
(define-key cargo-process-mode-map (kbd "n") 'forward-button)
(define-key cargo-process-mode-map (kbd "p") 'backward-button)
(provide 'cargo-process)
;;; cargo-process.el ends here

View File

@@ -1,97 +0,0 @@
;;; cargo.el --- Emacs Minor Mode for Cargo, Rust's Package Manager.
;; Copyright (C) 2015 Kevin W. van Rooijen
;; Author: Kevin W. van Rooijen <kevin.van.rooijen@attichacker.com>
;; Version : 0.4.0
;; Keywords: tools
;; Package-Requires: ((emacs "24.3") (rust-mode "0.2.0") (markdown-mode "2.4"))
;; This program 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.
;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Cargo Minor mode.
;; Provides a number of key combinations and functions for managing Cargo.
;; Current supported Cargo Key Combinations:
;; * C-c C-c C-e - cargo-process-bench
;; * C-c C-c C-b - cargo-process-build
;; * C-c C-c C-l - cargo-process-clean
;; * C-c C-c C-d - cargo-process-doc
;; * C-c C-c C-v - cargo-process-doc-open
;; * C-c C-c C-n - cargo-process-new
;; * C-c C-c C-i - cargo-process-init
;; * C-c C-c C-r - cargo-process-run
;; * C-c C-c C-x - cargo-process-run-example
;; * C-c C-c C-s - cargo-process-search
;; * C-c C-c C-t - cargo-process-test
;; * C-c C-c C-u - cargo-process-update
;; * C-c C-c C-c - cargo-process-repeat
;; * C-c C-c C-f - cargo-process-current-test
;; * C-c C-c C-o - cargo-process-current-file-tests
;; * C-c C-c C-O - cargo-process-outdated
;; * C-c C-c C-m - cargo-process-fmt
;; * C-c C-c C-k - cargo-process-check
;; * C-c C-c C-K - cargo-process-clippy
;; * C-c C-c C-a - cargo-process-add
;; * C-c C-c C-D - cargo-process-rm
;; * C-c C-c C-U - cargo-process-upgrade
;; * C-c C-c C-A - cargo-process-audit
;;
;;; Code:
(require 'cargo-process)
(defgroup cargo nil
"Cargo group."
:prefix "cargo-"
:group 'tools)
(defvar cargo-minor-mode-map (make-keymap) "Cargo-mode keymap.")
(defvar cargo-minor-mode nil)
;;;###autoload
(define-minor-mode cargo-minor-mode
"Cargo minor mode. Used to hold keybindings for cargo-mode.
\\{cargo-minor-mode-map}"
nil " cargo" cargo-minor-mode-map)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-e") 'cargo-process-bench)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-b") 'cargo-process-build)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-l") 'cargo-process-clean)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-d") 'cargo-process-doc)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-v") 'cargo-process-doc-open)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-n") 'cargo-process-new)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-i") 'cargo-process-init)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-r") 'cargo-process-run)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-x") 'cargo-process-run-example)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-s") 'cargo-process-search)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-t") 'cargo-process-test)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-u") 'cargo-process-update)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-c") 'cargo-process-repeat)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-f") 'cargo-process-current-test)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-o") 'cargo-process-current-file-tests)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-S-o") 'cargo-process-outdated)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-m") 'cargo-process-fmt)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-k") 'cargo-process-check)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-S-k") 'cargo-process-clippy)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-a") 'cargo-process-add)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-S-d") 'cargo-process-rm)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-S-u") 'cargo-process-upgrade)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-S-a") 'cargo-process-audit)
(provide 'cargo)
;;; cargo.el ends here

Binary file not shown.

View File

@@ -1,50 +0,0 @@
;;; company-abbrev.el --- company-mode completion backend for abbrev
;; Copyright (C) 2009-2011, 2015 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'cl-lib)
(require 'abbrev)
(defun company-abbrev-insert (match)
"Replace MATCH with the expanded abbrev."
(expand-abbrev))
;;;###autoload
(defun company-abbrev (command &optional arg &rest ignored)
"`company-mode' completion backend for abbrev."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-abbrev
'company-abbrev-insert))
(prefix (company-grab-symbol))
(candidates (nconc
(delete "" (all-completions arg global-abbrev-table))
(delete "" (all-completions arg local-abbrev-table))))
(meta (abbrev-expansion arg))))
(provide 'company-abbrev)
;;; company-abbrev.el ends here

View File

@@ -1,383 +0,0 @@
;;; company-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "company" "company.el" (0 0 0 0))
;;; Generated autoloads from company.el
(autoload 'company-mode "company" "\
\"complete anything\"; is an in-buffer completion framework.
Completion starts automatically, depending on the values
`company-idle-delay' and `company-minimum-prefix-length'.
Completion can be controlled with the commands:
`company-complete-common', `company-complete-selection', `company-complete',
`company-select-next', `company-select-previous'. If these commands are
called before `company-idle-delay', completion will also start.
Completions can be searched with `company-search-candidates' or
`company-filter-candidates'. These can be used while completion is
inactive, as well.
The completion data is retrieved using `company-backends' and displayed
using `company-frontends'. If you want to start a specific backend, call
it interactively or use `company-begin-backend'.
By default, the completions list is sorted alphabetically, unless the
backend chooses otherwise, or `company-transformers' changes it later.
regular keymap (`company-mode-map'):
\\{company-mode-map}
keymap during active completions (`company-active-map'):
\\{company-active-map}
\(fn &optional ARG)" t nil)
(defvar global-company-mode nil "\
Non-nil if Global Company mode is enabled.
See the `global-company-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 `global-company-mode'.")
(custom-autoload 'global-company-mode "company" nil)
(autoload 'global-company-mode "company" "\
Toggle Company mode in all buffers.
With prefix ARG, enable Global Company mode if ARG is positive;
otherwise, disable it. If called from Lisp, enable the mode if
ARG is omitted or nil.
Company mode is enabled in all buffers where
`company-mode-on' would do it.
See `company-mode' for more information on Company mode.
\(fn &optional ARG)" t nil)
(autoload 'company-manual-begin "company" "\
\(fn)" t nil)
(autoload 'company-complete "company" "\
Insert the common part of all candidates or the current selection.
The first time this is called, the common part is inserted, the second
time, or when the selection has been changed, the selected candidate is
inserted.
\(fn)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company" '("company-")))
;;;***
;;;### (autoloads nil "company-abbrev" "company-abbrev.el" (0 0 0
;;;;;; 0))
;;; Generated autoloads from company-abbrev.el
(autoload 'company-abbrev "company-abbrev" "\
`company-mode' completion backend for abbrev.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-abbrev" '("company-abbrev-insert")))
;;;***
;;;### (autoloads nil "company-bbdb" "company-bbdb.el" (0 0 0 0))
;;; Generated autoloads from company-bbdb.el
(autoload 'company-bbdb "company-bbdb" "\
`company-mode' completion backend for BBDB.
\(fn COMMAND &optional ARG &rest IGNORE)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-bbdb" '("company-bbdb-")))
;;;***
;;;### (autoloads nil "company-capf" "company-capf.el" (0 0 0 0))
;;; Generated autoloads from company-capf.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-capf" '("company-")))
;;;***
;;;### (autoloads nil "company-clang" "company-clang.el" (0 0 0 0))
;;; Generated autoloads from company-clang.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-clang" '("company-clang")))
;;;***
;;;### (autoloads nil "company-cmake" "company-cmake.el" (0 0 0 0))
;;; Generated autoloads from company-cmake.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-cmake" '("company-cmake")))
;;;***
;;;### (autoloads nil "company-css" "company-css.el" (0 0 0 0))
;;; Generated autoloads from company-css.el
(autoload 'company-css "company-css" "\
`company-mode' completion backend for `css-mode'.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-css" '("company-css-")))
;;;***
;;;### (autoloads nil "company-dabbrev" "company-dabbrev.el" (0 0
;;;;;; 0 0))
;;; Generated autoloads from company-dabbrev.el
(autoload 'company-dabbrev "company-dabbrev" "\
dabbrev-like `company-mode' completion backend.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-dabbrev" '("company-dabbrev-")))
;;;***
;;;### (autoloads nil "company-dabbrev-code" "company-dabbrev-code.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from company-dabbrev-code.el
(autoload 'company-dabbrev-code "company-dabbrev-code" "\
dabbrev-like `company-mode' backend for code.
The backend looks for all symbols in the current buffer that aren't in
comments or strings.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-dabbrev-code" '("company-dabbrev-code-")))
;;;***
;;;### (autoloads nil "company-eclim" "company-eclim.el" (0 0 0 0))
;;; Generated autoloads from company-eclim.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-eclim" '("company-eclim")))
;;;***
;;;### (autoloads nil "company-elisp" "company-elisp.el" (0 0 0 0))
;;; Generated autoloads from company-elisp.el
(autoload 'company-elisp "company-elisp" "\
`company-mode' completion backend for Emacs Lisp.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-elisp" '("company-elisp-")))
;;;***
;;;### (autoloads nil "company-etags" "company-etags.el" (0 0 0 0))
;;; Generated autoloads from company-etags.el
(autoload 'company-etags "company-etags" "\
`company-mode' completion backend for etags.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-etags" '("company-etags-")))
;;;***
;;;### (autoloads nil "company-files" "company-files.el" (0 0 0 0))
;;; Generated autoloads from company-files.el
(autoload 'company-files "company-files" "\
`company-mode' completion backend existing file names.
Completions works for proper absolute and relative files paths.
File paths with spaces are only supported inside strings.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-files" '("company-file")))
;;;***
;;;### (autoloads nil "company-gtags" "company-gtags.el" (0 0 0 0))
;;; Generated autoloads from company-gtags.el
(autoload 'company-gtags "company-gtags" "\
`company-mode' completion backend for GNU Global.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-gtags" '("company-gtags-")))
;;;***
;;;### (autoloads nil "company-ispell" "company-ispell.el" (0 0 0
;;;;;; 0))
;;; Generated autoloads from company-ispell.el
(autoload 'company-ispell "company-ispell" "\
`company-mode' completion backend using Ispell.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-ispell" '("company-ispell-")))
;;;***
;;;### (autoloads nil "company-keywords" "company-keywords.el" (0
;;;;;; 0 0 0))
;;; Generated autoloads from company-keywords.el
(autoload 'company-keywords "company-keywords" "\
`company-mode' backend for programming language keywords.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-keywords" '("company-keywords-")))
;;;***
;;;### (autoloads nil "company-nxml" "company-nxml.el" (0 0 0 0))
;;; Generated autoloads from company-nxml.el
(autoload 'company-nxml "company-nxml" "\
`company-mode' completion backend for `nxml-mode'.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-nxml" '("company-nxml-")))
;;;***
;;;### (autoloads nil "company-oddmuse" "company-oddmuse.el" (0 0
;;;;;; 0 0))
;;; Generated autoloads from company-oddmuse.el
(autoload 'company-oddmuse "company-oddmuse" "\
`company-mode' completion backend for `oddmuse-mode'.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-oddmuse" '("company-oddmuse-")))
;;;***
;;;### (autoloads nil "company-semantic" "company-semantic.el" (0
;;;;;; 0 0 0))
;;; Generated autoloads from company-semantic.el
(autoload 'company-semantic "company-semantic" "\
`company-mode' completion backend using CEDET Semantic.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-semantic" '("company-semantic-")))
;;;***
;;;### (autoloads nil "company-template" "company-template.el" (0
;;;;;; 0 0 0))
;;; Generated autoloads from company-template.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-template" '("company-template-")))
;;;***
;;;### (autoloads nil "company-tempo" "company-tempo.el" (0 0 0 0))
;;; Generated autoloads from company-tempo.el
(autoload 'company-tempo "company-tempo" "\
`company-mode' completion backend for tempo.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-tempo" '("company-tempo-")))
;;;***
;;;### (autoloads nil "company-tng" "company-tng.el" (0 0 0 0))
;;; Generated autoloads from company-tng.el
(autoload 'company-tng-frontend "company-tng" "\
When the user changes the selection at least once, this
frontend will display the candidate in the buffer as if it's
already there and any key outside of `company-active-map' will
confirm the selection and finish the completion.
\(fn COMMAND)" nil nil)
(autoload 'company-tng-configure-default "company-tng" "\
Applies the default configuration to enable company-tng.
\(fn)" nil nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-tng" '("company-tng--")))
;;;***
;;;### (autoloads nil "company-xcode" "company-xcode.el" (0 0 0 0))
;;; Generated autoloads from company-xcode.el
(autoload 'company-xcode "company-xcode" "\
`company-mode' completion backend for Xcode projects.
\(fn COMMAND &optional ARG &rest IGNORED)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-xcode" '("company-xcode-")))
;;;***
;;;### (autoloads nil "company-yasnippet" "company-yasnippet.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from company-yasnippet.el
(autoload 'company-yasnippet "company-yasnippet" "\
`company-mode' backend for `yasnippet'.
This backend should be used with care, because as long as there are
snippets defined for the current major mode, this backend will always
shadow backends that come after it. Recommended usages:
* In a buffer-local value of `company-backends', grouped with a backend or
several that provide actual text completions.
(add-hook 'js-mode-hook
(lambda ()
(set (make-local-variable 'company-backends)
'((company-dabbrev-code company-yasnippet)))))
* After keyword `:with', grouped with other backends.
(push '(company-semantic :with company-yasnippet) company-backends)
* Not in `company-backends', just bound to a key.
(global-set-key (kbd \"C-c y\") 'company-yasnippet)
\(fn COMMAND &optional ARG &rest IGNORE)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "company-yasnippet" '("company-yasnippet--")))
;;;***
;;;### (autoloads nil nil ("company-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; company-autoloads.el ends here

View File

@@ -1,61 +0,0 @@
;;; company-bbdb.el --- company-mode completion backend for BBDB in message-mode
;; Copyright (C) 2013-2014, 2016 Free Software Foundation, Inc.
;; Author: Jan Tatarik <jan.tatarik@gmail.com>
;; 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 <http://www.gnu.org/licenses/>.
(require 'company)
(require 'cl-lib)
(declare-function bbdb-record-get-field "bbdb")
(declare-function bbdb-records "bbdb")
(declare-function bbdb-dwim-mail "bbdb-com")
(declare-function bbdb-search "bbdb-com")
(defgroup company-bbdb nil
"Completion backend for BBDB."
:group 'company)
(defcustom company-bbdb-modes '(message-mode)
"Major modes in which `company-bbdb' may complete."
:type '(repeat (symbol :tag "Major mode"))
:package-version '(company . "0.8.8"))
(defun company-bbdb--candidates (arg)
(cl-mapcan (lambda (record)
(mapcar (lambda (mail) (bbdb-dwim-mail record mail))
(bbdb-record-get-field record 'mail)))
(eval '(bbdb-search (bbdb-records) arg nil arg))))
;;;###autoload
(defun company-bbdb (command &optional arg &rest ignore)
"`company-mode' completion backend for BBDB."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-bbdb))
(prefix (and (memq major-mode company-bbdb-modes)
(featurep 'bbdb-com)
(looking-back "^\\(To\\|Cc\\|Bcc\\): *.*? *\\([^,;]*\\)"
(line-beginning-position))
(match-string-no-properties 2)))
(candidates (company-bbdb--candidates arg))
(sorted t)
(no-cache t)))
(provide 'company-bbdb)
;;; company-bbdb.el ends here

View File

@@ -1,206 +0,0 @@
;;; company-capf.el --- company-mode completion-at-point-functions backend -*- lexical-binding: t -*-
;; Copyright (C) 2013-2019 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; The CAPF back-end provides a bridge to the standard
;; completion-at-point-functions facility, and thus can support any major mode
;; that defines a proper completion function, including emacs-lisp-mode,
;; css-mode and nxml-mode.
;;; Code:
(require 'company)
(require 'cl-lib)
;; Amortizes several calls to a c-a-p-f from the same position.
(defvar company--capf-cache nil)
;; FIXME: Provide a way to save this info once in Company itself
;; (https://github.com/company-mode/company-mode/pull/845).
(defvar-local company-capf--current-completion-data nil
"Value last returned by `company-capf' when called with `candidates'.
For most properties/actions, this is just what we need: the exact values
that accompanied the completion table that's currently is use.
`company-capf', however, could be called at some different positions during
a completion session (most importantly, by `company-sort-by-occurrence'),
so we can't just use the preceding variable instead.")
(defun company--capf-data ()
(let ((cache company--capf-cache))
(if (and (equal (current-buffer) (car cache))
(equal (point) (car (setq cache (cdr cache))))
(equal (buffer-chars-modified-tick) (car (setq cache (cdr cache)))))
(cadr cache)
(let ((data (company--capf-data-real)))
(setq company--capf-cache
(list (current-buffer) (point) (buffer-chars-modified-tick) data))
data))))
(defun company--capf-data-real ()
(cl-letf* (((default-value 'completion-at-point-functions)
;; Ignore tags-completion-at-point-function because it subverts
;; company-etags in the default value of company-backends, where
;; the latter comes later.
(remove 'tags-completion-at-point-function
(default-value 'completion-at-point-functions)))
(completion-at-point-functions (company--capf-workaround))
(data (run-hook-wrapped 'completion-at-point-functions
;; Ignore misbehaving functions.
#'completion--capf-wrapper 'optimist)))
(when (and (consp (cdr data)) (integer-or-marker-p (nth 1 data))) data)))
(declare-function python-shell-get-process "python")
(defun company--capf-workaround ()
;; For http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18067
(if (or (not (listp completion-at-point-functions))
(not (memq 'python-completion-complete-at-point completion-at-point-functions))
(python-shell-get-process))
completion-at-point-functions
(remq 'python-completion-complete-at-point completion-at-point-functions)))
(defun company-capf--save-current-data (data)
(setq company-capf--current-completion-data data)
(add-hook 'company-after-completion-hook
#'company-capf--clear-current-data nil t))
(defun company-capf--clear-current-data (_ignored)
(setq company-capf--current-completion-data nil))
(defvar-local company-capf--sorted nil)
(defun company-capf (command &optional arg &rest _args)
"`company-mode' backend using `completion-at-point-functions'."
(interactive (list 'interactive))
(pcase command
(`interactive (company-begin-backend 'company-capf))
(`prefix
(let ((res (company--capf-data)))
(when res
(let ((length (plist-get (nthcdr 4 res) :company-prefix-length))
(prefix (buffer-substring-no-properties (nth 1 res) (point))))
(cond
((> (nth 2 res) (point)) 'stop)
(length (cons prefix length))
(t prefix))))))
(`candidates
(company-capf--candidates arg))
(`sorted
company-capf--sorted)
(`match
;; Ask the for the `:company-match' function. If that doesn't help,
;; fallback to sniffing for face changes to get a suitable value.
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
:company-match)))
(if f (funcall f arg)
(let* ((match-start nil) (pos -1)
(prop-value nil) (faces nil)
(has-face-p nil) chunks
(limit (length arg)))
(while (< pos limit)
(setq pos
(if (< pos 0) 0 (next-property-change pos arg limit)))
(setq prop-value (or
(get-text-property pos 'face arg)
(get-text-property pos 'font-lock-face arg))
faces (if (listp prop-value) prop-value (list prop-value))
has-face-p (memq 'completions-common-part faces))
(cond ((and (not match-start) has-face-p)
(setq match-start pos))
((and match-start (not has-face-p))
(push (cons match-start pos) chunks)
(setq match-start nil))))
(nreverse chunks)))))
(`duplicates t)
(`no-cache t) ;Not much can be done here, as long as we handle
;non-prefix matches.
(`meta
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
:company-docsig)))
(when f (funcall f arg))))
(`doc-buffer
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
:company-doc-buffer)))
(when f (funcall f arg))))
(`location
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
:company-location)))
(when f (funcall f arg))))
(`annotation
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
:annotation-function)))
(when f (funcall f arg))))
(`require-match
(plist-get (nthcdr 4 (company--capf-data)) :company-require-match))
(`init nil) ;Don't bother: plenty of other ways to initialize the code.
(`post-completion
(company--capf-post-completion arg))
))
(defun company-capf--candidates (input)
(let ((res (company--capf-data)))
(company-capf--save-current-data res)
(when res
(let* ((table (nth 3 res))
(pred (plist-get (nthcdr 4 res) :predicate))
(meta (completion-metadata
(buffer-substring (nth 1 res) (nth 2 res))
table pred))
(candidates (completion-all-completions input table pred
(length input)
meta))
(sortfun (cdr (assq 'display-sort-function meta)))
(last (last candidates))
(base-size (and (numberp (cdr last)) (cdr last))))
(when base-size
(setcdr last nil))
(setq company-capf--sorted (functionp sortfun))
(when sortfun
(setq candidates (funcall sortfun candidates)))
(if (not (zerop (or base-size 0)))
(let ((before (substring input 0 base-size)))
(mapcar (lambda (candidate)
(concat before candidate))
candidates))
candidates)))))
(defun company--capf-post-completion (arg)
(let* ((res company-capf--current-completion-data)
(exit-function (plist-get (nthcdr 4 res) :exit-function))
(table (nth 3 res))
(pred (plist-get (nthcdr 4 res) :predicate)))
(if exit-function
;; Follow the example of `completion--done'.
(funcall exit-function arg
;; FIXME: Should probably use an additional heuristic:
;; completion-at-point doesn't know when the user picked a
;; particular candidate explicitly (it only checks whether
;; further completions exist). Whereas company user can press
;; RET (or use implicit completion with company-tng).
(if (eq (try-completion arg table pred) t)
'finished 'sole)))))
(provide 'company-capf)
;;; company-capf.el ends here

View File

@@ -1,351 +0,0 @@
;;; company-clang.el --- company-mode completion backend for Clang -*- lexical-binding: t -*-
;; Copyright (C) 2009, 2011, 2013-2019 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'company-template)
(require 'cl-lib)
(defgroup company-clang nil
"Completion backend for Clang."
:group 'company)
(defcustom company-clang-executable
(executable-find "clang")
"Location of clang executable."
:type 'file)
(defcustom company-clang-begin-after-member-access t
"When non-nil, automatic completion will start whenever the current
symbol is preceded by \".\", \"->\" or \"::\", ignoring
`company-minimum-prefix-length'.
If `company-begin-commands' is a list, it should include `c-electric-lt-gt'
and `c-electric-colon', for automatic completion right after \">\" and
\":\"."
:type 'boolean)
(defcustom company-clang-arguments nil
"Additional arguments to pass to clang when completing.
Prefix files (-include ...) can be selected with `company-clang-set-prefix'
or automatically through a custom `company-clang-prefix-guesser'."
:type '(repeat (string :tag "Argument")))
(defcustom company-clang-prefix-guesser 'company-clang-guess-prefix
"A function to determine the prefix file for the current buffer."
:type '(function :tag "Guesser function" nil))
(defvar company-clang-modes '(c-mode c++-mode objc-mode)
"Major modes which clang may complete.")
(defcustom company-clang-insert-arguments t
"When non-nil, insert function arguments as a template after completion."
:type 'boolean
:package-version '(company . "0.8.0"))
;; prefix ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar company-clang--prefix nil)
(defsubst company-clang--guess-pch-file (file)
(let ((dir (directory-file-name (file-name-directory file))))
(when (equal (file-name-nondirectory dir) "Classes")
(setq dir (file-name-directory dir)))
(car (directory-files dir t "\\([^.]h\\|[^h]\\).pch\\'" t))))
(defsubst company-clang--file-substring (file beg end)
(with-temp-buffer
(insert-file-contents-literally file nil beg end)
(buffer-string)))
(defun company-clang-guess-prefix ()
"Try to guess the prefix file for the current buffer."
;; Prefixes seem to be called .pch. Pre-compiled headers do, too.
;; So we look at the magic number to rule them out.
(let* ((file (company-clang--guess-pch-file buffer-file-name))
(magic-number (and file (company-clang--file-substring file 0 4))))
(unless (member magic-number '("CPCH" "gpch"))
file)))
(defun company-clang-set-prefix (&optional prefix)
"Use PREFIX as a prefix (-include ...) file for clang completion."
(interactive (let ((def (funcall company-clang-prefix-guesser)))
(unless (stringp def)
(setq def default-directory))
(list (read-file-name "Prefix file: "
(when def (file-name-directory def))
def t (when def (file-name-nondirectory def))))))
;; TODO: pre-compile?
(setq company-clang--prefix (and (stringp prefix)
(file-regular-p prefix)
prefix)))
;; Clean-up on exit.
(add-hook 'kill-emacs-hook 'company-clang-set-prefix)
;; parsing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; TODO: Handle Pattern (syntactic hints would be neat).
;; Do we ever see OVERLOAD (or OVERRIDE)?
(defconst company-clang--completion-pattern
"^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?:\\(?: (InBase)\\)? : \\(.*\\)$\\)?$")
(defconst company-clang--error-buffer-name "*clang-error*")
(defun company-clang--lang-option ()
(if (eq major-mode 'objc-mode)
(if (string= "m" (file-name-extension buffer-file-name))
"objective-c" "objective-c++")
(substring (symbol-name major-mode) 0 -5)))
(defun company-clang--parse-output (prefix _objc)
(goto-char (point-min))
(let ((pattern (format company-clang--completion-pattern
(regexp-quote prefix)))
(case-fold-search nil)
lines match)
(while (re-search-forward pattern nil t)
(setq match (match-string-no-properties 1))
(unless (equal match "Pattern")
(save-match-data
(when (string-match ":" match)
(setq match (substring match 0 (match-beginning 0)))))
(let ((meta (match-string-no-properties 2)))
(when (and meta (not (string= match meta)))
(put-text-property 0 1 'meta
(company-clang--strip-formatting meta)
match)))
(push match lines)))
lines))
(defun company-clang--meta (candidate)
(get-text-property 0 'meta candidate))
(defun company-clang--annotation (candidate)
(let ((ann (company-clang--annotation-1 candidate)))
(if (not (and ann (string-prefix-p "(*)" ann)))
ann
(with-temp-buffer
(insert ann)
(search-backward ")")
(let ((pt (1+ (point))))
(re-search-forward ".\\_>" nil t)
(delete-region pt (point)))
(buffer-string)))))
(defun company-clang--annotation-1 (candidate)
(let ((meta (company-clang--meta candidate)))
(cond
((null meta) nil)
((string-match "[^:]:[^:]" meta)
(substring meta (1+ (match-beginning 0))))
((string-match "(anonymous)" meta) nil)
((string-match "\\((.*)[ a-z]*\\'\\)" meta)
(let ((paren (match-beginning 1)))
(if (not (eq (aref meta (1- paren)) ?>))
(match-string 1 meta)
(with-temp-buffer
(insert meta)
(goto-char paren)
(substring meta (1- (search-backward "<"))))))))))
(defun company-clang--strip-formatting (text)
(replace-regexp-in-string
"#]" " "
(replace-regexp-in-string "[<{[]#\\|#[>}]" "" text t)
t))
(defun company-clang--handle-error (res args)
(goto-char (point-min))
(let* ((buf (get-buffer-create company-clang--error-buffer-name))
(cmd (concat company-clang-executable " " (mapconcat 'identity args " ")))
(pattern (format company-clang--completion-pattern ""))
(message-truncate-lines t)
(err (if (re-search-forward pattern nil t)
(buffer-substring-no-properties (point-min)
(1- (match-beginning 0)))
;; Warn the user more aggressively if no match was found.
(message "clang failed with error %d: %s" res cmd)
(buffer-string))))
(with-current-buffer buf
(let ((inhibit-read-only t))
(erase-buffer)
(insert (current-time-string)
(format "\nclang failed with error %d:\n" res)
cmd "\n\n")
(insert err)
(setq buffer-read-only t)
(goto-char (point-min))))))
(defun company-clang--start-process (prefix callback &rest args)
(let* ((objc (derived-mode-p 'objc-mode))
(buf (get-buffer-create "*clang-output*"))
;; Looks unnecessary in Emacs 25.1 and later.
(process-adaptive-read-buffering nil)
(existing-process (get-buffer-process buf)))
(when existing-process
(kill-process existing-process))
(with-current-buffer buf
(erase-buffer)
(setq buffer-undo-list t))
(let* ((process-connection-type nil)
(process (apply #'start-file-process "company-clang" buf
company-clang-executable args)))
(set-process-sentinel
process
(lambda (proc status)
(unless (string-match-p "hangup\\|killed" status)
(funcall
callback
(let ((res (process-exit-status proc)))
(with-current-buffer buf
(unless (eq 0 res)
(company-clang--handle-error res args))
;; Still try to get any useful input.
(company-clang--parse-output prefix objc)))))))
(unless (company-clang--auto-save-p)
(send-region process (point-min) (point-max))
(send-string process "\n")
(process-send-eof process)))))
(defsubst company-clang--build-location (pos)
(save-excursion
(goto-char pos)
(format "%s:%d:%d"
(if (company-clang--auto-save-p) buffer-file-name "-")
(line-number-at-pos)
(1+ (length
(encode-coding-region
(line-beginning-position)
(point)
'utf-8
t))))))
(defsubst company-clang--build-complete-args (pos)
(append '("-fsyntax-only" "-Xclang" "-code-completion-macros")
(unless (company-clang--auto-save-p)
(list "-x" (company-clang--lang-option)))
company-clang-arguments
(when (stringp company-clang--prefix)
(list "-include" (expand-file-name company-clang--prefix)))
(list "-Xclang" (format "-code-completion-at=%s"
(company-clang--build-location pos)))
(list (if (company-clang--auto-save-p) buffer-file-name "-"))))
(defun company-clang--candidates (prefix callback)
(and (company-clang--auto-save-p)
(buffer-modified-p)
(basic-save-buffer))
(when (null company-clang--prefix)
(company-clang-set-prefix (or (funcall company-clang-prefix-guesser)
'none)))
(apply 'company-clang--start-process
prefix
callback
(company-clang--build-complete-args
(if (company-clang--check-version 4.0 9.0)
(point)
(- (point) (length prefix))))))
(defun company-clang--prefix ()
(if company-clang-begin-after-member-access
(company-grab-symbol-cons "\\.\\|->\\|::" 2)
(company-grab-symbol)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst company-clang-required-version 1.1)
(defvar company-clang--version nil)
(defun company-clang--auto-save-p ()
(not
(company-clang--check-version 2.9 3.1)))
(defun company-clang--check-version (min apple-min)
(pcase company-clang--version
(`(apple . ,ver) (>= ver apple-min))
(`(normal . ,ver) (>= ver min))
(_ (error "pcase-exhaustive is not in Emacs 24.3!"))))
(defsubst company-clang-version ()
"Return the version of `company-clang-executable'."
(with-temp-buffer
(call-process company-clang-executable nil t nil "--version")
(goto-char (point-min))
(if (re-search-forward
"\\(clang\\|Apple LLVM\\|bcc32x\\|bcc64\\) version \\([0-9.]+\\)" nil t)
(cons
(if (equal (match-string-no-properties 1) "Apple LLVM")
'apple
'normal)
(string-to-number (match-string-no-properties 2)))
0)))
(defun company-clang (command &optional arg &rest ignored)
"`company-mode' completion backend for Clang.
Clang is a parser for C and ObjC. Clang version 1.1 or newer is required.
Additional command line arguments can be specified in
`company-clang-arguments'. Prefix files (-include ...) can be selected
with `company-clang-set-prefix' or automatically through a custom
`company-clang-prefix-guesser'.
With Clang versions before 2.9, we have to save the buffer before
performing completion. With Clang 2.9 and later, buffer contents are
passed via standard input."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-clang))
(init (when (memq major-mode company-clang-modes)
(unless company-clang-executable
(error "Company found no clang executable"))
(setq company-clang--version (company-clang-version))
(unless (company-clang--check-version
company-clang-required-version
company-clang-required-version)
(error "Company requires clang version %s"
company-clang-required-version))))
(prefix (and (memq major-mode company-clang-modes)
buffer-file-name
company-clang-executable
(not (company-in-string-or-comment))
(or (company-clang--prefix) 'stop)))
(candidates (cons :async
(lambda (cb) (company-clang--candidates arg cb))))
(meta (company-clang--meta arg))
(annotation (company-clang--annotation arg))
(post-completion (let ((anno (company-clang--annotation arg)))
(when (and company-clang-insert-arguments anno)
(insert anno)
(if (string-match "\\`:[^:]" anno)
(company-template-objc-templatify anno)
(company-template-c-like-templatify
(concat arg anno))))))))
(provide 'company-clang)
;;; company-clang.el ends here

View File

@@ -1,206 +0,0 @@
;;; company-cmake.el --- company-mode completion backend for CMake
;; Copyright (C) 2013-2014, 2017-2018 Free Software Foundation, Inc.
;; Author: Chen Bin <chenbin DOT sh AT gmail>
;; Version: 0.2
;; This program 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.
;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; company-cmake offers completions for module names, variable names and
;; commands used by CMake. And their descriptions.
;;; Code:
(require 'company)
(require 'cl-lib)
(defgroup company-cmake nil
"Completion backend for CMake."
:group 'company)
(defcustom company-cmake-executable
(executable-find "cmake")
"Location of cmake executable."
:type 'file)
(defvar company-cmake-executable-arguments
'("--help-command-list"
"--help-module-list"
"--help-variable-list")
"The arguments we pass to cmake, separately.
They affect which types of symbols we get completion candidates for.")
(defvar company-cmake--completion-pattern
"^\\(%s[a-zA-Z0-9_<>]%s\\)$"
"Regexp to match the candidates.")
(defvar company-cmake-modes '(cmake-mode)
"Major modes in which cmake may complete.")
(defvar company-cmake--candidates-cache nil
"Cache for the raw candidates.")
(defvar company-cmake--meta-command-cache nil
"Cache for command arguments to retrieve descriptions for the candidates.")
(defun company-cmake--replace-tags (rlt)
(setq rlt (replace-regexp-in-string
"\\(.*?\\(IS_GNU\\)?\\)<LANG>\\(.*\\)"
(lambda (_match)
(mapconcat 'identity
(if (match-beginning 2)
'("\\1CXX\\3" "\\1C\\3" "\\1G77\\3")
'("\\1CXX\\3" "\\1C\\3" "\\1Fortran\\3"))
"\n"))
rlt t))
(setq rlt (replace-regexp-in-string
"\\(.*\\)<CONFIG>\\(.*\\)"
(mapconcat 'identity '("\\1DEBUG\\2" "\\1RELEASE\\2"
"\\1RELWITHDEBINFO\\2" "\\1MINSIZEREL\\2")
"\n")
rlt))
rlt)
(defun company-cmake--fill-candidates-cache (arg)
"Fill candidates cache if needed."
(let (rlt)
(unless company-cmake--candidates-cache
(setq company-cmake--candidates-cache (make-hash-table :test 'equal)))
;; If hash is empty, fill it.
(unless (gethash arg company-cmake--candidates-cache)
(with-temp-buffer
(let ((res (call-process company-cmake-executable nil t nil arg)))
(unless (zerop res)
(message "cmake executable exited with error=%d" res)))
(setq rlt (buffer-string)))
(setq rlt (company-cmake--replace-tags rlt))
(puthash arg rlt company-cmake--candidates-cache))
))
(defun company-cmake--parse (prefix content cmd)
(let ((start 0)
(pattern (format company-cmake--completion-pattern
(regexp-quote prefix)
(if (zerop (length prefix)) "+" "*")))
(lines (split-string content "\n"))
match
rlt)
(dolist (line lines)
(when (string-match pattern line)
(let ((match (match-string 1 line)))
(when match
(puthash match cmd company-cmake--meta-command-cache)
(push match rlt)))))
rlt))
(defun company-cmake--candidates (prefix)
(let (results
cmd-opts
str)
(unless company-cmake--meta-command-cache
(setq company-cmake--meta-command-cache (make-hash-table :test 'equal)))
(dolist (arg company-cmake-executable-arguments)
(company-cmake--fill-candidates-cache arg)
(setq cmd-opts (replace-regexp-in-string "-list$" "" arg) )
(setq str (gethash arg company-cmake--candidates-cache))
(when str
(setq results (nconc results
(company-cmake--parse prefix str cmd-opts)))))
results))
(defun company-cmake--unexpand-candidate (candidate)
(cond
((string-match "^CMAKE_\\(C\\|CXX\\|Fortran\\)\\(_.*\\)$" candidate)
(setq candidate (concat "CMAKE_<LANG>" (match-string 2 candidate))))
;; C flags
((string-match "^\\(.*_\\)IS_GNU\\(C\\|CXX\\|G77\\)$" candidate)
(setq candidate (concat (match-string 1 candidate) "IS_GNU<LANG>")))
;; C flags
((string-match "^\\(.*_\\)OVERRIDE_\\(C\\|CXX\\|Fortran\\)$" candidate)
(setq candidate (concat (match-string 1 candidate) "OVERRIDE_<LANG>")))
((string-match "^\\(.*\\)\\(_DEBUG\\|_RELEASE\\|_RELWITHDEBINFO\\|_MINSIZEREL\\)\\(.*\\)$" candidate)
(setq candidate (concat (match-string 1 candidate)
"_<CONFIG>"
(match-string 3 candidate)))))
candidate)
(defun company-cmake--meta (candidate)
(let ((cmd-opts (gethash candidate company-cmake--meta-command-cache))
result)
(setq candidate (company-cmake--unexpand-candidate candidate))
;; Don't cache the documentation of every candidate (command)
;; Cache in this case will cost too much memory.
(with-temp-buffer
(call-process company-cmake-executable nil t nil cmd-opts candidate)
;; Go to the third line, trim it and return the result.
;; Tested with cmake 2.8.9.
(goto-char (point-min))
(forward-line 2)
(setq result (buffer-substring-no-properties (line-beginning-position)
(line-end-position)))
(setq result (replace-regexp-in-string "^[ \t\n\r]+" "" result))
result)))
(defun company-cmake--doc-buffer (candidate)
(let ((cmd-opts (gethash candidate company-cmake--meta-command-cache)))
(setq candidate (company-cmake--unexpand-candidate candidate))
(with-temp-buffer
(call-process company-cmake-executable nil t nil cmd-opts candidate)
;; Go to the third line, trim it and return the doc buffer.
;; Tested with cmake 2.8.9.
(goto-char (point-min))
(forward-line 2)
(company-doc-buffer
(buffer-substring-no-properties (line-beginning-position)
(point-max))))))
(defun company-cmake-prefix-dollar-brace-p ()
"Test if the current symbol follows ${."
(save-excursion
(skip-syntax-backward "w_")
(and (eq (char-before (point)) ?\{)
(eq (char-before (1- (point))) ?$))))
(defun company-cmake (command &optional arg &rest ignored)
"`company-mode' completion backend for CMake.
CMake is a cross-platform, open-source make system."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-cmake))
(init (when (memq major-mode company-cmake-modes)
(unless company-cmake-executable
(error "Company found no cmake executable"))))
(prefix (and (memq major-mode company-cmake-modes)
(or (not (company-in-string-or-comment))
(company-cmake-prefix-dollar-brace-p))
(company-grab-symbol)))
(candidates (company-cmake--candidates arg))
(meta (company-cmake--meta arg))
(doc-buffer (company-cmake--doc-buffer arg))
))
(provide 'company-cmake)
;;; company-cmake.el ends here

View File

@@ -1,446 +0,0 @@
;;; company-css.el --- company-mode completion backend for css-mode -*- lexical-binding: t -*-
;; Copyright (C) 2009, 2011, 2014, 2018 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; In Emacs >= 26, company-capf is used instead.
;;; Code:
(require 'company)
(require 'cl-lib)
(declare-function web-mode-language-at-pos "web-mode" (&optional pos))
(defconst company-css-property-alist
;; see http://www.w3.org/TR/CSS21/propidx.html
'(("azimuth" angle "left-side" "far-left" "left" "center-left" "center"
"center-right" "right" "far-right" "right-side" "behind" "leftwards"
"rightwards")
("background" background-color background-image background-repeat
background-attachment background-position
background-clip background-origin background-size)
("background-attachment" "scroll" "fixed")
("background-color" color "transparent")
("background-image" uri "none")
("background-position" percentage length "left" "center" "right" percentage
length "top" "center" "bottom" "left" "center" "right" "top" "center"
"bottom")
("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat")
("border" border-width border-style border-color)
("border-bottom" border)
("border-bottom-color" border-color)
("border-bottom-style" border-style)
("border-bottom-width" border-width)
("border-collapse" "collapse" "separate")
("border-color" color "transparent")
("border-left" border)
("border-left-color" border-color)
("border-left-style" border-style)
("border-left-width" border-width)
("border-right" border)
("border-right-color" border-color)
("border-right-style" border-style)
("border-right-width" border-width)
("border-spacing" length length)
("border-style" border-style)
("border-top" border)
("border-top-color" border-color)
("border-top-style" border-style)
("border-top-width" border-width)
("border-width" border-width)
("bottom" length percentage "auto")
("caption-side" "top" "bottom")
("clear" "none" "left" "right" "both")
("clip" shape "auto")
("color" color)
("content" "normal" "none" string uri counter "attr()" "open-quote"
"close-quote" "no-open-quote" "no-close-quote")
("counter-increment" identifier integer "none")
("counter-reset" identifier integer "none")
("cue" cue-before cue-after)
("cue-after" uri "none")
("cue-before" uri "none")
("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize"
"ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize"
"w-resize" "text" "wait" "help" "progress")
("direction" "ltr" "rtl")
("display" "inline" "block" "list-item" "run-in" "inline-block" "table"
"inline-table" "table-row-group" "table-header-group" "table-footer-group"
"table-row" "table-column-group" "table-column" "table-cell"
"table-caption" "none")
("elevation" angle "below" "level" "above" "higher" "lower")
("empty-cells" "show" "hide")
("float" "left" "right" "none")
("font" font-style font-weight font-size "/" line-height
font-family "caption" "icon" "menu" "message-box" "small-caption"
"status-bar" "normal" "small-caps"
;; CSS3
font-stretch)
("font-family" family-name generic-family)
("font-size" absolute-size relative-size length percentage)
("font-style" "normal" "italic" "oblique")
("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400"
"500" "600" "700" "800" "900")
("height" length percentage "auto")
("left" length percentage "auto")
("letter-spacing" "normal" length)
("line-height" "normal" number length percentage)
("list-style" list-style-type list-style-position list-style-image)
("list-style-image" uri "none")
("list-style-position" "inside" "outside")
("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero"
"lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin"
"armenian" "georgian" "lower-alpha" "upper-alpha" "none")
("margin" margin-width)
("margin-bottom" margin-width)
("margin-left" margin-width)
("margin-right" margin-width)
("margin-top" margin-width)
("max-height" length percentage "none")
("max-width" length percentage "none")
("min-height" length percentage)
("min-width" length percentage)
("orphans" integer)
("outline" outline-color outline-style outline-width)
("outline-color" color "invert")
("outline-style" border-style)
("outline-width" border-width)
("overflow" "visible" "hidden" "scroll" "auto"
;; CSS3:
"no-display" "no-content")
("padding" padding-width)
("padding-bottom" padding-width)
("padding-left" padding-width)
("padding-right" padding-width)
("padding-top" padding-width)
("page-break-after" "auto" "always" "avoid" "left" "right")
("page-break-before" "auto" "always" "avoid" "left" "right")
("page-break-inside" "avoid" "auto")
("pause" time percentage)
("pause-after" time percentage)
("pause-before" time percentage)
("pitch" frequency "x-low" "low" "medium" "high" "x-high")
("pitch-range" number)
("play-during" uri "mix" "repeat" "auto" "none")
("position" "static" "relative" "absolute" "fixed")
("quotes" string string "none")
("richness" number)
("right" length percentage "auto")
("speak" "normal" "none" "spell-out")
("speak-header" "once" "always")
("speak-numeral" "digits" "continuous")
("speak-punctuation" "code" "none")
("speech-rate" number "x-slow" "slow" "medium" "fast" "x-fast" "faster"
"slower")
("stress" number)
("table-layout" "auto" "fixed")
("text-align" "left" "right" "center" "justify")
("text-indent" length percentage)
("text-transform" "capitalize" "uppercase" "lowercase" "none")
("top" length percentage "auto")
("unicode-bidi" "normal" "embed" "bidi-override")
("vertical-align" "baseline" "sub" "super" "top" "text-top" "middle"
"bottom" "text-bottom" percentage length)
("visibility" "visible" "hidden" "collapse")
("voice-family" specific-voice generic-voice "*" specific-voice
generic-voice)
("volume" number percentage "silent" "x-soft" "soft" "medium" "loud"
"x-loud")
("white-space" "normal" "pre" "nowrap" "pre-wrap" "pre-line")
("widows" integer)
("width" length percentage "auto")
("word-spacing" "normal" length)
("z-index" "auto" integer)
;; CSS3
("align-content" align-stretch "space-between" "space-around")
("align-items" align-stretch "baseline")
("align-self" align-items "auto")
("animation" animation-name animation-duration animation-timing-function
animation-delay animation-iteration-count animation-direction
animation-fill-mode)
("animation-delay" time)
("animation-direction" "normal" "reverse" "alternate" "alternate-reverse")
("animation-duration" time)
("animation-fill-mode" "none" "forwards" "backwards" "both")
("animation-iteration-count" integer "infinite")
("animation-name" "none")
("animation-play-state" "paused" "running")
("animation-timing-function" transition-timing-function
"step-start" "step-end" "steps(,)")
("backface-visibility" "visible" "hidden")
("background-clip" background-origin)
("background-origin" "border-box" "padding-box" "content-box")
("background-size" length percentage "auto" "cover" "contain")
("border-image" border-image-outset border-image-repeat border-image-source
border-image-slice border-image-width)
("border-image-outset" length)
("border-image-repeat" "stretch" "repeat" "round" "space")
("border-image-source" uri "none")
("border-image-slice" length)
("border-image-width" length percentage)
("border-radius" length)
("border-top-left-radius" length)
("border-top-right-radius" length)
("border-bottom-left-radius" length)
("border-bottom-right-radius" length)
("box-decoration-break" "slice" "clone")
("box-shadow" length color)
("box-sizing" "content-box" "border-box")
("break-after" "auto" "always" "avoid" "left" "right" "page" "column"
"avoid-page" "avoid-column")
("break-before" break-after)
("break-inside" "avoid" "auto")
("columns" column-width column-count)
("column-count" integer)
("column-fill" "auto" "balance")
("column-gap" length "normal")
("column-rule" column-rule-width column-rule-style column-rule-color)
("column-rule-color" color)
("column-rule-style" border-style)
("column-rule-width" border-width)
("column-span" "all" "none")
("column-width" length "auto")
("filter" url "blur()" "brightness()" "contrast()" "drop-shadow()"
"grayscale()" "hue-rotate()" "invert()" "opacity()" "saturate()" "sepia()")
("flex" flex-grow flex-shrink flex-basis)
("flex-basis" percentage length "auto")
("flex-direction" "row" "row-reverse" "column" "column-reverse")
("flex-flow" flex-direction flex-wrap)
("flex-grow" number)
("flex-shrink" number)
("flex-wrap" "nowrap" "wrap" "wrap-reverse")
("font-feature-setting" normal string number)
("font-kerning" "auto" "normal" "none")
("font-language-override" "normal" string)
("font-size-adjust" "none" number)
("font-stretch" "normal" "ultra-condensed" "extra-condensed" "condensed"
"semi-condensed" "semi-expanded" "expanded" "extra-expanded" "ultra-expanded")
("font-synthesis" "none" "weight" "style")
("font-variant" font-variant-alternates font-variant-caps
font-variant-east-asian font-variant-ligatures font-variant-numeric
font-variant-position)
("font-variant-alternates" "normal" "historical-forms" "stylistic()"
"styleset()" "character-variant()" "swash()" "ornaments()" "annotation()")
("font-variant-caps" "normal" "small-caps" "all-small-caps" "petite-caps"
"all-petite-caps" "unicase" "titling-caps")
("font-variant-east-asian" "jis78" "jis83" "jis90" "jis04" "simplified"
"traditional" "full-width" "proportional-width" "ruby")
("font-variant-ligatures" "normal" "none" "common-ligatures"
"no-common-ligatures" "discretionary-ligatures" "no-discretionary-ligatures"
"historical-ligatures" "no-historical-ligatures" "contextual" "no-contextual")
("font-variant-numeric" "normal" "ordinal" "slashed-zero"
"lining-nums" "oldstyle-nums" "proportional-nums" "tabular-nums"
"diagonal-fractions" "stacked-fractions")
("font-variant-position" "normal" "sub" "super")
("hyphens" "none" "manual" "auto")
("justify-content" align-common "space-between" "space-around")
("line-break" "auto" "loose" "normal" "strict")
("marquee-direction" "forward" "reverse")
("marquee-play-count" integer "infinite")
("marquee-speed" "slow" "normal" "fast")
("marquee-style" "scroll" "slide" "alternate")
("opacity" number)
("order" number)
("outline-offset" length)
("overflow-x" overflow)
("overflow-y" overflow)
("overflow-style" "auto" "marquee-line" "marquee-block")
("overflow-wrap" "normal" "break-word")
("perspective" "none" length)
("perspective-origin" percentage length "left" "center" "right" "top" "bottom")
("resize" "none" "both" "horizontal" "vertical")
("tab-size" integer length)
("text-align-last" "auto" "start" "end" "left" "right" "center" "justify")
("text-decoration" text-decoration-color text-decoration-line text-decoration-style)
("text-decoration-color" color)
("text-decoration-line" "none" "underline" "overline" "line-through" "blink")
("text-decoration-style" "solid" "double" "dotted" "dashed" "wavy")
("text-overflow" "clip" "ellipsis")
("text-shadow" color length)
("text-underline-position" "auto" "under" "left" "right")
("transform" "matrix(,,,,,)" "translate(,)" "translateX()" "translateY()"
"scale()" "scaleX()" "scaleY()" "rotate()" "skewX()" "skewY()" "none")
("transform-origin" perspective-origin)
("transform-style" "flat" "preserve-3d")
("transition" transition-property transition-duration
transition-timing-function transition-delay)
("transition-delay" time)
("transition-duration" time)
("transition-timing-function"
"ease" "linear" "ease-in" "ease-out" "ease-in-out" "cubic-bezier(,,,)")
("transition-property" "none" "all" identifier)
("word-wrap" overflow-wrap)
("word-break" "normal" "break-all" "keep-all"))
"A list of CSS properties and their possible values.")
(defconst company-css-value-classes
'((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large"
"xx-large")
(align-common "flex-start" "flex-end" "center")
(align-stretch align-common "stretch")
(border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove"
"ridge" "inset" "outset")
(border-width "thick" "medium" "thin")
(color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy"
"olive" "orange" "purple" "red" "silver" "teal" "white" "yellow")
(counter "counter(,)")
(family-name "Courier" "Helvetica" "Times")
(generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace")
(generic-voice "male" "female" "child")
(margin-width "auto") ;; length percentage
(relative-size "larger" "smaller")
(shape "rect(,,,)")
(uri "url()"))
"A list of CSS property value classes and their contents.")
;; missing, because not completable
;; <angle><frequency><identifier><integer><length><number><padding-width>
;; <percentage><specific-voice><string><time><uri>
(defconst company-css-html-tags
'("a" "abbr" "acronym" "address" "applet" "area" "b" "base" "basefont" "bdo"
"big" "blockquote" "body" "br" "button" "caption" "center" "cite" "code"
"col" "colgroup" "dd" "del" "dfn" "dir" "div" "dl" "dt" "em" "fieldset"
"font" "form" "frame" "frameset" "h1" "h2" "h3" "h4" "h5" "h6" "head" "hr"
"html" "i" "iframe" "img" "input" "ins" "isindex" "kbd" "label" "legend"
"li" "link" "map" "menu" "meta" "noframes" "noscript" "object" "ol"
"optgroup" "option" "p" "param" "pre" "q" "s" "samp" "script" "select"
"small" "span" "strike" "strong" "style" "sub" "sup" "table" "tbody" "td"
"textarea" "tfoot" "th" "thead" "title" "tr" "tt" "u" "ul" "var"
;; HTML5
"section" "article" "aside" "header" "footer" "nav" "figure" "figcaption"
"time" "mark" "main")
"A list of HTML tags for use in CSS completion.")
(defconst company-css-pseudo-classes
'("active" "after" "before" "first" "first-child" "first-letter" "first-line"
"focus" "hover" "lang" "left" "link" "right" "visited")
"Identifiers for CSS pseudo-elements and pseudo-classes.")
(defconst company-css-property-cache (make-hash-table :size 115 :test 'equal))
(defun company-css-property-values (attribute)
"Access the `company-css-property-alist' cached and flattened."
(or (gethash attribute company-css-property-cache)
(let (results)
(dolist (value (cdr (assoc attribute company-css-property-alist)))
(if (symbolp value)
(dolist (child (or (cdr (assoc value company-css-value-classes))
(company-css-property-values
(symbol-name value))))
(push child results))
(push value results)))
(setq results (sort results 'string<))
(puthash attribute
(if (fboundp 'delete-consecutive-dups)
(delete-consecutive-dups results)
(delete-dups results))
company-css-property-cache)
results)))
;;; bracket detection
(defconst company-css-braces-syntax-table
(let ((table (make-syntax-table)))
(setf (aref table ?{) '(4 . 125))
(setf (aref table ?}) '(5 . 123))
table)
"A syntax table giving { and } paren syntax.")
(defun company-css-inside-braces-p ()
"Return non-nil, if point is within matched { and }."
(ignore-errors
(with-syntax-table company-css-braces-syntax-table
(let ((parse-sexp-ignore-comments t))
(scan-lists (point) -1 1)))))
;;; tags
(defconst company-css-tag-regexp
(concat "\\(?:\\`\\|}\\)[[:space:]]*"
;; multiple
"\\(?:"
;; previous tags:
"\\(?:#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\(?:\\[[^]]*\\]\\)?"
;; space or selectors
"\\(?:[[:space:]]+\\|[[:space:]]*[+,>][[:space:]]*\\)"
"\\)*"
"\\(\\(?:#\\|\\_<[[:alpha:]]\\)\\(?:[[:alnum:]-#]*\\_>\\)?\\_>\\|\\)"
"\\=")
"A regular expression matching CSS tags.")
;;; pseudo id
(defconst company-css-pseudo-regexp
(concat "\\(?:\\`\\|}\\)[[:space:]]*"
;; multiple
"\\(?:"
;; previous tags:
"\\(?:#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\(?:\\[[^]]*\\]\\)?"
;; space or delimiters
"\\(?:[[:space:]]+\\|[[:space:]]*[+,>][[:space:]]*\\)"
"\\)*"
"\\(?:\\(?:\\#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\):"
"\\([[:alpha:]-]+\\_>\\|\\)\\_>\\=")
"A regular expression matching CSS pseudo classes.")
;;; properties
(defun company-css-grab-property ()
"Return the CSS property before point, if any.
Returns \"\" if no property found, but feasible at this position."
(when (company-css-inside-braces-p)
(company-grab-symbol)))
;;; values
(defconst company-css-property-value-regexp
"\\_<\\([[:alpha:]-]+\\):\\(?:[^{};]*[[:space:]]+\\)?\\([^{};]*\\_>\\|\\)\\="
"A regular expression matching CSS tags.")
;;;###autoload
(defun company-css (command &optional arg &rest ignored)
"`company-mode' completion backend for `css-mode'."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-css))
(prefix (and (or (derived-mode-p 'css-mode)
(and (derived-mode-p 'web-mode)
(string= (web-mode-language-at-pos) "css")))
(or (company-grab company-css-tag-regexp 1)
(company-grab company-css-pseudo-regexp 1)
(company-grab company-css-property-value-regexp 2
(line-beginning-position))
(company-css-grab-property))))
(candidates
(cond
((company-grab company-css-tag-regexp 1)
(all-completions arg company-css-html-tags))
((company-grab company-css-pseudo-regexp 1)
(all-completions arg company-css-pseudo-classes))
((company-grab company-css-property-value-regexp 2
(line-beginning-position))
(all-completions arg
(company-css-property-values
(company-grab company-css-property-value-regexp 1))))
((company-css-grab-property)
(all-completions arg company-css-property-alist))))
(sorted t)))
(provide 'company-css)
;;; company-css.el ends here

View File

@@ -1,104 +0,0 @@
;;; company-dabbrev-code.el --- dabbrev-like company-mode backend for code -*- lexical-binding: t -*-
;; Copyright (C) 2009, 2011, 2014 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'company-dabbrev)
(require 'cl-lib)
(defgroup company-dabbrev-code nil
"dabbrev-like completion backend for code."
:group 'company)
(defcustom company-dabbrev-code-modes
'(prog-mode
batch-file-mode csharp-mode css-mode erlang-mode haskell-mode jde-mode
lua-mode python-mode)
"Modes that use `company-dabbrev-code'.
In all these modes (and their derivatives) `company-dabbrev-code' will
complete only symbols, not text in comments or strings. In other modes
`company-dabbrev-code' will pass control to other backends
\(e.g. `company-dabbrev'\). Value t means complete in all modes."
:type '(choice (repeat :tag "Some modes" (symbol :tag "Major mode"))
(const :tag "All modes" t)))
(defcustom company-dabbrev-code-other-buffers t
"Determines whether `company-dabbrev-code' should search other buffers.
If `all', search all other buffers, except the ignored ones. If t, search
buffers with the same major mode. If `code', search all buffers with major
modes in `company-dabbrev-code-modes', or derived from one of them. See
also `company-dabbrev-code-time-limit'."
:type '(choice (const :tag "Off" nil)
(const :tag "Same major mode" t)
(const :tag "Code major modes" code)
(const :tag "All" all)))
(defcustom company-dabbrev-code-time-limit .1
"Determines how long `company-dabbrev-code' should look for matches."
:type '(choice (const :tag "Off" nil)
(number :tag "Seconds")))
(defcustom company-dabbrev-code-everywhere nil
"Non-nil to offer completions in comments and strings."
:type 'boolean)
(defcustom company-dabbrev-code-ignore-case nil
"Non-nil to ignore case when collecting completion candidates."
:type 'boolean)
(defun company-dabbrev-code--make-regexp (prefix)
(concat "\\_<" (if (equal prefix "")
"\\([a-zA-Z]\\|\\s_\\)"
(regexp-quote prefix))
"\\(\\sw\\|\\s_\\)*\\_>"))
;;;###autoload
(defun company-dabbrev-code (command &optional arg &rest ignored)
"dabbrev-like `company-mode' backend for code.
The backend looks for all symbols in the current buffer that aren't in
comments or strings."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-dabbrev-code))
(prefix (and (or (eq t company-dabbrev-code-modes)
(apply #'derived-mode-p company-dabbrev-code-modes))
(or company-dabbrev-code-everywhere
(not (company-in-string-or-comment)))
(or (company-grab-symbol) 'stop)))
(candidates (let ((case-fold-search company-dabbrev-code-ignore-case))
(company-dabbrev--search
(company-dabbrev-code--make-regexp arg)
company-dabbrev-code-time-limit
(pcase company-dabbrev-code-other-buffers
(`t (list major-mode))
(`code company-dabbrev-code-modes)
(`all `all))
(not company-dabbrev-code-everywhere))))
(ignore-case company-dabbrev-code-ignore-case)
(duplicates t)))
(provide 'company-dabbrev-code)
;;; company-dabbrev-code.el ends here

View File

@@ -1,206 +0,0 @@
;;; company-dabbrev.el --- dabbrev-like company-mode completion backend -*- lexical-binding: t -*-
;; Copyright (C) 2009, 2011, 2014, 2015, 2016 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'cl-lib)
(defgroup company-dabbrev nil
"dabbrev-like completion backend."
:group 'company)
(defcustom company-dabbrev-other-buffers 'all
"Determines whether `company-dabbrev' should search other buffers.
If `all', search all other buffers, except the ignored ones. If t, search
buffers with the same major mode. See also `company-dabbrev-time-limit'."
:type '(choice (const :tag "Off" nil)
(const :tag "Same major mode" t)
(const :tag "All" all)))
(defcustom company-dabbrev-ignore-buffers "\\`[ *]"
"Regexp matching the names of buffers to ignore.
Or a function that returns non-nil for such buffers."
:type '(choice (regexp :tag "Regexp")
(function :tag "Predicate"))
:package-version '(company . "0.9.0"))
(defcustom company-dabbrev-time-limit .1
"Determines how many seconds `company-dabbrev' should look for matches."
:type '(choice (const :tag "Off" nil)
(number :tag "Seconds")))
(defcustom company-dabbrev-char-regexp "\\sw"
"A regular expression matching the characters `company-dabbrev' looks for."
:type 'regexp)
(defcustom company-dabbrev-ignore-case 'keep-prefix
"Non-nil to ignore case when collecting completion candidates.
When it's `keep-prefix', the text before point will remain unchanged after
candidate is inserted, even some of its characters have different case."
:type '(choice
(const :tag "Don't ignore case" nil)
(const :tag "Ignore case" t)
(const :tag "Keep case before point" keep-prefix)))
(defcustom company-dabbrev-downcase 'case-replace
"Whether to downcase the returned candidates.
The value of nil means keep them as-is.
`case-replace' means use the value of `case-replace'.
Any other value means downcase.
If you set this value to nil, you may also want to set
`company-dabbrev-ignore-case' to any value other than `keep-prefix'."
:type '(choice
(const :tag "Keep as-is" nil)
(const :tag "Downcase" t)
(const :tag "Use case-replace" case-replace)))
(defcustom company-dabbrev-minimum-length 4
"The minimum length for the completion candidate to be included.
This variable affects both `company-dabbrev' and `company-dabbrev-code'."
:type 'integer
:package-version '(company . "0.8.3"))
(defcustom company-dabbrev-ignore-invisible nil
"Non-nil to skip invisible text."
:type 'boolean
:package-version '(company . "0.9.0"))
(defmacro company-dabbrev--time-limit-while (test start limit freq &rest body)
(declare (indent 3) (debug t))
`(let ((company-time-limit-while-counter 0))
(catch 'done
(while ,test
,@body
(and ,limit
(= (cl-incf company-time-limit-while-counter) ,freq)
(setq company-time-limit-while-counter 0)
(> (float-time (time-since ,start)) ,limit)
(throw 'done 'company-time-out))))))
(defun company-dabbrev--make-regexp ()
(concat "\\(?:" company-dabbrev-char-regexp "\\)+"))
(defun company-dabbrev--search-buffer (regexp pos symbols start limit
ignore-comments)
(save-excursion
(cl-labels ((maybe-collect-match
()
(let ((match (match-string-no-properties 0)))
(when (and (>= (length match) company-dabbrev-minimum-length)
(not (and company-dabbrev-ignore-invisible
(invisible-p (match-beginning 0)))))
(push match symbols)))))
(goto-char (if pos (1- pos) (point-min)))
;; Search before pos.
(let ((tmp-end (point)))
(company-dabbrev--time-limit-while (and (not (input-pending-p))
(> tmp-end (point-min)))
start limit 1
(ignore-errors
(forward-char -10000))
(forward-line 0)
(save-excursion
;; Before, we used backward search, but it matches non-greedily, and
;; that forced us to use the "beginning/end of word" anchors in
;; `company-dabbrev--make-regexp'. It's also about 2x slower.
(while (and (not (input-pending-p))
(re-search-forward regexp tmp-end t))
(if (and ignore-comments (save-match-data (company-in-string-or-comment)))
(re-search-forward "\\s>\\|\\s!\\|\\s\"" tmp-end t)
(maybe-collect-match))))
(setq tmp-end (point))))
(goto-char (or pos (point-min)))
;; Search after pos.
(company-dabbrev--time-limit-while (and (not (input-pending-p))
(re-search-forward regexp nil t))
start limit 25
(if (and ignore-comments (save-match-data (company-in-string-or-comment)))
(re-search-forward "\\s>\\|\\s!\\|\\s\"" nil t)
(maybe-collect-match)))
symbols)))
(defun company-dabbrev--search (regexp &optional limit other-buffer-modes
ignore-comments)
(let* ((start (current-time))
(symbols (company-dabbrev--search-buffer regexp (point) nil start limit
ignore-comments)))
(when other-buffer-modes
(cl-dolist (buffer (delq (current-buffer) (buffer-list)))
(unless (if (stringp company-dabbrev-ignore-buffers)
(string-match-p company-dabbrev-ignore-buffers
(buffer-name buffer))
(funcall company-dabbrev-ignore-buffers buffer))
(with-current-buffer buffer
(when (or (eq other-buffer-modes 'all)
(apply #'derived-mode-p other-buffer-modes))
(setq symbols
(company-dabbrev--search-buffer regexp nil symbols start
limit ignore-comments)))))
(and limit
(> (float-time (time-since start)) limit)
(cl-return))))
symbols))
(defun company-dabbrev--prefix ()
;; Not in the middle of a word.
(unless (looking-at company-dabbrev-char-regexp)
;; Emacs can't do greedy backward-search.
(company-grab-line (format "\\(?:^\\| \\)[^ ]*?\\(\\(?:%s\\)*\\)"
company-dabbrev-char-regexp)
1)))
(defun company-dabbrev--filter (prefix candidates)
(let ((completion-ignore-case company-dabbrev-ignore-case))
(all-completions prefix candidates)))
;;;###autoload
(defun company-dabbrev (command &optional arg &rest ignored)
"dabbrev-like `company-mode' completion backend."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-dabbrev))
(prefix (company-dabbrev--prefix))
(candidates
(let* ((case-fold-search company-dabbrev-ignore-case)
(words (company-dabbrev--search (company-dabbrev--make-regexp)
company-dabbrev-time-limit
(pcase company-dabbrev-other-buffers
(`t (list major-mode))
(`all `all))))
(downcase-p (if (eq company-dabbrev-downcase 'case-replace)
case-replace
company-dabbrev-downcase)))
(setq words (company-dabbrev--filter arg words))
(if downcase-p
(mapcar 'downcase words)
words)))
(ignore-case company-dabbrev-ignore-case)
(duplicates t)))
(provide 'company-dabbrev)
;;; company-dabbrev.el ends here

View File

@@ -1,186 +0,0 @@
;;; company-eclim.el --- company-mode completion backend for Eclim
;; Copyright (C) 2009, 2011, 2013, 2015 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Using `emacs-eclim' together with (or instead of) this backend is
;; recommended, as it allows you to use other Eclim features.
;;
;; The alternative backend provided by `emacs-eclim' uses `yasnippet'
;; instead of `company-template' to expand function calls, and it supports
;; some languages other than Java.
;;; Code:
(require 'company)
(require 'company-template)
(require 'cl-lib)
(defgroup company-eclim nil
"Completion backend for Eclim."
:group 'company)
(defun company-eclim-executable-find ()
(let (file)
(cl-dolist (eclipse-root '("/Applications/eclipse" "/usr/lib/eclipse"
"/usr/local/lib/eclipse"))
(and (file-exists-p (setq file (expand-file-name "plugins" eclipse-root)))
(setq file (car (last (directory-files file t "^org.eclim_"))))
(file-exists-p (setq file (expand-file-name "bin/eclim" file)))
(cl-return file)))))
(defcustom company-eclim-executable
(or (bound-and-true-p eclim-executable)
(executable-find "eclim")
(company-eclim-executable-find))
"Location of eclim executable."
:type 'file)
(defcustom company-eclim-auto-save t
"Determines whether to save the buffer when retrieving completions.
eclim can only complete correctly when the buffer has been saved."
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar-local company-eclim--project-dir 'unknown)
(defvar-local company-eclim--project-name nil)
(declare-function json-read "json")
(defvar json-array-type)
(defun company-eclim--call-process (&rest args)
(let ((coding-system-for-read 'utf-8)
res)
(require 'json)
(with-temp-buffer
(if (= 0 (setq res (apply 'call-process company-eclim-executable nil t nil
"-command" args)))
(let ((json-array-type 'list))
(goto-char (point-min))
(unless (eobp)
(json-read)))
(message "Company-eclim command failed with error %d:\n%s" res
(buffer-substring (point-min) (point-max)))
nil))))
(defun company-eclim--project-list ()
(company-eclim--call-process "project_list"))
(defun company-eclim--project-dir ()
(if (eq company-eclim--project-dir 'unknown)
(let ((dir (locate-dominating-file buffer-file-name ".project")))
(when dir
(setq company-eclim--project-dir
(directory-file-name
(expand-file-name dir)))))
company-eclim--project-dir))
(defun company-eclim--project-name ()
(or company-eclim--project-name
(let ((dir (company-eclim--project-dir)))
(when dir
(setq company-eclim--project-name
(cl-loop for project in (company-eclim--project-list)
when (equal (cdr (assoc 'path project)) dir)
return (cdr (assoc 'name project))))))))
(defun company-eclim--candidates (prefix)
(interactive "d")
(let ((project-file (file-relative-name buffer-file-name
(company-eclim--project-dir)))
completions)
(when company-eclim-auto-save
(when (buffer-modified-p)
(basic-save-buffer))
;; FIXME: Sometimes this isn't finished when we complete.
(company-eclim--call-process "java_src_update"
"-p" (company-eclim--project-name)
"-f" project-file))
(dolist (item (cdr (assoc 'completions
(company-eclim--call-process
"java_complete" "-p" (company-eclim--project-name)
"-f" project-file
"-o" (number-to-string
(company-eclim--search-point prefix))
"-e" "utf-8"
"-l" "standard"))))
(let* ((meta (cdr (assoc 'info item)))
(completion meta))
(when (string-match " ?[(:-]" completion)
(setq completion (substring completion 0 (match-beginning 0))))
(put-text-property 0 1 'meta meta completion)
(push completion completions)))
(let ((completion-ignore-case nil))
(all-completions prefix completions))))
(defun company-eclim--search-point (prefix)
(if (or (cl-plusp (length prefix)) (eq (char-before) ?.))
(1- (point))
(point)))
(defun company-eclim--meta (candidate)
(get-text-property 0 'meta candidate))
(defun company-eclim--annotation (candidate)
(let ((meta (company-eclim--meta candidate)))
(when (string-match "\\(([^-]*\\) -" meta)
(substring meta (match-beginning 1) (match-end 1)))))
(defun company-eclim--prefix ()
(let ((prefix (company-grab-symbol)))
(when prefix
;; Completion candidates for annotations don't include '@'.
(when (eq ?@ (string-to-char prefix))
(setq prefix (substring prefix 1)))
prefix)))
(defun company-eclim (command &optional arg &rest ignored)
"`company-mode' completion backend for Eclim.
Eclim provides access to Eclipse Java IDE features for other editors.
Eclim version 1.7.13 or newer (?) is required.
Completions only work correctly when the buffer has been saved.
`company-eclim-auto-save' determines whether to do this automatically."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-eclim))
(prefix (and (derived-mode-p 'java-mode 'jde-mode)
buffer-file-name
company-eclim-executable
(company-eclim--project-name)
(not (company-in-string-or-comment))
(or (company-eclim--prefix) 'stop)))
(candidates (company-eclim--candidates arg))
(meta (company-eclim--meta arg))
;; because "" doesn't return everything
(no-cache (equal arg ""))
(annotation (company-eclim--annotation arg))
(post-completion (let ((anno (company-eclim--annotation arg)))
(when anno
(insert anno)
(company-template-c-like-templatify anno))))))
(provide 'company-eclim)
;;; company-eclim.el ends here

View File

@@ -1,226 +0,0 @@
;;; company-elisp.el --- company-mode completion backend for Emacs Lisp -*- lexical-binding: t -*-
;; Copyright (C) 2009, 2011-2013, 2017 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; In newer versions of Emacs, company-capf is used instead.
;;; Code:
(require 'company)
(require 'cl-lib)
(require 'help-mode)
(require 'find-func)
(defgroup company-elisp nil
"Completion backend for Emacs Lisp."
:group 'company)
(defcustom company-elisp-detect-function-context t
"If enabled, offer Lisp functions only in appropriate contexts.
Functions are offered for completion only after ' and \(."
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
(defcustom company-elisp-show-locals-first t
"If enabled, locally bound variables and functions are displayed
first in the candidates list."
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
(defun company-elisp--prefix ()
(let ((prefix (company-grab-symbol)))
(if prefix
(when (if (company-in-string-or-comment)
(= (char-before (- (point) (length prefix))) ?`)
(company-elisp--should-complete))
prefix)
'stop)))
(defun company-elisp--predicate (symbol)
(or (boundp symbol)
(fboundp symbol)
(facep symbol)
(featurep symbol)))
(defun company-elisp--fns-regexp (&rest names)
(concat "\\_<\\(?:cl-\\)?" (regexp-opt names) "\\*?\\_>"))
(defvar company-elisp-parse-limit 30)
(defvar company-elisp-parse-depth 100)
(defvar company-elisp-defun-names '("defun" "defmacro" "defsubst"))
(defvar company-elisp-var-binding-regexp
(apply #'company-elisp--fns-regexp "let" "lambda" "lexical-let"
company-elisp-defun-names)
"Regular expression matching head of a multiple variable bindings form.")
(defvar company-elisp-var-binding-regexp-1
(company-elisp--fns-regexp "dolist" "dotimes")
"Regular expression matching head of a form with one variable binding.")
(defvar company-elisp-fun-binding-regexp
(company-elisp--fns-regexp "flet" "labels")
"Regular expression matching head of a function bindings form.")
(defvar company-elisp-defuns-regexp
(concat "([ \t\n]*"
(apply #'company-elisp--fns-regexp company-elisp-defun-names)))
(defun company-elisp--should-complete ()
(let ((start (point))
(depth (car (syntax-ppss))))
(not
(when (> depth 0)
(save-excursion
(up-list (- depth))
(when (looking-at company-elisp-defuns-regexp)
(forward-char)
(forward-sexp 1)
(unless (= (point) start)
(condition-case nil
(let ((args-end (scan-sexps (point) 2)))
(or (null args-end)
(> args-end start)))
(scan-error
t)))))))))
(defun company-elisp--locals (prefix functions-p)
(let ((regexp (concat "[ \t\n]*\\(\\_<" (regexp-quote prefix)
"\\(?:\\sw\\|\\s_\\)*\\_>\\)"))
(pos (point))
res)
(condition-case nil
(save-excursion
(dotimes (_ company-elisp-parse-depth)
(up-list -1)
(save-excursion
(when (eq (char-after) ?\()
(forward-char 1)
(when (ignore-errors
(save-excursion (forward-list)
(<= (point) pos)))
(skip-chars-forward " \t\n")
(cond
((looking-at (if functions-p
company-elisp-fun-binding-regexp
company-elisp-var-binding-regexp))
(down-list 1)
(condition-case nil
(dotimes (_ company-elisp-parse-limit)
(save-excursion
(when (looking-at "[ \t\n]*(")
(down-list 1))
(when (looking-at regexp)
(cl-pushnew (match-string-no-properties 1) res)))
(forward-sexp))
(scan-error nil)))
((unless functions-p
(looking-at company-elisp-var-binding-regexp-1))
(down-list 1)
(when (looking-at regexp)
(cl-pushnew (match-string-no-properties 1) res)))))))))
(scan-error nil))
res))
(defun company-elisp-candidates (prefix)
(let* ((predicate (company-elisp--candidates-predicate prefix))
(locals (company-elisp--locals prefix (eq predicate 'fboundp)))
(globals (company-elisp--globals prefix predicate))
(locals (cl-loop for local in locals
when (not (member local globals))
collect local)))
(if company-elisp-show-locals-first
(append (sort locals 'string<)
(sort globals 'string<))
(append locals globals))))
(defun company-elisp--globals (prefix predicate)
(all-completions prefix obarray predicate))
(defun company-elisp--candidates-predicate (prefix)
(let* ((completion-ignore-case nil)
(beg (- (point) (length prefix)))
(before (char-before beg)))
(if (and company-elisp-detect-function-context
(not (memq before '(?' ?`))))
(if (and (eq before ?\()
(not
(save-excursion
(ignore-errors
(goto-char (1- beg))
(or (company-elisp--before-binding-varlist-p)
(progn
(up-list -1)
(company-elisp--before-binding-varlist-p)))))))
'fboundp
'boundp)
'company-elisp--predicate)))
(defun company-elisp--before-binding-varlist-p ()
(save-excursion
(and (prog1 (search-backward "(")
(forward-char 1))
(looking-at company-elisp-var-binding-regexp))))
(defun company-elisp--doc (symbol)
(let* ((symbol (intern symbol))
(doc (if (fboundp symbol)
(documentation symbol t)
(documentation-property symbol 'variable-documentation t))))
(and (stringp doc)
(string-match ".*$" doc)
(match-string 0 doc))))
;;;###autoload
(defun company-elisp (command &optional arg &rest ignored)
"`company-mode' completion backend for Emacs Lisp."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-elisp))
(prefix (and (derived-mode-p 'emacs-lisp-mode 'inferior-emacs-lisp-mode)
(company-elisp--prefix)))
(candidates (company-elisp-candidates arg))
(sorted company-elisp-show-locals-first)
(meta (company-elisp--doc arg))
(doc-buffer (let ((symbol (intern arg)))
(save-window-excursion
(ignore-errors
(cond
((fboundp symbol) (describe-function symbol))
((boundp symbol) (describe-variable symbol))
((featurep symbol) (describe-package symbol))
((facep symbol) (describe-face symbol))
(t (signal 'user-error nil)))
(help-buffer)))))
(location (let ((sym (intern arg)))
(cond
((fboundp sym) (find-definition-noselect sym nil))
((boundp sym) (find-definition-noselect sym 'defvar))
((featurep sym) (cons (find-file-noselect (find-library-name
(symbol-name sym)))
0))
((facep sym) (find-definition-noselect sym 'defface)))))))
(provide 'company-elisp)
;;; company-elisp.el ends here

View File

@@ -1,108 +0,0 @@
;;; company-etags.el --- company-mode completion backend for etags
;; Copyright (C) 2009-2011, 2014 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'cl-lib)
(require 'etags)
(defgroup company-etags nil
"Completion backend for etags."
:group 'company)
(defcustom company-etags-use-main-table-list t
"Always search `tags-table-list' if set.
If this is disabled, `company-etags' will try to find the one table for each
buffer automatically."
:type '(choice (const :tag "off" nil)
(const :tag "on" t)))
(defcustom company-etags-ignore-case nil
"Non-nil to ignore case in completion candidates."
:type 'boolean
:package-version '(company . "0.7.3"))
(defcustom company-etags-everywhere nil
"Non-nil to offer completions in comments and strings.
Set it to t or to a list of major modes."
:type '(choice (const :tag "Off" nil)
(const :tag "Any supported mode" t)
(repeat :tag "Some major modes"
(symbol :tag "Major mode")))
:package-version '(company . "0.9.0"))
(defvar company-etags-modes '(prog-mode c-mode objc-mode c++-mode java-mode
jde-mode pascal-mode perl-mode python-mode))
(defvar-local company-etags-buffer-table 'unknown)
(defun company-etags-find-table ()
(let ((file (expand-file-name
"TAGS"
(locate-dominating-file (or buffer-file-name
default-directory)
"TAGS"))))
(when (and file (file-regular-p file))
(list file))))
(defun company-etags-buffer-table ()
(or (and company-etags-use-main-table-list tags-table-list)
(if (eq company-etags-buffer-table 'unknown)
(setq company-etags-buffer-table (company-etags-find-table))
company-etags-buffer-table)))
(defun company-etags--candidates (prefix)
(let ((tags-table-list (company-etags-buffer-table))
(tags-file-name tags-file-name)
(completion-ignore-case company-etags-ignore-case))
(and (or tags-file-name tags-table-list)
(fboundp 'tags-completion-table)
(save-excursion
(visit-tags-table-buffer)
(all-completions prefix (tags-completion-table))))))
;;;###autoload
(defun company-etags (command &optional arg &rest ignored)
"`company-mode' completion backend for etags."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-etags))
(prefix (and (apply #'derived-mode-p company-etags-modes)
(or (eq t company-etags-everywhere)
(apply #'derived-mode-p company-etags-everywhere)
(not (company-in-string-or-comment)))
(company-etags-buffer-table)
(or (company-grab-symbol) 'stop)))
(candidates (company-etags--candidates arg))
(location (let ((tags-table-list (company-etags-buffer-table)))
(when (fboundp 'find-tag-noselect)
(save-excursion
(let ((buffer (find-tag-noselect arg)))
(cons buffer (with-current-buffer buffer (point))))))))
(ignore-case company-etags-ignore-case)))
(provide 'company-etags)
;;; company-etags.el ends here

View File

@@ -1,148 +0,0 @@
;;; company-files.el --- company-mode completion backend for file names
;; Copyright (C) 2009-2011, 2014-2015 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'cl-lib)
(defgroup company-files nil
"Completion backend for file names."
:group 'company)
(defcustom company-files-exclusions nil
"File name extensions and directory names to ignore.
The values should use the same format as `completion-ignored-extensions'."
:type '(const string)
:package-version '(company . "0.9.1"))
(defun company-files--directory-files (dir prefix)
;; Don't use directory-files. It produces directories without trailing /.
(condition-case err
(let ((comp (sort (file-name-all-completions prefix dir)
(lambda (s1 s2) (string-lessp (downcase s1) (downcase s2))))))
(when company-files-exclusions
(setq comp (company-files--exclusions-filtered comp)))
(if (equal prefix "")
(delete "../" (delete "./" comp))
comp))
(file-error nil)))
(defun company-files--exclusions-filtered (completions)
(let* ((dir-exclusions (cl-delete-if-not #'company-files--trailing-slash-p
company-files-exclusions))
(file-exclusions (cl-set-difference company-files-exclusions
dir-exclusions)))
(cl-loop for c in completions
unless (if (company-files--trailing-slash-p c)
(member c dir-exclusions)
(cl-find-if (lambda (exclusion)
(string-suffix-p exclusion c))
file-exclusions))
collect c)))
(defvar company-files--regexps
(let* ((root (if (eq system-type 'windows-nt)
"[a-zA-Z]:/"
"/"))
(begin (concat "\\(?:\\.\\{1,2\\}/\\|~/\\|" root "\\)")))
(list (concat "\"\\(" begin "[^\"\n]*\\)")
(concat "\'\\(" begin "[^\'\n]*\\)")
(concat "\\(?:[ \t=]\\|^\\)\\(" begin "[^ \t\n]*\\)"))))
(defun company-files--grab-existing-name ()
;; Grab the file name.
;; When surrounded with quotes, it can include spaces.
(let (file dir)
(and (cl-dolist (regexp company-files--regexps)
(when (setq file (company-grab-line regexp 1))
(cl-return file)))
(company-files--connected-p file)
(setq dir (file-name-directory file))
(not (string-match "//" dir))
(file-exists-p dir)
file)))
(defun company-files--connected-p (file)
(or (not (file-remote-p file))
(file-remote-p file nil t)))
(defun company-files--trailing-slash-p (file)
;; `file-directory-p' is very expensive on remotes. We are relying on
;; `file-name-all-completions' returning directories with trailing / instead.
(let ((len (length file)))
(and (> len 0) (eq (aref file (1- len)) ?/))))
(defvar company-files--completion-cache nil)
(defun company-files--complete (prefix)
(let* ((dir (file-name-directory prefix))
(file (file-name-nondirectory prefix))
(key (list file
(expand-file-name dir)
(nth 5 (file-attributes dir))))
(completion-ignore-case read-file-name-completion-ignore-case))
(unless (company-file--keys-match-p key (car company-files--completion-cache))
(let* ((candidates (mapcar (lambda (f) (concat dir f))
(company-files--directory-files dir file)))
(directories (unless (file-remote-p dir)
(cl-remove-if-not (lambda (f)
(and (company-files--trailing-slash-p f)
(not (file-remote-p f))
(company-files--connected-p f)))
candidates)))
(children (and directories
(cl-mapcan (lambda (d)
(mapcar (lambda (c) (concat d c))
(company-files--directory-files d "")))
directories))))
(setq company-files--completion-cache
(cons key (append candidates children)))))
(all-completions prefix
(cdr company-files--completion-cache))))
(defun company-file--keys-match-p (new old)
(and (equal (cdr old) (cdr new))
(string-prefix-p (car old) (car new))))
;;;###autoload
(defun company-files (command &optional arg &rest ignored)
"`company-mode' completion backend existing file names.
Completions works for proper absolute and relative files paths.
File paths with spaces are only supported inside strings."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-files))
(prefix (company-files--grab-existing-name))
(candidates (company-files--complete arg))
(location (cons (dired-noselect
(file-name-directory (directory-file-name arg))) 1))
(post-completion (when (company-files--trailing-slash-p arg)
(delete-char -1)))
(sorted t)
(no-cache t)))
(provide 'company-files)
;;; company-files.el ends here

View File

@@ -1,117 +0,0 @@
;;; company-gtags.el --- company-mode completion backend for GNU Global
;; Copyright (C) 2009-2011, 2014 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'company-template)
(require 'cl-lib)
(defgroup company-gtags nil
"Completion backend for GNU Global."
:group 'company)
(define-obsolete-variable-alias
'company-gtags-gnu-global-program-name
'company-gtags-executable "earlier")
(defcustom company-gtags-executable
(executable-find "global")
"Location of GNU global executable."
:type 'string)
(defcustom company-gtags-insert-arguments t
"When non-nil, insert function arguments as a template after completion."
:type 'boolean
:package-version '(company . "0.8.1"))
(defvar-local company-gtags--tags-available-p 'unknown)
(defcustom company-gtags-modes '(prog-mode jde-mode)
"Modes that use `company-gtags'.
In all these modes (and their derivatives) `company-gtags' will perform
completion."
:type '(repeat (symbol :tag "Major mode"))
:package-version '(company . "0.8.4"))
(defun company-gtags--tags-available-p ()
(if (eq company-gtags--tags-available-p 'unknown)
(setq company-gtags--tags-available-p
(locate-dominating-file buffer-file-name "GTAGS"))
company-gtags--tags-available-p))
(defun company-gtags--fetch-tags (prefix)
(with-temp-buffer
(let (tags)
(when (= 0 (process-file company-gtags-executable nil
;; "-T" goes through all the tag files listed in GTAGSLIBPATH
(list (current-buffer) nil) nil "-xGqT" (concat "^" prefix)))
(goto-char (point-min))
(cl-loop while
(re-search-forward (concat
"^"
"\\([^ ]*\\)" ;; completion
"[ \t]+\\([[:digit:]]+\\)" ;; linum
"[ \t]+\\([^ \t]+\\)" ;; file
"[ \t]+\\(.*\\)" ;; definition
"$"
) nil t)
collect
(propertize (match-string 1)
'meta (match-string 4)
'location (cons (expand-file-name (match-string 3))
(string-to-number (match-string 2)))
))))))
(defun company-gtags--annotation (arg)
(let ((meta (get-text-property 0 'meta arg)))
(when (string-match (concat arg "\\((.*)\\).*") meta)
(match-string 1 meta))))
;;;###autoload
(defun company-gtags (command &optional arg &rest ignored)
"`company-mode' completion backend for GNU Global."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-gtags))
(prefix (and company-gtags-executable
buffer-file-name
(apply #'derived-mode-p company-gtags-modes)
(not (company-in-string-or-comment))
(company-gtags--tags-available-p)
(or (company-grab-symbol) 'stop)))
(candidates (company-gtags--fetch-tags arg))
(sorted t)
(duplicates t)
(annotation (company-gtags--annotation arg))
(meta (get-text-property 0 'meta arg))
(location (get-text-property 0 'location arg))
(post-completion (let ((anno (company-gtags--annotation arg)))
(when (and company-gtags-insert-arguments anno)
(insert anno)
(company-template-c-like-templatify anno))))))
(provide 'company-gtags)
;;; company-gtags.el ends here

View File

@@ -1,82 +0,0 @@
;;; company-ispell.el --- company-mode completion backend using Ispell
;; Copyright (C) 2009-2011, 2013-2016 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'cl-lib)
(require 'ispell)
(defgroup company-ispell nil
"Completion backend using Ispell."
:group 'company)
(defcustom company-ispell-dictionary nil
"Dictionary to use for `company-ispell'.
If nil, use `ispell-complete-word-dict'."
:type '(choice (const :tag "default (nil)" nil)
(file :tag "dictionary" t)))
(defvar company-ispell-available 'unknown)
(defalias 'company-ispell--lookup-words
(if (fboundp 'ispell-lookup-words)
'ispell-lookup-words
'lookup-words))
(defun company-ispell-available ()
(when (eq company-ispell-available 'unknown)
(condition-case err
(progn
(company-ispell--lookup-words "WHATEVER")
(setq company-ispell-available t))
(error
(message "Company-Ispell: %s" (error-message-string err))
(setq company-ispell-available nil))))
company-ispell-available)
;;;###autoload
(defun company-ispell (command &optional arg &rest ignored)
"`company-mode' completion backend using Ispell."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-ispell))
(prefix (when (company-ispell-available)
(company-grab-word)))
(candidates
(let ((words (company-ispell--lookup-words
arg
(or company-ispell-dictionary ispell-complete-word-dict)))
(completion-ignore-case t))
(if (string= arg "")
;; Small optimization.
words
;; Work around issue #284.
(all-completions arg words))))
(sorted t)
(ignore-case 'keep-prefix)))
(provide 'company-ispell)
;;; company-ispell.el ends here

View File

@@ -1,306 +0,0 @@
;;; company-keywords.el --- A company backend for programming language keywords
;; Copyright (C) 2009-2011, 2016 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'company)
(require 'cl-lib)
(defun company-keywords-upper-lower (&rest lst)
;; Upcase order is different for _.
(nconc (sort (mapcar 'upcase lst) 'string<) lst))
(defvar company-keywords-alist
;; Please contribute corrections or additions.
`((c++-mode
"alignas" "alignof" "asm" "auto" "bool" "break" "case" "catch" "char"
"char16_t" "char32_t" "class" "const" "const_cast" "constexpr" "continue"
"decltype" "default" "delete" "do" "double" "dynamic_cast" "else" "enum"
"explicit" "export" "extern" "false" "final" "float" "for" "friend"
"goto" "if" "inline" "int" "long" "mutable" "namespace" "new" "noexcept"
"nullptr" "operator" "override"
"private" "protected" "public" "register" "reinterpret_cast"
"return" "short" "signed" "sizeof" "static" "static_assert"
"static_cast" "struct" "switch" "template" "this" "thread_local"
"throw" "true" "try" "typedef" "typeid" "typename"
"union" "unsigned" "using" "virtual" "void" "volatile" "wchar_t" "while")
(c-mode
"auto" "break" "case" "char" "const" "continue" "default" "do"
"double" "else" "enum" "extern" "float" "for" "goto" "if" "int" "long"
"register" "return" "short" "signed" "sizeof" "static" "struct"
"switch" "typedef" "union" "unsigned" "void" "volatile" "while")
(csharp-mode
"abstract" "add" "alias" "as" "base" "bool" "break" "byte" "case"
"catch" "char" "checked" "class" "const" "continue" "decimal" "default"
"delegate" "do" "double" "else" "enum" "event" "explicit" "extern"
"false" "finally" "fixed" "float" "for" "foreach" "get" "global" "goto"
"if" "implicit" "in" "int" "interface" "internal" "is" "lock" "long"
"namespace" "new" "null" "object" "operator" "out" "override" "params"
"partial" "private" "protected" "public" "readonly" "ref" "remove"
"return" "sbyte" "sealed" "set" "short" "sizeof" "stackalloc" "static"
"string" "struct" "switch" "this" "throw" "true" "try" "typeof" "uint"
"ulong" "unchecked" "unsafe" "ushort" "using" "value" "var" "virtual"
"void" "volatile" "where" "while" "yield")
(d-mode
;; from http://www.digitalmars.com/d/2.0/lex.html
"abstract" "alias" "align" "asm"
"assert" "auto" "body" "bool" "break" "byte" "case" "cast" "catch"
"cdouble" "cent" "cfloat" "char" "class" "const" "continue" "creal"
"dchar" "debug" "default" "delegate" "delete" "deprecated" "do"
"double" "else" "enum" "export" "extern" "false" "final" "finally"
"float" "for" "foreach" "foreach_reverse" "function" "goto" "idouble"
"if" "ifloat" "import" "in" "inout" "int" "interface" "invariant"
"ireal" "is" "lazy" "long" "macro" "mixin" "module" "new" "nothrow"
"null" "out" "override" "package" "pragma" "private" "protected"
"public" "pure" "real" "ref" "return" "scope" "short" "static" "struct"
"super" "switch" "synchronized" "template" "this" "throw" "true" "try"
"typedef" "typeid" "typeof" "ubyte" "ucent" "uint" "ulong" "union"
"unittest" "ushort" "version" "void" "volatile" "wchar" "while" "with")
(f90-mode .
;; from f90.el
;; ".AND." ".GE." ".GT." ".LT." ".LE." ".NE." ".OR." ".TRUE." ".FALSE."
,(company-keywords-upper-lower
"abs" "abstract" "achar" "acos" "adjustl" "adjustr" "aimag" "aint"
"align" "all" "all_prefix" "all_scatter" "all_suffix" "allocatable"
"allocate" "allocated" "and" "anint" "any" "any_prefix" "any_scatter"
"any_suffix" "asin" "assign" "assignment" "associate" "associated"
"asynchronous" "atan" "atan2" "backspace" "bind" "bit_size" "block"
"btest" "c_alert" "c_associated" "c_backspace" "c_bool"
"c_carriage_return" "c_char" "c_double" "c_double_complex" "c_f_pointer"
"c_f_procpointer" "c_float" "c_float_complex" "c_form_feed" "c_funloc"
"c_funptr" "c_horizontal_tab" "c_int" "c_int16_t" "c_int32_t" "c_int64_t"
"c_int8_t" "c_int_fast16_t" "c_int_fast32_t" "c_int_fast64_t"
"c_int_fast8_t" "c_int_least16_t" "c_int_least32_t" "c_int_least64_t"
"c_int_least8_t" "c_intmax_t" "c_intptr_t" "c_loc" "c_long"
"c_long_double" "c_long_double_complex" "c_long_long" "c_new_line"
"c_null_char" "c_null_funptr" "c_null_ptr" "c_ptr" "c_short"
"c_signed_char" "c_size_t" "c_vertical_tab" "call" "case" "ceiling"
"char" "character" "character_storage_size" "class" "close" "cmplx"
"command_argument_count" "common" "complex" "conjg" "contains" "continue"
"copy_prefix" "copy_scatter" "copy_suffix" "cos" "cosh" "count"
"count_prefix" "count_scatter" "count_suffix" "cpu_time" "cshift"
"cycle" "cyclic" "data" "date_and_time" "dble" "deallocate" "deferred"
"digits" "dim" "dimension" "distribute" "do" "dot_product" "double"
"dprod" "dynamic" "elemental" "else" "elseif" "elsewhere" "end" "enddo"
"endfile" "endif" "entry" "enum" "enumerator" "eoshift" "epsilon" "eq"
"equivalence" "eqv" "error_unit" "exit" "exp" "exponent" "extends"
"extends_type_of" "external" "extrinsic" "false" "file_storage_size"
"final" "floor" "flush" "forall" "format" "fraction" "function" "ge"
"generic" "get_command" "get_command_argument" "get_environment_variable"
"goto" "grade_down" "grade_up" "gt" "hpf_alignment" "hpf_distribution"
"hpf_template" "huge" "iachar" "iall" "iall_prefix" "iall_scatter"
"iall_suffix" "iand" "iany" "iany_prefix" "iany_scatter" "iany_suffix"
"ibclr" "ibits" "ibset" "ichar" "ieee_arithmetic" "ieee_exceptions"
"ieee_features" "ieee_get_underflow_mode" "ieee_set_underflow_mode"
"ieee_support_underflow_control" "ieor" "if" "ilen" "implicit"
"import" "include" "independent" "index" "inherit" "input_unit"
"inquire" "int" "integer" "intent" "interface" "intrinsic" "ior"
"iostat_end" "iostat_eor" "iparity" "iparity_prefix" "iparity_scatter"
"iparity_suffix" "ishft" "ishftc" "iso_c_binding" "iso_fortran_env"
"kind" "lbound" "le" "leadz" "len" "len_trim" "lge" "lgt" "lle" "llt"
"log" "log10" "logical" "lt" "matmul" "max" "maxexponent" "maxloc"
"maxval" "maxval_prefix" "maxval_scatter" "maxval_suffix" "merge"
"min" "minexponent" "minloc" "minval" "minval_prefix" "minval_scatter"
"minval_suffix" "mod" "module" "modulo" "move_alloc" "mvbits" "namelist"
"ne" "nearest" "neqv" "new" "new_line" "nint" "non_intrinsic"
"non_overridable" "none" "nopass" "not" "null" "nullify"
"number_of_processors" "numeric_storage_size" "only" "onto" "open"
"operator" "optional" "or" "output_unit" "pack" "parameter" "parity"
"parity_prefix" "parity_scatter" "parity_suffix" "pass" "pause"
"pointer" "popcnt" "poppar" "precision" "present" "print" "private"
"procedure" "processors" "processors_shape" "product" "product_prefix"
"product_scatter" "product_suffix" "program" "protected" "public"
"pure" "radix" "random_number" "random_seed" "range" "read" "real"
"realign" "recursive" "redistribute" "repeat" "reshape" "result"
"return" "rewind" "rrspacing" "same_type_as" "save" "scale" "scan"
"select" "selected_char_kind" "selected_int_kind" "selected_real_kind"
"sequence" "set_exponent" "shape" "sign" "sin" "sinh" "size" "spacing"
"spread" "sqrt" "stop" "subroutine" "sum" "sum_prefix" "sum_scatter"
"sum_suffix" "system_clock" "tan" "tanh" "target" "template" "then"
"tiny" "transfer" "transpose" "trim" "true" "type" "ubound" "unpack"
"use" "value" "verify" "volatile" "wait" "where" "while" "with" "write"))
(go-mode
;; 1. Keywords ref: https://golang.org/ref/spec#Keywords
;; 2. Builtin functions and types ref: https://golang.org/pkg/builtin/
"append" "bool" "break" "byte" "cap" "case" "chan" "close" "complex" "complex128"
"complex64" "const" "continue" "copy" "default" "defer" "delete" "else" "error"
"fallthrough" "false" "float32" "float64" "for" "func" "go" "goto" "if" "imag"
"import" "int" "int16" "int32" "int64" "int8" "interface" "len" "make"
"map" "new" "nil" "package" "panic" "print" "println" "range" "real" "recover"
"return" "rune" "select" "string" "struct" "switch" "true" "type" "uint" "uint16"
"uint32" "uint64" "uint8" "uintptr" "var")
(java-mode
"abstract" "assert" "boolean" "break" "byte" "case" "catch" "char" "class"
"continue" "default" "do" "double" "else" "enum" "extends" "final"
"finally" "float" "for" "if" "implements" "import" "instanceof" "int"
"interface" "long" "native" "new" "package" "private" "protected" "public"
"return" "short" "static" "strictfp" "super" "switch" "synchronized"
"this" "throw" "throws" "transient" "try" "void" "volatile" "while")
(javascript-mode
;; https://tc39.github.io/ecma262/ + async, static and undefined
"async" "await" "break" "case" "catch" "class" "const" "continue"
"debugger" "default" "delete" "do" "else" "enum" "export" "extends" "false"
"finally" "for" "function" "if" "import" "in" "instanceof" "let" "new"
"null" "return" "static" "super" "switch" "this" "throw" "true" "try"
"typeof" "undefined" "var" "void" "while" "with" "yield")
(kotlin-mode
"abstract" "annotation" "as" "break" "by" "catch" "class" "companion"
"const" "constructor" "continue" "data" "do" "else" "enum" "false" "final"
"finally" "for" "fun" "if" "import" "in" "init" "inner" "interface"
"internal" "is" "lateinit" "nested" "null" "object" "open" "out" "override"
"package" "private" "protected" "public" "return" "super" "this" "throw"
"trait" "true" "try" "typealias" "val" "var" "when" "while")
(objc-mode
"@catch" "@class" "@encode" "@end" "@finally" "@implementation"
"@interface" "@private" "@protected" "@protocol" "@public"
"@selector" "@synchronized" "@throw" "@try" "alloc" "autorelease"
"bycopy" "byref" "in" "inout" "oneway" "out" "release" "retain")
(perl-mode
;; from cperl.el
"AUTOLOAD" "BEGIN" "CHECK" "CORE" "DESTROY" "END" "INIT" "__END__"
"__FILE__" "__LINE__" "abs" "accept" "alarm" "and" "atan2" "bind"
"binmode" "bless" "caller" "chdir" "chmod" "chomp" "chop" "chown" "chr"
"chroot" "close" "closedir" "cmp" "connect" "continue" "cos"
"crypt" "dbmclose" "dbmopen" "defined" "delete" "die" "do" "dump" "each"
"else" "elsif" "endgrent" "endhostent" "endnetent" "endprotoent"
"endpwent" "endservent" "eof" "eq" "eval" "exec" "exists" "exit" "exp"
"fcntl" "fileno" "flock" "for" "foreach" "fork" "format" "formline"
"ge" "getc" "getgrent" "getgrgid" "getgrnam" "gethostbyaddr"
"gethostbyname" "gethostent" "getlogin" "getnetbyaddr" "getnetbyname"
"getnetent" "getpeername" "getpgrp" "getppid" "getpriority"
"getprotobyname" "getprotobynumber" "getprotoent" "getpwent" "getpwnam"
"getpwuid" "getservbyname" "getservbyport" "getservent" "getsockname"
"getsockopt" "glob" "gmtime" "goto" "grep" "gt" "hex" "if" "index" "int"
"ioctl" "join" "keys" "kill" "last" "lc" "lcfirst" "le" "length"
"link" "listen" "local" "localtime" "lock" "log" "lstat" "lt" "map"
"mkdir" "msgctl" "msgget" "msgrcv" "msgsnd" "my" "ne" "next" "no"
"not" "oct" "open" "opendir" "or" "ord" "our" "pack" "package" "pipe"
"pop" "pos" "print" "printf" "push" "q" "qq" "quotemeta" "qw" "qx"
"rand" "read" "readdir" "readline" "readlink" "readpipe" "recv" "redo"
"ref" "rename" "require" "reset" "return" "reverse" "rewinddir" "rindex"
"rmdir" "scalar" "seek" "seekdir" "select" "semctl" "semget" "semop"
"send" "setgrent" "sethostent" "setnetent" "setpgrp" "setpriority"
"setprotoent" "setpwent" "setservent" "setsockopt" "shift" "shmctl"
"shmget" "shmread" "shmwrite" "shutdown" "sin" "sleep" "socket"
"socketpair" "sort" "splice" "split" "sprintf" "sqrt" "srand" "stat"
"study" "sub" "substr" "symlink" "syscall" "sysopen" "sysread" "system"
"syswrite" "tell" "telldir" "tie" "time" "times" "tr" "truncate" "uc"
"ucfirst" "umask" "undef" "unless" "unlink" "unpack" "unshift" "untie"
"until" "use" "utime" "values" "vec" "wait" "waitpid"
"wantarray" "warn" "while" "write" "x" "xor" "y")
(php-mode
"__CLASS__" "__DIR__" "__FILE__" "__FUNCTION__" "__LINE__" "__METHOD__"
"__NAMESPACE__" "_once" "abstract" "and" "array" "as" "break" "case"
"catch" "cfunction" "class" "clone" "const" "continue" "declare"
"default" "die" "do" "echo" "else" "elseif" "empty" "enddeclare"
"endfor" "endforeach" "endif" "endswitch" "endwhile" "eval" "exception"
"exit" "extends" "final" "for" "foreach" "function" "global"
"goto" "if" "implements" "include" "instanceof" "interface"
"isset" "list" "namespace" "new" "old_function" "or" "php_user_filter"
"print" "private" "protected" "public" "require" "require_once" "return"
"static" "switch" "this" "throw" "try" "unset" "use" "var" "while" "xor")
(python-mode
;; https://docs.python.org/3/reference/lexical_analysis.html#keywords
"False" "None" "True" "and" "as" "assert" "break" "class" "continue" "def"
"del" "elif" "else" "except" "exec" "finally" "for" "from" "global" "if"
"import" "in" "is" "lambda" "nonlocal" "not" "or" "pass" "print" "raise"
"return" "try" "while" "with" "yield")
(ruby-mode
"BEGIN" "END" "alias" "and" "begin" "break" "case" "class" "def" "defined?"
"do" "else" "elsif" "end" "ensure" "false" "for" "if" "in" "module"
"next" "nil" "not" "or" "redo" "rescue" "retry" "return" "self" "super"
"then" "true" "undef" "unless" "until" "when" "while" "yield")
;; From https://doc.rust-lang.org/grammar.html#keywords
;; but excluding unused reserved words: https://www.reddit.com/r/rust/comments/34fq0k/is_there_a_good_list_of_rusts_keywords/cqucvnj
(rust-mode
"Self"
"as" "box" "break" "const" "continue" "crate" "else" "enum" "extern"
"false" "fn" "for" "if" "impl" "in" "let" "loop" "macro" "match" "mod"
"move" "mut" "pub" "ref" "return" "self" "static" "struct" "super"
"trait" "true" "type" "unsafe" "use" "where" "while")
(scala-mode
"abstract" "case" "catch" "class" "def" "do" "else" "extends" "false"
"final" "finally" "for" "forSome" "if" "implicit" "import" "lazy" "match"
"new" "null" "object" "override" "package" "private" "protected"
"return" "sealed" "super" "this" "throw" "trait" "true" "try" "type" "val"
"var" "while" "with" "yield")
(swift-mode
"Protocol" "Self" "Type" "and" "as" "assignment" "associatedtype"
"associativity" "available" "break" "case" "catch" "class" "column" "continue"
"convenience" "default" "defer" "deinit" "didSet" "do" "dynamic" "dynamicType"
"else" "elseif" "endif" "enum" "extension" "fallthrough" "false" "file"
"fileprivate" "final" "for" "func" "function" "get" "guard" "higherThan" "if"
"import" "in" "indirect" "infix" "init" "inout" "internal" "is" "lazy" "left"
"let" "line" "lowerThan" "mutating" "nil" "none" "nonmutating" "open"
"operator" "optional" "override" "postfix" "precedence" "precedencegroup"
"prefix" "private" "protocol" "public" "repeat" "required" "rethrows" "return"
"right" "selector" "self" "set" "static" "struct" "subscript" "super" "switch"
"throw" "throws" "true" "try" "typealias" "unowned" "var" "weak" "where"
"while" "willSet")
(julia-mode
"abstract" "break" "case" "catch" "const" "continue" "do" "else" "elseif"
"end" "eval" "export" "false" "finally" "for" "function" "global" "if"
"ifelse" "immutable" "import" "importall" "in" "let" "macro" "module"
"otherwise" "quote" "return" "switch" "throw" "true" "try" "type"
"typealias" "using" "while"
)
;; From https://github.com/apache/thrift/blob/master/contrib/thrift.el
(thrift-mode
"binary" "bool" "byte" "const" "double" "enum" "exception" "extends"
"i16" "i32" "i64" "include" "list" "map" "oneway" "optional" "required"
"service" "set" "string" "struct" "throws" "typedef" "void"
)
;; aliases
(js2-mode . javascript-mode)
(js2-jsx-mode . javascript-mode)
(espresso-mode . javascript-mode)
(js-mode . javascript-mode)
(js-jsx-mode . javascript-mode)
(rjsx-mode . javascript-mode)
(cperl-mode . perl-mode)
(jde-mode . java-mode)
(ess-julia-mode . julia-mode)
(enh-ruby-mode . ruby-mode))
"Alist mapping major-modes to sorted keywords for `company-keywords'.")
;;;###autoload
(defun company-keywords (command &optional arg &rest ignored)
"`company-mode' backend for programming language keywords."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-keywords))
(prefix (and (assq major-mode company-keywords-alist)
(not (company-in-string-or-comment))
(or (company-grab-symbol) 'stop)))
(candidates
(let ((completion-ignore-case nil)
(symbols (cdr (assq major-mode company-keywords-alist))))
(all-completions arg (if (consp symbols)
symbols
(cdr (assq symbols company-keywords-alist))))))
(sorted t)))
(provide 'company-keywords)
;;; company-keywords.el ends here

View File

@@ -1,143 +0,0 @@
;;; company-nxml.el --- company-mode completion backend for nxml-mode
;; Copyright (C) 2009-2011, 2013, 2018 Free Software Foundation, Inc.
;; Author: Nikolaj Schumacher
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; In Emacs >= 26, company-capf is used instead.
;;; Code:
(require 'company)
(require 'cl-lib)
(defvar rng-open-elements)
(defvar rng-validate-mode)
(defvar rng-in-attribute-regex)
(defvar rng-in-attribute-value-regex)
(declare-function rng-set-state-after "rng-nxml")
(declare-function rng-match-possible-start-tag-names "rng-match")
(declare-function rng-adjust-state-for-attribute "rng-nxml")
(declare-function rng-match-possible-attribute-names "rng-match")
(declare-function rng-adjust-state-for-attribute-value "rng-nxml")
(declare-function rng-match-possible-value-strings "rng-match")
(defconst company-nxml-token-regexp
"\\(?:[_[:alpha:]][-._[:alnum:]]*\\_>\\)")
(defvar company-nxml-in-attribute-value-regexp
(replace-regexp-in-string "w" company-nxml-token-regexp
"<w\\(?::w\\)?\
\\(?:[ \t\r\n]+w\\(?::w\\)?[ \t\r\n]*=\
\[ \t\r\n]*\\(?:\"[^\"]*\"\\|'[^']*'\\)\\)*\
\[ \t\r\n]+\\(w\\(:w\\)?\\)[ \t\r\n]*=[ \t\r\n]*\
\\(\"\\([^\"]*\\>\\)\\|'\\([^']*\\>\\)\\)\\="
t t))
(defvar company-nxml-in-tag-name-regexp
(replace-regexp-in-string "w" company-nxml-token-regexp
"<\\(/?w\\(?::w?\\)?\\)?\\=" t t))
(defun company-nxml-all-completions (prefix alist)
(let ((candidates (mapcar 'cdr alist))
(case-fold-search nil)
filtered)
(when (cdar rng-open-elements)
(push (concat "/" (cdar rng-open-elements)) candidates))
(setq candidates (sort (all-completions prefix candidates) 'string<))
(while candidates
(unless (equal (car candidates) (car filtered))
(push (car candidates) filtered))
(pop candidates))
(nreverse filtered)))
(defmacro company-nxml-prepared (&rest body)
(declare (indent 0) (debug t))
`(let ((lt-pos (save-excursion (search-backward "<" nil t)))
xmltok-dtd)
(when (and lt-pos (= (rng-set-state-after lt-pos) lt-pos))
,@body)))
(defun company-nxml-tag (command &optional arg &rest ignored)
(cl-case command
(prefix (and (derived-mode-p 'nxml-mode)
rng-validate-mode
(company-grab company-nxml-in-tag-name-regexp 1)))
(candidates (company-nxml-prepared
(company-nxml-all-completions
arg (rng-match-possible-start-tag-names))))
(sorted t)))
(defun company-nxml-attribute (command &optional arg &rest ignored)
(cl-case command
(prefix (and (derived-mode-p 'nxml-mode)
rng-validate-mode
(memq (char-after) '(?\ ?\t ?\n)) ;; outside word
(company-grab rng-in-attribute-regex 1)))
(candidates (company-nxml-prepared
(and (rng-adjust-state-for-attribute
lt-pos (- (point) (length arg)))
(company-nxml-all-completions
arg (rng-match-possible-attribute-names)))))
(sorted t)))
(defun company-nxml-attribute-value (command &optional arg &rest ignored)
(cl-case command
(prefix (and (derived-mode-p 'nxml-mode)
rng-validate-mode
(and (memq (char-after) '(?' ?\" ?\ ?\t ?\n)) ;; outside word
(looking-back company-nxml-in-attribute-value-regexp nil)
(or (match-string-no-properties 4)
(match-string-no-properties 5)
""))))
(candidates (company-nxml-prepared
(let (attr-start attr-end colon)
(and (looking-back rng-in-attribute-value-regex lt-pos)
(setq colon (match-beginning 2)
attr-start (match-beginning 1)
attr-end (match-end 1))
(rng-adjust-state-for-attribute lt-pos attr-start)
(rng-adjust-state-for-attribute-value
attr-start colon attr-end)
(all-completions
arg (rng-match-possible-value-strings))))))))
;;;###autoload
(defun company-nxml (command &optional arg &rest ignored)
"`company-mode' completion backend for `nxml-mode'."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-nxml))
(prefix (or (company-nxml-tag 'prefix)
(company-nxml-attribute 'prefix)
(company-nxml-attribute-value 'prefix)))
(candidates (cond
((company-nxml-tag 'prefix)
(company-nxml-tag 'candidates arg))
((company-nxml-attribute 'prefix)
(company-nxml-attribute 'candidates arg))
((company-nxml-attribute-value 'prefix)
(sort (company-nxml-attribute-value 'candidates arg)
'string<))))
(sorted t)))
(provide 'company-nxml)
;;; company-nxml.el ends here

Some files were not shown because too many files have changed in this diff Show More