* [PATCH] Ebola is gone (was: Ebola is back)
@ 1998-11-26 10:13 Didier Verna
1998-11-26 17:07 ` Hrvoje Niksic
0 siblings, 1 reply; 2+ messages in thread
From: Didier Verna @ 1998-11-26 10:13 UTC (permalink / raw)
I've localized the Ebola warnings. It's in parse-time.el: the variable
parse-time-syntax contains chars except, for signs (+ and -) which contained 1
and -1. Here's a fix:
1998-11-26 Didier Verna <verna@inf.enst.fr>
* parse-time.el (parse-time-syntax): Put only chars in the array
(?p for plus and ?- for minus)
(parse-integer): don't use parse-time-syntax for computing the
sign, do it directly.
--- parse-time.el.orig Thu Nov 26 11:02:29 1998
+++ parse-time.el Thu Nov 26 11:26:47 1998
@@ -56,8 +56,8 @@
do (aset parse-time-syntax i ?A))
(loop for i from ?a to ?z
do (aset parse-time-syntax i ?a))
- (aset parse-time-syntax ?+ 1)
- (aset parse-time-syntax ?- -1)
+ (aset parse-time-syntax ?+ ?p)
+ (aset parse-time-syntax ?- ?m)
(aset parse-time-syntax ?: ?d)
)
@@ -78,10 +78,12 @@
(end (or end (length string))))
(when (< index end)
(let ((sign (aref string index)))
- (if (or (eq sign ?+) (eq sign ?-))
- (setq sign (parse-time-string-chars sign)
- index (1+ index))
- (setq sign 1))
+ (cond ((eq sign ?+)
+ (setq sign 1 index (1+ index)))
+ ((eq sign ?-)
+ (setq sign -1 index (1+ index)))
+ (t
+ (setq sign 1)))
(while (and (< index end)
(setq digit (digit-char-p (aref string index))))
(setq integer (+ (* integer 10) digit)
--
/ / _ _ Didier Verna http://www.inf.enst.fr/~verna/
- / / - / / /_/ / E.N.S.T. INF C201.1 mailto:verna@inf.enst.fr
/_/ / /_/ / /__ / 46 rue Barrault Tel. (33) 01 45 81 73 46
75634 Paris cedex 13 Fax. (33) 01 45 81 31 19
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Ebola is gone (was: Ebola is back)
1998-11-26 10:13 [PATCH] Ebola is gone (was: Ebola is back) Didier Verna
@ 1998-11-26 17:07 ` Hrvoje Niksic
0 siblings, 0 replies; 2+ messages in thread
From: Hrvoje Niksic @ 1998-11-26 17:07 UTC (permalink / raw)
Didier Verna <verna@inf.enst.fr> writes:
> I've localized the Ebola warnings. It's in parse-time.el: the
> variable parse-time-syntax contains chars except, for signs (+ and
> -) which contained 1 and -1. Here's a fix:
[...]
Am I understanding correctly that this patch changes perfectly valid
code because of bogus Ebola warnings? Not that I blame you; the
warnings are annoying, but in some cases totally bogus. For example,
when I evaluate this line, I get "ebola":
(eq ?A 23)
Comparison between integer and character is constant nil (?A and 23)
[eq, eval, eval-interactive, eval-last-sexp, call-interactively]
If this is indeed the case, I think parse-time-syntax should be left
alone, and we should fix XEmacs instead.
--
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
We must all confront and destroy our own inner geek.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-11-26 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-26 10:13 [PATCH] Ebola is gone (was: Ebola is back) Didier Verna
1998-11-26 17:07 ` Hrvoje Niksic
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).