]> code.delx.au - gnu-emacs/blobdiff - lisp/help.el
Merge branch 'master' into cairo
[gnu-emacs] / lisp / help.el
index 44716a5d0a8db184fd81537d193992db5df50e19..2b8f64231727c3bf6013c1bcafb2d5187aa4b75a 100644 (file)
@@ -1,6 +1,7 @@
 ;;; help.el --- help commands for Emacs
 
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2015 Free Software
+;; Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: help, internal
@@ -94,6 +95,7 @@
     (define-key map "k" 'describe-key)
     (define-key map "l" 'view-lossage)
     (define-key map "m" 'describe-mode)
+    (define-key map "o" 'describe-function-or-variable)
     (define-key map "n" 'view-emacs-news)
     (define-key map "p" 'finder-by-keyword)
     (define-key map "P" 'describe-package)
@@ -217,6 +219,7 @@ L LANG-ENV  Describes a specific language environment, or RET for current.
 m           Display documentation of current minor modes and current major mode,
               including their special commands.
 n           Display news of recent Emacs changes.
+o SYMBOL    Display the given function or variable's documentation and value.
 p TOPIC     Find packages matching a given topic keyword.
 P PACKAGE   Describe the given Emacs Lisp package.
 r           Display the Emacs manual in Info mode.
@@ -688,7 +691,8 @@ POSITION is as documented in the function `key-binding'."
 (defun help--binding-locus (key position)
   "Describe in which keymap KEY is defined.
 Return a symbol pointing to that keymap if one exists ; otherwise
-return nil."
+return nil.  The argument POSITION is as documented in the
+function `key-binding'."
   (let ((map (help--key-binding-keymap key t nil position)))
     (when map
       (catch 'found
@@ -1133,7 +1137,10 @@ of a horizontal combination, restrain its new size by
 `fit-window-to-buffer-horizontally' can inhibit resizing.
 
 If WINDOW is the root window of its frame, resize the frame
-provided `fit-frame-to-buffer' is non-nil."
+provided `fit-frame-to-buffer' is non-nil.
+
+This function may call `preserve-window-size' to preserve the
+size of WINDOW."
   (setq window (window-normalize-window window t))
   (let ((height (if (functionp temp-buffer-max-height)
                    (with-selected-window window
@@ -1155,7 +1162,7 @@ provided `fit-frame-to-buffer' is non-nil."
              (and (eq quit-cadr 'frame)
                     fit-frame-to-buffer
                     (eq window (frame-root-window window))))
-       (fit-window-to-buffer window height nil width))))
+       (fit-window-to-buffer window height nil width nil t))))
 
 ;;; Help windows.
 (defcustom help-window-select nil
@@ -1441,7 +1448,7 @@ the same names as used in the original source code, when possible."
                    (let ((name (symbol-name arg)))
                      (cond
                        ((string-match "\\`&" name) arg)
-                       ((string-match "\\`_" name)
+                       ((string-match "\\`_." name)
                         (intern (upcase (substring name 1))))
                        (t (intern (upcase name)))))))
                arglist)))