unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [ulm@gentoo.org: bibtex-convert-alien fails]
@ 2008-02-20  8:59 Richard Stallman
  2008-02-21  8:14 ` Glenn Morris
  2008-02-25  7:42 ` Bastien Guerry
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Stallman @ 2008-02-20  8:59 UTC (permalink / raw)
  To: emacs-devel

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: <18363.21244.131861.172613@a1ihome1.kph.uni-mainz.de>
Date: Tue, 19 Feb 2008 23:06:52 +0100
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

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
------- End of forwarded message -------




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ulm@gentoo.org: bibtex-convert-alien fails]
  2008-02-20  8:59 [ulm@gentoo.org: bibtex-convert-alien fails] Richard Stallman
@ 2008-02-21  8:14 ` Glenn Morris
  2008-02-25  7:42 ` Bastien Guerry
  1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2008-02-21  8:14 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman wrote:

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

ack

> From: Ulrich Mueller <ulm@gentoo.org>
> Subject: bibtex-convert-alien fails
> To: bug-gnu-emacs@gnu.org
> Cc: "Andreas K. Huettel" <mail@akhuettel.de>, emacs@gentoo.org
> Date: Tue, 19 Feb 2008 23:06:52 +0100




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ulm@gentoo.org: bibtex-convert-alien fails]
  2008-02-20  8:59 [ulm@gentoo.org: bibtex-convert-alien fails] Richard Stallman
  2008-02-21  8:14 ` Glenn Morris
@ 2008-02-25  7:42 ` Bastien Guerry
  2008-02-25  7:51   ` Glenn Morris
  1 sibling, 1 reply; 4+ messages in thread
From: Bastien Guerry @ 2008-02-25  7:42 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

What about this change?  Should this also be in EMACS_22_BASE?

Richard Stallman <rms@gnu.org> writes:

> ===================================================================
> 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
> ----------

-- 
Bastien




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ulm@gentoo.org: bibtex-convert-alien fails]
  2008-02-25  7:42 ` Bastien Guerry
@ 2008-02-25  7:51   ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2008-02-25  7:51 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: emacs-devel

Bastien Guerry wrote:

> What about this change?  Should this also be in EMACS_22_BASE?

An equivalent change already is.

2008-02-21  Glenn Morris  <rgm@gnu.org>

        * subr.el (sit-for): Fix obsolete form for nil second argument.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-25  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20  8:59 [ulm@gentoo.org: bibtex-convert-alien fails] Richard Stallman
2008-02-21  8:14 ` Glenn Morris
2008-02-25  7:42 ` Bastien Guerry
2008-02-25  7:51   ` Glenn Morris

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).