unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Checking for nnheader-file-name-translation-alist on gnus-ems.el
@ 2002-06-14 10:54 Juanma Barranquero
  2002-06-14 13:32 ` Simon Josefsson
  0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2002-06-14 10:54 UTC (permalink / raw)


It is OK to install this patch?

The motivation is that in some systems (windows and os/2, basically),
the eval-and-compile block tries to append to a variable that is not yet
defined. That causes an error, so gnus-ems.el is not compiled on those
systems (the same happens in the EMACS_21_1_RC branch, BTW).

I thought of require'ing nnheader.el, but it seems overkill for just a
variable. Also, I didn't use bound-and-true-p because gnus-ems.el should
work in several Emacs and XEmacs releases.



                                                           /L/e/k/t/u





2002-06-14  Juanma Barranquero  <lektu@terra.es>

	* gnus-ems.el: Check that `nnheader-file-name-translation-alist'
	is bound before getting its value.


Index: gnus-ems.el
===================================================================
RCS file: /cvs/emacs/lisp/gnus/gnus-ems.el,v
retrieving revision 1.15
diff -u -3 -r1.15 gnus-ems.el
--- gnus-ems.el	12 Apr 2002 08:46:59 -0000	1.15
+++ gnus-ems.el	14 Jun 2002 10:47:06 -0000
@@ -82,7 +82,8 @@
      ((string-match "windows-nt\\|os/2\\|emx\\|cygwin32"
 		    (symbol-name system-type))
       (setq nnheader-file-name-translation-alist
-	    (append nnheader-file-name-translation-alist
+	    (append (and (boundp 'nnheader-file-name-translation-alist)
+                         nnheader-file-name-translation-alist)
 		    (mapcar (lambda (c) (cons c ?_))
 			    '(?: ?* ?\" ?< ?> ??))
 		    '((?+ . ?-))))))))

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

* Re: Checking for nnheader-file-name-translation-alist on gnus-ems.el
  2002-06-14 10:54 Checking for nnheader-file-name-translation-alist on gnus-ems.el Juanma Barranquero
@ 2002-06-14 13:32 ` Simon Josefsson
  2002-06-14 15:51   ` Juanma Barranquero
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Josefsson @ 2002-06-14 13:32 UTC (permalink / raw)
  Cc: emacs-devel

On Fri, 14 Jun 2002, Juanma Barranquero wrote:

> I thought of require'ing nnheader.el, but it seems overkill for just a
> variable.

gnus-ems.el also calls nnheader functions, so perhaps it is OK.

> Also, I didn't use bound-and-true-p because gnus-ems.el should work in
> several Emacs and XEmacs releases.

gnus-ems.el found in Emacs CVS is not intended to work with several Emacs 
and XEmacs releases, I think.  But it would be better to have a generic 
solution, because the same patch will probably be applied to Oort Gnus as 
well, which IS intended to work with several Emacs and XEmacs releases.

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

* Re: Checking for nnheader-file-name-translation-alist on gnus-ems.el
  2002-06-14 13:32 ` Simon Josefsson
@ 2002-06-14 15:51   ` Juanma Barranquero
  0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2002-06-14 15:51 UTC (permalink / raw)


On Fri, 14 Jun 2002 15:32:53 +0200 (CEST), Simon Josefsson <jas@extundo.com> wrote:

> gnus-ems.el found in Emacs CVS is not intended to work with several Emacs 
> and XEmacs releases, I think.

It has XEmacs-specific stuff, so I suppose the intent is to be the same
as in Oort Gnus or whatever.

> But it would be better to have a generic 
> solution, because the same patch will probably be applied to Oort Gnus as 
> well, which IS intended to work with several Emacs and XEmacs releases.

The generic solution is even easier. See below.

Opinion from Gnus maintainer (and posibly others)? 


                                                           /L/e/k/t/u



Index: gnus-ems.el
===================================================================
RCS file: /cvs/emacs/lisp/gnus/gnus-ems.el,v
retrieving revision 1.15
diff -u -3 -r1.15 gnus-ems.el
--- gnus-ems.el	12 Apr 2002 08:46:59 -0000	1.15
+++ gnus-ems.el	14 Jun 2002 15:47:39 -0000
@@ -81,6 +81,7 @@
     (cond
      ((string-match "windows-nt\\|os/2\\|emx\\|cygwin32"
 		    (symbol-name system-type))
+      (require 'nnheader)
       (setq nnheader-file-name-translation-alist
 	    (append nnheader-file-name-translation-alist
 		    (mapcar (lambda (c) (cons c ?_))

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

end of thread, other threads:[~2002-06-14 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 10:54 Checking for nnheader-file-name-translation-alist on gnus-ems.el Juanma Barranquero
2002-06-14 13:32 ` Simon Josefsson
2002-06-14 15:51   ` Juanma Barranquero

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