commit cd89909a94fb8bb3e711ba4c8cf2f98b129419b1 from: Lukas Henkel date: Sat Apr 06 18:33:00 2024 UTC Revert "Install company" This reverts commit 4d570bd524cea55c186027d15305bcca3895af3f. commit - 2418fb342289f176ca52629b715d9aaddde025b2 commit + cd89909a94fb8bb3e711ba4c8cf2f98b129419b1 blob - f2d7708731994d9bf30d2bddeed48a840c20e8ef (mode 644) blob + /dev/null --- elpa/company-0.10.2/.dir-locals.el +++ /dev/null @@ -1,7 +0,0 @@ -((nil . ((indent-tabs-mode . nil) - (fill-column . 80) - (sentence-end-double-space . t) - (emacs-lisp-docstring-fill-column . 75) - (project-vc-merge-submodules . nil))) - (makefile-mode . ((indent-tabs-mode . t))) - (texinfo-mode . ((fill-column . 70)))) blob - c6ea4a01a27479a73f35ea7290a8dc536ed684fd (mode 644) blob + /dev/null --- elpa/company-0.10.2/.elpaignore +++ /dev/null @@ -1,6 +0,0 @@ -.travis.yml -.github -.gitignore -Makefile -test -company-tests.el blob - 74c6a2d5f132a5e5737b7b89e5c8c09d48213ee7 (mode 644) blob + /dev/null --- elpa/company-0.10.2/CONTRIBUTING.md +++ /dev/null @@ -1,69 +0,0 @@ -# Contributing to Company - -### Fixes and Improvements - -You're welcome to open a [`pull request`](https://docs.github.com/en/github/collaborating-with-pull-requests) -or send a patch with the changes. -For non-trivial updates, please clearly describe the problem and the solution. - -If you're looking for *a challenge*, go grab an Issue with the -[`wishlist` label](https://github.com/company-mode/company-mode/issues?q=is%3Aissue+is%3Aopen+label%3Awishlist). - -If you have *a question* on where to start implementing a feature, -ask in a related [Issue](https://github.com/company-mode/company-mode/issues) -or create a new [Discussion](https://github.com/company-mode/company-mode/discussions). - - -### Documentation - -Help on improving, fixing, and writing documentation is also wanted. -See these ideas on where to start: -- Add and edit pages in [`Company` Wiki](https://github.com/company-mode/company-mode/wiki). -- Share your findings in [`Discussions`](https://github.com/company-mode/company-mode/discussions/categories/show-and-tell). -- Improve the [user manual](https://github.com/company-mode/company-mode/issues/926). - - -### Backend Integration - -New backends are rarely accepted for inclusion into `Company` at this stage. - -Our common recommendation for new backends is one of the following: -- Publish a backend to (M)ELPA. -- Create a `*-completion-at-point` function for a call by `completion-at-point-functions`. - -Feel free to [ask](https://github.com/company-mode/company-mode/discussions) -if you're hesitating which approach to choose. - - -### Guidelines for Third-Party Packages - -This section was born as a result of the question asked in -[Issue #923](https://github.com/company-mode/company-mode/issues/923). - -There are two preferred ways to integrate a third-party package with `Company`. - -1. Use `completion-at-point-functions` and convey extra information through the -`:company-*` additional properties (like e.g. `elisp-completion-at-point` does). -In this scenario, some minor mode can and should call `add-hook`. - -2. Define a `Company` backend (as described in `Commentary` at the top of -`company.el` and in `company-backends` docstring). -Then, in the documentation, describe how you recommend it to be used. - - -Buffer-local values are allowed, but usually not necessary. -If a backend is added globally, checking a major mode in the prefix function is a must. - -Examples: -- https://github.com/pythonic-emacs/company-anaconda#usage -- https://github.com/vspinu/company-math#activation - - -### Copyright Assignment - -`Company` is subject to the same [copyright assignment](https://www.fsf.org/licensing/contributor-faq) -policy as `GNU Emacs`. - -Any [legally significant](https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html#Legally-Significant) -contributions can only be merged after the author has completed their paperwork. -Please ask for the request form, and we'll send it to you. blob - f288702d2fa16d3cdf0035b15a9fcbc552cd88e7 (mode 644) blob + /dev/null --- elpa/company-0.10.2/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. blob - 0ccfafc6bca1b2d034320ddc3721606753212055 (mode 644) blob + /dev/null --- elpa/company-0.10.2/NEWS.md +++ /dev/null @@ -1,645 +0,0 @@ -# History of user-visible changes - -## 2023-10-08 (0.10.2) - -* More `company-auto-update-doc`-related fixes. -* Better handling of `C-g` performed inside a `doc-buffer` handler - ([#1408](https://github.com/company-mode/company-mode/issues/1408)). - -## 2023-10-06 (0.10.1) - -* Fix upgrading from 0.9.13 when the package is already loaded - ([#1406](https://github.com/company-mode/company-mode/issues/1406)). - -## 2023-10-04 (0.10.0) - -* `company-echo-show` (and related featuers, most importantly, - `company-echo-metadata-frontend`) now should stop interfering with the echo - area and ElDoc when the current backend returns no `meta`. -* New user option `company-tooltip-annotation-padding` - ([#1376](https://github.com/company-mode/company-mode/discussions/1376)). -* When a snippet name is typed in full, completion does not abort now (only - affects completions which have `snippet` kind), - ([#205](https://github.com/company-mode/company-mode/issues/205)). -* `company-show-doc-buffer` now can accept a prefix argument to toggle a new - variable `company-auto-update-doc`. When this variable is non-nil, it keeps - the documentation buffer up-to-date whenever the selection changes - ([#1331](https://github.com/company-mode/company-mode/discussions/1331)). -* `company-auto-commit` and `company-auto-commit-chars` have been renamed to - `company-insertion-on-trigger` and `company-insertion-triggers` respectively - ([#1270](https://github.com/company-mode/company-mode/pull/1270)). -* New command `company-complete-common-or-show-delayed-tooltip` - ([#1214](https://github.com/company-mode/company-mode/discussions/1214)). -* Faces `company-scrollbar-fg` and `company-scrollbar-bg` have been renamed to - `company-tooltip-scrollbar-thumb` and `company-tooltip-scrollbar-track` - respectively. -* Better compatibility with `visual-line-mode` - ([#1257](https://github.com/company-mode/company-mode/issues/1257)). -* Better compatibility with `org-indent-mode` - ([#1252](https://github.com/company-mode/company-mode/issues/1252)). -* New backend command, `deprecated`. It returns whether the completion item is - deprecated or not. -* `company-tooltip-common` highlightings with non-prefix and prefix matching - backends are more compatible: if the non-prefix matching backend's completions - all have a common part, and so the current prefix can be expanded with - `company-complete-common`, that part is now also highlighted with that face - ([#519](https://github.com/company-mode/company-mode/issues/519)). -* `company-yasnippet` respects the `condition` directive in snippets - ([#1179](https://github.com/company-mode/company-mode/issues/1179)). -* New user option `company-icon-margin`. -* `company-show-numbers` has been renamed to `company-show-quick-access` - ([#1115](https://github.com/company-mode/company-mode/pull/1115)). - New user options `company-quick-access-keys` and - `company-quick-access-modifier`. - New command `company-complete-quick-access`. - `company-show-numbers-function` has been deprecated and its default - value changed to `nil`. Use `company-quick-access-hint-function` - instead. `company--show-numbers` has been deprecated. -* `company-complete-number` has been renamed to - `company-complete-tooltip-row` - ([#1118](https://github.com/company-mode/company-mode/pull/1118)). -* New faces `company-tooltip-quick-access` and - `company-tooltip-quick-access-selection` - ([#303](https://github.com/company-mode/company-mode/issues/303)). -* Default colors for dark themes have been changed - ([#949](https://github.com/company-mode/company-mode/issues/949)). -* Default key bindings have been changed, moving `company-select-next` and - `company-select-previous` from `M-n` and `M-p` to `C-n` and `C-p` - ([#1098](https://github.com/company-mode/company-mode/pull/1098)). The bound - commands are also changed: `company-select-next-or-abort` and - `company-select-previous-or-abort`, to match the `` and `` - bindings. The previous bindings still work, but show a warning and will be - disabled soon. To undo that change locally, do: - -```el -(with-eval-after-load 'company - (dolist (map (list company-active-map company-search-map)) - (define-key map (kbd "C-n") nil) - (define-key map (kbd "C-p") nil) - (define-key map (kbd "M-n") #'company-select-next) - (define-key map (kbd "M-p") #'company-select-previous))) -``` - -* New user option `company-files-chop-trailing-slash` - ([#1042](https://github.com/company-mode/company-mode/issues/1042)). -* Improved visual responsiveness with (but not limited to) async backends - ([#1073](https://github.com/company-mode/company-mode/issues/1073)). New user - option `company-async-redisplay-delay`. -* `company-idle-delay` default reduced to 0.2 (seconds). -* The minimum required version of Emacs is now 25.1. -* Added support for icons - ([#1070](https://github.com/company-mode/company-mode/pull/1070)). - New user option `company-format-margin-function`. New backend command - `kind`. There are two built-in SVG icon sets, one for light and another for - dark icons. The default behavior is to choose the best one for the current - theme automatically, or if the current frame is non-graphical or simply does - not support rendering SVG images, fall back to text-based "icons". -* User options `company-text-icons-mapping` and - `company-text-icons-add-background` control the looks and additional - decoration for the latter - ([#1088](https://github.com/company-mode/company-mode/issues/1088)). -* New user option `company-abort-on-unique-match` - ([#1046](https://github.com/company-mode/company-mode/issues/1046)). -* `company-select-mouse` is a new frontend action - ([#1045](https://github.com/company-mode/company-mode/pull/1045)). -* `company-gtags` on remote hosts is improved - ([#1037](https://github.com/company-mode/company-mode/pull/1037)). -* New commands `company-select-first` and `company-select-last`. -* `company-tng-mode` has been added to replace both - `company-tng-configure-default` and the manual method of enabling - `company-tng-frontend` (see also `company-tng-auto-configure`). Also, - `company-selection` can now have `nil` value, which means no selection. -* `company-auto-complete` and `company-auto-complete-chars` have been renamed to - `company-auto-commit` and `company-auto-commit-chars` respectively. -* `company-clang` filters out duplicates - ([#841](https://github.com/company-mode/company-mode/issues/841)). -* New user option `company-tooltip-width-grow-only`. -* `company-xcode` has been removed. It has not been useful for years now. -* `company-clang` has been moved to after `company-capf` in the default value of - `company-backends`. So now if there is an active completion function in - `completion-at-point-functions`, it will have priority over - `company-clang`. Unless it's `tags-completion-at-point-function` (this one is - still skipped explicitly). -* `company-eclim` has been removed. Eclim is generally not recommended for Emacs - users these days, with - ([emacs-eclim](https://github.com/emacs-eclim/emacs-eclim/)) declared obsolete - in favor of `lsp-java`. Though it used its own backend anyway. - -## 2020-07-26 (0.9.13) - -* `company-clang`: error handling is more permissive. -* `company-tng` stops disabling `post-completion` in backends - ([#946](https://github.com/company-mode/company-mode/pull/946)). Instead, - `company-tng-configure-default` disables snippet expansion in most popular - backends. If a backend you use needs this and is not covered, and you use - `company-tng`, disable snippet insertion by customizing a relevant option - provided by the backend. The result is better compatibility with LSP backends - because they currently depend on `post-completion` in all cases. -* `company-keywords`: additions for C and C++. -* `company-yasnippet` supports the `doc-buffer` action. -* `company-bbdb` supports more headers. - -## 2020-02-07 (0.9.12) - -* Tooltip rendering bugfix. -* `company-indent-or-complete-common` is better compatible with - `indent-for-tab-command` - ([comment](https://github.com/company-mode/company-mode/issues/94#issuecomment-571265393)). - -## 2020-01-03 (0.9.11) - -* New value for option `company-show-numbers` to show numbers on the left. -* `company-gtags` has some minor fixes. -* Face definitions have moved to a separate group: `company-faces`. -* `company-capf`'s `:exit-function` handling has been improved - ([#935](https://github.com/company-mode/company-mode/issues/935)). -* New user option `company-clang-use-compile-flags-txt` - ([#933](https://github.com/company-mode/company-mode/issues/933)). -* Support for completion style specific sorting (Emacs 27 feature). -* Snippet/template field interaction is inhibited while completion is active - (where by default `TAB` calls `company-complete-common`, clashing with snippet - map binding `TAB` to "jump to the next field"). Affects both - `company-template` and `yasnippet` (requires version 0.14.0). - -## 2019-04-15 (0.9.10) - -* `company-clang`: better compatibility with Clang 8 - ([#885](https://github.com/company-mode/company-mode/issues/885)). -* The change in `company-clang` regarding identity #defines is reverted because - it affected other completions as well - ([#884](https://github.com/company-mode/company-mode/issues/884)). -* `company-idle-delay` now accepts a function which generates the idle time or - nil indicating no idle completion. -* Add custom variable `company-show-numbers-function` to make numbers of - candidates customizable. -* When a symbol is already typed in full, calling `M-x company-complete` will - now run its post-completion action (e.g. inserting method parameters - template). Calling `M-x company-manual-begin` or invoking a backend command - directly will show the popup - ([#150](https://github.com/company-mode/company-mode/issues/150), - [#476](https://github.com/company-mode/company-mode/issues/476)). - -## 2018-12-13 (0.9.9) - -* Fix for the changes in the previous release. -* New hook `company-after-completion-hook`. -* `company-clang` removes identity preprocessor #defines from completions - ([#841](https://github.com/company-mode/company-mode/issues/841)). - -## 2018-12-08 (0.9.8) - -* CAPF backend fixed to use the right `:exit-function`. It can now safely be a - closure with lexical context capturing the buffer state at the moment when the - completion table was returned - ([#845](https://github.com/company-mode/company-mode/pull/845)). - -## 2018-11-06 (0.9.7) - -* For more sophisticated highlighting in non-prefix completion, a backend may - now respond to a `match` request with a list of regions. See - `company-backends`. - ([#798](https://github.com/company-mode/company-mode/issues/798), - [#762](https://github.com/company-mode/company-mode/issues/762)) -* The `company-capf` backend will pick up on a `:company-match` metadata element - on the capf function (similar to `:company-location` or `:company-doc-buffer`) - and use it as a response to aforementioned `match` request. -* `company-cmake` supports completion inside string interpolations - ([#714](https://github.com/company-mode/company-mode/pull/714)). -* Workaround for the conflict between `inferior-python-mode`'s completion code - and `company-sort-by-occurrence`. -* In Emacs 26 and newer, `company-css` is removed from `company-backends`. - `company-capf` is used instead. -* Same for `company-nxml`. - -## 2018-02-23 (0.9.6) - -* Workaround for Emacs' ([bug#23980](https://debbugs.gnu.org/23980)) triggered - in combination with Flyspell. - -## 2018-02-18 (0.9.5) - -* The most common case of tooltip flickering with asynchronous backends (and - disabled built-in cache) is fixed - ([#510](https://github.com/company-mode/company-mode/issues/510), - [#654](https://github.com/company-mode/company-mode/issues/654)). -* `company-keywords` added entries for `go-mode`, `swift-mode` and - `kotlin-mode`. -* Native line numbers compatibility fixes. -* `company-dabbrev` and `company-dabbrev-code` are more responsive when user - input is pending - ([#720](https://github.com/company-mode/company-mode/pull/720)). -* New feature `company-tng`. It contains a frontend and some helper code. - The frontend triggers insertion of the candidate as soon as it's selected, so - you only need to press TAB. Add `(company-tng-configure-default)` to your - init script to give it a try - ([#706](https://github.com/company-mode/company-mode/issues/706)). -* New user option `company-tooltip-maximum-width`. - -## 2017-07-15 (0.9.4) - -* Compatibility with native line numbers display in Emacs 26. -* `company-files` allows completion after `=`. -* `company-template` has a new shortcut (`C-d`) for deleting an unmodified - template field while cursor is on it. - -## 2017-03-29 (0.9.3) - -* New user option `company-echo-truncate-lines`. -* `company-auto-complete` improved compatibility with `electric-pair-mode`. -* Use of `overriding-terminal-local-map` does not disable completion. -* `company-clang` and `company-gtags` can work over Tramp. -* New frontend `company-preview-common-frontend`. -* `company-clang` calls Clang using a pipe instead of pty. -* The minimum required version of Emacs is now 24.3. - -## 2016-11-14 (0.9.2) - -* Miscellaneous fixes and docstring improvements. - -## 2016-11-12 (0.9.1) - -* `company-indent-or-complete-common` skips trying to indent if - `indent-line-function` is `indent-relative` or `indent-relative-maybe`. -* Better visualization of search matches. New face `company-tooltip-search-selection`. -* New user option `company-files-exclusions`. -* `company-next-page` and `company-previous-page` adhere to - `company-selection-wrap-around` docstring more closely and only wrap around - when the selection is at the start of the end of the list. -* `company-pseudo-tooltip-unless-just-one-frontend-with-delay` handles custom - frontends derived from `company-preview-frontend` better. -* `company-idle-delay` is automatically adjusted to a non-zero value. - -## 2016-06-23 (0.9.0) - -* Group of backends can now contain keyword `:separate`, which makes candidates - from different backends sorted separately in the combined list. -* New frontend `company-pseudo-tooltip-unless-just-one-frontend-with-delay`. -* New transformer `company-sort-prefer-same-case-prefix`. -* The value of `company-dabbrev-ignore-buffers` can also be a function. -* `company-files` has been moved to right after `company-capf` in - `company-backends` - ([#463](https://github.com/company-mode/company-mode/issues/463)). -* `company-semantic-insert-arguments`: New option. Like in `company-clang`. -* `company-semantic-begin-after-member-access`: New option. Similar to the one - in `company-clang`. -* `company-capf` accepts `:company-prefix-length` property value. -* New face `company-tooltip-annotation-selection`, used for the annotation in - the selected tooltip line. -* `company-clang-objc-templatify` has been renamed to - `company-template-objc-templatify`. -* New user option `company-etags-everywhere`. -* `company-yasnippet` supports `yas-key-syntaxes` better. But we use them in the - reverse order, preferring the longest key prefix that matches anything. And we - only consider trigger key prefixes that are at least as long as the symbol at - point, which effectively means skipping the `"w"` element - ([#422](https://github.com/company-mode/company-mode/issues/422)). -* New user option `company-search-regexp-function`. -* Completion is not started automatically when a keyboard macro is being - recorded ([#374](https://github.com/company-mode/company-mode/issues/374)). -* New command `company-indent-or-complete-common`. -* Backend command `doc-buffer` now can also return a cons of buffer and window - start position. -* Backend command `ignore-case` has been documented. -* `company-template-c-like-templatify` does not replace the default argument - values with `argN` anymore - ([#336](https://github.com/company-mode/company-mode/issues/336)). This - affects `company-clang` and all third-party backends that use this function. -* Likewise for `company-clang-objc-templatify`. -* `company-template-add-field` calling convention has changed. -* New user option `company-dabbrev-ignore-invisible`. -* `company-ropemacs` was removed. `ropemacs` supports completion via - `completion-at-point-functions` starting with version 0.8. -* `company-pysmell` was removed. -* `company-select-next`, `company-select-previous`, - `company-select-next-or-abort`, `company-select-previous-or-abort` and - `company-complete-common-or-cycle` accept a numeric argument. -* The documentation buffer window can be scrolled with the mouse wheel. -* New command `company-diag`. Use it in bug reports. - -## 2015-02-02 (0.8.10) - -* New variable `company-lighter-base`. -* Better tracking of the current selection. -* Pressing `M-0`...`M-9` works in the search mode. -* Pressing `` or `` doesn't quit the search mode. - -## 2015-01-23 (0.8.9) - -* New commands `company-next-page` and `company-previous-page`, remapping - `scroll-up-command` and `scroll-down-command` during completion. - -## 2015-01-13 (0.8.8) - -* Pressing `M-n` or `M-p` doesn't quit the search mode. -* New command `company-complete-common-or-cycle`. No default binding. -* `company-search-toggle-filtering` replaced `company-search-kill-others`. -* Quitting the search mode resets the filtering. -* Pressing `backspace` in the search mode deletes the character at the end of - the search string. -* `company-semantic` displays function arguments as annotations. -* New user option, `company-bbdb-modes`. -* `company-show-numbers` and `company-complete-number` now use visual numbering - of the candidates, taking into account only the ones currently displayed. -* `company-complete-number` can be bound to keypad numbers directly, with or - without modifiers. -* `company-cmake` expands `` and `` placeholders inside variable - names. - -## 2014-10-15 (0.8.6) - -* `company-clang` and `company-template-c-like-templatify` support templated - functions and arguments. -* `company-dabbrev` ignores "uninteresting" buffers by default. Depends on the - new user option, `company-dabbrev-ignore-buffers`. -* `company-files` checks directory's last modification time. -* `company-files` supports relative paths and Windows drive letters. - -## 2014-08-13 (0.8.4) - -* `company-ropemacs` is only used when `ropemacs-mode` is on. -* `company-gtags` is enabled in all `prog-mode` derivatives by default. -* `company-end-of-buffer-workaround` is not used anymore. -* `company-begin-commands` includes some of `cc-mode` commands. - -## 2014-08-27 (0.8.3) - -* On Emacs 24.4 or newer, tooltip positioning takes line-spacing into account. -* New face `company-tooltip-search`, used for the search string in the tooltip. -* The default value of `company-dabbrev-minimum-length` is set to 4, independent - of the `company-minimum-prefix-length` value. - -## 2014-07-26 (0.8.2) - -* New user option `company-occurrence-weight-function`, allowing to tweak the - behavior of the transformer `company-sort-by-occurrence`. -* Setting `company-idle-delay` to `t` is deprecated. Use the value 0 instead. - -## 2014-07-01 (0.8.1) - -* `company-require-match` is not in effect when the new input doesn't continue - the previous prefix, and that prefix was a match. -* The meaning of `company-begin-commands` value t has slightly changed. -* New transformer, `company-sort-by-backend-importance`. -* When grouped back-ends are used, the back-end of the current candidate is - indicated in the mode-line, enclosed in angle brackets. -* New user option `company-gtags-insert-arguments`, t by default. -* `company-css` knows about CSS3. -* `company-gtags` supports `meta` and `annotation`. -* User option `company-dabbrev-code-other-buffers` can have a new value: `code`. -* New user option `company-tooltip-flip-when-above`. -* `company-clang` uses the standard header search paths by default. -* `C-h` is bound to `company-show-doc-buffer` (like `f1`). - -## 2014-04-19 (0.8.0) - -* `company-capf` is included in `company-backends` in any supported Emacs - version (>= 24.1). `company-elisp` goes before it if Emacs version is < 24.4. -* New user option `company-clang-insert-arguments`, by default t. -* Default value of `company-idle-delay` lowered to `0.5`. -* New user option `company-tooltip-minimum-width`, by default 0. -* New function `company-grab-symbol-cons`. -* `company-clang` fetches completion candidates asynchronously. -* Added support for asynchronous back-ends (experimental). -* Support for back-end command `crop` dropped (it was never documented). -* Support for Emacs 23 dropped. -* New user option `company-abort-manual-when-too-short`. - -## 2014-03-25 (0.7.3) - -* New user option `company-etags-ignore-case`. - -## 2014-03-19 (0.7.2) - -* Support for Emacs 22 officially dropped. -* `company-clang` supports `indent-tabs-mode` and multibyte chars before point. - -## 2014-03-18 (0.7.1) - -* Group of back-ends can now contain keyword `:with`, which makes all back-ends - after it to be skipped for prefix calculation. -* New function `company-version`. -* New bundled back-end `company-yasnippet`. -* Completion candidates returned from grouped back-ends are tagged to remember - which back-end each came from. -* New user option `company-tooltip-align-annotations`, off by default. -* New bundled back-end `company-bbdb`. - -## 2014-02-18 (0.7) - -* New back-end command, `match`, for non-prefix completion. -* New user option `company-continue-commands`. The default value aborts - completion on buffer saving commands. -* New back-end command, `annotation`, for text displayed inline in the popup - that's not a part of completion candidate. -* `company-capf`, `company-clang` and `company-eclim` use `annotation`. -* `company-preview*` faces inherit from `company-tooltip-selection` and - `company-tooltip-common-selection` on light themes. -* New user option `company-transformers`. -* First transformer, `company-sort-by-occurrence`. -* New user options controlling `company-dabbrev` and `company-dabbrev-code`. - -## 2014-01-25 (0.6.14) - -* The tooltip front-end is rendered with scrollbar, controlled by the user - option `company-tooltip-offset-display`. -* The tooltip front-end is rendered with margins, controlled by the user option - `company-tooltip-margin`. - -## 2014-01-14 (0.6.13) - -* Experimental support for non-prefix completion. -* Starting with Emacs version 24.4, `company-capf` is included in - `company-backends` and replaces `company-elisp`. -* `company-capf` supports completion tables that return non-default boundaries. -* `company-elisp` is enabled in `inferior-emacs-lisp-mode`. - -## 2013-09-28 (0.6.12) - -* Default value of `company-begin-commands` changed to `(self-insert-command)`. -* Further improvement in `org-indent-mode` compatibility. - -## 2013-08-18 (0.6.11) - -* `company-template-c-like-templatify` removes all text after closing paren, for - use in backends that display additional info there. -* `company-cmake` is now bundled. -* Better `linum` compatibility in Emacs <= 24.2. -* `company-global-modes`: New option. - -## 2013-05-26 (0.6.10) - -* Plays nicer with `org-indent-mode`. -* Works in horizontally scrolled windows. - -## 2013-05-10 (0.6.9) - -* `company-capf` respects `:exit-function` completion property. -* `company-backends`: `prefix` command can return `t` in the cdr. -* `company-clang-begin-after-member-access`: New option. -* Mouse click outside the tooltip aborts completion. -* `company-clang` uses standard input to pass the contents of current buffer to - Clang 2.9+, otherwise saves the buffer and passes the path to the file. -* `company-clang-auto-save` option has been removed. -* Better interaction with `outline-minor-mode`. -* `company-dabbrev-code` supports all `prog-mode` derivatives. - -## 2013-04-16 (0.6.8) - -* `company-auto-complete` is disabled by default. -* `company-auto-complete-chars` default value includes fewer syntax classes. -* In expanded function calls, arguments skipped by the user default to "argN". -* `company-eclim` and `company-clang` do not strip argument types from fields. -* `company-clang` expands function calls for all three modes now. -* `company-clang` supports `c++-mode` by default. - -## 2013-04-05 (0.6.7) - -* Two `company-elisp` tweaks. - -## 2013-04-01 (0.6.6) - -* `company-elisp` doesn't offer completions when typing the name and the - arguments of a new function or macro definition, allowing to fall back to - other back-ends like `company-dabbrev-code`. - -## 2013-03-30 (0.6.5) - -* Fixed keybindings when running in a terminal. -* `company-elisp-show-locals-first`: new customizable variable. -* `company-elisp` shows more accurate and comprehensive candidates list. - -## 2013-03-26 (0.6.4) - -* `company-eclim` shows valid completions after an opening paren. -* Expanded template does not get removed until the point leaves it. After your - input the last argument in a method call expanded by `company-eclim`, you can - press `` once more, to jump after the closing paren. No other bundled - back-ends are affected. - -## 2013-03-25 (0.6.3) - -* New tooltip face colors used on themes with light background. -* Pseudo-tooltip stays up-to-date when text is inserted after the point. -* Fixed `company-require-match` mechanics. - -## 2013-03-24 (0.6.2) - -* `global-company-mode` is now autoloaded. - -## 2013-03-23 (0.6.1) - -* Documented `init` and `post-completion` back-end commands. -* `company-eclim` and `company-clang` only expand the template on explicit user - action (such as `company-complete-{selection,number,mouse}`). -* `company-template` has some breaking changes. When point is at one of the - fields, it's displayed at the beginning, not right after it; `` jumps to - the next field, `forward-word` and `subword-forward` remappings are removed; - when you jump to the next field, if the current one hasn't been edited, the - overlay gets removed but the text remains. -* `company-eclim` shows method overloads and expands templates for calls. -* `company-clang-objc-templatify` does not insert spaces after colons anymore. -* `company-clang` is now only initialized in supported buffers. - So, no error messages if you don't have Clang until you open a C file. -* `company-clang` recognizes Clang included in recent Xcode. -* New commands `company-select-previous-or-abort` and - `company-select-next-or-abort`, bound to `` and ``. - -## 2013-03-19 (0.6) - -* Across-the-board bugfixing. -* `company-pysmell` is not used by default anymore. -* Loading of `nxml`, `semantic`, `pymacs` and `ropemacs` is now deferred. -* Candidates from grouped back-ends are merged more conservatively: only - back-ends that return the same prefix at point are used. -* `company-clang` now shows meta information, too. -* Some performance improvements. -* Fixed two old tooltip annoyances. -* Instead of `overrriding-terminal-local-map`, we're now using - `emulation-mode-map-alists` (experimental). This largely means that when the - completion keymap is active, other minor modes' keymaps are still used, so, - for example, it's not as easy to accidentally circumvent `paredit-mode` - when it's enabled. -* `company-elisp` has seen some improvements. -* Added `company-capf`: completion adapter using - `completion-at-point-functions`. (Stefan Monnier) -* Clang completions now include macros and are case-sensitive. -* Switching between tag files now works correctly with `company-etags`. - -## 2010-02-24 (0.5) - -* `company-ropemacs` now provides location and docs. (Fernando H. Silva) -* Added `company-with-candidate-inserted` macro. -* Added `company-clang` back-end. -* Added new mechanism for non-consecutive insertion. - (So far only used by clang for ObjC.) -* The semantic back-end now shows meta information for local symbols. -* Added compatibility for CEDET in Emacs 23.2 and from CVS. (Oleg Andreev) - -## 2009-05-07 (0.4.3) - -* Added `company-other-backend`. -* Idle completion no longer interrupts multi-key command input. -* Added `company-ropemacs` and `company-pysmell` back-ends. - -## 2009-04-25 (0.4.2) - -* In C modes . and -> now count towards `company-minimum-prefix-length`. -* Reverted default front-end back to `company-preview-if-just-one-frontend`. -* The pseudo tooltip will no longer be clipped at the right window edge. -* Added `company-tooltip-minimum`. -* Windows compatibility fixes. - -## 2009-04-19 (0.4.1) - -* Added `global-company-mode`. -* Performance enhancements. -* Added `company-eclim` back-end. -* Added safer workaround for Emacs `posn-col-row` bug. - -## 2009-04-18 (0.4) - -* Automatic completion is now aborted if the prefix gets too short. -* Added option `company-dabbrev-time-limit`. -* `company-backends` now supports merging back-ends. -* Added back-end `company-dabbrev-code` for generic code. -* Fixed `company-begin-with`. - -## 2009-04-15 (0.3.1) - -* Added 'stop prefix to prevent dabbrev from completing inside of symbols. -* Fixed issues with tabbar-mode and line-spacing. -* Performance enhancements. - -## 2009-04-12 (0.3) - -* Added `company-begin-commands` option. -* Added abbrev, tempo and Xcode back-ends. -* Back-ends are now interactive. You can start them with M-x backend-name. -* Added `company-begin-with` for starting company from elisp-code. -* Added hooks. -* Added `company-require-match` and `company-auto-complete` options. - -## 2009-04-05 (0.2.1) - -* Improved Emacs Lisp back-end behavior for local variables. -* Added `company-elisp-detect-function-context` option. -* The mouse can now be used for selection. - -## 2009-03-22 (0.2) - -* Added `company-show-location`. -* Added etags back-end. -* Added work-around for end-of-buffer bug. -* Added `company-filter-candidates`. -* More local Lisp variables are now included in the candidates. - -## 2009-03-21 (0.1.5) - -* Fixed elisp documentation buffer always showing the same doc. -* Added `company-echo-strip-common-frontend`. -* Added `company-show-numbers` option and M-0 ... M-9 default bindings. -* Don't hide the echo message if it isn't shown. - -## 2009-03-20 (0.1) - -* Initial release. blob - a0f9125636ba68827c0ff1e0c9dca5db537df73a (mode 644) blob + /dev/null --- elpa/company-0.10.2/README.md +++ /dev/null @@ -1,13 +0,0 @@ -See the homepage for [installation and usage instructions](http://company-mode.github.io/). - -File a bug report in [Issues](https://github.com/company-mode/company-mode/issues). - -Ask a question or suggest a feature in [Discussions](https://github.com/company-mode/company-mode/discussions/). - -See [Contributing](https://github.com/company-mode/company-mode/blob/master/CONTRIBUTING.md) on other ways to help out. - -[![Build Status](https://github.com/company-mode/company-mode/actions/workflows/ci.yml/badge.svg)](https://github.com/company-mode/company-mode/actions/workflows/ci.yml) -[![GNU Emacs](https://img.shields.io/static/v1?logo=gnuemacs&logoColor=fafafa&label=Made%20for&message=GNU%20Emacs&color=7F5AB6&style=flat)](https://www.gnu.org/software/emacs/) -[![MELPA](https://melpa.org/packages/company-badge.svg)](https://melpa.org/#/company) -[![GNU ELPA](https://elpa.gnu.org/packages/company.svg)](https://elpa.gnu.org/packages/company.html) -[![GNU-devel ELPA](https://elpa.gnu.org/devel/company.svg)](https://elpa.gnu.org/devel/company.html) blob - b8f81c47ddd2be83930011494e5871e473ae017e (mode 644) blob + /dev/null --- elpa/company-0.10.2/company-abbrev.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; company-abbrev.el --- company-mode completion backend for abbrev - -;; Copyright (C) 2009-2011, 2013-2015, 2021 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 . - - -;;; 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)))) - (kind 'snippet) - (meta (abbrev-expansion arg)) - (post-completion (expand-abbrev)))) - -(provide 'company-abbrev) -;;; company-abbrev.el ends here blob - 8ed9892b4049349802a95dfe52622cb735d2afa1 (mode 644) blob + /dev/null --- elpa/company-0.10.2/company-autoloads.el +++ /dev/null @@ -1,329 +0,0 @@ -;;; company-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- -;; Generated by the `loaddefs-generate' function. - -;; This file is part of GNU Emacs. - -;;; Code: - -(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) - - - -;;; 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} - -This is a minor mode. If called interactively, toggle the -`Company mode' mode. If the prefix argument is positive, enable -the mode, and if it is zero or negative, disable the mode. - -If called from Lisp, toggle the mode if ARG is `toggle'. Enable -the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -To check whether the minor mode is enabled in the current buffer, -evaluate `company-mode'. - -The mode's hook is called both when the mode is enabled and when -it is disabled. - -(fn &optional ARG)" t) -(put 'global-company-mode 'globalized-minor-mode t) -(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, toggle the mode if ARG is `toggle'. -Enable the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -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) -(autoload 'company-manual-begin "company" nil t) -(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." t) -(register-definition-prefixes "company" '("company-")) - - -;;; Generated autoloads from company-abbrev.el - -(autoload 'company-abbrev "company-abbrev" "\ -`company-mode' completion backend for abbrev. - -(fn COMMAND &optional ARG &rest IGNORED)" t) -(register-definition-prefixes "company-abbrev" '("company-abbrev-insert")) - - -;;; Generated autoloads from company-bbdb.el - -(autoload 'company-bbdb "company-bbdb" "\ -`company-mode' completion backend for BBDB. - -(fn COMMAND &optional ARG &rest IGNORE)" t) -(register-definition-prefixes "company-bbdb" '("company-bbdb-")) - - -;;; Generated autoloads from company-capf.el - -(register-definition-prefixes "company-capf" '("company-")) - - -;;; Generated autoloads from company-clang.el - -(register-definition-prefixes "company-clang" '("company-clang")) - - -;;; Generated autoloads from company-cmake.el - -(register-definition-prefixes "company-cmake" '("company-cmake")) - - -;;; 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) -(register-definition-prefixes "company-css" '("company-css-")) - - -;;; Generated autoloads from company-dabbrev.el - -(autoload 'company-dabbrev "company-dabbrev" "\ -dabbrev-like `company-mode' completion backend. - -(fn COMMAND &optional ARG &rest IGNORED)" t) -(register-definition-prefixes "company-dabbrev" '("company-dabbrev-")) - - -;;; 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) -(register-definition-prefixes "company-dabbrev-code" '("company-dabbrev-code-")) - - -;;; 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) -(register-definition-prefixes "company-elisp" '("company-elisp-")) - - -;;; Generated autoloads from company-etags.el - -(autoload 'company-etags "company-etags" "\ -`company-mode' completion backend for etags. - -(fn COMMAND &optional ARG &rest IGNORED)" t) -(register-definition-prefixes "company-etags" '("company-etags-")) - - -;;; 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) -(register-definition-prefixes "company-files" '("company-file")) - - -;;; 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) -(register-definition-prefixes "company-gtags" '("company-gtags-")) - - -;;; Generated autoloads from company-ispell.el - -(autoload 'company-ispell "company-ispell" "\ -`company-mode' completion backend using Ispell. - -(fn COMMAND &optional ARG &rest IGNORED)" t) -(register-definition-prefixes "company-ispell" '("company-ispell-")) - - -;;; 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) -(register-definition-prefixes "company-keywords" '("company-keywords-")) - - -;;; 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) -(register-definition-prefixes "company-nxml" '("company-nxml-")) - - -;;; 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) -(register-definition-prefixes "company-oddmuse" '("company-oddmuse-")) - - -;;; 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) -(register-definition-prefixes "company-semantic" '("company-semantic-")) - - -;;; Generated autoloads from company-template.el - -(register-definition-prefixes "company-template" '("company-template-")) - - -;;; Generated autoloads from company-tempo.el - -(autoload 'company-tempo "company-tempo" "\ -`company-mode' completion backend for tempo. - -(fn COMMAND &optional ARG &rest IGNORED)" t) -(register-definition-prefixes "company-tempo" '("company-tempo-")) - - -;;; 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)") -(define-obsolete-function-alias 'company-tng-configure-default 'company-tng-mode "0.10.0" "Applies the default configuration to enable company-tng.") -(defvar company-tng-mode nil "\ -Non-nil if Company-Tng mode is enabled. -See the `company-tng-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 `company-tng-mode'.") -(custom-autoload 'company-tng-mode "company-tng" nil) -(autoload 'company-tng-mode "company-tng" "\ -This minor mode enables `company-tng-frontend'. - -This is a global minor mode. If called interactively, toggle the -`Company-Tng mode' mode. If the prefix argument is positive, -enable the mode, and if it is zero or negative, disable the mode. - -If called from Lisp, toggle the mode if ARG is `toggle'. Enable -the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -To check whether the minor mode is enabled in the current buffer, -evaluate `(default-value \\='company-tng-mode)'. - -The mode's hook is called both when the mode is enabled and when -it is disabled. - -(fn &optional ARG)" t) -(register-definition-prefixes "company-tng" '("company-tng-")) - - -;;; 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) -(register-definition-prefixes "company-yasnippet" '("company-yasnippet-")) - -;;; End of scraped data - -(provide 'company-autoloads) - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; no-native-compile: t -;; coding: utf-8-emacs-unix -;; End: - -;;; company-autoloads.el ends here blob - 1016e2aa29b8f82817b55b0c39ce353a5f0cff72 (mode 644) blob + /dev/null --- elpa/company-0.10.2/company-bbdb.el +++ /dev/null @@ -1,63 +0,0 @@ -;;; company-bbdb.el --- company-mode completion backend for BBDB in message-mode - -;; Copyright (C) 2013-2016, 2020 Free Software Foundation, Inc. - -;; Author: Jan Tatarik - -;; 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 . - -(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) - (let ((case-fold-search t)) - (looking-back - "^\\([^ :]*-\\)?\\(To\\|B?Cc\\|From\\):.*? *\\([^,;]*\\)" - (line-beginning-position))) - (match-string-no-properties 3))) - (candidates (company-bbdb--candidates arg)) - (sorted t) - (no-cache t))) - -(provide 'company-bbdb) -;;; company-bbdb.el ends here blob - 5a2f3db148fcd55dc6cad49c0d852385ddb797ca (mode 644) blob + /dev/null --- elpa/company-0.10.2/company-capf.el +++ /dev/null @@ -1,257 +0,0 @@ -;;; company-capf.el --- company-mode completion-at-point-functions backend -*- lexical-binding: t -*- - -;; Copyright (C) 2013-2022 Free Software Foundation, Inc. - -;; Author: Stefan Monnier - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - - -;;; Commentary: -;; -;; 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--contains (elt lst) - (when-let ((cur (car lst))) - (cond - ((symbolp cur) - (or (eq elt cur) - (company--contains elt (cdr lst)))) - ((listp cur) - (or (company--contains elt cur) - (company--contains elt (cdr lst))))))) - -(defun company--capf-data-real () - (cl-letf* (((default-value 'completion-at-point-functions) - (if (company--contains 'company-etags company-backends) - ;; 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)) - (default-value 'completion-at-point-functions))) - (completion-at-point-functions (company--capf-workaround)) - (data (run-hook-wrapped 'completion-at-point-functions - ;; Ignore misbehaving functions. - #'company--capf-wrapper 'optimist))) - (when (and (consp (cdr data)) (integer-or-marker-p (nth 1 data))) data))) - -(defun company--capf-wrapper (fun which) - (let ((buffer-read-only t) - (inhibit-read-only nil) - (completion-in-region-function - (lambda (beg end coll pred) - (throw 'company--illegal-completion-in-region - (list fun beg end coll :predicate pred))))) - (catch 'company--illegal-completion-in-region - (condition-case nil - (completion--capf-wrapper fun which) - (buffer-read-only nil))))) - -(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 - (company-capf--annotation arg)) - (`kind - (let ((f (plist-get (nthcdr 4 company-capf--current-completion-data) - :company-kind))) - (when f (funcall f arg)))) - (`deprecated - (let ((f (plist-get (nthcdr 4 company-capf--current-completion-data) - :company-deprecated))) - (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--annotation (arg) - (let* ((f (or (plist-get (nthcdr 4 company-capf--current-completion-data) - :annotation-function) - ;; FIXME: Add a test. - (cdr (assq 'annotation-function - (completion-metadata - (buffer-substring (nth 1 company-capf--current-completion-data) - (nth 2 company-capf--current-completion-data)) - (nth 3 company-capf--current-completion-data) - (plist-get (nthcdr 4 company-capf--current-completion-data) - :predicate)))))) - (annotation (when f (funcall f arg)))) - (if (and company-format-margin-function - (equal annotation " ") ; elisp-completion-at-point, pre-icons - (plist-get (nthcdr 4 company-capf--current-completion-data) - :company-kind)) - nil - annotation))) - -(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))) - (if exit-function - ;; We can more or less know when the user is done with completion, - ;; so we do something different than `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 (= (car (completion-boundaries arg table nil "")) - (length arg)) - 'sole - 'finished))))) - -(provide 'company-capf) - -;;; company-capf.el ends here blob - f7e6e1ba17f8de5db459960dbd1d225c0c44341a (mode 644) blob + /dev/null --- elpa/company-0.10.2/company-clang.el +++ /dev/null @@ -1,430 +0,0 @@ -;;; company-clang.el --- company-mode completion backend for Clang -*- lexical-binding: t -*- - -;; Copyright (C) 2009-2011, 2013-2023 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 . - - -;;; 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, start automatic completion after member access operators. - -Automatic completion starts 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-use-compile-flags-txt nil - "When non-nil, use flags from compile_flags.txt if present. - -The lines from that files will be appended to `company-clang-arguments'. - -And if such file is found, Clang is called from the directory containing -it. That allows the flags use relative file names within the project." - :type 'boolean - :safe 'booleanp) - -(defcustom company-clang-arguments nil - "A list of 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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; Do we ever see OVERLOAD (or OVERRIDE)? -(defconst company-clang--completion-pattern - "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\|Pattern\\)\\(?:\\(?: (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) - (results (make-hash-table :test 'equal :size (/ (point-max) 100))) - lines) - (while (re-search-forward pattern nil t) - (let ((match (match-string-no-properties 1)) - (meta (match-string-no-properties 2))) - (when (equal match "Pattern") - (setq match (company-clang--pattern-to-match meta))) - (when (string-match ":" match) - (setq match (substring match 0 (match-beginning 0)))) - ;; Avoiding duplicates: - ;; https://github.com/company-mode/company-mode/issues/841 - (cond - ;; Either meta != completion (not a macro) - ((not (equal match meta)) - (puthash match meta results)) - ;; Or it's the first time we see this completion - ((eq (gethash match results 'none) 'none) - (puthash match nil results))))) - (maphash - (lambda (match meta) - (when meta - (put-text-property 0 1 'meta (company-clang--strip-formatting meta) match)) - (push match lines)) - results) - lines)) - -(defun company-clang--pattern-to-match (pat) - (let ((start 0) - (end nil)) - (when (string-match "#]" pat) - (setq start (match-end 0))) - (when (string-match "[ \(]<#" pat start) - (setq end (match-beginning 0))) - (substring pat start end))) - -(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))))) - -;; TODO: Parse the original formatting here, rather than guess. -;; Strip it every time in the `meta' handler instead. -(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 (and (re-search-forward pattern nil t) - ;; Something in the Windows build? - ;; Looks like Clang doesn't always include the error text - ;; before completions (even if exited with error). - (> (match-beginning 0) (point-min))) - (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. - ;; (Inconclusive, needs more testing): - ;; https://github.com/company-mode/company-mode/pull/288#issuecomment-72491808 - (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--arguments () - (let ((fname "compile_flags.txt") - (args company-clang-arguments) - current-dir-rel) - (when company-clang-use-compile-flags-txt - (let ((dir (locate-dominating-file default-directory fname))) - (when dir - (setq current-dir-rel (file-relative-name default-directory dir)) - (setq default-directory dir) - (with-temp-buffer - (insert-file-contents fname) - (setq args - (append - args - (split-string (buffer-substring-no-properties - (point-min) (point-max)) - "[\n\r]+" - t - "[ \t]+")))) - (unless (equal current-dir-rel "./") - (push (format "-I%s" current-dir-rel) args))))) - args)) - -(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))) - (let ((default-directory default-directory)) - (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-exhaustive company-clang--version - (`(apple . ,ver) (>= ver apple-min)) - (`(normal . ,ver) (>= ver min)))) - -(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)) - (kind (company-clang--kind 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)))))))) - -(defun company-clang--kind (arg) - ;; XXX: Not very precise. - ;; E.g. it will say that an arg-less ObjC method is a variable (perhaps we - ;; could look around for brackets, etc, if there any actual users who's - ;; bothered by it). - ;; And we can't distinguish between local vars and struct fields. - ;; Or between keywords and macros. - (let ((meta (company-clang--meta arg))) - (cond - ((null meta) 'keyword) - ((string-match "(" meta) - (if (string-match-p (format "\\`%s *\\'" (regexp-quote arg)) - (substring meta 0 (match-beginning 0))) - 'keyword ; Also macro, actually (no return type). - 'function)) - (t 'variable)))) - -(provide 'company-clang) -;;; company-clang.el ends here blob - a072be1f7cc5189c969695a654493e5adec21611 (mode 644) blob + /dev/null --- elpa/company-0.10.2/company-cmake.el +++ /dev/null @@ -1,207 +0,0 @@ -;;; company-cmake.el --- company-mode completion backend for CMake - -;; Copyright (C) 2013-2015, 2017-2018, 2020 Free Software Foundation, Inc. - -;; Author: Chen Bin -;; 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 . - -;;; 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-property-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\\)?\\)\\(.*\\)" - (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 - "\\(.*\\)\\(.*\\)" - (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_" (match-string 2 candidate)))) - - ;; C flags - ((string-match "^\\(.*_\\)IS_GNU\\(C\\|CXX\\|G77\\)$" candidate) - (setq candidate (concat (match-string 1 candidate) "IS_GNU"))) - - ;; C flags - ((string-match "^\\(.*_\\)OVERRIDE_\\(C\\|CXX\\|Fortran\\)$" candidate) - (setq candidate (concat (match-string 1 candidate) "OVERRIDE_"))) - - ((string-match "^\\(.*\\)\\(_DEBUG\\|_RELEASE\\|_RELWITHDEBINFO\\|_MINSIZEREL\\)\\(.*\\)$" candidate) - (setq candidate (concat (match-string 1 candidate) - "_" - (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 blob - 21f5b76fdf6f3b3f614bce73a9d46066c74e0fb2 (mode 644) blob + /dev/null --- elpa/company-0.10.2/company-css.el +++ /dev/null @@ -1,446 +0,0 @@ -;;; company-css.el --- company-mode completion backend for css-mode -*- lexical-binding: t -*- - -;; Copyright (C) 2009-2011, 2013-2015, 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 . - -;;; 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 -;; -;;