git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Change octal literals to be XEmacs friendly
@ 2009-01-21 17:02 malc
  2009-01-23  8:09 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: malc @ 2009-01-21 17:02 UTC (permalink / raw)
  To: git


case uses eql and (eql ?\001 1) evaluates to nil under XEmacs
(probably because some internal type of ?\001 is char)

Signed-off-by: Vassili Karpov <av1474@comtv.ru>
---
 contrib/emacs/git.el |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 09e8bae..715580a 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -562,29 +562,29 @@ the process output as a string, or nil if the git command failed."
   (let* ((old-type (lsh (or old-perm 0) -9))
         (new-type (lsh (or new-perm 0) -9))
         (str (case new-type
-               (?\100  ;; file
+               (#o100  ;; file
                 (case old-type
-                  (?\100 nil)
-                  (?\120 "   (type change symlink -> file)")
-                  (?\160 "   (type change subproject -> file)")))
-                (?\120  ;; symlink
+                  (#o100 nil)
+                  (#o120 "   (type change symlink -> file)")
+                  (#o160 "   (type change subproject -> file)")))
+                (#o120  ;; symlink
                  (case old-type
-                   (?\100 "   (type change file -> symlink)")
-                   (?\160 "   (type change subproject -> symlink)")
+                   (#o100 "   (type change file -> symlink)")
+                   (#o160 "   (type change subproject -> symlink)")
                    (t "   (symlink)")))
-                 (?\160  ;; subproject
+                 (#o160  ;; subproject
                   (case old-type
-                    (?\100 "   (type change file -> subproject)")
-                    (?\120 "   (type change symlink -> subproject)")
+                    (#o100 "   (type change file -> subproject)")
+                    (#o120 "   (type change symlink -> subproject)")
                     (t "   (subproject)")))
-                  (?\110 nil)  ;; directory (internal, not a real git state)
-                 (?\000  ;; deleted or unknown
+                  (#o110 nil)  ;; directory (internal, not a real git state)
+                 (#o000  ;; deleted or unknown
                   (case old-type
-                    (?\120 "   (symlink)")
-                    (?\160 "   (subproject)")))
+                    (#o120 "   (symlink)")
+                    (#o160 "   (subproject)")))
                  (t (format "   (unknown type %o)" new-type)))))
     (cond (str (propertize str 'face 'git-status-face))
-          ((eq new-type ?\110) "/")
+          ((eq new-type #o110) "/")
           (t ""))))
 
 (defun git-rename-as-string (info)

-- 
mailto:av1474@comtv.ru

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

* Re: [PATCH] Change octal literals to be XEmacs friendly
  2009-01-21 17:02 [PATCH] Change octal literals to be XEmacs friendly malc
@ 2009-01-23  8:09 ` Junio C Hamano
  2009-01-23 19:53   ` malc
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-01-23  8:09 UTC (permalink / raw)
  To: malc, Vassili Karpov; +Cc: git, Alexandre Julliard

malc@pulsesoft.com writes:

> case uses eql and (eql ?\001 1) evaluates to nil under XEmacs
> (probably because some internal type of ?\001 is char)

And I presume the new way to spell is compatible with non XEmacs emacs?
It may be obvious to you, but please spell it out.  Parenthesized
"probably" does not help building the confidence in the patch either.

> Signed-off-by: Vassili Karpov <av1474@comtv.ru>

How are the (nameless) author of the patch malc@pulsesoft.com and Vassili
Karpov, the person who signed off, related?

Next time, please spend a few minutes to see if there are active
developers who are familiar in the area you are touching, and Cc your
patch to ask their input.

    git blame -L562,+29 contrib/emacs/git.el

tells me that most of this came from 40f162b (git.el: Display file types
and type changes., 2008-01-06) by Alexandre, so I am Cc'ing him.

> ---
>  contrib/emacs/git.el |   30 +++++++++++++++---------------
>  1 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
> index 09e8bae..715580a 100644
> --- a/contrib/emacs/git.el
> +++ b/contrib/emacs/git.el
> @@ -562,29 +562,29 @@ the process output as a string, or nil if the git command failed."
>    (let* ((old-type (lsh (or old-perm 0) -9))
>          (new-type (lsh (or new-perm 0) -9))
>          (str (case new-type
> -               (?\100  ;; file
> +               (#o100  ;; file
>                  (case old-type
> -                  (?\100 nil)
> -                  (?\120 "   (type change symlink -> file)")
> -                  (?\160 "   (type change subproject -> file)")))
> -                (?\120  ;; symlink
> +                  (#o100 nil)
> +                  (#o120 "   (type change symlink -> file)")
> +                  (#o160 "   (type change subproject -> file)")))
> +                (#o120  ;; symlink
>                   (case old-type
> -                   (?\100 "   (type change file -> symlink)")
> -                   (?\160 "   (type change subproject -> symlink)")
> +                   (#o100 "   (type change file -> symlink)")
> +                   (#o160 "   (type change subproject -> symlink)")
>                     (t "   (symlink)")))
> -                 (?\160  ;; subproject
> +                 (#o160  ;; subproject
>                    (case old-type
> -                    (?\100 "   (type change file -> subproject)")
> -                    (?\120 "   (type change symlink -> subproject)")
> +                    (#o100 "   (type change file -> subproject)")
> +                    (#o120 "   (type change symlink -> subproject)")
>                      (t "   (subproject)")))
> -                  (?\110 nil)  ;; directory (internal, not a real git state)
> -                 (?\000  ;; deleted or unknown
> +                  (#o110 nil)  ;; directory (internal, not a real git state)
> +                 (#o000  ;; deleted or unknown
>                    (case old-type
> -                    (?\120 "   (symlink)")
> -                    (?\160 "   (subproject)")))
> +                    (#o120 "   (symlink)")
> +                    (#o160 "   (subproject)")))
>                   (t (format "   (unknown type %o)" new-type)))))
>      (cond (str (propertize str 'face 'git-status-face))
> -          ((eq new-type ?\110) "/")
> +          ((eq new-type #o110) "/")
>            (t ""))))
>  
>  (defun git-rename-as-string (info)
>
> -- 
> mailto:av1474@comtv.ru
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] Change octal literals to be XEmacs friendly
  2009-01-23  8:09 ` Junio C Hamano
@ 2009-01-23 19:53   ` malc
  2009-01-23 20:13     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: malc @ 2009-01-23 19:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Alexandre Julliard

On Fri, 23 Jan 2009, Junio C Hamano wrote:

> malc@pulsesoft.com writes:
>
>> case uses eql and (eql ?\001 1) evaluates to nil under XEmacs
>> (probably because some internal type of ?\001 is char)
>
> And I presume the new way to spell is compatible with non XEmacs emacs?
> It may be obvious to you, but please spell it out.  Parenthesized
> "probably" does not help building the confidence in the patch either.

Fair enough.

XEmacs:
(type-of ?\1) yields character

FSF Emacs:
(type-of ?\1) yields integer

>
>> Signed-off-by: Vassili Karpov <av1474@comtv.ru>
>
> How are the (nameless) author of the patch malc@pulsesoft.com and Vassili
> Karpov, the person who signed off, related?

Both are my e-mail address used in ~/.gitconfig and ~/.emacs (and used
by GNUS which was used to post the message via gmane's nntp interface)
respectively.

> Next time, please spend a few minutes to see if there are active
> developers who are familiar in the area you are touching, and Cc your
> patch to ask their input.
>
>    git blame -L562,+29 contrib/emacs/git.el
>

Okay.

> tells me that most of this came from 40f162b (git.el: Display file types
> and type changes., 2008-01-06) by Alexandre, so I am Cc'ing him.
>

[..snip..]

-- 
mailto:av1474@comtv.ru

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

* Re: [PATCH] Change octal literals to be XEmacs friendly
  2009-01-23 19:53   ` malc
@ 2009-01-23 20:13     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-01-23 20:13 UTC (permalink / raw)
  To: malc; +Cc: git, Alexandre Julliard

malc <av1474@comtv.ru> writes:

> On Fri, 23 Jan 2009, Junio C Hamano wrote:
>
>> malc@pulsesoft.com writes:
>>
>>> case uses eql and (eql ?\001 1) evaluates to nil under XEmacs
>>> (probably because some internal type of ?\001 is char)
>>
>> And I presume the new way to spell is compatible with non XEmacs emacs?
>> It may be obvious to you, but please spell it out.  Parenthesized
>> "probably" does not help building the confidence in the patch either.
>
> Fair enough.
>
> XEmacs:
> (type-of ?\1) yields character
>
> FSF Emacs:
> (type-of ?\1) yields integer

No use explaining that to me _here_.  Please use that knowledge to write a
better description in an updated commit log message when sending your v2
patch.

>>> Signed-off-by: Vassili Karpov <av1474@comtv.ru>
>>
>> How are the (nameless) author of the patch malc@pulsesoft.com and Vassili
>> Karpov, the person who signed off, related?
>
> Both are my e-mail address used in ~/.gitconfig and ~/.emacs (and used
> by GNUS which was used to post the message via gmane's nntp interface)
> respectively.

Assuming that you would want to be known as Vassili, please have that name
on From: line of the message -- the patch acceptance tool takes the author
name from there.

If you can't for whatever reason use the name on From: line of the e-mail
message, you can begin the body of the message with

	From: Vassili Karpov <av1474@comtv.ru>

(without indentation) and a blank line.  This trick can also be used when
you are forwarding a patch somebody else wrote.

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

end of thread, other threads:[~2009-01-23 20:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 17:02 [PATCH] Change octal literals to be XEmacs friendly malc
2009-01-23  8:09 ` Junio C Hamano
2009-01-23 19:53   ` malc
2009-01-23 20:13     ` Junio C Hamano

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 NNTP newsgroup(s).