With commit 30f14aebeee90bc1af6236888599db86b2bd8fae '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 whole keyword even if there is an '_'.
---
 Auxiliary/cmake-mode.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index f1470f3..37ca942 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -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."
   (interactive)
-  (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"))
-- 
2.2.2

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to