Function: what-line
what-line is an interactive and byte-compiled function defined in
simple.el.gz.
Signature
(what-line)
Documentation
Print the current buffer line number and narrowed line number of point.
Probably introduced at or before Emacs version 19.30.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun what-line ()
"Print the current buffer line number and narrowed line number of point."
(interactive)
(let ((start (point-min))
(n (line-number-at-pos)))
(if (= start 1)
(message "Line %d" n)
(save-excursion
(save-restriction
(widen)
(message "line %d (narrowed line %d)"
(+ n (line-number-at-pos start) -1) n))))))