aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorTom Tromey2012-12-17 07:56:22 -0700
committerTom Tromey2012-12-17 07:56:22 -0700
commit3d6eced1ae51ffd0a782130e7c334052277e2724 (patch)
tree5d1d2ad7cd3374f922886c4a72062511a035c168 /admin
parentbf69f522a9e135f9aa483cedd53e71e915f2bf75 (diff)
parent7c3d167f48d6262ee4e5512aa50a07ee96bc1509 (diff)
downloademacs-3d6eced1ae51ffd0a782130e7c334052277e2724.tar.gz
emacs-3d6eced1ae51ffd0a782130e7c334052277e2724.zip
merge from trunk
Diffstat (limited to 'admin')
-rw-r--r--admin/CPP-DEFINES42
-rw-r--r--admin/ChangeLog198
-rw-r--r--admin/admin.el164
-rw-r--r--admin/charsets/Makefile127
-rw-r--r--admin/charsets/gb180302.awk21
-rwxr-xr-xadmin/charsets/mapconv13
-rw-r--r--admin/charsets/mapfiles/MULE-ethiopic.map2
-rw-r--r--admin/charsets/mapfiles/MULE-ipa.map2
-rw-r--r--admin/charsets/mapfiles/MULE-is13194.map2
-rw-r--r--admin/charsets/mapfiles/MULE-lviscii.map2
-rw-r--r--admin/charsets/mapfiles/MULE-sisheng.map2
-rw-r--r--admin/charsets/mapfiles/MULE-tibetan.map2
-rw-r--r--admin/charsets/mapfiles/MULE-uviscii.map2
-rw-r--r--admin/grammars/README4
-rw-r--r--admin/grammars/bovine-grammar.el519
-rw-r--r--admin/grammars/c.by15
-rw-r--r--admin/grammars/grammar.wy12
-rw-r--r--admin/grammars/java-tags.wy12
-rw-r--r--admin/grammars/js.wy1
-rw-r--r--admin/grammars/make.by1
-rw-r--r--admin/grammars/python.wy64
-rw-r--r--admin/grammars/scheme.by1
-rw-r--r--admin/grammars/srecode-template.wy67
-rw-r--r--admin/grammars/wisent-grammar.el537
-rw-r--r--admin/make-tarball.txt3
-rwxr-xr-xadmin/merge-gnulib23
-rw-r--r--admin/notes/bugtracker43
-rw-r--r--admin/notes/copyright4
-rw-r--r--admin/unidata/BidiMirroring.txt21
-rw-r--r--admin/unidata/UnicodeData.txt9
30 files changed, 582 insertions, 1333 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index be73d1a9bf5..393cf56e993 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -9,7 +9,6 @@ documented in config.in, and this file would not be necessary.
9 9
10AIX 10AIX
11_AIX 11_AIX
12BSD4_2
13BSD_SYSTEM 12BSD_SYSTEM
14CYGWIN Compiling the Cygwin port. 13CYGWIN Compiling the Cygwin port.
15__CYGWIN__ Ditto 14__CYGWIN__ Ditto
@@ -86,15 +85,9 @@ anymore, so they can be removed.
86AMPERSAND_FULL_NAME 85AMPERSAND_FULL_NAME
87BROKEN_DATAGRAM_SOCKETS 86BROKEN_DATAGRAM_SOCKETS
88BROKEN_FIONREAD 87BROKEN_FIONREAD
89BROKEN_GETWD
90BROKEN_GET_CURRENT_DIR_NAME 88BROKEN_GET_CURRENT_DIR_NAME
91BROKEN_NON_BLOCKING_CONNECT 89BROKEN_NON_BLOCKING_CONNECT
92BROKEN_PTY_READ_AFTER_EAGAIN 90BROKEN_PTY_READ_AFTER_EAGAIN
93BROKEN_SA_RESTART
94BROKEN_SIGAIO
95BROKEN_SIGIO
96BROKEN_SIGPOLL
97BROKEN_SIGPTY
98CLASH_DETECTION 91CLASH_DETECTION
99DATA_SEG_BITS 92DATA_SEG_BITS
100DATA_START 93DATA_START
@@ -107,7 +100,6 @@ EMACS_CONFIGURATION
107EMACS_CONFIG_OPTIONS 100EMACS_CONFIG_OPTIONS
108EMACS_INT 101EMACS_INT
109EMACS_UINT 102EMACS_UINT
110FLOAT_CHECK_DOMAIN
111GC_MARK_SECONDARY_STACK 103GC_MARK_SECONDARY_STACK
112GC_MARK_STACK 104GC_MARK_STACK
113GC_SETJMP_WORKS 105GC_SETJMP_WORKS
@@ -121,12 +113,10 @@ HAVE_ATTRIBUTE_ALIGNED
121HAVE_BDFFONT 113HAVE_BDFFONT
122HAVE_BOXES 114HAVE_BOXES
123HAVE_C99_STRTOLD 115HAVE_C99_STRTOLD
124HAVE_CBRT
125HAVE_CFMAKERAW 116HAVE_CFMAKERAW
126HAVE_CFSETSPEED 117HAVE_CFSETSPEED
127HAVE_CLOCK_GETTIME 118HAVE_CLOCK_GETTIME
128HAVE_CLOCK_SETTIME 119HAVE_CLOCK_SETTIME
129HAVE_CLOSEDIR
130HAVE_COFF_H 120HAVE_COFF_H
131HAVE_COM_ERR_H 121HAVE_COM_ERR_H
132HAVE_COPYSIGN 122HAVE_COPYSIGN
@@ -151,19 +141,14 @@ HAVE_DES_H
151HAVE_DEV_PTMX 141HAVE_DEV_PTMX
152HAVE_DIALOGS 142HAVE_DIALOGS
153HAVE_DIFFTIME 143HAVE_DIFFTIME
154HAVE_DIRENT_H
155HAVE_DUP2 144HAVE_DUP2
156HAVE_ENDGRENT 145HAVE_ENDGRENT
157HAVE_ENDPWENT 146HAVE_ENDPWENT
158HAVE_ENVIRON_DECL 147HAVE_ENVIRON_DECL
159HAVE_EUIDACCESS 148HAVE_EUIDACCESS
160HAVE_FCNTL_H
161HAVE_FMOD
162HAVE_FORK 149HAVE_FORK
163HAVE_FPATHCONF
164HAVE_FREEIFADDRS 150HAVE_FREEIFADDRS
165HAVE_FREETYPE 151HAVE_FREETYPE
166HAVE_FREXP
167HAVE_FSEEKO 152HAVE_FSEEKO
168HAVE_FSYNC 153HAVE_FSYNC
169HAVE_FUTIMENS 154HAVE_FUTIMENS
@@ -172,7 +157,6 @@ HAVE_FUTIMESAT
172HAVE_GAI_STRERROR 157HAVE_GAI_STRERROR
173HAVE_GCONF 158HAVE_GCONF
174HAVE_GETADDRINFO 159HAVE_GETADDRINFO
175HAVE_GETCWD
176HAVE_GETDELIM 160HAVE_GETDELIM
177HAVE_GETGRENT 161HAVE_GETGRENT
178HAVE_GETHOSTNAME 162HAVE_GETHOSTNAME
@@ -189,7 +173,6 @@ HAVE_GETRLIMIT
189HAVE_GETRUSAGE 173HAVE_GETRUSAGE
190HAVE_GETSOCKNAME 174HAVE_GETSOCKNAME
191HAVE_GETTIMEOFDAY 175HAVE_GETTIMEOFDAY
192HAVE_GETWD
193HAVE_GET_CURRENT_DIR_NAME 176HAVE_GET_CURRENT_DIR_NAME
194HAVE_GHOSTSCRIPT 177HAVE_GHOSTSCRIPT
195HAVE_GIF 178HAVE_GIF
@@ -217,7 +200,6 @@ HAVE_IFADDRS_H
217HAVE_IMAGEMAGICK 200HAVE_IMAGEMAGICK
218HAVE_INET_SOCKETS 201HAVE_INET_SOCKETS
219HAVE_INTTYPES_H 202HAVE_INTTYPES_H
220HAVE_INVERSE_HYPERBOLIC
221HAVE_JPEG 203HAVE_JPEG
222HAVE_KERBEROSIV_DES_H 204HAVE_KERBEROSIV_DES_H
223HAVE_KERBEROSIV_KRB_H 205HAVE_KERBEROSIV_KRB_H
@@ -255,7 +237,6 @@ HAVE_LIBXMU
255HAVE_LINUX_VERSION_H 237HAVE_LINUX_VERSION_H
256HAVE_LOCALTIME_R 238HAVE_LOCALTIME_R
257HAVE_LOCAL_SOCKETS 239HAVE_LOCAL_SOCKETS
258HAVE_LOGB
259HAVE_LONG_FILE_NAMES 240HAVE_LONG_FILE_NAMES
260HAVE_LONG_LONG_INT 241HAVE_LONG_LONG_INT
261HAVE_LRAND48 242HAVE_LRAND48
@@ -277,7 +258,6 @@ HAVE_MEMSET
277HAVE_MENUS 258HAVE_MENUS
278HAVE_MKSTEMP 259HAVE_MKSTEMP
279HAVE_MMAP 260HAVE_MMAP
280HAVE_MOUSE
281HAVE_MULTILINGUAL_MENU 261HAVE_MULTILINGUAL_MENU
282HAVE_NANOTIME 262HAVE_NANOTIME
283HAVE_NET_IF_DL_H 263HAVE_NET_IF_DL_H
@@ -309,9 +289,7 @@ HAVE_SENDTO
309HAVE_SEQPACKET 289HAVE_SEQPACKET
310HAVE_SETITIMER 290HAVE_SETITIMER
311HAVE_SETLOCALE 291HAVE_SETLOCALE
312HAVE_SETPGID
313HAVE_SETRLIMIT 292HAVE_SETRLIMIT
314HAVE_SETSID
315HAVE_SHARED_GAME_DIR 293HAVE_SHARED_GAME_DIR
316HAVE_SHUTDOWN 294HAVE_SHUTDOWN
317HAVE_SIGNED_${GLTYPE} 295HAVE_SIGNED_${GLTYPE}
@@ -319,7 +297,6 @@ HAVE_SIGNED_SIG_ATOMIC_T
319HAVE_SIGNED_WCHAR_T 297HAVE_SIGNED_WCHAR_T
320HAVE_SIGNED_WINT_T 298HAVE_SIGNED_WINT_T
321HAVE_SIGSET_T 299HAVE_SIGSET_T
322HAVE_SIZE_T
323HAVE_SNPRINTF 300HAVE_SNPRINTF
324HAVE_SOCKETS 301HAVE_SOCKETS
325HAVE_SOUND 302HAVE_SOUND
@@ -384,7 +361,6 @@ HAVE_TM_ZONE
384HAVE_TOUCHLOCK 361HAVE_TOUCHLOCK
385HAVE_TZNAME 362HAVE_TZNAME
386HAVE_TZSET 363HAVE_TZSET
387HAVE_UNISTD_H
388HAVE_UNSIGNED_LONG_LONG_INT 364HAVE_UNSIGNED_LONG_LONG_INT
389HAVE_UTIL_H 365HAVE_UTIL_H
390HAVE_UTIMENSAT 366HAVE_UTIMENSAT
@@ -428,18 +404,12 @@ MAIL_USE_POP
428MAIL_USE_SYSTEM_LOCK 404MAIL_USE_SYSTEM_LOCK
429MAXPATHLEN 405MAXPATHLEN
430NLIST_STRUCT 406NLIST_STRUCT
431NO_ABORT
432NO_EDITRES 407NO_EDITRES
433NO_MATHERR
434NO_TERMIO
435NSIG 408NSIG
436NSIG_MINIMUM 409NSIG_MINIMUM
437NULL_DEVICE 410NULL_DEVICE
438ORDINARY_LINK 411ORDINARY_LINK
439O_RDONLY
440O_RDWR
441PAGESIZE 412PAGESIZE
442PENDING_OUTPUT_COUNT
443PREFER_VSUSP 413PREFER_VSUSP
444PTY_ITERATION 414PTY_ITERATION
445PTY_NAME_SPRINTF 415PTY_NAME_SPRINTF
@@ -447,17 +417,8 @@ PTY_OPEN
447PTY_TTY_NAME_SPRINTF 417PTY_TTY_NAME_SPRINTF
448PURESIZE 418PURESIZE
449RUN_TIME_REMAP 419RUN_TIME_REMAP
450SA_RESTART
451SETPGRP_RELEASES_CTTY
452SETUP_SLAVE_PTY 420SETUP_SLAVE_PTY
453SIGALRM
454SIGCHLD
455SIGHUP
456SIGKILL
457SIGNALS_VIA_CHARACTERS 421SIGNALS_VIA_CHARACTERS
458SIGPIPE
459SIGQUIT
460SIGTRAP
461STDC_HEADERS 422STDC_HEADERS
462SYSTEM_PURESIZE_EXTRA 423SYSTEM_PURESIZE_EXTRA
463SYSTEM_MALLOC 424SYSTEM_MALLOC
@@ -467,7 +428,6 @@ TERM
467TIME_WITH_SYS_TIME 428TIME_WITH_SYS_TIME
468TIOCSIGSEND 429TIOCSIGSEND
469TM_IN_SYS_TIME 430TM_IN_SYS_TIME
470ULIMIT_BREAK_VALUE
471UNIX98_PTYS 431UNIX98_PTYS
472USE_TOOLKIT_SCROLL_BARS 432USE_TOOLKIT_SCROLL_BARS
473USG_SUBTTY_WORKS 433USG_SUBTTY_WORKS
@@ -580,7 +540,6 @@ getpid
580isatty 540isatty
581kill 541kill
582link 542link
583logb
584lseek 543lseek
585mkdir 544mkdir
586mktemp 545mktemp
@@ -622,7 +581,6 @@ fopen
622getpid 581getpid
623index 582index
624isatty 583isatty
625logb
626lseek 584lseek
627mkdir 585mkdir
628mktemp 586mktemp
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 145028ec815..6a6b1bd8da6 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,201 @@
12012-12-14 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix permissions bugs with setgid directories etc. (Bug#13125)
4 * CPP-DEFINES (BSD4_2): Remove.
5
62012-12-08 Paul Eggert <eggert@cs.ucla.edu>
7
8 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
9 * merge-gnulib (GNULIB_MODULES): Add putenv, unsetenv.
10
11 Simplify get_lim_data.
12 * CPP-DEFINES (ULIMIT_BREAK_VALUE): Remove.
13
142012-12-03 Paul Eggert <eggert@cs.ucla.edu>
15
16 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
17 * CPP-DEFINES (SIGALRM, SIGCHLD, SIGHUP, SIGKILL, SIGPIPE, SIGQUIT):
18 Remove.
19 (SIGTRAP): Remove this one too, as config.h no longer defines it.
20 * merge-gnulib (GNULIB_MODULES): Add sig2str.
21
222012-11-24 Ken Brown <kbrown@cornell.edu>
23
24 * CPP-DEFINES (HAVE_MOUSE): Remove.
25
262012-11-23 Paul Eggert <eggert@cs.ucla.edu>
27
28 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
29 * CPP-DEFINES (HAVE_CLOSEDIR, HAVE_DIRENT_H): Remove.
30 * notes/copyright: Adjust to src/ndir.h -> nt/inc/dirent.h renaming.
31
322012-11-21 Paul Eggert <eggert@cs.ucla.edu>
33
34 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
35 * CPP-DEFINES (BROKEN_GETWD, HAVE_GETCWD, HAVE_GETWD, HAVE_SIZE_T)
36 (HAVE_UNISTD_H): Remove.
37
382012-11-17 Paul Eggert <eggert@cs.ucla.edu>
39
40 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
41 * CPP-DEFINES (O_RDONLY, O_RDWR, HAVE_FCNTL_H): Remove.
42 * merge-gnulib (GNULIB_MODULES): Add fcntl-h.
43
442012-11-16 Paul Eggert <eggert@cs.ucla.edu>
45
46 Remove no-longer-used pty_max_bytes variable.
47 * CPP-DEFINES (HAVE_FPATHCONF): Remove.
48
492012-11-14 Paul Eggert <eggert@cs.ucla.edu>
50
51 Use faccessat, not access, when checking file permissions (Bug#12632).
52 * merge-gnulib (GNULIB_MODULES): Add faccessat.
53 (GNULIB_TOOL_FLAGS): Avoid at-internal, fchdir, malloc-posix,
54 openat-die, openat-h, save-cwd. Do not avoid fcntl-h.
55 Omit gnulib's m4/fcntl-o.m4.
56
572012-11-05 Paul Eggert <eggert@cs.ucla.edu>
58
59 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
60 * CPP-DEFINES (HAVE_SETPGID, HAVE_SETSID, SETPGRP_RELEASES_CTTY):
61 Remove; obsolete.
62
63 Simplify by assuming __fpending.
64 * CPP-DEFINES (PENDING_OUTPUT_COUNT): Remove.
65
662012-11-03 Glenn Morris <rgm@gnu.org>
67
68 * admin.el (set-copyright): Add msdos/sed2v2.inp.
69
702012-11-01 Paul Eggert <eggert@cs.ucla.edu>
71
72 Fix data-loss with --batch (Bug#9574).
73 * merge-gnulib (GNULIB_MODULES): Add close-stream.
74
752012-10-12 Kenichi Handa <handa@gnu.org>
76
77 * charsets/Makefile (JISC6226.map): Add missing mappings.
78
792012-10-11 Kenichi Handa <handa@gnu.org>
80
81 * charsets/mapconv: Adjusted for the change of mapfiles/*.gz to
82 mapfiles/*.
83
84 * charsets/gb180302.awk: Handle 4-byte sequences in the input file.
85
86 * charsets/Makefile: Be sure to call mapconv script of the current
87 directory. Adjusted for the change of mapfiles/*.gz to
88 mapfiles/*.
89 (SED_SCRIPT): New variable.
90 (jisx2131-filter): New target.
91 (JISX2131.map): Use jisx2131-filter to filter out characters added
92 for the 2004 year version.
93 (clear): Remove ${SED_SCRIPT} too.
94
95 * charsets/mapfiles/MULE-ethiopic.map,
96 charsets/mapfiles/MULE-ipa.map,
97 charsets/mapfiles/MULE-is13194.map,
98 charsets/mapfiles/MULE-lviscii.map,
99 charsets/mapfiles/MULE-sisheng.map,
100 charsets/mapfiles/MULE-tibetan.map,
101 charsets/mapfiles/MULE-uviscii.map: Fix typo.
102
1032012-10-09 Glenn Morris <rgm@gnu.org>
104
105 * admin.el (cusver-scan-cus-start): New function.
106 (cusver-check): Scan old cus-start.el.
107
1082012-10-07 Glenn Morris <rgm@gnu.org>
109
110 * admin.el (cusver-new-version): Set default.
111 (cusver-check): Improve interactive argument reading.
112
1132012-10-06 Glenn Morris <rgm@gnu.org>
114
115 * admin.el (cusver-new-version): New variable.
116 (cusver-scan): Check if containing group has a :version.
117 (cusver-check): Add VERSION argument.
118
1192012-10-01 David Engster <deng@randomsample.de>
120
121 * grammars/bovine-grammar.el:
122 * grammars/wisent-grammar.el: Move to lisp directory.
123
1242012-10-01 David Engster <deng@randomsample.de>
125
126 * grammars/bovine-grammar.el (bovine--grammar-newstyle-unquote):
127 Remove.
128 (bovine-grammar-expand-form): Test for emacs-major-version.
129
130 * grammars/c.by: Add EXPLICIT to keyword tokens.
131
132 * grammars/f90.by: Add %provide token.
133
134 * grammar/grammar.wy (semantic-grammar-lexer): Remove, since it
135 was copied to grammar.el. New %provide token to generate prefix
136 which conforms with Emacs conventions. Remove lexer definition,
137 which is now in grammar.el.
138
1392012-09-27 Glenn Morris <rgm@gnu.org>
140
141 * admin.el (set-version): Set msdos.c's Vwindow_system_version.
142
1432012-09-27 Paul Eggert <eggert@cs.ucla.edu>
144
145 Check more robustly for timer_settime.
146 * merge-gnulib (GNULIB_MODULES): Add timer-time.
147
1482012-09-26 Juanma Barranquero <lekktu@gmail.com>
149
150 * unidata/BidiMirroring.txt:
151 * unidata/UnicodeData.txt: Update to Unicode 6.2.
152
1532012-09-17 Glenn Morris <rgm@gnu.org>
154
155 * admin.el (add-log-time-format): Declare.
156
157 * admin.el (cusver-scan, cusver-check): Bind local variables.
158
159 * admin.el (set-version): Set major version in
160 etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex.
161 (set-copyright): In etc/refcards, only change ru-refcard.tex
162 and emacsver.tex.
163
164 * admin.el (set-copyright): No more need to set copyrights for
165 nextstep, or .c files. Add configure.ac and config.nt.
166
1672012-09-16 Paul Eggert <eggert@cs.ucla.edu>
168
169 Remove configure's --without-sync-input option (Bug#12450).
170 * CPP-DEFINES (BROKEN_SA_RESTART, SA_RESTART): Remove.
171
1722012-09-16 Glenn Morris <rgm@gnu.org>
173
174 * admin.el (set-version): No more need to set nextstep versions.
175 (set-copyright): Update for moved nextstep files.
176
1772012-09-13 Paul Eggert <eggert@cs.ucla.edu>
178
179 Simplify SIGIO usage (Bug#12408).
180 * CPP_DEFINES (BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL)
181 (BROKEN_SIGPTY, NO_TERMIO): Remove.
182
1832012-09-11 Paul Eggert <eggert@cs.ucla.edu>
184
185 Simplify, document, and port floating-point (Bug#12381).
186 * CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove.
187
1882012-09-09 Paul Eggert <eggert@cs.ucla.edu>
189
190 Assume C89 or later for math functions (Bug#12381).
191 * CPP-DEFINES (HAVE_FMOD, HAVE_FREXP, FLOAT_CHECK_DOMAIN)
192 (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove.
193
1942012-09-04 Paul Eggert <eggert@cs.ucla.edu>
195
196 Simplify redefinition of 'abort' (Bug#12316).
197 * CPP-DEFINES (NO_ABORT): Remove.
198
12012-08-28 Glenn Morris <rgm@gnu.org> 1992012-08-28 Glenn Morris <rgm@gnu.org>
2 200
3 * bzrmerge.el (bzrmerge-merges): Allow unversioned files in the tree. 201 * bzrmerge.el (bzrmerge-merges): Allow unversioned files in the tree.
diff --git a/admin/admin.el b/admin/admin.el
index 6d729214bd0..ec78fb27865 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -26,6 +26,8 @@
26 26
27;;; Code: 27;;; Code:
28 28
29(defvar add-log-time-format) ; in add-log
30
29(defun add-release-logs (root version) 31(defun add-release-logs (root version)
30 "Add \"Version VERSION released.\" change log entries in ROOT. 32 "Add \"Version VERSION released.\" change log entries in ROOT.
31Root must be the root of an Emacs source tree." 33Root must be the root of an Emacs source tree."
@@ -126,39 +128,20 @@ Root must be the root of an Emacs source tree."
126 (set-version-in-file root "nt/emacsclient.rc" comma-space-version 128 (set-version-in-file root "nt/emacsclient.rc" comma-space-version
127 (rx (and "\"ProductVersion\"" (0+ space) ?, 129 (rx (and "\"ProductVersion\"" (0+ space) ?,
128 (0+ space) ?\" (submatch (1+ (in "0-9, "))) 130 (0+ space) ?\" (submatch (1+ (in "0-9, ")))
129 "\\0\"")))) 131 "\\0\"")))
130 ;; nextstep. 132 ;; Major version only.
131 (set-version-in-file 133 (when (string-match "\\([0-9]\\{2,\\}\\)" version)
132 root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" 134 (setq version (match-string 1 version))
133 version (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) 135 (set-version-in-file root "src/msdos.c" version
134 (submatch (1+ (in "0-9.")))))) 136 (rx (and "Vwindow_system_version" (1+ not-newline)
135 (set-version-in-file 137 ?\( (submatch (1+ (in "0-9"))) ?\))))
136 root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" 138 (set-version-in-file root "etc/refcards/ru-refcard.tex" version
137 version (rx (and "CFBundleShortVersionString" (1+ not-newline) ?\n 139 "\\\\newcommand{\\\\versionemacs}\\[0\\]\
138 (0+ not-newline) "<string>" (0+ space) 140{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs")
139 (submatch (1+ (in "0-9.")))))) 141 (set-version-in-file root "etc/refcards/emacsver.tex" version
140 (set-version-in-file 142 "\\\\def\\\\versionemacs\
141 root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" 143{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs"))))
142 version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space) 144
143 ?\" (0+ space) "Version" (1+ space)
144 (submatch (1+ (in "0-9."))))))
145 (set-version-in-file
146 root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings"
147 version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space)
148 ?\" (0+ space) "Emacs version" (1+ space)
149 (submatch (1+ (in "0-9."))))))
150 (set-version-in-file
151 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist"
152 version (rx (and "ApplicationRelease" (0+ space) ?= (0+ space)
153 ?\" (0+ space) (submatch (1+ (in "0-9."))))))
154 (set-version-in-file
155 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist"
156 version (rx (and "FullVersionID" (0+ space) ?= (0+ space)
157 ?\" (0+ space) "Emacs" (1+ space)
158 (submatch (1+ (in "0-9."))))))
159 (set-version-in-file
160 root "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop"
161 version (rx (and "Version=" (submatch (1+ (in "0-9.")))))))
162 145
163;; Note this makes some assumptions about form of short copyright. 146;; Note this makes some assumptions about form of short copyright.
164(defun set-copyright (root copyright) 147(defun set-copyright (root copyright)
@@ -172,45 +155,28 @@ Root must be the root of an Emacs source tree."
172 (format-time-string "%Y"))))) 155 (format-time-string "%Y")))))
173 (unless (file-exists-p (expand-file-name "src/emacs.c" root)) 156 (unless (file-exists-p (expand-file-name "src/emacs.c" root))
174 (error "%s doesn't seem to be the root of an Emacs source tree" root)) 157 (error "%s doesn't seem to be the root of an Emacs source tree" root))
175 (set-version-in-file root "src/emacs.c" copyright 158 (set-version-in-file root "configure.ac" copyright
176 (rx (and "emacs_copyright" (0+ (not (in ?\"))) 159 (rx (and bol "copyright" (0+ (not (in ?\")))
177 ?\" (submatch (1+ (not (in ?\")))) ?\")))
178 (set-version-in-file root "lib-src/ebrowse.c" copyright
179 (rx (and "emacs_copyright" (0+ (not (in ?\")))
180 ?\" (submatch (1+ (not (in ?\")))) ?\")))
181 (set-version-in-file root "lib-src/etags.c" copyright
182 (rx (and "emacs_copyright" (0+ (not (in ?\")))
183 ?\" (submatch (1+ (not (in ?\")))) ?\"))) 160 ?\" (submatch (1+ (not (in ?\")))) ?\")))
161 (set-version-in-file root "msdos/sed2v2.inp" copyright
162 (rx (and bol "/^#undef " (1+ not-newline)
163 "define COPYRIGHT" (1+ space)
164 ?\" (submatch (1+ (not (in ?\")))) ?\")))
165 (set-version-in-file root "nt/config.nt" copyright
166 (rx (and bol "#" (0+ blank) "define" (1+ blank)
167 "COPYRIGHT" (1+ blank)
168 ?\" (submatch (1+ (not (in ?\")))) ?\")))
184 (set-version-in-file root "lib-src/rcs2log" copyright 169 (set-version-in-file root "lib-src/rcs2log" copyright
185 (rx (and "Copyright" (0+ space) ?= (0+ space) 170 (rx (and "Copyright" (0+ space) ?= (0+ space)
186 ?\' (submatch (1+ nonl))))) 171 ?\' (submatch (1+ nonl)))))
187 ;; This one is a nuisance, as it needs to be split over two lines.
188 (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
189 ;; nextstep.
190 (set-version-in-file
191 root "nextstep/Cocoa/Emacs.base/Contents/Info.plist"
192 copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space)
193 (1+ (in "0-9.")) (1+ space)
194 (submatch (1+ (not (in ?\<)))))))
195 (set-version-in-file
196 root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings"
197 copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space)
198 ?\" (submatch (1+ (not (in ?\")))))))
199 (set-version-in-file
200 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist"
201 copyright (rx (and "Copyright" (0+ space) ?\= (0+ space)
202 ?\" (submatch (1+ (not (in ?\")))))))
203 (when (string-match "\\([0-9]\\{4\\}\\)" copyright) 172 (when (string-match "\\([0-9]\\{4\\}\\)" copyright)
204 (setq copyright (match-string 1 copyright)) 173 (setq copyright (match-string 1 copyright))
205 (dolist (file (directory-files (expand-file-name "etc/refcards" root) 174 (set-version-in-file root "etc/refcards/ru-refcard.tex" copyright
206 t "\\.tex\\'")) 175 "\\\\newcommand{\\\\cyear}\\[0\\]\
207 (unless (string-match "gnus-refcard\\.tex" file) 176{\\([0-9]\\{4\\}\\)}.+%.+copyright year")
208 (set-version-in-file 177 (set-version-in-file root "etc/refcards/emacsver.tex" copyright
209 root file copyright 178 "\\\\def\\\\year\
210 (concat (if (string-match "ru-refcard\\.tex" file) 179{\\([0-9]\\{4\\}\\)}.+%.+copyright year")))
211 "\\\\newcommand{\\\\cyear}\\[0\\]{"
212 "\\\\def\\\\year{")
213 "\\([0-9]\\{4\\}\\)}.+%.+copyright year"))))))
214 180
215;;; Various bits of magic for generating the web manuals 181;;; Various bits of magic for generating the web manuals
216 182
@@ -459,7 +425,7 @@ Also generate PostScript output in PS-DEST."
459 (setq done t)) 425 (setq done t))
460 (t 426 (t
461 (if (eobp) 427 (if (eobp)
462 (error "Parse error in %s" f)) 428 (error "Parse error in %s" f)) ; f is bound in manual-html-node
463 (unless open-td 429 (unless open-td
464 (setq done t)))) 430 (setq done t))))
465 (forward-line 1)))) 431 (forward-line 1))))
@@ -480,8 +446,10 @@ If optional OLD is non-nil, also include defvars."
480 )) 446 ))
481 "{}" "+")) 447 "{}" "+"))
482 448
483;; TODO if a defgroup with a version tag, apply to all customs in that 449(defvar cusver-new-version (format "%s.%s" emacs-major-version
484;; group (eg for new files). 450 (1+ emacs-minor-version))
451 "Version number that new defcustoms should have.")
452
485(defun cusver-scan (file &optional old) 453(defun cusver-scan (file &optional old)
486 "Scan FILE for `defcustom' calls. 454 "Scan FILE for `defcustom' calls.
487Return a list with elements of the form (VAR . VER), 455Return a list with elements of the form (VAR . VER),
@@ -490,8 +458,8 @@ a :version tag having value VER (may be nil).
490If optional argument OLD is non-nil, also scan for defvars." 458If optional argument OLD is non-nil, also scan for defvars."
491 (let ((m (format "Scanning %s..." file)) 459 (let ((m (format "Scanning %s..." file))
492 (re (format "^[ \t]*\\((def%s\\)[ \t\n]" 460 (re (format "^[ \t]*\\((def%s\\)[ \t\n]"
493 (if old "\\(?:custom\\|var\\)" "custom"))) 461 (if old "\\(custom\\|var\\)" "\\(custom\\|group\\)")))
494 alist var ver) 462 alist var ver form glist grp)
495 (message "%s" m) 463 (message "%s" m)
496 (with-temp-buffer 464 (with-temp-buffer
497 (insert-file-contents file) 465 (insert-file-contents file)
@@ -499,15 +467,42 @@ If optional argument OLD is non-nil, also scan for defvars."
499 (while (re-search-forward re nil t) 467 (while (re-search-forward re nil t)
500 (goto-char (match-beginning 1)) 468 (goto-char (match-beginning 1))
501 (if (and (setq form (ignore-errors (read (current-buffer)))) 469 (if (and (setq form (ignore-errors (read (current-buffer))))
502 (setq var (car-safe (cdr-safe form))) 470 (setq var (car-safe (cdr-safe form)))
503 ;; Exclude macros, eg (defcustom ,varname ...). 471 ;; Exclude macros, eg (defcustom ,varname ...).
504 (symbolp var)) 472 (symbolp var))
505 (setq ver (car (cdr-safe (memq :version form))) 473 (progn
506 alist (cons (cons var ver) alist)) 474 (setq ver (car (cdr-safe (memq :version form))))
475 (if (equal "group" (match-string 2))
476 ;; Group :version could be old.
477 (if (equal ver cusver-new-version)
478 (setq glist (cons (cons var ver) glist)))
479 ;; If it specifies a group and the whole group has a
480 ;; version. use that.
481 (unless ver
482 (setq grp (car (cdr-safe (memq :group form))))
483 (and grp
484 (setq grp (car (cdr-safe grp))) ; (quote foo) -> foo
485 (setq ver (assq grp glist))))
486 (setq alist (cons (cons var ver) alist))))
507 (if form (message "Malformed defcustom: `%s'" form))))) 487 (if form (message "Malformed defcustom: `%s'" form)))))
508 (message "%sdone" m) 488 (message "%sdone" m)
509 alist)) 489 alist))
510 490
491(defun cusver-scan-cus-start (file)
492 "Scan cus-start.el and return an alist with elements (VAR . VER)."
493 (if (file-readable-p file)
494 (with-temp-buffer
495 (insert-file-contents file)
496 (when (search-forward "(let ((all '(" nil t)
497 (backward-char 1)
498 (let (var ver alist)
499 (dolist (elem (ignore-errors (read (current-buffer))))
500 (when (symbolp (setq var (car-safe elem)))
501 (or (stringp (setq ver (nth 3 elem)))
502 (setq ver nil))
503 (setq alist (cons (cons var ver) alist))))
504 alist)))))
505
511(define-button-type 'cusver-xref 'action #'cusver-goto-xref) 506(define-button-type 'cusver-xref 'action #'cusver-goto-xref)
512 507
513(defun cusver-goto-xref (button) 508(defun cusver-goto-xref (button)
@@ -523,12 +518,10 @@ If optional argument OLD is non-nil, also scan for defvars."
523 (pop-to-buffer (current-buffer)))))) 518 (pop-to-buffer (current-buffer))))))
524 519
525;; You should probably at least do a grep over the old directory 520;; You should probably at least do a grep over the old directory
526;; to check the results of this look sensible. Eg cus-start if 521;; to check the results of this look sensible.
527;; something moved from C to Lisp. 522;; TODO Check cus-start if something moved from C to Lisp.
528;; TODO handle renamed things with aliases to the old names. 523;; TODO Handle renamed things with aliases to the old names.
529;; What to do about new files? Does everything in there need a :version, 524(defun cusver-check (newdir olddir version)
530;; or eg just the defgroup?
531(defun cusver-check (newdir olddir)
532 "Check that defcustoms have :version tags where needed. 525 "Check that defcustoms have :version tags where needed.
533NEWDIR is the current lisp/ directory, OLDDIR is that from the previous 526NEWDIR is the current lisp/ directory, OLDDIR is that from the previous
534release. A defcustom that is only in NEWDIR should have a :version 527release. A defcustom that is only in NEWDIR should have a :version
@@ -537,11 +530,16 @@ just converting a defvar to a defcustom does not require a :version bump.
537 530
538Note that a :version tag should also be added if the value of a defcustom 531Note that a :version tag should also be added if the value of a defcustom
539changes (in a non-trivial way). This function does not check for that." 532changes (in a non-trivial way). This function does not check for that."
540 (interactive "DNew Lisp directory: \nDOld Lisp directory: ") 533 (interactive (list (read-directory-name "New Lisp directory: ")
534 (read-directory-name "Old Lisp directory: ")
535 (number-to-string
536 (read-number "New version number: "
537 (string-to-number cusver-new-version)))))
541 (or (file-directory-p (setq newdir (expand-file-name newdir))) 538 (or (file-directory-p (setq newdir (expand-file-name newdir)))
542 (error "Directory `%s' not found" newdir)) 539 (error "Directory `%s' not found" newdir))
543 (or (file-directory-p (setq olddir (expand-file-name olddir))) 540 (or (file-directory-p (setq olddir (expand-file-name olddir)))
544 (error "Directory `%s' not found" olddir)) 541 (error "Directory `%s' not found" olddir))
542 (setq cusver-new-version version)
545 (let* ((newfiles (progn (message "Finding new files with defcustoms...") 543 (let* ((newfiles (progn (message "Finding new files with defcustoms...")
546 (cusver-find-files newdir))) 544 (cusver-find-files newdir)))
547 (oldfiles (progn (message "Finding old files with defcustoms...") 545 (oldfiles (progn (message "Finding old files with defcustoms...")
@@ -550,10 +548,12 @@ changes (in a non-trivial way). This function does not check for that."
550 (mapcar 548 (mapcar
551 (lambda (file) 549 (lambda (file)
552 (cons file (cusver-scan file))) newfiles))) 550 (cons file (cusver-scan file))) newfiles)))
553 oldcus result thisfile) 551 oldcus result thisfile file)
554 (message "Reading old defcustoms...") 552 (message "Reading old defcustoms...")
555 (dolist (file oldfiles) 553 (dolist (file oldfiles)
556 (setq oldcus (append oldcus (cusver-scan file t)))) 554 (setq oldcus (append oldcus (cusver-scan file t))))
555 (setq oldcus (append oldcus (cusver-scan-cus-start
556 (expand-file-name "cus-start.el" olddir))))
557 ;; newcus has elements (FILE (VAR VER) ... ). 557 ;; newcus has elements (FILE (VAR VER) ... ).
558 ;; oldcus just (VAR . VER). 558 ;; oldcus just (VAR . VER).
559 (message "Checking for version tags...") 559 (message "Checking for version tags...")
diff --git a/admin/charsets/Makefile b/admin/charsets/Makefile
index b16e7ccd748..e5cf2508d85 100644
--- a/admin/charsets/Makefile
+++ b/admin/charsets/Makefile
@@ -77,6 +77,7 @@ MULE = MULE-ethiopic.map MULE-ipa.map MULE-is13194.map \
77 MULE-lviscii.map MULE-uviscii.map 77 MULE-lviscii.map MULE-uviscii.map
78 78
79TRANS_TABLE = cp51932.el eucjp-ms.el 79TRANS_TABLE = cp51932.el eucjp-ms.el
80SED_SCRIPT = jisx2131-filter
80 81
81all: ${CHARSETS} ${TRANS_TABLE} 82all: ${CHARSETS} ${TRANS_TABLE}
82 83
@@ -86,11 +87,11 @@ AWK = gawk
86 87
87VSCII.map: ${GLIBC_CHARMAPS}/TCVN5712-1.gz mapconv compact.awk 88VSCII.map: ${GLIBC_CHARMAPS}/TCVN5712-1.gz mapconv compact.awk
88 # Generating $@... 89 # Generating $@...
89 @mapconv $< '/^<.*[ ]\/x[0-9a-f].[ ]/' GLIBC-1 compact.awk > $@ 90 @./mapconv $< '/^<.*[ ]\/x[0-9a-f].[ ]/' GLIBC-1 compact.awk > $@
90 91
91VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1.gz mapconv compact.awk 92VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1.gz mapconv compact.awk
92 # Generating $@... 93 # Generating $@...
93 @mapconv $< '/^<.*[ ]\/x[2-7a-f].[ ]/' GLIBC-1 compact.awk \ 94 @./mapconv $< '/^<.*[ ]\/x[2-7a-f].[ ]/' GLIBC-1 compact.awk \
94 | sed 's/0x20-0x7F.*/0x00-0x7F 0x0000/' > $@ 95 | sed 's/0x20-0x7F.*/0x00-0x7F 0x0000/' > $@
95 96
96ALTERNATIVNYJ.map: IBM866.map 97ALTERNATIVNYJ.map: IBM866.map
@@ -110,45 +111,45 @@ ALTERNATIVNYJ.map: IBM866.map
110 -e '/0xFA/ s/ .*/ 0x00B1/' \ 111 -e '/0xFA/ s/ .*/ 0x00B1/' \
111 -e '/0xFB/ s/ .*/ 0x00F7/' < $< >> $@ 112 -e '/0xFB/ s/ .*/ 0x00F7/' < $< >> $@
112 113
113MIK.map: mapfiles/bulgarian-mik.txt.gz mapconv compact.awk 114MIK.map: mapfiles/bulgarian-mik.txt mapconv compact.awk
114 # Generating $@... 115 # Generating $@...
115 @mapconv $< '1,$$' CZYBORRA compact.awk > $@ 116 @./mapconv $< '1,$$' CZYBORRA compact.awk > $@
116 117
117PTCP154.map: mapfiles/PTCP154.gz mapconv compact.awk 118PTCP154.map: mapfiles/PTCP154 mapconv compact.awk
118 # Generating $@... 119 # Generating $@...
119 @mapconv $< '/^0x/' IANA compact.awk > $@ 120 @./mapconv $< '/^0x/' IANA compact.awk > $@
120 121
121stdenc.map: mapfiles/stdenc.txt.gz mapconv compact.awk 122stdenc.map: mapfiles/stdenc.txt mapconv compact.awk
122 # Generating $@... 123 # Generating $@...
123 @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@ 124 @./mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@
124 125
125symbol.map: mapfiles/symbol.txt.gz mapconv compact.awk 126symbol.map: mapfiles/symbol.txt mapconv compact.awk
126 # Generating $@... 127 # Generating $@...
127 @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@ 128 @./mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@
128 129
129CP720.map: mapfiles/CP720.map.gz 130CP720.map: mapfiles/CP720.map
130 # Generating $@... 131 # Generating $@...
131 @zcat $< > $@ 132 @cp $< $@
132 133
133CP858.map: mapfiles/CP858.map.gz 134CP858.map: mapfiles/CP858.map
134 # Generating $@... 135 # Generating $@...
135 @zcat $< > $@ 136 @cp $< $@
136 137
137CP949-2BYTE.map: ${GLIBC_CHARMAPS}/CP949.gz mapconv compact.awk 138CP949-2BYTE.map: ${GLIBC_CHARMAPS}/CP949.gz mapconv compact.awk
138 # Generating $@... 139 # Generating $@...
139 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ 140 @./mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
140 141
141GB2312.map: ${GLIBC_CHARMAPS}/GB2312.gz mapconv compact.awk 142GB2312.map: ${GLIBC_CHARMAPS}/GB2312.gz mapconv compact.awk
142 # Generating $@... 143 # Generating $@...
143 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ 144 @./mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
144 145
145GBK.map: ${GLIBC_CHARMAPS}/GBK.gz mapconv compact.awk 146GBK.map: ${GLIBC_CHARMAPS}/GBK.gz mapconv compact.awk
146 # Generating $@... 147 # Generating $@...
147 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ 148 @./mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
148 149
149GB180302.map: ${GLIBC_CHARMAPS}/GB18030.gz mapconv gb180302.awk 150GB180302.map: ${GLIBC_CHARMAPS}/GB18030.gz mapconv gb180302.awk
150 # Generating $@... 151 # Generating $@...
151 @mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' GLIBC-2 gb180302.awk > $@ 152 @./mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' GLIBC-2 gb180302.awk > $@
152 153
153GB180304.map: GB180302.map gb180304.awk 154GB180304.map: GB180302.map gb180304.awk
154 # Generating $@... 155 # Generating $@...
@@ -156,35 +157,39 @@ GB180304.map: GB180302.map gb180304.awk
156 157
157JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201.gz mapconv compact.awk 158JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201.gz mapconv compact.awk
158 # Generating $@... 159 # Generating $@...
159 @mapconv $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 compact.awk > $@ 160 @./mapconv $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 compact.awk > $@
160 @echo "# Generated by hand" >> $@ 161 @echo "# Generated by hand" >> $@
161 @echo "0xA1-0xDF 0xFF61" >> $@ 162 @echo "0xA1-0xDF 0xFF61" >> $@
162 163
163JISX0208.map: ${GLIBC_CHARMAPS}/EUC-JP.gz mapconv 164JISX0208.map: ${GLIBC_CHARMAPS}/EUC-JP.gz mapconv
164 # Generating $@... 165 # Generating $@...
165 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \ 166 @./mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \
166 | sed 's/0x2015/0x2014/' > $@ 167 | sed 's/0x2015/0x2014/' > $@
167 168
168JISX0212.map: ${GLIBC_CHARMAPS}/EUC-JP.gz mapconv compact.awk 169JISX0212.map: ${GLIBC_CHARMAPS}/EUC-JP.gz mapconv compact.awk
169 # Generating $@... 170 # Generating $@...
170 @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 compact.awk > $@ 171 @./mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 compact.awk > $@
171 172
172JISX2131.map: ${GLIBC_CHARMAPS}/EUC-JISX0213.gz mapconv 173jisx2131-filter: mapfiles/JISX213A.map
174 @sed -n -e '/^#/d' -e 's,.*0x\([0-9A-Z]*\)$$,/0x0*\1$$/d,p' < $< > $@
175
176JISX2131.map: ${GLIBC_CHARMAPS}/EUC-JISX0213.gz mapconv jisx2131-filter
173 # Generating $@... 177 # Generating $@...
174 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \ 178 @./mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \
179 | sed -f jisx2131-filter \
175 | sed -e 's/0x2015/0x2014/' -e 's/0x2299/0x29BF/' > $@ 180 | sed -e 's/0x2015/0x2014/' -e 's/0x2299/0x29BF/' > $@
176 181
177JISX2132.map: ${GLIBC_CHARMAPS}/EUC-JISX0213.gz mapconv 182JISX2132.map: ${GLIBC_CHARMAPS}/EUC-JISX0213.gz mapconv
178 # Generating $@... 183 # Generating $@...
179 @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 > $@ 184 @./mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 > $@
180 185
181JISX213A.map: mapfiles/JISX213A.map.gz 186JISX213A.map: mapfiles/JISX213A.map
182 # Generating $@ 187 # Generating $@
183 @zcat $< > $@ 188 @cp $< $@
184 189
185CP932-2BYTE.map: mapfiles/CP932.TXT.gz mapconv cp932.awk 190CP932-2BYTE.map: mapfiles/CP932.TXT mapconv cp932.awk
186 # Generating $@... 191 # Generating $@...
187 @mapconv $< '/^0x[89A-F][0-9A-F][0-9A-F]/' UNICODE2 cp932.awk > $@ 192 @./mapconv $< '/^0x[89A-F][0-9A-F][0-9A-F]/' UNICODE2 cp932.awk > $@
188 193
189cp51932.el: CP932-2BYTE.map cp51932.awk 194cp51932.el: CP932-2BYTE.map cp51932.awk
190 @$(AWK) -f cp51932.awk < CP932-2BYTE.map > $@ 195 @$(AWK) -f cp51932.awk < CP932-2BYTE.map > $@
@@ -192,17 +197,27 @@ cp51932.el: CP932-2BYTE.map cp51932.awk
192eucjp-ms.el: ${GLIBC_CHARMAPS}/EUC-JP-MS.gz eucjp-ms.awk 197eucjp-ms.el: ${GLIBC_CHARMAPS}/EUC-JP-MS.gz eucjp-ms.awk
193 @zcat $< | $(AWK) -f eucjp-ms.awk > $@ 198 @zcat $< | $(AWK) -f eucjp-ms.awk > $@
194 199
195JISC6226.map : mapfiles/Uni2JIS.gz mapconv kuten.awk 200JISC6226.map: mapfiles/Uni2JIS mapconv kuten.awk
196 # Generating $@... 201 # Generating $@...
197 @mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk > $@ 202# As Uni2JIS doesn't contain mappings of characters added to Unicode
203# recently, we add them manually here (including one correction for
204# U+005C vs U+FF3C). These changes are based on bogytech's blog at
205# http://bogytech.blogspot.jp/search/label/emacs.
206 @./mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk \
207 | sed -e '/0x2140/s/005C/FF3C/' \
208 -e '$$ a 0x3442 0x3D4E' \
209 -e '$$ a 0x374E 0x25874' \
210 -e '$$ a 0x3764 0x28EF6' \
211 -e '$$ a 0x513D 0x2F80F' \
212 -e '$$ a 0x7045 0x9724' > $@
198 213
199KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR.gz mapconv compact.awk 214KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR.gz mapconv compact.awk
200 # Generating $@... 215 # Generating $@...
201 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ 216 @./mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
202 217
203BIG5.map: ${GLIBC_CHARMAPS}/BIG5.gz mapconv compact.awk 218BIG5.map: ${GLIBC_CHARMAPS}/BIG5.gz mapconv compact.awk
204 # Generating $@... 219 # Generating $@...
205 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2 > $@ 220 @./mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2 > $@
206 221
207BIG5-1.map: BIG5.map mapconv big5.awk 222BIG5-1.map: BIG5.map mapconv big5.awk
208 # Generating $@... 223 # Generating $@...
@@ -216,52 +231,52 @@ BIG5-2.map: BIG5.map mapconv big5.awk
216 231
217BIG5-HKSCS.map: ${GLIBC_CHARMAPS}/BIG5-HKSCS.gz mapconv compact.awk 232BIG5-HKSCS.map: ${GLIBC_CHARMAPS}/BIG5-HKSCS.gz mapconv compact.awk
218 # Generating $@... 233 # Generating $@...
219 @mapconv $< '/^<.*[ ]\/x[89a-f].\//' GLIBC-2 compact.awk > $@ 234 @./mapconv $< '/^<.*[ ]\/x[89a-f].\//' GLIBC-2 compact.awk > $@
220 235
221JOHAB.map: ${GLIBC_CHARMAPS}/JOHAB.gz mapconv compact.awk 236JOHAB.map: ${GLIBC_CHARMAPS}/JOHAB.gz mapconv compact.awk
222 # Generating $@... 237 # Generating $@...
223 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ 238 @./mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
224 239
225CNS-1.map: ${GLIBC_CHARMAPS}/EUC-TW.gz mapconv compact.awk 240CNS-1.map: ${GLIBC_CHARMAPS}/EUC-TW.gz mapconv compact.awk
226 # Generating $@... 241 # Generating $@...
227 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ 242 @./mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
228 243
229# CNS-1.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk 244# CNS-1.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
230# # Generating $@... 245# # Generating $@...
231# @mapconv $< '/^C1/' KANJI-DATABASE compact.awk > $@ 246# @./mapconv $< '/^C1/' KANJI-DATABASE compact.awk > $@
232 247
233CNS-2.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk 248CNS-2.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
234 # Generating $@... 249 # Generating $@...
235 @mapconv $< '/^C2/' KANJI-DATABASE compact.awk > $@ 250 @./mapconv $< '/^C2/' KANJI-DATABASE compact.awk > $@
236 251
237CNS-3.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk 252CNS-3.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
238 # Generating $@... 253 # Generating $@...
239 @mapconv $< '/^C3/' KANJI-DATABASE compact.awk > $@ 254 @./mapconv $< '/^C3/' KANJI-DATABASE compact.awk > $@
240 255
241CNS-4.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk 256CNS-4.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
242 # Generating $@... 257 # Generating $@...
243 @mapconv $< '/^C4/' KANJI-DATABASE compact.awk > $@ 258 @./mapconv $< '/^C4/' KANJI-DATABASE compact.awk > $@
244 259
245CNS-5.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk 260CNS-5.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
246 # Generating $@... 261 # Generating $@...
247 @mapconv $< '/^C5/' KANJI-DATABASE compact.awk > $@ 262 @./mapconv $< '/^C5/' KANJI-DATABASE compact.awk > $@
248 263
249CNS-6.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk 264CNS-6.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
250 # Generating $@... 265 # Generating $@...
251 @mapconv $< '/^C6/' KANJI-DATABASE compact.awk > $@ 266 @./mapconv $< '/^C6/' KANJI-DATABASE compact.awk > $@
252 267
253CNS-7.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk 268CNS-7.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
254 # Generating $@... 269 # Generating $@...
255 @mapconv $< '/^C7/' KANJI-DATABASE compact.awk > $@ 270 @./mapconv $< '/^C7/' KANJI-DATABASE compact.awk > $@
256 271
257CNS-F.map: ${GLIBC_CHARMAPS}/EUC-TW.gz mapconv compact.awk 272CNS-F.map: ${GLIBC_CHARMAPS}/EUC-TW.gz mapconv compact.awk
258 # Generating $@... 273 # Generating $@...
259 @mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' GLIBC-2-7 compact.awk > $@ 274 @./mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' GLIBC-2-7 compact.awk > $@
260 275
261# General target to produce map files for mule charsets. 276# General target to produce map files for mule charsets.
262MULE-%.map: mapfiles/MULE-%.map.gz 277MULE-%.map: mapfiles/MULE-%.map
263 # Generating $@... 278 # Generating $@...
264 @zcat $< > $@ 279 @cp $< $@
265 280
266# General target to produce map files for ISO-8859, GEORGIAN, and 281# General target to produce map files for ISO-8859, GEORGIAN, and
267# EBCDIC charsets. We can not use the original file name because of 282# EBCDIC charsets. We can not use the original file name because of
@@ -269,21 +284,21 @@ MULE-%.map: mapfiles/MULE-%.map.gz
269 284
2708859-%.map: ${GLIBC_CHARMAPS}/ISO-8859-%.gz mapconv compact.awk 2858859-%.map: ${GLIBC_CHARMAPS}/ISO-8859-%.gz mapconv compact.awk
271 # Generating $@... 286 # Generating $@...
272 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ 287 @./mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
273 288
274KA-%.map: ${GLIBC_CHARMAPS}/GEORGIAN-%.gz mapconv compact.awk 289KA-%.map: ${GLIBC_CHARMAPS}/GEORGIAN-%.gz mapconv compact.awk
275 # Generating $@... 290 # Generating $@...
276 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ 291 @./mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
277 292
278EBCDIC%.map: ${GLIBC_CHARMAPS}/EBCDIC-%.gz mapconv compact.awk 293EBCDIC%.map: ${GLIBC_CHARMAPS}/EBCDIC-%.gz mapconv compact.awk
279 # Generating $@... 294 # Generating $@...
280 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ 295 @./mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
281 296
282# General target to produce map files for single-byte charsets. 297# General target to produce map files for single-byte charsets.
283 298
284%.map: ${GLIBC_CHARMAPS}/%.gz mapconv compact.awk 299%.map: ${GLIBC_CHARMAPS}/%.gz mapconv compact.awk
285 # Generating $@... 300 # Generating $@...
286 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ 301 @./mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
287 302
288install: 303install:
289 @for f in ${CHARSETS}; do \ 304 @for f in ${CHARSETS}; do \
@@ -305,5 +320,5 @@ install:
305 320
306# Clear files that are automatically generated. 321# Clear files that are automatically generated.
307clean: 322clean:
308 rm -f ${CHARSETS} ${TRANS_TABLE} 323 rm -f ${CHARSETS} ${TRANS_TABLE} ${SED_SCRIPT}
309 324
diff --git a/admin/charsets/gb180302.awk b/admin/charsets/gb180302.awk
index 6cd9521ce90..40d92bf9be4 100644
--- a/admin/charsets/gb180302.awk
+++ b/admin/charsets/gb180302.awk
@@ -74,19 +74,30 @@ function index_to_gb(idx) {
74 74
75{ 75{
76 gb = gb_to_index(decode_hex(substr($1, 3, 4))); 76 gb = gb_to_index(decode_hex(substr($1, 3, 4)));
77 unicode = decode_hex(substr($2, 3, 4)); 77 unicode = decode_hex(substr($2, 3));
78 if ((gb == to_gb + 1) && (unicode == to_unicode + 1)) 78 if ((gb == to_gb + 1) && (unicode == to_unicode + 1))
79 { 79 {
80 to_gb++; 80 to_gb++;
81 to_unicode++; 81 to_unicode++;
82 } 82 }
83 else 83 else if (gb > to_gb) # ignore the case gb == to_gb that is a duplication
84 { 84 {
85 if (from_gb == to_gb) 85 if (from_gb == to_gb)
86 printf "0x%04X 0x%04X\n", index_to_gb(from_gb), from_unicode; 86 {
87 if (from_unicode <= 65535)
88 printf "0x%04X 0x%04X\n", index_to_gb(from_gb), from_unicode;
89 else
90 printf "0x%04X 0x%08X\n", index_to_gb(from_gb), from_unicode;
91 }
87 else if (from_gb < to_gb) 92 else if (from_gb < to_gb)
88 printf "0x%04X-0x%04X 0x%04X\n", 93 {
89 index_to_gb(from_gb), index_to_gb(to_gb), from_unicode; 94 if (from_unicode <= 65535)
95 printf "0x%04X-0x%04X 0x%04X\n",
96 index_to_gb(from_gb), index_to_gb(to_gb), from_unicode;
97 else
98 printf "0x%04X-0x%04X 0x%08X\n",
99 index_to_gb(from_gb), index_to_gb(to_gb), from_unicode;
100 }
90 from_gb = to_gb = gb; 101 from_gb = to_gb = gb;
91 from_unicode = to_unicode = unicode; 102 from_unicode = to_unicode = unicode;
92 } 103 }
diff --git a/admin/charsets/mapconv b/admin/charsets/mapconv
index 4f7a8b96f54..8433d222b8d 100755
--- a/admin/charsets/mapconv
+++ b/admin/charsets/mapconv
@@ -98,18 +98,17 @@ elif [ "$3" = "GLIBC-2-7" ] ; then
98 | sed -e 's/xa/x2/g' -e 's/xb/x3/g' -e 's/xc/x4/g' \ 98 | sed -e 's/xa/x2/g' -e 's/xb/x3/g' -e 's/xc/x4/g' \
99 -e 's/xd/x5/g' -e 's/xe/x6/g' -e 's/xf/x7/g' \ 99 -e 's/xd/x5/g' -e 's/xe/x6/g' -e 's/xf/x7/g' \
100 -e 's,<U\([^>]*\)>[ ]*/x\(..\)/x\(..\).*,0x\2\3 0x\1,' \ 100 -e 's,<U\([^>]*\)>[ ]*/x\(..\)/x\(..\).*,0x\2\3 0x\1,' \
101 | tee temp \
102 | sort | ${AWKPROG} 101 | sort | ${AWKPROG}
103elif [ "$3" = "CZYBORRA" ] ; then 102elif [ "$3" = "CZYBORRA" ] ; then
104 # Source format is: 103 # Source format is:
105 # =XX U+YYYY 104 # =XX U+YYYY
106 zcat $1 | sed -n -e "$2 p" \ 105 sed -n -e "$2 p" < $1 \
107 | sed -e 's/=\(..\)[^U]*U+\([0-9A-F]*\).*/0x\1 0x\2/' \ 106 | sed -e 's/=\(..\)[^U]*U+\([0-9A-F]*\).*/0x\1 0x\2/' \
108 | sort | ${AWKPROG} 107 | sort | ${AWKPROG}
109elif [ "$3" = "IANA" ] ; then 108elif [ "$3" = "IANA" ] ; then
110 # Source format is: 109 # Source format is:
111 # 0xXX 0xYYYY 110 # 0xXX 0xYYYY
112 zcat $1 | sed -n -e "$2 p" \ 111 sed -n -e "$2 p" < $1 \
113 | sed -e 's/\(0x[0-9A-Fa-f]*\)[^0]*\(0x[0-9A-Fa-f]*\).*/\1 \2/' \ 112 | sed -e 's/\(0x[0-9A-Fa-f]*\)[^0]*\(0x[0-9A-Fa-f]*\).*/\1 \2/' \
114 | sort | ${AWKPROG} 113 | sort | ${AWKPROG}
115elif [ "$3" = "UNICODE" ] ; then 114elif [ "$3" = "UNICODE" ] ; then
@@ -117,25 +116,25 @@ elif [ "$3" = "UNICODE" ] ; then
117 # YYYY XX 116 # YYYY XX
118 # We perform reverse sort to prefer the first one in the 117 # We perform reverse sort to prefer the first one in the
119 # duplicated mappings (e.g. 0x20->U+0020, 0x20->U+00A0). 118 # duplicated mappings (e.g. 0x20->U+0020, 0x20->U+00A0).
120 zcat $1 | sed -n -e "$2 p" \ 119 sed -n -e "$2 p" < $1 \
121 | sed -e 's/\([0-9A-F]*\)[^0-9A-F]*\([0-9A-F]*\).*/0x\2 0x\1/' \ 120 | sed -e 's/\([0-9A-F]*\)[^0-9A-F]*\([0-9A-F]*\).*/0x\2 0x\1/' \
122 | sort -r 121 | sort -r
123elif [ "$3" = "UNICODE2" ] ; then 122elif [ "$3" = "UNICODE2" ] ; then
124 # Source format is: 123 # Source format is:
125 # 0xXXXX 0xYYYY # ... 124 # 0xXXXX 0xYYYY # ...
126 zcat $1 | sed -n -e "$2 p" \ 125 sed -n -e "$2 p" < $1 \
127 | sed -e 's/\([0-9A-Fx]*\)[^0]*\([0-9A-Fx]*\).*/\1 \2/' \ 126 | sed -e 's/\([0-9A-Fx]*\)[^0]*\([0-9A-Fx]*\).*/\1 \2/' \
128 | ${AWKPROG} | sort -n -k 4,4 127 | ${AWKPROG} | sort -n -k 4,4
129elif [ "$3" = "YASUOKA" ] ; then 128elif [ "$3" = "YASUOKA" ] ; then
130 # Source format is: 129 # Source format is:
131 # YYYY 0-XXXX (XXXX is a Kuten code) 130 # YYYY 0-XXXX (XXXX is a Kuten code)
132 zcat $1 | sed -n -e "$2 p" \ 131 sed -n -e "$2 p" < $1 \
133 | sed -e 's/\([0-9A-F]*\)[^0]*0-\([0-9]*\).*/0x\2 0x\1/' \ 132 | sed -e 's/\([0-9A-F]*\)[^0]*0-\([0-9]*\).*/0x\2 0x\1/' \
134 | sort | ${AWKPROG} 133 | sort | ${AWKPROG}
135elif [ "$3" = "KANJI-DATABASE" ] ; then 134elif [ "$3" = "KANJI-DATABASE" ] ; then
136 # Source format is: 135 # Source format is:
137 # C?-XXXX U+YYYYY ..... 136 # C?-XXXX U+YYYYY .....
138 zcat $1 | sed -n -e "$2 p" \ 137 sed -n -e "$2 p" < $1 \
139 | sed -e 's/...\(....\) U+\([0-9A-F]*\).*/0x\1 0x\2/' \ 138 | sed -e 's/...\(....\) U+\([0-9A-F]*\).*/0x\1 0x\2/' \
140 | sort | ${AWKPROG} 139 | sort | ${AWKPROG}
141else 140else
diff --git a/admin/charsets/mapfiles/MULE-ethiopic.map b/admin/charsets/mapfiles/MULE-ethiopic.map
index d2720bd10ba..30cf5736763 100644
--- a/admin/charsets/mapfiles/MULE-ethiopic.map
+++ b/admin/charsets/mapfiles/MULE-ethiopic.map
@@ -1,4 +1,4 @@
1# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. 1# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
20x2121 0x1200 20x2121 0x1200
30x2122 0x1201 30x2122 0x1201
40x2123 0x1202 40x2123 0x1202
diff --git a/admin/charsets/mapfiles/MULE-ipa.map b/admin/charsets/mapfiles/MULE-ipa.map
index 35e5d50ecec..0a6c61d5a95 100644
--- a/admin/charsets/mapfiles/MULE-ipa.map
+++ b/admin/charsets/mapfiles/MULE-ipa.map
@@ -1,4 +1,4 @@
1# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. 1# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
20x20 0x0069 20x20 0x0069
30x21 0x026A 30x21 0x026A
40x22 0x0065 40x22 0x0065
diff --git a/admin/charsets/mapfiles/MULE-is13194.map b/admin/charsets/mapfiles/MULE-is13194.map
index 1fa9b21dcf8..390132cd375 100644
--- a/admin/charsets/mapfiles/MULE-is13194.map
+++ b/admin/charsets/mapfiles/MULE-is13194.map
@@ -1,4 +1,4 @@
1# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. 1# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
20x21 0x0901 20x21 0x0901
30x22 0x0902 30x22 0x0902
40x23 0x0903 40x23 0x0903
diff --git a/admin/charsets/mapfiles/MULE-lviscii.map b/admin/charsets/mapfiles/MULE-lviscii.map
index 3b6a38be616..e4d2eca90ac 100644
--- a/admin/charsets/mapfiles/MULE-lviscii.map
+++ b/admin/charsets/mapfiles/MULE-lviscii.map
@@ -1,4 +1,4 @@
1# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. 1# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
20x21 0x1EAF 20x21 0x1EAF
30x22 0x1EB1 30x22 0x1EB1
40x23 0x1EB7 40x23 0x1EB7
diff --git a/admin/charsets/mapfiles/MULE-sisheng.map b/admin/charsets/mapfiles/MULE-sisheng.map
index 405bb1ffa2c..144a3ff5134 100644
--- a/admin/charsets/mapfiles/MULE-sisheng.map
+++ b/admin/charsets/mapfiles/MULE-sisheng.map
@@ -1,4 +1,4 @@
1# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. 1# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
20x21 0x0101 20x21 0x0101
30x22 0x00E1 30x22 0x00E1
40x23 0x01CE 40x23 0x01CE
diff --git a/admin/charsets/mapfiles/MULE-tibetan.map b/admin/charsets/mapfiles/MULE-tibetan.map
index 0d6ff3a0a39..b885585c094 100644
--- a/admin/charsets/mapfiles/MULE-tibetan.map
+++ b/admin/charsets/mapfiles/MULE-tibetan.map
@@ -1,4 +1,4 @@
1# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. 1# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
20x2130 0x0F00 20x2130 0x0F00
30x2131 0x0F01 30x2131 0x0F01
40x2132 0x0F02 40x2132 0x0F02
diff --git a/admin/charsets/mapfiles/MULE-uviscii.map b/admin/charsets/mapfiles/MULE-uviscii.map
index 65e5d2968e5..dc19583bdfe 100644
--- a/admin/charsets/mapfiles/MULE-uviscii.map
+++ b/admin/charsets/mapfiles/MULE-uviscii.map
@@ -1,4 +1,4 @@
1# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3. 1# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
20x21 0x1EAE 20x21 0x1EAE
30x22 0x1EB0 30x22 0x1EB0
40x23 0x1EB6 40x23 0x1EB6
diff --git a/admin/grammars/README b/admin/grammars/README
index 419797e0dcb..e38260952a5 100644
--- a/admin/grammars/README
+++ b/admin/grammars/README
@@ -3,8 +3,8 @@ generate the parser data in the lisp/semantic/bovine/ and
3lisp/semantic/wisent/ directories. You can run the parser generators 3lisp/semantic/wisent/ directories. You can run the parser generators
4with 4with
5 5
6emacs -batch -Q -l bovine-grammar.el -f bovine-make-parsers 6emacs -batch -Q -l semantic/bovine/grammar -f bovine-make-parsers
7emacs -batch -Q -l wisent-grammar.el -f wisent-make-parsers 7emacs -batch -Q -l semantic/wisent/grammar -f wisent-make-parsers
8 8
9Currently, the parser files in lisp/ are not generated directly from 9Currently, the parser files in lisp/ are not generated directly from
10these grammar files when making Emacs. This state of affairs, and the 10these grammar files when making Emacs. This state of affairs, and the
diff --git a/admin/grammars/bovine-grammar.el b/admin/grammars/bovine-grammar.el
deleted file mode 100644
index efe4db039c4..00000000000
--- a/admin/grammars/bovine-grammar.el
+++ /dev/null
@@ -1,519 +0,0 @@
1;;; bovine-grammar.el --- Bovine's input grammar mode
2;;
3;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
4;;
5;; Author: David Ponce <david@dponce.com>
6;; Maintainer: David Ponce <david@dponce.com>
7;; Created: 26 Aug 2002
8;; Keywords: syntax
9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software: you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation, either version 3 of the License, or
15;; (at your option) any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24
25;;; Commentary:
26;;
27;; Major mode for editing Bovine's input grammar (.by) files.
28
29;;; History:
30
31;;; Code:
32(require 'semantic)
33(require 'semantic/grammar)
34(require 'semantic/find)
35(require 'semantic/lex)
36(require 'semantic/wisent)
37(require 'semantic/bovine)
38
39(defun bovine-grammar-EXPAND (bounds nonterm)
40 "Expand call to EXPAND grammar macro.
41Return the form to parse from within a nonterminal between BOUNDS.
42NONTERM is the nonterminal symbol to start with."
43 `(semantic-bovinate-from-nonterminal
44 (car ,bounds) (cdr ,bounds) ',nonterm))
45
46(defun bovine-grammar-EXPANDFULL (bounds nonterm)
47 "Expand call to EXPANDFULL grammar macro.
48Return the form to recursively parse the area between BOUNDS.
49NONTERM is the nonterminal symbol to start with."
50 `(semantic-parse-region
51 (car ,bounds) (cdr ,bounds) ',nonterm 1))
52
53(defun bovine-grammar-TAG (name class &rest attributes)
54 "Expand call to TAG grammar macro.
55Return the form to create a generic semantic tag.
56See the function `semantic-tag' for the meaning of arguments NAME,
57CLASS and ATTRIBUTES."
58 `(semantic-tag ,name ,class ,@attributes))
59
60(defun bovine-grammar-VARIABLE-TAG (name type default-value &rest attributes)
61 "Expand call to VARIABLE-TAG grammar macro.
62Return the form to create a semantic tag of class variable.
63See the function `semantic-tag-new-variable' for the meaning of
64arguments NAME, TYPE, DEFAULT-VALUE and ATTRIBUTES."
65 `(semantic-tag-new-variable ,name ,type ,default-value ,@attributes))
66
67(defun bovine-grammar-FUNCTION-TAG (name type arg-list &rest attributes)
68 "Expand call to FUNCTION-TAG grammar macro.
69Return the form to create a semantic tag of class function.
70See the function `semantic-tag-new-function' for the meaning of
71arguments NAME, TYPE, ARG-LIST and ATTRIBUTES."
72 `(semantic-tag-new-function ,name ,type ,arg-list ,@attributes))
73
74(defun bovine-grammar-TYPE-TAG (name type members parents &rest attributes)
75 "Expand call to TYPE-TAG grammar macro.
76Return the form to create a semantic tag of class type.
77See the function `semantic-tag-new-type' for the meaning of arguments
78NAME, TYPE, MEMBERS, PARENTS and ATTRIBUTES."
79 `(semantic-tag-new-type ,name ,type ,members ,parents ,@attributes))
80
81(defun bovine-grammar-INCLUDE-TAG (name system-flag &rest attributes)
82 "Expand call to INCLUDE-TAG grammar macro.
83Return the form to create a semantic tag of class include.
84See the function `semantic-tag-new-include' for the meaning of
85arguments NAME, SYSTEM-FLAG and ATTRIBUTES."
86 `(semantic-tag-new-include ,name ,system-flag ,@attributes))
87
88(defun bovine-grammar-PACKAGE-TAG (name detail &rest attributes)
89 "Expand call to PACKAGE-TAG grammar macro.
90Return the form to create a semantic tag of class package.
91See the function `semantic-tag-new-package' for the meaning of
92arguments NAME, DETAIL and ATTRIBUTES."
93 `(semantic-tag-new-package ,name ,detail ,@attributes))
94
95(defun bovine-grammar-CODE-TAG (name detail &rest attributes)
96 "Expand call to CODE-TAG grammar macro.
97Return the form to create a semantic tag of class code.
98See the function `semantic-tag-new-code' for the meaning of arguments
99NAME, DETAIL and ATTRIBUTES."
100 `(semantic-tag-new-code ,name ,detail ,@attributes))
101
102(defun bovine-grammar-ALIAS-TAG (name aliasclass definition &rest attributes)
103 "Expand call to ALIAS-TAG grammar macro.
104Return the form to create a semantic tag of class alias.
105See the function `semantic-tag-new-alias' for the meaning of arguments
106NAME, ALIASCLASS, DEFINITION and ATTRIBUTES."
107 `(semantic-tag-new-alias ,name ,aliasclass ,definition ,@attributes))
108
109;; Cache of macro definitions currently in use.
110(defvar bovine--grammar-macros nil)
111
112;; Detect if we have an Emacs with newstyle unquotes allowed outside
113;; of backquote.
114;; This should probably be changed to a test to (= emacs-major-version 24)
115;; when it is released, but at the moment it might be possible that people
116;; are using an older snapshot.
117(defvar bovine--grammar-newstyle-unquote
118 (equal '(\, test) (read ",test")))
119
120(defun bovine-grammar-expand-form (form quotemode &optional inplace)
121 "Expand FORM into a new one suitable to the bovine parser.
122FORM is a list in which we are substituting.
123Argument QUOTEMODE is non-nil if we are in backquote mode.
124When non-nil, optional argument INPLACE indicates that FORM is being
125expanded from elsewhere."
126 (when (eq (car form) 'quote)
127 (setq form (cdr form))
128 (cond
129 ((and (= (length form) 1) (listp (car form)))
130 (insert "\n(append")
131 (bovine-grammar-expand-form (car form) quotemode nil)
132 (insert ")")
133 (setq form nil inplace nil)
134 )
135 ((and (= (length form) 1) (symbolp (car form)))
136 (insert "\n'" (symbol-name (car form)))
137 (setq form nil inplace nil)
138 )
139 (t
140 (insert "\n(list")
141 (setq inplace t)
142 )))
143 (let ((macro (assq (car form) bovine--grammar-macros))
144 inlist first n q x)
145 (if macro
146 (bovine-grammar-expand-form
147 (apply (cdr macro) (cdr form))
148 quotemode t)
149 (if inplace (insert "\n("))
150 (while form
151 (setq first (car form)
152 form (cdr form))
153 ;; Hack for dealing with new reading of unquotes outside of
154 ;; backquote (introduced in rev. 102591 in emacs-bzr).
155 (when (and bovine--grammar-newstyle-unquote
156 (listp first)
157 (or (equal (car first) '\,)
158 (equal (car first) '\,@)))
159 (if (listp (cadr first))
160 (setq form (append (cdr first) form)
161 first (car first))
162 (setq first (intern (concat (symbol-name (car first))
163 (symbol-name (cadr first)))))))
164 (cond
165 ((eq first nil)
166 (when (and (not inlist) (not inplace))
167 (insert "\n(list")
168 (setq inlist t))
169 (insert " nil")
170 )
171 ((listp first)
172 ;;(let ((fn (and (symbolp (caar form)) (fboundp (caar form)))))
173 (when (and (not inlist) (not inplace))
174 (insert "\n(list")
175 (setq inlist t))
176 ;;(if (and inplace (not fn) (not (eq (caar form) 'EXPAND)))
177 ;; (insert " (append"))
178 (bovine-grammar-expand-form
179 first quotemode t) ;;(and fn (not (eq fn 'quote))))
180 ;;(if (and inplace (not fn) (not (eq (caar form) 'EXPAND)))
181 ;; (insert ")"))
182 ;;)
183 )
184 ((symbolp first)
185 (setq n (symbol-name first) ;the name
186 q quotemode ;implied quote flag
187 x nil) ;expand flag
188 (if (eq (aref n 0) ?,)
189 (if quotemode
190 ;; backquote mode needs the @
191 (if (eq (aref n 1) ?@)
192 (setq n (substring n 2)
193 q nil
194 x t)
195 ;; non backquote mode behaves normally.
196 (setq n (substring n 1)
197 q nil))
198 (setq n (substring n 1)
199 x t)))
200 (if (string= n "")
201 (progn
202 ;; We expand only the next item in place (a list?)
203 ;; A regular inline-list...
204 (bovine-grammar-expand-form (car form) quotemode t)
205 (setq form (cdr form)))
206 (if (and (eq (aref n 0) ?$)
207 ;; Don't expand $ tokens in implied quote mode.
208 ;; This acts like quoting in other symbols.
209 (not q))
210 (progn
211 (cond
212 ((and (not x) (not inlist) (not inplace))
213 (insert "\n(list"))
214 ((and x inlist (not inplace))
215 (insert ")")
216 (setq inlist nil)))
217 (insert "\n(nth " (int-to-string
218 (1- (string-to-number
219 (substring n 1))))
220 " vals)")
221 (and (not x) (not inplace)
222 (setq inlist t)))
223
224 (when (and (not inlist) (not inplace))
225 (insert "\n(list")
226 (setq inlist t))
227 (or (char-equal (char-before) ?\()
228 (insert " "))
229 (insert (if (or inplace (eq first t))
230 "" "'")
231 n))) ;; " "
232 )
233 (t
234 (when (and (not inlist) (not inplace))
235 (insert "\n(list")
236 (setq inlist t))
237 (insert (format "\n%S" first))
238 )
239 ))
240 (if inlist (insert ")"))
241 (if inplace (insert ")")))
242 ))
243
244(defun bovine-grammar-expand-action (textform quotemode)
245 "Expand semantic action string TEXTFORM into Lisp code.
246QUOTEMODE is the mode in which quoted symbols are slurred."
247 (if (string= "" textform)
248 nil
249 (let ((sexp (read textform)))
250 ;; We converted the lambda string into a list. Now write it
251 ;; out as the bovine lambda expression, and do macro-like
252 ;; conversion upon it.
253 (insert "\n")
254 (cond
255 ((eq (car sexp) 'EXPAND)
256 (insert ",(lambda (vals start end)")
257 ;; The EXPAND macro definition is mandatory
258 (bovine-grammar-expand-form
259 (apply (cdr (assq 'EXPAND bovine--grammar-macros)) (cdr sexp))
260 quotemode t)
261 )
262 ((and (listp (car sexp)) (eq (caar sexp) 'EVAL))
263 ;; The user wants to evaluate the following args.
264 ;; Use a simpler expander
265 )
266 (t
267 (insert ",(semantic-lambda")
268 (bovine-grammar-expand-form sexp quotemode)
269 ))
270 (insert ")\n")))
271)
272
273(defun bovine-grammar-parsetable-builder ()
274 "Return the parser table expression as a string value.
275The format of a bovine parser table is:
276
277 ( ( NONTERMINAL-SYMBOL1 MATCH-LIST1 )
278 ( NONTERMINAL-SYMBOL2 MATCH-LIST2 )
279 ...
280 ( NONTERMINAL-SYMBOLn MATCH-LISTn )
281
282Where each NONTERMINAL-SYMBOL is an artificial symbol which can appear
283in any child state. As a starting place, one of the NONTERMINAL-SYMBOLS
284must be `bovine-toplevel'.
285
286A MATCH-LIST is a list of possible matches of the form:
287
288 ( STATE-LIST1
289 STATE-LIST2
290 ...
291 STATE-LISTN )
292
293where STATE-LIST is of the form:
294 ( TYPE1 [ \"VALUE1\" ] TYPE2 [ \"VALUE2\" ] ... LAMBDA )
295
296where TYPE is one of the returned types of the token stream.
297VALUE is a value, or range of values to match against. For
298example, a SYMBOL might need to match \"foo\". Some TYPES will not
299have matching criteria.
300
301LAMBDA is a lambda expression which is evalled with the text of the
302type when it is found. It is passed the list of all buffer text
303elements found since the last lambda expression. It should return a
304semantic element (see below.)
305
306For consistency between languages, try to use common return values
307from your parser. Please reference the chapter \"Writing Parsers\" in
308the \"Language Support Developer's Guide -\" in the semantic texinfo
309manual."
310 (let* ((start (semantic-grammar-start))
311 (scopestart (semantic-grammar-scopestart))
312 (quotemode (semantic-grammar-quotemode))
313 (tags (semantic-find-tags-by-class
314 'token (current-buffer)))
315 (nterms (semantic-find-tags-by-class
316 'nonterminal (current-buffer)))
317 ;; Setup the cache of macro definitions.
318 (bovine--grammar-macros (semantic-grammar-macros))
319 nterm rules items item actn prec tag type regex)
320
321 ;; Check some trivial things
322 (cond
323 ((null nterms)
324 (error "Bad input grammar"))
325 (start
326 (if (cdr start)
327 (message "Extra start symbols %S ignored" (cdr start)))
328 (setq start (symbol-name (car start)))
329 (unless (semantic-find-first-tag-by-name start nterms)
330 (error "start symbol `%s' has no rule" start)))
331 (t
332 ;; Default to the first grammar rule.
333 (setq start (semantic-tag-name (car nterms)))))
334 (when scopestart
335 (setq scopestart (symbol-name scopestart))
336 (unless (semantic-find-first-tag-by-name scopestart nterms)
337 (error "scopestart symbol `%s' has no rule" scopestart)))
338
339 ;; Generate the grammar Lisp form.
340 (with-temp-buffer
341 (erase-buffer)
342 (insert "`(")
343 ;; Insert the start/scopestart rules
344 (insert "\n(bovine-toplevel \n("
345 start
346 ")\n) ;; end bovine-toplevel\n")
347 (when scopestart
348 (insert "\n(bovine-inner-scope \n("
349 scopestart
350 ")\n) ;; end bovine-inner-scope\n"))
351 ;; Process each nonterminal
352 (while nterms
353 (setq nterm (car nterms)
354 ;; We can't use the override form because the current buffer
355 ;; is not the originator of the tag.
356 rules (semantic-tag-components-semantic-grammar-mode nterm)
357 nterm (semantic-tag-name nterm)
358 nterms (cdr nterms))
359 (when (member nterm '("bovine-toplevel" "bovine-inner-scope"))
360 (error "`%s' is a reserved internal name" nterm))
361 (insert "\n(" nterm)
362 ;; Process each rule
363 (while rules
364 (setq items (semantic-tag-get-attribute (car rules) :value)
365 prec (semantic-tag-get-attribute (car rules) :prec)
366 actn (semantic-tag-get-attribute (car rules) :expr)
367 rules (cdr rules))
368 ;; Process each item
369 (insert "\n(")
370 (if (null items)
371 ;; EMPTY rule
372 (insert ";;EMPTY" (if actn "" "\n"))
373 ;; Expand items
374 (while items
375 (setq item (car items)
376 items (cdr items))
377 (if (consp item) ;; mid-rule action
378 (message "Mid-rule action %S ignored" item)
379 (or (char-equal (char-before) ?\()
380 (insert "\n"))
381 (cond
382 ((member item '("bovine-toplevel" "bovine-inner-scope"))
383 (error "`%s' is a reserved internal name" item))
384 ;; Replace ITEM by its %token definition.
385 ;; If a '%token TYPE ITEM [REGEX]' definition exists
386 ;; in the grammar, ITEM is replaced by TYPE [REGEX].
387 ((setq tag (semantic-find-first-tag-by-name
388 item tags)
389 type (semantic-tag-get-attribute tag :type))
390 (insert type)
391 (if (setq regex (semantic-tag-get-attribute tag :value))
392 (insert (format "\n%S" regex))))
393 ;; Don't change ITEM
394 (t
395 (insert (semantic-grammar-item-text item)))
396 ))))
397 (if prec
398 (message "%%prec %S ignored" prec))
399 (if actn
400 (bovine-grammar-expand-action actn quotemode))
401 (insert ")"))
402 (insert "\n) ;; end " nterm "\n"))
403 (insert ")\n")
404 (buffer-string))))
405
406(defun bovine-grammar-setupcode-builder ()
407 "Return the text of the setup code."
408 (format
409 "(setq semantic--parse-table %s\n\
410 semantic-debug-parser-source %S\n\
411 semantic-debug-parser-class 'semantic-bovine-debug-parser
412 semantic-flex-keywords-obarray %s\n\
413 %s)"
414 (semantic-grammar-parsetable)
415 (buffer-name)
416 (semantic-grammar-keywordtable)
417 (let ((mode (semantic-grammar-languagemode)))
418 ;; Is there more than one major mode?
419 (if (and (listp mode) (> (length mode) 1))
420 (format "semantic-equivalent-major-modes '%S\n" mode)
421 ""))))
422
423(defvar bovine-grammar-menu
424 '("BY Grammar"
425 )
426 "BY mode specific grammar menu.
427Menu items are appended to the common grammar menu.")
428
429(define-derived-mode bovine-grammar-mode semantic-grammar-mode "BY"
430 "Major mode for editing Bovine grammars."
431 (semantic-grammar-setup-menu bovine-grammar-menu)
432 (semantic-install-function-overrides
433 '((grammar-parsetable-builder . bovine-grammar-parsetable-builder)
434 (grammar-setupcode-builder . bovine-grammar-setupcode-builder)
435 )))
436
437(add-to-list 'auto-mode-alist '("\\.by\\'" . bovine-grammar-mode))
438
439(defvar-mode-local bovine-grammar-mode semantic-grammar-macros
440 '(
441 (ASSOC . semantic-grammar-ASSOC)
442 (EXPAND . bovine-grammar-EXPAND)
443 (EXPANDFULL . bovine-grammar-EXPANDFULL)
444 (TAG . bovine-grammar-TAG)
445 (VARIABLE-TAG . bovine-grammar-VARIABLE-TAG)
446 (FUNCTION-TAG . bovine-grammar-FUNCTION-TAG)
447 (TYPE-TAG . bovine-grammar-TYPE-TAG)
448 (INCLUDE-TAG . bovine-grammar-INCLUDE-TAG)
449 (PACKAGE-TAG . bovine-grammar-PACKAGE-TAG)
450 (CODE-TAG . bovine-grammar-CODE-TAG)
451 (ALIAS-TAG . bovine-grammar-ALIAS-TAG)
452 )
453 "Semantic grammar macros used in bovine grammars.")
454
455(provide 'semantic/bovine/grammar)
456
457(defun bovine-make-parsers ()
458 "Generate Emacs' built-in Bovine-based parser files."
459 (semantic-mode 1)
460 ;; Loop through each .by file in current directory, and run
461 ;; `semantic-grammar-batch-build-one-package' to build the grammar.
462 (dolist (f (directory-files default-directory nil "\\.by\\'"))
463 (let ((packagename
464 (condition-case err
465 (with-current-buffer (find-file-noselect f)
466 (semantic-grammar-create-package))
467 (error (message "%s" (error-message-string err)) nil)))
468 lang)
469 (when (and packagename
470 (string-match "^semantic-\\(.*\\)-by\\.el\\'" packagename))
471 (setq lang (match-string 1 packagename))
472 (with-temp-buffer
473 (insert-file-contents packagename)
474 (setq buffer-file-name (expand-file-name packagename))
475 ;; Fix copyright header:
476 (goto-char (point-min))
477 (re-search-forward "^;; Author:")
478 (setq copyright-end (match-beginning 0))
479 (re-search-forward "^;;; Code:\n")
480 (delete-region copyright-end (match-end 0))
481 (goto-char copyright-end)
482 (insert ";; This file is part of GNU Emacs.
483
484;; GNU Emacs is free software: you can redistribute it and/or modify
485;; it under the terms of the GNU General Public License as published by
486;; the Free Software Foundation, either version 3 of the License, or
487;; (at your option) any later version.
488
489;; GNU Emacs is distributed in the hope that it will be useful,
490;; but WITHOUT ANY WARRANTY; without even the implied warranty of
491;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
492;; GNU General Public License for more details.
493
494;; You should have received a copy of the GNU General Public License
495;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
496
497;;; Commentary:
498;;
499;; This file was generated from admin/grammars/"
500 lang ".by.
501
502;;; Code:
503
504\(require 'semantic/lex)
505\(eval-when-compile (require 'semantic/bovine))\n")
506 (goto-char (point-min))
507 (delete-region (point-min) (line-end-position))
508 (insert ";;; semantic/bovine/" lang
509 "-by.el --- Generated parser support file")
510 (delete-trailing-whitespace)
511 ;; Fix footer:
512 (goto-char (point-max))
513 (re-search-backward ".\n;;; Analyzers")
514 (delete-region (point) (point-max))
515 (insert "(provide 'semantic/bovine/" lang "-by)\n\n")
516 (insert ";;; semantic/bovine/" lang "-by.el ends here\n")
517 (save-buffer))))))
518
519;;; bovine-grammar.el ends here
diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index 1bdaf8f447b..dfced9813d1 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -1,5 +1,4 @@
1;;; c.by -- LL grammar for C/C++ language specification 1;;; c.by -- LL grammar for C/C++ language specification
2
3;; Copyright (C) 1999-2012 Free Software Foundation, Inc. 2;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
4;; 3;;
5;; Author: Eric M. Ludlam <zappo@gnu.org> 4;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -39,6 +38,13 @@
39;; > * Can't parse signature element: "RmcBucStatus* rftBucStatus" 38;; > * Can't parse signature element: "RmcBucStatus* rftBucStatus"
40 39
41%package semantic-c-by 40%package semantic-c-by
41%provide semantic/bovine/c-by
42
43%{
44(declare-function semantic-c-reconstitute-token "semantic/bovine/c")
45(declare-function semantic-c-reconstitute-template "semantic/bovine/c")
46(declare-function semantic-expand-c-tag "semantic/bovine/c")
47}
42 48
43%languagemode c-mode c++-mode 49%languagemode c-mode c++-mode
44%start declaration 50%start declaration
@@ -98,6 +104,8 @@
98%put VIRTUAL summary "Method Modifier: virtual <type> <name>(...) ..." 104%put VIRTUAL summary "Method Modifier: virtual <type> <name>(...) ..."
99%token MUTABLE "mutable" 105%token MUTABLE "mutable"
100%put MUTABLE summary "Member Declaration Modifier: mutable <type> <name> ..." 106%put MUTABLE summary "Member Declaration Modifier: mutable <type> <name> ..."
107%token EXPLICIT "explicit"
108%put EXPLICIT summary "Forbids implicit type conversion: explicit <constructor>"
101 109
102%token STRUCT "struct" 110%token STRUCT "struct"
103%put STRUCT summary "Structure Type Declaration: struct [name] { ... };" 111%put STRUCT summary "Structure Type Declaration: struct [name] { ... };"
@@ -370,6 +378,9 @@ namespacesubparts
370 ;; PUBLIC or PRIVATE bits. Ignore them for now. 378 ;; PUBLIC or PRIVATE bits. Ignore them for now.
371 | template 379 | template
372 | using 380 | using
381 ;; Includes inside namespaces
382 | spp-include
383 (TAG $1 'include :inside-ns t)
373 | ;;EMPTY 384 | ;;EMPTY
374 ; 385 ;
375 386
@@ -1098,6 +1109,8 @@ functionname
1098function-pointer 1109function-pointer
1099 : LPAREN STAR symbol RPAREN 1110 : LPAREN STAR symbol RPAREN
1100 ( (concat "*" $3) ) 1111 ( (concat "*" $3) )
1112 | LPAREN symbol RPAREN
1113 ( $2 )
1101 ; 1114 ;
1102 1115
1103fun-or-proto-end 1116fun-or-proto-end
diff --git a/admin/grammars/grammar.wy b/admin/grammars/grammar.wy
index 1189d6b0886..f89fe6220ff 100644
--- a/admin/grammars/grammar.wy
+++ b/admin/grammars/grammar.wy
@@ -23,6 +23,9 @@
23;; You should have received a copy of the GNU General Public License 23;; You should have received a copy of the GNU General Public License
24;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 24;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 25
26%package semantic-grammar-wy
27%provide semantic/grammar-wy
28
26%{ 29%{
27(defvar semantic-grammar-lex-c-char-re) 30(defvar semantic-grammar-lex-c-char-re)
28 31
@@ -32,8 +35,6 @@
32(defvar semantic-grammar-wy--rindx nil) 35(defvar semantic-grammar-wy--rindx nil)
33} 36}
34 37
35%package semantic-grammar-wy
36
37%languagemode wy-mode 38%languagemode wy-mode
38 39
39;; Main 40;; Main
@@ -52,6 +53,7 @@
52%keyword LEFT "%left" 53%keyword LEFT "%left"
53%keyword NONASSOC "%nonassoc" 54%keyword NONASSOC "%nonassoc"
54%keyword PACKAGE "%package" 55%keyword PACKAGE "%package"
56%keyword PROVIDE "%provide"
55%keyword PREC "%prec" 57%keyword PREC "%prec"
56%keyword PUT "%put" 58%keyword PUT "%put"
57%keyword QUOTEMODE "%quotemode" 59%keyword QUOTEMODE "%quotemode"
@@ -134,6 +136,7 @@ decl:
134 | no_default_prec_decl 136 | no_default_prec_decl
135 | languagemode_decl 137 | languagemode_decl
136 | package_decl 138 | package_decl
139 | provide_decl
137 | precedence_decl 140 | precedence_decl
138 | put_decl 141 | put_decl
139 | quotemode_decl 142 | quotemode_decl
@@ -165,6 +168,11 @@ package_decl:
165 `(PACKAGE-TAG ',$2 nil) 168 `(PACKAGE-TAG ',$2 nil)
166 ; 169 ;
167 170
171provide_decl:
172 PROVIDE SYMBOL
173 `(TAG ',$2 'provide)
174 ;
175
168precedence_decl: 176precedence_decl:
169 associativity token_type_opt items 177 associativity token_type_opt items
170 `(TAG ',$1 'assoc :type ',$2 :value ',$3) 178 `(TAG ',$1 'assoc :type ',$2 :value ',$3)
diff --git a/admin/grammars/java-tags.wy b/admin/grammars/java-tags.wy
index b58b96c6bfb..708715533ff 100644
--- a/admin/grammars/java-tags.wy
+++ b/admin/grammars/java-tags.wy
@@ -23,6 +23,7 @@
23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 24
25%package wisent-java-tags-wy 25%package wisent-java-tags-wy
26%provide semantic/wisent/javat-wy
26 27
27%languagemode java-mode 28%languagemode java-mode
28 29
@@ -444,7 +445,7 @@ class_member_declaration
444;;; Type Declaration token 445;;; Type Declaration token
445;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING") 446;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING")
446interface_declaration 447interface_declaration
447 : modifiers_opt INTERFACE IDENTIFIER extends_interfaces_opt interface_body 448 : modifiers_opt INTERFACE qualified_name extends_interfaces_opt interface_body
448 (TYPE-TAG $3 $2 $5 (if $4 (cons nil $4)) :typemodifiers $1) 449 (TYPE-TAG $3 $2 $5 (if $4 (cons nil $4)) :typemodifiers $1)
449 ; 450 ;
450 451
@@ -547,7 +548,7 @@ formal_parameters
547;;; Variable token 548;;; Variable token
548;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING") 549;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING")
549formal_parameter 550formal_parameter
550 : formal_parameter_modifier_opt type variable_declarator_id 551 : formal_parameter_modifier_opt type opt_variable_declarator_id
551 (VARIABLE-TAG $3 $2 nil :typemodifiers $1) 552 (VARIABLE-TAG $3 $2 nil :typemodifiers $1)
552 ; 553 ;
553 554
@@ -582,6 +583,13 @@ variable_declarator
582 (cons $1 $region) 583 (cons $1 $region)
583 ; 584 ;
584 585
586opt_variable_declarator_id
587 : ;; EMPTY
588 (identity "")
589 | variable_declarator_id
590 (identity $1)
591 ;
592
585variable_declarator_id 593variable_declarator_id
586 : IDENTIFIER dims_opt 594 : IDENTIFIER dims_opt
587 (concat $1 $2) 595 (concat $1 $2)
diff --git a/admin/grammars/js.wy b/admin/grammars/js.wy
index c6b3a58aac3..7b55f5c3834 100644
--- a/admin/grammars/js.wy
+++ b/admin/grammars/js.wy
@@ -58,6 +58,7 @@
58;; DAMAGE. 58;; DAMAGE.
59 59
60%package wisent-javascript-jv-wy 60%package wisent-javascript-jv-wy
61%provide semantic/wisent/js-wy
61;; JAVE I prefere ecmascript-mode 62;; JAVE I prefere ecmascript-mode
62%languagemode ecmascript-mode javascript-mode 63%languagemode ecmascript-mode javascript-mode
63 64
diff --git a/admin/grammars/make.by b/admin/grammars/make.by
index ee933805cf6..6cff4716f82 100644
--- a/admin/grammars/make.by
+++ b/admin/grammars/make.by
@@ -22,6 +22,7 @@
22;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 22;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23 23
24%package semantic-make-by 24%package semantic-make-by
25%provide semantic/bovine/make-by
25 26
26%languagemode makefile-mode 27%languagemode makefile-mode
27%start Makefile 28%start Makefile
diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy
index f7808fd20b8..f17f41c9b1b 100644
--- a/admin/grammars/python.wy
+++ b/admin/grammars/python.wy
@@ -88,6 +88,12 @@
88;; -------- 88;; --------
89 89
90%package wisent-python-wy 90%package wisent-python-wy
91%provide semantic/wisent/python-wy
92
93%{
94(declare-function wisent-python-reconstitute-function-tag "semantic/wisent/python")
95(declare-function wisent-python-reconstitute-class-tag "semantic/wisent/python")
96}
91 97
92%languagemode python-mode 98%languagemode python-mode
93 99
@@ -173,6 +179,7 @@
173%token <punctuation> COMMA "," 179%token <punctuation> COMMA ","
174%token <punctuation> ASSIGN "=" 180%token <punctuation> ASSIGN "="
175%token <punctuation> BACKQUOTE "`" 181%token <punctuation> BACKQUOTE "`"
182%token <punctuation> AT "@"
176 183
177 184
178;; ----------------- 185;; -----------------
@@ -307,6 +314,10 @@
307%put WHILE summary 314%put WHILE summary
308"Start a 'while' loop" 315"Start a 'while' loop"
309 316
317%keyword WITH "with"
318%put WITH summary
319"Start statement with an associated context object"
320
310%keyword YIELD "yield" 321%keyword YIELD "yield"
311%put YIELD summary 322%put YIELD summary
312"Create a generator function" 323"Create a generator function"
@@ -545,8 +556,10 @@ import_stmt
545 556
546;; dotted_as_name (',' dotted_as_name)* 557;; dotted_as_name (',' dotted_as_name)*
547dotted_as_name_list 558dotted_as_name_list
548 : dotted_as_name 559 : dotted_as_name_list COMMA dotted_as_name
549 | dotted_as_name_list COMMA dotted_as_name 560 (cons $3 $1)
561 | dotted_as_name
562 (list $1)
550 ; 563 ;
551 564
552;; ('*' | import_as_name (',' import_as_name)*) 565;; ('*' | import_as_name (',' import_as_name)*)
@@ -649,6 +662,7 @@ compound_stmt
649 | while_stmt 662 | while_stmt
650 | for_stmt 663 | for_stmt
651 | try_stmt 664 | try_stmt
665 | with_stmt
652 | funcdef 666 | funcdef
653 | class_declaration 667 | class_declaration
654 ; 668 ;
@@ -756,13 +770,46 @@ zero_one_or_two_test
756 ; 770 ;
757 771
758;;;============================================================================ 772;;;============================================================================
773;;@@ with_stmt
774;;;============================================================================
775
776;; with_stmt: 'with' test [ with_var ] ':' suite
777with_stmt
778 : WITH test COLON suite
779 (CODE-TAG $1 nil)
780 | WITH test with_var COLON suite
781 (CODE-TAG $1 nil) ;; TODO capture variable
782 ;
783
784with_var
785 : AS expr
786 () ;; TODO capture
787 ;
788
789;;;============================================================================
759;;;@@ funcdef 790;;;@@ funcdef
760;;;============================================================================ 791;;;============================================================================
761 792
762;; funcdef: 'def' NAME parameters ':' suite 793decorator
794 : AT dotted_name varargslist_opt NEWLINE
795 (FUNCTION-TAG $2 "decorator" $3)
796 ;
797
798decorators
799 : decorator
800 (list $1)
801 | decorator decorators
802 (cons $1 $2)
803 ;
804
805;; funcdef: [decorators] 'def' NAME parameters ':' suite
763funcdef 806funcdef
764 : DEF NAME function_parameter_list COLON suite 807 : DEF NAME function_parameter_list COLON suite
765 (FUNCTION-TAG $2 nil $3) 808 (wisent-python-reconstitute-function-tag
809 (FUNCTION-TAG $2 nil $3) $5)
810 | decorators DEF NAME function_parameter_list COLON suite
811 (wisent-python-reconstitute-function-tag
812 (FUNCTION-TAG $3 nil $4 :decorators $1) $6)
766 ; 813 ;
767 814
768function_parameter_list 815function_parameter_list
@@ -798,10 +845,11 @@ function_parameter
798;; classdef: 'class' NAME ['(' testlist ')'] ':' suite 845;; classdef: 'class' NAME ['(' testlist ')'] ':' suite
799class_declaration 846class_declaration
800 : CLASS NAME paren_class_list_opt COLON suite 847 : CLASS NAME paren_class_list_opt COLON suite
801 (TYPE-TAG $2 $1 ;; Name "class" 848 (wisent-python-reconstitute-class-tag
802 $5 ;; Members 849 (TYPE-TAG $2 $1 ;; Name "class"
803 (cons $3 nil) ;; (SUPERCLASSES . INTERFACES) 850 $5 ;; Members
804 ) 851 (cons $3 nil) ;; (SUPERCLASSES . INTERFACES)
852 ))
805 ; 853 ;
806 854
807;; ['(' testlist ')'] 855;; ['(' testlist ')']
diff --git a/admin/grammars/scheme.by b/admin/grammars/scheme.by
index 3925f03c28b..98e75901a71 100644
--- a/admin/grammars/scheme.by
+++ b/admin/grammars/scheme.by
@@ -18,6 +18,7 @@
18;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20%package semantic-scm-by 20%package semantic-scm-by
21%provide semantic/bovine/scm-by
21 22
22%languagemode scheme-mode 23%languagemode scheme-mode
23%start scheme 24%start scheme
diff --git a/admin/grammars/srecode-template.wy b/admin/grammars/srecode-template.wy
index f38d7eaa2a1..f84a414b46e 100644
--- a/admin/grammars/srecode-template.wy
+++ b/admin/grammars/srecode-template.wy
@@ -28,6 +28,9 @@
28;; Semantic Recoder templates are based on Google Templates 28;; Semantic Recoder templates are based on Google Templates
29;; and are at the bottom of the Semantic Recoder API. 29;; and are at the bottom of the Semantic Recoder API.
30 30
31%package srecode-template-wy
32%provide srecode/srt-wy
33
31%languagemode srecode-mode 34%languagemode srecode-mode
32 35
33%start template_file 36%start template_file
@@ -46,6 +49,15 @@
46%put TEMPLATE summary "template <name>\\n <template definition>" 49%put TEMPLATE summary "template <name>\\n <template definition>"
47%keyword SECTIONDICTIONARY "sectiondictionary" 50%keyword SECTIONDICTIONARY "sectiondictionary"
48%put SECTIONDICTIONARY summary "sectiondictionary <name>\\n <dictionary entries>" 51%put SECTIONDICTIONARY summary "sectiondictionary <name>\\n <dictionary entries>"
52
53%keyword SECTION "section"
54%put SECTION summary
55 "section <name>\\n <dictionary entries>\\n end"
56
57%keyword END "end"
58%put END summary
59 "section ... end"
60
49%keyword PROMPT "prompt" 61%keyword PROMPT "prompt"
50%keyword DEFAULT "default" 62%keyword DEFAULT "default"
51%keyword DEFAULTMACRO "defaultmacro" 63%keyword DEFAULTMACRO "defaultmacro"
@@ -62,7 +74,7 @@
62%token <separator> TEMPLATE_BLOCK "^----" 74%token <separator> TEMPLATE_BLOCK "^----"
63 75
64;;; Bland default types 76;;; Bland default types
65%type <property> ":\\(\\w\\|\\s_\\)*" 77%type <property> syntax ":\\(\\w\\|\\s_\\)*"
66%token <property> property 78%token <property> property
67 79
68%type <symbol> 80%type <symbol>
@@ -134,7 +146,7 @@ insertable-string
134template 146template
135 : TEMPLATE templatename opt-dynamic-arguments newline 147 : TEMPLATE templatename opt-dynamic-arguments newline
136 opt-string 148 opt-string
137 opt-section-dictionaries 149 section-dictionary-list
138 TEMPLATE_BLOCK newline 150 TEMPLATE_BLOCK newline
139 opt-bind 151 opt-bind
140 (FUNCTION-TAG $2 nil $3 :documentation $5 :code $7 152 (FUNCTION-TAG $2 nil $3 :documentation $5 :code $7
@@ -165,29 +177,52 @@ opt-string
165 | () 177 | ()
166 ; 178 ;
167 179
168opt-section-dictionaries
169 : () ;; EMPTY
170 | section-dictionary-list
171 ;
172
173section-dictionary-list 180section-dictionary-list
174 : one-section-dictionary 181 : ;; empty
175 (list $1) 182 ()
176 | section-dictionary-list one-section-dictionary 183 | section-dictionary-list flat-section-dictionary
184 (append $1 (list $2))
185 | section-dictionary-list section-dictionary
177 (append $1 (list $2)) 186 (append $1 (list $2))
178 ; 187 ;
179 188
180one-section-dictionary 189flat-section-dictionary
181 : SECTIONDICTIONARY string newline 190 : SECTIONDICTIONARY string newline
182 variable-list 191 flat-dictionary-entry-list
192 (cons (read $2) $4)
193 ;
194
195flat-dictionary-entry-list
196 : ;; empty
197 ()
198 | flat-dictionary-entry-list flat-dictionary-entry
199 (append $1 $2)
200 ;
201
202flat-dictionary-entry
203 : variable
204 (EXPANDTAG $1)
205 ;
206
207section-dictionary
208 : SECTION string newline
209 dictionary-entry-list
210 END newline
183 (cons (read $2) $4) 211 (cons (read $2) $4)
184 ; 212 ;
185 213
186variable-list 214dictionary-entry-list
215 : ;; empty
216 ()
217 | dictionary-entry-list dictionary-entry
218 (append $1 $2)
219 ;
220
221dictionary-entry
187 : variable 222 : variable
188 (EXPANDTAG $1) 223 (EXPANDTAG $1)
189 | variable-list variable 224 | section-dictionary
190 (append $1 (EXPANDTAG $2)) 225 (list $1)
191 ; 226 ;
192 227
193opt-bind 228opt-bind
@@ -232,4 +267,4 @@ It ignores whitespace, newlines and comments."
232 semantic-lex-default-action 267 semantic-lex-default-action
233 ) 268 )
234 269
235;;; wisent-dot.wy ends here 270;;; srecode-template.wy ends here
diff --git a/admin/grammars/wisent-grammar.el b/admin/grammars/wisent-grammar.el
deleted file mode 100644
index 714b5211127..00000000000
--- a/admin/grammars/wisent-grammar.el
+++ /dev/null
@@ -1,537 +0,0 @@
1;;; wisent-grammar.el --- Wisent's input grammar mode
2
3;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
4;;
5;; Author: David Ponce <david@dponce.com>
6;; Maintainer: David Ponce <david@dponce.com>
7;; Created: 26 Aug 2002
8;; Keywords: syntax
9;; This file is part of GNU Emacs.
10
11;; GNU Emacs is free software: you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by
13;; the Free Software Foundation, either version 3 of the License, or
14;; (at your option) any later version.
15
16;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;; GNU General Public License for more details.
20
21;; You should have received a copy of the GNU General Public License
22;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
24;;; Commentary:
25;;
26;; Major mode for editing Wisent's input grammar (.wy) files.
27
28;;; Code:
29(require 'semantic)
30(require 'semantic/grammar)
31(require 'semantic/find)
32(require 'semantic/lex)
33(require 'semantic/wisent)
34(require 'semantic/bovine)
35
36(defsubst wisent-grammar-region-placeholder (symb)
37 "Given a $N placeholder symbol in SYMB, return a $regionN symbol.
38Return nil if $N is not a valid placeholder symbol."
39 (let ((n (symbol-name symb)))
40 (if (string-match "^[$]\\([1-9][0-9]*\\)$" n)
41 (intern (concat "$region" (match-string 1 n))))))
42
43(defun wisent-grammar-EXPAND (symb nonterm)
44 "Expand call to EXPAND grammar macro.
45Return the form to parse from within a nonterminal.
46SYMB is a $I placeholder symbol that gives the bounds of the area to
47parse.
48NONTERM is the nonterminal symbol to start with."
49 (unless (member nonterm (semantic-grammar-start))
50 (error "EXPANDFULL macro called with %s, but not used with %%start"
51 nonterm))
52 (let (($ri (wisent-grammar-region-placeholder symb)))
53 (if $ri
54 `(semantic-bovinate-from-nonterminal
55 (car ,$ri) (cdr ,$ri) ',nonterm)
56 (error "Invalid form (EXPAND %s %s)" symb nonterm))))
57
58(defun wisent-grammar-EXPANDFULL (symb nonterm)
59 "Expand call to EXPANDFULL grammar macro.
60Return the form to recursively parse an area.
61SYMB is a $I placeholder symbol that gives the bounds of the area.
62NONTERM is the nonterminal symbol to start with."
63 (unless (member nonterm (semantic-grammar-start))
64 (error "EXPANDFULL macro called with %s, but not used with %%start"
65 nonterm))
66 (let (($ri (wisent-grammar-region-placeholder symb)))
67 (if $ri
68 `(semantic-parse-region
69 (car ,$ri) (cdr ,$ri) ',nonterm 1)
70 (error "Invalid form (EXPANDFULL %s %s)" symb nonterm))))
71
72(defun wisent-grammar-TAG (name class &rest attributes)
73 "Expand call to TAG grammar macro.
74Return the form to create a generic semantic tag.
75See the function `semantic-tag' for the meaning of arguments NAME,
76CLASS and ATTRIBUTES."
77 `(wisent-raw-tag
78 (semantic-tag ,name ,class ,@attributes)))
79
80(defun wisent-grammar-VARIABLE-TAG (name type default-value &rest attributes)
81 "Expand call to VARIABLE-TAG grammar macro.
82Return the form to create a semantic tag of class variable.
83See the function `semantic-tag-new-variable' for the meaning of
84arguments NAME, TYPE, DEFAULT-VALUE and ATTRIBUTES."
85 `(wisent-raw-tag
86 (semantic-tag-new-variable ,name ,type ,default-value ,@attributes)))
87
88(defun wisent-grammar-FUNCTION-TAG (name type arg-list &rest attributes)
89 "Expand call to FUNCTION-TAG grammar macro.
90Return the form to create a semantic tag of class function.
91See the function `semantic-tag-new-function' for the meaning of
92arguments NAME, TYPE, ARG-LIST and ATTRIBUTES."
93 `(wisent-raw-tag
94 (semantic-tag-new-function ,name ,type ,arg-list ,@attributes)))
95
96(defun wisent-grammar-TYPE-TAG (name type members parents &rest attributes)
97 "Expand call to TYPE-TAG grammar macro.
98Return the form to create a semantic tag of class type.
99See the function `semantic-tag-new-type' for the meaning of arguments
100NAME, TYPE, MEMBERS, PARENTS and ATTRIBUTES."
101 `(wisent-raw-tag
102 (semantic-tag-new-type ,name ,type ,members ,parents ,@attributes)))
103
104(defun wisent-grammar-INCLUDE-TAG (name system-flag &rest attributes)
105 "Expand call to INCLUDE-TAG grammar macro.
106Return the form to create a semantic tag of class include.
107See the function `semantic-tag-new-include' for the meaning of
108arguments NAME, SYSTEM-FLAG and ATTRIBUTES."
109 `(wisent-raw-tag
110 (semantic-tag-new-include ,name ,system-flag ,@attributes)))
111
112(defun wisent-grammar-PACKAGE-TAG (name detail &rest attributes)
113 "Expand call to PACKAGE-TAG grammar macro.
114Return the form to create a semantic tag of class package.
115See the function `semantic-tag-new-package' for the meaning of
116arguments NAME, DETAIL and ATTRIBUTES."
117 `(wisent-raw-tag
118 (semantic-tag-new-package ,name ,detail ,@attributes)))
119
120(defun wisent-grammar-CODE-TAG (name detail &rest attributes)
121 "Expand call to CODE-TAG grammar macro.
122Return the form to create a semantic tag of class code.
123See the function `semantic-tag-new-code' for the meaning of arguments
124NAME, DETAIL and ATTRIBUTES."
125 `(wisent-raw-tag
126 (semantic-tag-new-code ,name ,detail ,@attributes)))
127
128(defun wisent-grammar-ALIAS-TAG (name aliasclass definition &rest attributes)
129 "Expand call to ALIAS-TAG grammar macro.
130Return the form to create a semantic tag of class alias.
131See the function `semantic-tag-new-alias' for the meaning of arguments
132NAME, ALIASCLASS, DEFINITION and ATTRIBUTES."
133 `(wisent-raw-tag
134 (semantic-tag-new-alias ,name ,aliasclass ,definition ,@attributes)))
135
136(defun wisent-grammar-EXPANDTAG (raw-tag)
137 "Expand call to EXPANDTAG grammar macro.
138Return the form to produce a list of cooked tags from raw form of
139Semantic tag RAW-TAG."
140 `(wisent-cook-tag ,raw-tag))
141
142(defun wisent-grammar-AST-ADD (ast &rest nodes)
143 "Expand call to AST-ADD grammar macro.
144Return the form to update the abstract syntax tree AST with NODES.
145See also the function `semantic-ast-add'."
146 `(semantic-ast-add ,ast ,@nodes))
147
148(defun wisent-grammar-AST-PUT (ast &rest nodes)
149 "Expand call to AST-PUT grammar macro.
150Return the form to update the abstract syntax tree AST with NODES.
151See also the function `semantic-ast-put'."
152 `(semantic-ast-put ,ast ,@nodes))
153
154(defun wisent-grammar-AST-GET (ast node)
155 "Expand call to AST-GET grammar macro.
156Return the form to get, from the abstract syntax tree AST, the value
157of NODE.
158See also the function `semantic-ast-get'."
159 `(semantic-ast-get ,ast ,node))
160
161(defun wisent-grammar-AST-GET1 (ast node)
162 "Expand call to AST-GET1 grammar macro.
163Return the form to get, from the abstract syntax tree AST, the first
164value of NODE.
165See also the function `semantic-ast-get1'."
166 `(semantic-ast-get1 ,ast ,node))
167
168(defun wisent-grammar-AST-GET-STRING (ast node)
169 "Expand call to AST-GET-STRING grammar macro.
170Return the form to get, from the abstract syntax tree AST, the value
171of NODE as a string.
172See also the function `semantic-ast-get-string'."
173 `(semantic-ast-get-string ,ast ,node))
174
175(defun wisent-grammar-AST-MERGE (ast1 ast2)
176 "Expand call to AST-MERGE grammar macro.
177Return the form to merge the abstract syntax trees AST1 and AST2.
178See also the function `semantic-ast-merge'."
179 `(semantic-ast-merge ,ast1 ,ast2))
180
181(defun wisent-grammar-SKIP-BLOCK (&optional symb)
182 "Expand call to SKIP-BLOCK grammar macro.
183Return the form to skip a parenthesized block.
184Optional argument SYMB is a $I placeholder symbol that gives the
185bounds of the block to skip. By default, skip the block at `$1'.
186See also the function `wisent-skip-block'."
187 (let ($ri)
188 (when symb
189 (unless (setq $ri (wisent-grammar-region-placeholder symb))
190 (error "Invalid form (SKIP-BLOCK %s)" symb)))
191 `(wisent-skip-block ,$ri)))
192
193(defun wisent-grammar-SKIP-TOKEN ()
194 "Expand call to SKIP-TOKEN grammar macro.
195Return the form to skip the lookahead token.
196See also the function `wisent-skip-token'."
197 `(wisent-skip-token))
198
199(defun wisent-grammar-assocs ()
200 "Return associativity and precedence level definitions."
201 (mapcar
202 #'(lambda (tag)
203 (cons (intern (semantic-tag-name tag))
204 (mapcar #'semantic-grammar-item-value
205 (semantic-tag-get-attribute tag :value))))
206 (semantic-find-tags-by-class 'assoc (current-buffer))))
207
208(defun wisent-grammar-terminals ()
209 "Return the list of terminal symbols.
210Keep order of declaration in the WY file without duplicates."
211 (let (terms)
212 (mapcar
213 #'(lambda (tag)
214 (mapcar #'(lambda (name)
215 (add-to-list 'terms (intern name)))
216 (cons (semantic-tag-name tag)
217 (semantic-tag-get-attribute tag :rest))))
218 (semantic--find-tags-by-function
219 #'(lambda (tag)
220 (memq (semantic-tag-class tag) '(token keyword)))
221 (current-buffer)))
222 (nreverse terms)))
223
224;; Cache of macro definitions currently in use.
225(defvar wisent--grammar-macros nil)
226
227(defun wisent-grammar-expand-macros (expr)
228 "Expand expression EXPR into a form without grammar macros.
229Return the expanded expression."
230 (if (or (atom expr) (semantic-grammar-quote-p (car expr)))
231 expr ;; Just return atom or quoted expression.
232 (let* ((expr (mapcar 'wisent-grammar-expand-macros expr))
233 (macro (assq (car expr) wisent--grammar-macros)))
234 (if macro ;; Expand Semantic built-in.
235 (apply (cdr macro) (cdr expr))
236 expr))))
237
238(defun wisent-grammar-nonterminals ()
239 "Return the list form of nonterminal definitions."
240 (let ((nttags (semantic-find-tags-by-class
241 'nonterminal (current-buffer)))
242 ;; Setup the cache of macro definitions.
243 (wisent--grammar-macros (semantic-grammar-macros))
244 rltags nterms rules rule elems elem actn sexp prec)
245 (while nttags
246 (setq rltags (semantic-tag-components (car nttags))
247 rules nil)
248 (while rltags
249 (setq elems (semantic-tag-get-attribute (car rltags) :value)
250 prec (semantic-tag-get-attribute (car rltags) :prec)
251 actn (semantic-tag-get-attribute (car rltags) :expr)
252 rule nil)
253 (when elems ;; not an EMPTY rule
254 (while elems
255 (setq elem (car elems)
256 elems (cdr elems))
257 (setq elem (if (consp elem) ;; mid-rule action
258 (wisent-grammar-expand-macros (read (car elem)))
259 (semantic-grammar-item-value elem)) ;; item
260 rule (cons elem rule)))
261 (setq rule (nreverse rule)))
262 (if prec
263 (setq prec (vector (semantic-grammar-item-value prec))))
264 (if actn
265 (setq sexp (wisent-grammar-expand-macros (read actn))))
266 (setq rule (if actn
267 (if prec
268 (list rule prec sexp)
269 (list rule sexp))
270 (if prec
271 (list rule prec)
272 (list rule))))
273 (setq rules (cons rule rules)
274 rltags (cdr rltags)))
275 (setq nterms (cons (cons (intern (semantic-tag-name (car nttags)))
276 (nreverse rules))
277 nterms)
278 nttags (cdr nttags)))
279 (nreverse nterms)))
280
281(defun wisent-grammar-grammar ()
282 "Return Elisp form of the grammar."
283 (let* ((terminals (wisent-grammar-terminals))
284 (nonterminals (wisent-grammar-nonterminals))
285 (assocs (wisent-grammar-assocs)))
286 (cons terminals (cons assocs nonterminals))))
287
288(defun wisent-grammar-parsetable-builder ()
289 "Return the value of the parser table."
290 `(progn
291 ;; Ensure that the grammar [byte-]compiler is available.
292 (eval-when-compile (require 'semantic/wisent/comp))
293 (wisent-compile-grammar
294 ',(wisent-grammar-grammar)
295 ',(semantic-grammar-start))))
296
297(defun wisent-grammar-setupcode-builder ()
298 "Return the parser setup code."
299 (format
300 "(semantic-install-function-overrides\n\
301 '((parse-stream . wisent-parse-stream)))\n\
302 (setq semantic-parser-name \"LALR\"\n\
303 semantic--parse-table %s\n\
304 semantic-debug-parser-source %S\n\
305 semantic-flex-keywords-obarray %s\n\
306 semantic-lex-types-obarray %s)\n\
307 ;; Collect unmatched syntax lexical tokens\n\
308 (semantic-make-local-hook 'wisent-discarding-token-functions)\n\
309 (add-hook 'wisent-discarding-token-functions\n\
310 'wisent-collect-unmatched-syntax nil t)"
311 (semantic-grammar-parsetable)
312 (buffer-name)
313 (semantic-grammar-keywordtable)
314 (semantic-grammar-tokentable)))
315
316(defvar wisent-grammar-menu
317 '("WY Grammar"
318 ["LALR Compiler Verbose" wisent-toggle-verbose-flag
319 :style toggle :active (boundp 'wisent-verbose-flag)
320 :selected (and (boundp 'wisent-verbose-flag)
321 wisent-verbose-flag)]
322 )
323 "WY mode specific grammar menu.
324Menu items are appended to the common grammar menu.")
325
326(define-derived-mode wisent-grammar-mode semantic-grammar-mode "WY"
327 "Major mode for editing Wisent grammars."
328 (semantic-grammar-setup-menu wisent-grammar-menu)
329 (semantic-install-function-overrides
330 '((grammar-parsetable-builder . wisent-grammar-parsetable-builder)
331 (grammar-setupcode-builder . wisent-grammar-setupcode-builder)
332 )))
333
334(add-to-list 'auto-mode-alist '("\\.wy\\'" . wisent-grammar-mode))
335
336(defvar-mode-local wisent-grammar-mode semantic-grammar-macros
337 '(
338 (ASSOC . semantic-grammar-ASSOC)
339 (EXPAND . wisent-grammar-EXPAND)
340 (EXPANDFULL . wisent-grammar-EXPANDFULL)
341 (TAG . wisent-grammar-TAG)
342 (VARIABLE-TAG . wisent-grammar-VARIABLE-TAG)
343 (FUNCTION-TAG . wisent-grammar-FUNCTION-TAG)
344 (TYPE-TAG . wisent-grammar-TYPE-TAG)
345 (INCLUDE-TAG . wisent-grammar-INCLUDE-TAG)
346 (PACKAGE-TAG . wisent-grammar-PACKAGE-TAG)
347 (EXPANDTAG . wisent-grammar-EXPANDTAG)
348 (CODE-TAG . wisent-grammar-CODE-TAG)
349 (ALIAS-TAG . wisent-grammar-ALIAS-TAG)
350 (AST-ADD . wisent-grammar-AST-ADD)
351 (AST-PUT . wisent-grammar-AST-PUT)
352 (AST-GET . wisent-grammar-AST-GET)
353 (AST-GET1 . wisent-grammar-AST-GET1)
354 (AST-GET-STRING . wisent-grammar-AST-GET-STRING)
355 (AST-MERGE . wisent-grammar-AST-MERGE)
356 (SKIP-BLOCK . wisent-grammar-SKIP-BLOCK)
357 (SKIP-TOKEN . wisent-grammar-SKIP-TOKEN)
358 )
359 "Semantic grammar macros used in wisent grammars.")
360
361(defvar wisent-make-parsers--emacs-license
362 ";; This file is part of GNU Emacs.
363
364;; GNU Emacs is free software: you can redistribute it and/or modify
365;; it under the terms of the GNU General Public License as published by
366;; the Free Software Foundation, either version 3 of the License, or
367;; (at your option) any later version.
368
369;; GNU Emacs is distributed in the hope that it will be useful,
370;; but WITHOUT ANY WARRANTY; without even the implied warranty of
371;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
372;; GNU General Public License for more details.
373
374;; You should have received a copy of the GNU General Public License
375;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.")
376
377(defvar wisent-make-parsers--python-license
378 ";; It is derived in part from the Python grammar, used under the
379;; following license:
380;;
381;; PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
382;; --------------------------------------------
383;; 1. This LICENSE AGREEMENT is between the Python Software Foundation
384;; (\"PSF\"), and the Individual or Organization (\"Licensee\") accessing
385;; and otherwise using this software (\"Python\") in source or binary
386;; form and its associated documentation.
387;;
388;; 2. Subject to the terms and conditions of this License Agreement,
389;; PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide
390;; license to reproduce, analyze, test, perform and/or display
391;; publicly, prepare derivative works, distribute, and otherwise use
392;; Python alone or in any derivative version, provided, however, that
393;; PSF's License Agreement and PSF's notice of copyright, i.e.,
394;; \"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
395;; 2009, 2010 Python Software Foundation; All Rights Reserved\" are
396;; retained in Python alone or in any derivative version prepared by
397;; Licensee.
398;;
399;; 3. In the event Licensee prepares a derivative work that is based
400;; on or incorporates Python or any part thereof, and wants to make
401;; the derivative work available to others as provided herein, then
402;; Licensee hereby agrees to include in any such work a brief summary
403;; of the changes made to Python.
404;;
405;; 4. PSF is making Python available to Licensee on an \"AS IS\"
406;; basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
407;; IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
408;; DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
409;; FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
410;; INFRINGE ANY THIRD PARTY RIGHTS.
411;;
412;; 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
413;; FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A
414;; RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR
415;; ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
416;;
417;; 6. This License Agreement will automatically terminate upon a
418;; material breach of its terms and conditions.
419;;
420;; 7. Nothing in this License Agreement shall be deemed to create any
421;; relationship of agency, partnership, or joint venture between PSF
422;; and Licensee. This License Agreement does not grant permission to
423;; use PSF trademarks or trade name in a trademark sense to endorse or
424;; promote products or services of Licensee, or any third party.
425;;
426;; 8. By copying, installing or otherwise using Python, Licensee
427;; agrees to be bound by the terms and conditions of this License
428;; Agreement.")
429
430(defvar wisent-make-parsers--ecmascript-license
431 "\n;; It is derived from the grammar in the ECMAScript Language
432;; Specification published at
433;;
434;; http://www.ecma-international.org/publications/standards/Ecma-262.htm
435;;
436;; and redistributed under the following license:
437;;
438;; Redistribution and use in source and binary forms, with or without
439;; modification, are permitted provided that the following conditions
440;; are met:
441;;
442;; 1. Redistributions of source code must retain the above copyright
443;; notice, this list of conditions and the following disclaimer.
444;;
445;; 2. Redistributions in binary form must reproduce the above
446;; copyright notice, this list of conditions and the following
447;; disclaimer in the documentation and/or other materials provided
448;; with the distribution.
449;;
450;; 3. Neither the name of the authors nor Ecma International may be
451;; used to endorse or promote products derived from this software
452;; without specific prior written permission. THIS SOFTWARE IS
453;; PROVIDED BY THE ECMA INTERNATIONAL \"AS IS\" AND ANY EXPRESS OR
454;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
455;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
456;; ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR
457;; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
458;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
459;; OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
460;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
461;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
462;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
463;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
464;; DAMAGE.")
465
466(defvar wisent-make-parsers--parser-file-name
467 `(("semantic-grammar-wy.el"
468 "semantic/grammar-wy")
469 ("srecode-template-wy.el"
470 "srecode/srt-wy")
471 ("wisent-javascript-jv-wy.el"
472 "semantic/wisent/js-wy"
473 "Copyright (C) 1998-2011 Ecma International."
474 ,wisent-make-parsers--ecmascript-license)
475 ("wisent-java-tags-wy.el"
476 "semantic/wisent/javat-wy")
477 ("wisent-python-wy.el"
478 "semantic/wisent/python-wy"
479 "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved."
480 ,wisent-make-parsers--python-license)))
481
482(defun wisent-make-parsers ()
483 "Generate Emacs' built-in Wisent-based parser files."
484 (semantic-mode 1)
485 ;; Loop through each .wy file in current directory, and run
486 ;; `semantic-grammar-batch-build-one-package' to build the grammar.
487 (dolist (f (directory-files default-directory nil "\\.wy\\'"))
488 (let ((packagename
489 (condition-case err
490 (with-current-buffer (find-file-noselect f)
491 (semantic-grammar-create-package))
492 (error (message "%s" (error-message-string err)) nil)))
493 output-data)
494 (when (setq output-data (assoc packagename wisent-make-parsers--parser-file-name))
495 (let ((require-name (nth 1 output-data))
496 (additional-copyright (nth 2 output-data))
497 (additional-license (nth 3 output-data))
498 copyright-end)
499 ;; Touch up the generated parsers for Emacs integration.
500 (with-temp-buffer
501 (insert-file-contents packagename)
502 ;; Fix copyright header:
503 (goto-char (point-min))
504 (when additional-copyright
505 (re-search-forward "Copyright (C).*$")
506 (insert "\n;; " additional-copyright))
507 (re-search-forward "^;; Author:")
508 (setq copyright-end (match-beginning 0))
509 (re-search-forward "^;;; Code:\n")
510 (delete-region copyright-end (match-end 0))
511 (goto-char copyright-end)
512 (insert wisent-make-parsers--emacs-license)
513 (insert "\n\n;;; Commentary:
514;;
515;; This file was generated from admin/grammars/"
516 f ".")
517 (when additional-license
518 (insert "\n" additional-license))
519 (insert "\n\n;;; Code:\n
520\(require 'semantic/lex)\n")
521 (goto-char (point-min))
522 (delete-region (point-min) (line-end-position))
523 (insert ";;; " require-name
524 ".el --- Generated parser support file")
525 (delete-trailing-whitespace)
526 (re-search-forward ";;\n(require 'semantic/lex)\n")
527 (delete-region (match-beginning 0) (match-end 0))
528 ;; Fix footer:
529 (goto-char (point-max))
530 (re-search-backward "^(provide")
531 (delete-region (match-beginning 0) (point-max))
532 (goto-char (point-max))
533 (insert "(provide '" require-name ")\n\n")
534 (insert ";;; " require-name ".el ends here\n")
535 (write-region nil nil (expand-file-name packagename))))))))
536
537;;; wisent-grammar.el ends here
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt
index ea9c4a3c2d1..eda28b639d2 100644
--- a/admin/make-tarball.txt
+++ b/admin/make-tarball.txt
@@ -57,8 +57,7 @@ For each step, check for possible errors.
57 M-x ediff. Especially check that Info files aren't built. 57 M-x ediff. Especially check that Info files aren't built.
58 58
5910. cd EMACS_ROOT_DIR; bzr tag TAG 5910. cd EMACS_ROOT_DIR; bzr tag TAG
60 TAG is EMACS_PRETEST_XX_YY_ZZZ for a pretest, EMACS_XX_YY for a 60 TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release.
61 release.
62 61
63 Shortly before the release, cut the version branch also, and open 62 Shortly before the release, cut the version branch also, and open
64 a Savannah support request asking for commits to the new branch to 63 a Savannah support request asking for commits to the new branch to
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index 775d43e68d3..1f60bb2973e 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -27,21 +27,24 @@ GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
27 27
28GNULIB_MODULES=' 28GNULIB_MODULES='
29 alloca-opt c-ctype c-strcase 29 alloca-opt c-ctype c-strcase
30 careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 30 careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
31 dtoastr dtotimespec dup2 environ execinfo 31 dtoastr dtotimespec dup2 environ execinfo faccessat
32 filemode getloadavg getopt-gnu gettime gettimeofday 32 fcntl-h filemode getloadavg getopt-gnu gettime gettimeofday
33 ignore-value intprops largefile lstat 33 ignore-value intprops largefile lstat
34 manywarnings mktime pselect pthread_sigmask readlink 34 manywarnings mktime pselect pthread_sigmask putenv readlink
35 socklen stat-time stdalign stdarg stdbool stdio 35 sig2str socklen stat-time stdalign stdarg stdbool stdio
36 strftime strtoimax strtoumax symlink sys_stat 36 strftime strtoimax strtoumax symlink sys_stat
37 sys_time time timespec-add timespec-sub utimens 37 sys_time time timer-time timespec-add timespec-sub unsetenv utimens
38 warnings 38 warnings
39' 39'
40 40
41GNULIB_TOOL_FLAGS=' 41GNULIB_TOOL_FLAGS='
42 --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat 42 --avoid=at-internal
43 --avoid=msvc-inval --avoid=msvc-nothrow 43 --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat
44 --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types 44 --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow
45 --avoid=openat-die --avoid=openat-h
46 --avoid=raise
47 --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types
45 --avoid=threadlib 48 --avoid=threadlib
46 --conditional-dependencies --import --no-changelog --no-vc-files 49 --conditional-dependencies --import --no-changelog --no-vc-files
47 --makefile-name=gnulib.mk 50 --makefile-name=gnulib.mk
@@ -85,7 +88,7 @@ test -x "$gnulib_srcdir"/gnulib-tool || {
85} 88}
86 89
87"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES && 90"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES &&
88rm -- "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 && 91rm -- "$src"m4/fcntl-o.m4 "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 &&
89cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc && 92cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc &&
90cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux && 93cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux &&
91autoreconf -i -I m4 -- ${src:+"$src"} 94autoreconf -i -I m4 -- ${src:+"$src"}
diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker
index 7d5e85a3ae0..ee385f4dd75 100644
--- a/admin/notes/bugtracker
+++ b/admin/notes/bugtracker
@@ -270,32 +270,35 @@ to a bug. There are two differences between normal tags and user tags:
2701) Anyone can define any valid usertag they like. In contrast, only a 2701) Anyone can define any valid usertag they like. In contrast, only a
271limited, predefined set of normal tags are available (see above). 271limited, predefined set of normal tags are available (see above).
272 272
2732) A usertag is associated with a specific email address. 2732) A usertag is associated with a specific user. This is normally
274 274an email address (with an "@" sign and least 4 characters after the "@"),
275You set usertags in the same way as tags, by talking to the control 275but on debbugs.gnu.org, the definition is less strict - anything with
276server. One difference is that you can also specify the associated 2765 or more alphanumeric characters will work. For personal tags,
277email address. If you don't explicitly specify an address, then it 277using an email address is still recommended. Please only use the
278will use the one from which you send the control message. The address 278"emacs" user, or other short users, for "official" tags.
279must have the form of an email address (with an "@" sign and least 4 279
280characters after the "@"). 280You set usertags in the same way as tags, by talking to the control server.
281One difference is that you can also specify the associated user.
282If you don't explicitly specify a user, then it will use the email
283address from which you send the control message.
281 284
282*** Setting usertags 285*** Setting usertags
283 286
284a) In a control message: 287a) In a control message:
285 288
286user bug-gnu-emacs@gnu.org 289user emacs # or email@example.com
287usertags 1234 any-tag-you-like 290usertags 1234 any-tag-you-like
288 291
289This will add a usertag "any-tag-you-like" to bug 1234. The tag will 292This will add a usertag "any-tag-you-like" to bug 1234. The tag will
290be associated with the address "bug-gnu-emacs@gnu.org". If you omit 293be associated with the user "emacs". If you omit the first line,
291the first line, the tag will be associated with your email address. 294the tag will be associated with your email address.
292 295
293The syntax of the usertags command is the same as that of tags (eg wrt 296The syntax of the usertags command is the same as that of tags (eg wrt
294the optional [=+-] argument). 297the optional [=+-] argument).
295 298
296b) In an initial submission, in the pseudo-header: 299b) In an initial submission, in the pseudo-header:
297 300
298User: bug-gnu-emacs@gnu.org 301User: emacs
299Usertags: a-new-tag 302Usertags: a-new-tag
300 303
301Again, the "User" is optional. 304Again, the "User" is optional.
@@ -312,7 +315,7 @@ http://debbugs.gnu.org/cgi/pkgindex.cgi?indexon=users
312 315
313**** To find all bugs usertagged by a given email address: 316**** To find all bugs usertagged by a given email address:
314 317
315http://debbugs.gnu.org/cgi/pkgreport.cgi?users=bug-gnu-emacs@gnu.org 318http://debbugs.gnu.org/cgi/pkgreport.cgi?users=emacs
316 319
317(Supposedly, the "users" field can be a comma-separated list of more 320(Supposedly, the "users" field can be a comma-separated list of more
318than one email address, but it does not seem to work for me.) 321than one email address, but it does not seem to work for me.)
@@ -322,7 +325,7 @@ than one email address, but it does not seem to work for me.)
322This works just like a normal tags search, but with the addition of a 325This works just like a normal tags search, but with the addition of a
323"users" field. Eg: 326"users" field. Eg:
324 327
325http://debbugs.gnu.org/cgi/pkgreport.cgi?users=bug-gnu-emacs@gnu.org;tag=calendar 328http://debbugs.gnu.org/cgi/pkgreport.cgi?users=emacs;tag=calendar
326 329
327*** To merge bugs: 330*** To merge bugs:
328Eg when bad replies create a bunch of new bugs for the same report. 331Eg when bad replies create a bunch of new bugs for the same report.
@@ -610,7 +613,7 @@ An /etc/aliases entry redirects it to the real emacs-bug-tracker address.
610All discarded messages are stored in /var/lib/mailman/spam. 613All discarded messages are stored in /var/lib/mailman/spam.
611If a non-spam message accidentally gets discarded, just do: 614If a non-spam message accidentally gets discarded, just do:
612 615
613cat /var/lib/mailman/spam/not-really-spam.msg | /usr/lib/debbugs/receive 616/usr/lib/debbugs/receive < /var/lib/mailman/spam/not-really-spam.msg
614chown Debian-debbugs:Debian-debbugs /var/lib/debbugs/spool/incoming/* 617chown Debian-debbugs:Debian-debbugs /var/lib/debbugs/spool/incoming/*
615... check it works ... 618... check it works ...
616mv /var/lib/mailman/spam/not-really-spam.msg /var/lib/mailman/not-spam/ 619mv /var/lib/mailman/spam/not-really-spam.msg /var/lib/mailman/not-spam/
@@ -618,6 +621,16 @@ mv /var/lib/mailman/spam/not-really-spam.msg /var/lib/mailman/not-spam/
618Also check that the sender was not added to the auto-discard/reject list 621Also check that the sender was not added to the auto-discard/reject list
619in the debbugs-submit Mailman interface. 622in the debbugs-submit Mailman interface.
620 623
624If you don't have the actual mail, just the mailman moderation mail
625version of it, you need to extract the original mail, and add the
626following headers:
627
6281) The leading envelope From line.
6292) Message-ID (get it from /var/log/mailman/vette).
6303) X-Debbugs-Envelope-To: submit
631
632Then pipe it to receive as above.
633
621** Administrivia 634** Administrivia
622 635
623The debbugs-submit list should have the administrivia option off, 636The debbugs-submit list should have the administrivia option off,
diff --git a/admin/notes/copyright b/admin/notes/copyright
index 72b7d7e2d23..173ff83343a 100644
--- a/admin/notes/copyright
+++ b/admin/notes/copyright
@@ -380,7 +380,7 @@ Makefile.in does now.
380src/gmalloc.c 380src/gmalloc.c
381 - contains numerous copyrights from the GNU C library. Leave them alone. 381 - contains numerous copyrights from the GNU C library. Leave them alone.
382 382
383src/ndir.h 383nt/inc/dirent.h
384 - see comments below. This file is OK to be released with Emacs 384 - see comments below. This file is OK to be released with Emacs
385 22, but we may want to revisit it afterwards. 385 22, but we may want to revisit it afterwards.
386 386
@@ -429,7 +429,7 @@ admin/check-doc-strings
429 File says it's in the public domain, but that might not make it so. 429 File says it's in the public domain, but that might not make it so.
430 430
431etc/e/eterm-color.ti 431etc/e/eterm-color.ti
432src/ndir.h 432nt/inc/dirent.h
433 On legal advice from Matt Norwood, the following comment was added 433 On legal advice from Matt Norwood, the following comment was added
434 to these files in Feb/Mar 2007: 434 to these files in Feb/Mar 2007:
435 435
diff --git a/admin/unidata/BidiMirroring.txt b/admin/unidata/BidiMirroring.txt
index 2e719bc1e05..ec41b769375 100644
--- a/admin/unidata/BidiMirroring.txt
+++ b/admin/unidata/BidiMirroring.txt
@@ -1,19 +1,19 @@
1# BidiMirroring-6.1.0.txt 1# BidiMirroring-6.2.0.txt
2# Date: 2011-12-20, 19:31:00 GMT [KW, LI] 2# Date: 2012-05-15, 24:19:00 GMT [KW, LI]
3# 3#
4# Bidi_Mirroring_Glyph Property 4# Bidi_Mirroring_Glyph Property
5# 5#
6# This file is an informative contributory data file in the 6# This file is an informative contributory data file in the
7# Unicode Character Database. 7# Unicode Character Database.
8# 8#
9# Copyright (c) 1991-2011 Unicode, Inc. 9# Copyright (c) 1991-2012 Unicode, Inc.
10# For terms of use, see http://www.unicode.org/terms_of_use.html 10# For terms of use, see http://www.unicode.org/terms_of_use.html
11# 11#
12# This data file lists characters that have the Bidi_Mirrored=Yes property 12# This data file lists characters that have the Bidi_Mirrored=Yes property
13# value, for which there is another Unicode character that typically has a glyph 13# value, for which there is another Unicode character that typically has a glyph
14# that is the mirror image of the original character's glyph. 14# that is the mirror image of the original character's glyph.
15# 15#
16# The repertoire covered by the file is Unicode 6.1.0. 16# The repertoire covered by the file is Unicode 6.2.0.
17# 17#
18# The file contains a list of lines with mappings from one code point 18# The file contains a list of lines with mappings from one code point
19# to another one for character-based mirroring. 19# to another one for character-based mirroring.
@@ -30,16 +30,8 @@
30# characters exist with mirrored glyphs, are 30# characters exist with mirrored glyphs, are
31# listed as comments at the end of the file. 31# listed as comments at the end of the file.
32# 32#
33# Note: (2011-12-19) There is an inconsistency between the
34# following statement about the default value
35# of the Bidi_Mirroring_Glyph property and the
36# value of the @missing line for Bidi_Mirroring_Glyph in
37# PropertyValueAliases.txt. This inconsistency was discovered too
38# late in the release process to be resolved by
39# the UTC. The inconsistency will be resolved in a future revision.
40#
41# Formally, the default value of the Bidi_Mirroring_Glyph property 33# Formally, the default value of the Bidi_Mirroring_Glyph property
42# for each code point is the code point itself, unless a mapping to 34# for each code point is <none>, unless a mapping to
43# some other character is specified in this data file. When a code 35# some other character is specified in this data file. When a code
44# point has the default value for the Bidi_Mirroring_Glyph property, 36# point has the default value for the Bidi_Mirroring_Glyph property,
45# that means that no other character exists whose glyph is suitable 37# that means that no other character exists whose glyph is suitable
@@ -50,12 +42,13 @@
50# 42#
51# This file was originally created by Markus Scherer. 43# This file was originally created by Markus Scherer.
52# Extended for Unicode 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, and 6.0 by Ken Whistler, 44# Extended for Unicode 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, and 6.0 by Ken Whistler,
53# and for Unicode 6.1 by Ken Whistler and Laurentiu Iancu. 45# and for Unicode 6.1 and 6.2 by Ken Whistler and Laurentiu Iancu.
54# 46#
55# ############################################################ 47# ############################################################
56# 48#
57# Property: Bidi_Mirroring_Glyph 49# Property: Bidi_Mirroring_Glyph
58# 50#
51# @missing: 0000..10FFFF; <none>
59 52
600028; 0029 # LEFT PARENTHESIS 530028; 0029 # LEFT PARENTHESIS
610029; 0028 # RIGHT PARENTHESIS 540029; 0028 # RIGHT PARENTHESIS
diff --git a/admin/unidata/UnicodeData.txt b/admin/unidata/UnicodeData.txt
index 9f204050c6b..086379eb4f3 100644
--- a/admin/unidata/UnicodeData.txt
+++ b/admin/unidata/UnicodeData.txt
@@ -7190,6 +7190,7 @@
719020B7;SPESMILO SIGN;Sc;0;ET;;;;;N;;;;; 719020B7;SPESMILO SIGN;Sc;0;ET;;;;;N;;;;;
719120B8;TENGE SIGN;Sc;0;ET;;;;;N;;;;; 719120B8;TENGE SIGN;Sc;0;ET;;;;;N;;;;;
719220B9;INDIAN RUPEE SIGN;Sc;0;ET;;;;;N;;;;; 719220B9;INDIAN RUPEE SIGN;Sc;0;ET;;;;;N;;;;;
719320BA;TURKISH LIRA SIGN;Sc;0;ET;;;;;N;;;;;
719320D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;; 719420D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;;
719420D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;; 719520D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;;
719520D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;; 719620D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;;
@@ -18703,8 +18704,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
187031242F;CUNEIFORM NUMERIC SIGN THREE SHARU VARIANT FORM;Nl;0;L;;;;3;N;;;;; 187041242F;CUNEIFORM NUMERIC SIGN THREE SHARU VARIANT FORM;Nl;0;L;;;;3;N;;;;;
1870412430;CUNEIFORM NUMERIC SIGN FOUR SHARU;Nl;0;L;;;;4;N;;;;; 1870512430;CUNEIFORM NUMERIC SIGN FOUR SHARU;Nl;0;L;;;;4;N;;;;;
1870512431;CUNEIFORM NUMERIC SIGN FIVE SHARU;Nl;0;L;;;;5;N;;;;; 1870612431;CUNEIFORM NUMERIC SIGN FIVE SHARU;Nl;0;L;;;;5;N;;;;;
1870612432;CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS DISH;Nl;0;L;;;;;N;;;;; 1870712432;CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS DISH;Nl;0;L;;;;216000;N;;;;;
1870712433;CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS MIN;Nl;0;L;;;;;N;;;;; 1870812433;CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS MIN;Nl;0;L;;;;432000;N;;;;;
1870812434;CUNEIFORM NUMERIC SIGN ONE BURU;Nl;0;L;;;;1;N;;;;; 1870912434;CUNEIFORM NUMERIC SIGN ONE BURU;Nl;0;L;;;;1;N;;;;;
1870912435;CUNEIFORM NUMERIC SIGN TWO BURU;Nl;0;L;;;;2;N;;;;; 1871012435;CUNEIFORM NUMERIC SIGN TWO BURU;Nl;0;L;;;;2;N;;;;;
1871012436;CUNEIFORM NUMERIC SIGN THREE BURU;Nl;0;L;;;;3;N;;;;; 1871112436;CUNEIFORM NUMERIC SIGN THREE BURU;Nl;0;L;;;;3;N;;;;;
@@ -18739,8 +18740,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
1873912453;CUNEIFORM NUMERIC SIGN FOUR BAN2 VARIANT FORM;Nl;0;L;;;;4;N;;;;; 1874012453;CUNEIFORM NUMERIC SIGN FOUR BAN2 VARIANT FORM;Nl;0;L;;;;4;N;;;;;
1874012454;CUNEIFORM NUMERIC SIGN FIVE BAN2;Nl;0;L;;;;5;N;;;;; 1874112454;CUNEIFORM NUMERIC SIGN FIVE BAN2;Nl;0;L;;;;5;N;;;;;
1874112455;CUNEIFORM NUMERIC SIGN FIVE BAN2 VARIANT FORM;Nl;0;L;;;;5;N;;;;; 1874212455;CUNEIFORM NUMERIC SIGN FIVE BAN2 VARIANT FORM;Nl;0;L;;;;5;N;;;;;
1874212456;CUNEIFORM NUMERIC SIGN NIGIDAMIN;Nl;0;L;;;;;N;;;;; 1874312456;CUNEIFORM NUMERIC SIGN NIGIDAMIN;Nl;0;L;;;;-1;N;;;;;
1874312457;CUNEIFORM NUMERIC SIGN NIGIDAESH;Nl;0;L;;;;;N;;;;; 1874412457;CUNEIFORM NUMERIC SIGN NIGIDAESH;Nl;0;L;;;;-1;N;;;;;
1874412458;CUNEIFORM NUMERIC SIGN ONE ESHE3;Nl;0;L;;;;1;N;;;;; 1874512458;CUNEIFORM NUMERIC SIGN ONE ESHE3;Nl;0;L;;;;1;N;;;;;
1874512459;CUNEIFORM NUMERIC SIGN TWO ESHE3;Nl;0;L;;;;2;N;;;;; 1874612459;CUNEIFORM NUMERIC SIGN TWO ESHE3;Nl;0;L;;;;2;N;;;;;
187461245A;CUNEIFORM NUMERIC SIGN ONE THIRD DISH;Nl;0;L;;;;1/3;N;;;;; 187471245A;CUNEIFORM NUMERIC SIGN ONE THIRD DISH;Nl;0;L;;;;1/3;N;;;;;