From 15b6c8226bfa4f5954b77d77ce59f7c3f07d759e Mon Sep 17 00:00:00 2001 From: Daniel Higginbotham Date: Tue, 6 Aug 2013 11:47:31 -0400 Subject: [PATCH] initial commit --- .gitignore | 3 + COPYING | 674 ++++++++++++++++++++++++ README.markdown | 141 +++++ changelog.md | 20 + init.el | 25 + modules/starter-kit-bindings.el | 121 +++++ modules/starter-kit-eshell.el | 95 ++++ modules/starter-kit-js.el | 61 +++ modules/starter-kit-lisp.el | 95 ++++ modules/starter-kit-perl.el | 20 + modules/starter-kit-ruby.el | 103 ++++ starter-kit-defuns.el | 175 ++++++ starter-kit-misc.el | 135 +++++ starter-kit-pkg.el | 4 + starter-kit.el | 77 +++ tar.sh | 16 + themes/color-theme-tomorrow.el | 610 +++++++++++++++++++++ themes/tomorrow-night-blue-theme.el | 2 + themes/tomorrow-night-bright-theme.el | 2 + themes/tomorrow-night-eighties-theme.el | 2 + themes/tomorrow-night-theme.el | 2 + themes/tomorrow-theme.el | 2 + themes/zenburn-theme.el | 474 +++++++++++++++++ user.el | 64 +++ vendor/.keep | 0 25 files changed, 2923 insertions(+) create mode 100644 .gitignore create mode 100644 COPYING create mode 100644 README.markdown create mode 100644 changelog.md create mode 100644 init.el create mode 100644 modules/starter-kit-bindings.el create mode 100644 modules/starter-kit-eshell.el create mode 100644 modules/starter-kit-js.el create mode 100644 modules/starter-kit-lisp.el create mode 100644 modules/starter-kit-perl.el create mode 100644 modules/starter-kit-ruby.el create mode 100644 starter-kit-defuns.el create mode 100644 starter-kit-misc.el create mode 100644 starter-kit-pkg.el create mode 100644 starter-kit.el create mode 100755 tar.sh create mode 100644 themes/color-theme-tomorrow.el create mode 100644 themes/tomorrow-night-blue-theme.el create mode 100644 themes/tomorrow-night-bright-theme.el create mode 100644 themes/tomorrow-night-eighties-theme.el create mode 100644 themes/tomorrow-night-theme.el create mode 100644 themes/tomorrow-theme.el create mode 100644 themes/zenburn-theme.el create mode 100644 user.el create mode 100644 vendor/.keep diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..5b437f719 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~* +*#* +elpa \ No newline at end of file diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + 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 +. diff --git a/README.markdown b/README.markdown new file mode 100644 index 000000000..d8b1e6b28 --- /dev/null +++ b/README.markdown @@ -0,0 +1,141 @@ +# Emacs Starter Kit + +The Starter Kit provides a more pleasant set of defaults than you get +normally with Emacs. It was originally intended for beginners, but it +offers a nicely augmented working environment for anyone using Emacs. + +The latest release is at http://marmalade-repo.org/packages/starter-kit +with the source at http://github.com/technomancy/emacs-starter-kit + +## Learning + +This won't teach you Emacs, but it'll make it easier to get +comfortable. To access the tutorial, press control-h followed by t. + +You may also find the commercial [PeepCode Meet Emacs +screencast](http://peepcode.com/products/meet-emacs) helpful. The +[Emacs Wiki](http://emacswiki.org) is also very handy. + +## Installation + +You'll need Emacs 24, which comes with package.el. It's not hard to +compile [from source](http://github.com/emacsmirror/emacs), but +precompiled versions are readily available for +[Debian-based systems](http://emacs.naquadah.org/), +[Mac OS X](http://emacsformacosx.com/builds), and +[Windows](http://code.google.com/p/emacs-for-windows/updates/list). + +If you need to maintain compatibility with Emacs 23 or 22, you need to +use [version 1](https://github.com/technomancy/emacs-starter-kit/tree/master). + +Add Marmalade as a package archive source in ~/.emacs.d/init.el: + +```Lisp +(require 'package) +(add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/") t) +(package-initialize) +```` + +Then you can install it: + + M-x package-refresh-contents + M-x package-install RET starter-kit RET + +Other modules are also available: + +* starter-kit-bindings (spun out due to concerns about keybinding conventions) +* starter-kit-eshell +* starter-kit-js +* starter-kit-ruby +* starter-kit-perl +* starter-kit-lisp (enhances Emacs Lisp, Clojure, Scheme, and Common Lisp) + +These modules are installed separately from the base Starter Kit package. + +It's recommended to create a list of packages in init.el which will be +installed if they are found to not be present: + +```Lisp +(when (not package-archive-contents) + (package-refresh-contents)) + +;; Add in your own as you wish: +(defvar my-packages '(starter-kit starter-kit-lisp starter-kit-bindings) + "A list of packages to ensure are installed at launch.") + +(dolist (p my-packages) + (when (not (package-installed-p p)) + (package-install p))) +``` +That way you can be ensured of a consistent experience across machines. + +There are a few conventions for naming files which will get loaded +automatically. ~/.emacs.d/$USER.el as well as any files in the +~/.emacs.d/$USER/ directory. Finally, the Starter Kit will look for a +file named after the current hostname ending in ".el" which will allow +host-specific configuration. + +The Starter Kit used to be a git repository that you checked out and +used as your own personal .emacs.d directory, but it's been +restructured so that it can be treated like any other package, freeing +you up to structure your .emacs.d directory as you wish. See +"Upgrading" below. + +## FAQ + +**Q:** When I try to create a new file or buffer, the autocompletion is eager and tries to use the name of an existing file or buffer. +**A:** That's called ido-mode, and it's awesome! But sometimes it + gets in the way. To temporarily disable it, press C-f while the + prompt is open. You can also press C-j while it's still enabled to + force the creation of the name. + +**Q:** When I'm writing Javascript, all my functions show up as ƒ. Am I going insane? +**A:** That's actually a render-time hack. The file on disk shows as + "function", but it's just rendered using the script F in order to + tone down the verbosity inherent in the language a bit. The same + happens with fn in Clojure and lambda to λ in + other lisps. + +**Q:** I can't delete parentheses in Lisp! +**A:** To be specific, you can't delete parenthesis if deleting the + parentheses would result in invalid structure. That's called + Paredit, and once you get used to it, you'll wonder how you ever did + anything without it. But it can be disorienting at first. When + paredit tries to stop you from deleting something, you're probably + trying to delete something you shouldn't. Use C-k to kill whole + expressions. Two things to remember: you can always use C-w to kill + a region regardless of Paredit's rules, and you can always insert a + single character like a close-paren by prefixing it with C-q. You + may find + [the Paredit cheat sheet](http://www.emacswiki.org/emacs/PareditCheatsheet) + or + [this Paredit walkthrough](https://github.com/technomancy/paredit-screencast/blob/master/outline.markdown) + helpful. You can also enable paredit for non-lisp modes using the + esk-paredit-nonlisp function. + +**Q:** How awesome is Emacs? +**A:** So awesome. + +## Upgrading + +Users of the old version of the Starter Kit (version 1) should be able +to upgrade easily. Move your old Starter Kit checkout at +~/.emacs.d out of the way and create a new directory +containing init.el with the lines above. Copy your +username.el and username directory from your old +checkout into the new ~/.emacs.d. You should be able to check +this new directory into your main dotfiles repository instead of +keeping it separate. + +The main difference in version 2 is that the new one doesn't pull in a +bunch of other package.el dependencies; users may pick and choose +which they want, including language-specific modules. Read +[more about the differences with version 1](http://technomancy.us/153). + +## Copyright + +Copyright © 2008-2011 Phil Hagelberg and contributors + +Files are licensed under the same license as Emacs unless otherwise +specified. See the file COPYING for details. diff --git a/changelog.md b/changelog.md new file mode 100644 index 000000000..659a6a819 --- /dev/null +++ b/changelog.md @@ -0,0 +1,20 @@ +# Emacs Starter Kit — History of User-Visible Changes + +## 2.0.3 / 2011-10-11 + +* Update ido-ubiquitous to work better with M-x rgrep. +* Save smex command history between Emacs launches. + +## 2.0.2 / 2011-09-13 + +* Add elisp-slime-nav dependency. +* Add smex dependency. +* Add find-file-in-project dependency. +* Make pretty-fn and pretty-lambda easier to disable. +* Spin off eshell into its own module +* Remove functionality deprecated by ubiquitous-ido. +* Enable ido virtual buffers. + +## 2.0.1 / 2011-06-21 + +* First version 2 release as package. diff --git a/init.el b/init.el new file mode 100644 index 000000000..1c4d37a86 --- /dev/null +++ b/init.el @@ -0,0 +1,25 @@ +(require 'package) +(add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/") t) +(add-to-list 'package-archives + '("tromey" . "http://tromey.com/elpa/") t) +(package-initialize) + +(when (not package-archive-contents) + (package-refresh-contents)) + +;; Add in your own as you wish: +(defvar my-packages '(starter-kit + starter-kit-lisp + starter-kit-bindings + starter-kit-ruby + clojure-mode + clojure-test-mode + nrepl + auto-complete + ac-nrepl) + "A list of packages to ensure are installed at launch.") + +(dolist (p my-packages) + (when (not (package-installed-p p)) + (package-install p))) diff --git a/modules/starter-kit-bindings.el b/modules/starter-kit-bindings.el new file mode 100644 index 000000000..238345686 --- /dev/null +++ b/modules/starter-kit-bindings.el @@ -0,0 +1,121 @@ +;;; starter-kit-bindings.el --- Saner defaults and goodies: bindings +;; +;; Copyright (c) 2008-2010 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.2 +;; Keywords: convenience +;; Package-Requires: ((starter-kit "2.0.2")) + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file just contains key bindings. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;;###autoload +(progn + ;; It's all about the project. + (global-set-key (kbd "C-c f") 'find-file-in-project) + + ;; You know, like Readline. + (global-set-key (kbd "C-M-h") 'backward-kill-word) + + ;; Completion that uses many different methods to find options. + (global-set-key (kbd "M-/") 'hippie-expand) + + ;; Perform general cleanup. + (global-set-key (kbd "C-c n") 'esk-cleanup-buffer) + + ;; Turn on the menu bar for exploring new modes + (global-set-key (kbd "C-") 'menu-bar-mode) + + ;; Font size + (define-key global-map (kbd "C-+") 'text-scale-increase) + (define-key global-map (kbd "C--") 'text-scale-decrease) + + ;; Use regex searches by default. + (global-set-key (kbd "C-s") 'isearch-forward-regexp) + (global-set-key (kbd "\C-r") 'isearch-backward-regexp) + (global-set-key (kbd "C-M-s") 'isearch-forward) + (global-set-key (kbd "C-M-r") 'isearch-backward) + + ;; Jump to a definition in the current file. (Protip: this is awesome.) + (global-set-key (kbd "C-x C-i") 'imenu) + + ;; File finding + (global-set-key (kbd "C-x M-f") 'ido-find-file-other-window) + (global-set-key (kbd "C-c y") 'bury-buffer) + (global-set-key (kbd "C-c r") 'revert-buffer) + + ;; Window switching. (C-x o goes to the next window) + (windmove-default-keybindings) ;; Shift+direction + (global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1))) ;; back one + (global-set-key (kbd "C-x C-o") (lambda () (interactive) (other-window 2))) ;; forward two + + ;; Start eshell or switch to it if it's active. + (global-set-key (kbd "C-x m") 'eshell) + + ;; Start a new eshell even if one is active. + (global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t))) + + ;; Start a regular shell if you prefer that. + (global-set-key (kbd "C-x C-m") 'shell) + + ;; If you want to be able to M-x without meta (phones, etc) + (global-set-key (kbd "C-c x") 'execute-extended-command) + + ;; Help should search more than just commands + (global-set-key (kbd "C-h a") 'apropos) + + ;; Should be able to eval-and-replace anywhere. + (global-set-key (kbd "C-c e") 'esk-eval-and-replace) + + ;; M-S-6 is awkward + (global-set-key (kbd "C-c q") 'join-line) + + ;; So good! + (global-set-key (kbd "C-c g") 'magit-status) + + ;; This is a little hacky since VC doesn't support git add internally + (eval-after-load 'vc + (define-key vc-prefix-map "i" + '(lambda () (interactive) + (if (not (eq 'Git (vc-backend buffer-file-name))) + (vc-register) + (shell-command (format "git add %s" buffer-file-name)) + (message "Staged changes."))))) + + ;; Activate occur easily inside isearch + (define-key isearch-mode-map (kbd "C-o") + (lambda () (interactive) + (let ((case-fold-search isearch-case-fold-search)) + (occur (if isearch-regexp isearch-string (regexp-quote isearch-string))))))) + +(provide 'starter-kit-bindings) +;;; starter-kit-bindings.el ends here diff --git a/modules/starter-kit-eshell.el b/modules/starter-kit-eshell.el new file mode 100644 index 000000000..4427baa0a --- /dev/null +++ b/modules/starter-kit-eshell.el @@ -0,0 +1,95 @@ +;;; starter-kit-eshell.el --- Saner defaults and goodies: eshell tweaks +;; +;; Copyright (c) 2008-2011 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.2 +;; Keywords: convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains eshell tweaks. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +(setq eshell-cmpl-cycle-completions nil + eshell-save-history-on-exit t + eshell-buffer-shorthand t + eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\|\\.svn\\|\\.git\\)/\\'") + +;;;###autoload +(eval-after-load 'esh-opt + '(progn + (require 'em-prompt) + (require 'em-term) + (require 'em-cmpl) + (setenv "PAGER" "cat") + (set-face-attribute 'eshell-prompt nil :foreground "turquoise1") + (add-hook 'eshell-mode-hook ;; for some reason this needs to be a hook + '(lambda () (define-key eshell-mode-map "\C-a" 'eshell-bol))) + (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color) + (setq eshell-cmpl-cycle-completions nil) + + ;; TODO: submit these via M-x report-emacs-bug + (add-to-list 'eshell-visual-commands "ssh") + (add-to-list 'eshell-visual-commands "tail") + (add-to-list 'eshell-command-completions-alist + '("gunzip" "gz\\'")) + (add-to-list 'eshell-command-completions-alist + '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'")))) + +;;;###autoload +(defun eshell/cds () + "Change directory to the project's root." + (eshell/cd (locate-dominating-file default-directory "src"))) + +;; these two haven't made it upstream yet +;;;###autoload +(when (not (functionp 'eshell/find)) + (defun eshell/find (dir &rest opts) + (find-dired dir (mapconcat (lambda (arg) + (if (get-text-property 0 'escaped arg) + (concat "\"" arg "\"") + arg)) + opts " ")))) + +;;;###autoload +(when (not (functionp 'eshell/rgrep)) + (defun eshell/rgrep (&rest args) + "Use Emacs grep facility instead of calling external grep." + (eshell-grep "rgrep" args t))) + +;; Port features from +;; http://blog.peepcode.com/tutorials/2009/shell-method-missing/shell_method_missing.rb +;; * cloning git repos, github repos +;; * downloading http urls +;; * extracting archives +;; * changing to directories + +(provide 'starter-kit-eshell) +;;; starter-kit-eshell.el ends here diff --git a/modules/starter-kit-js.el b/modules/starter-kit-js.el new file mode 100644 index 000000000..8be9e0b73 --- /dev/null +++ b/modules/starter-kit-js.el @@ -0,0 +1,61 @@ +;;; starter-kit-js.el --- Saner defaults and goodies for Javascript +;; +;; Copyright (c) 2008-2010 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0 +;; Keywords: convenience +;; Package-Requires: ((starter-kit "2.0.1")) + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains tweaks specific to Javascript. + +;; This file is in need of a maintainer. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.json$" . js-mode)) + +;;;###autoload +(eval-after-load 'js + '(progn (define-key js-mode-map "{" 'paredit-open-curly) + (define-key js-mode-map "}" 'paredit-close-curly-and-newline) + (add-hook 'js-mode-hook 'esk-paredit-nonlisp) + (setq js-indent-level 2) + ;; fixes problem with pretty function font-lock + (define-key js-mode-map (kbd ",") 'self-insert-command) + (font-lock-add-keywords + 'js-mode `(("\\(function *\\)(" + (0 (progn (compose-region (match-beginning 1) + (match-end 1) "\u0192") + nil))))))) + +(provide 'starter-kit-js) +;;; starter-kit-js.el ends here diff --git a/modules/starter-kit-lisp.el b/modules/starter-kit-lisp.el new file mode 100644 index 000000000..7216740ac --- /dev/null +++ b/modules/starter-kit-lisp.el @@ -0,0 +1,95 @@ +;;; starter-kit-lisp.el --- Saner defaults and goodies for lisp languages +;; +;; Copyright (c) 2008-2011 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.3 +;; Keywords: convenience +;; Package-Requires: ((starter-kit "2.0.2") (elisp-slime-nav "0.1")) + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains tweaks specific to Lisp languages. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;; Emacs Lisp + +;;;###autoload +(progn + (add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) + (add-hook 'emacs-lisp-mode-hook 'esk-remove-elc-on-save) + (add-hook 'emacs-lisp-mode-hook 'esk-prog-mode-hook) + (add-hook 'emacs-lisp-mode-hook 'elisp-slime-nav-mode) + + (defun esk-remove-elc-on-save () + "If you're saving an elisp file, likely the .elc is no longer valid." + (make-local-variable 'after-save-hook) + (add-hook 'after-save-hook + (lambda () + (if (file-exists-p (concat buffer-file-name "c")) + (delete-file (concat buffer-file-name "c")))))) + + (define-key emacs-lisp-mode-map (kbd "C-c v") 'eval-buffer) + +;;; Enhance Lisp Modes + + (define-key read-expression-map (kbd "TAB") 'lisp-complete-symbol) + (define-key lisp-mode-shared-map (kbd "RET") 'reindent-then-newline-and-indent) + + ;; TODO: look into parenface package + (defface esk-paren-face + '((((class color) (background dark)) + (:foreground "grey50")) + (((class color) (background light)) + (:foreground "grey55"))) + "Face used to dim parentheses." + :group 'starter-kit-faces) + + (eval-after-load 'paredit + ;; need a binding that works in the terminal + '(define-key paredit-mode-map (kbd "M-)") 'paredit-forward-slurp-sexp)) + + (dolist (mode '(scheme emacs-lisp lisp clojure)) + (when (> (display-color-cells) 8) + (font-lock-add-keywords (intern (concat (symbol-name mode) "-mode")) + '(("(\\|)" . 'esk-paren-face)))) + (add-hook (intern (concat (symbol-name mode) "-mode-hook")) + 'esk-turn-on-paredit) + (add-hook (intern (concat (symbol-name mode) "-mode-hook")) + 'esk-turn-on-paredit)) + + (defun esk-pretty-fn () + (font-lock-add-keywords nil `(("(\\(fn\\>\\)" + (0 (progn (compose-region (match-beginning 1) + (match-end 1) + "\u0192") nil)))))) + (add-hook 'clojure-mode-hook 'esk-pretty-fn)) + +(provide 'starter-kit-lisp) +;;; starter-kit-lisp.el ends here diff --git a/modules/starter-kit-perl.el b/modules/starter-kit-perl.el new file mode 100644 index 000000000..4bc3f6c14 --- /dev/null +++ b/modules/starter-kit-perl.el @@ -0,0 +1,20 @@ +;;; starter-kit-perl.el --- Some helpful Perl code +;; +;; Part of the Emacs Starter Kit + +(eval-after-load 'cperl-mode + '(progn + (define-key cperl-mode-map (kbd "RET") 'reindent-then-newline-and-indent) + (define-key cperl-mode-map (kbd "C-M-h") 'backward-kill-word))) + +(global-set-key (kbd "C-h P") 'perldoc) + +(add-to-list 'auto-mode-alist '("\\.p[lm]$" . cperl-mode)) +(add-to-list 'auto-mode-alist '("\\.pod$" . pod-mode)) +(add-to-list 'auto-mode-alist '("\\.tt$" . tt-mode)) + +;; TODO: flymake +;; TODO: electric bugaloo + +(provide 'starter-kit-perl) +;; starter-kit-perl.el ends here diff --git a/modules/starter-kit-ruby.el b/modules/starter-kit-ruby.el new file mode 100644 index 000000000..f8e62e861 --- /dev/null +++ b/modules/starter-kit-ruby.el @@ -0,0 +1,103 @@ +;;; starter-kit-ruby.el --- Saner defaults and goodies for Ruby +;; +;; Copyright (c) 2008-2010 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.1 +;; Keywords: convenience +;; Package-Requires: ((inf-ruby "2.2.1") (starter-kit "2.0.1")) +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains tweaks specific to Ruby. + +;; This file is in need of a maintainer. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;;###autoload +(progn + (eval-after-load 'ruby-mode + '(progn + ;; work around possible elpa bug + (ignore-errors (require 'ruby-compilation)) + (setq ruby-use-encoding-map nil) + (add-hook 'ruby-mode-hook 'inf-ruby-keys) + (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent) + (define-key ruby-mode-map (kbd "C-M-h") 'backward-kill-word))) + + (global-set-key (kbd "C-h S-r") 'ri) + + ;; Rake files are ruby, too, as are gemspecs, rackup files, etc. + (add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Capfile$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Vagrantfile$" . ruby-mode)) + + ;; We never want to edit Rubinius bytecode + (add-to-list 'completion-ignored-extensions ".rbc") + +;;; Rake + + (defun pcomplete/rake () + "Completion rules for the `ssh' command." + (pcomplete-here (pcmpl-rake-tasks))) + + (defun pcmpl-rake-tasks () + "Return a list of all the rake tasks defined in the current +projects. I know this is a hack to put all the logic in the +exec-to-string command, but it works and seems fast" + (delq nil (mapcar '(lambda(line) + (if (string-match "rake \\([^ ]+\\)" line) (match-string 1 line))) + (split-string (shell-command-to-string "rake -T") "[\n]")))) + + (defun rake (task) + (interactive (list (completing-read "Rake (default: default): " + (pcmpl-rake-tasks)))) + (shell-command-to-string (concat "rake " (if (= 0 (length task)) "default" task)))) + + + ;; Clear the compilation buffer between test runs. + (eval-after-load 'ruby-compilation + '(progn + (defadvice ruby-do-run-w/compilation (before kill-buffer (name cmdlist)) + (let ((comp-buffer-name (format "*%s*" name))) + (when (get-buffer comp-buffer-name) + (with-current-buffer comp-buffer-name + (delete-region (point-min) (point-max)))))) + (ad-activate 'ruby-do-run-w/compilation))) + + ;; Rinari (Minor Mode for Ruby On Rails) + (setq rinari-major-modes + (list 'mumamo-after-change-major-mode-hook 'dired-mode-hook 'ruby-mode-hook + 'css-mode-hook 'yaml-mode-hook 'javascript-mode-hook))) + +(provide 'starter-kit-ruby) +;;; starter-kit-ruby.el ends here diff --git a/starter-kit-defuns.el b/starter-kit-defuns.el new file mode 100644 index 000000000..a96105b0d --- /dev/null +++ b/starter-kit-defuns.el @@ -0,0 +1,175 @@ +;;; starter-kit-defuns.el --- Saner defaults and goodies: function defs. +;; +;; Copyright (c) 2008-2010 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.2 +;; Keywords: convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains all the function definitions for the starter kit. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;; These belong in prog-mode-hook: + +;; We have a number of turn-on-* functions since it's advised that lambda +;; functions not go in hooks. Repeatedly evaling an add-to-list with a +;; hook value will repeatedly add it since there's no way to ensure +;; that a byte-compiled lambda doesn't already exist in the list. + +(defun esk-local-column-number-mode () + (make-local-variable 'column-number-mode) + (column-number-mode t)) + +(defun esk-local-comment-auto-fill () + (set (make-local-variable 'comment-auto-fill-only-comments) t) + (auto-fill-mode t)) + +(defun esk-turn-on-hl-line-mode () + (when (> (display-color-cells) 8) + (hl-line-mode t))) + +(defun esk-turn-on-save-place-mode () + (require 'saveplace) + (setq save-place t)) + +(defun esk-turn-on-whitespace () + (whitespace-mode t)) + +(defun esk-turn-on-paredit () + (paredit-mode t)) + +(defun esk-turn-on-idle-highlight-mode () + (idle-highlight-mode t)) + +(defun esk-pretty-lambdas () + (font-lock-add-keywords + nil `(("(?\\(lambda\\>\\)" + (0 (progn (compose-region (match-beginning 1) (match-end 1) + ,(make-char 'greek-iso8859-7 107)) + nil)))))) + +(defun esk-add-watchwords () + (font-lock-add-keywords + nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\|NOCOMMIT\\)" + 1 font-lock-warning-face t)))) + +(add-hook 'prog-mode-hook 'esk-local-column-number-mode) +(add-hook 'prog-mode-hook 'esk-local-comment-auto-fill) +(add-hook 'prog-mode-hook 'esk-turn-on-hl-line-mode) +(add-hook 'prog-mode-hook 'esk-turn-on-save-place-mode) +(add-hook 'prog-mode-hook 'esk-pretty-lambdas) +(add-hook 'prog-mode-hook 'esk-add-watchwords) +(add-hook 'prog-mode-hook 'esk-turn-on-idle-highlight-mode) + +(defun esk-prog-mode-hook () + (run-hooks 'prog-mode-hook)) + +(defun esk-turn-off-tool-bar () + (tool-bar-mode -1)) + +(defun esk-untabify-buffer () + (interactive) + (untabify (point-min) (point-max))) + +(defun esk-indent-buffer () + (interactive) + (indent-region (point-min) (point-max))) + +(defun esk-cleanup-buffer () + "Perform a bunch of operations on the whitespace content of a buffer." + (interactive) + (esk-indent-buffer) + (esk-untabify-buffer) + (delete-trailing-whitespace)) + +;; Commands + +(defun esk-eval-and-replace () + "Replace the preceding sexp with its value." + (interactive) + (backward-kill-sexp) + (condition-case nil + (prin1 (eval (read (current-kill 0))) + (current-buffer)) + (error (message "Invalid expression") + (insert (current-kill 0))))) + +(defun esk-sudo-edit (&optional arg) + (interactive "p") + (if (or arg (not buffer-file-name)) + (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: "))) + (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) + +(defun esk-lorem () + "Insert a lorem ipsum." + (interactive) + (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim" + "ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut " + "aliquip ex ea commodo consequat. Duis aute irure dolor in " + "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla " + "pariatur. Excepteur sint occaecat cupidatat non proident, sunt in " + "culpa qui officia deserunt mollit anim id est laborum.")) + +(defun esk-suck-it (suckee) + "Insert a comment of appropriate length about what can suck it." + (interactive "MWhat can suck it? ") + (let ((prefix (concat ";; " suckee " can s")) + (postfix "ck it!") + (col (current-column))) + (insert prefix) + (dotimes (_ (- 80 col (length prefix) (length postfix))) (insert "u")) + (insert postfix))) + +(defun esk-insert-date () + "Insert a time-stamp according to locale's date and time format." + (interactive) + (insert (format-time-string "%c" (current-time)))) + +(defun esk-pairing-bot () + "If you can't pair program with a human, use this instead." + (interactive) + (message (if (y-or-n-p "Do you have a test for that? ") "Good." "Bad!"))) + +(defun esk-paredit-nonlisp () + "Turn on paredit mode for non-lisps." + (interactive) + (set (make-local-variable 'paredit-space-for-delimiter-predicates) + '((lambda (endp delimiter) nil))) + (paredit-mode 1)) + +;; A monkeypatch to cause annotate to ignore whitespace +(defun vc-git-annotate-command (file buf &optional rev) + (let ((name (file-relative-name file))) + (vc-git-command buf 0 name "blame" "-w" rev))) + +(provide 'starter-kit-defuns) +;;; starter-kit-defuns.el ends here diff --git a/starter-kit-misc.el b/starter-kit-misc.el new file mode 100644 index 000000000..077be72b2 --- /dev/null +++ b/starter-kit-misc.el @@ -0,0 +1,135 @@ +;;; starter-kit-misc.el --- Saner defaults and goodies: miscellany +;; +;; Copyright (c) 2008-2010 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.2 +;; Keywords: convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains setqs and things that aren't bindings or defuns. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +(when window-system + (setq frame-title-format '(buffer-file-name "%f" ("%b"))) + (tooltip-mode -1) + (mouse-wheel-mode t) + (blink-cursor-mode -1)) + +;; can't do it at launch or emacsclient won't always honor it +(add-hook 'before-make-frame-hook 'esk-turn-off-tool-bar) + +(setq visible-bell t + inhibit-startup-message t + color-theme-is-global t + sentence-end-double-space nil + shift-select-mode nil + mouse-yank-at-point t + uniquify-buffer-name-style 'forward + whitespace-style '(face trailing lines-tail tabs) + whitespace-line-column 80 + ediff-window-setup-function 'ediff-setup-windows-plain + oddmuse-directory "~/.emacs.d/oddmuse" + save-place-file "~/.emacs.d/places" + backup-directory-alist `(("." . ,(expand-file-name "~/.emacs.d/backups"))) + diff-switches "-u") + +(add-to-list 'safe-local-variable-values '(lexical-binding . t)) +(add-to-list 'safe-local-variable-values '(whitespace-line-column . 80)) + +;; Set this to whatever browser you use +;; (setq browse-url-browser-function 'browse-url-firefox) +;; (setq browse-url-browser-function 'browse-default-macosx-browser) +;; (setq browse-url-browser-function 'browse-default-windows-browser) +;; (setq browse-url-browser-function 'browse-default-kde) +;; (setq browse-url-browser-function 'browse-default-epiphany) +;; (setq browse-url-browser-function 'browse-default-w3m) +;; (setq browse-url-browser-function 'browse-url-generic +;; browse-url-generic-program "~/src/conkeror/conkeror") + +;; Highlight matching parentheses when the point is on them. +(show-paren-mode 1) + +;; ido-mode is like magic pixie dust! +(ido-mode t) +(ido-ubiquitous t) +(setq ido-enable-prefix nil + ido-enable-flex-matching t + ido-auto-merge-work-directories-length nil + ido-create-new-buffer 'always + ido-use-filename-at-point 'guess + ido-use-virtual-buffers t + ido-handle-duplicate-virtual-buffers 2 + ido-max-prospects 10) + +(set-default 'indent-tabs-mode nil) +(set-default 'indicate-empty-lines t) +(set-default 'imenu-auto-rescan t) + +(add-hook 'text-mode-hook 'turn-on-auto-fill) +(add-hook 'text-mode-hook 'turn-on-flyspell) + +(defalias 'yes-or-no-p 'y-or-n-p) +(defalias 'auto-tail-revert-mode 'tail-mode) + +(random t) ;; Seed the random-number generator + +;; Hippie expand: at times perhaps too hip +(dolist (f '(try-expand-line try-expand-list try-complete-file-name-partially)) + (delete f hippie-expand-try-functions-list)) + +;; Add this back in at the end of the list. +(add-to-list 'hippie-expand-try-functions-list 'try-complete-file-name-partially t) + +(eval-after-load 'grep + '(when (boundp 'grep-find-ignored-files) + (add-to-list 'grep-find-ignored-files "*.class"))) + +;; Cosmetics + +(eval-after-load 'diff-mode + '(progn + (set-face-foreground 'diff-added "green4") + (set-face-foreground 'diff-removed "red3"))) + +(eval-after-load 'magit + '(progn + (set-face-foreground 'magit-diff-add "green4") + (set-face-foreground 'magit-diff-del "red3"))) + +;; Get around the emacswiki spam protection +(eval-after-load 'oddmuse + (add-hook 'oddmuse-mode-hook + (lambda () + (unless (string-match "question" oddmuse-post) + (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post)))))) + +(provide 'starter-kit-misc) +;;; starter-kit-misc.el ends here diff --git a/starter-kit-pkg.el b/starter-kit-pkg.el new file mode 100644 index 000000000..650f39a77 --- /dev/null +++ b/starter-kit-pkg.el @@ -0,0 +1,4 @@ +(define-package "starter-kit" "2.0.3" + "Saner defaults and goodies." + '((paredit "22") (idle-highlight-mode "1.1.1") (find-file-in-project "3.0") + (smex "1.1.1") (ido-ubiquitous "0.3") (magit "0.8.1"))) diff --git a/starter-kit.el b/starter-kit.el new file mode 100644 index 000000000..c5dc24635 --- /dev/null +++ b/starter-kit.el @@ -0,0 +1,77 @@ +;;; starter-kit.el --- Saner defaults and goodies. +;; +;; Copyright (c) 2008-2011 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.2 +;; Keywords: convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file just brings together other pieces of the starter kit plus +;; user- and host-specific configs. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;;###autoload +(progn + ;; Turn off mouse interface early in startup to avoid momentary display + (dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode)) + (when (fboundp mode) (funcall mode -1))) + + (mapc 'require '(uniquify starter-kit-defuns starter-kit-misc)) + + ;; You can keep system- or user-specific customizations here + (setq esk-system-config (concat user-emacs-directory system-name ".el") + esk-user-config (concat user-emacs-directory user-login-name ".el") + esk-user-dir (concat user-emacs-directory user-login-name)) + + (add-to-list 'load-path esk-user-dir) + + (setq smex-save-file (concat user-emacs-directory ".smex-items")) + (smex-initialize) + (global-set-key (kbd "M-x") 'smex) + + (defun esk-eval-after-init (form) + "Add `(lambda () FORM)' to `after-init-hook'. + + If Emacs has already finished initialization, also eval FORM immediately." + (let ((func (list 'lambda nil form))) + (add-hook 'after-init-hook func) + (when after-init-time + (eval form)))) + + (esk-eval-after-init + '(progn + (when (file-exists-p esk-system-config) (load esk-system-config)) + (when (file-exists-p esk-user-config) (load esk-user-config)) + (when (file-exists-p esk-user-dir) + (mapc 'load (directory-files esk-user-dir nil "^[^#].*el$")))))) + +(provide 'starter-kit) +;;; starter-kit.el ends here diff --git a/tar.sh b/tar.sh new file mode 100755 index 000000000..4ddfbe9aa --- /dev/null +++ b/tar.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +version=$1 + +if [ "$version" = "" ]; then + echo "Usage: tar.sh \$VERSION" + exit 1 +fi + +dir="starter-kit-${version}" + +mkdir $dir + +cp starter-kit*.el $dir + +tar cf starter-kit-${version}.tar $dir diff --git a/themes/color-theme-tomorrow.el b/themes/color-theme-tomorrow.el new file mode 100644 index 000000000..8696e35bb --- /dev/null +++ b/themes/color-theme-tomorrow.el @@ -0,0 +1,610 @@ +;;; color-theme-tomorrow.el --- GNU Emacs port of the Tomorrow Theme. + +;;; Commentary: +;; +;;; Tomorrow Theme +;; +;; Originally by Chris Kempson https://github.com/ChrisKempson/Tomorrow-Theme +;; Ported to GNU Emacs by Chris Charles +;; Rewritten by Steve Purcell for compatibility +;; Update to match master by Donald Curtis + + +;;; Code: + +(defconst color-theme-tomorrow-colors + '((night . ((background . "#1d1f21") + (current-line . "#282a2e") + (selection . "#373b41") + (foreground . "#c5c8c6") + (comment . "#969896") + (red . "#cc6666") + (orange . "#de935f") + (yellow . "#f0c674") + (green . "#b5bd68") + (aqua . "#8abeb7") + (blue . "#81a2be") + (purple . "#b294bb"))) + (day . ((background . "#ffffff") + (current-line . "#efefef") + (selection . "#d6d6d6") + (foreground . "#4d4d4c") + (comment . "#8e908c") + (red . "#c82829") + (orange . "#f5871f") + (yellow . "#eab700") + (green . "#718c00") + (aqua . "#3e999f") + (blue . "#4271ae") + (purple . "#8959a8"))) + (night-eighties . ((background . "#2d2d2d") + (current-line . "#393939") + (selection . "#515151") + (foreground . "#cccccc") + (comment . "#999999") + (red . "#f2777a") + (orange . "#f99157") + (yellow . "#ffcc66") + (green . "#99cc99") + (aqua . "#66cccc") + (blue . "#6699cc") + (purple . "#cc99cc"))) + (night-blue . ((background . "#002451") + (current-line . "#00346e") + (selection . "#003f8e") + (foreground . "#ffffff") + (comment . "#7285b7") + (red . "#ff9da4") + (orange . "#ffc58f") + (yellow . "#ffeead") + (green . "#d1f1a9") + (aqua . "#99ffff") + (blue . "#bbdaff") + (purple . "#ebbbff"))) + (night-bright . ((background . "#000000") + (current-line . "#2a2a2a") + (selection . "#424242") + (foreground . "#eaeaea") + (comment . "#969896") + (red . "#d54e53") + (orange . "#e78c45") + (yellow . "#e7c547") + (green . "#b9ca4a") + (aqua . "#70c0b1") + (blue . "#7aa6da") + (purple . "#c397d8"))))) + + + +(defmacro color-theme-tomorrow--with-colors (mode &rest body) + "Execute `BODY' in a scope with variables bound to the various tomorrow colors. + +`MODE' should be set to either 'day, 'night, 'night-eighties, 'night-blue or 'night-bright." + `(let* ((colors (or (cdr (assoc ,mode color-theme-tomorrow-colors)) + (error "no such theme flavor"))) + (background (cdr (assoc 'background colors))) + (current-line (cdr (assoc 'current-line colors))) + (selection (cdr (assoc 'selection colors))) + (foreground (cdr (assoc 'foreground colors))) + (comment (cdr (assoc 'comment colors))) + (red (cdr (assoc 'red colors))) + (orange (cdr (assoc 'orange colors))) + (yellow (cdr (assoc 'yellow colors))) + (green (cdr (assoc 'green colors))) + (aqua (cdr (assoc 'aqua colors))) + (blue (cdr (assoc 'blue colors))) + (purple (cdr (assoc 'purple colors))) + (class '((class color) (min-colors 89)))) + ,@body)) + +(defmacro color-theme-tomorrow--face-specs () + "Return a backquote which defines a list of face specs. + +It expects to be evaluated in a scope in which the various color +names to which it refers are bound." + (quote + `(;; Standard font lock faces + (default ((,class (:foreground ,foreground :background ,background)))) + (bold ((,class (:weight bold)))) + (bold-italic ((,class (:slant italic :weight bold)))) + (underline ((,class (:underline t)))) + (italic ((,class (:slant italic)))) + (shadow ((,class (:foreground ,comment)))) + (success ((,class (:foreground ,green)))) + (error ((,class (:foreground ,red)))) + (warning ((,class (:foreground ,orange)))) + (outline-4 ((,class (:slant normal :foreground ,comment)))) + + ;; Font-lock stuff + (font-lock-builtin-face ((,class (:foreground ,aqua)))) + (font-lock-comment-delimiter-face ((,class (:foreground ,comment :slant italic)))) + (font-lock-comment-face ((,class (:foreground ,comment :slant italic)))) + (font-lock-constant-face ((,class (:foreground ,aqua)))) + (font-lock-doc-face ((,class (:foreground ,comment)))) + (font-lock-doc-string-face ((,class (:foreground ,yellow)))) + (font-lock-function-name-face ((,class (:foreground ,blue)))) + (font-lock-keyword-face ((,class (:foreground ,purple)))) + (font-lock-negation-char-face ((,class (:foreground ,green)))) + (font-lock-preprocessor-face ((,class (:foreground ,purple)))) + (font-lock-regexp-grouping-backslash ((,class (:foreground ,yellow)))) + (font-lock-regexp-grouping-construct ((,class (:foreground ,purple)))) + (font-lock-string-face ((,class (:foreground ,green)))) + (font-lock-type-face ((,class (:foreground ,yellow)))) + (font-lock-variable-name-face ((,class (:foreground ,orange)))) + (font-lock-warning-face ((,class (:weight bold :foreground ,red)))) + + ;; Flymake + (flymake-warnline ((,class (:underline ,orange :background ,background)))) + (flymake-errline ((,class (:underline ,red :background ,background)))) + + ;; Clojure errors + (clojure-test-failure-face ((,class (:background nil :inherit flymake-warnline)))) + (clojure-test-error-face ((,class (:background nil :inherit flymake-errline)))) + (clojure-test-success-face ((,class (:background nil :foreground nil :underline ,green)))) + + ;; For Brian Carper's extended clojure syntax table + (clojure-keyword ((,class (:foreground ,yellow)))) + (clojure-parens ((,class (:foreground ,foreground)))) + (clojure-braces ((,class (:foreground ,green)))) + (clojure-brackets ((,class (:foreground ,yellow)))) + (clojure-double-quote ((,class (:foreground ,aqua :background nil)))) + (clojure-special ((,class (:foreground ,blue)))) + (clojure-java-call ((,class (:foreground ,purple)))) + + ;; Rainbow-delimiters + (rainbow-delimiters-depth-1-face ((,class (:foreground ,purple)))) + (rainbow-delimiters-depth-2-face ((,class (:foreground ,blue)))) + (rainbow-delimiters-depth-3-face ((,class (:foreground ,aqua)))) + (rainbow-delimiters-depth-4-face ((,class (:foreground ,green)))) + (rainbow-delimiters-depth-5-face ((,class (:foreground ,yellow)))) + (rainbow-delimiters-depth-6-face ((,class (:foreground ,orange)))) + (rainbow-delimiters-depth-7-face ((,class (:foreground ,red)))) + (rainbow-delimiters-depth-8-face ((,class (:foreground ,comment)))) + (rainbow-delimiters-depth-9-face ((,class (:foreground ,foreground)))) + (rainbow-delimiters-unmatched-face ((,class (:foreground ,red)))) + + ;; MMM-mode + (mmm-code-submode-face ((,class (:background ,current-line)))) + (mmm-comment-submode-face ((,class (:inherit font-lock-comment-face)))) + (mmm-output-submode-face ((,class (:background ,current-line)))) + + ;; Search + (match ((,class (:foreground ,blue :background ,background :inverse-video t)))) + (isearch ((,class (:foreground ,yellow :background ,background :inverse-video t)))) + (isearch-lazy-highlight-face ((,class (:foreground ,aqua :background ,background :inverse-video t)))) + (isearch-fail ((,class (:background ,background :inherit font-lock-warning-face :inverse-video t)))) + + ;; IDO + (ido-subdir ((,class (:foreground ,comment)))) + (ido-first-match ((,class (:foreground ,orange :weight bold)))) + (ido-only-match ((,class (:foreground ,red :weight bold)))) + (ido-indicator ((,class (:foreground ,red :background ,background)))) + (ido-virtual ((,class (:foreground ,comment)))) + + ;; which-function + (which-func ((,class (:foreground ,blue :background nil :weight bold)))) + + ;; Emacs interface + (cursor ((,class (:background ,red)))) + (fringe ((,class (:background ,current-line)))) + ;;(linum ((,class (:background ,current-line)))) + (linum ((,class (:foreground ,current-line)))) + (hl-line ((,class (:background ,current-line)))) + (border ((,class (:background ,current-line)))) + (border-glyph ((,class (nil)))) + (highlight ((,class (:background ,green)))) + (link ((,class (:foreground ,blue)))) + (link-visited ((,class (:foreground ,purple)))) + (gui-element ((,class (:background ,current-line :foreground ,foreground)))) + (mode-line ((,class (:background ,selection :foreground ,foreground)))) + (mode-line-inactive ((,class (:background ,current-line :foreground ,foreground)))) + (mode-line-buffer-id ((,class (:foreground ,purple :background nil)))) + (mode-line-emphasis ((,class (:foreground ,foreground :slant italic)))) + (mode-line-highlight ((,class (:foreground ,purple :box nil :weight bold)))) + (minibuffer-prompt ((,class (:foreground ,blue)))) + (region ((,class (:background ,selection)))) + (secondary-selection ((,class (:background ,current-line)))) + + (header-line ((,class (:inherit mode-line :foreground ,purple :background nil)))) + + (trailing-whitespace ((,class (:background ,red :foreground ,yellow)))) + (whitespace-empty ((,class (:foreground ,red :background ,yellow)))) + (whitespace-hspace ((,class (:background ,selection :foreground ,comment)))) + (whitespace-indentation ((,class (:background ,yellow :foreground ,red)))) + (whitespace-line ((,class (:background ,current-line :foreground ,purple)))) + (whitespace-newline ((,class (:foreground ,comment)))) + (whitespace-space ((,class (:background ,current-line :foreground ,comment)))) + (whitespace-space-after-tab ((,class (:background ,yellow :foreground ,red)))) + (whitespace-space-before-tab ((,class (:background ,orange :foreground ,red)))) + (whitespace-tab ((,class (:background ,selection :foreground ,comment)))) + (whitespace-trailing ((,class (:background ,red :foreground ,yellow)))) + + ;; Parenthesis matching (built-in) + (show-paren-match ((,class (:background ,blue :foreground ,current-line)))) + (show-paren-mismatch ((,class (:background ,orange :foreground ,current-line)))) + + ;; Parenthesis matching (mic-paren) + (paren-face-match ((,class (:foreground nil :background nil :inherit show-paren-match)))) + (paren-face-mismatch ((,class (:foreground nil :background nil :inherit show-paren-mismatch)))) + (paren-face-no-match ((,class (:foreground nil :background nil :inherit show-paren-mismatch)))) + + ;; Parenthesis dimming (parenface) + (paren-face ((,class (:foreground ,comment :background nil)))) + + (sh-heredoc ((,class (:foreground nil :inherit font-lock-string-face :weight normal)))) + (sh-quoted-exec ((,class (:foreground nil :inherit font-lock-preprocessor-face)))) + (slime-highlight-edits-face ((,class (:weight bold)))) + (slime-repl-input-face ((,class (:weight normal :underline nil)))) + (slime-repl-prompt-face ((,class (:underline nil :weight bold :foreground ,purple)))) + (slime-repl-result-face ((,class (:foreground ,green)))) + (slime-repl-output-face ((,class (:foreground ,blue :background ,background)))) + + (csv-separator-face ((,class (:foreground ,orange)))) + + (diff-added ((,class (:foreground ,green)))) + (diff-changed ((,class (:foreground ,yellow)))) + (diff-removed ((,class (:foreground ,red)))) + (diff-header ((,class (:background ,current-line)))) + (diff-file-header ((,class (:background ,selection)))) + (diff-hunk-header ((,class (:background ,current-line :foreground ,purple)))) + + (ediff-even-diff-A ((,class (:foreground nil :background nil :inverse-video t)))) + (ediff-even-diff-B ((,class (:foreground nil :background nil :inverse-video t)))) + (ediff-odd-diff-A ((,class (:foreground ,comment :background nil :inverse-video t)))) + (ediff-odd-diff-B ((,class (:foreground ,comment :background nil :inverse-video t)))) + + (eldoc-highlight-function-argument ((,class (:foreground ,green :weight bold)))) + + ;; undo-tree + (undo-tree-visualizer-default-face ((,class (:foreground ,foreground)))) + (undo-tree-visualizer-current-face ((,class (:foreground ,green :weight bold)))) + (undo-tree-visualizer-active-branch-face ((,class (:foreground ,red)))) + (undo-tree-visualizer-register-face ((,class (:foreground ,yellow)))) + + ;; auctex + (font-latex-bold-face ((,class (:foreground ,green)))) + (font-latex-doctex-documentation-face ((,class (:background ,current-line)))) + (font-latex-italic-face ((,class (:foreground ,green)))) + (font-latex-math-face ((,class (:foreground ,orange)))) + (font-latex-sectioning-0-face ((,class (:foreground ,yellow)))) + (font-latex-sectioning-1-face ((,class (:foreground ,yellow)))) + (font-latex-sectioning-2-face ((,class (:foreground ,yellow)))) + (font-latex-sectioning-3-face ((,class (:foreground ,yellow)))) + (font-latex-sectioning-4-face ((,class (:foreground ,yellow)))) + (font-latex-sectioning-5-face ((,class (:foreground ,yellow)))) + (font-latex-sedate-face ((,class (:foreground ,aqua)))) + (font-latex-string-face ((,class (:foreground ,yellow)))) + (font-latex-verbatim-face ((,class (:foreground ,orange)))) + (font-latex-warning-face ((,class (:foreground ,red)))) + + ;; dired+ + (diredp-compressed-file-suffix ((,class (:foreground ,blue)))) + (diredp-dir-heading ((,class (:foreground nil :background nil :inherit heading)))) + (diredp-dir-priv ((,class (:foreground ,aqua :background nil)))) + (diredp-exec-priv ((,class (:foreground ,blue :background nil)))) + (diredp-executable-tag ((,class (:foreground ,red :background nil)))) + (diredp-file-name ((,class (:foreground ,yellow)))) + (diredp-file-suffix ((,class (:foreground ,green)))) + (diredp-flag-mark-line ((,class (:background nil :inherit highlight)))) + (diredp-ignored-file-name ((,class (:foreground ,comment)))) + (diredp-link-priv ((,class (:background nil :foreground ,purple)))) + (diredp-mode-line-flagged ((,class (:foreground ,red)))) + (diredp-mode-line-marked ((,class (:foreground ,green)))) + (diredp-no-priv ((,class (:background nil)))) + (diredp-number ((,class (:foreground ,yellow)))) + (diredp-other-priv ((,class (:background nil :foreground ,purple)))) + (diredp-rare-priv ((,class (:foreground ,red :background nil)))) + (diredp-read-priv ((,class (:foreground ,green :background nil)))) + (diredp-symlink ((,class (:foreground ,purple)))) + (diredp-write-priv ((,class (:foreground ,yellow :background nil)))) + + ;; Magit (a patch is pending in magit to make these standard upstream) + (magit-branch ((,class (:foreground ,green)))) + (magit-header ((,class (:inherit nil :weight bold)))) + (magit-item-highlight ((,class (:inherit highlight :background nil)))) + (magit-log-graph ((,class (:foreground ,comment)))) + (magit-log-sha1 ((,class (:foreground ,purple)))) + (magit-log-head-label-bisect-bad ((,class (:foreground ,red)))) + (magit-log-head-label-bisect-good ((,class (:foreground ,green)))) + (magit-log-head-label-default ((,class (:foreground ,yellow :box nil :weight bold)))) + (magit-log-head-label-local ((,class (:foreground ,blue)))) + (magit-log-head-label-remote ((,class (:foreground ,green)))) + (magit-log-head-label-tags ((,class (:foreground ,aqua :box nil :weight bold)))) + (magit-section-title ((,class (:inherit diff-hunk-header)))) + + (link ((,class (:foreground nil :underline t)))) + (widget-button ((,class (:underline t)))) + (widget-field ((,class (:background ,current-line :box (:line-width 1 :color ,foreground))))) + + ;; Compilation (most faces politely inherit from 'success, 'error, 'warning etc.) + (compilation-column-number ((,class (:foreground ,yellow)))) + (compilation-line-number ((,class (:foreground ,yellow)))) + (compilation-message-face ((,class (:foreground ,blue)))) + (compilation-mode-line-exit ((,class (:foreground ,green)))) + (compilation-mode-line-fail ((,class (:foreground ,red)))) + (compilation-mode-line-run ((,class (:foreground ,blue)))) + + ;; Grep + (grep-context-face ((,class (:foreground ,comment)))) + (grep-error-face ((,class (:foreground ,red :weight bold :underline t)))) + (grep-hit-face ((,class (:foreground ,blue)))) + (grep-match-face ((,class (:foreground nil :background nil :inherit match)))) + + (regex-tool-matched-face ((,class (:foreground nil :background nil :inherit match)))) + + ;; mark-multiple + (mm/master-face ((,class (:inherit region :foreground nil :background nil)))) + (mm/mirror-face ((,class (:inherit region :foreground nil :background nil)))) + + (org-agenda-structure ((,class (:foreground ,purple)))) + (org-agenda-date ((,class (:foreground ,blue :underline nil)))) + (org-agenda-done ((,class (:foreground ,green)))) + (org-agenda-dimmed-todo-face ((,class (:foreground ,comment)))) + (org-block ((,class (:foreground ,orange)))) + (org-code ((,class (:foreground ,yellow)))) + (org-column ((,class (:background ,current-line)))) + (org-column-title ((,class (:inherit org-column :weight bold :underline t)))) + (org-date ((,class (:foreground ,purple :underline t)))) + (org-document-info ((,class (:foreground ,aqua)))) + (org-document-info-keyword ((,class (:foreground ,green)))) + (org-document-title ((,class (:weight bold :foreground ,orange :height 1.44)))) + (org-done ((,class (:foreground ,green)))) + (org-ellipsis ((,class (:foreground ,comment)))) + (org-footnote ((,class (:foreground ,aqua)))) + (org-formula ((,class (:foreground ,red)))) + (org-hide ((,class (:foreground ,current-line)))) + (org-link ((,class (:foreground ,blue)))) + (org-scheduled ((,class (:foreground ,green)))) + (org-scheduled-previously ((,class (:foreground ,orange)))) + (org-scheduled-today ((,class (:foreground ,green)))) + (org-special-keyword ((,class (:foreground ,orange)))) + (org-table ((,class (:foreground ,purple)))) + (org-todo ((,class (:foreground ,red)))) + (org-upcoming-deadline ((,class (:foreground ,orange)))) + (org-warning ((,class (:weight bold :foreground ,red)))) + + (markdown-url-face ((,class (:inherit link)))) + (markdown-link-face ((,class (:foreground ,blue :underline t)))) + + (hl-sexp-face ((,class (:background ,current-line)))) + (highlight-80+ ((,class (:background ,current-line)))) + + ;; Python-specific overrides + (py-builtins-face ((,class (:foreground ,orange :weight normal)))) + + ;; js2-mode + (js2-warning-face ((,class (:underline ,orange)))) + (js2-error-face ((,class (:foreground nil :underline ,red)))) + (js2-external-variable-face ((,class (:foreground ,purple)))) + (js2-function-param-face ((,class (:foreground ,blue)))) + (js2-instance-member-face ((,class (:foreground ,blue)))) + (js2-private-function-call-face ((,class (:foreground ,red)))) + + ;; js3-mode + (js3-warning-face ((,class (:underline ,orange)))) + (js3-error-face ((,class (:foreground nil :underline ,red)))) + (js3-external-variable-face ((,class (:foreground ,purple)))) + (js3-function-param-face ((,class (:foreground ,blue)))) + (js3-jsdoc-tag-face ((,class (:foreground ,orange)))) + (js3-jsdoc-type-face ((,class (:foreground ,aqua)))) + (js3-jsdoc-value-face ((,class (:foreground ,yellow)))) + (js3-jsdoc-html-tag-name-face ((,class (:foreground ,blue)))) + (js3-jsdoc-html-tag-delimiter-face ((,class (:foreground ,green)))) + (js3-instance-member-face ((,class (:foreground ,blue)))) + (js3-private-function-call-face ((,class (:foreground ,red)))) + + ;; nxml + (nxml-name-face ((,class (:foreground unspecified :inherit font-lock-constant-face)))) + (nxml-attribute-local-name-face ((,class (:foreground unspecified :inherit font-lock-variable-name-face)))) + (nxml-ref-face ((,class (:foreground unspecified :inherit font-lock-preprocessor-face)))) + (nxml-delimiter-face ((,class (:foreground unspecified :inherit font-lock-keyword-face)))) + (nxml-delimited-data-face ((,class (:foreground unspecified :inherit font-lock-string-face)))) + (rng-error-face ((,class (:underline ,red)))) + + ;; RHTML + (erb-delim-face ((,class (:background ,current-line)))) + (erb-exec-face ((,class (:background ,current-line :weight bold)))) + (erb-exec-delim-face ((,class (:background ,current-line)))) + (erb-out-face ((,class (:background ,current-line :weight bold)))) + (erb-out-delim-face ((,class (:background ,current-line)))) + (erb-comment-face ((,class (:background ,current-line :weight bold :slant italic)))) + (erb-comment-delim-face ((,class (:background ,current-line)))) + + ;; Message-mode + (message-header-other ((,class (:foreground nil :background nil :weight normal)))) + (message-header-subject ((,class (:inherit message-header-other :weight bold :foreground ,yellow)))) + (message-header-to ((,class (:inherit message-header-other :weight bold :foreground ,orange)))) + (message-header-cc ((,class (:inherit message-header-to :foreground nil)))) + (message-header-name ((,class (:foreground ,blue :background nil)))) + (message-header-newsgroups ((,class (:foreground ,aqua :background nil :slant normal)))) + (message-separator ((,class (:foreground ,purple)))) + + ;; Jabber + (jabber-chat-prompt-local ((,class (:foreground ,yellow)))) + (jabber-chat-prompt-foreign ((,class (:foreground ,orange)))) + (jabber-chat-prompt-system ((,class (:foreground ,yellow :weight bold)))) + (jabber-chat-text-local ((,class (:foreground ,yellow)))) + (jabber-chat-text-foreign ((,class (:foreground ,orange)))) + (jabber-chat-text-error ((,class (:foreground ,red)))) + + (jabber-roster-user-online ((,class (:foreground ,green)))) + (jabber-roster-user-xa ((,class :foreground ,comment))) + (jabber-roster-user-dnd ((,class :foreground ,yellow))) + (jabber-roster-user-away ((,class (:foreground ,orange)))) + (jabber-roster-user-chatty ((,class (:foreground ,purple)))) + (jabber-roster-user-error ((,class (:foreground ,red)))) + (jabber-roster-user-offline ((,class (:foreground ,comment)))) + + (jabber-rare-time-face ((,class (:foreground ,comment)))) + (jabber-activity-face ((,class (:foreground ,purple)))) + (jabber-activity-personal-face ((,class (:foreground ,aqua)))) + + ;; Gnus + (gnus-cite-1 ((,class (:inherit outline-1 :foreground nil)))) + (gnus-cite-2 ((,class (:inherit outline-2 :foreground nil)))) + (gnus-cite-3 ((,class (:inherit outline-3 :foreground nil)))) + (gnus-cite-4 ((,class (:inherit outline-4 :foreground nil)))) + (gnus-cite-5 ((,class (:inherit outline-5 :foreground nil)))) + (gnus-cite-6 ((,class (:inherit outline-6 :foreground nil)))) + (gnus-cite-7 ((,class (:inherit outline-7 :foreground nil)))) + (gnus-cite-8 ((,class (:inherit outline-8 :foreground nil)))) + ;; there are several more -cite- faces... + (gnus-header-content ((,class (:inherit message-header-other)))) + (gnus-header-subject ((,class (:inherit message-header-subject)))) + (gnus-header-from ((,class (:inherit message-header-other-face :weight bold :foreground ,orange)))) + (gnus-header-name ((,class (:inherit message-header-name)))) + (gnus-button ((,class (:inherit link :foreground nil)))) + (gnus-signature ((,class (:inherit font-lock-comment-face)))) + + (gnus-summary-normal-unread ((,class (:foreground ,blue :weight normal)))) + (gnus-summary-normal-read ((,class (:foreground ,foreground :weight normal)))) + (gnus-summary-normal-ancient ((,class (:foreground ,aqua :weight normal)))) + (gnus-summary-normal-ticked ((,class (:foreground ,orange :weight normal)))) + (gnus-summary-low-unread ((,class (:foreground ,comment :weight normal)))) + (gnus-summary-low-read ((,class (:foreground ,comment :weight normal)))) + (gnus-summary-low-ancient ((,class (:foreground ,comment :weight normal)))) + (gnus-summary-high-unread ((,class (:foreground ,yellow :weight normal)))) + (gnus-summary-high-read ((,class (:foreground ,green :weight normal)))) + (gnus-summary-high-ancient ((,class (:foreground ,green :weight normal)))) + (gnus-summary-high-ticked ((,class (:foreground ,orange :weight normal)))) + (gnus-summary-cancelled ((,class (:foreground ,red :background nil :weight normal)))) + + (gnus-group-mail-low ((,class (:foreground ,comment)))) + (gnus-group-mail-low-empty ((,class (:foreground ,comment)))) + (gnus-group-mail-1 ((,class (:foreground nil :weight normal :inherit outline-1)))) + (gnus-group-mail-2 ((,class (:foreground nil :weight normal :inherit outline-2)))) + (gnus-group-mail-3 ((,class (:foreground nil :weight normal :inherit outline-3)))) + (gnus-group-mail-4 ((,class (:foreground nil :weight normal :inherit outline-4)))) + (gnus-group-mail-5 ((,class (:foreground nil :weight normal :inherit outline-5)))) + (gnus-group-mail-6 ((,class (:foreground nil :weight normal :inherit outline-6)))) + (gnus-group-mail-1-empty ((,class (:inherit gnus-group-mail-1 :foreground ,comment)))) + (gnus-group-mail-2-empty ((,class (:inherit gnus-group-mail-2 :foreground ,comment)))) + (gnus-group-mail-3-empty ((,class (:inherit gnus-group-mail-3 :foreground ,comment)))) + (gnus-group-mail-4-empty ((,class (:inherit gnus-group-mail-4 :foreground ,comment)))) + (gnus-group-mail-5-empty ((,class (:inherit gnus-group-mail-5 :foreground ,comment)))) + (gnus-group-mail-6-empty ((,class (:inherit gnus-group-mail-6 :foreground ,comment)))) + (gnus-group-news-1 ((,class (:foreground nil :weight normal :inherit outline-5)))) + (gnus-group-news-2 ((,class (:foreground nil :weight normal :inherit outline-6)))) + (gnus-group-news-3 ((,class (:foreground nil :weight normal :inherit outline-7)))) + (gnus-group-news-4 ((,class (:foreground nil :weight normal :inherit outline-8)))) + (gnus-group-news-5 ((,class (:foreground nil :weight normal :inherit outline-1)))) + (gnus-group-news-6 ((,class (:foreground nil :weight normal :inherit outline-2)))) + (gnus-group-news-1-empty ((,class (:inherit gnus-group-news-1 :foreground ,comment)))) + (gnus-group-news-2-empty ((,class (:inherit gnus-group-news-2 :foreground ,comment)))) + (gnus-group-news-3-empty ((,class (:inherit gnus-group-news-3 :foreground ,comment)))) + (gnus-group-news-4-empty ((,class (:inherit gnus-group-news-4 :foreground ,comment)))) + (gnus-group-news-5-empty ((,class (:inherit gnus-group-news-5 :foreground ,comment)))) + (gnus-group-news-6-empty ((,class (:inherit gnus-group-news-6 :foreground ,comment)))) + + (erc-direct-msg-face ((,class (:foreground ,orange)))) + (erc-error-face ((,class (:foreground ,red)))) + (erc-header-face ((,class (:foreground ,foreground :background ,selection)))) + (erc-input-face ((,class (:foreground ,green)))) + (erc-keyword-face ((,class (:foreground ,yellow)))) + (erc-current-nick-face ((,class (:foreground ,green)))) + (erc-my-nick-face ((,class (:foreground ,green)))) + (erc-nick-default-face ((,class (:weight normal :foreground ,purple)))) + (erc-nick-msg-face ((,class (:weight normal :foreground ,yellow)))) + (erc-notice-face ((,class (:foreground ,comment)))) + (erc-pal-face ((,class (:foreground ,orange)))) + (erc-prompt-face ((,class (:foreground ,blue)))) + (erc-timestamp-face ((,class (:foreground ,aqua)))) + + (custom-variable-tag ((,class (:foreground ,blue)))) + (custom-group-tag ((,class (:foreground ,blue)))) + (custom-state ((,class (:foreground ,green)))) + ))) + +(defmacro color-theme-tomorrow--frame-parameter-specs () + "Return a backquote which defines a list of frame parameter specs. + +These are required by color-theme's `color-theme-install', but +not by the new `deftheme' mechanism. It expects to be evaluated +in a scope in which the various color names to which it refers +are bound." + (quote + `(((background-color . ,background) + (background-mode . light) + (border-color . ,foreground) + (cursor-color . ,purple) + (foreground-color . ,foreground) + (mouse-color . ,aqua))))) + +(defun color-theme-tomorrow--theme-name (mode) + (intern (format "tomorrow-%s" (symbol-name mode)))) + +(defmacro color-theme-tomorrow--define-theme (mode) + "Define a theme for the tomorrow variant `MODE'." + (let ((name (color-theme-tomorrow--theme-name mode)) + (doc (format "tomorrow-%s" mode))) + `(progn + (deftheme ,name ,doc) + (color-theme-tomorrow--with-colors + ',mode + (apply 'custom-theme-set-faces ',name + (color-theme-tomorrow--face-specs)) + (custom-theme-set-variables + ',name + `(fci-rule-color ,current-line) + `(ansi-color-names-vector (vector ,foreground ,red ,green ,yellow ,blue ,purple ,aqua ,background)) + '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold]))) + (provide-theme ',name)))) + + +(defun color-theme-tomorrow-real (mode) + "Apply the tomorrow variant theme." + (if (fboundp 'load-theme) + (let ((name (color-theme-tomorrow--theme-name mode))) + (if (> emacs-major-version 23) + (load-theme name t) + (load-theme name))) + (progn + (require 'color-theme) + (color-theme-tomorrow--with-colors + mode + (color-theme-install + `(,(intern (concat "color-theme-tomorrow-" (symbol-name mode))) + ,@(color-theme-tomorrow--frame-parameter-specs) + ,@(color-theme-tomorrow--face-specs))) + ;; ansi-color - comint and other modes that handle terminal color escape sequences + (setq ansi-color-names-vector (vector foreground red green yellow blue purple aqua background)) + (setq ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold]))))) + +;;;###autoload +(when (boundp 'custom-theme-load-path) + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +;;;###autoload +(defun color-theme-tomorrow-night () + (interactive) + (color-theme-tomorrow-real 'night)) + +;;;###autoload +(defun color-theme-tomorrow () + (interactive) + (color-theme-tomorrow-real 'day)) + +;;;###autoload +(defun color-theme-tomorrow-night-bright () + (interactive) + (color-theme-tomorrow-real 'night-bright)) + +;;;###autoload +(defun color-theme-tomorrow-night-eighties () + (interactive) + (color-theme-tomorrow-real 'night-eighties)) + +;;;###autoload +(defun color-theme-tomorrow-night-blue () + (interactive) + (color-theme-tomorrow-real 'night-blue)) + + +(provide 'color-theme-tomorrow) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; End: + +;;; color-theme-tomorrow.el ends here diff --git a/themes/tomorrow-night-blue-theme.el b/themes/tomorrow-night-blue-theme.el new file mode 100644 index 000000000..32ffdde3f --- /dev/null +++ b/themes/tomorrow-night-blue-theme.el @@ -0,0 +1,2 @@ +(require 'color-theme-tomorrow) +(color-theme-tomorrow--define-theme night-blue) diff --git a/themes/tomorrow-night-bright-theme.el b/themes/tomorrow-night-bright-theme.el new file mode 100644 index 000000000..c1be97ea1 --- /dev/null +++ b/themes/tomorrow-night-bright-theme.el @@ -0,0 +1,2 @@ +(require 'color-theme-tomorrow) +(color-theme-tomorrow--define-theme night-bright) diff --git a/themes/tomorrow-night-eighties-theme.el b/themes/tomorrow-night-eighties-theme.el new file mode 100644 index 000000000..4818341da --- /dev/null +++ b/themes/tomorrow-night-eighties-theme.el @@ -0,0 +1,2 @@ +(require 'color-theme-tomorrow) +(color-theme-tomorrow--define-theme night-eighties) diff --git a/themes/tomorrow-night-theme.el b/themes/tomorrow-night-theme.el new file mode 100644 index 000000000..67c9a2578 --- /dev/null +++ b/themes/tomorrow-night-theme.el @@ -0,0 +1,2 @@ +(require 'color-theme-tomorrow) +(color-theme-tomorrow--define-theme night) diff --git a/themes/tomorrow-theme.el b/themes/tomorrow-theme.el new file mode 100644 index 000000000..58761dddb --- /dev/null +++ b/themes/tomorrow-theme.el @@ -0,0 +1,2 @@ +(require 'color-theme-tomorrow) +(color-theme-tomorrow--define-theme day) diff --git a/themes/zenburn-theme.el b/themes/zenburn-theme.el new file mode 100644 index 000000000..5395d28f7 --- /dev/null +++ b/themes/zenburn-theme.el @@ -0,0 +1,474 @@ +;;; zenburn-theme.el --- A low contrast color theme for Emacs. + +;; Copyright (C) 2011 Bozhidar Batsov + +;; Author: Bozhidar Batsov +;; URL: http://github.com/bbatsov/zenburn-emacs +;; Version: 0.1 + +;; 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: +;; +;; A port of the popular Vim theme Zenburn for Emacs 24, built on top of +;; the new built-in theme support in Emacs 24. There exists one other version of the +;; theme by Daniel Brockman. My version was originally based on it, +;; but it was in such a disarray, that I decided to rewrite it from +;; scratch in a more maintainable manner (hopefully). +;; +;;; Installation: +;; +;; Drop the theme in a folder that is on `custom-theme-load-path' +;; and enjoy! +;; +;; Don't forget that the theme requires Emacs 24. +;; +;;; Bugs +;; +;; None that I'm aware of. +;; +;;; Credits +;; +;; Jani Nurminen created the original theme for vim on such this port +;; is based. +;; +;;; Code +(deftheme zenburn "The Zenburn color theme") + +(let ((class '((class color) (min-colors 89))) + ;; Zenburn palette + ;; colors with +x are lighter, colors with -x are darker + (zenburn-fg "#dcdccc") + (zenburn-fg-1 "#656555") + (zenburn-bg-1 "#2b2b2b") + (zenburn-bg-05 "#383838") + (zenburn-bg "#3f3f3f") + (zenburn-bg+1 "#4f4f4f") + (zenburn-bg+2 "#5f5f5f") + (zenburn-red+1 "#dca3a3") + (zenburn-red "#cc9393") + (zenburn-red-1 "#bc8383") + (zenburn-red-2 "#ac7373") + (zenburn-red-3 "#9c6363") + (zenburn-red-4 "#8c5353") + (zenburn-orange "#dfaf8f") + (zenburn-yellow "#f0dfaf") + (zenburn-yellow-1 "#e0cf9f") + (zenburn-yellow-2 "#d0bf8f") + (zenburn-green-1 "#5f7f5f") + (zenburn-green "#7f9f7f") + (zenburn-green+1 "#8fb28f") + (zenburn-green+2 "#9fc59f") + (zenburn-green+3 "#afd8af") + (zenburn-green+4 "#bfebbf") + (zenburn-cyan "#93e0e3") + (zenburn-blue+1 "#94bff3") + (zenburn-blue "#8cd0d3") + (zenburn-blue-1 "#7cb8bb") + (zenburn-blue-2 "#6ca0a3") + (zenburn-blue-3 "#5c888b") + (zenburn-blue-4 "#4c7073") + (zenburn-blue-5 "#366060") + (zenburn-magenta "#dc8cc3")) + (custom-theme-set-faces + 'zenburn + '(button ((t (:underline t)))) + `(link ((,class (:foreground ,zenburn-yellow :underline t :weight bold)))) + `(link-visited ((,class (:foreground ,zenburn-yellow-2 :underline t :weight normal)))) + + ;;; define some reusable zenburn faces that we can inherit from afterwards + `(zenburn-strong-1-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(zenburn-strong-2-face ((,class (:foreground ,zenburn-orange :weight bold)))) + `(zenburn-warning-face ((,class (:foreground ,zenburn-yellow-1 :weight bold :underline t)))) + `(zenburn-error-face ((,class (:foreground ,zenburn-red-1 :weight bold :underline t)))) + + ;;; basic coloring + `(default ((,class (:foreground ,zenburn-fg :background ,zenburn-bg)))) + `(cursor ((,class (:foreground ,zenburn-fg)))) + `(escape-glyph-face ((,class (:foreground ,zenburn-red)))) + `(fringe ((,class (:foreground ,zenburn-fg :background ,zenburn-bg+1)))) + `(header-line ((,class (:foreground ,zenburn-yellow + :background ,zenburn-bg-1 + :box (:line-width -1 :style released-button))))) + `(highlight ((,class (:background ,zenburn-bg-05)))) + + ;;; compilation + `(compilation-column-face ((,class (:foreground ,zenburn-yellow)))) + `(compilation-enter-directory-face ((,class (:foreground ,zenburn-green)))) + `(compilation-error-face ((,class (:foreground ,zenburn-red-1 :weight bold :underline t)))) + `(compilation-face ((,class (:foreground ,zenburn-fg)))) + `(compilation-info-face ((,class (:foreground ,zenburn-blue)))) + `(compilation-info ((,class (:foreground ,zenburn-green+4 :underline t)))) + `(compilation-leave-directory-face ((,class (:foreground ,zenburn-green)))) + `(compilation-line-face ((,class (:foreground ,zenburn-yellow)))) + `(compilation-line-number ((,class (:foreground ,zenburn-yellow)))) + `(compilation-message-face ((,class (:foreground ,zenburn-blue)))) + `(compilation-warning-face ((,class (:foreground ,zenburn-yellow-1 :weight bold :underline t)))) + + ;;; grep + `(grep-context-face ((,class (:foreground ,zenburn-fg)))) + `(grep-error-face ((,class (:foreground ,zenburn-red-1 :weight bold :underline t)))) + `(grep-hit-face ((,class (:foreground ,zenburn-blue)))) + `(grep-match-face ((,class (:foreground ,zenburn-orange :weight bold)))) + `(match ((,class (:background ,zenburn-bg-1 :foreground ,zenburn-orange :weight bold)))) + + ;; faces used by isearch + `(isearch ((,class (:foreground ,zenburn-yellow :background ,zenburn-bg-1)))) + `(isearch-fail ((,class (:foreground ,zenburn-fg :background ,zenburn-red-4)))) + `(lazy-highlight ((,class (:foreground ,zenburn-yellow :background ,zenburn-bg+2)))) + + `(menu ((,class (:foreground ,zenburn-fg :background ,zenburn-bg)))) + `(minibuffer-prompt ((,class (:foreground ,zenburn-yellow)))) + `(mode-line + ((,class (:foreground ,zenburn-green+1 + :background ,zenburn-bg-1 + :box (:line-width -1 :style released-button))))) + `(mode-line-buffer-id ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(mode-line-inactive + ((,class (:foreground ,zenburn-green-1 + :background ,zenburn-bg-05 + :box (:line-width -1 :style released-button))))) + `(region ((,class (:background ,zenburn-bg-1)))) + `(secondary-selection ((,class (:background ,zenburn-bg+2)))) + `(trailing-whitespace ((,class (:background ,zenburn-red)))) + `(vertical-border ((,class (:foreground ,zenburn-fg)))) + + ;;; font lock + `(font-lock-builtin-face ((,class (:foreground ,zenburn-blue)))) + `(font-lock-comment-face ((,class (:foreground ,zenburn-green)))) + `(font-lock-comment-delimiter-face ((,class (:foreground ,zenburn-green)))) + `(font-lock-constant-face ((,class (:foreground ,zenburn-green+4)))) + `(font-lock-doc-face ((,class (:foreground ,zenburn-green+1)))) + `(font-lock-doc-string-face ((,class (:foreground ,zenburn-blue+1)))) + `(font-lock-function-name-face ((,class (:foreground ,zenburn-blue)))) + `(font-lock-keyword-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(font-lock-negation-char-face ((,class (:foreground ,zenburn-fg)))) + `(font-lock-preprocessor-face ((,class (:foreground ,zenburn-blue)))) + `(font-lock-string-face ((,class (:foreground ,zenburn-red)))) + `(font-lock-type-face ((,class (:foreground ,zenburn-blue)))) + `(font-lock-variable-name-face ((,class (:foreground ,zenburn-orange)))) + `(font-lock-warning-face ((,class (:foreground ,zenburn-yellow-1 :weight bold :underline t)))) + + `(c-annotation-face ((,class (:inherit font-lock-constant-face)))) + + ;;; external + + ;; diff + `(diff-added ((,class (:foreground ,zenburn-green+4)))) + `(diff-changed ((,class (:foreground ,zenburn-yellow)))) + `(diff-removed ((,class (:foreground ,zenburn-red)))) + `(diff-header ((,class (:background ,zenburn-bg+1)))) + `(diff-file-header + ((,class (:background ,zenburn-bg+2 :foreground ,zenburn-fg :bold t)))) + + ;; eshell + `(eshell-prompt ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(eshell-ls-archive ((,class (:foreground ,zenburn-red-1 :weight bold)))) + `(eshell-ls-backup ((,class (:inherit font-lock-comment)))) + `(eshell-ls-clutter ((,class (:inherit font-lock-comment)))) + `(eshell-ls-directory ((,class (:foreground ,zenburn-blue+1 :weight bold)))) + `(eshell-ls-executable ((,class (:foreground ,zenburn-red+1 :weight bold)))) + `(eshell-ls-unreadable ((,class (:foreground ,zenburn-fg)))) + `(eshell-ls-missing ((,class (:inherit font-lock-warning)))) + `(eshell-ls-product ((,class (:inherit font-lock-doc)))) + `(eshell-ls-special ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(eshell-ls-symlink ((,class (:foreground ,zenburn-cyan :weight bold)))) + + ;; flymake + `(flymake-errline ((,class (:foreground ,zenburn-red-1 :weight bold :underline t)))) + `(flymake-warnline ((,class (:foreground ,zenburn-yellow-1 :weight bold :underline t)))) + + ;; flyspell + `(flyspell-duplicate ((,class (:foreground ,zenburn-yellow-1 :weight bold :underline t)))) + `(flyspell-incorrect ((,class (:foreground ,zenburn-red-1 :weight bold :underline t)))) + + ;; erc + `(erc-action-face ((,class (:inherit erc-default-face)))) + `(erc-bold-face ((,class (:weight bold)))) + `(erc-current-nick-face ((,class (:foreground ,zenburn-blue :weight bold)))) + `(erc-dangerous-host-face ((,class (:inherit font-lock-warning)))) + `(erc-default-face ((,class (:foreground ,zenburn-fg)))) + `(erc-direct-msg-face ((,class (:inherit erc-default)))) + `(erc-error-face ((,class (:inherit font-lock-warning)))) + `(erc-fool-face ((,class (:inherit erc-default)))) + `(erc-highlight-face ((,class (:inherit hover-highlight)))) + `(erc-input-face ((,class (:foreground ,zenburn-yellow)))) + `(erc-keyword-face ((,class (:foreground ,zenburn-blue :weight bold)))) + `(erc-nick-default-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(erc-my-nick-face ((,class (:foreground ,zenburn-red :weigth bold)))) + `(erc-nick-msg-face ((,class (:inherit erc-default)))) + `(erc-notice-face ((,class (:foreground ,zenburn-green)))) + `(erc-pal-face ((,class (:foreground ,zenburn-orange :weight bold)))) + `(erc-prompt-face ((,class (:foreground ,zenburn-orange :background ,zenburn-bg :weight bold)))) + `(erc-timestamp-face ((,class (:foreground ,zenburn-green+1)))) + `(erc-underline-face ((t (:underline t)))) + + ;; gnus + `(gnus-group-mail-1-face ((,class (:bold t :inherit gnus-group-mail-1-empty)))) + `(gnus-group-mail-1-empty-face ((,class (:inherit gnus-group-news-1-empty)))) + `(gnus-group-mail-2-face ((,class (:bold t :inherit gnus-group-mail-2-empty)))) + `(gnus-group-mail-2-empty-face ((,class (:inherit gnus-group-news-2-empty)))) + `(gnus-group-mail-3-face ((,class (:bold t :inherit gnus-group-mail-3-empty)))) + `(gnus-group-mail-3-empty-face ((,class (:inherit gnus-group-news-3-empty)))) + `(gnus-group-mail-4-face ((,class (:bold t :inherit gnus-group-mail-4-empty)))) + `(gnus-group-mail-4-empty-face ((,class (:inherit gnus-group-news-4-empty)))) + `(gnus-group-mail-5-face ((,class (:bold t :inherit gnus-group-mail-5-empty)))) + `(gnus-group-mail-5-empty-face ((,class (:inherit gnus-group-news-5-empty)))) + `(gnus-group-mail-6-face ((,class (:bold t :inherit gnus-group-mail-6-empty)))) + `(gnus-group-mail-6-empty-face ((,class (:inherit gnus-group-news-6-empty)))) + `(gnus-group-mail-low-face ((,class (:bold t :inherit gnus-group-mail-low-empty)))) + `(gnus-group-mail-low-empty-face ((,class (:inherit gnus-group-news-low-empty)))) + `(gnus-group-news-1-face ((,class (:bold t :inherit gnus-group-news-1-empty)))) + `(gnus-group-news-2-face ((,class (:bold t :inherit gnus-group-news-2-empty)))) + `(gnus-group-news-3-face ((,class (:bold t :inherit gnus-group-news-3-empty)))) + `(gnus-group-news-4-face ((,class (:bold t :inherit gnus-group-news-4-empty)))) + `(gnus-group-news-5-face ((,class (:bold t :inherit gnus-group-news-5-empty)))) + `(gnus-group-news-6-face ((,class (:bold t :inherit gnus-group-news-6-empty)))) + `(gnus-group-news-low-face ((,class (:bold t :inherit gnus-group-news-low-empty)))) + `(gnus-header-content-face ((,class (:inherit message-header-other)))) + `(gnus-header-from-face ((,class (:inherit message-header-from)))) + `(gnus-header-name-face ((,class (:inherit message-header-name)))) + `(gnus-header-newsgroups-face ((,class (:inherit message-header-other)))) + `(gnus-header-subject-face ((,class (:inherit message-header-subject)))) + `(gnus-summary-cancelled-face ((,class (:foreground ,zenburn-orange)))) + `(gnus-summary-high-ancient-face ((,class (:foreground ,zenburn-blue)))) + `(gnus-summary-high-read-face ((,class (:foreground ,zenburn-green :weight bold)))) + `(gnus-summary-high-ticked-face ((,class (:foreground ,zenburn-orange :weight bold)))) + `(gnus-summary-high-unread-face ((,class (:foreground ,zenburn-fg :weight bold)))) + `(gnus-summary-low-ancient-face ((,class (:foreground ,zenburn-blue)))) + `(gnus-summary-low-read-face ((t (:foreground ,zenburn-green)))) + `(gnus-summary-low-ticked-face ((,class (:foreground ,zenburn-orange :weight bold)))) + `(gnus-summary-low-unread-face ((,class (:foreground ,zenburn-fg)))) + `(gnus-summary-normal-ancient-face ((,class (:foreground ,zenburn-blue)))) + `(gnus-summary-normal-read-face ((,class (:foreground ,zenburn-green)))) + `(gnus-summary-normal-ticked-face ((,class (:foreground ,zenburn-orange :weight bold)))) + `(gnus-summary-normal-unread-face ((,class (:foreground ,zenburn-fg)))) + `(gnus-summary-selected-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(gnus-cite-1-face ((,class (:foreground ,zenburn-blue)))) + `(gnus-cite-10-face ((,class (:foreground ,zenburn-yellow-1)))) + `(gnus-cite-11-face ((,class (:foreground ,zenburn-yellow)))) + `(gnus-cite-2-face ((,class (:foreground ,zenburn-blue-1)))) + `(gnus-cite-3-face ((,class (:foreground ,zenburn-blue-2)))) + `(gnus-cite-4-face ((,class (:foreground ,zenburn-green+2)))) + `(gnus-cite-5-face ((,class (:foreground ,zenburn-green+1)))) + `(gnus-cite-6-face ((,class (:foreground ,zenburn-green)))) + `(gnus-cite-7-face ((,class (:foreground ,zenburn-red)))) + `(gnus-cite-8-face ((,class (:foreground ,zenburn-red-1)))) + `(gnus-cite-9-face ((,class (:foreground ,zenburn-red-2)))) + `(gnus-group-news-1-empty-face ((,class (:foreground ,zenburn-yellow)))) + `(gnus-group-news-2-empty-face ((,class (:foreground ,zenburn-green+3)))) + `(gnus-group-news-3-empty-face ((,class (:foreground ,zenburn-green+1)))) + `(gnus-group-news-4-empty-face ((,class (:foreground ,zenburn-blue-2)))) + `(gnus-group-news-5-empty-face ((,class (:foreground ,zenburn-blue-3)))) + `(gnus-group-news-6-empty-face ((,class (:foreground ,zenburn-bg+2)))) + `(gnus-group-news-low-empty-face ((,class (:foreground ,zenburn-bg+2)))) + `(gnus-signature-face ((,class (:foreground ,zenburn-yellow)))) + `(gnus-x-face ((,class (:background ,zenburn-fg :foreground ,zenburn-bg)))) + + ;; hl-line-mode + `(hl-line-face ((,class (:background ,zenburn-bg-1)))) + + ;; ido-mode + `(ido-first-match ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(ido-only-match ((,class (:foreground ,zenburn-orange :weight bold)))) + `(ido-subdir ((,class (:foreground ,zenburn-yellow)))) + + ;; linum-mode + `(linum ((,class (:foreground ,zenburn-fg-1 :background ,zenburn-bg-1)))) + + ;; magit + `(magit-section-title ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(magit-branch ((,class (:foreground ,zenburn-orange :weight bold)))) + + ;; message-mode + `(message-cited-text-face ((,class (:inherit font-lock-comment)))) + `(message-header-name-face ((,class (:foreground ,zenburn-green+1)))) + `(message-header-other-face ((,class (:foreground ,zenburn-green)))) + `(message-header-to-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(message-header-from-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(message-header-cc-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(message-header-newsgroups-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(message-header-subject-face ((,class (:foreground ,zenburn-orange :weight bold)))) + `(message-header-xheader-face ((,class (:foreground ,zenburn-green)))) + `(message-mml-face ((,class (:foreground ,zenburn-yellow :weight bold)))) + `(message-separator-face ((,class (:inherit font-lock-comment)))) + + ;; mew + `(mew-face-header-subject ((,class (:foreground ,zenburn-orange)))) + `(mew-face-header-from ((,class (:foreground ,zenburn-yellow)))) + `(mew-face-header-date ((,class (:foreground ,zenburn-green)))) + `(mew-face-header-to ((,class (:foreground ,zenburn-red)))) + `(mew-face-header-key ((,class (:foreground ,zenburn-green)))) + `(mew-face-header-private ((,class (:foreground ,zenburn-green)))) + `(mew-face-header-important ((,class (:foreground ,zenburn-blue)))) + `(mew-face-header-marginal ((,class (:foreground ,zenburn-fg :weight bold)))) + `(mew-face-header-warning ((,class (:foreground ,zenburn-red)))) + `(mew-face-header-xmew ((,class (:foreground ,zenburn-green)))) + `(mew-face-header-xmew-bad ((,class (:foreground ,zenburn-red)))) + `(mew-face-body-url ((,class (:foreground ,zenburn-orange)))) + `(mew-face-body-comment ((,class (:foreground ,zenburn-fg :slant italic)))) + `(mew-face-body-cite1 ((,class (:foreground ,zenburn-green)))) + `(mew-face-body-cite2 ((,class (:foreground ,zenburn-blue)))) + `(mew-face-body-cite3 ((,class (:foreground ,zenburn-orange)))) + `(mew-face-body-cite4 ((,class (:foreground ,zenburn-yellow)))) + `(mew-face-body-cite5 ((,class (:foreground ,zenburn-red)))) + `(mew-face-mark-review ((,class (:foreground ,zenburn-blue)))) + `(mew-face-mark-escape ((,class (:foreground ,zenburn-green)))) + `(mew-face-mark-delete ((,class (:foreground ,zenburn-red)))) + `(mew-face-mark-unlink ((,class (:foreground ,zenburn-yellow)))) + `(mew-face-mark-refile ((,class (:foreground ,zenburn-green)))) + `(mew-face-mark-unread ((,class (:foreground ,zenburn-red-2)))) + `(mew-face-eof-message ((,class (:foreground ,zenburn-green)))) + `(mew-face-eof-part ((,class (:foreground ,zenburn-yellow)))) + + ;; nav + `(nav-face-heading ((,class (:foreground ,zenburn-yellow)))) + `(nav-face-button-num ((,class (:foreground ,zenburn-cyan)))) + `(nav-face-dir ((,class (:foreground ,zenburn-green)))) + `(nav-face-hdir ((,class (:foreground ,zenburn-red)))) + `(nav-face-file ((,class (:foreground ,zenburn-fg)))) + `(nav-face-hfile ((,class (:foreground ,zenburn-red-4)))) + + ;; org-mode + `(org-agenda-date-today + ((,class (:foreground "white" :slant italic :weight bold))) t) + `(org-agenda-structure + ((,class (:inherit font-lock-comment-face)))) + `(org-archived ((,class (:foreground ,zenburn-fg :weight bold)))) + `(org-checkbox ((,class (:background ,zenburn-bg+2 :foreground "white" + :box (:line-width 1 :style released-button))))) + `(org-date ((,class (:foreground ,zenburn-blue :underline t)))) + `(org-deadline-announce ((,class (:foreground ,zenburn-red-1)))) + `(org-done ((,class (:bold t :weight bold :foreground ,zenburn-green+3)))) + `(org-formula ((,class (:foreground ,zenburn-yellow-2)))) + `(org-headline-done ((,class (:foreground ,zenburn-green+3)))) + `(org-hide ((,class (:foreground ,zenburn-bg-1)))) + `(org-level-1 ((,class (:foreground ,zenburn-orange)))) + `(org-level-2 ((,class (:foreground ,zenburn-green+1)))) + `(org-level-3 ((,class (:foreground ,zenburn-blue-1)))) + `(org-level-4 ((,class (:foreground ,zenburn-yellow-2)))) + `(org-level-5 ((,class (:foreground ,zenburn-cyan)))) + `(org-level-6 ((,class (:foreground ,zenburn-green-1)))) + `(org-level-7 ((,class (:foreground ,zenburn-red-4)))) + `(org-level-8 ((,class (:foreground ,zenburn-blue-4)))) + `(org-link ((,class (:foreground ,zenburn-yellow-2 :underline t)))) + `(org-scheduled ((,class (:foreground ,zenburn-green+4)))) + `(org-scheduled-previously ((,class (:foreground ,zenburn-red-4)))) + `(org-scheduled-today ((,class (:foreground ,zenburn-blue+1)))) + `(org-special-keyword ((,class (:foreground ,zenburn-yellow-1)))) + `(org-table ((,class (:foreground ,zenburn-green+2)))) + `(org-tag ((,class (:bold t :weight bold)))) + `(org-time-grid ((,class (:foreground ,zenburn-orange)))) + `(org-todo ((,class (:bold t :foreground ,zenburn-red :weight bold)))) + `(org-upcoming-deadline ((,class (:inherit font-lock-keyword-face)))) + `(org-warning ((,class (:bold t :foreground ,zenburn-red :weight bold)))) + + ;; outline + `(outline-8 ((,class (:inherit default)))) + `(outline-7 ((,class (:inherit outline-8 :height 1.0)))) + `(outline-6 ((,class (:inherit outline-7 :height 1.0)))) + `(outline-5 ((,class (:inherit outline-6 :height 1.0)))) + `(outline-4 ((,class (:inherit outline-5 :height 1.0)))) + `(outline-3 ((,class (:inherit outline-4 :height 1.0)))) + `(outline-2 ((,class (:inherit outline-3 :height 1.0)))) + `(outline-1 ((,class (:inherit outline-2 :height 1.0)))) + + ;; rainbow-delimiters + `(rainbow-delimiters-depth-1-face ((,class (:foreground ,zenburn-cyan)))) + `(rainbow-delimiters-depth-2-face ((,class (:foreground ,zenburn-yellow)))) + `(rainbow-delimiters-depth-3-face ((,class (:foreground ,zenburn-blue+1)))) + `(rainbow-delimiters-depth-4-face ((,class (:foreground ,zenburn-red+1)))) + `(rainbow-delimiters-depth-5-face ((,class (:foreground ,zenburn-orange)))) + `(rainbow-delimiters-depth-6-face ((,class (:foreground ,zenburn-blue-1)))) + `(rainbow-delimiters-depth-7-face ((,class (:foreground ,zenburn-green+4)))) + `(rainbow-delimiters-depth-8-face ((,class (:foreground ,zenburn-red-3)))) + `(rainbow-delimiters-depth-9-face ((,class (:foreground ,zenburn-yellow-2)))) + `(rainbow-delimiters-depth-10-face ((,class (:foreground ,zenburn-green+2)))) + `(rainbow-delimiters-depth-11-face ((,class (:foreground ,zenburn-blue+1)))) + `(rainbow-delimiters-depth-12-face ((,class (:foreground ,zenburn-red-4)))) + + ;; rpm-mode + `(rpm-spec-dir-face ((,class (:foreground ,zenburn-green)))) + `(rpm-spec-doc-face ((,class (:foreground ,zenburn-green)))) + `(rpm-spec-ghost-face ((,class (:foreground ,zenburn-red)))) + `(rpm-spec-macro-face ((,class (:foreground ,zenburn-yellow)))) + `(rpm-spec-obsolete-tag-face ((,class (:foreground ,zenburn-red)))) + `(rpm-spec-package-face ((,class (:foreground ,zenburn-red)))) + `(rpm-spec-section-face ((,class (:foreground ,zenburn-yellow)))) + `(rpm-spec-tag-face ((,class (:foreground ,zenburn-blue)))) + `(rpm-spec-var-face ((,class (:foreground ,zenburn-red)))) + + ;; show-paren + `(show-paren-mismatch ((,class (:foreground ,zenburn-red-3 :background ,zenburn-bg :weight bold)))) + `(show-paren-match ((,class (:foreground ,zenburn-blue-1 :background ,zenburn-bg :weight bold)))) + + ;; SLIME + `(slime-repl-inputed-output-face ((,class (:foreground ,zenburn-red)))) + + ;; whitespace-mode + `(whitespace-space ((,class (:background ,zenburn-bg :foreground ,zenburn-bg+1)))) + `(whitespace-hspace ((,class (:background ,zenburn-bg :foreground ,zenburn-bg+1)))) + `(whitespace-tab ((,class (:background ,zenburn-bg :foreground ,zenburn-red)))) + `(whitespace-newline ((,class (:foreground ,zenburn-bg+1)))) + `(whitespace-trailing ((,class (:foreground ,zenburn-red :background ,zenburn-bg)))) + `(whitespace-line ((,class (:background ,zenburn-bg-05 :foreground ,zenburn-magenta)))) + `(whitespace-space-before-tab ((,class (:background ,zenburn-orange :foreground ,zenburn-orange)))) + `(whitespace-indentation ((,class (:background ,zenburn-yellow, :foreground ,zenburn-red)))) + `(whitespace-empty ((,class (:background ,zenburn-yellow :foreground ,zenburn-red)))) + `(whitespace-space-after-tab ((,class (:background ,zenburn-yellow :foreground ,zenburn-red)))) + + ;; wanderlust + `(wl-highlight-folder-few-face ((,class (:foreground ,zenburn-red-2)))) + `(wl-highlight-folder-many-face ((,class (:foreground ,zenburn-red-1)))) + `(wl-highlight-folder-path-face ((,class (:foreground ,zenburn-orange)))) + `(wl-highlight-folder-unread-face ((,class (:foreground ,zenburn-blue)))) + `(wl-highlight-folder-zero-face ((,class (:foreground ,zenburn-fg)))) + `(wl-highlight-folder-unknown-face ((,class (:foreground ,zenburn-blue)))) + `(wl-highlight-message-citation-header ((,class (:foreground ,zenburn-red-1)))) + `(wl-highlight-message-cited-text-1 ((,class (:foreground ,zenburn-red)))) + `(wl-highlight-message-cited-text-2 ((,class (:foreground ,zenburn-green+2)))) + `(wl-highlight-message-cited-text-3 ((,class (:foreground ,zenburn-blue)))) + `(wl-highlight-message-cited-text-4 ((,class (:foreground ,zenburn-blue+1)))) + `(wl-highlight-message-header-contents-face ((,class (:foreground ,zenburn-green)))) + `(wl-highlight-message-headers-face ((,class (:foreground ,zenburn-red+1)))) + `(wl-highlight-message-important-header-contents ((,class (:foreground ,zenburn-green+2)))) + `(wl-highlight-message-header-contents ((,class (:foreground ,zenburn-green+1)))) + `(wl-highlight-message-important-header-contents2 ((,class (:foreground ,zenburn-green+2)))) + `(wl-highlight-message-signature ((,class (:foreground ,zenburn-green)))) + `(wl-highlight-message-unimportant-header-contents ((,class (:foreground ,zenburn-fg)))) + `(wl-highlight-summary-answered-face ((,class (:foreground ,zenburn-blue)))) + `(wl-highlight-summary-disposed-face ((,class (:foreground ,zenburn-fg + :slant italic)))) + `(wl-highlight-summary-new-face ((,class (:foreground ,zenburn-blue)))) + `(wl-highlight-summary-normal-face ((,class (:foreground ,zenburn-fg)))) + `(wl-highlight-summary-thread-top-face ((,class (:foreground ,zenburn-yellow)))) + `(wl-highlight-thread-indent-face ((,class (:foreground ,zenburn-magenta)))) + `(wl-highlight-summary-refiled-face ((,class (:foreground ,zenburn-fg)))) + `(wl-highlight-summary-displaying-face ((,class (:underline t :weight bold)))) + + ;; which-func-mode + `(which-func ((,class (:foreground ,zenburn-green+1)))))) + +(custom-theme-set-variables + 'zenburn + '(ansi-color-names-vector [zenburn-bg zenburn-red zenburn-green zenburn-yellow + zenburn-blue zenburn-magenta zenburn-cyan zenburn-fg])) + +(provide-theme 'zenburn) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; zenburn-theme.el ends here. diff --git a/user.el b/user.el new file mode 100644 index 000000000..f32871d34 --- /dev/null +++ b/user.el @@ -0,0 +1,64 @@ +;; This is where your customizations should live + +;; env PATH +(defun set-exec-path-from-shell-PATH () + (let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'"))) + (setenv "PATH" path-from-shell) + (setq exec-path (split-string path-from-shell path-separator)))) + +;; Uncomment this and play with the values in order to set Emacs's +;; the width and height whenever Emacs will have whenever you start it +;; (setq initial-frame-alist '((top . 0) (left . 0) +;; (width . 187) (height . 77))) + + +;; Place downloaded elisp files in this directory. You'll then be able +;; to load them. +;; +;; For example, if you download yaml-mode.el to ~/.emacs.d/vendor, +;; then you can add the following code to this file: +;; +;; (require 'yaml-mode) +;; (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode)) +;; +;; Adding this code will make Emacs enter yaml mode whenever you open +;; a .yml file +(add-to-list 'load-path "~/.emacs.d/vendor") + +;; shell scripts +(setq-default sh-basic-offset 2) +(setq-default sh-indentation 2) + +;; Themes +(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") +(add-to-list 'load-path "~/.emacs.d/themes") +;; Uncomment this to increase font size +;; (set-face-attribute 'default nil :height 140) +(load-theme 'tomorrow-night-bright t) + +;; Flyspell often slows down editing so it's turned off +(remove-hook 'text-mode-hook 'turn-on-flyspell) + +;; Clojure +(add-to-list 'auto-mode-alist '("\\.edn$" . clojure-mode)) +(setq nrepl-history-file "~/.emacs.d/nrepl-history") +(setq nrepl-popup-stacktraces t) +(setq nrepl-popup-stacktraces-in-repl t) +(add-hook 'nrepl-connected-hook + (defun pnh-clojure-mode-eldoc-hook () + (add-hook 'clojure-mode-hook 'turn-on-eldoc-mode) + (add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode) + (nrepl-enable-on-existing-clojure-buffers))) +(add-hook 'nrepl-mode-hook 'subword-mode) +(eval-after-load "auto-complete" + '(add-to-list 'ac-modes 'nrepl-mode)) +(add-hook 'nrepl-mode-hook 'ac-nrepl-setup) + +;; hippie expand - don't try to complete with file names +(setq hippie-expand-try-functions-list (delete 'try-complete-file-name hippie-expand-try-functions-list)) +(setq hippie-expand-try-functions-list (delete 'try-complete-file-name-partially hippie-expand-try-functions-list)) + +(setq ido-use-filename-at-point nil) + +;; Save here instead of littering current directory with emacs backup files +(setq backup-directory-alist `(("." . "~/.saves"))) diff --git a/vendor/.keep b/vendor/.keep new file mode 100644 index 000000000..e69de29bb