Commit Graph

29 Commits

Author SHA1 Message Date
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Jostein Kjønigsen 82388543d2 cmake-mode.el: Replace use of obsolete function (since Emacs 24.3). 2016-08-01 15:13:43 -04:00
Jostein Kjønigsen ca684ccb46 cmake-mode.el: Fix byte-compilation warnings. 2016-07-26 14:41:02 +02:00
Taylor Braun-Jones f12b899f4e cmake-mode.el: Make cmake-tab-width a customizable variable 2016-05-10 13:50:26 -04:00
Julian Schmidt 9dc384f662 cmake-mode.el: Fix help completion item lists with CMake >= 3.0 (#16019)
We run `cmake --help-*-list` to get a list of items for completion.
Since CMake < 3.0 always printed "cmake version ..." on the first line
of the output we have previously ignored the first line.  However, CMake
3.0 and above do not print the version line so we should not ignore the
first line or we miss one item.

Ideally we should filter the first line out if it is "cmake version ..."
in order to support CMake < 3.0 cleanly, but at worst the version line
will show up as a completion option so simply including the first line
is good enough for now.
2016-03-16 13:32:57 -04:00
Kevin Burge 47f4b3b662 cmake-mode.el: unscreamify symbols instead of words
cmake-unscreamify-buffer should unscream more than just
words. For example:

CHECK_FUNCTION_EXISTS (...)
2015-10-08 15:03:11 -04:00
Kevin Burge a935745d07 cmake-mode.el: treat keywords as symbols
Symbols such as "CHECK_FUNCTION_EXISTS" should not trigger an open block
(due to containing the "word" FUNCTION).  Fix this regression caused by
commit v3.4.0-rc1~292^2~3 (cmake-mode.el: Use `rx' for regexps,
2015-07-23).
2015-10-08 14:21:20 -04:00
Roy Crihfield 64e6bc5ca3 cmake-mode.el: Refine variable font-lock
Simplify regexp for variable names, and allow more legal characters.
Remove `$ *` as legal chars, and allow `- + / .` in names.
2015-08-14 10:16:22 -04:00
Roy Crihfield 758664b7ad cmake-mode.el: Fix function name font-lock
Allow space separating name and opening parenthesis.
2015-08-13 15:24:18 -04:00
Roy Crihfield 5593f28fac cmake-mode.el: Derive cmake-mode from prog-mode
Emacs 24 and above support a generic "prog-mode" to simplify definition
of programming modes.  Derive "cmake-mode" from it since we are a
programming mode.
2015-07-27 09:40:54 -04:00
Roy Crihfield 41d6044bcf cmake-mode.el: Add font-lock for keywords and variables
Control flow keywords will now be highlighted as such.  Variable names
will be also be recognized.  Adjust function name highlighting to work
in places other than the start of a line.
2015-07-27 09:40:07 -04:00
Roy Crihfield 7987d9857e cmake-mode.el: Rename function to be consistent
unscreamify-cmake-buffer => cmake-unscreamify-buffer

While at it, wrap the operation in (save-excursion).
2015-07-27 09:39:42 -04:00
Roy Crihfield 63de609ef1 cmake-mode.el: Use `rx' for regexps
This allows the keywords be defined in a list and reused in different
regexps.
2015-07-27 09:39:09 -04:00
Roy Crihfield 9d5082b26e cmake-mode.el: Minor clean-up
Superficial changes to use more conventional Emacs Lisp idioms.
2015-07-27 09:38:31 -04:00
Jostein Kjønigsen b24b58bb7b cmake-mode.el: Add support for prog-mode hooks (#15521)
Since version 24, Emacs supports a generic mode called prog-mode.  Like
all other modes it has its own mode-hook, prog-mode-hook.  For Emacs
users it is common to provide all your generic programming-mode related
customizations in this mode-hook.

cmake-mode is definitely a programming-mode and should support calling
this hook. There are two ways to make that happen:

* Make your major-mode a derived-mode from prog-mode.
* Manually calling the hook upon mode-activation.

Implementing a derived mode may be the most proper thing to do, but that
may require quite a few structural changes.  For now just call the hook
explicitly if it exists.  This should cover much of what users need.
2015-06-23 08:48:01 -04:00
Peter Vasil 3a147e1b62 cmake-mode.el: Re-add explicit call to require thingatpt
Usually it is not needed to call '(require 'thingatpt')' explicitly
because the function 'symbol-at-point' is in autoloaded but to be sure
to have the function loaded in every case, require thingatpt.
2015-01-19 13:53:38 -05:00
Peter Vasil ca80598eca cmake-mode.el: Fix extracting keyword at point in cmake-help
Since commit v3.1.0-rc2~1^2~1 (cmake-mode.el: syntax of '_' should be
treated as symbol, 2014-11-12) the 'word-at-point' function does not
extract the whole keyword anymore if it contains an '_', because
'forward-word' stops at '_'.  Use 'symbol-at-point' to extract a whole
keyword even if there is an '_'.
2015-01-19 09:14:10 -05:00
Syohei YOSHIDA 30f14aebee cmake-mode.el: syntax of '_' should be treated as symbol
Word commands, such as foward-word(M-f), backward-kill-word(M-backspace),
don't work well like other major-modes if syntax of '_' is treated as "word".

Tested-by: Guillaume Papin <guillaume.papin@parrot.com>
2014-11-12 08:40:14 -05:00
Philipp Möller 9d35f7c49a cmake-mode.el: Add help for variables/properties/complete. Factorize. 2014-02-13 09:38:13 -05:00
Philipp Möller 7cc21e9ab8 cmake-mode.el: Add the ability to retrieve module help. 2014-02-13 09:35:30 -05:00
Philipp Möller 3af47e34b6 cmake-mode.el: Add auto-completion to cmake-help-command 2014-01-29 10:23:25 -05:00
Philipp Möller 2a1314150e cmake-mode.el: Clean up cmake-command-run and add buffername argument 2014-01-29 16:11:40 +01:00
Philipp Möller 9b3876bfbc cmake-mode.el: Replace 'setq' with 'let' or inlining 2014-01-28 12:44:02 -05:00
Philipp Möller d3db7126e6 cmake-mode.el: Don't assign to free variable save-point
Drop use of the free variable from unscreamify-cmake-buffer.

The proper way to do this would be defvar or let, but it is more
sensible to drop the feature completely: replace-match will shift the
point and the saved-point will be invalid. More careful coding could
avoid this, but seems overkill.
2014-01-28 12:41:11 -05:00
Philipp Möller fbc3a6f33e cmake-mode.el: Avoid using beginning-of-buffer
This should not be used from lisp programs.  Use the replacement
suggested by the doc: (goto-char (point-min))
2014-01-28 12:39:50 -05:00
Yasuyuki Oka 33fa10f6bc cmake-mode.el: Add autoload cookies 2014-01-02 13:15:58 -05:00
Yasuyuki Oka d03a0fb409 cmake-mode.el: Move header line to the top of file 2014-01-02 13:14:15 -05:00
Brad King 0f21261868 cmake-mode.el: drop reserved keybindings (#14576)
The keybindings added by commit 301e67e3 (cmake-mode.el: add local
keybindings, 2012-09-20) overlap the reserved C-c space:

 http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html

Revert the commit to drop them.

Reported-by: Paul Smith <paul@mad-scientist.net>
Reviewed-by: Eric NOULARD <eric.noulard@gmail.com>
2013-11-18 09:36:28 -05:00
Brad King b601e2350a Rename Docs to Auxiliary
The directory contains auxiliary support files for integration with
other tools, not documentation.
2013-10-15 10:46:54 -04:00