all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: bug-gnu-emacs@gnu.org
Cc: "Andreas K. Huettel" <mail@akhuettel.de>, emacs@gentoo.org
Subject: bibtex-convert-alien fails
Date: Tue, 19 Feb 2008 23:06:52 +0100	[thread overview]
Message-ID: <18363.21244.131861.172613@a1ihome1.kph.uni-mainz.de> (raw)

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
   form.

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.

Ulrich


Index: lisp/textmodes/bibtex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/bibtex.el,v
retrieving revision 1.128.2.2
diff -u -B -u -r1.128.2.2 bibtex.el
--- lisp/textmodes/bibtex.el	7 Jan 2008 02:21:46 -0000	1.128.2.2
+++ 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)
   (bibtex-realign)
   (deactivate-mark)  ; So bibtex-validate works on the whole buffer.
   (if (not (let (bibtex-maintain-sorted-entries)
              (bibtex-validate)))
       (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))
   (cond
    (noninteractive




             reply	other threads:[~2008-02-19 22:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 22:06 Ulrich Mueller [this message]
2008-02-19 23:59 ` bibtex-convert-alien fails Ulrich Mueller
     [not found] <mailman.7642.1203458832.18990.bug-gnu-emacs@gnu.org>
2008-02-20  4:27 ` Roland Winkler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18363.21244.131861.172613@a1ihome1.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=emacs@gentoo.org \
    --cc=mail@akhuettel.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.