git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Change octal literals to be XEmacs friendly

From
Mmalc@pulsesoft.com <malc@pulsesoft.com>
Date
Jan 21, 2009, 17:02 UTC
Message-ID
<871vuwbnio.fsf@linmac.oyster.ru>

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
Next: Junio C Hamano
Message 1 of 4 in “Change octal literals to be XEmacs friendly”
  1. Change octal literals to be XEmacs friendlymalc@pulsesoft.com, Jan 21, 2009
  2. Junio C HamanoJan 23, 2009
  3. malcJan 23, 2009
  4. Junio C HamanoJan 23, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.