Function: vhdl-speedbar-port-copy
vhdl-speedbar-port-copy is an interactive and byte-compiled function
defined in vhdl-mode.el.gz.
Signature
(vhdl-speedbar-port-copy)
Documentation
Copy the port of the entity/component or subprogram under the cursor.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-speedbar-port-copy ()
"Copy the port of the entity/component or subprogram under the cursor."
(interactive)
(let ((is-entity (vhdl-speedbar-check-unit 'entity)))
(if (not (or is-entity (vhdl-speedbar-check-unit 'subprogram)))
(error "ERROR: No entity/component or subprogram under cursor")
(beginning-of-line)
(if (looking-at "\\([0-9]\\)+:\\s-*\\(\\[[-+?]]\\|>\\) \\(\\(\\w\\|\\s_\\)+\\)")
(condition-case info
(let ((token (get-text-property
(match-beginning 3) 'speedbar-token)))
(vhdl-visit-file (car token) t
(goto-char (point-min))
(forward-line (1- (cdr token)))
(end-of-line)
(if is-entity
(vhdl-port-copy)
(vhdl-subprog-copy))))
(error (error "ERROR: %s not scanned successfully\n (%s)"
(if is-entity "Port" "Interface") (cadr info))))
(error "ERROR: No entity/component or subprogram on current line")))))