diff options
author | Kim F. Storm <storm@cua.dk> | 2004-02-07 00:37:13 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2004-02-07 00:37:13 +0000 |
commit | 4109ce02c4be8f482b4d8e58b3efc92ed0cf9aa1 (patch) | |
tree | c9422dbebc285bd278cf667afc8bbc232cda8a65 /lisp/simple.el | |
parent | ec110e9e90a1ccbb8217f1ce7909e7faf734e32f (diff) | |
download | emacs-4109ce02c4be8f482b4d8e58b3efc92ed0cf9aa1.tar.gz |
(line-number-at-pos): Rename from line-at-pos.
Uses changed (what-line and vc-annotate-warp-version).
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 23d5e2c3440..d978ecd6555 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -499,14 +499,14 @@ that uses or sets the mark." "Print the current buffer line number and narrowed line number of point." (interactive) (let ((opoint (point)) (start (point-min)) - (n (line-at-pos))) + (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-at-pos start) -1) n)))))) + (+ n (line-number-at-pos start) -1) n)))))) (defun count-lines (start end) "Return number of lines between START and END. @@ -531,7 +531,7 @@ and the greater of them is not at the start of a line." done))) (- (buffer-size) (forward-line (buffer-size))))))) -(defun line-at-pos (&optional pos) +(defun line-number-at-pos (&optional pos) "Return (narrowed) buffer line number at position POS. If POS is nil, use current buffer location." (let ((opoint (or pos (point))) start) |