Hi all, Inspired by the Emacs command cperl-perldoc-at-point I wrote a little command to show the CMake documentation of the command on which the cursor is currently positioned. It will open another buffer and show the documentation generated from "cmake --help-command <command>" in that buffer. I found it very useful during creating CMakeLists.txt files.
Bill, maybe it makes sense to integrate this into cmake-mode.el? Regards, Martin ____________ Virus checked by G DATA AntiVirus Version: AVF 19.356 from 27.04.2009
(require 'thingatpt) (defun cmake-doc (word) "Generate cmake documentation on WORD." (interactive (list (let* ((default-entry (word-at-point)) (input (read-string (format "doc entry%s: " (if (string= default-entry "") "" (format " (default %s)" default-entry)))))) (if (string= input "") (if (string= default-entry "") (error "No doc args given") default-entry) input)))) (shell-command (concat "cmake --help-command " word)) ) ;;;###autoload (defun cmake-doc-at-point () "Run a `doc' on the word around point." (interactive) (cmake-doc (word-at-point)))
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake