aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-02-07 00:37:13 +0000
committerKim F. Storm2004-02-07 00:37:13 +0000
commit4109ce02c4be8f482b4d8e58b3efc92ed0cf9aa1 (patch)
treec9422dbebc285bd278cf667afc8bbc232cda8a65
parentec110e9e90a1ccbb8217f1ce7909e7faf734e32f (diff)
downloademacs-4109ce02c4be8f482b4d8e58b3efc92ed0cf9aa1.tar.gz
emacs-4109ce02c4be8f482b4d8e58b3efc92ed0cf9aa1.zip
(line-number-at-pos): Rename from line-at-pos.
Uses changed (what-line and vc-annotate-warp-version).
-rw-r--r--lisp/simple.el6
-rw-r--r--lisp/vc.el6
2 files changed, 6 insertions, 6 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."
499 "Print the current buffer line number and narrowed line number of point." 499 "Print the current buffer line number and narrowed line number of point."
500 (interactive) 500 (interactive)
501 (let ((opoint (point)) (start (point-min)) 501 (let ((opoint (point)) (start (point-min))
502 (n (line-at-pos))) 502 (n (line-number-at-pos)))
503 (if (= start 1) 503 (if (= start 1)
504 (message "Line %d" n) 504 (message "Line %d" n)
505 (save-excursion 505 (save-excursion
506 (save-restriction 506 (save-restriction
507 (widen) 507 (widen)
508 (message "line %d (narrowed line %d)" 508 (message "line %d (narrowed line %d)"
509 (+ n (line-at-pos start) -1) n)))))) 509 (+ n (line-number-at-pos start) -1) n))))))
510 510
511(defun count-lines (start end) 511(defun count-lines (start end)
512 "Return number of lines between START and END. 512 "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."
531 done))) 531 done)))
532 (- (buffer-size) (forward-line (buffer-size))))))) 532 (- (buffer-size) (forward-line (buffer-size)))))))
533 533
534(defun line-at-pos (&optional pos) 534(defun line-number-at-pos (&optional pos)
535 "Return (narrowed) buffer line number at position POS. 535 "Return (narrowed) buffer line number at position POS.
536If POS is nil, use current buffer location." 536If POS is nil, use current buffer location."
537 (let ((opoint (or pos (point))) start) 537 (let ((opoint (or pos (point))) start)
diff --git a/lisp/vc.el b/lisp/vc.el
index a41a4808e8d..a4d941cff41 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -7,7 +7,7 @@
7;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8;; Keywords: tools 8;; Keywords: tools
9 9
10;; $Id: vc.el,v 1.364 2004/01/22 23:34:33 uid65624 Exp $ 10;; $Id: vc.el,v 1.365 2004/01/23 11:20:55 uid65624 Exp $
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
13 13
@@ -3144,7 +3144,7 @@ string, then it describes a revision number, so warp to that
3144revision." 3144revision."
3145 (if (not (equal major-mode 'vc-annotate-mode)) 3145 (if (not (equal major-mode 'vc-annotate-mode))
3146 (message "Cannot be invoked outside of a vc annotate buffer") 3146 (message "Cannot be invoked outside of a vc annotate buffer")
3147 (let* ((oldline (line-at-pos)) 3147 (let* ((oldline (line-number-at-pos))
3148 (revspeccopy revspec) 3148 (revspeccopy revspec)
3149 (newrev nil)) 3149 (newrev nil))
3150 (cond 3150 (cond
@@ -3176,7 +3176,7 @@ revision."
3176 (switch-to-buffer (car (car (last vc-annotate-buffers)))) 3176 (switch-to-buffer (car (car (last vc-annotate-buffers))))
3177 (goto-line (min oldline (progn (goto-char (point-max)) 3177 (goto-line (min oldline (progn (goto-char (point-max))
3178 (previous-line) 3178 (previous-line)
3179 (line-at-pos)))))))) 3179 (line-number-at-pos))))))))
3180 3180
3181(defun vc-annotate-car-last-cons (a-list) 3181(defun vc-annotate-car-last-cons (a-list)
3182 "Return car of last cons in association list A-LIST." 3182 "Return car of last cons in association list A-LIST."