]> code.delx.au - gnu-emacs/blobdiff - lisp/ebuff-menu.el
Merge from mainline.
[gnu-emacs] / lisp / ebuff-menu.el
index 3e37d2c700b7e56f590d78cbd22e66e4dfaa52e2..dd589cb58f70260aa7d59c27dc02379cf4be22e2 100644 (file)
@@ -1,7 +1,6 @@
 ;;; ebuff-menu.el --- electric-buffer-list mode
 
-;; Copyright (C) 1985, 1986, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1994, 2001-2011  Free Software Foundation, Inc.
 
 ;; Author: Richard Mlynarik <mly@ai.mit.edu>
 ;; Maintainer: FSF
@@ -9,10 +8,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -97,7 +94,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry.
                                             (cons first last))))))
        (set-buffer buffer)
        (Buffer-menu-mode)
-       (bury-buffer buffer)
+       (bury-buffer)                ;Get rid of window, if dedicated.
        (message "")))
     (if select
        (progn (set-buffer buffer)
@@ -284,11 +281,10 @@ Return to Electric Buffer Menu when done."
          (make-local-variable 'electric-buffer-overlay)
          (setq electric-buffer-overlay (make-overlay (point) (point)))))
     (move-overlay electric-buffer-overlay
-                 (save-excursion (beginning-of-line) (point))
-                 (save-excursion (end-of-line) (point)))
+                 (line-beginning-position)
+                 (line-end-position))
     (overlay-put electric-buffer-overlay 'face 'highlight)))
 
 (provide 'ebuff-menu)
 
-;;; arch-tag: 1d4509b3-eece-4d4f-95ea-77c83eaf0275
 ;;; ebuff-menu.el ends here