(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
[bpt/emacs.git] / lisp / help-fns.el
index cffe313..14ceacf 100644 (file)
@@ -1,7 +1,7 @@
 ;;; help-fns.el --- Complex help functions
 
 ;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001,
-;;   2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;;   2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: help, internal
@@ -223,7 +223,6 @@ KIND should be `var' for a variable or `subr' for a subroutine."
            (concat "src/" file)
          file)))))
 
-;;;###autoload
 (defface help-argument-name '((((supports :slant italic)) :inherit italic))
   "Face to highlight argument names in *Help* buffers."
   :group 'help)
@@ -283,6 +282,7 @@ face (according to `face-differs-from-default-p')."
   ;; Return value is like the one from help-split-fundoc, but highlighted
   (cons usage doc))
 
+;;;###autoload
 (defun describe-simplify-lib-file-name (file)
   "Simplify a library name FILE to a relative name, and make it a source file."
   (if file
@@ -291,7 +291,7 @@ face (according to `face-differs-from-default-p')."
        ;; Now convert that back to a file name and see if we get
        ;; the original one.  If so, they are equivalent.
        (if (equal file (locate-file libname load-path '("")))
-           (if (string-match "[.]elc?\\'" libname)
+           (if (string-match "[.]elc\\'" libname)
                (substring libname 0 -1)
              libname)
          file))))
@@ -435,7 +435,9 @@ face (according to `face-differs-from-default-p')."
                          (format "\nMacro: %s" (format-kbd-macro def)))
                         (t "[Missing arglist.  Please make a bug report.]")))
                  (high (help-highlight-arguments use doc)))
-            (insert (car high) "\n")
+            (let ((fill-begin (point)))
+             (insert (car high) "\n")
+             (fill-region fill-begin (point)))
             (setq doc (cdr high))))
         (let ((obsolete (and
                          ;; function might be a lambda construct.
@@ -495,7 +497,11 @@ it is displayed along with the global value."
                                    (format
                                     "Describe variable (default %s): " v)
                                  "Describe variable: ")
-                               obarray 'boundp t nil nil
+                               obarray
+                               '(lambda (vv)
+                                  (or (boundp vv)
+                                      (get vv 'variable-documentation)))
+                               t nil nil
                                (if (symbolp v) (symbol-name v))))
      (list (if (equal val "")
               v (intern val)))))
@@ -548,10 +554,10 @@ it is displayed along with the global value."
                        (help-xref-button 1 'help-variable-def
                                          variable file-name)))
                    (if valvoid
-                       (princ "It is void as a variable.\n")
+                       (princ "It is void as a variable.")
                      (princ "Its ")))
                (if valvoid
-                   (princ " is void as a variable.\n")
+                   (princ " is void as a variable.")
                  (princ "'s "))))
            (if valvoid
                nil