Function: c-display-defun-name
c-display-defun-name is an interactive and byte-compiled function
defined in cc-cmds.el.gz.
Signature
(c-display-defun-name &optional ARG)
Documentation
Display the name of the current CC mode defun and the position in it.
With a prefix arg, push the name onto the kill ring too.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-cmds.el.gz
(defun c-display-defun-name (&optional arg)
"Display the name of the current CC mode defun and the position in it.
With a prefix arg, push the name onto the kill ring too."
(interactive "P")
(save-restriction
(widen)
(c-save-buffer-state ((name-and-limits (c-defun-name-and-limits nil))
(name (car name-and-limits))
(limits (cdr name-and-limits))
(point-bol (c-point 'bol)))
(when name
(message "%s. Line %s/%s." name
(1+ (count-lines (car limits) (max point-bol (car limits))))
(count-lines (car limits) (cdr limits)))
(if arg (kill-new name))
(sit-for 3 t)))))