unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
@ 2011-02-22  6:12 Paul Eggert
  2011-02-22 10:11 ` Francesco Potortì
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Eggert @ 2011-02-22  6:12 UTC (permalink / raw)
  To: 8093

Emacs downcases drive letters when canonicalizing file names on
Microsoft Windows, but etags upcases them.  etags should be consistent
with Emacs.  I found this problem by code inspection, because there's
a macro 'upcase' that normally isn't used in etags.c; its only use is
in the section of code that upcases drive letters.  Here's a proposed
patch.

2011-02-21  Paul Eggert  <eggert@cs.ucla.edu>

	etags: Downcase drive letters, for consistency with Emacs proper.
	* etags.c (upcase): Remove; no longer used.
	(canonicalize_filename): Downcase drive letters.

--- lib-src/etags.c	2011-02-21 16:47:08.883947000 -0800
+++ /u/cs/fac/eggert/junk/etags.c	2011-02-21 21:21:04.074974000 -0800
@@ -239,7 +239,6 @@ If you want regular expression support,
  #define ISLOWER(c)	islower (CHAR(c))
  
  #define lowcase(c)	tolower (CHAR(c))
-#define upcase(c)	toupper (CHAR(c))
  
  
  /*
@@ -6638,7 +6637,7 @@ filename_is_absolute (char *fn)
  	  );
  }
  
-/* Upcase DOS drive letter and collapse separators into single slashes.
+/* Downcase DOS drive letter and collapse separators into single slashes.
     Works in place. */
  static void
  canonicalize_filename (register char *fn)
@@ -6648,8 +6647,8 @@ canonicalize_filename (register char *fn
  
  #ifdef DOS_NT
    /* Canonicalize drive letter case.  */
-  if (fn[0] != '\0' && fn[1] == ':' && ISLOWER (fn[0]))
-    fn[0] = upcase (fn[0]);
+  if (fn[0] != '\0' && fn[1] == ':' && ISUPPER (fn[0]))
+    fn[0] = downcase (fn[0]);
  
    sep = '\\';
  #endif







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

* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
  2011-02-22  6:12 bug#8093: etags: Downcase drive letters, for consistency with Emacs proper Paul Eggert
@ 2011-02-22 10:11 ` Francesco Potortì
  2011-02-22 17:33   ` Eli Zaretskii
  2011-02-22 17:48   ` Glenn Morris
  0 siblings, 2 replies; 8+ messages in thread
From: Francesco Potortì @ 2011-02-22 10:11 UTC (permalink / raw)
  To: Paul Eggert; +Cc: bug-gnu-emacs, owner, 8093

>Emacs downcases drive letters when canonicalizing file names on
>Microsoft Windows, but etags upcases them.  etags should be consistent
>with Emacs.  I found this problem by code inspection, because there's
>a macro 'upcase' that normally isn't used in etags.c; its only use is
>in the section of code that upcases drive letters.  Here's a proposed
>patch.

Looks reasonable and I see no compatibility issues.  Please install it.

>2011-02-21  Paul Eggert  <eggert@cs.ucla.edu>
>
>	etags: Downcase drive letters, for consistency with Emacs proper.
>	* etags.c (upcase): Remove; no longer used.
>	(canonicalize_filename): Downcase drive letters.
>
>--- lib-src/etags.c	2011-02-21 16:47:08.883947000 -0800
>+++ /u/cs/fac/eggert/junk/etags.c	2011-02-21 21:21:04.074974000 -0800
>@@ -239,7 +239,6 @@ If you want regular expression support,
>  #define ISLOWER(c)	islower (CHAR(c))
>  
>  #define lowcase(c)	tolower (CHAR(c))
>-#define upcase(c)	toupper (CHAR(c))
>  
>  
>  /*
>@@ -6638,7 +6637,7 @@ filename_is_absolute (char *fn)
>  	  );
>  }
>  
>-/* Upcase DOS drive letter and collapse separators into single slashes.
>+/* Downcase DOS drive letter and collapse separators into single slashes.
>     Works in place. */
>  static void
>  canonicalize_filename (register char *fn)
>@@ -6648,8 +6647,8 @@ canonicalize_filename (register char *fn
>  
>  #ifdef DOS_NT
>    /* Canonicalize drive letter case.  */
>-  if (fn[0] != '\0' && fn[1] == ':' && ISLOWER (fn[0]))
>-    fn[0] = upcase (fn[0]);
>+  if (fn[0] != '\0' && fn[1] == ':' && ISUPPER (fn[0]))
>+    fn[0] = downcase (fn[0]);
>  
>    sep = '\\';
>  #endif
>
>
>
>
>
>





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

* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
  2011-02-22 10:11 ` Francesco Potortì
@ 2011-02-22 17:33   ` Eli Zaretskii
  2011-02-22 17:39     ` Paul Eggert
  2011-02-22 17:48   ` Glenn Morris
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-02-22 17:33 UTC (permalink / raw)
  To: Francesco Potortì; +Cc: eggert, 8093

> Date: Tue, 22 Feb 2011 11:11:36 +0100
> From: Francesco Potortì= <pot@gnu.org>
> Cc: bug-gnu-emacs@gnu.org, owner@debbugs.gnu.org, 8093@debbugs.gnu.org
> 
> >Emacs downcases drive letters when canonicalizing file names on
> >Microsoft Windows, but etags upcases them.  etags should be consistent
> >with Emacs.  I found this problem by code inspection, because there's
> >a macro 'upcase' that normally isn't used in etags.c; its only use is
> >in the section of code that upcases drive letters.  Here's a proposed
> >patch.
> 
> Looks reasonable and I see no compatibility issues.  Please install it.

Agreed.

Thanks, Paul.






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

* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
  2011-02-22 17:33   ` Eli Zaretskii
@ 2011-02-22 17:39     ` Paul Eggert
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Eggert @ 2011-02-22 17:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 8093-done

On 02/22/2011 09:33 AM, Eli Zaretskii wrote:
> Thanks, Paul.

You're welcome, and I installed it as revno 103385
on the trunk.





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

* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
  2011-02-22 10:11 ` Francesco Potortì
  2011-02-22 17:33   ` Eli Zaretskii
@ 2011-02-22 17:48   ` Glenn Morris
  2011-02-22 19:18     ` Francesco Potortì
  1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2011-02-22 17:48 UTC (permalink / raw)
  To: Francesco Potortì; +Cc: 8093


    From: Francesco Potorti <pot@gnu.org>
    Subject: bug#8093: etags: Downcase drive letters, 
        for consistency with Emacs proper.
    To: Paul Eggert <eggert@cs.ucla.edu>
    Cc: bug-gnu-emacs@gnu.org, owner@debbugs.gnu.org, 8093@debbugs.gnu.org


FYI, your mail client seems to be including Resent-To and Resent-Cc in
replies. Per RFC 2822, it should not do this. Eg

http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00765.html





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

* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
  2011-02-22 17:48   ` Glenn Morris
@ 2011-02-22 19:18     ` Francesco Potortì
  2011-02-22 22:36       ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Francesco Potortì @ 2011-02-22 19:18 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 8093

>    From: Francesco Potorti <pot@gnu.org>
>    Subject: bug#8093: etags: Downcase drive letters, 
>        for consistency with Emacs proper.
>    To: Paul Eggert <eggert@cs.ucla.edu>
>    Cc: bug-gnu-emacs@gnu.org, owner@debbugs.gnu.org, 8093@debbugs.gnu.org
>
>FYI, your mail client seems to be including Resent-To and Resent-Cc in
>replies. Per RFC 2822, it should not do this. Eg
>
>http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00765.html

I use Emacs 22.3 rmail.  Unfortunately, I have a set of custom additions
to rmail which do not work with Emacs 23 and I have not yet found the
time to convert them and switch to Emacs 23 :(





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

* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
  2011-02-22 19:18     ` Francesco Potortì
@ 2011-02-22 22:36       ` Glenn Morris
  2011-02-23  8:38         ` Francesco Potortì
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2011-02-22 22:36 UTC (permalink / raw)
  To: Francesco Potortì; +Cc: 8093

Francesco Potortì wrote:

> I use Emacs 22.3 rmail.

rmail-dont-reply-to-names should work as a stopgap.





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

* bug#8093: etags: Downcase drive letters, for consistency with Emacs proper.
  2011-02-22 22:36       ` Glenn Morris
@ 2011-02-23  8:38         ` Francesco Potortì
  0 siblings, 0 replies; 8+ messages in thread
From: Francesco Potortì @ 2011-02-23  8:38 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 8093

>> I use Emacs 22.3 rmail.
>
>rmail-dont-reply-to-names should work as a stopgap.

I do not see how: rmail-dont-reply-to-names is a list of addresses,
while I want to prevent answering to spcific headers.

Anyway, I see the importance of this and I will modify my rmail.el,
thank you for noticing.





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

end of thread, other threads:[~2011-02-23  8:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22  6:12 bug#8093: etags: Downcase drive letters, for consistency with Emacs proper Paul Eggert
2011-02-22 10:11 ` Francesco Potortì
2011-02-22 17:33   ` Eli Zaretskii
2011-02-22 17:39     ` Paul Eggert
2011-02-22 17:48   ` Glenn Morris
2011-02-22 19:18     ` Francesco Potortì
2011-02-22 22:36       ` Glenn Morris
2011-02-23  8:38         ` Francesco Potortì

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