diff options
author | Brad King <brad.king@kitware.com> | 2014-01-02 19:24:52 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-02 19:24:52 (GMT) |
commit | 85704c04c0d05c7e390ddccfc78493811a319f7e (patch) | |
tree | 2d062495eb25325eb5e5f24ec0f4d84aa3aced88 | |
parent | 5249948e53392c91e55ccb0d8cf0e7d1a1db0d57 (diff) | |
parent | 33fa10f6bcd15543845a9870bd1f0edee1b82acb (diff) | |
download | CMake-85704c04c0d05c7e390ddccfc78493811a319f7e.zip CMake-85704c04c0d05c7e390ddccfc78493811a319f7e.tar.gz CMake-85704c04c0d05c7e390ddccfc78493811a319f7e.tar.bz2 |
Merge topic 'cmake-mode-updates'
33fa10f cmake-mode.el: Add autoload cookies
d03a0fb cmake-mode.el: Move header line to the top of file
-rw-r--r-- | Auxiliary/cmake-mode.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el index 79d2319..9c73647 100644 --- a/Auxiliary/cmake-mode.el +++ b/Auxiliary/cmake-mode.el @@ -1,3 +1,5 @@ +;;; cmake-mode.el --- major-mode for editing CMake sources + ;============================================================================= ; CMake - Cross Platform Makefile Generator ; Copyright 2000-2009 Kitware, Inc., Insight Software Consortium @@ -9,7 +11,6 @@ ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the License for more information. ;============================================================================= -;;; cmake-mode.el --- major-mode for editing CMake sources ;------------------------------------------------------------------------------ @@ -22,10 +23,6 @@ ;; ;; (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path)) ;; (require 'cmake-mode) -;; (setq auto-mode-alist -;; (append '(("CMakeLists\\.txt\\'" . cmake-mode) -;; ("\\.cmake\\'" . cmake-mode)) -;; auto-mode-alist)) ;------------------------------------------------------------------------------ @@ -235,6 +232,7 @@ the indentation. Otherwise it retains the same position on the line" ;; ;; CMake mode startup function. ;; +;;;###autoload (defun cmake-mode () "Major mode for editing CMake listfiles." (interactive) @@ -269,6 +267,7 @@ the indentation. Otherwise it retains the same position on the line" ; Help mode starts here +;;;###autoload (defun cmake-command-run (type &optional topic) "Runs the command cmake with the arguments specified. The optional argument topic will be appended to the argument list." @@ -302,6 +301,7 @@ optional argument topic will be appended to the argument list." ) ) +;;;###autoload (defun cmake-help-list-commands () "Prints out a list of the cmake commands." (interactive) @@ -311,6 +311,7 @@ optional argument topic will be appended to the argument list." (defvar cmake-help-command-history nil "Topic read history.") (require 'thingatpt) +;;;###autoload (defun cmake-get-topic (type) "Gets the topic from the minibuffer input. The default is the word the cursor is on." (interactive) @@ -327,6 +328,7 @@ optional argument topic will be appended to the argument list." ) +;;;###autoload (defun cmake-help-command () "Prints out the help message corresponding to the command the cursor is on." (interactive) @@ -334,6 +336,10 @@ optional argument topic will be appended to the argument list." (cmake-command-run "--help-command" (downcase command)) ) +;;;###autoload +(progn + (add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-mode)) + (add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-mode))) ; This file provides cmake-mode. (provide 'cmake-mode) |