changeset 22563:2e2a71dfec63

Numerous documentation fixups. Delete periods from error messages. (bibtex-move-outside-of-entry): If outside an entry, try not to move point, or only move it minimally. (bibtex-autokey-get-titlestring): Omit delimiters.
author Richard M. Stallman <rms@gnu.org>
date Wed, 24 Jun 1998 04:31:20 +0000
parents ddb3fd464b77
children 4836a83d3578
files lisp/textmodes/bibtex.el
diffstat 1 files changed, 101 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/bibtex.el	Wed Jun 24 04:11:00 1998 +0000
+++ b/lisp/textmodes/bibtex.el	Wed Jun 24 04:31:20 1998 +0000
@@ -111,7 +111,7 @@
 
 (defcustom bibtex-entry-format '(opts-or-alts numerical-fields)
   "*Controls type of formatting performed by `bibtex-clean-entry'.
-It may be t, nil, or a list of symbols out of the following: 
+It may be t, nil, or a list of symbols out of the following:
 opts-or-alts        Delete empty optional and alternative fields and
                       remove OPT and ALT prefixes from used fields.
 numerical-fields    Delete delimiters around numeral fields.
@@ -124,7 +124,7 @@
                        correctly sorted.
 realign             Realign entries, so that field texts and perhaps equal
                       signs (depending on the value of
-                      bibtex-align-at-equal-sign) begin in the same column.
+                      `bibtex-align-at-equal-sign') begin in the same column.
 last-comma          Add or delete comma on end of last field in entry,
                       according to value of `bibtex-comma-after-last-field'.
 delimiters          Change delimiters according to variables
@@ -156,7 +156,7 @@
 (defcustom bibtex-sort-ignore-string-entries t
   "*If non-nil, BibTeX @String entries are not sort-significant.
 That means they are ignored when determining ordering of the buffer
-(e.g. sorting, locating alphabetical position for new entries, etc.).
+(e.g., sorting, locating alphabetical position for new entries, etc.).
 This variable is buffer-local."
   :group 'bibtex
   :type 'boolean)
@@ -164,7 +164,7 @@
 
 (defcustom bibtex-maintain-sorted-entries nil
   "*If non-nil, BibTeX mode maintains all BibTeX entries in sorted order.
-Setting this variable to nil will strip off some comfort (e.g. TAB
+Setting this variable to nil will strip off some comfort (e.g., TAB
 completion for reference keys in minibuffer, automatic detection of
 duplicates) from BibTeX mode.  See also `bibtex-sort-ignore-string-entries'.
 This variable is buffer-local."
@@ -184,7 +184,7 @@
 
 (defcustom bibtex-parse-keys-timeout 60
   "*Specifies interval for parsing buffers.
-All BibTeX buffers in emacs are parsed if emacs has been idle
+All BibTeX buffers in Emacs are parsed if Emacs has been idle
 `bibtex-parse-keys-timeout' seconds.  Only buffers which were modified
 after last parsing and which are maintained in sorted order are parsed."
   :group 'bibtex
@@ -204,7 +204,7 @@
 		  ((("author" "Author1 [and Author2 ...] [and others]")
                     ("title" "Title of the article (BibTeX converts it to lowercase)"))
 		   (("pages" "Pages in the journal")
-                    ("journal" "Name of the journal (use string, remove braces)") 
+                    ("journal" "Name of the journal (use string, remove braces)")
                     ("year" "Year of publication")
                     ("volume" "Volume of the journal")
                     ("number" "Number of the journal")
@@ -396,7 +396,7 @@
 If the third element is nil, the first pair is always used.
 If not, the second pair is used in the case of presence of a crossref
 field and the third in the case of absence.
-REQUIRED, OPTIONAL, CROSSREF-REQUIRED and CROSSREF-OPTIONAL are lists. 
+REQUIRED, OPTIONAL, CROSSREF-REQUIRED and CROSSREF-OPTIONAL are lists.
 Each element of these lists is a list of the form
 (FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG).
 COMMENT-STRING, INIT, and ALTERNATIVE-FLAG are optional.
@@ -446,7 +446,7 @@
   "*List of BibTeX files containing string definitions.
 Those files must be specified using pathnames relative to the
 directories specified in `bibtex-string-file-path'.  This variable is only
-evaluated when BibTeX mode is entered (i. e. when loading the BibTeX
+evaluated when BibTeX mode is entered (i.e., when loading the BibTeX
 file)."
   :group 'bibtex
   :type '(repeat file))
@@ -664,7 +664,7 @@
   "Function to call before the generated key is presented.
 If non-nil this should be a single function, which is called before
 the generated key is presented (in entry or, if
-`bibtex-autokey-edit-before-use' is t, in minibuffer). This function
+`bibtex-autokey-edit-before-use' is t, in minibuffer).  This function
 must take one argument (the automatically generated key), and must
 return with a string (the key to use)."
   :group 'bibtex-autokey
@@ -989,7 +989,7 @@
   (concat
    "{"
    "\\("
-     bibtex-field-string-part-not-braced 
+     bibtex-field-string-part-not-braced
      "\\|"
      "\\(" bibtex-field-string-part-no-inner-braces "\\)"
    "\\)*"
@@ -1028,7 +1028,7 @@
    "\\("
      "[^\"\\]"      ;; every character except quote or backslash
      "\\|"
-;;     "\\(" "\"[a-z-]" "\\)"  ;; a quote followed by a letter or dash 
+;;     "\\(" "\"[a-z-]" "\\)"  ;; a quote followed by a letter or dash
 ;;     "\\|"
 ;; last two lines commented out until lines like
 ;;   author = "Stefan Sch"of"
@@ -1120,7 +1120,7 @@
          (list bibtex-type-in-head 'font-lock-function-name-face)
          (list bibtex-key-in-head 'font-lock-constant-face nil t))
    ;; comments
-   (list 
+   (list
     (concat "^\\([ \t]*" bibtex-comment-start ".*\\)$")
     1 'font-lock-comment-face)
    ;; optional field names (treated as comments)
@@ -1320,7 +1320,7 @@
               (goto-char (match-beginning 0))
             (if (equal noerror nil)
                 ;; yell
-                (error "Search of BibTeX reference failed."))
+                (error "Search of BibTeX reference failed"))
             (if (equal noerror t)
                 ;; don't move
                 (goto-char pnt))
@@ -1361,7 +1361,7 @@
               (point))
           (if (equal noerror nil)
               ;; yell
-              (error "Search of BibTeX reference failed."))
+              (error "Search of BibTeX reference failed"))
           (if (equal noerror t)
               ;; don't move
               (goto-char pnt))
@@ -1393,8 +1393,20 @@
 
 (defun bibtex-move-outside-of-entry ()
   ;; Make sure we are outside of a BibTeX entry.
+  (let ((orig-point (point)))
   (bibtex-end-of-entry)
-  (skip-chars-forward " \t\n"))
+    (if (< (point) orig-point)
+        ;; We moved backward, so we weren't inside an entry to begin with.
+        ;; Leave point at the beginning of a line, and preferably
+        ;; at the beginning of a paragraph.
+        (progn
+          (goto-char orig-point)
+          (beginning-of-line 1)
+          (if (not (= ?\n (char-before (1- (point)))))
+              (progn
+                (re-search-forward "^[ \t]*[@\n]" nil 'move)
+                (backward-char 1)))))
+    (skip-chars-forward " \t\n")))
 
 (defun bibtex-beginning-of-first-entry ()
   ;; Go to the beginning of the first BibTeX entry in buffer. Return
@@ -1440,7 +1452,7 @@
           (goto-char old-point)
           (if noerr
               (setq success nil)
-            (error "Can't find enclosing BibTeX field.")))
+            (error "Can't find enclosing BibTeX field")))
       (if (or (not (re-search-forward bibtex-field nil t))
               (< (match-end 0) old-point)
               (> (match-beginning 0) old-point))
@@ -1448,7 +1460,7 @@
             (goto-char old-point)
             (if noerr
                 (setq success nil)
-              (error "Can't find enclosing BibTeX field.")))))
+              (error "Can't find enclosing BibTeX field")))))
     success))
 
 (defun bibtex-enclosing-reference-maybe-empty-head ()
@@ -1461,18 +1473,18 @@
          (re-search-backward
           bibtex-reference-maybe-empty-head nil t))
         (progn
-          (error "Can't find enclosing BibTeX reference.")
+          (error "Can't find enclosing BibTeX reference")
           (goto-char old-point)))
     (goto-char (match-beginning bibtex-type-in-head))
     (if (not
          (bibtex-search-reference t nil t))
         (progn
-          (error "Can't find enclosing BibTeX reference.")
+          (error "Can't find enclosing BibTeX reference")
           (goto-char old-point)))))
 
 (defun bibtex-insert-current-kill (n)
   (if (not bibtex-last-kill-command)
-      (error "BibTeX kill ring is empty.")
+      (error "BibTeX kill ring is empty")
     (let* ((kr (if (equal bibtex-last-kill-command 'field)
                    'bibtex-field-kill-ring
                  'bibtex-entry-kill-ring))
@@ -1501,7 +1513,7 @@
         (insert (elt current 1)))
        (t
         (error
-         "Unknown tag field: %s. Please submit a bug report."
+         "Unknown tag field: %s.  Please submit a bug report"
          bibtex-last-kill-command))))))
 
 (defun bibtex-format-entry ()
@@ -1515,7 +1527,7 @@
         non-empty-alternative)
     (let ((end (copy-marker (bibtex-end-of-entry))))
       (if (equal start (marker-position end))
-          (error "Not on a known BibTeX entry.")
+          (error "Not on a known BibTeX entry")
         (goto-char start)
         (while (re-search-forward bibtex-field end t)
           ;; determine if reference has crossref entry and if at least
@@ -1545,7 +1557,7 @@
                  (not non-empty-alternative))
             (progn
               (goto-char beg)
-              (error "All alternatives are empty.")))
+              (error "All alternatives are empty")))
         (goto-char start)
         (re-search-forward bibtex-reference-type end)
         (let* ((begin-type (1+ (match-beginning 0)))
@@ -1616,7 +1628,7 @@
                           (goto-char begin-name)
                           (bibtex-remove-OPT-or-ALT)
                           (error
-                           "Mandatory field ``%s'' is empty." field-name))
+                           "Mandatory field ``%s'' is empty" field-name))
                       ;; field is optional
                       (delete-region begin-field end-field))
                   ;; otherwise: not empty, delete "OPT"
@@ -1683,7 +1695,7 @@
                             (goto-char begin-text)
                             (forward-char)
                             (insert
-                             (buffer-substring-no-properties 
+                             (buffer-substring-no-properties
                               (1+ (match-beginning bibtex-text-in-field))
                               (1- (match-end bibtex-text-in-field))))))))
                 (if (progn
@@ -1701,7 +1713,7 @@
                                (assoc-ignore-case
                                 field-name req)))
                           (error
-                           "Mandatory field ``%s'' is empty." field-name))))
+                           "Mandatory field ``%s'' is empty" field-name))))
                 (if (memq 'unify-case format)
                     (let* ((fl
                             (car (cdr (assoc-ignore-case
@@ -1769,8 +1781,8 @@
 
 (defun bibtex-autokey-abbrev (string len)
   ;; Returns an abbreviation of string with at least len
-  ;; characters. String is aborted only after a consonant or at the
-  ;; word end. If len is not a number, string is returned unchanged.
+  ;; characters.  String is aborted only after a consonant or at the
+  ;; word end.  If len is not a number, string is returned unchanged.
   (cond ((or
           (not (numberp len))
           (<= (length string) len))
@@ -1917,8 +1929,8 @@
                   (bibtex-cfield "title" bibtex-field-text) max t)
                  (bibtex-autokey-change
                   (buffer-substring-no-properties
-                   (match-beginning bibtex-text-in-cfield)
-                   (match-end bibtex-text-in-cfield))
+                   (1+ (match-beginning bibtex-text-in-cfield))
+                   (1- (match-end bibtex-text-in-cfield)))
                   bibtex-autokey-titleword-change-strings)
                "")))
           (index 0)
@@ -1954,7 +1966,7 @@
 		 titleword
 		 bibtex-autokey-titleword-ignore)
 		(setq counter (1- counter))
-	      (setq 
+	      (setq
 	       titleword
 	       (funcall bibtex-autokey-titleword-case-convert titleword))
 	      (if (or (not (numberp bibtex-autokey-titlewords))
@@ -2057,7 +2069,7 @@
     used as the key.
 17. If the value of `bibtex-autokey-edit-before-use' is non-nil,
     the key is then presented in the minibuffer to the user,
-    where it can be edited. The key given by the user is then
+    where it can be edited.  The key given by the user is then
     used."
   (let* ((pnt (point))
          (min (bibtex-beginning-of-entry))
@@ -2150,12 +2162,12 @@
                   (if verbose
                       (bibtex-progress-message))
                   (let (label
-                        label2)                     
+                        label2)
                     (cond
                      ((looking-at bibtex-reference-head)
                       (setq
                        label
-                       (buffer-substring-no-properties 
+                       (buffer-substring-no-properties
                         (match-beginning bibtex-key-in-head)
                         (match-end bibtex-key-in-head)))
                       (let ((p (point))
@@ -2250,7 +2262,7 @@
                        (try-completion part-of-word completions))))
     (cond ((eq completion t)
            (if complete-strings
-               ;; remove double-quotes or braces if field is no concatenation 
+               ;; remove double-quotes or braces if field is no concatenation
                (save-excursion
                  (bibtex-inside-field)
                  (bibtex-enclosing-field)
@@ -2261,7 +2273,7 @@
                         (equal (match-end 0) end))
                        (bibtex-remove-delimiters))))))
           ((not completion)
-           (error "Can't find completion for \"%s\"." part-of-word))
+           (error "Can't find completion for \"%s\"" part-of-word))
           ((not (string= part-of-word completion))
            (delete-region beg end)
            (insert completion)
@@ -2433,8 +2445,8 @@
 from all non-empty optional or alternative fields, checks that no required
 fields are empty, and does some formatting dependent on the value of
 bibtex-entry-format.
-Note: some functions in BibTeX mode depend on entries being in a special 
-format (all fields beginning on separate lines), so it is usually a bad 
+Note: some functions in BibTeX mode depend on entries being in a special
+format (all fields beginning on separate lines), so it is usually a bad
 idea to remove `realign' from bibtex-entry-format.
 
 Use \\[bibtex-find-text] to position the cursor at the end of the current field.
@@ -2483,8 +2495,7 @@
 Entry to BibTeX mode calls the value of `bibtex-mode-hook' if that value is
 non-nil.
 
-\\{bibtex-mode-map}
-"
+\\{bibtex-mode-map}"
   (interactive)
   (kill-all-local-variables)
   (use-local-map bibtex-mode-map)
@@ -2546,7 +2557,7 @@
              (set-buffer curbuf)
              (setq bibtex-strings compl))
          (error
-          "File %s not in paths defined by bibtex-string-file-path variable."
+          "File %s not in paths defined by bibtex-string-file-path variable"
           filename))))
    bibtex-string-files)
   (if bibtex-maintain-sorted-entries
@@ -2677,7 +2688,7 @@
         (message nil))))
 
 (defun bibtex-entry (entry-type)
-  "Inserts a new BibTeX entry.
+  "Insert a new BibTeX entry.
 After insertion it calls the functions in `bibtex-add-entry-hook'."
   (interactive (let* ((completion-ignore-case t)
 		      (e-t (completing-read
@@ -2698,7 +2709,7 @@
          (r-n-o (elt e 1))
          (c-ref (elt e 2)))
     (if (not e)
-        (error "Bibtex entry type %s not defined." entry-type))
+        (error "Bibtex entry type %s not defined" entry-type))
     (if (and
          (member entry-type bibtex-include-OPTcrossref)
          c-ref)
@@ -2723,7 +2734,7 @@
                (fboundp bibtex-include-OPTkey))
               (bibtex-make-optional-field
                (list "key" nil bibtex-include-OPTkey))
-            (bibtex-make-optional-field '("key"))))            
+            (bibtex-make-optional-field '("key"))))
       (mapcar 'bibtex-make-optional-field optional)
       (mapcar 'bibtex-make-optional-field bibtex-user-optional-fields)
       (if bibtex-comma-after-last-field
@@ -2745,7 +2756,7 @@
                 (bibtex-enclosing-field)
               (search-failed
                (goto-char pnt)
-               (error "Not on BibTeX field.")))
+               (error "Not on BibTeX field")))
             (let ((mb (match-beginning bibtex-name-in-field))
                   (me (match-end bibtex-name-in-field)))
               (goto-char mb)
@@ -2791,7 +2802,7 @@
 
 (defun bibtex-make-field (e-t &optional called-by-yank)
   "Makes a field named E-T in current BibTeX entry.
-This function is for interactive and non-interactive purposes. To call
+This function is for interactive and non-interactive purposes.  To call
 it interactively, just give it no arguments and enter the field name
 using the minibuffer."
   (interactive "*P")
@@ -2851,7 +2862,7 @@
                ((fboundp init)
                 (funcall init))
                (t
-                (error "%s is neither a string nor a function." init))))
+                (error "%s is neither a string nor a function" init))))
             (if called-by-yank
                 ""
               (bibtex-field-right-delimiter)))
@@ -2876,7 +2887,7 @@
 If called from a program, this function returns the new location of point."
   (interactive)
   (let ((case-fold-search t)
-        (valid-entry-head 
+        (valid-entry-head
          (concat "[ \t]*@[ \t]*\\("
                  (mapconcat
                   (lambda (type)
@@ -2919,9 +2930,9 @@
     (if err
         (progn
           (goto-char pnt)
-          (error "Syntactical incorrect entry starts here."))))
+          (error "Syntactical incorrect entry starts here"))))
   (point))
-  
+
 (defun bibtex-reposition-window (arg)
   "Make the current BibTeX entry visible."
   (interactive "P")
@@ -2938,8 +2949,8 @@
 
 (defun bibtex-count-entries (&optional count-string-entries)
   "Count number of entries in current buffer or region.
-With prefix argument it counts all entries, otherwise it counts all
-except Strings.
+With prefix argument COUNT-STRING-ENTRIES it counts all entries,
+otherwise it counts all except Strings.
 If mark is active it counts entries in region, if not in whole buffer."
   (interactive "P")
   (let ((pnt (point))
@@ -2978,7 +2989,7 @@
     (if (not
          (re-search-forward
           (bibtex-cfield "abstract" bibtex-field-text) pnt t))
-        (error "No abstract in entry.")))
+        (error "No abstract in entry")))
   (ispell-region (match-beginning bibtex-text-in-cfield)
                  (match-end bibtex-text-in-cfield)))
 
@@ -2991,7 +3002,7 @@
 
 (defun bibtex-hide-entry-bodies (&optional arg)
   "Hide all lines between first and last BibTeX entries not beginning with @.
-With argument, show all text."
+With prefix argument ARG, show all text."
   (interactive "P")
   (save-excursion
     (bibtex-beginning-of-first-entry)
@@ -3035,13 +3046,13 @@
          (buffer-substring-no-properties
           (match-beginning bibtex-key-in-head)
           (match-end bibtex-key-in-head)))))))
-  
+
 (defun bibtex-find-entry-location (entry-name &optional ignore-dups)
   "Looking for place to put the BibTeX entry named ENTRY-NAME.
 Performs a binary search (therefore, buffer is assumed to be in sorted
 order, without duplicates (see \\[bibtex-validate]), if it is
-not, bibtex-find-entry-location will fail). If entry-name is already
-used as a reference key, an error is signaled. However, if optional
+not, `bibtex-find-entry-location' will fail).  If entry-name is already
+used as a reference key, an error is signaled.  However, if optional
 variable IGNORE-DUPS is non-nil, no error messages about duplicate
 entries are signaled, but the error handling is assumed to be made in
 the calling function.
@@ -3090,7 +3101,7 @@
         (if (not ignore-dups)
             (progn
               (bibtex-beginning-of-entry)
-              (error "Entry with key `%s' already exists." entry-name))))))
+              (error "Entry with key `%s' already exists" entry-name))))))
     (if dup
         (progn
           (bibtex-beginning-of-entry)
@@ -3102,8 +3113,8 @@
                  (match-beginning bibtex-key-in-reference)
                  (match-end bibtex-key-in-reference))))
       (if (or
-           (not actual-key) 
-           (string-lessp actual-key entry-name)) 
+           (not actual-key)
+           (string-lessp actual-key entry-name))
           ;; buffer contains no valid entries or
           ;; greater than last entry --> append
           (progn
@@ -3112,7 +3123,7 @@
                 (newline (forward-line 2)))
             (beginning-of-line))
         (goto-char right))
-      t)))    
+      t)))
 
 (defun bibtex-validate (&optional test-thoroughly)
   "Validate if buffer or region is syntactically correct.
@@ -3166,7 +3177,7 @@
                error-list
                (cons (list
                       (bibtex-current-line)
-                      "Syntax error (check esp. commas, braces, and quotes)") 
+                      "Syntax error (check esp. commas, braces, and quotes)")
                      error-list))
               (forward-char)))))
       (bibtex-progress-message 'done)
@@ -3324,7 +3335,7 @@
       t)))
 
 (defun bibtex-next-field (arg)
-  "Finds end of text of next BibTeX field; with arg, to its beginning."
+  "Finds end of text of next BibTeX field; with ARG, to its beginning."
   (interactive "P")
   (bibtex-inside-field)
   (let ((start (point)))
@@ -3371,7 +3382,7 @@
          (match-end 0))))
      (t
       (if (not silent)
-          (error "Not on BibTeX field."))))))
+          (error "Not on BibTeX field"))))))
 
 (defun bibtex-remove-OPT-or-ALT ()
   "Removes the string starting optional/alternative fields.
@@ -3422,7 +3433,7 @@
 
 (defun bibtex-kill-field (&optional copy-only)
   "Kills the entire enclosing BibTeX field.
-With prefix arg, copy the current field to `bibtex-field-kill-ring,'
+With prefix arg COPY-ONLY, copy the current field to `bibtex-field-kill-ring,'
 but do not actually kill it."
   (interactive "P")
   (let ((pnt (point))
@@ -3463,7 +3474,7 @@
 
 (defun bibtex-kill-entry (&optional copy-only)
   "Kill the entire enclosing BibTeX reference entry.
-With prefix arg copy the current reference entry to
+With prefix arg COPY-ONLY the current reference entry to
 `bibtex-entry-kill-ring', but do not actually kill it."
   (interactive "P")
   (let ((pnt (point))
@@ -3502,14 +3513,14 @@
 See also the command \\[bibtex-yank-pop]]."
   (interactive "*p")
   (bibtex-insert-current-kill (1- n))
-  (setq this-command 'bibtex-yank))    
+  (setq this-command 'bibtex-yank))
 
 (defun bibtex-yank-pop (n)
   "Replace just-yanked killed BibTeX item with a different.
 This command is allowed only immediately after a `bibtex-yank' or a
 `bibtex-yank-pop'.
 At such a time, the region contains a reinserted previously killed
-BibTeX item. `bibtex-yank-pop' deletes that item and inserts in its
+BibTeX item.  `bibtex-yank-pop' deletes that item and inserts in its
 place a different killed BibTeX item.
 
 With no argument, the previous kill is inserted.
@@ -3539,14 +3550,14 @@
 
 (defun bibtex-pop-previous (arg)
   "Replace text of current field with the similar field in previous entry.
-With arg, goes up ARG entries. Repeated, goes up so many times. May be
+With arg, goes up ARG entries.  Repeated, goes up so many times.  May be
 intermixed with \\[bibtex-pop-next] (bibtex-pop-next)."
   (interactive "p")
   (bibtex-pop arg 'previous))
 
 (defun bibtex-pop-next (arg)
   "Replace text of current field with the text of similar field in next entry.
-With arg, goes down ARG entries. Repeated, goes down so many times. May be
+With arg, goes down ARG entries.  Repeated, goes down so many times.  May be
 intermixed with \\[bibtex-pop-previous] (bibtex-pop-previous)."
   (interactive "p")
   (bibtex-pop arg 'next))
@@ -3609,7 +3620,7 @@
                 (re-search-forward bibtex-reference-head)
                 (if (not success)
                     (error
-                     "New inserted reference yields duplicate key."))))))))
+                     "New inserted reference yields duplicate key"))))))))
   (if (not called-by-reformat)
       (save-excursion
         (save-restriction
@@ -3620,9 +3631,9 @@
 
 (defun bibtex-fill-entry ()
   "Fill current entry.
-Realigns entry, so that every field starts on a separate line. Field
+Realigns entry, so that every field starts on a separate line.  Field
 names appear in column `bibtex-field-indentation', field text starts in
-column bibtex-text-indentation and continuation lines start here, too.
+column `bibtex-text-indentation' and continuation lines start here, too.
 If `bibtex-align-at-equal-sign' is non-nil, align equal signs also."
   (interactive "*")
   (let ((pnt (copy-marker (point)))
@@ -3672,7 +3683,7 @@
 (defun bibtex-reformat (&optional additional-options called-by-convert-alien)
   "Reformat all BibTeX entries in buffer or region.
 With prefix argument, read options for reformatting from minibuffer.
-With C-u C-u prefix argument, reuse previous answers (if any) again.
+With \\[universal-argument] \\[universal-argument] prefix argument, reuse previous answers (if any) again.
 If mark is active it reformats entries in region, if not in whole buffer."
   (interactive "*P")
   (let* ((pnt (point))
@@ -3813,7 +3824,7 @@
 
 (defun bibtex-complete-key ()
   "Complete word fragment before point to longest prefix of a defined key.
-If point is not after the part of a word, all keys are listed. This
+If point is not after the part of a word, all keys are listed.  This
 function is most useful in completing crossref entries."
   (interactive "*")
   (if (not bibtex-keys)
@@ -3821,58 +3832,72 @@
   (bibtex-complete bibtex-keys))
 
 (defun bibtex-Article ()
+  "Insert a new BibTeX @Article entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "Article"))
 
 (defun bibtex-Book ()
+  "Insert a new BibTeX @Book entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "Book"))
 
 (defun bibtex-Booklet ()
+  "Insert a new BibTeX @Booklet entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "Booklet"))
 
 (defun bibtex-InBook ()
+  "Insert a new BibTeX @InBook entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "InBook"))
 
 (defun bibtex-InCollection ()
+  "Insert a new BibTeX @InCollection entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "InCollection"))
 
 (defun bibtex-InProceedings ()
+  "Insert a new BibTeX @InProceedings entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "InProceedings"))
 
 (defun bibtex-Manual ()
+  "Insert a new BibTeX @Manual entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "Manual"))
 
 (defun bibtex-MastersThesis ()
+  "Insert a new BibTeX @MastersThesis entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "MastersThesis"))
 
 (defun bibtex-Misc ()
+  "Insert a new BibTeX @Misc entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "Misc"))
 
 (defun bibtex-PhdThesis ()
+  "Insert a new BibTeX @PhdThesis entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "PhdThesis"))
 
 (defun bibtex-Proceedings ()
+  "Insert a new BibTeX @Proceedings entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "Proceedings"))
 
 (defun bibtex-TechReport ()
+  "Insert a new BibTeX @TechReport entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "TechReport"))
 
 (defun bibtex-Unpublished ()
+  "Insert a new BibTeX @Unpublished entry; see also `bibtex-entry'."
   (interactive)
   (bibtex-entry "Unpublished"))
 
 (defun bibtex-String ()
+  "Insert a new BibTeX @String entry."
   (interactive)
   (if (not bibtex-keys)
       (bibtex-parse-keys nil t))
@@ -3910,6 +3935,7 @@
      (length "@String{")))))
 
 (defun bibtex-Preamble ()
+  "Insert a new BibTeX @Preamble entry."
   (interactive)
   (bibtex-move-outside-of-entry)
   (indent-to-column bibtex-entry-offset)