(rlogin): make comint-output-filter-functions local before adding hooks.
[bpt/emacs.git] / lisp / buff-menu.el
index 195d08e..fb0b95e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; buff-menu.el --- buffer menu main function and support functions.
 
-;; Copyright (C) 1985, 1986, 1987, 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 86, 87, 93, 94, 95 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 
@@ -17,8 +17,9 @@
 ;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
 
@@ -141,7 +142,7 @@ Letters do not insert themselves; instead, they are commands.
   (let* ((where (save-excursion
                  (beginning-of-line)
                  (+ (point) Buffer-menu-buffer-column)))
-        (name (get-text-property where 'buffer-name)))
+        (name (and (not (eobp)) (get-text-property where 'buffer-name))))
     (if name
        (or (get-buffer name)
            (if error-if-non-existent-p
@@ -507,11 +508,12 @@ The R column contains a % for buffers that are read-only."
              ;; This way we avoid problems with unusual buffer names.
              (setq this-buffer-line-start
                    (+ this-buffer-line-start Buffer-menu-buffer-column))
-             (put-text-property this-buffer-line-start (point)
-                                'buffer-name name)
-             (put-text-property this-buffer-line-start (point)
-                                'mouse-face 'highlight)
-             (indent-to 17 2)
+             (let ((name-end (point)))
+               (indent-to 17 2)
+               (put-text-property this-buffer-line-start name-end
+                                  'buffer-name name)
+               (put-text-property this-buffer-line-start name-end
+                                  'mouse-face 'highlight))
              (let (size
                    mode
                    (excess (- (current-column) 17)))