]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/refbib.el
Update copyright year to 2015
[gnu-emacs] / lisp / textmodes / refbib.el
index a6736ec2d881e474722c8c794de2d35ba832fe5d..424b6d0f6a19401dd7002ab902f6154ed769c267 100644 (file)
@@ -1,10 +1,9 @@
 ;;; refbib.el --- convert refer-style references to ones usable by Latex bib
 
-;; Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Henry Kautz <kautz@research.att.com>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: bib, tex
 
 ;; This file is part of GNU Emacs.
@@ -65,7 +64,7 @@
   :group 'wp)
 
 (defcustom r2b-trace-on nil
-  "*Non-nil means trace conversion."
+  "Non-nil means trace conversion."
   :type 'boolean
   :group 'refbib)
 
@@ -129,7 +128,7 @@ in `r2b-proceedings-list' (although it wouldn't cause an error)."
 This is in addition to the `r2b-capitalize-title-stop-words'.")
 
 (defcustom r2b-delimit-with-quote t
-  "*If true, then use \" to delimit fields, otherwise use braces."
+  "If true, then use \" to delimit fields, otherwise use braces."
   :type 'boolean
   :group 'refbib)
 
@@ -170,12 +169,11 @@ This is in addition to the `r2b-capitalize-title-stop-words'.")
 
 (defun r2b-capitalize-title (s)
    "Like `capitalize', but don't capitalize stop words, except the first."
-   (save-excursion
-      (set-buffer (get-buffer-create "$$$Scratch$$$"))
-      (erase-buffer)
-      (insert s)
-      (r2b-capitalize-title-region (point-min) (point-max))
-      (buffer-string)))
+   (with-current-buffer (get-buffer-create "$$$Scratch$$$")
+     (erase-buffer)
+     (insert s)
+     (r2b-capitalize-title-region (point-min) (point-max))
+     (buffer-string)))
 
 ;*********************************************************
 (defun r2b-reset ()
@@ -206,12 +204,12 @@ This is in addition to the `r2b-capitalize-title-stop-words'.")
    (buffer-substring (match-beginning exp) (match-end exp)))
 
 (defcustom r2b-out-buf-name "*Out*"
-  "*Name of buffer for output from refer-to-bibtex."
+  "Name of buffer for output from refer-to-bibtex."
   :type 'string
   :group 'refbib)
 
 (defcustom r2b-log-name "*Log*"
-  "*Name of buffer for logs errors from refer-to-bibtex."
+  "Name of buffer for logs errors from refer-to-bibtex."
   :type 'string
   :group 'refbib)
 
@@ -681,22 +679,19 @@ Do `\\[r2b-help]' for more info."
 
 
 (defun r2b-convert-buffer (output)
-   "Transform current buffer and append to buffer OUTPUT.
+  "Transform current buffer and append to buffer OUTPUT.
 Do `\\[r2b-help]' for more info."
-   (interactive
-      (list (read-string "Output to buffer: " r2b-out-buf-name)))
-   (save-excursion
-      (setq r2b-log (get-buffer-create r2b-log-name))
-      (set-buffer r2b-log)
-      (erase-buffer))
-   (widen)
-   (goto-char (point-min))
-   (message "Working, please be patient...")
-   (sit-for 0)
-   (while (r2b-convert-record output) t)
-   (message "Done, results in %s, errors in %s"
-      r2b-out-buf-name r2b-log-name)
-   )
+  (interactive
+   (list (read-string "Output to buffer: " r2b-out-buf-name)))
+  (with-current-buffer (setq r2b-log (get-buffer-create r2b-log-name))
+    (erase-buffer))
+  (widen)
+  (goto-char (point-min))
+  (message "Working, please be patient...")
+  (sit-for 0)
+  (while (r2b-convert-record output) t)
+  (message "Done, results in %s, errors in %s"
+           r2b-out-buf-name r2b-log-name))
 
 (defvar r2b-help-message
 "                   Refer to Bibtex Bibliography Conversion
@@ -740,16 +735,14 @@ Please send bug reports and suggestions to
 
 
 (defun r2b-help ()
-   "Print help describing the `refbib' package."
-   (interactive)
-   (with-output-to-temp-buffer "*Help*"
-      (princ r2b-help-message)
-      (save-excursion
-       (set-buffer standard-output)
-       (help-mode))))
+  "Print help describing the `refbib' package."
+  (interactive)
+  (with-output-to-temp-buffer "*Help*"
+    (princ r2b-help-message)
+    (with-current-buffer standard-output
+      (help-mode))))
 
 (provide 'refbib)
 (provide 'refer-to-bibtex)
 
-;; arch-tag: 664afee2-6e76-4408-ba56-981d8a179586
 ;;; refbib.el ends here