23
23
; ;
24
24
; ; (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path))
25
25
; ; (require 'cmake-mode)
26
- ; ; (setq auto-mode-alist
27
- ; ; (append '(("CMakeLists\\ .txt\\ '" . cmake-mode)
28
- ; ; ("\\ .cmake\\ '" . cmake-mode))
29
- ; ; auto-mode-alist))
30
26
31
27
; ------------------------------------------------------------------------------
32
28
@@ -236,6 +232,7 @@ the indentation. Otherwise it retains the same position on the line"
236
232
; ;
237
233
; ; CMake mode startup function.
238
234
; ;
235
+ ;;;### autoload
239
236
(defun cmake-mode ()
240
237
" Major mode for editing CMake listfiles."
241
238
(interactive )
@@ -270,6 +267,7 @@ the indentation. Otherwise it retains the same position on the line"
270
267
; Help mode starts here
271
268
272
269
270
+ ;;;### autoload
273
271
(defun cmake-command-run (type &optional topic )
274
272
" Runs the command cmake with the arguments specified. The
275
273
optional argument topic will be appended to the argument list."
@@ -303,6 +301,7 @@ optional argument topic will be appended to the argument list."
303
301
)
304
302
)
305
303
304
+ ;;;### autoload
306
305
(defun cmake-help-list-commands ()
307
306
" Prints out a list of the cmake commands."
308
307
(interactive )
@@ -312,6 +311,7 @@ optional argument topic will be appended to the argument list."
312
311
(defvar cmake-help-command-history nil " Topic read history." )
313
312
314
313
(require 'thingatpt )
314
+ ;;;### autoload
315
315
(defun cmake-get-topic (type )
316
316
" Gets the topic from the minibuffer input. The default is the word the cursor is on."
317
317
(interactive )
@@ -328,13 +328,18 @@ optional argument topic will be appended to the argument list."
328
328
)
329
329
330
330
331
+ ;;;### autoload
331
332
(defun cmake-help-command ()
332
333
" Prints out the help message corresponding to the command the cursor is on."
333
334
(interactive )
334
335
(setq command (cmake-get-topic " command" ))
335
336
(cmake-command-run " --help-command" (downcase command))
336
337
)
337
338
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)))
338
343
339
344
; This file provides cmake-mode.
340
345
(provide 'cmake-mode )
0 commit comments