Function: info-lookup-guess-gdb-script-symbol
info-lookup-guess-gdb-script-symbol is a byte-compiled function
defined in info-look.el.gz.
Signature
(info-lookup-guess-gdb-script-symbol)
Documentation
Get symbol at point in GDB script buffers.
Source Code
;; Defined in /usr/src/emacs/lisp/info-look.el.gz
(defun info-lookup-guess-gdb-script-symbol ()
"Get symbol at point in GDB script buffers."
(condition-case nil
(save-excursion
(back-to-indentation)
;; Try to find the current line's full command in the index;
;; and default to the longest subset that is found.
(when (looking-at "[-a-z]+\\(\\s-[-a-z]+\\)*")
(let ((str-list (split-string (match-string-no-properties 0)
"\\s-+" t))
(completions (info-lookup->completions 'symbol
'gdb-script-mode)))
(catch 'result
(while str-list
(let ((str (string-join str-list " ")))
(when (assoc str completions)
(throw 'result str))
;; 'nbutlast' will not destructively set its argument
;; to nil when the argument is a list of 1 element.
(if (= (length str-list) 1)
(setq str-list nil)
(nbutlast str-list))))))))
(error nil)))