Function: cmake-help

cmake-help is an interactive and natively compiled function defined in cmake-mode.el.

Signature

(cmake-help)

Documentation

Queries for any of the four available help topics and prints out the appropriate page.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/xpmgnbrvz0j5ic5m3q6fvh28ca8a9avm-emacs-packages-deps/share/emacs/site-lisp/elpa/cmake-mode-20261002.1529/cmake-mode.el
;;;###autoload
(defun cmake-help ()
  "Queries for any of the four available help topics and prints out the
appropriate page."
  (interactive)
  (let* ((default-entry (cmake-symbol-at-point))
         (command-list (cmake-get-list "command"))
         (variable-list (cmake-get-list "variable"))
         (module-list (cmake-get-list "module"))
         (property-list (cmake-get-list "property"))
         (all-words (append command-list variable-list module-list property-list))
         (input (completing-read
                 "CMake command/module/variable/property: " ; prompt
                 all-words ; completions
                 nil ; predicate
                 t   ; require-match
                 default-entry ; initial-input
                 'cmake-help-complete-history
                 )))
    (if (string= input "")
        (error "No argument given")
      (if (member input command-list)
          (cmake-command-run-help "--help-command" input "*CMake Help*")
        (if (member input variable-list)
            (cmake-command-run-help "--help-variable" input "*CMake Help*")
          (if (member input module-list)
              (cmake-command-run-help "--help-module" input "*CMake Help*")
            (if (member input property-list)
                (cmake-command-run-help "--help-property" input "*CMake Help*")
              (error "Not a know help topic.") ; this really should not happen
              ))))))
  )