[email protected]
[Top] [All Lists]

Bug#316852: marked as forwarded (gettext-el: po-validate prevents proper

Subject: Bug#316852: marked as forwarded gettext-el: po-validate prevents proper initialization of compile.el
From: Debian Bug Tracking System
Date: Mon, 04 Jul 2005 10:33:15 -0700
Your message dated Mon, 4 Jul 2005 19:29:47 +0200 (CEST)
with message-id <[email protected]>
has caused the Debian Bug report #316852,
regarding gettext-el: po-validate prevents proper initialization of compile.el
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

---------------------------------------
Received: (at 316852-forwarded) by bugs.debian.org; 4 Jul 2005 17:30:45 +0000
>From [email protected] Mon Jul 04 10:30:45 2005
Return-path: <[email protected]>
Received: from pizarro.unex.es [158.49.8.2] (postfix)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DpUmL-0004fF-00; Mon, 04 Jul 2005 10:30:45 -0700
Received: from localhost (almendralejo.unex.es [158.49.8.199])
        by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP
        id 14537A1CDD; Mon,  4 Jul 2005 19:30:44 +0200 (CEST)
Received: from pizarro.unex.es ([158.49.8.2])
        by localhost (emilio [158.49.17.20]) (amavisd-new, port 10024)
        with ESMTP id 00669-01; Mon, 4 Jul 2005 19:32:21 +0200 (CEST)
Received: from guadiana.unex.es (guadiana.unex.es [158.49.17.23])
        by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP
        id BEC2AA1CAF; Mon,  4 Jul 2005 19:30:43 +0200 (CEST)
Received: from cantor.unex.es ([158.49.18.105])
        by guadiana.unex.es with esmtp (Exim 3.35 #1 (Debian))
        id 1DpUmJ-0007K8-00; Mon, 04 Jul 2005 19:30:43 +0200
Date: Mon, 4 Jul 2005 19:29:47 +0200 (CEST)
From: Santiago Vila <[email protected]>
To: [email protected]
Cc: [email protected],
        Sven Joachim <[email protected]>
Subject: Bug#316852: gettext-el: po-validate prevents proper initialization
 of compile.el (fwd)
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at unex.es
Delivered-To: [email protected]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
        HAS_PACKAGE autolearn=ham version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Hello.

I received this from the Debian bug system. As I'm not an emacs lisp
expert, this is really for you to decide.

[ As usual, please keep the Cc: lines when replying. The "-forwarded"
  suffix may be ommited. Thanks ].

---------- Forwarded message ----------
From: Sven Joachim <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Mon, 04 Jul 2005 11:11:51 +0200
Subject: Bug#316852: gettext-el: po-validate prevents proper initialization of
    compile.el

Package: gettext-el
Version: 0.14.4-2
Severity: normal
Tags: patch

There is a bug in po-mode.el, more precisely in the function
po-validate, which can prevent a proper initialization of the Emacs
"compile" package, i.e. important variables such as "compile-command"
may be undefined. To reproduce this bug, take the following steps:

* Start Emacs and load a .po file: emacs -q /tmp/junk.po
* In Emacs, type:
  C-x C-s         to save the file
  V               to call "po-validate"
  M-x compile     to start a compilation process.

You will get the error message
"Symbol's value as variable is void: compile-command".

I believe I have found out the reason for this. In the function
po-validate, the "compile" package is implicitly loaded by a call to
the autoloaded compile command. But this call takes place inside a let*
form, so all defcustoms and defvars from compile.el are evaluated only
temporarily -- and lost afterwards. Subsequent invocations of the
"compile" command won't define them, as the "compile" package is
already loaded.

To fix this, "po-validate" can explicitly load the "compile" feature
if not already present, as in the following patch:

------------------------------------------------------------------
diff -u /usr/share/emacs/site-lisp/gettext/po-mode.el
/home/sven/elisp/po-mode.el
--- /usr/share/emacs/site-lisp/gettext/po-mode.el       2005-05-05
17:07:51.000000000 +0200
+++ /home/sven/elisp/po-mode.el 2005-07-04 08:34:38.000000000 +0200
@@ -3096,6 +3096,7 @@
 (defun po-validate ()
   "Use 'msgfmt' for validating the current PO file contents."
   (interactive)
+  (require 'compile)           ; make sure 'compile.el' is initialized
   (let* ((dev-null
          (cond ((boundp 'null-device) null-device) ; since Emacs 20.3
                ((memq system-type '(windows-nt windows-95)) "NUL")
-------------------------------------------------------------------

Note that I have only tested this patch with GNU Emacs, because I
don't have XEmacs installed.


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.31
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages gettext-el depends on:
ii  emacs21 [emacsen]             21.4a-1    The GNU Emacs editor
ii  gettext                       0.14.4-2   GNU Internationalization utilities

-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#316852: marked as forwarded (gettext-el: po-validate prevents proper initialization of compile.el), Debian Bug Tracking System <=