[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: bibtex-convert-alien fails]

From: Richard Stallman
Subject: address@hidden: bibtex-convert-alien fails]
Date: Wed, 20 Feb 2008 03:59:28 -0500

Would someone please DTRT and ack?
If the changes are correct, they should be installed in Emacs 22
before the next release

------- Start of forwarded message -------
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Message-ID: <address@hidden>
Date: Tue, 19 Feb 2008 23:06:52 +0100
From: Ulrich Mueller <address@hidden>
To: address@hidden
Cc: "Andreas K. Huettel" <address@hidden>, address@hidden
Subject: bibtex-convert-alien fails

Andreas K. Huettel has discovered a bug in bibtex.el in Emacs 22.1
(also in 22.1.90 and current EMACS_22_BASE CVS):

Function bibtex-convert-alien always fails with error message
"Wrong type argument: number-or-marker-p, nil".

The reason is that "sit-for" is called with 3 arguments, while it
accepts only 2. There are actually two problems:

1) bibtex-convert-alien calls sit-for in the obsolete three-argument

2) sit-for cannot be called with three arguments if the second
   argument is nil (i.e. the second argument is not optional).
   This is not backwards compatible with the behaviour of the function
   in Emacs 21.

The patch included below should fix both problems.


Index: lisp/textmodes/bibtex.el
RCS file: /sources/emacs/emacs/lisp/textmodes/bibtex.el,v
retrieving revision
diff -u -B -u -r1.128.2.2 bibtex.el
- --- lisp/textmodes/bibtex.el  7 Jan 2008 02:21:46 -0000
+++ lisp/textmodes/bibtex.el    19 Feb 2008 21:34:37 -0000
@@ -4176,14 +4176,14 @@
 entries from minibuffer."
   (interactive "*P")
   (message "Starting to validate buffer...")
- -  (sit-for 1 nil t)
+  (sit-for 1 t)
   (deactivate-mark)  ; So bibtex-validate works on the whole buffer.
   (if (not (let (bibtex-maintain-sorted-entries)
       (message "Correct errors and call `bibtex-convert-alien' again")
     (message "Starting to reformat entries...")
- -    (sit-for 2 nil t)
+    (sit-for 2 t)
     (bibtex-reformat read-options)
     (goto-char (point-max))
     (message "Buffer is now parsable. Please save it.")))
Index: lisp/subr.el
RCS file: /sources/emacs/emacs/lisp/subr.el,v
retrieving revision 1.554.2.11
diff -u -B -u -r1.554.2.11 subr.el
- --- lisp/subr.el      4 Feb 2008 15:31:09 -0000       1.554.2.11
+++ lisp/subr.el        19 Feb 2008 21:55:13 -0000
@@ -1764,7 +1764,7 @@
 \(fn SECONDS &optional NODISP)"
   (when (or obsolete (numberp nodisp))
- -    (setq seconds (+ seconds (* 1e-3 nodisp)))
+    (setq seconds (+ seconds (* 1e-3 (or nodisp 0))))
     (setq nodisp obsolete))
------- End of forwarded message -------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]