summaryrefslogtreecommitdiffstats
path: root/Auxiliary
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-19 14:43:15 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-19 14:43:15 (GMT)
commite320640bcf2323e54add8a7c920b406c4a652816 (patch)
tree5e0b891e2b5c63752a37d4f7352413acceaa0b75 /Auxiliary
parent5803ae3e88e922c06ce835eb7bdcb5c584420453 (diff)
parentca80598ecaff14414193fd65268f80e1eddb9fa0 (diff)
downloadCMake-e320640bcf2323e54add8a7c920b406c4a652816.zip
CMake-e320640bcf2323e54add8a7c920b406c4a652816.tar.gz
CMake-e320640bcf2323e54add8a7c920b406c4a652816.tar.bz2
Merge topic 'emacs-mode-fix-word-at-point'
ca80598e cmake-mode.el: Fix extracting keyword at point in cmake-help
Diffstat (limited to 'Auxiliary')
-rw-r--r--Auxiliary/cmake-mode.el10
1 files 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"))