Skip to content

Commit 33fa10f

Browse files
yasuykbradking
authored andcommitted
cmake-mode.el: Add autoload cookies
1 parent d03a0fb commit 33fa10f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Auxiliary/cmake-mode.el

+9-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
;;
2424
;; (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path))
2525
;; (require 'cmake-mode)
26-
;; (setq auto-mode-alist
27-
;; (append '(("CMakeLists\\.txt\\'" . cmake-mode)
28-
;; ("\\.cmake\\'" . cmake-mode))
29-
;; auto-mode-alist))
3026

3127
;------------------------------------------------------------------------------
3228

@@ -236,6 +232,7 @@ the indentation. Otherwise it retains the same position on the line"
236232
;;
237233
;; CMake mode startup function.
238234
;;
235+
;;;###autoload
239236
(defun cmake-mode ()
240237
"Major mode for editing CMake listfiles."
241238
(interactive)
@@ -270,6 +267,7 @@ the indentation. Otherwise it retains the same position on the line"
270267
; Help mode starts here
271268

272269

270+
;;;###autoload
273271
(defun cmake-command-run (type &optional topic)
274272
"Runs the command cmake with the arguments specified. The
275273
optional argument topic will be appended to the argument list."
@@ -303,6 +301,7 @@ optional argument topic will be appended to the argument list."
303301
)
304302
)
305303

304+
;;;###autoload
306305
(defun cmake-help-list-commands ()
307306
"Prints out a list of the cmake commands."
308307
(interactive)
@@ -312,6 +311,7 @@ optional argument topic will be appended to the argument list."
312311
(defvar cmake-help-command-history nil "Topic read history.")
313312

314313
(require 'thingatpt)
314+
;;;###autoload
315315
(defun cmake-get-topic (type)
316316
"Gets the topic from the minibuffer input. The default is the word the cursor is on."
317317
(interactive)
@@ -328,13 +328,18 @@ optional argument topic will be appended to the argument list."
328328
)
329329

330330

331+
;;;###autoload
331332
(defun cmake-help-command ()
332333
"Prints out the help message corresponding to the command the cursor is on."
333334
(interactive)
334335
(setq command (cmake-get-topic "command"))
335336
(cmake-command-run "--help-command" (downcase command))
336337
)
337338

339+
;;;###autoload
340+
(progn
341+
(add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-mode))
342+
(add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-mode)))
338343

339344
; This file provides cmake-mode.
340345
(provide 'cmake-mode)

0 commit comments

Comments
 (0)