summaryrefslogtreecommitdiff
path: root/lisp/bs.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-08-22 19:29:18 +0000
committerGlenn Morris <rgm@gnu.org>2009-08-22 19:29:18 +0000
commite6ce8c4239a0b7003430d94a5f591e1d4ad50213 (patch)
tree17852bba62da89f449af8c75f4fe50a3fb89852f /lisp/bs.el
parenta569b4801085fa14c3bd0d153e389636645908b9 (diff)
downloademacs-e6ce8c4239a0b7003430d94a5f591e1d4ad50213.tar.gz
Use forward-line rather than goto-line.
Diffstat (limited to 'lisp/bs.el')
-rw-r--r--lisp/bs.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/bs.el b/lisp/bs.el
index 727216c9531..0c7a53cf636 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1,7 +1,7 @@
;;; bs.el --- menu for selecting and displaying buffers
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+;; 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Keywords: convenience
@@ -575,10 +575,11 @@ a special function. SORT-DESCRIPTION is an element of `bs-sort-functions'."
"Redisplay whole Buffer Selection Menu.
If KEEP-LINE-P is non-nil the point will stay on current line.
SORT-DESCRIPTION is an element of `bs-sort-functions'."
- (let ((line (1+ (count-lines 1 (point)))))
+ (let ((line (count-lines 1 (point))))
(bs-show-in-buffer (bs-buffer-list nil sort-description))
(when keep-line-p
- (goto-line line))
+ (goto-char (point-min))
+ (forward-line line))
(beginning-of-line)))
(defun bs--goto-current-buffer ()