| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The change in commit 901386f646 (cmake-mode.el: Add navigation by
function and macro, 2020-12-11) introduced a regression. Emacs 26 could
not load cmake-mode.el anymore. Use `(not-char ")")`, not `(not ")")`.
|
|
|
|
|
|
|
| |
We're using rx in cmake-mode.el. Technically, we don't have to load the
package, because it's already loaded at startup. But it's good style to
explicitly require the packages we use, if only to give a quick overview
of the package dependencies.
|
|
|
|
|
|
|
|
|
| |
Add the functions cmake-beginning-of-defun and cmake-end-of-defun that
jump to the beginning/end of the nearest function or macro.
Add the function cmake-mark-defun that marks the current function.
Bind those functions to the usual keys in cmake-mode-map.
|
|
|
|
|
| |
Many of the `cmake --help-*` options print `.rst` source documents
with only partial evaluation. View them in the Emacs `rst-mode`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The `cmake--parent-mode` alias exists only for compatibility and breaks
Emacs packages and scripts that make use of `prog-mode-hook` because
Emacs does not examine whether the parent mode is an alias or not.
Remove the alias and require Emacs 24 or higher.
Emacs 24 was released in 2012 and this is already 2019, thus the loss to
drop support for versions < 24 is negligible.
|
|
|
|
|
|
|
|
|
|
|
| |
Emacs 27.0 warns
Loading ‘cmake-mode’: unescaped character literals `?(', `?)' detected!
during byte-compilation of cmake-mode.el The new warning was added in
emacs commit c2bbdc3316 (Warn about missing backslashes during load).
Add backslashes to escape the literals.
|
|
|
|
| |
Some are user-facing. Others are source comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
cmake-unscreamify-buffer should unscream more than just
words. For example:
CHECK_FUNCTION_EXISTS (...)
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Simplify regexp for variable names, and allow more legal characters.
Remove `$ *` as legal chars, and allow `- + / .` in names.
|
|
|
|
| |
Allow space separating name and opening parenthesis.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
unscreamify-cmake-buffer => cmake-unscreamify-buffer
While at it, wrap the operation in (save-excursion).
|
|
|
|
|
| |
This allows the keywords be defined in a list and reused in different
regexps.
|
|
|
|
| |
Superficial changes to use more conventional Emacs Lisp idioms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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 '_'.
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This should not be used from lisp programs. Use the replacement
suggested by the doc: (goto-char (point-min))
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
The directory contains auxiliary support files for integration with
other tools, not documentation.
|