Empty elements in EMACSLOADPATH now stand for the default
[bpt/emacs.git] / lisp / help.el
index de2a227..c21d5b8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; help.el --- help commands for Emacs
 
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2013 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: help, internal
@@ -411,7 +411,9 @@ With argument, display info only for the selected version."
 The number of messages retained in that buffer
 is specified by the variable `message-log-max'."
   (interactive)
-  (switch-to-buffer (get-buffer-create "*Messages*")))
+  (with-current-buffer (messages-buffer)
+    (goto-char (point-max))
+    (display-buffer (current-buffer))))
 
 (defun view-order-manuals ()
   "Display the Emacs ORDERS file."
@@ -1015,27 +1017,26 @@ smaller than `window-min-height'.  Do nothing if WINDOW is not
 vertically combined, some of its contents are scrolled out of
 view, or WINDOW was not created by `display-buffer'."
   (setq window (window-normalize-window window t))
-  (let ((buffer-name (buffer-name (window-buffer window))))
-    (let ((height (if (functionp temp-buffer-max-height)
-                     (with-selected-window window
-                       (funcall temp-buffer-max-height (window-buffer)))
-                   temp-buffer-max-height))
-         (quit-cadr (cadr (window-parameter window 'quit-restore))))
-      (cond
-       ;; Resize WINDOW iff it was split off by `display-buffer'.
-       ((and (eq quit-cadr 'window)
-            (pos-visible-in-window-p (point-min) window)
-            (window-combined-p window))
-       (fit-window-to-buffer window height))
-       ;; Resize FRAME iff it was created by `display-buffer'.
-       ((and fit-frame-to-buffer
-            (eq quit-cadr 'frame)
-            (eq window (frame-root-window window)))
-       (let ((frame (window-frame window)))
-         (fit-frame-to-buffer
-          frame (+ (frame-height frame)
-                   (- (window-total-size window))
-                   height))))))))
+  (let ((height (if (functionp temp-buffer-max-height)
+                   (with-selected-window window
+                     (funcall temp-buffer-max-height (window-buffer)))
+                 temp-buffer-max-height))
+       (quit-cadr (cadr (window-parameter window 'quit-restore))))
+    (cond
+     ;; Resize WINDOW iff it was split off by `display-buffer'.
+     ((and (eq quit-cadr 'window)
+          (pos-visible-in-window-p (point-min) window)
+          (window-combined-p window))
+      (fit-window-to-buffer window height))
+     ;; Resize FRAME iff it was created by `display-buffer'.
+     ((and fit-frame-to-buffer
+          (eq quit-cadr 'frame)
+          (eq window (frame-root-window window)))
+      (let ((frame (window-frame window)))
+       (fit-frame-to-buffer
+        frame (+ (frame-height frame)
+                 (- (window-total-size window))
+                 height)))))))
 
 ;;; Help windows.
 (defcustom help-window-select 'other