]> git.eshelyaron.com Git - emacs.git/commitdiff
(line-number-at-pos): Rename from line-at-pos.
authorKim F. Storm <storm@cua.dk>
Sat, 7 Feb 2004 00:37:13 +0000 (00:37 +0000)
committerKim F. Storm <storm@cua.dk>
Sat, 7 Feb 2004 00:37:13 +0000 (00:37 +0000)
Uses changed (what-line and vc-annotate-warp-version).

lisp/simple.el
lisp/vc.el

index 23d5e2c344012bec0da7c923f8ad992d46b7aa07..d978ecd655524dd1c5ae4f8873910afdef14172f 100644 (file)
@@ -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)
index a41a4808e8d23b56788ffa8ca807ab7b90e8df80..a4d941cff41e6ae0181abf6b64d351c8e3d01860 100644 (file)
@@ -7,7 +7,7 @@
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 ;; Keywords: tools
 
-;; $Id: vc.el,v 1.364 2004/01/22 23:34:33 uid65624 Exp $
+;; $Id: vc.el,v 1.365 2004/01/23 11:20:55 uid65624 Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -3144,7 +3144,7 @@ string, then it describes a revision number, so warp to that
 revision."
   (if (not (equal major-mode 'vc-annotate-mode))
       (message "Cannot be invoked outside of a vc annotate buffer")
-    (let* ((oldline (line-at-pos))
+    (let* ((oldline (line-number-at-pos))
           (revspeccopy revspec)
           (newrev nil))
       (cond
@@ -3176,7 +3176,7 @@ revision."
        (switch-to-buffer (car (car (last vc-annotate-buffers))))
        (goto-line (min oldline (progn (goto-char (point-max))
                                       (previous-line)
-                                      (line-at-pos))))))))
+                                      (line-number-at-pos))))))))
 
 (defun vc-annotate-car-last-cons (a-list)
   "Return car of last cons in association list A-LIST."