Your message dated Tue, 11 Jan 2005 17:50:25 +0100 (CET)
with message-id <[EMAIL PROTECTED]>
has caused the Debian Bug report #287261,
regarding gettext-el: bad interaction with view-read-only
to be marked as having been forwarded to the upstream software
author(s) gettext bugs <[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 287261-forwarded) by bugs.debian.org; 11 Jan 2005 16:50:32 +0000
>From [EMAIL PROTECTED] Tue Jan 11 08:50:31 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 1CoPDz-0001KK-00; Tue, 11 Jan 2005 08:50:31 -0800
Received: from localhost (almendralejo.unex.es [158.49.8.199])
        by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP
        id 073E1A1D3D; Tue, 11 Jan 2005 17:50:30 +0100 (CET)
Received: from pizarro.unex.es ([158.49.8.2])
        by localhost (emilio [158.49.17.20]) (amavisd-new, port 10024)
        with ESMTP id 09028-02; Tue, 11 Jan 2005 17:51:03 +0100 (CET)
Received: from guadiana.unex.es (guadiana.unex.es [158.49.17.23])
        by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP
        id 022EBA1D2E; Tue, 11 Jan 2005 17:50:27 +0100 (CET)
Received: from guadiana.unex.es
        ([158.49.17.23] helo=localhost ident=sanvila)
        by guadiana.unex.es with esmtp (Exim 3.35 #1 (Debian))
        id 1CoPDu-0005EN-00; Tue, 11 Jan 2005 17:50:26 +0100
Date: Tue, 11 Jan 2005 17:50:25 +0100 (CET)
From: Santiago Vila <[EMAIL PROTECTED]>
To: gettext bugs <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED],
        Kalle Olavi Niemitalo <[EMAIL PROTECTED]>
Subject: Bug#287261: gettext-el: bad interaction with view-read-only (fwd)
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <[EMAIL PROTECTED]>
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.

Received this from the Debian bug system.
[ Please Cc: the submitter and [EMAIL PROTECTED] ].

---------- Forwarded message ----------
From: Kalle Olavi Niemitalo <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Date: Sun, 26 Dec 2004 15:57:51 +0200
Subject: Bug#287261: gettext-el: bad interaction with view-read-only

Package: gettext-el
Version: 0.14.1-5
Severity: minor
File: /usr/share/emacs/site-lisp/gettext/po-mode.el
Tags: patch

I have customized `view-read-only' to t, which generally results 
in useful behavior.  Now however, when I visit a *.po file, 
`after-find-file' calls `normal-mode', which calls `po-mode', 
which sets `buffer-read-only' to t, and `after-find-file' then 
enables View mode, which shadows the key bindings of PO mode: for 
example, RET scrolls the buffer rather than opens a translation 
for editing.  I then have to explicitly disable View mode before 
I can edit the translations.

I believe the right way to solve the problem is to add this form 
somewhere near (defun po-mode ...) in po-mode.el:

  (put 'po-mode 'mode-class 'special)

Then `after-find-file' will abstain from enabling View mode, even 
though the buffer is read only.  According to the Emacs Lisp 
Reference Manual, the setting will also affect two other aspects 
of PO mode:

- When the current buffer is in PO mode and `default-major-mode' 
is nil, visiting a new file (not listed in `auto-mode-alist') 
will not make the new buffer inherit PO mode from the current 
buffer.

- Items specific to editing will not appear in the tool bar in PO 
mode.

I believe these effects are not harmful.

diff -u /usr/share/emacs/site-lisp/gettext/po-mode.el 
/home/kalle/share/emacs/site-lisp/po-mode.el
--- /usr/share/emacs/site-lisp/gettext/po-mode.el       2004-07-27 
00:21:24.000000000 +0300
+++ /home/kalle/share/emacs/site-lisp/po-mode.el        2004-12-26 
15:45:38.000000000 +0200
@@ -48,6 +48,11 @@
 ;; You may also adjust some variables, below, by defining them in your
 ;; '.emacs' file, either directly or through command 'M-x customize'.
 
+;;; Change Log:
+
+;; 2004-12-26  Kalle Olavi Niemitalo  <[EMAIL PROTECTED]>
+;;     (po-mode): Mark the major mode as special.
+
 ;;; Code:
 
 (defconst po-mode-version-string "2.01" "\
@@ -1015,6 +1020,10 @@
     po-mode-map)
   "Keymap for PO mode.")
 
+;; PO mode makes the buffer read only but should not enable View mode
+;; even when `view-read-only' is t.
+(put 'po-mode 'mode-class 'special)
+
 (defun po-mode ()
   "Major mode for translators when they edit PO files.
 


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

Reply via email to