Commit ca80598e authored by Peter Vasil's avatar Peter Vasil Committed by Brad King
Browse files

cmake-mode.el: Fix extracting keyword at point in cmake-help

Since commit v3.1.0-rc2~1^2~1 (cmake-mode.el: syntax of '_' should be
treated as symbol, 2014-11-12) the 'word-at-point' function does not
extract the whole keyword anymore if it contains an '_', because
'forward-word' stops at '_'.  Use 'symbol-at-point' to extract a whole
keyword even if there is an '_'.
parent 30f14aeb
......@@ -320,9 +320,13 @@ and store the result as a list in LISTVAR."
(require 'thingatpt)
(defun cmake-symbol-at-point ()
(let ((symbol (symbol-at-point)))
(and (not (null symbol))
(symbol-name symbol))))
(defun cmake-help-type (type)
(let* ((default-entry (word-at-point))
(let* ((default-entry (cmake-symbol-at-point))
(history (car (cdr (cdr (assoc type cmake-string-to-list-symbol)))))
(input (completing-read
(format "CMake %s: " type) ; prompt
......@@ -365,7 +369,7 @@ and store the result as a list in LISTVAR."
(defun cmake-help ()
"Queries for any of the four available help topics and prints out the approriate page."
(let* ((default-entry (word-at-point))
(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"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment