Function: ibtypes::cscope

ibtypes::cscope is a byte-compiled function defined in hibtypes.el.

Signature

(ibtypes::cscope)

Documentation

Jump to C/C++ source line associated with Cscope C analyzer output line.

The cscope.el Lisp library available from the Emacs package manager must be loaded and the open source cscope program available from http://cscope.sf.net must be installed for this button type to do anything.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hibtypes.el
;;; ========================================================================
;;; Jumps to C/C++ source line associated with Cscope C analyzer output line.
;;; ========================================================================

(defib cscope ()
  "Jump to C/C++ source line associated with Cscope C analyzer output line.
The cscope.el Lisp library available from the Emacs package manager
must be loaded and the open source cscope program available from
http://cscope.sf.net must be installed for this button type to do
anything."
  (and (boundp 'cscope:bname-prefix)  ;; (featurep 'cscope)
       (stringp cscope:bname-prefix)
       (string-match (regexp-quote cscope:bname-prefix)
                     (buffer-name))
       (= (match-beginning 0) 0)
       (save-excursion
         (beginning-of-line)
         (looking-at cscope-output-line-regexp))
       (let (start end)
         (skip-chars-backward "^\n\r")
         (setq start (point))
         (skip-chars-forward "^\n\r")
         (setq end (point))
         (ibut:label-set (buffer-substring start end)
                         start end)
         (hact 'cscope-interpret-output-line))))