Merge topic 'emacs-mode-fix-word-at-point'
ca80598e
cmake-mode.el: Fix extracting keyword at point in cmake-help
This commit is contained in:
commit
e320640bcf
|
@ -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)
|
(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)))))
|
(history (car (cdr (cdr (assoc type cmake-string-to-list-symbol)))))
|
||||||
(input (completing-read
|
(input (completing-read
|
||||||
(format "CMake %s: " type) ; prompt
|
(format "CMake %s: " type) ; prompt
|
||||||
|
@ -365,7 +369,7 @@ and store the result as a list in LISTVAR."
|
||||||
(defun cmake-help ()
|
(defun cmake-help ()
|
||||||
"Queries for any of the four available help topics and prints out the approriate page."
|
"Queries for any of the four available help topics and prints out the approriate page."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((default-entry (word-at-point))
|
(let* ((default-entry (cmake-symbol-at-point))
|
||||||
(command-list (cmake-get-list "command"))
|
(command-list (cmake-get-list "command"))
|
||||||
(variable-list (cmake-get-list "variable"))
|
(variable-list (cmake-get-list "variable"))
|
||||||
(module-list (cmake-get-list "module"))
|
(module-list (cmake-get-list "module"))
|
||||||
|
|
Loading…
Reference in New Issue