annotate lib-src/emacs.csh @ 5908:6174848f3e6c

Use parse_integer() in read_atom(); support bases with ratios like integers src/ChangeLog addition: 2015-05-08 Aidan Kehoe <kehoea@parhasard.net> * data.c (init_errors_once_early): Move the Qunsupported_type here from numbers.c, so it's available when the majority of our types are not supported. * general-slots.h: Add it here, too. * number.c: Remove the definition of Qunsupported_type from here. * lread.c (read_atom): Check if the first character could reflect a rational, if so, call parse_integer(), don't check the syntax of the other characters. This allows us to accept the non-ASCII digit characters too. If that worked partially, but not completely, and the next char is a slash, try to parse as a ratio. If that fails, try isfloat_string(), but only if the first character could plausibly be part of a float. Otherwise, treat as a symbol. * lread.c (read_rational): Rename from read_integer. Handle ratios with the same radix specification as was used for integers. * lread.c (read1): Rename read_integer in this function. Support the Common Lisp #NNNrMMM syntax for parsing a number MMM of arbitrary radix NNN. man/ChangeLog addition: 2015-05-08 Aidan Kehoe <kehoea@parhasard.net> * lispref/numbers.texi (Numbers): Describe the newly-supported arbitrary-base syntax for rationals (integers and ratios). Describe that ratios can take the same base specification as integers, something also new. tests/ChangeLog addition: 2015-05-08 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-reader-tests.el: Check the arbitrary-base integer reader syntax support, just added. Check the reader base support for ratios, just added. Check the non-ASCII-digit support in the reader, just added.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 09 May 2015 00:40:57 +0100
parents 06dd936cde16
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5491
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
1 ### emacs.csh
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
2
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
3 ## Add legal notice if non-trivial amounts of code are added.
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
4
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
5 ## Author: Michael DeCorte
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
6
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
7 ### Commentary:
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
8
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
9 # Synced up with: GNU 23.1.92.
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
10 # Synced by: Ben Wing, 2-17-10.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
5491
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
12 ## This file is obsolete. Use emacsclient -a instead.
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
13
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
14 ## This defines a csh command named `edit' which resumes an
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
15 ## existing Emacs or starts a new one if none exists.
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
16 ## One way or another, any arguments are passed to Emacs to specify files
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
17 ## (provided you have loaded `resume.el').
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
18
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
19 ## These are the possible values of $whichjob
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
20 ## 1 = new ordinary emacs (the -nw is so that it doesn't try to do X)
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
21 ## 2 = resume emacs
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
22 ## 3 = new emacs under X (-i is so that you get a reasonable icon)
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
23 ## 4 = resume emacs under X
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 set EMACS_PATTERN="^\[[0-9]\] . Stopped ............ $EMACS"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 "emacsclient \!* &") ; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 jobs >! $HOME/.jobs; grep "$EMACS_PATTERN" < $HOME/.jobs >& /dev/null; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 @ isjob = ! $status; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 @ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 test -S ~/.emacs_server && emacsclient \!* \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]'
5491
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
33
06dd936cde16 Merge some stuff in lib-src
Ben Wing <ben@xemacs.org>
parents: 0
diff changeset
34 # arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4