]> code.delx.au - gnu-emacs/blobdiff - lisp/reposition.el
Ibuffer: Mark buffers by content
[gnu-emacs] / lisp / reposition.el
index 9bc00795fe1a8c3f2e51676e34b1173ddd009cfc..532c9adb98dadb79b8db1806cf79f49b37aa5d71 100644 (file)
@@ -1,11 +1,10 @@
 ;;; reposition.el --- center a Lisp function or comment on the screen
 
-;; Copyright (C) 1991, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1994, 2001-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael D. Ernst <mernst@theory.lcs.mit.edu>
 ;; Created: Jan 1991
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 
 ;; This file is part of GNU Emacs.
 
@@ -58,11 +57,11 @@ visible (if point is in code and it could not be made so, or if only
 comments, including the first comment line, are visible), or to make the
 first comment line visible (if point is in a comment)."
   (interactive "P")
-  (let* (;; (here (save-excursion (beginning-of-line) (point)))
+  (let* (;; (here (line-beginning-position))
         (here (point))
         ;; change this name once I've gotten rid of references to ht.
         ;; this is actually the number of the last screen line
-        (ht (- (window-height (selected-window)) 2))
+        (ht (- (window-height) 2))
         (line (repos-count-screen-lines (window-start) (point)))
         (comment-height
          ;; The call to max deals with the case of cursor between defuns.
@@ -193,5 +192,4 @@ first comment line visible (if point is in a comment)."
 
 (provide 'reposition)
 
-;; arch-tag: 79487039-3bd7-4ab5-a3e8-ecf3b4919010
 ;;; reposition.el ends here