aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-04-03 20:24:17 +0000
committerKaroly Lorentey2004-04-03 20:24:17 +0000
commit1ba538094c4cd3da172d91878fa76d96c6b1cbd2 (patch)
treed9379406f3598de5db893fd0f01d6ae214a711d1
parentb04f5ad2cc0f71e567ec9ee49351f45f0a5faa3a (diff)
parent9f691b0dd903205d12e447c753bcd92741c68707 (diff)
downloademacs-1ba538094c4cd3da172d91878fa76d96c6b1cbd2.tar.gz
emacs-1ba538094c4cd3da172d91878fa76d96c6b1cbd2.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-177 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-178 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-179 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-180 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-131
-rw-r--r--ChangeLog5
-rw-r--r--INSTALL.CVS8
-rw-r--r--Makefile.in5
-rw-r--r--etc/ChangeLog15
-rw-r--r--etc/HELLO1
-rw-r--r--etc/NEWS27
-rw-r--r--etc/TODO3
-rw-r--r--etc/ps-prin1.ps9
-rw-r--r--lisp/ChangeLog169
-rw-r--r--lisp/Makefile.in8
-rw-r--r--lisp/autorevert.el119
-rw-r--r--lisp/buff-menu.el2
-rw-r--r--lisp/descr-text.el9
-rw-r--r--lisp/dired-aux.el13
-rw-r--r--lisp/dired-x.el3
-rw-r--r--lisp/dired.el23
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/international/characters.el2
-rw-r--r--lisp/international/mule-util.el13
-rw-r--r--lisp/international/ucs-tables.el10
-rw-r--r--lisp/net/browse-url.el6
-rw-r--r--lisp/pcvs.el12
-rw-r--r--lisp/printing.el25
-rw-r--r--lisp/progmodes/compile.el46
-rw-r--r--lisp/progmodes/ebnf-abn.el4
-rw-r--r--lisp/progmodes/ebnf-ebx.el672
-rw-r--r--lisp/progmodes/ebnf2ps.el125
-rw-r--r--lisp/progmodes/gdb-ui.el81
-rw-r--r--lisp/progmodes/gud.el2
-rw-r--r--lisp/subr.el22
-rw-r--r--lisp/vc.el95
-rw-r--r--lisp/x-dnd.el11
-rw-r--r--man/ChangeLog5
-rw-r--r--man/files.texi9
-rw-r--r--src/.gdbinit208
-rw-r--r--src/.gdbinit-union402
-rw-r--r--src/ChangeLog45
-rw-r--r--src/callint.c22
-rw-r--r--src/data.c46
-rw-r--r--src/editfns.c2
-rw-r--r--src/emacs.c13
-rw-r--r--src/eval.c10
-rw-r--r--src/lisp.h1
-rw-r--r--src/xterm.c57
44 files changed, 1517 insertions, 854 deletions
diff --git a/ChangeLog b/ChangeLog
index b50a9a5bd5d..bbf45b77dc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12004-03-31 Luc Teirlinck <teirllm@auburn.edu>
2
3 * Makefile.in: Mention in comment that `make maintainer-clean'
4 deletes .elc files.
5
12004-03-22 Stefan Monnier <monnier@iro.umontreal.ca> 62004-03-22 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * update-subdirs: Add local variables to prevent byte-compiling. 8 * update-subdirs: Add local variables to prevent byte-compiling.
diff --git a/INSTALL.CVS b/INSTALL.CVS
index 27e035146bb..94025678ac3 100644
--- a/INSTALL.CVS
+++ b/INSTALL.CVS
@@ -50,15 +50,15 @@ or gnu.emacs.bug. Ideally, use M-x report-emacs-bug RET which will
50send it to the proper place. 50send it to the proper place.
51 51
52 52
53Note on using SSH to access the CVS repository from inside emacs 53Note on using SSH to access the CVS repository from inside Emacs
54---------------------------------------------------------------- 54----------------------------------------------------------------
55 55
56Write access to the CVS repository requires using SSH v2. 56Write access to the CVS repository requires using SSH v2.
57 57
58If you execute cvs commands inside emacs, specifically if you use 58If you execute cvs commands inside Emacs, specifically if you use
59pcl-cvs, output from CVS may be lost due to a problem in the 59pcl-cvs, output from CVS may be lost due to a problem in the
60interface between ssh, cvs, and emacs. Corrupted checkins are 60interface between ssh, cvs, and libc. Corrupted checkins have
61also been reported to have happened. 61also been rumored to have happened.
62 62
63To fix the problem, save the following script into a file, make it 63To fix the problem, save the following script into a file, make it
64executable, and set CVS_RSH to the file name of the script: 64executable, and set CVS_RSH to the file name of the script:
diff --git a/Makefile.in b/Makefile.in
index d7ed0676b0c..7bfed3fd5ea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45,8 +45,9 @@
45# make maintainer-clean 45# make maintainer-clean
46# Delete everything from the current directory that can be 46# Delete everything from the current directory that can be
47# reconstructed with this Makefile. This typically includes 47# reconstructed with this Makefile. This typically includes
48# everything deleted by distclean, plus more: C source files 48# everything deleted by distclean, plus more: .elc files,
49# produced by Bison, tags tables, info files, and so on. 49# C source files produced by Bison, tags tables, info files,
50# and so on.
50# 51#
51# make extraclean 52# make extraclean
52# Still more severe - delete backup and autosave files, too. 53# Still more severe - delete backup and autosave files, too.
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 6d542fb96c5..26b6341de05 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,18 @@
12004-04-01 Juri Linkov <juri@jurta.org>
2
3 * HELLO: Add Javanese.
4
52004-03-29 Vinicius Jose Latorre <viniciusjl@ig.com.br>
6
7 * ps-prin1.ps: Clip the header and footer area, so text will not be
8 printed outside header or footer, respectively.
9 (HeaderClip, FooterClip): New PostScript funs.
10 (HeaderText, FooterText): Adjust PostScript code.
11
122004-03-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
13
14 * TODO: Removed drag-and-drop entry (DONE).
15
12004-03-19 Kim F. Storm <storm@cua.dk> 162004-03-19 Kim F. Storm <storm@cua.dk>
2 17
3 * TODO: Remove entries for fringe related issues (DONE). 18 * TODO: Remove entries for fringe related issues (DONE).
diff --git a/etc/HELLO b/etc/HELLO
index 13fcbfcea8d..1c59bdb4de6 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -19,6 +19,7 @@ Greek (,Fekkgmij\(B) ,FCei\(B ,Fsar(B
19Hebrew (,Hraxiz(B) ,Hylem(B 19Hebrew (,Hraxiz(B) ,Hylem(B
20Hindi (4$,4!}t%"+0$,15y55B14$,4!.v#"Yv#"20$,15f6 1(B) 4$,4!8v#")0$,15h14$,4!hv#")0$,15n14$,4!zv#!)v#")v#"D0$,15x6-5d6'1(B, 4$,4!8v#")0$,15h14$,4!hv#")0$,15n14$,4!zv# ev#"Rv#")0$,15x6-5U5~14$,4!nv#"W0$,15p1(B 4$,4 J0$,16D1(B 20Hindi (4$,4!}t%"+0$,15y55B14$,4!.v#"Yv#"20$,15f6 1(B) 4$,4!8v#")0$,15h14$,4!hv#")0$,15n14$,4!zv#!)v#")v#"D0$,15x6-5d6'1(B, 4$,4!8v#")0$,15h14$,4!hv#")0$,15n14$,4!zv# ev#"Rv#")0$,15x6-5U5~14$,4!nv#"W0$,15p1(B 4$,4 J0$,16D1(B
21Italian (italiano) Ciao, Buon giorno 21Italian (italiano) Ciao, Buon giorno
22Javanese (Jawa) System.out.println("Halo, selamat sore!");
22Kannada (4$,43Ov#4z0$,1>u14$,44Kv#4zv#4M0$,1?(?M?(14$,43sv#4z0$,1?!1(B) 4$,44Kv#4z0$,1?(14$,44hv#4zv#40$,1?.14$,44qv#4{v#3Q0$,1?8?M>u?>14$,44av#4z0$,1?01(B 23Kannada (4$,43Ov#4z0$,1>u14$,44Kv#4zv#4M0$,1?(?M?(14$,43sv#4z0$,1?!1(B) 4$,44Kv#4z0$,1?(14$,44hv#4zv#40$,1?.14$,44qv#4{v#3Q0$,1?8?M>u?>14$,44av#4z0$,1?01(B
23Lao ((1>RJRERG(B) (1JP:R-04U1(B, 0(1"m1c0Ki1b*!04U1(B 24Lao ((1>RJRERG(B) (1JP:R-04U1(B, 0(1"m1c0Ki1b*!04U1(B
24Malayalam (4$,46A0$,1@N14$,46E0$,1@R14$,46Bv#6M0$,1@O@^14$,46Fv#6W0$,1@S@"1(B) 4$,46<0$,1@H14$,46A0$,1@N14$,46Kv#6Vv#6)v#6M0$,1@X@m@5@^14$,46Cv#6W0$,1@P@"1(B 25Malayalam (4$,46A0$,1@N14$,46E0$,1@R14$,46Bv#6M0$,1@O@^14$,46Fv#6W0$,1@S@"1(B) 4$,46<0$,1@H14$,46A0$,1@N14$,46Kv#6Vv#6)v#6M0$,1@X@m@5@^14$,46Cv#6W0$,1@P@"1(B
diff --git a/etc/NEWS b/etc/NEWS
index 791e75f1ea2..e6e6e9b5d77 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -88,12 +88,22 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
88 88
89* Changes in Emacs 21.4 89* Changes in Emacs 21.4
90 90
91** M-x compile has been completely overhauled 91** M-x compile has become more robust and reliable
92 92
93It now uses font-lock for turning compiler output into hypertext. Quite a few 93Quite a few more kinds of messages are recognized. Messages that are
94more kinds of messages are recognized. Messages that are recognized as 94recognized as warnings or informational come in orange or green, instead of
95warnings or informational come in orange or green, instead of red. 95red. Informational messages are by default skipped with `next-error'
96Informational messages are by default skipped with `next-error'. 96(controlled by `compilation-skip-threshold').
97
98Location data is collected on the fly as the *compilation* buffer changes.
99This means you could modify messages to make them point to different files.
100This also means you can not go to locations of messages you may have deleted.
101
102The variable `compilation-error-regexp-alist' has now become customizable. If
103you had added your own regexps to this, you'll probably need to include a
104leading `^', otherwise they'll match anywhere on a line. There is now also a
105`compilation-mode-font-lock-keywords' and it nicely handles all the checks
106that configure outputs and -o options so you see at a glance where you are.
97 107
98The new file etc/compilation.txt gives examples of each type of message. 108The new file etc/compilation.txt gives examples of each type of message.
99 109
@@ -638,6 +648,13 @@ different Emacs window will select that window (minibuffer window can
638be selected only when it is active). The default is nil, so that this 648be selected only when it is active). The default is nil, so that this
639feature is not enabled. 649feature is not enabled.
640 650
651** On X, when the window manager requires that you click on a frame to
652select it (give it focus), the selected window and cursor position
653normally changes according to the mouse click position. If you set
654the variable x-mouse-click-focus-ignore-position to t, the selected
655window and cursor position do not changes when you click on a frame
656to give it focus.
657
641+++ 658+++
642** The new command `describe-char' (C-u C-x =) pops up a buffer with 659** The new command `describe-char' (C-u C-x =) pops up a buffer with
643description various information about a character, including its 660description various information about a character, including its
diff --git a/etc/TODO b/etc/TODO
index 960adbf553f..6ed9b8c10a0 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -166,9 +166,6 @@ Other features we would like:
166 166
167* Check what hooks would help Emacspeak -- see the defadvising in W3. 167* Check what hooks would help Emacspeak -- see the defadvising in W3.
168 168
169* Implement some variety of (non-gtk) drag-and-drop support under X.
170 Using libdnd might be a good start.
171
172* Add horizontal scroll bars. 169* Add horizontal scroll bars.
173 170
174* Provide an optional feature which computes a scroll bar slider's 171* Provide an optional feature which computes a scroll bar slider's
diff --git a/etc/ps-prin1.ps b/etc/ps-prin1.ps
index 1716562b0f4..dd922b9338d 100644
--- a/etc/ps-prin1.ps
+++ b/etc/ps-prin1.ps
@@ -1,7 +1,7 @@
1% === BEGIN ps-print prologue 1 1% === BEGIN ps-print prologue 1
2% version: 6.0 2% version: 6.0
3 3
4% Copyright (C) 2000, 2001 Free Software Foundation, Inc. 4% Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5% 5%
6% This file is part of GNU Emacs. 6% This file is part of GNU Emacs.
7% 7%
@@ -751,6 +751,9 @@ StandardEncoding 46 82 getinterval aload pop
751 FooterLineHeight FooterLines 1 sub mul add 751 FooterLineHeight FooterLines 1 sub mul add
752}def 752}def
753 753
754/HeaderClip{HeaderFrameStart moveto HeaderFramePath clip}def
755/FooterClip{FooterFrameStart moveto FooterFramePath clip}def
756
754/strcat{ 757/strcat{
755 dup length 3 -1 roll dup length dup 4 -1 roll add string dup 758 dup length 3 -1 roll dup length dup 4 -1 roll add string dup
756 0 5 -1 roll putinterval 759 0 5 -1 roll putinterval
@@ -803,17 +806,21 @@ StandardEncoding 46 82 getinterval aload pop
803}def 806}def
804 807
805/HeaderText{ 808/HeaderText{
809 gsave HeaderClip
806 HeaderLinesRight HeaderLinesLeft 810 HeaderLinesRight HeaderLinesLeft
807 /HeaderStart HeaderLineHeight HeaderPad 811 /HeaderStart HeaderLineHeight HeaderPad
808 HeaderFrameProperties 0 get 812 HeaderFrameProperties 0 get
809 HeaderOrFooterText 813 HeaderOrFooterText
814 grestore
810}def 815}def
811 816
812/FooterText{ 817/FooterText{
818 gsave FooterClip
813 FooterLinesRight FooterLinesLeft 819 FooterLinesRight FooterLinesLeft
814 /FooterStart FooterLineHeight FooterPad 820 /FooterStart FooterLineHeight FooterPad
815 FooterFrameProperties 0 get 821 FooterFrameProperties 0 get
816 HeaderOrFooterText 822 HeaderOrFooterText
823 grestore
817}def 824}def
818 825
819/ReportFontInfo{ 826/ReportFontInfo{
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3bb9e41cd2c..6e693be77c2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,134 @@
12004-04-03 Juri Linkov <juri@jurta.org>
2
3 * descr-text.el (describe-property-list): Add `font-lock-face'.
4
5 * dired.el (dired-font-lock-keywords): Fix permission regexps.
6
72004-04-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
8
9 * x-dnd.el (x-dnd-handle-moz-url, x-dnd-insert-utf16-text): Use
10 utf-16le on little endian machines and utf-16be otherwise.
11
122004-04-02 David Kastrup <dak@gnu.org>
13
14 * net/browse-url.el (browse-url-generic): Use call-process
15 instead of start-process to allow browsers that fork and detach.
16
172004-04-01 Daniel Pfeiffer <occitan@esperanto.org>
18
19 * compile.el (compilation-current-error): New var.
20 (compilation-setup, compile-mouse-goto-error)
21 (compile-goto-error, next-error): Use it.
22 (compilation-skip-to-next-location): Default to t, which gives
23 contiguous skipping like old compile (where this was redundant).
24 (compilation-next-error): Prevent previous-* commands from moving
25 back to message at or just before point.
26
272004-04-01 Nick Roberts <nick@nick.uklinux.net>
28
29 * progmodes/gdb-ui.el (gdb-view-source-function, gdb-view-assembler)
30 (gdb-source-info): Don't display source at startup, if required.
31 (gdb-show-main): New option.
32 (gdba): Update documentation.
33 (gdb-source): Cover case of auto-display output.
34
352004-03-31 Luc Teirlinck <teirllm@auburn.edu>
36
37 * autorevert.el: Delete obsolete autoload's and defvar's.
38 (auto-revert-check-vc-info): New user option.
39 (auto-revert-vc-cvs-file-version, auto-revert-vc-buffer-p)
40 (auto-revert-handler-vc): Delete.
41 (auto-revert-handler): Treat return value `fast' of
42 buffer-stale-function specially. Check `auto-revert-check-vc-info'.
43
44 * buff-menu.el (Buffer-menu-mode): Make the buffer-stale-function
45 return `fast'.
46
47 * files.el (buffer-stale-function): Doc change.
48
492004-03-31 Vinicius Jose Latorre <viniciusjl@ig.com.br>
50
51 * printing.el: New tip on Tips section.
52 (pr-version): New version number (6.7.4).
53 (pr-shell-file-name): Initialization fix.
54
552004-03-31 Juri Linkov <juri@jurta.org>
56
57 * dired.el: Add autoload for `dired-do-touch'.
58 (dired-touch-program): New var.
59 (dired-mode-map): Bind `dired-do-touch' to T and add menu-item.
60 (dired-no-confirm): Add `touch' to docstring.
61
62 * dired-aux.el (dired-do-touch): New fun.
63 (dired-do-chxxx): Add argument -t for touch operation.
64
65 * dired-x.el (dired-mark-sexp): Replace hard-coded month names by
66 `dired-move-to-filename-regexp'.
67
682004-03-31 H,Ae(Bkan Granath <hakan.granath@kau.se> (tiny change)
69
70 * dired.el (dired-move-to-filename-regexp): Add . to HH:MM.
71
722004-03-30 Vinicius Jose Latorre <viniciusjl@ig.com.br>
73
74 * progmodes/ebnf2ps.el (ebnf-eps-finish-and-write): Write a buffer if
75 and only if the buffer was modified.
76
772004-03-30 Kenichi Handa <handa@m17n.org>
78
79 * international/characters.el: Delete pairs for U+2308..U+230B.
80
812004-03-29 Nick Roberts <nick@nick.uklinux.net>
82
83 * progmodes/gud.el (gud-gdb-marker-filter): Include "\n" in regexp
84 to detect the beginning of a level 2 or 3 annotation.
85
862004-03-29 Kenichi Handa <handa@m17n.org>
87
88 * international/ucs-tables.el (ucs-insert): Fix the error message.
89
902004-03-29 Kenichi Handa <handa@m17n.org>
91
92 * international/mule-util.el (char-displayable-p): Fix generation
93 of XLFD file name.
94
95 * Makefile.in (setwins, setwins_almost): Change directory to $wd
96 before finding directories by `find'.
97
982004-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
99
100 * subr.el (interactive-form): Delete. Now implemented in C.
101
102 * pcvs.el (cvs-parse-process): Workaround for Darwin.
103
104 * vc.el (vc-version-diff, vc-default-diff-tree): Change `rel' -> `rev'.
105 (vc-diff-label): New fun.
106 (vc-diff-internal): Use it.
107
108 * progmodes/gdb-ui.el (gdb-post-prompt): Fix test.
109
1102004-03-28 Vinicius Jose Latorre <viniciusjl@ig.com.br>
111
112 * progmodes/ebnf-abn.el (ebnf-abn-parser): Handle initial comments.
113
114 * progmodes/ebnf-ebx.el: New file, implement a parser for EBNF used to
115 specify XML (EBNFX).
116
117 * progmodes/ebnf2ps.el: Doc fix.
118 (ebnf-version): New version number (4.1).
119 (ebnf-syntax): Adjust customization.
120 (ebnf-style-database): Add ebnfx entry.
121 (ebnf-syntax-alist): Add ebnfx initialization.
122 (ebnf-ebx-parser, ebnf-ebx-initialize): Autoloaded funs from ebnf-ebx.
123
124 * printing.el: Doc fix.
125 (pr-version): New version number (6.7.3).
126 (pr-menu-position): Adjust X and Y positions when mouse-pixel-position
127 returns nil for mouse position. Reported by Drew Adams
128 <drew.adams@oracle.com>.
129 (pr-update-menus): Modify interactive declaration. Reported by Drew
130 Adams <drew.adams@oracle.com>.
131
12004-03-28 Nick Roberts <nick@nick.uklinux.net> 1322004-03-28 Nick Roberts <nick@nick.uklinux.net>
2 133
3 * progmodes/gdb-ui.el (gdb-ann3, gdb-send-item) 134 * progmodes/gdb-ui.el (gdb-ann3, gdb-send-item)
@@ -286,12 +417,14 @@
286 functions. 417 functions.
287 (auto-revert-buffers): Delete call to auto-revert-buffer-p. 418 (auto-revert-buffers): Delete call to auto-revert-buffer-p.
288 419
289 * dired.el (dired-directory-changed-p, dired-buffer-stale-p): New funs. 420 * dired.el (dired-directory-changed-p): New fun, extracted from
421 dired-internal-noselect.
422 (dired-buffer-stale-p): New fun.
290 (dired-internal-noselect): Use dired-directory-changed-p. 423 (dired-internal-noselect): Use dired-directory-changed-p.
291 Eliminate revert messages. 424 Eliminate revert messages.
292 (dired-mode): Set buffer-stale-function to dired-buffer-stale-p. 425 (dired-mode): Set buffer-stale-function to dired-buffer-stale-p.
293 426
2942004-03-23 Kenichi Handa <handa@etlken2> 4272004-03-23 Kenichi Handa <handa@m17n.org>
295 428
296 * international/characters.el: Setup syntaxes for more parentheses 429 * international/characters.el: Setup syntaxes for more parentheses
297 Unicode characters. 430 Unicode characters.
@@ -940,12 +1073,12 @@
940 1073
9412004-02-28 Vinicius Jose Latorre <viniciusjl@ig.com.br> 10742004-02-28 Vinicius Jose Latorre <viniciusjl@ig.com.br>
942 1075
943 * ebnf-abn.el: Doc fix. 1076 * progmodes/ebnf-abn.el: Doc fix.
944 1077
945 * ebnf-bnf.el: Doc fix. 1078 * progmodes/ebnf-bnf.el: Doc fix.
946 (ebnf-repeat): Code fix. 1079 (ebnf-repeat): Code fix.
947 1080
948 * ebnf2ps.el: Doc fix. 1081 * progmodes/ebnf2ps.el: Doc fix.
949 (ebnf-syntax-directory, ebnf-syntax-file): New funs. 1082 (ebnf-syntax-directory, ebnf-syntax-file): New funs.
950 1083
9512004-02-28 Juri Linkov <juri@jurta.org> 10842004-02-28 Juri Linkov <juri@jurta.org>
@@ -1011,8 +1144,8 @@
1011 1144
10122004-02-25 Vinicius Jose Latorre <viniciusjl@ig.com.br> 11452004-02-25 Vinicius Jose Latorre <viniciusjl@ig.com.br>
1013 1146
1014 * ebnf2ps.el: Doc fix. For compatibility with Emacs 20, define 1147 * progmodes/ebnf2ps.el: Doc fix. For compatibility with Emacs 20,
1015 assq-delete-all if it's not defined. 1148 define assq-delete-all if it's not defined.
1016 (ebnf-generate-region): Code fix. 1149 (ebnf-generate-region): Code fix.
1017 1150
1018 * printing.el: Doc fix. 1151 * printing.el: Doc fix.
@@ -1021,12 +1154,13 @@
1021 1154
10222004-02-24 Vinicius Jose Latorre <viniciusjl@ig.com.br> 11552004-02-24 Vinicius Jose Latorre <viniciusjl@ig.com.br>
1023 1156
1024 * ebnf-abn.el: New file, implements an ABNF parser. 1157 * progmodes/ebnf-abn.el: New file, implements an ABNF parser.
1025 1158
1026 * ebnf2ps.el: Doc fix. Accept ABNF (Augmented BNF). New arrow shapes: 1159 * progmodes/ebnf2ps.el: Doc fix. Accept ABNF (Augmented BNF). New
1027 semi-up-hollow, semi-up-full, semi-down-hollow and semi-down-full. 1160 arrow shapes: semi-up-hollow, semi-up-full, semi-down-hollow and
1028 Fix a bug on productions like test = {"test"}* | ( "tt" ["test"] ). 1161 semi-down-full. Fix a bug on productions like test = {"test"}* | (
1029 Reported by Markus Dreyer <mdreyer@ix.urz.uni-heidelberg.de>. 1162 "tt" ["test"] ). Reported by Markus Dreyer
1163 <mdreyer@ix.urz.uni-heidelberg.de>.
1030 (ebnf-version): New version number (4.0). 1164 (ebnf-version): New version number (4.0).
1031 (ebnf-print-directory, ebnf-print-file, ebnf-spool-directory) 1165 (ebnf-print-directory, ebnf-print-file, ebnf-spool-directory)
1032 (ebnf-spool-file, ebnf-eps-directory, ebnf-eps-file) 1166 (ebnf-spool-file, ebnf-eps-directory, ebnf-eps-file)
@@ -1046,18 +1180,19 @@
1046 (ebnf-make-terminal1, ebnf-make-or-more1, ebnf-make-repeat) 1180 (ebnf-make-terminal1, ebnf-make-or-more1, ebnf-make-repeat)
1047 (ebnf-token-repeat): Code fix. 1181 (ebnf-token-repeat): Code fix.
1048 1182
1049 * ebnf-yac.el: Doc fix. Handle Bison pragmas %nonassoc, %right, %left 1183 * progmodes/ebnf-yac.el: Doc fix. Handle Bison pragmas %nonassoc,
1050 and %prec. Suggested by Matthew K. Junker <junker@alum.mit.edu>. 1184 %right, %left and %prec. Suggested by Matthew K. Junker
1185 <junker@alum.mit.edu>.
1051 (ebnf-yac-definitions, ebnf-yac-lex): Code fix. 1186 (ebnf-yac-definitions, ebnf-yac-lex): Code fix.
1052 1187
1053 * ebnf-iso.el: Doc fix. 1188 * progmodes/ebnf-iso.el: Doc fix.
1054 (ebnf-iso-token-table, ebnf-iso-non-terminal-chars): Adjust vars. 1189 (ebnf-iso-token-table, ebnf-iso-non-terminal-chars): Adjust vars.
1055 (ebnf-iso-lex): Code fix. 1190 (ebnf-iso-lex): Code fix.
1056 1191
1057 * ebnf-bnf.el: Doc fix. 1192 * progmodes/ebnf-bnf.el: Doc fix.
1058 (ebnf-bnf-lex): Code fix. 1193 (ebnf-bnf-lex): Code fix.
1059 1194
1060 * ebnf-otz.el: Doc fix. 1195 * progmodes/ebnf-otz.el: Doc fix.
1061 1196
10622004-02-23 Luc Teirlinck <teirllm@auburn.edu> 11972004-02-23 Luc Teirlinck <teirllm@auburn.edu>
1063 1198
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index e1c6b779db2..9efd587a199 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -136,17 +136,17 @@ emacs = EMACSLOADPATH=$(lisp) $(EMACS) $(EMACSOPT)
136 136
137# Common command to find subdirectories 137# Common command to find subdirectories
138 138
139setwins=subdirs=`find $$wd -type d -print`; \ 139setwins=subdirs=`(cd $$wd; find . -type d -print)`; \
140 for file in $$subdirs; do \ 140 for file in $$subdirs; do \
141 case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \ 141 case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \
142 *) wins="$$wins $$file" ;; \ 142 *) wins="$$wins $$wd/$$file" ;; \
143 esac; \ 143 esac; \
144 done 144 done
145 145
146setwins_almost=subdirs=`find $$wd -type d -print`; \ 146setwins_almost=subdirs=`(cd $$wd; find . -type d -print)`; \
147 for file in $$subdirs; do \ 147 for file in $$subdirs; do \
148 case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \ 148 case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \
149 *) wins="$$wins $$file" ;; \ 149 *) wins="$$wins $$wd/$$file" ;; \
150 esac; \ 150 esac; \
151 done 151 done
152 152
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 165c6b8b24f..6e74a96eff5 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -70,14 +70,8 @@
70;; Dependencies: 70;; Dependencies:
71 71
72(require 'timer) 72(require 'timer)
73(autoload 'dired-get-filename "dired")
74(autoload 'vc-workfile-version "vc-hooks")
75(autoload 'vc-mode-line "vc-hooks")
76 73
77(eval-when-compile 74(eval-when-compile (require 'cl))
78 (defvar dired-directory)
79 (defvar vc-mode)
80 (require 'cl))
81 75
82 76
83;; Custom Group: 77;; Custom Group:
@@ -191,6 +185,27 @@ not necessarily make manual updates useless for non-file buffers."
191 :group 'auto-revert 185 :group 'auto-revert
192 :type 'hook) 186 :type 'hook)
193 187
188(defcustom auto-revert-check-vc-info nil
189 "If non-nil Auto Revert Mode reliably updates version control info.
190Auto Revert Mode updates version control info whenever the buffer
191needs reverting, regardless of the value of this variable.
192However, the version control state can change without changes to
193the work file. If the change is made from the current Emacs
194session, all info is updated. But if, for instance, a new
195version is checked in from outside the current Emacs session, the
196version control number in the mode line, as well as other version
197control related information, may not be properly updated. If you
198are worried about this, set this variable to a non-nil value.
199
200This currently works by automatically updating the version
201control info every `auto-revert-interval' seconds. Nevertheless,
202it should not cause excessive CPU usage on a reasonably fast
203machine, if it does not apply to too many version controlled
204buffers. CPU usage depends on the version control system"
205 :group 'auto-revert
206 :type 'boolean
207 :version "21.4")
208
194(defvar global-auto-revert-ignore-buffer nil 209(defvar global-auto-revert-ignore-buffer nil
195 "*When non-nil, Global Auto-Revert Mode will not revert this buffer. 210 "*When non-nil, Global Auto-Revert Mode will not revert this buffer.
196 211
@@ -279,87 +294,29 @@ will use an up-to-date value of `auto-revert-interval'"
279 (not (memq major-mode 294 (not (memq major-mode
280 global-auto-revert-ignore-modes))))) 295 global-auto-revert-ignore-modes)))))
281 296
282(defun auto-revert-vc-cvs-file-version (file)
283 "Get version of FILE by reading control file on disk."
284 (let* ((control "CVS/Entries")
285 (name (file-name-nondirectory file))
286 (path (format "%s/%s"
287 (file-name-directory file)
288 control)))
289 (when (file-exists-p path)
290 (with-temp-buffer
291 (insert-file-contents-literally path)
292 (goto-char (point-min))
293 (when (re-search-forward
294 ;; /file.txt/1.3/Mon Sep 15 18:43:20 2003//
295 (format "%s/\\([.0-9]+\\)" (regexp-quote name))
296 nil t)
297 (match-string 1))))))
298
299(defun auto-revert-vc-buffer-p ()
300 "Check if buffer is version controlled."
301 (and (boundp 'vc-mode)
302 (string-match "[0-9]" (or vc-mode ""))))
303
304(defun auto-revert-handler-vc ()
305 "Check if version controlled buffer needs revert."
306 ;; [Emacs 1]
307 ;; 1. File is saved (*)
308 ;; 2. checkin is done 1.1 -> 1.2
309 ;; 3. VC reverts, so that updated version number is shown in mode line
310 ;;
311 ;; Suppose the same file has been opened in another Emacs and
312 ;; autorevert.el is on.
313 ;;
314 ;; [Emacs 2]
315 ;; 1. Step (1) is detected and buffer is reverted.
316 ;; 2. But check in does not always change the file in dis, but possibly only
317 ;; control files like CVS/Entries
318 ;; 3. The buffer is not reverted to update VC version line.
319 ;; Incorrect version number 1.1 is shown in this Emacs
320 ;;
321 (when (featurep 'vc)
322 (let* ((file (buffer-file-name))
323 (backend (vc-backend (buffer-file-name)))
324 (version-buffer (vc-workfile-version file)))
325 (when (stringp version-buffer)
326 (cond
327 ((eq backend 'CVS)
328 (let ((version-file
329 (auto-revert-vc-cvs-file-version (buffer-file-name))))
330 (and (stringp version-file)
331 (not (string-match version-file version-buffer)))))
332 ((eq backend 'RCS)
333 ;; TODO:
334 ))))))
335
336(defun auto-revert-handler () 297(defun auto-revert-handler ()
337 "Revert current buffer, if appropriate. 298 "Revert current buffer, if appropriate.
338This is an internal function used by Auto-Revert Mode." 299This is an internal function used by Auto-Revert Mode."
339 (unless (buffer-modified-p) 300 (unless (buffer-modified-p)
340 (let (revert) 301 (let (revert)
341 (cond 302 (or (and (buffer-file-name)
342 ((auto-revert-vc-buffer-p) 303 (file-readable-p (buffer-file-name))
343 (when (auto-revert-handler-vc) 304 (not (verify-visited-file-modtime (current-buffer)))
344 (setq revert 'vc))) 305 (setq revert t))
345 ((or (and (buffer-file-name) 306 (and (or auto-revert-mode global-auto-revert-non-file-buffers)
346 (file-readable-p (buffer-file-name)) 307 revert-buffer-function
347 (not (verify-visited-file-modtime (current-buffer)))) 308 (boundp 'buffer-stale-function)
348 (and (or auto-revert-mode global-auto-revert-non-file-buffers) 309 (functionp buffer-stale-function)
349 revert-buffer-function 310 (setq revert (funcall buffer-stale-function t))))
350 (boundp 'buffer-stale-function)
351 (functionp buffer-stale-function)
352 (funcall buffer-stale-function t)))
353 (setq revert t)))
354 (when revert 311 (when revert
355 (when auto-revert-verbose 312 (when (and auto-revert-verbose
313 (not (eq revert 'fast)))
356 (message "Reverting buffer `%s'." (buffer-name))) 314 (message "Reverting buffer `%s'." (buffer-name)))
357 (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes) 315 (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))
358 ;; `preserve-modes' avoids changing the (minor) modes. But we 316 ;; `preserve-modes' avoids changing the (minor) modes. But we
359 ;; do want to reset the mode for VC, so we do it explicitly. 317 ;; do want to reset the mode for VC, so we do it manually.
360 (vc-find-file-hook) 318 (when (or revert auto-revert-check-vc-info)
361 (if (eq revert 'vc) 319 (vc-find-file-hook)))))
362 (vc-mode-line buffer-file-name))))))
363 320
364(defun auto-revert-buffers () 321(defun auto-revert-buffers ()
365 "Revert buffers as specified by Auto-Revert and Global Auto-Revert Mode. 322 "Revert buffers as specified by Auto-Revert and Global Auto-Revert Mode.
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index a1b0f4093c7..da1c8ed586e 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -185,7 +185,7 @@ Letters do not insert themselves; instead, they are commands.
185 (set (make-local-variable 'revert-buffer-function) 185 (set (make-local-variable 'revert-buffer-function)
186 'Buffer-menu-revert-function) 186 'Buffer-menu-revert-function)
187 (set (make-local-variable 'buffer-stale-function) 187 (set (make-local-variable 'buffer-stale-function)
188 #'(lambda (&optional noconfirm) t)) 188 #'(lambda (&optional noconfirm) 'fast))
189 (setq truncate-lines t) 189 (setq truncate-lines t)
190 (setq buffer-read-only t) 190 (setq buffer-read-only t)
191 (run-hooks 'buffer-menu-mode-hook)) 191 (run-hooks 'buffer-menu-mode-hook))
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index abc0d588a14..30ef3dcf05e 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -99,8 +99,9 @@ if that value is non-nil."
99(defun describe-property-list (properties) 99(defun describe-property-list (properties)
100 "Insert a description of PROPERTIES in the current buffer. 100 "Insert a description of PROPERTIES in the current buffer.
101PROPERTIES should be a list of overlay or text properties. 101PROPERTIES should be a list of overlay or text properties.
102The `category' and `face' properties are made into widget buttons 102The `category', `face' and `font-lock-face' properties are made
103that call `describe-text-category' or `describe-face' when pushed." 103into widget buttons that call `describe-text-category' or
104`describe-face' when pushed."
104 ;; Sort the properties by the size of their value. 105 ;; Sort the properties by the size of their value.
105 (dolist (elt (sort (let ((ret nil) 106 (dolist (elt (sort (let ((ret nil)
106 (key nil) 107 (key nil)
@@ -110,7 +111,7 @@ that call `describe-text-category' or `describe-face' when pushed."
110 (setq key (pop properties) 111 (setq key (pop properties)
111 val (pop properties) 112 val (pop properties)
112 len 0) 113 len 0)
113 (unless (or (memq key '(category face)) 114 (unless (or (memq key '(category face font-lock-face))
114 (widgetp val)) 115 (widgetp val))
115 (setq val (pp-to-string val) 116 (setq val (pp-to-string val)
116 len (length val))) 117 len (length val)))
@@ -128,7 +129,7 @@ that call `describe-text-category' or `describe-face' when pushed."
128 :notify `(lambda (&rest ignore) 129 :notify `(lambda (&rest ignore)
129 (describe-text-category ',value)) 130 (describe-text-category ',value))
130 (format "%S" value))) 131 (format "%S" value)))
131 ((eq key 'face) 132 ((memq key '(face font-lock-face))
132 (widget-create 'link 133 (widget-create 'link
133 :notify `(lambda (&rest ignore) 134 :notify `(lambda (&rest ignore)
134 (describe-face ',value)) 135 (describe-face ',value))
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 1fc8e0e805a..0709e0cfe1c 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -186,7 +186,7 @@ List has a form of (file-name full-file-name (attribute-list))"
186 (directory-files dir))) 186 (directory-files dir)))
187 187
188(defun dired-do-chxxx (attribute-name program op-symbol arg) 188(defun dired-do-chxxx (attribute-name program op-symbol arg)
189 ;; Change file attributes (mode, group, owner) of marked files and 189 ;; Change file attributes (mode, group, owner, timestamp) of marked files and
190 ;; refresh their file lines. 190 ;; refresh their file lines.
191 ;; ATTRIBUTE-NAME is a string describing the attribute to the user. 191 ;; ATTRIBUTE-NAME is a string describing the attribute to the user.
192 ;; PROGRAM is the program used to change the attribute. 192 ;; PROGRAM is the program used to change the attribute.
@@ -203,7 +203,10 @@ List has a form of (file-name full-file-name (attribute-list))"
203 (dired-bunch-files 10000 203 (dired-bunch-files 10000
204 (function dired-check-process) 204 (function dired-check-process)
205 (append 205 (append
206 (list operation program new-attribute) 206 (list operation program)
207 (if (eq op-symbol 'touch)
208 '("-t") nil)
209 (list new-attribute)
207 (if (string-match "gnu" system-configuration) 210 (if (string-match "gnu" system-configuration)
208 '("--") nil)) 211 '("--") nil))
209 files)) 212 files))
@@ -236,6 +239,12 @@ This calls chmod, thus symbolic modes like `g+w' are allowed."
236 (error "chown not supported on this system")) 239 (error "chown not supported on this system"))
237 (dired-do-chxxx "Owner" dired-chown-program 'chown arg)) 240 (dired-do-chxxx "Owner" dired-chown-program 'chown arg))
238 241
242(defun dired-do-touch (&optional arg)
243 "Change the timestamp of the marked (or next ARG) files.
244This calls touch."
245 (interactive "P")
246 (dired-do-chxxx "Timestamp" dired-touch-program 'touch arg))
247
239;; Process all the files in FILES in batches of a convenient size, 248;; Process all the files in FILES in batches of a convenient size,
240;; by means of (FUNCALL FUNCTION ARGS... SOME-FILES...). 249;; by means of (FUNCALL FUNCTION ARGS... SOME-FILES...).
241;; Batches are chosen to need less than MAX chars for the file names, 250;; Batches are chosen to need less than MAX chars for the file names,
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index fc30428e562..21fe4902e58 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1517,8 +1517,7 @@ to mark all zero length files."
1517 ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid. 1517 ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid.
1518 (setq uid (buffer-substring (+ (point) 1) 1518 (setq uid (buffer-substring (+ (point) 1)
1519 (progn (forward-word 1) (point)))) 1519 (progn (forward-word 1) (point))))
1520 (re-search-forward "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|\ 1520 (re-search-forward dired-move-to-filename-regexp)
1521Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)")
1522 (goto-char (match-beginning 1)) 1521 (goto-char (match-beginning 1))
1523 (forward-char -1) 1522 (forward-char -1)
1524 (setq size (string-to-int (buffer-substring (save-excursion 1523 (setq size (string-to-int (buffer-substring (save-excursion
diff --git a/lisp/dired.el b/lisp/dired.el
index cfdb57d614c..fd51f7158fa 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -79,6 +79,9 @@ some of the `ls' switches are not supported; see the doc string of
79(defvar dired-chmod-program "chmod" 79(defvar dired-chmod-program "chmod"
80 "Name of chmod command (usually `chmod').") 80 "Name of chmod command (usually `chmod').")
81 81
82(defvar dired-touch-program "touch"
83 "Name of touch command (usually `touch').")
84
82;;;###autoload 85;;;###autoload
83(defcustom dired-ls-F-marks-symlinks nil 86(defcustom dired-ls-F-marks-symlinks nil
84 "*Informs dired about how `ls -lF' marks symbolic links. 87 "*Informs dired about how `ls -lF' marks symbolic links.
@@ -315,10 +318,10 @@ Subexpression 2 must end right before the \\n or \\r.")
315 ;; Fixme: we could also put text properties on the permission 318 ;; Fixme: we could also put text properties on the permission
316 ;; fields with keymaps to frob the permissions, somewhat a la XEmacs. 319 ;; fields with keymaps to frob the permissions, somewhat a la XEmacs.
317 (list (concat dired-re-maybe-mark dired-re-inode-size 320 (list (concat dired-re-maybe-mark dired-re-inode-size
318 "[-d]....\\(w\\)..\\(w\\).") ; group writable 321 "[-d]....\\(w\\)....") ; group writable
319 '(1 font-lock-warning-face)) 322 '(1 font-lock-comment-face))
320 (list (concat dired-re-maybe-mark dired-re-inode-size 323 (list (concat dired-re-maybe-mark dired-re-inode-size
321 "[-d]....\\(w\\)....") ; world writable 324 "[-d].......\\(w\\).") ; world writable
322 '(1 font-lock-comment-face)) 325 '(1 font-lock-comment-face))
323 ;; 326 ;;
324 ;; Subdirectories. 327 ;; Subdirectories.
@@ -919,6 +922,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
919 (define-key map "Q" 'dired-do-query-replace-regexp) 922 (define-key map "Q" 'dired-do-query-replace-regexp)
920 (define-key map "R" 'dired-do-rename) 923 (define-key map "R" 'dired-do-rename)
921 (define-key map "S" 'dired-do-symlink) 924 (define-key map "S" 'dired-do-symlink)
925 (define-key map "T" 'dired-do-touch)
922 (define-key map "X" 'dired-do-shell-command) 926 (define-key map "X" 'dired-do-shell-command)
923 (define-key map "Z" 'dired-do-compress) 927 (define-key map "Z" 'dired-do-compress)
924 (define-key map "!" 'dired-do-shell-command) 928 (define-key map "!" 'dired-do-shell-command)
@@ -1189,6 +1193,9 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1189 (define-key map [menu-bar operate chmod] 1193 (define-key map [menu-bar operate chmod]
1190 '(menu-item "Change Mode..." dired-do-chmod 1194 '(menu-item "Change Mode..." dired-do-chmod
1191 :help "Change mode (attributes) of marked files")) 1195 :help "Change mode (attributes) of marked files"))
1196 (define-key map [menu-bar operate touch]
1197 '(menu-item "Change Timestamp..." dired-do-touch
1198 :help "Change timestamp of marked files"))
1192 (define-key map [menu-bar operate load] 1199 (define-key map [menu-bar operate load]
1193 '(menu-item "Load" dired-do-load 1200 '(menu-item "Load" dired-do-load
1194 :help "Load marked Emacs Lisp files")) 1201 :help "Load marked Emacs Lisp files"))
@@ -1630,7 +1637,7 @@ DIR must be a directory name, not a file name."
1630 (s " ") 1637 (s " ")
1631 (yyyy "[0-9][0-9][0-9][0-9]") 1638 (yyyy "[0-9][0-9][0-9][0-9]")
1632 (dd "[ 0-3][0-9]") 1639 (dd "[ 0-3][0-9]")
1633 (HH:MM "[ 0-2][0-9]:[0-5][0-9]") 1640 (HH:MM "[ 0-2][0-9][:.][0-5][0-9]")
1634 (seconds "[0-6][0-9]\\([.,][0-9]+\\)?") 1641 (seconds "[0-6][0-9]\\([.,][0-9]+\\)?")
1635 (zone "[-+][0-2][0-9][0-5][0-9]") 1642 (zone "[-+][0-2][0-9][0-5][0-9]")
1636 (iso-mm-dd "[01][0-9]-[0-3][0-9]") 1643 (iso-mm-dd "[01][0-9]-[0-3][0-9]")
@@ -2333,8 +2340,8 @@ if there are no flagged files."
2333(defvar dired-no-confirm nil 2340(defvar dired-no-confirm nil
2334 "A list of symbols for commands dired should not confirm. 2341 "A list of symbols for commands dired should not confirm.
2335Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress', 2342Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress',
2336`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink' and 2343`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink',
2337`uncompress'.") 2344`touch' and `uncompress'.")
2338 2345
2339(defun dired-mark-pop-up (bufname op-symbol files function &rest args) 2346(defun dired-mark-pop-up (bufname op-symbol files function &rest args)
2340 "Return FUNCTION's result on ARGS after showing which files are marked. 2347 "Return FUNCTION's result on ARGS after showing which files are marked.
@@ -2977,6 +2984,10 @@ This calls chmod, thus symbolic modes like `g+w' are allowed."
2977 "Change the owner of the marked (or next ARG) files." 2984 "Change the owner of the marked (or next ARG) files."
2978 t) 2985 t)
2979 2986
2987(autoload 'dired-do-touch "dired-aux"
2988 "Change the timestamp of the marked (or next ARG) files."
2989 t)
2990
2980(autoload 'dired-do-print "dired-aux" 2991(autoload 'dired-do-print "dired-aux"
2981 "Print the marked (or next ARG) files. 2992 "Print the marked (or next ARG) files.
2982Uses the shell command coming from variables `lpr-command' and 2993Uses the shell command coming from variables `lpr-command' and
diff --git a/lisp/files.el b/lisp/files.el
index 706c6856775..be40a0b595e 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3458,8 +3458,10 @@ The function you specify is responsible for updating (or preserving) point.")
3458 "Function to check whether a non-file buffer needs reverting. 3458 "Function to check whether a non-file buffer needs reverting.
3459This should be a function with one optional argument NOCONFIRM. 3459This should be a function with one optional argument NOCONFIRM.
3460Auto Revert Mode sets NOCONFIRM to t. The function should return 3460Auto Revert Mode sets NOCONFIRM to t. The function should return
3461non-nil if the buffer should be reverted. The buffer is current 3461non-nil if the buffer should be reverted. A return value of
3462when this function is called. 3462`fast' means that the need for reverting was not checked, but
3463that reverting the buffer is fast. The buffer is current when
3464this function is called.
3463 3465
3464The idea behind the NOCONFIRM argument is that it should be 3466The idea behind the NOCONFIRM argument is that it should be
3465non-nil if the buffer is going to be reverted without asking the 3467non-nil if the buffer is going to be reverted without asking the
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 301d8ea5454..7af456d1878 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -1129,8 +1129,6 @@
1129 '("$,1sEsF(B" ; U+2045 U+2046 1129 '("$,1sEsF(B" ; U+2045 U+2046
1130 "$,1s}s~(B" ; U+207D U+207E 1130 "$,1s}s~(B" ; U+207D U+207E
1131 "$,1t-t.(B" ; U+208D U+208E 1131 "$,1t-t.(B" ; U+208D U+208E
1132 "$,1zhzi(B" ; U+2308 U+2309
1133 "$,1zjzk(B" ; U+230A U+230B
1134 "$,1{){*(B" ; U+2329 U+232A 1132 "$,1{){*(B" ; U+2329 U+232A
1135 "$,1|T|U(B" ; U+23B4 U+23B5 1133 "$,1|T|U(B" ; U+23B4 U+23B5
1136 "$,2&H&I(B" ; U+2768 U+2769 1134 "$,2&H&I(B" ; U+2768 U+2769
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index b667ec9227a..3a3539359ec 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -384,10 +384,15 @@ basis, this may not be accurate."
384 ;; Now FONT-PATTERN is a string or a cons of family 384 ;; Now FONT-PATTERN is a string or a cons of family
385 ;; field pattern and registry field pattern. 385 ;; field pattern and registry field pattern.
386 (or (stringp font-pattern) 386 (or (stringp font-pattern)
387 (setq font-pattern (concat "-" 387 (let ((family (or (car font-pattern) "*"))
388 (or (car font-pattern) "*") 388 (registry (or (cdr font-pattern) "*")))
389 "-*-" 389 (or (string-match "-" family)
390 (cdr font-pattern)))) 390 (setq family (concat "*-" family)))
391 (or (string-match "-" registry)
392 (setq registry (concat registry "-*")))
393 (setq font-pattern
394 (format "-%s-*-*-*-*-*-*-*-*-*-*-%s"
395 family registry))))
391 (x-list-fonts font-pattern 'default (selected-frame) 1))))) 396 (x-list-fonts font-pattern 'default (selected-frame) 1)))))
392 (t 397 (t
393 (let ((coding (terminal-coding-system))) 398 (let ((coding (terminal-coding-system)))
diff --git a/lisp/international/ucs-tables.el b/lisp/international/ucs-tables.el
index 476c8dfc191..5574cf3d954 100644
--- a/lisp/international/ucs-tables.el
+++ b/lisp/international/ucs-tables.el
@@ -1247,12 +1247,14 @@ unification on input operations."
1247 "Insert the Emacs character representation of the given Unicode. 1247 "Insert the Emacs character representation of the given Unicode.
1248Interactively, prompts for a hex string giving the code." 1248Interactively, prompts for a hex string giving the code."
1249 (interactive "sUnicode (hex): ") 1249 (interactive "sUnicode (hex): ")
1250 (let ((c (decode-char 'ucs (if (integerp arg) 1250 (or (integerp arg)
1251 arg 1251 (setq arg (string-to-number arg 16)))
1252 (string-to-number arg 16))))) 1252 (let ((c (decode-char 'ucs arg)))
1253 (if c 1253 (if c
1254 (insert c) 1254 (insert c)
1255 (error "Character can't be decoded to UCS")))) 1255 (if (or (< arg 0) (> arg #x10FFFF))
1256 (error "Not a Unicode character code: 0x%X" arg)
1257 (error "Character U+%04X is not yet supported" arg)))))
1256 1258
1257;;; Dealing with non-8859 character sets. 1259;;; Dealing with non-8859 character sets.
1258 1260
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index fa0d7ea7914..a70e08028d2 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1,6 +1,6 @@
1;;; browse-url.el --- pass a URL to a WWW browser 1;;; browse-url.el --- pass a URL to a WWW browser
2 2
3;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 3;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Denis Howe <dbh@doc.ic.ac.uk> 6;; Author: Denis Howe <dbh@doc.ic.ac.uk>
@@ -1352,8 +1352,8 @@ don't offer a form of remote control."
1352 (interactive (browse-url-interactive-arg "URL: ")) 1352 (interactive (browse-url-interactive-arg "URL: "))
1353 (if (not browse-url-generic-program) 1353 (if (not browse-url-generic-program)
1354 (error "No browser defined (`browse-url-generic-program')")) 1354 (error "No browser defined (`browse-url-generic-program')"))
1355 (apply 'start-process (concat browse-url-generic-program url) nil 1355 (apply 'call-process browse-url-generic-program nil
1356 browse-url-generic-program 1356 0 nil
1357 (append browse-url-generic-args (list url)))) 1357 (append browse-url-generic-args (list url))))
1358 1358
1359;;;###autoload 1359;;;###autoload
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index a7683ce371e..cc72d02f64a 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -1,6 +1,6 @@
1;;; pcvs.el --- a front-end to CVS 1;;; pcvs.el --- a front-end to CVS
2 2
3;; Copyright (C) 1991,92,93,94,95,95,97,98,99,2000,02,2003 3;; Copyright (C) 1991,92,93,94,95,95,97,98,99,2000,02,03,2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com 6;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com
@@ -12,7 +12,7 @@
12;; (Stefan Monnier) monnier@cs.yale.edu 12;; (Stefan Monnier) monnier@cs.yale.edu
13;; (Greg Klanderman) greg@alphatech.com 13;; (Greg Klanderman) greg@alphatech.com
14;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com 14;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com
15;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu 15;; Maintainer: (Stefan Monnier) monnier@gnu.org
16;; Keywords: CVS, version control, release management 16;; Keywords: CVS, version control, release management
17 17
18;; This file is part of GNU Emacs. 18;; This file is part of GNU Emacs.
@@ -669,6 +669,14 @@ DCD is the `dont-change-disc' flag to use when parsing that output.
669SUBDIR is the subdirectory (if any) where this command was run. 669SUBDIR is the subdirectory (if any) where this command was run.
670OLD-FIS is the list of fileinfos on which the cvs command was applied and 670OLD-FIS is the list of fileinfos on which the cvs command was applied and
671 which should be considered up-to-date if they are missing from the output." 671 which should be considered up-to-date if they are missing from the output."
672 (when (eq system-type 'darwin)
673 ;; Fixup the ^D^H^H inserted at beginning of buffer sometimes on MacOSX
674 ;; because of the call to `process-send-eof'.
675 (save-excursion
676 (goto-char (point-min))
677 (while (re-search-forward "^\\^D+" nil t)
678 (let ((inhibit-read-only t))
679 (delete-region (match-beginning 0) (match-end 0))))))
672 (let* ((fileinfos (cvs-parse-buffer 'cvs-parse-table dcd subdir)) 680 (let* ((fileinfos (cvs-parse-buffer 'cvs-parse-table dcd subdir))
673 last) 681 last)
674 (with-current-buffer cvs-buffer 682 (with-current-buffer cvs-buffer
diff --git a/lisp/printing.el b/lisp/printing.el
index 377e1fc4538..1e65fdba4ea 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5,13 +5,13 @@
5 5
6;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> 6;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
7;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br> 7;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
8;; Time-stamp: <2004/03/10 20:37:21 vinicius> 8;; Time-stamp: <2004/03/31 23:14:47 vinicius>
9;; Keywords: wp, print, PostScript 9;; Keywords: wp, print, PostScript
10;; Version: 6.7.2 10;; Version: 6.7.4
11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ 11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
12 12
13(defconst pr-version "6.7.2" 13(defconst pr-version "6.7.4"
14 "printing.el, v 6.7.2 <2004/02/29 vinicius> 14 "printing.el, v 6.7.4 <2004/03/31 vinicius>
15 15
16Please send all bug fixes and enhancements to 16Please send all bug fixes and enhancements to
17 Vinicius Jose Latorre <vinicius@cpqd.com.br> 17 Vinicius Jose Latorre <vinicius@cpqd.com.br>
@@ -187,6 +187,10 @@ Please send all bug fixes and enhancements to
187;; another buffer and, then, print the file or the new static buffer. 187;; another buffer and, then, print the file or the new static buffer.
188;; An example of dynamic buffer is the *Messages* buffer. 188;; An example of dynamic buffer is the *Messages* buffer.
189;; 189;;
190;; 4. When running Emacs on Windows with cygwin, check if the
191;; `pr-shell-file-name' variable is set to the proper shell. This shell
192;; will execute the commands to preview/print the buffer, file or directory.
193;;
190;; 194;;
191;; Using `printing' 195;; Using `printing'
192;; ---------------- 196;; ----------------
@@ -2304,7 +2308,8 @@ It's used by `pr-interface'."
2304 2308
2305 2309
2306(defcustom pr-shell-file-name 2310(defcustom pr-shell-file-name
2307 (if (eq pr-path-style 'windows) 2311 (if (and (not pr-cygwin-system)
2312 ps-windows-system)
2308 "cmdproxy.exe" 2313 "cmdproxy.exe"
2309 shell-file-name) 2314 shell-file-name)
2310 "*Specify file name to load inferior shells from." 2315 "*Specify file name to load inferior shells from."
@@ -4572,8 +4577,8 @@ See `pr-visible-entry-alist'.")
4572 (defun pr-menu-position (entry index horizontal) 4577 (defun pr-menu-position (entry index horizontal)
4573 (let ((pos (cdr (pr-e-mouse-pixel-position)))) 4578 (let ((pos (cdr (pr-e-mouse-pixel-position))))
4574 (list 4579 (list
4575 (list (car pos) ; X 4580 (list (or (car pos) 0) ; X
4576 (- (cdr pos) ; Y 4581 (- (or (cdr pos) 0) ; Y
4577 (* (pr-menu-index entry index) pr-menu-char-height))) 4582 (* (pr-menu-index entry index) pr-menu-char-height)))
4578 (selected-frame)))) ; frame 4583 (selected-frame)))) ; frame
4579 ) 4584 )
@@ -4582,9 +4587,9 @@ See `pr-visible-entry-alist'.")
4582 (defun pr-menu-position (entry index horizontal) 4587 (defun pr-menu-position (entry index horizontal)
4583 (let ((pos (cdr (pr-e-mouse-pixel-position)))) 4588 (let ((pos (cdr (pr-e-mouse-pixel-position))))
4584 (list 4589 (list
4585 (list (- (car pos) ; X 4590 (list (- (or (car pos) 0) ; X
4586 (* horizontal pr-menu-char-width)) 4591 (* horizontal pr-menu-char-width))
4587 (- (cdr pos) ; Y 4592 (- (or (cdr pos) 0) ; Y
4588 (* (pr-menu-index entry index) pr-menu-char-height))) 4593 (* (pr-menu-index entry index) pr-menu-char-height)))
4589 (selected-frame)))) ; frame 4594 (selected-frame)))) ; frame
4590 )) 4595 ))
@@ -4656,7 +4661,7 @@ otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is
4656non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is 4661non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is
4657non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is 4662non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is
4658non-nil." 4663non-nil."
4659 (interactive) 4664 (interactive "P")
4660 (pr-update-var 'pr-ps-name pr-ps-printer-alist) 4665 (pr-update-var 'pr-ps-name pr-ps-printer-alist)
4661 (pr-update-var 'pr-txt-name pr-txt-printer-alist) 4666 (pr-update-var 'pr-txt-name pr-txt-printer-alist)
4662 (pr-update-var 'pr-ps-utility pr-ps-utility-alist) 4667 (pr-update-var 'pr-ps-utility pr-ps-utility-alist)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 8415fd2050e..05fb8ee059d 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -227,7 +227,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
227 ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil 227 ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil
228 (2 compilation-info-face) 228 (2 compilation-info-face)
229 (3 compilation-line-face nil t) 229 (3 compilation-line-face nil t)
230 (1 (compilation-error-properties 2 3 nil nil nil 2 nil) 230 (1 (compilation-error-properties 2 3 nil nil nil 0 nil)
231 append))) 231 append)))
232 232
233 (mips-1 233 (mips-1
@@ -1076,11 +1076,17 @@ variable exists."
1076 (if (or noconfirm (yes-or-no-p (format "Restart compilation? "))) 1076 (if (or noconfirm (yes-or-no-p (format "Restart compilation? ")))
1077 (apply 'compilation-start compilation-arguments)))) 1077 (apply 'compilation-start compilation-arguments))))
1078 1078
1079;; This points to the location from where the next error will be found.
1080;; The global commands next/previous/first-error... as well as
1081;; (mouse-)goto-error use this.
1082(defvar compilation-current-error nil)
1083
1079;; A function name can't be a hook, must be something with a value. 1084;; A function name can't be a hook, must be something with a value.
1080(defconst compilation-turn-on-font-lock 'turn-on-font-lock) 1085(defconst compilation-turn-on-font-lock 'turn-on-font-lock)
1081 1086
1082(defun compilation-setup (&optional minor) 1087(defun compilation-setup (&optional minor)
1083 "Prepare the buffer for the compilation parsing commands to work." 1088 "Prepare the buffer for the compilation parsing commands to work."
1089 (make-local-variable 'compilation-current-error)
1084 (make-local-variable 'compilation-error-screen-columns) 1090 (make-local-variable 'compilation-error-screen-columns)
1085 (setq compilation-last-buffer (current-buffer)) 1091 (setq compilation-last-buffer (current-buffer))
1086 (if minor 1092 (if minor
@@ -1233,7 +1239,7 @@ Just inserts the text, but uses `insert-before-markers'."
1233 ;; count this message only if none of the above are true 1239 ;; count this message only if none of the above are true
1234 (setq n (,1+ n))))) 1240 (setq n (,1+ n)))))
1235 1241
1236(defun compilation-next-error (n &optional different-file) 1242(defun compilation-next-error (n &optional different-file pt)
1237 "Move point to the next error in the compilation buffer. 1243 "Move point to the next error in the compilation buffer.
1238Prefix arg N says how many error messages to move forwards (or 1244Prefix arg N says how many error messages to move forwards (or
1239backwards, if negative). 1245backwards, if negative).
@@ -1241,11 +1247,11 @@ Does NOT find the source line like \\[next-error]."
1241 (interactive "p") 1247 (interactive "p")
1242 (or (compilation-buffer-p (current-buffer)) 1248 (or (compilation-buffer-p (current-buffer))
1243 (error "Not in a compilation buffer")) 1249 (error "Not in a compilation buffer"))
1250 (or pt (setq pt (point)))
1244 (setq compilation-last-buffer (current-buffer)) 1251 (setq compilation-last-buffer (current-buffer))
1245 (let* ((pt (point)) 1252 (let* ((msg (get-text-property pt 'message))
1246 (msg (get-text-property pt 'message)) 1253 (loc (car msg))
1247 (loc (car msg)) 1254 last)
1248 last)
1249 (if (zerop n) 1255 (if (zerop n)
1250 (unless (or msg ; find message near here 1256 (unless (or msg ; find message near here
1251 (setq msg (get-text-property (max (1- pt) 1) 'message))) 1257 (setq msg (get-text-property (max (1- pt) 1) 'message)))
@@ -1263,13 +1269,15 @@ Does NOT find the source line like \\[next-error]."
1263 (setq msg (get-text-property pt 'message)) 1269 (setq msg (get-text-property pt 'message))
1264 (setq pt (point))))) 1270 (setq pt (point)))))
1265 (setq last (nth 2 (car msg))) 1271 (setq last (nth 2 (car msg)))
1266 ;; These loops search only either forwards or backwards 1272 (if (>= n 0)
1267 (compilation-loop > next-single-property-change 1- 1273 (compilation-loop > next-single-property-change 1-
1268 (if (get-buffer-process (current-buffer)) 1274 (if (get-buffer-process (current-buffer))
1269 "No more %ss yet" 1275 "No more %ss yet"
1270 "Moved past last %s")) 1276 "Moved past last %s"))
1271 (compilation-loop < previous-single-property-change 1+ 1277 ;; don't move "back" to message at or before point
1272 "Moved back before first %s")) 1278 (setq pt (previous-single-property-change pt 'message))
1279 (compilation-loop < previous-single-property-change 1+
1280 "Moved back before first %s")))
1273 (goto-char pt) 1281 (goto-char pt)
1274 (or msg 1282 (or msg
1275 (error "No %s here" compilation-error)))) 1283 (error "No %s here" compilation-error))))
@@ -1327,6 +1335,7 @@ Prefix arg N says how many files to move backwards (or forwards, if negative)."
1327 (mouse-set-point event) 1335 (mouse-set-point event)
1328 (if (get-text-property (point) 'directory) 1336 (if (get-text-property (point) 'directory)
1329 (dired-other-window (car (get-text-property (point) 'directory))) 1337 (dired-other-window (car (get-text-property (point) 'directory)))
1338 (setq compilation-current-error (point))
1330 (next-error 0))) 1339 (next-error 0)))
1331 1340
1332(defun compile-goto-error () 1341(defun compile-goto-error ()
@@ -1338,6 +1347,7 @@ Use this command in a compilation log buffer. Sets the mark at point there."
1338 (if (get-text-property (point) 'directory) 1347 (if (get-text-property (point) 'directory)
1339 (dired-other-window (car (get-text-property (point) 'directory))) 1348 (dired-other-window (car (get-text-property (point) 'directory)))
1340 (push-mark) 1349 (push-mark)
1350 (setq compilation-current-error (point))
1341 (next-error 0))) 1351 (next-error 0)))
1342 1352
1343;; Return a compilation buffer. 1353;; Return a compilation buffer.
@@ -1393,10 +1403,12 @@ See variable `compilation-error-regexp-alist' for customization ideas."
1393 (set-buffer (setq compilation-last-buffer (compilation-find-buffer))) 1403 (set-buffer (setq compilation-last-buffer (compilation-find-buffer)))
1394 (let* ((columns compilation-error-screen-columns) ; buffer's local value 1404 (let* ((columns compilation-error-screen-columns) ; buffer's local value
1395 (last 1) 1405 (last 1)
1396 (loc (compilation-next-error (or n 1))) 1406 (loc (compilation-next-error (or n 1) nil
1407 (or compilation-current-error (point-min))))
1397 (end-loc (nth 2 loc)) 1408 (end-loc (nth 2 loc))
1398 (marker (point-marker))) 1409 (marker (point-marker)))
1399 (setq loc (car loc)) 1410 (setq compilation-current-error (point-marker)
1411 loc (car loc))
1400 ;; If loc contains no marker, no error in that file has been visited. If 1412 ;; If loc contains no marker, no error in that file has been visited. If
1401 ;; the marker is invalid the buffer has been killed. So, recalculate all 1413 ;; the marker is invalid the buffer has been killed. So, recalculate all
1402 ;; markers for that file. 1414 ;; markers for that file.
@@ -1448,10 +1460,10 @@ With prefix arg N, visit the source code of the Nth error.
1448This operates on the output from the \\[compile] command." 1460This operates on the output from the \\[compile] command."
1449 (interactive "p") 1461 (interactive "p")
1450 (set-buffer (setq compilation-last-buffer (compilation-find-buffer))) 1462 (set-buffer (setq compilation-last-buffer (compilation-find-buffer)))
1451 (goto-char (point-min)) 1463 (setq compilation-current-error (point-min))
1452 (next-error n)) 1464 (next-error n))
1453 1465
1454(defvar compilation-skip-to-next-location nil 1466(defvar compilation-skip-to-next-location t
1455 "*If non-nil, skip multiple error messages for the same source location.") 1467 "*If non-nil, skip multiple error messages for the same source location.")
1456 1468
1457(defcustom compilation-skip-threshold 1 1469(defcustom compilation-skip-threshold 1
diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el
index 9c341c5181c..e41d27d0c1f 100644
--- a/lisp/progmodes/ebnf-abn.el
+++ b/lisp/progmodes/ebnf-abn.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 5;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
6;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Time-stamp: <2004/02/28 17:40:41 vinicius> 7;; Time-stamp: <2004/03/18 23:49:58 vinicius>
8;; Keywords: wp, ebnf, PostScript 8;; Keywords: wp, ebnf, PostScript
9;; Version: 1.0 9;; Version: 1.0
10 10
@@ -233,6 +233,8 @@
233 (setq token (ebnf-abn-lex)) 233 (setq token (ebnf-abn-lex))
234 (and (eq token 'end-of-input) 234 (and (eq token 'end-of-input)
235 (error "Invalid ABNF file format")) 235 (error "Invalid ABNF file format"))
236 (and (eq token 'end-of-rule)
237 (setq token (ebnf-abn-lex)))
236 (while (not (eq token 'end-of-input)) 238 (while (not (eq token 'end-of-input))
237 (ebnf-message-float 239 (ebnf-message-float
238 "Parsing...%s%%" 240 "Parsing...%s%%"
diff --git a/lisp/progmodes/ebnf-ebx.el b/lisp/progmodes/ebnf-ebx.el
new file mode 100644
index 00000000000..4e9fc24ade1
--- /dev/null
+++ b/lisp/progmodes/ebnf-ebx.el
@@ -0,0 +1,672 @@
1;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX)
2
3;; Copyright (C) 2004 Free Sofware Foundation, Inc.
4
5;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
6;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Time-stamp: <2004/03/22 08:53:21 vinicius>
8;; Keywords: wp, ebnf, PostScript
9;; Version: 1.0
10
11;; This file is part of GNU Emacs.
12
13;; GNU Emacs is free software; you can redistribute it and/or modify
14;; it under the terms of the GNU General Public License as published by
15;; the Free Software Foundation; either version 2, or (at your option)
16;; any later version.
17
18;; GNU Emacs is distributed in the hope that it will be useful,
19;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;; GNU General Public License for more details.
22
23;; You should have received a copy of the GNU General Public License
24;; along with GNU Emacs; see the file COPYING. If not, write to the
25;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26;; Boston, MA 02111-1307, USA.
27
28;;; Commentary:
29
30;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
31;;
32;;
33;; This is part of ebnf2ps package.
34;;
35;; This package defines a parser for EBNF used to specify XML (EBNFX).
36;;
37;; See ebnf2ps.el for documentation.
38;;
39;;
40;; EBNFX Syntax
41;; ------------
42;;
43;; See the URL:
44;; `http://www.w3.org/TR/2004/REC-xml-20040204/#sec-notation'
45;; (Extensible Markup Language (XML) 1.0 (Third Edition))
46;;
47;;
48;; rule ::= symbol '::=' expression
49;; /* rules are separated by at least one blank line. */
50;;
51;; expression ::= concatenation ('|' concatenation)*
52;;
53;; concatenation ::= exception*
54;;
55;; exception ::= term ('-' term)?
56;;
57;; term ::= factor ('*' | '+' | '?')?
58;;
59;; factor ::= hex-char+
60;; | '[' '^'? ( char ( '-' char )? )+ ']'
61;; | '"' 'string' '"'
62;; | "'" "string" "'"
63;; | '(' expression ')'
64;; | symbol
65;;
66;; symbol ::= 'upper or lower case letter'
67;; ('upper or lower case letter' | '-' | '_')*
68;; /* upper and lower 8-bit accentuated characters are included */
69;;
70;; hex-char ::= '#x' [0-9A-Fa-f]+
71;;
72;; char ::= hex-char | 'any character except control characters'
73;; /* 8-bit accentuated characters are included */
74;;
75;; any-char ::= char | 'newline' | 'tab'
76;;
77;; ignore ::= '[' ('wfc' | 'WFC' | 'vc' | 'VC') ':' ( any-char - ']' )* ']'
78;;
79;; comment ::= '/*' ( any-char - '*/' ) '*/'
80;;
81;;
82;; Below is the Notation section extracted from the URL cited above.
83;;
84;; 6 Notation
85;;
86;; The formal grammar of XML is given in this specification using a simple
87;; Extended Backus-Naur Form (EBNF) notation. Each rule in the grammar defines
88;; one symbol, in the form
89;;
90;; symbol ::= expression
91;;
92;; Symbols are written with an initial capital letter if they are the start
93;; symbol of a regular language, otherwise with an initial lowercase letter.
94;; Literal strings are quoted.
95;;
96;; Within the expression on the right-hand side of a rule, the following
97;; expressions are used to match strings of one or more characters:
98;;
99;; #xN
100;;
101;; where N is a hexadecimal integer, the expression matches the character
102;; whose number (code point) in ISO/IEC 10646 is N. The number of leading
103;; zeros in the #xN form is insignificant.
104;;
105;; [a-zA-Z], [#xN-#xN]
106;;
107;; matches any Char with a value in the range(s) indicated (inclusive).
108;;
109;; [abc], [#xN#xN#xN]
110;;
111;; matches any Char with a value among the characters enumerated.
112;; Enumerations and ranges can be mixed in one set of brackets.
113;;
114;; [^a-z], [^#xN-#xN]
115;;
116;; matches any Char with a value outside the range indicated.
117;;
118;; [^abc], [^#xN#xN#xN]
119;;
120;; matches any Char with a value not among the characters given.
121;; Enumerations and ranges of forbidden values can be mixed in one set of
122;; brackets.
123;;
124;; "string"
125;;
126;; matches a literal string matching that given inside the double quotes.
127;;
128;; 'string'
129;;
130;; matches a literal string matching that given inside the single quotes.
131;;
132;; These symbols may be combined to match more complex patterns as follows,
133;; where A and B represent simple expressions:
134;;
135;; (expression)
136;;
137;; expression is treated as a unit and may be combined as described in this
138;; list.
139;;
140;; A?
141;;
142;; matches A or nothing; optional A.
143;;
144;; A B
145;;
146;; matches A followed by B. This operator has higher precedence than
147;; alternation; thus A B | C D is identical to (A B) | (C D).
148;;
149;; A | B
150;;
151;; matches A or B.
152;;
153;; A - B
154;;
155;; matches any string that matches A but does not match B.
156;;
157;; A+
158;;
159;; matches one or more occurrences of A. Concatenation has higher
160;; precedence than alternation; thus A+ | B+ is identical to (A+) | (B+).
161;;
162;; A*
163;;
164;; matches zero or more occurrences of A. Concatenation has higher
165;; precedence than alternation; thus A* | B* is identical to (A*) | (B*).
166;;
167;; Other notations used in the productions are:
168;;
169;; /* ... */
170;;
171;; comment.
172;;
173;; [ wfc: ... ]
174;;
175;; well-formedness constraint; this identifies by name a constraint on
176;; well-formed documents associated with a production.
177;;
178;; [ vc: ... ]
179;;
180;; validity constraint; this identifies by name a constraint on valid
181;; documents associated with a production.
182;;
183;;
184;; Differences Between EBNFX And ebnf2ps EBNFX
185;; -------------------------------------------
186;;
187;; Besides the characters that EBNFX accepts, ebnf2ps EBNFX accepts also the
188;; underscore (_) and minus (-) for rule name and european 8-bit accentuated
189;; characters (from \240 to \377) for rule name, string and comment. Also
190;; rule name can start with upper case letter.
191;;
192;;
193;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
194
195;;; Code:
196
197
198(require 'ebnf-otz)
199
200
201(defvar ebnf-ebx-lex nil
202 "Value returned by `ebnf-ebx-lex' function.")
203
204
205;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
206;; Syntactic analyzer
207
208
209;;; rulelist ::= rule+
210
211(defun ebnf-ebx-parser (start)
212 "EBNFX parser."
213 (let ((total (+ (- ebnf-limit start) 1))
214 (bias (1- start))
215 (origin (point))
216 rule-list token rule)
217 (goto-char start)
218 (setq token (ebnf-ebx-lex))
219 (and (eq token 'end-of-input)
220 (error "Invalid EBNFX file format"))
221 (and (eq token 'end-of-rule)
222 (setq token (ebnf-ebx-lex)))
223 (while (not (eq token 'end-of-input))
224 (ebnf-message-float
225 "Parsing...%s%%"
226 (/ (* (- (point) bias) 100.0) total))
227 (setq token (ebnf-ebx-rule token)
228 rule (cdr token)
229 token (car token))
230 (or (ebnf-add-empty-rule-list rule)
231 (setq rule-list (cons rule rule-list))))
232 (goto-char origin)
233 rule-list))
234
235
236;;; rule ::= symbol '::=' expression
237
238
239(defun ebnf-ebx-rule (token)
240 (let ((name ebnf-ebx-lex)
241 (action ebnf-action)
242 elements)
243 (setq ebnf-action nil)
244 (or (eq token 'non-terminal)
245 (error "Invalid rule name"))
246 (setq token (ebnf-ebx-lex))
247 (or (eq token 'production)
248 (error "Invalid rule: missing `::='"))
249 (setq elements (ebnf-ebx-expression))
250 (or (memq (car elements) '(end-of-rule end-of-input))
251 (error "Invalid rule: there is no end of rule"))
252 (setq elements (cdr elements))
253 (ebnf-eps-add-production name)
254 (cons (ebnf-ebx-lex)
255 (ebnf-make-production name elements action))))
256
257
258;; expression ::= concatenation ('|' concatenation)*
259
260
261(defun ebnf-ebx-expression ()
262 (let (body concatenation)
263 (while (eq (car (setq concatenation
264 (ebnf-ebx-concatenation (ebnf-ebx-lex))))
265 'alternative)
266 (setq body (cons (cdr concatenation) body)))
267 (ebnf-token-alternative body concatenation)))
268
269
270;; concatenation ::= exception*
271
272
273(defun ebnf-ebx-concatenation (token)
274 (let ((term (ebnf-ebx-exception token))
275 seq)
276 (or (setq token (car term)
277 term (cdr term))
278 (error "Empty element"))
279 (setq seq (cons term seq))
280 (while (setq term (ebnf-ebx-exception token)
281 token (car term)
282 term (cdr term))
283 (setq seq (cons term seq)))
284 (cons token
285 (if (= (length seq) 1)
286 ;; sequence with only one element
287 (car seq)
288 ;; a real sequence
289 (ebnf-make-sequence (nreverse seq))))))
290
291
292;;; exception ::= term ('-' term)?
293
294
295(defun ebnf-ebx-exception (token)
296 (let ((term (ebnf-ebx-term token)))
297 (if (eq (car term) 'exception)
298 (let ((except (ebnf-ebx-term (ebnf-ebx-lex))))
299 (cons (car except)
300 (ebnf-make-except (cdr term) (cdr except))))
301 term)))
302
303
304
305;;; term ::= factor ('*' | '+' | '?')?
306
307
308(defun ebnf-ebx-term (token)
309 (let ((factor (ebnf-ebx-factor token)))
310 (when factor
311 (setq token (ebnf-ebx-lex))
312 (cond ((eq token 'zero-or-more)
313 (setq factor (ebnf-make-zero-or-more factor)
314 token (ebnf-ebx-lex)))
315 ((eq token 'one-or-more)
316 (setq factor (ebnf-make-one-or-more factor)
317 token (ebnf-ebx-lex)))
318 ((eq token 'optional)
319 (setq factor (ebnf-token-optional factor)
320 token (ebnf-ebx-lex)))))
321 (cons token factor)))
322
323
324;;; factor ::= hex-char+
325;;; | '[' '^'? ( char ( '-' char )? )+ ']'
326;;; | '"' 'string' '"'
327;;; | "'" "string" "'"
328;;; | '(' expression ')'
329;;; | symbol
330;;;
331;;; symbol ::= 'upper or lower case letter'
332;;; ('upper or lower case letter' | '-' | '_')*
333;;; /* upper and lower 8-bit accentuated characters are included */
334;;;
335;;; hex-char ::= '#x' [0-9A-Fa-f]+
336;;;
337;;; char ::= hex-char | 'any character except control characters'
338;;; /* 8-bit accentuated characters are included */
339;;;
340;;; any-char ::= char | 'newline' | 'tab'
341
342
343(defun ebnf-ebx-factor (token)
344 (cond
345 ;; terminal
346 ((eq token 'terminal)
347 (ebnf-make-terminal ebnf-ebx-lex))
348 ;; non-terminal
349 ((eq token 'non-terminal)
350 (ebnf-make-non-terminal ebnf-ebx-lex))
351 ;; group
352 ((eq token 'begin-group)
353 (let ((body (ebnf-ebx-expression)))
354 (or (eq (car body) 'end-group)
355 (error "Missing `)'"))
356 (cdr body)))
357 ;; no element
358 (t
359 nil)
360 ))
361
362
363;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
364;; Lexical analyzer
365
366
367(defconst ebnf-ebx-token-table (make-vector 256 'error)
368 "Vector used to map characters to a lexical token.")
369
370
371(defun ebnf-ebx-initialize ()
372 "Initialize EBNFX token table."
373 ;; control character & control 8-bit character are set to `error'
374 (let ((char ?\101))
375 ;; printable character: A-Z
376 (while (< char ?\133)
377 (aset ebnf-ebx-token-table char 'non-terminal)
378 (setq char (1+ char)))
379 ;; printable character: a-z
380 (setq char ?\141)
381 (while (< char ?\173)
382 (aset ebnf-ebx-token-table char 'non-terminal)
383 (setq char (1+ char)))
384 ;; European 8-bit accentuated characters:
385 (setq char ?\240)
386 (while (< char ?\400)
387 (aset ebnf-ebx-token-table char 'non-terminal)
388 (setq char (1+ char)))
389 ;; Override end of line characters:
390 (aset ebnf-ebx-token-table ?\n 'end-of-rule) ; [NL] linefeed
391 (aset ebnf-ebx-token-table ?\r 'end-of-rule) ; [CR] carriage return
392 ;; Override space characters:
393 (aset ebnf-ebx-token-table ?\013 'space) ; [VT] vertical tab
394 (aset ebnf-ebx-token-table ?\t 'space) ; [HT] horizontal tab
395 (aset ebnf-ebx-token-table ?\ 'space) ; [SP] space
396 ;; Override form feed character:
397 (aset ebnf-ebx-token-table ?\f 'form-feed) ; [FF] form feed
398 ;; Override other lexical characters:
399 (aset ebnf-ebx-token-table ?# 'hash)
400 (aset ebnf-ebx-token-table ?\" 'double-quote)
401 (aset ebnf-ebx-token-table ?\' 'single-quote)
402 (aset ebnf-ebx-token-table ?\( 'begin-group)
403 (aset ebnf-ebx-token-table ?\) 'end-group)
404 (aset ebnf-ebx-token-table ?- 'exception)
405 (aset ebnf-ebx-token-table ?: 'colon)
406 (aset ebnf-ebx-token-table ?\[ 'begin-square)
407 (aset ebnf-ebx-token-table ?| 'alternative)
408 (aset ebnf-ebx-token-table ?* 'zero-or-more)
409 (aset ebnf-ebx-token-table ?+ 'one-or-more)
410 (aset ebnf-ebx-token-table ?\? 'optional)
411 ;; Override comment character:
412 (aset ebnf-ebx-token-table ?/ 'comment)))
413
414
415;; replace the range "\240-\377" (see `ebnf-range-regexp').
416(defconst ebnf-ebx-non-terminal-chars
417 (ebnf-range-regexp "-_A-Za-z" ?\240 ?\377))
418(defconst ebnf-ebx-non-terminal-letter-chars
419 (ebnf-range-regexp "A-Za-z" ?\240 ?\377))
420
421
422(defun ebnf-ebx-lex ()
423 "Lexical analyser for EBNFX.
424
425Return a lexical token.
426
427See documentation for variable `ebnf-ebx-lex'."
428 (if (>= (point) ebnf-limit)
429 'end-of-input
430 (let (token)
431 ;; skip spaces and comments
432 (while (if (> (following-char) 255)
433 (progn
434 (setq token 'error)
435 nil)
436 (setq token (aref ebnf-ebx-token-table (following-char)))
437 (cond
438 ((eq token 'space)
439 (skip-chars-forward " \013\t" ebnf-limit)
440 (< (point) ebnf-limit))
441 ((eq token 'comment)
442 (ebnf-ebx-skip-comment))
443 ((eq token 'form-feed)
444 (forward-char)
445 (setq ebnf-action 'form-feed))
446 ((eq token 'end-of-rule)
447 (ebnf-ebx-skip-end-of-rule))
448 ((and (eq token 'begin-square)
449 (let ((case-fold-search t))
450 (looking-at "\\[\\(wfc\\|vc\\):")))
451 (ebnf-ebx-skip-constraint))
452 (t nil)
453 )))
454 (cond
455 ;; end of input
456 ((>= (point) ebnf-limit)
457 'end-of-input)
458 ;; error
459 ((eq token 'error)
460 (error "Illegal character"))
461 ;; end of rule
462 ((eq token 'end-of-rule)
463 'end-of-rule)
464 ;; terminal: #x [0-9A-Fa-f]+
465 ((eq token 'hash)
466 (setq ebnf-ebx-lex (ebnf-ebx-character))
467 'terminal)
468 ;; terminal: "string"
469 ((eq token 'double-quote)
470 (setq ebnf-ebx-lex (ebnf-ebx-string ?\"))
471 'terminal)
472 ;; terminal: 'string'
473 ((eq token 'single-quote)
474 (setq ebnf-ebx-lex (ebnf-ebx-string ?\'))
475 'terminal)
476 ;; terminal: [ ^? ( char ( - char )? )+ ]
477 ((eq token 'begin-square)
478 (setq ebnf-ebx-lex (ebnf-ebx-range))
479 'terminal)
480 ;; non-terminal: NAME
481 ((eq token 'non-terminal)
482 (setq ebnf-ebx-lex
483 (ebnf-buffer-substring ebnf-ebx-non-terminal-chars))
484 'non-terminal)
485 ;; colon: ::=
486 ((eq token 'colon)
487 (or (looking-at "::=")
488 (error "Missing `::=' token"))
489 (forward-char 3)
490 'production)
491 ;; miscellaneous: (, ), *, +, ?, |, -
492 (t
493 (forward-char)
494 token)
495 ))))
496
497
498;; replace the range "\177-\237" (see `ebnf-range-regexp').
499(defconst ebnf-ebx-constraint-chars
500 (ebnf-range-regexp "^\000-\010\016-\037]" ?\177 ?\237))
501
502
503(defun ebnf-ebx-skip-constraint ()
504 (or (> (skip-chars-forward ebnf-ebx-constraint-chars ebnf-limit) 0)
505 (error "Invalid character"))
506 (or (= (following-char) ?\])
507 (error "Missing end of constraint `]'"))
508 (forward-char)
509 t)
510
511
512
513(defun ebnf-ebx-skip-end-of-rule ()
514 (let (eor-p)
515 (while (progn
516 ;; end of rule ==> 2 or more consecutive end of lines
517 (setq eor-p (or (> (skip-chars-forward "\r\n" ebnf-limit) 1)
518 eor-p))
519 ;; skip spaces
520 (skip-chars-forward " \013\t" ebnf-limit)
521 ;; skip comments
522 (and (= (following-char) ?/)
523 (ebnf-ebx-skip-comment))))
524 (not eor-p)))
525
526
527;; replace the range "\177-\237" (see `ebnf-range-regexp').
528(defconst ebnf-ebx-comment-chars
529 (ebnf-range-regexp "^\000-\010\016-\037\\*" ?\177 ?\237))
530(defconst ebnf-ebx-filename-chars
531 (ebnf-range-regexp "^\000-\037\\*" ?\177 ?\237))
532
533
534(defun ebnf-ebx-skip-comment ()
535 (forward-char)
536 (or (= (following-char) ?*)
537 (error "Invalid beginning of comment"))
538 (forward-char)
539 (cond
540 ;; open EPS file
541 ((and ebnf-eps-executing (= (following-char) ?\[))
542 (ebnf-eps-add-context (ebnf-ebx-eps-filename)))
543 ;; close EPS file
544 ((and ebnf-eps-executing (= (following-char) ?\]))
545 (ebnf-eps-remove-context (ebnf-ebx-eps-filename)))
546 ;; any other action in comment
547 (t
548 (setq ebnf-action (aref ebnf-comment-table (following-char))))
549 )
550 (while (progn
551 (skip-chars-forward ebnf-ebx-comment-chars ebnf-limit)
552 (or (= (following-char) ?*)
553 (error "Missing end of comment"))
554 (forward-char)
555 (and (/= (following-char) ?/)
556 (< (point) ebnf-limit))))
557 ;; check for a valid end of comment
558 (and (>= (point) ebnf-limit)
559 (error "Missing end of comment"))
560 (forward-char)
561 t)
562
563
564(defun ebnf-ebx-eps-filename ()
565 (forward-char)
566 (let (fname nchar)
567 (while (progn
568 (setq fname
569 (concat fname
570 (ebnf-buffer-substring ebnf-ebx-filename-chars)))
571 (and (< (point) ebnf-limit)
572 (> (setq nchar (skip-chars-forward "*" ebnf-limit)) 0)
573 (< (point) ebnf-limit)
574 (/= (following-char) ?/)))
575 (setq fname (concat fname (make-string nchar ?*))
576 nchar nil))
577 (if (or (not nchar) (= nchar 0))
578 fname
579 (and (< (point) ebnf-limit)
580 (= (following-char) ?/)
581 (setq nchar (1- nchar)))
582 (concat fname (make-string nchar ?*)))))
583
584
585;; replace the range "\240-\377" (see `ebnf-range-regexp').
586(defconst ebnf-ebx-double-string-chars
587 (ebnf-range-regexp "\t -!#-~" ?\240 ?\377))
588(defconst ebnf-ebx-single-string-chars
589 (ebnf-range-regexp "\t -&(-~" ?\240 ?\377))
590
591
592(defun ebnf-ebx-string (delim)
593 (buffer-substring-no-properties
594 (progn
595 (forward-char)
596 (point))
597 (progn
598 (skip-chars-forward (if (= delim ?\")
599 ebnf-ebx-double-string-chars
600 ebnf-ebx-single-string-chars)
601 ebnf-limit)
602 (or (= (following-char) delim)
603 (error "Missing string delimiter `%c'" delim))
604 (prog1
605 (point)
606 (forward-char)))))
607
608
609(defun ebnf-ebx-character ()
610 ;; #x [0-9A-Fa-f]+
611 (buffer-substring-no-properties
612 (point)
613 (progn
614 (ebnf-ebx-hex-character)
615 (point))))
616
617
618(defun ebnf-ebx-range ()
619 ;; [ ^? ( char ( - char )? )+ ]
620 (buffer-substring-no-properties
621 (point)
622 (progn
623 (forward-char)
624 (and (= (following-char) ?^)
625 (forward-char))
626 (and (= (following-char) ?-)
627 (forward-char))
628 (while (progn
629 (ebnf-ebx-any-character)
630 (when (= (following-char) ?-)
631 (forward-char)
632 (ebnf-ebx-any-character))
633 (and (/= (following-char) ?\])
634 (< (point) ebnf-limit))))
635 (and (>= (point) ebnf-limit)
636 (error "Missing end of character range `]'"))
637 (forward-char)
638 (point))))
639
640
641(defun ebnf-ebx-any-character ()
642 (let ((char (following-char)))
643 (cond ((= char ?#)
644 (ebnf-ebx-hex-character t))
645 ((or (and (<= ?\ char) (<= char ?\")) ; #
646 (and (<= ?$ char) (<= char ?,)) ; -
647 (and (<= ?. char) (<= char ?\\)) ; ]
648 (and (<= ?^ char) (<= char ?~))
649 (and (<= ?\240 char) (<= char ?\377)))
650 (forward-char))
651 (t
652 (error "Invalid character `%c'" char)))))
653
654
655(defun ebnf-ebx-hex-character (&optional no-error)
656 ;; #x [0-9A-Fa-f]+
657 (forward-char)
658 (if (/= (following-char) ?x)
659 (or no-error
660 (error "Invalid hexadecimal character"))
661 (forward-char)
662 (or (> (skip-chars-forward "0-9A-Fa-f" ebnf-limit) 0)
663 (error "Invalid hexadecimal character"))))
664
665
666;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
667
668
669(provide 'ebnf-ebx)
670
671;;; arch-tag: bfe2f95b-66bc-4dc6-8b7e-b7831e68f5fb
672;;; ebnf-ebx.el ends here
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index 96ec53ac501..56125cbea5a 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -5,9 +5,9 @@
5 5
6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
8;; Time-stamp: <2004/02/29 14:06:59 vinicius> 8;; Time-stamp: <2004/03/30 21:49:21 vinicius>
9;; Keywords: wp, ebnf, PostScript 9;; Keywords: wp, ebnf, PostScript
10;; Version: 4.0 10;; Version: 4.1
11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ 11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
12 12
13;; This file is part of GNU Emacs. 13;; This file is part of GNU Emacs.
@@ -27,8 +27,8 @@
27;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 27;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
28;; Boston, MA 02111-1307, USA. 28;; Boston, MA 02111-1307, USA.
29 29
30(defconst ebnf-version "4.0" 30(defconst ebnf-version "4.1"
31 "ebnf2ps.el, v 4.0 <2004/02/28 vinicius> 31 "ebnf2ps.el, v 4.1 <2004/03/18 vinicius>
32 32
33Vinicius's last change version. When reporting bugs, please also 33Vinicius's last change version. When reporting bugs, please also
34report the version of Emacs, if any, that ebnf2ps was running with. 34report the version of Emacs, if any, that ebnf2ps was running with.
@@ -320,6 +320,10 @@ Please send all bug fixes and enhancements to
320;; setting: 320;; setting:
321;; `ebnf-yac-ignore-error-recovery'. 321;; `ebnf-yac-ignore-error-recovery'.
322;; 322;;
323;; `ebnfx' ebnf2ps recognizes the syntax described in the URL:
324;; `http://www.w3.org/TR/2004/REC-xml-20040204/#sec-notation'
325;; ("Extensible Markup Language (XML) 1.0 (Third Edition)")
326;;
323;; Any other value is treated as `ebnf'. 327;; Any other value is treated as `ebnf'.
324;; 328;;
325;; The default value is `ebnf'. 329;; The default value is `ebnf'.
@@ -1679,9 +1683,14 @@ Valid values are:
1679 setting: 1683 setting:
1680 `ebnf-yac-ignore-error-recovery'. 1684 `ebnf-yac-ignore-error-recovery'.
1681 1685
1686 `ebnfx' ebnf2ps recognizes the syntax described in the URL:
1687 `http://www.w3.org/TR/2004/REC-xml-20040204/#sec-notation'
1688 (\"Extensible Markup Language (XML) 1.0 (Third Edition)\")
1689
1682Any other value is treated as `ebnf'." 1690Any other value is treated as `ebnf'."
1683 :type '(radio :tag "Syntax" 1691 :type '(radio :tag "Syntax"
1684 (const ebnf) (const abnf) (const iso-ebnf) (const yacc)) 1692 (const ebnf) (const abnf) (const iso-ebnf)
1693 (const yacc) (const ebnfx))
1685 :group 'ebnf-syntactic) 1694 :group 'ebnf-syntactic)
1686 1695
1687 1696
@@ -2393,6 +2402,10 @@ See also `ebnf-syntax-buffer'."
2393 (yacc 2402 (yacc
2394 default 2403 default
2395 (ebnf-syntax . 'yacc)) 2404 (ebnf-syntax . 'yacc))
2405 ;; ebnfx default
2406 (ebnfx
2407 default
2408 (ebnf-syntax . 'ebnfx))
2396 ) 2409 )
2397 "Style database. 2410 "Style database.
2398 2411
@@ -4650,7 +4663,8 @@ killed after process termination."
4650 '((iso-ebnf ebnf-iso-parser ebnf-iso-initialize) 4663 '((iso-ebnf ebnf-iso-parser ebnf-iso-initialize)
4651 (yacc ebnf-yac-parser ebnf-yac-initialize) 4664 (yacc ebnf-yac-parser ebnf-yac-initialize)
4652 (abnf ebnf-abn-parser ebnf-abn-initialize) 4665 (abnf ebnf-abn-parser ebnf-abn-initialize)
4653 (ebnf ebnf-bnf-parser ebnf-bnf-initialize)) 4666 (ebnf ebnf-bnf-parser ebnf-bnf-initialize)
4667 (ebnfx ebnf-ebx-parser ebnf-ebx-initialize))
4654 "Alist associating ebnf syntax with a parser and a initializer.") 4668 "Alist associating ebnf syntax with a parser and a initializer.")
4655 4669
4656 4670
@@ -4748,52 +4762,53 @@ killed after process termination."
4748 4762
4749 4763
4750(defun ebnf-eps-finish-and-write (buffer filename) 4764(defun ebnf-eps-finish-and-write (buffer filename)
4751 (save-excursion 4765 (when (buffer-modified-p buffer)
4752 (set-buffer buffer) 4766 (save-excursion
4753 (setq ebnf-eps-upper-x (max ebnf-eps-upper-x ebnf-eps-max-width) 4767 (set-buffer buffer)
4754 ebnf-eps-upper-y (if (zerop ebnf-eps-upper-y) 4768 (setq ebnf-eps-upper-x (max ebnf-eps-upper-x ebnf-eps-max-width)
4755 ebnf-eps-max-height 4769 ebnf-eps-upper-y (if (zerop ebnf-eps-upper-y)
4756 (+ ebnf-eps-upper-y 4770 ebnf-eps-max-height
4757 ebnf-production-vertical-space 4771 (+ ebnf-eps-upper-y
4758 ebnf-eps-max-height))) 4772 ebnf-production-vertical-space
4759 ;; prologue 4773 ebnf-eps-max-height)))
4760 (goto-char (point-min)) 4774 ;; prologue
4761 (insert 4775 (goto-char (point-min))
4762 "%!PS-Adobe-3.0 EPSF-3.0" 4776 (insert
4763 "\n%%BoundingBox: 0 0 " 4777 "%!PS-Adobe-3.0 EPSF-3.0"
4764 (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y)) 4778 "\n%%BoundingBox: 0 0 "
4765 "\n%%Title: " filename 4779 (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y))
4766 "\n%%CreationDate: " (format-time-string "%T %b %d %Y") 4780 "\n%%Title: " filename
4767 "\n%%Creator: " (user-full-name) " (using ebnf2ps v" ebnf-version ")" 4781 "\n%%CreationDate: " (format-time-string "%T %b %d %Y")
4768 "\n%%DocumentNeededResources: font " 4782 "\n%%Creator: " (user-full-name) " (using ebnf2ps v" ebnf-version ")"
4769 (or ebnf-fonts-required 4783 "\n%%DocumentNeededResources: font "
4770 (setq ebnf-fonts-required 4784 (or ebnf-fonts-required
4771 (mapconcat 'identity 4785 (setq ebnf-fonts-required
4772 (ps-remove-duplicates 4786 (mapconcat 'identity
4773 (mapcar 'ebnf-font-name-select 4787 (ps-remove-duplicates
4774 (list ebnf-production-font 4788 (mapcar 'ebnf-font-name-select
4775 ebnf-terminal-font 4789 (list ebnf-production-font
4776 ebnf-non-terminal-font 4790 ebnf-terminal-font
4777 ebnf-special-font 4791 ebnf-non-terminal-font
4778 ebnf-except-font 4792 ebnf-special-font
4779 ebnf-repeat-font))) 4793 ebnf-except-font
4780 "\n%%+ font "))) 4794 ebnf-repeat-font)))
4781 "\n%%Pages: 0\n%%EndComments\n\n%%BeginProlog\n" 4795 "\n%%+ font ")))
4782 ebnf-eps-prologue) 4796 "\n%%Pages: 0\n%%EndComments\n\n%%BeginProlog\n"
4783 (ebnf-insert-ebnf-prologue) 4797 ebnf-eps-prologue)
4784 (insert ebnf-eps-begin 4798 (ebnf-insert-ebnf-prologue)
4785 "\n0 " (ebnf-format-float 4799 (insert ebnf-eps-begin
4786 (- ebnf-eps-upper-y (* ebnf-font-height-P 0.7))) 4800 "\n0 " (ebnf-format-float
4787 " #ebnf2ps#begin\n") 4801 (- ebnf-eps-upper-y (* ebnf-font-height-P 0.7)))
4788 ;; epilogue 4802 " #ebnf2ps#begin\n")
4789 (goto-char (point-max)) 4803 ;; epilogue
4790 (insert ebnf-eps-end) 4804 (goto-char (point-max))
4791 ;; write file 4805 (insert ebnf-eps-end)
4792 (message "Saving...") 4806 ;; write file
4793 (setq filename (expand-file-name filename)) 4807 (message "Saving...")
4794 (let ((coding-system-for-write 'raw-text-unix)) 4808 (setq filename (expand-file-name filename))
4795 (write-region (point-min) (point-max) filename)) 4809 (let ((coding-system-for-write 'raw-text-unix))
4796 (message "Wrote %s" filename))) 4810 (write-region (point-min) (point-max) filename))
4811 (message "Wrote %s" filename))))
4797 4812
4798 4813
4799(defun ebnf-insert-ebnf-prologue () 4814(defun ebnf-insert-ebnf-prologue ()
@@ -5688,6 +5703,12 @@ killed after process termination."
5688(autoload 'ebnf-yac-initialize "ebnf-yac" 5703(autoload 'ebnf-yac-initialize "ebnf-yac"
5689 "Initializations for Yacc/Bison parser.") 5704 "Initializations for Yacc/Bison parser.")
5690 5705
5706(autoload 'ebnf-ebx-parser "ebnf-ebx"
5707 "EBNFX parser.")
5708
5709(autoload 'ebnf-ebx-initialize "ebnf-ebx"
5710 "Initializations for EBNFX parser.")
5711
5691(autoload 'ebnf-eliminate-empty-rules "ebnf-otz" 5712(autoload 'ebnf-eliminate-empty-rules "ebnf-otz"
5692 "Eliminate empty rules.") 5713 "Eliminate empty rules.")
5693 5714
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 08a5a2ccbd3..6fccd500af2 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -69,9 +69,14 @@
69The directory containing FILE becomes the initial working directory 69The directory containing FILE becomes the initial working directory
70and source-file directory for your debugger. 70and source-file directory for your debugger.
71 71
72If `gdb-many-windows' is nil (the default value) then gdb starts with 72If `gdb-many-windows' is nil (the default value) then gdb just
73just two windows : the GUD and the source buffer. If it is t the 73pops up the GUD buffer unless `gdb-show-main' is t. In this case
74following layout will appear (keybindings given in relevant buffer) : 74it starts with two windows: one displaying the GUD buffer and the
75other with the source file with the main routine of the debugee.
76
77If `gdb-many-windows' is t the layout below will appear
78regardless of the value of `gdb-show-main'. Keybindings are given
79in relevant buffer.
75 80
76--------------------------------------------------------------------- 81---------------------------------------------------------------------
77 GDB Toolbar 82 GDB Toolbar
@@ -81,7 +86,7 @@ GUD buffer (I/O of GDB) | Locals buffer
81 | 86 |
82 | 87 |
83--------------------------------------------------------------------- 88---------------------------------------------------------------------
84Source buffer | Input/Output (of debuggee) buffer 89Source buffer | Input/Output (of debugee) buffer
85 | (comint-mode) 90 | (comint-mode)
86 | 91 |
87 | 92 |
@@ -309,7 +314,7 @@ speedbar."
309 (let ((varnum (match-string 1))) 314 (let ((varnum (match-string 1)))
310 (gdb-enqueue-input 315 (gdb-enqueue-input
311 (list (concat "server interpreter mi \"-var-evaluate-expression " 316 (list (concat "server interpreter mi \"-var-evaluate-expression "
312 varnum "\"\n") 317 varnum "\"\n")
313 `(lambda () (gdb-var-evaluate-expression-handler 318 `(lambda () (gdb-var-evaluate-expression-handler
314 ,varnum t))))))) 319 ,varnum t)))))))
315 (gdb-set-pending-triggers 320 (gdb-set-pending-triggers
@@ -672,7 +677,10 @@ This filter may simply queue output for a later time."
672 (match-string 1 args) 677 (match-string 1 args)
673 (string-to-int (match-string 2 args)))) 678 (string-to-int (match-string 2 args))))
674 (setq gdb-current-address (match-string 3 args)) 679 (setq gdb-current-address (match-string 3 args))
675 (setq gdb-view-source t)) 680 (setq gdb-view-source t)
681;; cover for auto-display output which comes *before*
682;; stopped annotation
683 (if (eq (gdb-get-output-sink) 'inferior) (gdb-set-output-sink 'user)))
676 684
677(defun gdb-send-item (item) 685(defun gdb-send-item (item)
678 (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) 686 (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
@@ -778,7 +786,8 @@ output from the current command if that happens to be appropriate."
778 (gdb-invalidate-registers) 786 (gdb-invalidate-registers)
779 (gdb-invalidate-locals) 787 (gdb-invalidate-locals)
780 (gdb-invalidate-threads) 788 (gdb-invalidate-threads)
781 (unless (eq window-system 'mac) 789 (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3.
790 ;; FIXME: with GDB-6 on Darwin, this might very well work.
782 (dolist (frame (frame-list)) 791 (dolist (frame (frame-list))
783 (when (string-equal (frame-parameter frame 'name) "Speedbar") 792 (when (string-equal (frame-parameter frame 'name) "Speedbar")
784 (setq gdb-var-changed t) ; force update 793 (setq gdb-var-changed t) ; force update
@@ -1596,24 +1605,38 @@ the source buffer."
1596(defun gdb-view-source-function () 1605(defun gdb-view-source-function ()
1597 (interactive) 1606 (interactive)
1598 (if gdb-view-source 1607 (if gdb-view-source
1599 (if gud-last-last-frame 1608 (if (window-live-p gdb-source-window)
1600 (set-window-buffer gdb-source-window 1609 (set-window-buffer gdb-source-window
1601 (gud-find-file (car gud-last-last-frame))) 1610 (if gud-last-last-frame
1602 (set-window-buffer gdb-source-window (gud-find-file gdb-main-file)))) 1611 (gud-find-file (car gud-last-last-frame))
1612 (gud-find-file gdb-main-file)))
1613 (setq gdb-source-window
1614 (display-buffer
1615 (if gud-last-last-frame
1616 (gud-find-file (car gud-last-last-frame))
1617 (gud-find-file gdb-main-file))))))
1603 (setq gdb-selected-view 'source)) 1618 (setq gdb-selected-view 'source))
1604 1619
1605(defun gdb-view-assembler() 1620(defun gdb-view-assembler()
1606 (interactive) 1621 (interactive)
1607 (set-window-buffer gdb-source-window 1622 (if (window-live-p gdb-source-window)
1608 (gdb-get-create-buffer 'gdb-assembler-buffer)) 1623 (set-window-buffer gdb-source-window
1624 (gdb-get-create-buffer 'gdb-assembler-buffer))
1625 (setq gdb-source-window
1626 (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))))
1609 (setq gdb-selected-view 'assembler)) 1627 (setq gdb-selected-view 'assembler))
1610 1628
1611;(defun gdb-view-both() 1629;(defun gdb-view-both()
1612;(interactive) 1630;(interactive)
1613;(setq gdb-selected-view 'both)) 1631;(setq gdb-selected-view 'both))
1614 1632
1615;; layout for all the windows 1633(defcustom gdb-show-main nil
1634 "Nil means don't display source file containing the main routine."
1635 :type 'boolean
1636 :group 'gud)
1637
1616(defun gdb-setup-windows () 1638(defun gdb-setup-windows ()
1639 "Layout the window pattern for gdb-many-windows."
1617 (gdb-display-locals-buffer) 1640 (gdb-display-locals-buffer)
1618 (gdb-display-stack-buffer) 1641 (gdb-display-stack-buffer)
1619 (delete-other-windows) 1642 (delete-other-windows)
@@ -1714,20 +1737,20 @@ buffers."
1714 (if (looking-at "\\S-*") 1737 (if (looking-at "\\S-*")
1715 (setq gdb-main-file (match-string 0))) 1738 (setq gdb-main-file (match-string 0)))
1716 (setq gdb-view-source nil)) 1739 (setq gdb-view-source nil))
1717 (delete-other-windows)
1718 (switch-to-buffer gud-comint-buffer)
1719 (if gdb-many-windows 1740 (if gdb-many-windows
1720 (gdb-setup-windows) 1741 (gdb-setup-windows)
1721 (gdb-display-breakpoints-buffer) 1742 (gdb-get-create-buffer 'gdb-breakpoints-buffer)
1722 (delete-other-windows) 1743 (when gdb-show-main
1723 (split-window) 1744 (switch-to-buffer gud-comint-buffer)
1724 (other-window 1) 1745 (delete-other-windows)
1725 (switch-to-buffer 1746 (split-window)
1726 (if gdb-view-source 1747 (other-window 1)
1727 (gud-find-file gdb-main-file) 1748 (switch-to-buffer
1728 (gdb-get-create-buffer 'gdb-assembler-buffer))) 1749 (if gdb-view-source
1729 (setq gdb-source-window (get-buffer-window (current-buffer))) 1750 (gud-find-file gdb-main-file)
1730 (other-window 1))) 1751 (gdb-get-create-buffer 'gdb-assembler-buffer)))
1752 (setq gdb-source-window (get-buffer-window (current-buffer)))
1753 (other-window 1))))
1731 1754
1732;;from put-image 1755;;from put-image
1733(defun gdb-put-string (putstring pos &optional dprop) 1756(defun gdb-put-string (putstring pos &optional dprop)
@@ -1764,9 +1787,9 @@ BUFFER nil or omitted means use the current buffer."
1764 (gdb-remove-breakpoint-icons start end) 1787 (gdb-remove-breakpoint-icons start end)
1765 (if (display-images-p) 1788 (if (display-images-p)
1766 (if (>= (car (window-fringes)) 8) 1789 (if (>= (car (window-fringes)) 8)
1767 (gdb-put-string 1790 (gdb-put-string
1768 nil (1+ start) 1791 nil (1+ start)
1769 `(left-fringe 1792 `(left-fringe
1770 ,(or breakpoint-bitmap 1793 ,(or breakpoint-bitmap
1771 (setq breakpoint-bitmap 1794 (setq breakpoint-bitmap
1772 (define-fringe-bitmap 1795 (define-fringe-bitmap
@@ -1786,7 +1809,7 @@ BUFFER nil or omitted means use the current buffer."
1786 (if enabled 1809 (if enabled
1787 (or breakpoint-enabled-icon 1810 (or breakpoint-enabled-icon
1788 (setq breakpoint-enabled-icon 1811 (setq breakpoint-enabled-icon
1789 (find-image `((:type xpm :data 1812 (find-image `((:type xpm :data
1790 ,breakpoint-xpm-data 1813 ,breakpoint-xpm-data
1791 :ascent 100 :pointer hand) 1814 :ascent 100 :pointer hand)
1792 (:type pbm :data 1815 (:type pbm :data
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index ff04c05edff..a34b0bb2d48 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -477,7 +477,7 @@ off the specialized speedbar mode."
477 ;; gud-marker-acc until we receive the rest of it. Since we 477 ;; gud-marker-acc until we receive the rest of it. Since we
478 ;; know the full marker regexp above failed, it's pretty simple to 478 ;; know the full marker regexp above failed, it's pretty simple to
479 ;; test for marker starts. 479 ;; test for marker starts.
480 (if (string-match "\032.*\\'" gud-marker-acc) 480 (if (string-match "\n\\(\032.*\\)?\\'" gud-marker-acc)
481 (progn 481 (progn
482 ;; Everything before the potential marker start can be output. 482 ;; Everything before the potential marker start can be output.
483 (setq output (concat output (substring gud-marker-acc 483 (setq output (concat output (substring gud-marker-acc
diff --git a/lisp/subr.el b/lisp/subr.el
index 2c39a8447cf..74809c678eb 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2274,28 +2274,6 @@ macros."
2274 (subrp object) (byte-code-function-p object) 2274 (subrp object) (byte-code-function-p object)
2275 (eq (car-safe object) 'lambda))) 2275 (eq (car-safe object) 'lambda)))
2276 2276
2277(defun interactive-form (function)
2278 "Return the interactive form of FUNCTION.
2279If function is a command (see `commandp'), value is a list of the form
2280\(interactive SPEC). If function is not a command, return nil."
2281 (setq function (indirect-function function))
2282 (when (commandp function)
2283 (cond ((byte-code-function-p function)
2284 (when (> (length function) 5)
2285 (let ((spec (aref function 5)))
2286 (if spec
2287 (list 'interactive spec)
2288 (list 'interactive)))))
2289 ((subrp function)
2290 (subr-interactive-form function))
2291 ((eq (car-safe function) 'lambda)
2292 (setq function (cddr function))
2293 (when (stringp (car function))
2294 (setq function (cdr function)))
2295 (let ((form (car function)))
2296 (when (eq (car-safe form) 'interactive)
2297 (copy-sequence form)))))))
2298
2299(defun assq-delete-all (key alist) 2277(defun assq-delete-all (key alist)
2300 "Delete from ALIST all elements whose car is KEY. 2278 "Delete from ALIST all elements whose car is KEY.
2301Return the modified alist. 2279Return the modified alist.
diff --git a/lisp/vc.el b/lisp/vc.el
index 7cceab6779c..9e1f36f93ce 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -7,7 +7,7 @@
7;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8;; Keywords: tools 8;; Keywords: tools
9 9
10;; $Id: vc.el,v 1.373 2004/03/26 16:17:12 monnier Exp $ 10;; $Id: vc.el,v 1.374 2004/03/28 22:00:19 monnier Exp $
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
13 13
@@ -1677,10 +1677,10 @@ saving the buffer."
1677 (message "No changes to %s since latest version" file) 1677 (message "No changes to %s since latest version" file)
1678 (vc-version-diff file nil nil))))) 1678 (vc-version-diff file nil nil)))))
1679 1679
1680(defun vc-version-diff (file rel1 rel2) 1680(defun vc-version-diff (file rev1 rev2)
1681 "List the differences between FILE's versions REL1 and REL2. 1681 "List the differences between FILE's versions REV1 and REV2.
1682If REL1 is empty or nil it means to use the current workfile version; 1682If REV1 is empty or nil it means to use the current workfile version;
1683REL2 empty or nil means the current file contents. FILE may also be 1683REV2 empty or nil means the current file contents. FILE may also be
1684a directory, in that case, generate diffs between the correponding 1684a directory, in that case, generate diffs between the correponding
1685versions of all registered files in or below it." 1685versions of all registered files in or below it."
1686 (interactive 1686 (interactive
@@ -1689,7 +1689,7 @@ versions of all registered files in or below it."
1689 "File or dir to diff: (default visited file) " 1689 "File or dir to diff: (default visited file) "
1690 "File or dir to diff: ") 1690 "File or dir to diff: ")
1691 default-directory buffer-file-name t))) 1691 default-directory buffer-file-name t)))
1692 (rel1-default nil) (rel2-default nil)) 1692 (rev1-default nil) (rev2-default nil))
1693 ;; compute default versions based on the file state 1693 ;; compute default versions based on the file state
1694 (cond 1694 (cond
1695 ;; if it's a directory, don't supply any version default 1695 ;; if it's a directory, don't supply any version default
@@ -1697,54 +1697,54 @@ versions of all registered files in or below it."
1697 nil) 1697 nil)
1698 ;; if the file is not up-to-date, use current version as older version 1698 ;; if the file is not up-to-date, use current version as older version
1699 ((not (vc-up-to-date-p file)) 1699 ((not (vc-up-to-date-p file))
1700 (setq rel1-default (vc-workfile-version file))) 1700 (setq rev1-default (vc-workfile-version file)))
1701 ;; if the file is not locked, use last and previous version as default 1701 ;; if the file is not locked, use last and previous version as default
1702 (t 1702 (t
1703 (setq rel1-default (vc-call previous-version file 1703 (setq rev1-default (vc-call previous-version file
1704 (vc-workfile-version file))) 1704 (vc-workfile-version file)))
1705 (if (string= rel1-default "") (setq rel1-default nil)) 1705 (if (string= rev1-default "") (setq rev1-default nil))
1706 (setq rel2-default (vc-workfile-version file)))) 1706 (setq rev2-default (vc-workfile-version file))))
1707 ;; construct argument list 1707 ;; construct argument list
1708 (list file 1708 (list file
1709 (read-string (if rel1-default 1709 (read-string (if rev1-default
1710 (concat "Older version: (default " 1710 (concat "Older version: (default "
1711 rel1-default ") ") 1711 rev1-default ") ")
1712 "Older version: ") 1712 "Older version: ")
1713 nil nil rel1-default) 1713 nil nil rev1-default)
1714 (read-string (if rel2-default 1714 (read-string (if rev2-default
1715 (concat "Newer version: (default " 1715 (concat "Newer version: (default "
1716 rel2-default ") ") 1716 rev2-default ") ")
1717 "Newer version (default: current source): ") 1717 "Newer version (default: current source): ")
1718 nil nil rel2-default)))) 1718 nil nil rev2-default))))
1719 (if (file-directory-p file) 1719 (if (file-directory-p file)
1720 ;; recursive directory diff 1720 ;; recursive directory diff
1721 (progn 1721 (progn
1722 (vc-setup-buffer "*vc-diff*") 1722 (vc-setup-buffer "*vc-diff*")
1723 (if (string-equal rel1 "") (setq rel1 nil)) 1723 (if (string-equal rev1 "") (setq rev1 nil))
1724 (if (string-equal rel2 "") (setq rel2 nil)) 1724 (if (string-equal rev2 "") (setq rev2 nil))
1725 (let ((inhibit-read-only t)) 1725 (let ((inhibit-read-only t))
1726 (insert "Diffs between " 1726 (insert "Diffs between "
1727 (or rel1 "last version checked in") 1727 (or rev1 "last version checked in")
1728 " and " 1728 " and "
1729 (or rel2 "current workfile(s)") 1729 (or rev2 "current workfile(s)")
1730 ":\n\n")) 1730 ":\n\n"))
1731 (let ((dir (file-name-as-directory file))) 1731 (let ((dir (file-name-as-directory file)))
1732 (vc-call-backend (vc-responsible-backend dir) 1732 (vc-call-backend (vc-responsible-backend dir)
1733 'diff-tree dir rel1 rel2)) 1733 'diff-tree dir rev1 rev2))
1734 (vc-exec-after `(let ((inhibit-read-only t)) 1734 (vc-exec-after `(let ((inhibit-read-only t))
1735 (insert "\nEnd of diffs.\n")))) 1735 (insert "\nEnd of diffs.\n"))))
1736 ;; Single file diff. It is important that the vc-controlled buffer 1736 ;; Single file diff. It is important that the vc-controlled buffer
1737 ;; is still current at this time, because any local settings in that 1737 ;; is still current at this time, because any local settings in that
1738 ;; buffer should affect the diff command. 1738 ;; buffer should affect the diff command.
1739 (vc-diff-internal file rel1 rel2)) 1739 (vc-diff-internal file rev1 rev2))
1740 (set-buffer "*vc-diff*") 1740 (set-buffer "*vc-diff*")
1741 (if (and (zerop (buffer-size)) 1741 (if (and (zerop (buffer-size))
1742 (not (get-buffer-process (current-buffer)))) 1742 (not (get-buffer-process (current-buffer))))
1743 (progn 1743 (progn
1744 (if rel1 1744 (if rev1
1745 (if rel2 1745 (if rev2
1746 (message "No changes to %s between %s and %s" file rel1 rel2) 1746 (message "No changes to %s between %s and %s" file rev1 rev2)
1747 (message "No changes to %s since %s" file rel1)) 1747 (message "No changes to %s since %s" file rev1))
1748 (message "No changes to %s since latest version" file)) 1748 (message "No changes to %s since latest version" file))
1749 nil) 1749 nil)
1750 (pop-to-buffer (current-buffer)) 1750 (pop-to-buffer (current-buffer))
@@ -1758,29 +1758,40 @@ versions of all registered files in or below it."
1758 (shrink-window-if-larger-than-buffer))) 1758 (shrink-window-if-larger-than-buffer)))
1759 t)) 1759 t))
1760 1760
1761(defun vc-diff-internal (file rel1 rel2) 1761(defun vc-diff-label (file file-rev rev)
1762 "Run diff to compare FILE's revisions REL1 and REL2. 1762 (concat (file-relative-name file)
1763 (format-time-string "\t%d %b %Y %T %z\t"
1764 (nth 5 (file-attributes file-rev)))
1765 rev))
1766
1767(defun vc-diff-internal (file rev1 rev2)
1768 "Run diff to compare FILE's revisions REV1 and REV2.
1763Diff output goes to the *vc-diff* buffer. The exit status of the diff 1769Diff output goes to the *vc-diff* buffer. The exit status of the diff
1764command is returned. 1770command is returned.
1765 1771
1766This function takes care to set up a proper coding system for diff output. 1772This function takes care to set up a proper coding system for diff output.
1767If both revisions are available as local files, then it also does not 1773If both revisions are available as local files, then it also does not
1768actually call the backend, but performs a local diff." 1774actually call the backend, but performs a local diff."
1769 (if (or (not rel1) (string-equal rel1 "")) 1775 (if (or (not rev1) (string-equal rev1 ""))
1770 (setq rel1 (vc-workfile-version file))) 1776 (setq rev1 (vc-workfile-version file)))
1771 (if (string-equal rel2 "") 1777 (if (string-equal rev2 "")
1772 (setq rel2 nil)) 1778 (setq rev2 nil))
1773 (let ((file-rel1 (vc-version-backup-file file rel1)) 1779 (let ((file-rev1 (vc-version-backup-file file rev1))
1774 (file-rel2 (if (not rel2) 1780 (file-rev2 (if (not rev2)
1775 file 1781 file
1776 (vc-version-backup-file file rel2))) 1782 (vc-version-backup-file file rev2)))
1777 (coding-system-for-read (vc-coding-system-for-diff file))) 1783 (coding-system-for-read (vc-coding-system-for-diff file)))
1778 (if (and file-rel1 file-rel2) 1784 (if (and file-rev1 file-rev2)
1779 (apply 'vc-do-command "*vc-diff*" 1 "diff" nil 1785 (apply 'vc-do-command "*vc-diff*" 1 "diff" nil
1780 (append (vc-switches nil 'diff) 1786 (append (vc-switches nil 'diff)
1781 (list (file-relative-name file-rel1) 1787 ;; Provide explicit labels like RCS or CVS would do
1782 (file-relative-name file-rel2)))) 1788 ;; so diff-mode refers to `file' rather than to
1783 (vc-call diff file rel1 rel2)))) 1789 ;; `file-rev1' when trying to find/apply/undo hunks.
1790 (list "-L" (vc-diff-label file file-rev1 rev1)
1791 "-L" (vc-diff-label file file-rev2 rev2)
1792 (file-relative-name file-rev1)
1793 (file-relative-name file-rev2))))
1794 (vc-call diff file rev1 rev2))))
1784 1795
1785 1796
1786(defun vc-switches (backend op) 1797(defun vc-switches (backend op)
@@ -1804,9 +1815,9 @@ actually call the backend, but performs a local diff."
1804(defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff)) 1815(defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff))
1805(make-obsolete 'vc-diff-switches-list 'vc-switches "21.4") 1816(make-obsolete 'vc-diff-switches-list 'vc-switches "21.4")
1806 1817
1807(defun vc-default-diff-tree (backend dir rel1 rel2) 1818(defun vc-default-diff-tree (backend dir rev1 rev2)
1808 "List differences for all registered files at and below DIR. 1819 "List differences for all registered files at and below DIR.
1809The meaning of REL1 and REL2 is the same as for `vc-version-diff'." 1820The meaning of REV1 and REV2 is the same as for `vc-version-diff'."
1810 ;; This implementation does an explicit tree walk, and calls 1821 ;; This implementation does an explicit tree walk, and calls
1811 ;; vc-BACKEND-diff directly for each file. An optimization 1822 ;; vc-BACKEND-diff directly for each file. An optimization
1812 ;; would be to use `vc-diff-internal', so that diffs can be local, 1823 ;; would be to use `vc-diff-internal', so that diffs can be local,
@@ -1821,7 +1832,7 @@ The meaning of REL1 and REL2 is the same as for `vc-version-diff'."
1821 `(let ((coding-system-for-read (vc-coding-system-for-diff ',f))) 1832 `(let ((coding-system-for-read (vc-coding-system-for-diff ',f)))
1822 (message "Looking at %s" ',f) 1833 (message "Looking at %s" ',f)
1823 (vc-call-backend ',(vc-backend f) 1834 (vc-call-backend ',(vc-backend f)
1824 'diff ',f ',rel1 ',rel2)))))) 1835 'diff ',f ',rev1 ',rev2))))))
1825 1836
1826(defun vc-coding-system-for-diff (file) 1837(defun vc-coding-system-for-diff (file)
1827 "Return the coding system for reading diff output for FILE." 1838 "Return the coding system for reading diff output for FILE."
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index 32645bd6012..41e9e3e78b2 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -337,7 +337,12 @@ WINDOW is the window where the drop happened. ACTION is ignored.
337DATA is the moz-url, which is formatted as two strings separated by \r\n. 337DATA is the moz-url, which is formatted as two strings separated by \r\n.
338The first string is the URL, the second string is the title of that URL. 338The first string is the URL, the second string is the title of that URL.
339DATA is encoded in utf-16. Decode the URL and call `x-dnd-handle-uri-list'." 339DATA is encoded in utf-16. Decode the URL and call `x-dnd-handle-uri-list'."
340 (let* ((string (decode-coding-string data 'utf-16le)) ;; ALWAYS LE??? 340 ;; Mozilla and applications based on it (Galeon for example) uses
341 ;; text/unicode, but it is impossible to tell if it is le or be. Use what
342 ;; the machine Emacs runs on use. This looses if dropping between machines
343 ;; with different endian, but it is the best we can do.
344 (let* ((coding (if (eq (byteorder) ?B) 'utf-16be 'utf-16le))
345 (string (decode-coding-string data coding))
341 (strings (split-string string "[\r\n]" t)) 346 (strings (split-string string "[\r\n]" t))
342 ;; Can one drop more than one moz-url ?? Assume not. 347 ;; Can one drop more than one moz-url ?? Assume not.
343 (url (car strings)) 348 (url (car strings))
@@ -352,7 +357,9 @@ TEXT is the text as a string, WINDOW is the window where the drop happened."
352(defun x-dnd-insert-utf16-text (window action text) 357(defun x-dnd-insert-utf16-text (window action text)
353 "Decode the UTF-16 text and insert it at point. 358 "Decode the UTF-16 text and insert it at point.
354TEXT is the text as a string, WINDOW is the window where the drop happened." 359TEXT is the text as a string, WINDOW is the window where the drop happened."
355 (x-dnd-insert-text window action (decode-coding-string text 'utf-16le))) 360 ;; See comment in x-dnd-handle-moz-url about coding.
361 (let ((coding (if (eq (byteorder) ?B) 'utf-16be 'utf-16le)))
362 (x-dnd-insert-text window action (decode-coding-string text coding))))
356 363
357(defun x-dnd-insert-ctext (window action text) 364(defun x-dnd-insert-ctext (window action text)
358 "Decode the compound text and insert it at point. 365 "Decode the compound text and insert it at point.
diff --git a/man/ChangeLog b/man/ChangeLog
index 63277cb57f7..1cfe38d705c 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,8 @@
12004-04-02 Luc Teirlinck <teirllm@auburn.edu>
2
3 * files.texi (Reverting): Correct description of revert-buffer's
4 handling of point.
5
12004-03-22 Juri Linkov <juri@jurta.org> 62004-03-22 Juri Linkov <juri@jurta.org>
2 7
3 * emacs.texi (Top): Add `Misc X'. 8 * emacs.texi (Top): Add `Misc X'.
diff --git a/man/files.texi b/man/files.texi
index a7f06619288..f73d1370eba 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -855,11 +855,10 @@ of the file. To do this, use @kbd{M-x revert-buffer}, which operates on
855the current buffer. Since reverting a buffer unintentionally could lose 855the current buffer. Since reverting a buffer unintentionally could lose
856a lot of work, you must confirm this command with @kbd{yes}. 856a lot of work, you must confirm this command with @kbd{yes}.
857 857
858 @code{revert-buffer} keeps point at the same distance (measured in 858 @code{revert-buffer} tries to position point in such a way that, if
859characters) from the beginning of the file. If the file was edited only 859the file was edited only slightly, you will be at approximately the
860slightly, you will be at approximately the same piece of text after 860same piece of text after reverting as before. However, if you have made
861reverting as before. If you have made drastic changes, the same value of 861drastic changes, point may wind up in a totally different piece of text.
862point in the old file may address a totally different piece of text.
863 862
864 Reverting marks the buffer as ``not modified'' until another change is 863 Reverting marks the buffer as ``not modified'' until another change is
865made. 864made.
diff --git a/src/.gdbinit b/src/.gdbinit
index 145f4f4df87..1b141a42064 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -1,4 +1,4 @@
1# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 1# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000, 01, 2004
2# Free Software Foundation, Inc. 2# Free Software Foundation, Inc.
3# 3#
4# This file is part of GNU Emacs. 4# This file is part of GNU Emacs.
@@ -38,12 +38,22 @@ handle SIGALRM ignore
38# Set up a mask to use. 38# Set up a mask to use.
39# This should be EMACS_INT, but in some cases that is a macro. 39# This should be EMACS_INT, but in some cases that is a macro.
40# long ought to work in all cases right now. 40# long ought to work in all cases right now.
41set $valmask = ((long)1 << gdb_valbits) - 1 41
42set $nonvalbits = gdb_emacs_intbits - gdb_valbits 42define xgetptr
43 set $ptr = (gdb_use_union ? $arg0.u.val : $arg0 & $valmask) | gdb_data_seg_bits
44end
45
46define xgetint
47 set $int = gdb_use_union ? $arg0.s.val : (gdb_use_lsb ? $arg0 : $arg0 << gdb_gctypebits) >> gdb_gctypebits
48end
49
50define xgettype
51 set $type = gdb_use_union ? $arg0.s.type : (enum Lisp_Type) (gdb_use_lsb ? $arg0 & $tagmask : $arg0 >> gdb_valbits)
52end
43 53
44# Set up something to print out s-expressions. 54# Set up something to print out s-expressions.
45define pr 55define pr
46set debug_print ($) 56 set debug_print ($)
47end 57end
48document pr 58document pr
49Print the emacs s-expression which is $. 59Print the emacs s-expression which is $.
@@ -51,115 +61,135 @@ Works only when an inferior emacs is executing.
51end 61end
52 62
53define xtype 63define xtype
54output (enum Lisp_Type) (($ >> gdb_valbits) & 0x7) 64 xgettype $
55echo \n 65 output $type
56output ((($ >> gdb_valbits) & 0x7) == Lisp_Misc ? (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits))->type) : (($ >> gdb_valbits) & 0x7) == Lisp_Vectorlike ? ($size = ((struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits))->size, (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)) : 0) 66 echo \n
57echo \n 67 if $type == Lisp_Misc
68 xmisctype
69 else
70 if $type == Lisp_Vectorlike
71 xvectype
72 end
73 end
58end 74end
59document xtype 75document xtype
60Print the type of $, assuming it is an Emacs Lisp value. 76Print the type of $, assuming it is an Emacs Lisp value.
61If the first type printed is Lisp_Vector or Lisp_Misc, 77If the first type printed is Lisp_Vector or Lisp_Misc,
62the second line gives the more precise type. 78a second line gives the more precise type.
63Otherwise the second line doesn't mean anything.
64end 79end
65 80
66define xvectype 81define xvectype
67set $size = ((struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits))->size 82 xgetptr $
68output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0) 83 set $size = ((struct Lisp_Vector *) $ptr)->size
69echo \n 84 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size
85 echo \n
70end 86end
71document xvectype 87document xvectype
72Print the vector subtype of $, assuming it is a vector or pseudovector. 88Print the size or vector subtype of $, assuming it is a vector or pseudovector.
73end 89end
74 90
75define xmisctype 91define xmisctype
76output (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits))->type) 92 xgetptr $
77echo \n 93 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
94 echo \n
78end 95end
79document xmisctype 96document xmisctype
80Print the specific type of $, assuming it is some misc type. 97Print the specific type of $, assuming it is some misc type.
81end 98end
82 99
83define xint 100define xint
84print (($ & $valmask) << $nonvalbits) >> $nonvalbits 101 xgetint $
102 print $int
85end 103end
86document xint 104document xint
87Print $, assuming it is an Emacs Lisp integer. This gets the sign right. 105Print $, assuming it is an Emacs Lisp integer. This gets the sign right.
88end 106end
89 107
90define xptr 108define xptr
91print (void *) (($ & $valmask) | gdb_data_seg_bits) 109 xgetptr $
110 print (void *) $ptr
92end 111end
93document xptr 112document xptr
94Print the pointer portion of $, assuming it is an Emacs Lisp value. 113Print the pointer portion of $, assuming it is an Emacs Lisp value.
95end 114end
96 115
97define xmarker 116define xmarker
98print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) 117 xgetptr $
118 print (struct Lisp_Marker *) $ptr
99end 119end
100document xmarker 120document xmarker
101Print $ as a marker pointer, assuming it is an Emacs Lisp marker value. 121Print $ as a marker pointer, assuming it is an Emacs Lisp marker value.
102end 122end
103 123
104define xoverlay 124define xoverlay
105print (struct Lisp_Overlay *) (($ & $valmask) | gdb_data_seg_bits) 125 xgetptr $
126 print (struct Lisp_Overlay *) $ptr
106end 127end
107document xoverlay 128document xoverlay
108Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value. 129Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value.
109end 130end
110 131
111define xmiscfree 132define xmiscfree
112print (struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits) 133 xgetptr $
134 print (struct Lisp_Free *) $ptr
113end 135end
114document xmiscfree 136document xmiscfree
115Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value. 137Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value.
116end 138end
117 139
118define xintfwd 140define xintfwd
119print (struct Lisp_Intfwd *) (($ & $valmask) | gdb_data_seg_bits) 141 xgetptr $
142 print (struct Lisp_Intfwd *) $ptr
120end 143end
121document xintfwd 144document xintfwd
122Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value. 145Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value.
123end 146end
124 147
125define xboolfwd 148define xboolfwd
126print (struct Lisp_Boolfwd *) (($ & $valmask) | gdb_data_seg_bits) 149 xgetptr $
150 print (struct Lisp_Boolfwd *) $ptr
127end 151end
128document xboolfwd 152document xboolfwd
129Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value. 153Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value.
130end 154end
131 155
132define xobjfwd 156define xobjfwd
133print (struct Lisp_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) 157 xgetptr $
158 print (struct Lisp_Objfwd *) $ptr
134end 159end
135document xobjfwd 160document xobjfwd
136Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value. 161Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value.
137end 162end
138 163
139define xbufobjfwd 164define xbufobjfwd
140print (struct Lisp_Buffer_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) 165 xgetptr $
166 print (struct Lisp_Buffer_Objfwd *) $ptr
141end 167end
142document xbufobjfwd 168document xbufobjfwd
143Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. 169Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
144end 170end
145 171
146define xkbobjfwd 172define xkbobjfwd
147print (struct Lisp_Kboard_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) 173 xgetptr $
174 print (struct Lisp_Kboard_Objfwd *) $ptr
148end 175end
149document xkbobjfwd 176document xkbobjfwd
150Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. 177Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
151end 178end
152 179
153define xbuflocal 180define xbuflocal
154print (struct Lisp_Buffer_Local_Value *) (($ & $valmask) | gdb_data_seg_bits) 181 xgetptr $
182 print (struct Lisp_Buffer_Local_Value *) $ptr
155end 183end
156document xbuflocal 184document xbuflocal
157Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. 185Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value.
158end 186end
159 187
160define xsymbol 188define xsymbol
161print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) 189 xgetptr $
162xprintsym $ 190 print (struct Lisp_Symbol *) $ptr
191 xprintsym $
192 echo \n
163end 193end
164document xsymbol 194document xsymbol
165Print the name and address of the symbol $. 195Print the name and address of the symbol $.
@@ -167,9 +197,10 @@ This command assumes that $ is an Emacs Lisp symbol value.
167end 197end
168 198
169define xstring 199define xstring
170print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) 200 xgetptr $
171output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) 201 print (struct Lisp_String *) $ptr
172echo \n 202 output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte)
203 echo \n
173end 204end
174document xstring 205document xstring
175Print the contents and address of the string $. 206Print the contents and address of the string $.
@@ -177,8 +208,9 @@ This command assumes that $ is an Emacs Lisp string value.
177end 208end
178 209
179define xvector 210define xvector
180print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) 211 xgetptr $
181output ($->size > 50) ? 0 : ($->contents[0])@($->size) 212 print (struct Lisp_Vector *) $ptr
213 output ($->size > 50) ? 0 : ($->contents[0])@($->size)
182echo \n 214echo \n
183end 215end
184document xvector 216document xvector
@@ -187,32 +219,36 @@ This command assumes that $ is an Emacs Lisp vector value.
187end 219end
188 220
189define xprocess 221define xprocess
190print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) 222 xgetptr $
191output *$ 223 print (struct Lisp_Process *) $ptr
192echo \n 224 output *$
225 echo \n
193end 226end
194document xprocess 227document xprocess
195Print the address of the struct Lisp_process which the Lisp_Object $ points to. 228Print the address of the struct Lisp_process which the Lisp_Object $ points to.
196end 229end
197 230
198define xframe 231define xframe
199print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) 232 xgetptr $
233 print (struct frame *) $ptr
200end 234end
201document xframe 235document xframe
202Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. 236Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
203end 237end
204 238
205define xcompiled 239define xcompiled
206print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) 240 xgetptr $
207output ($->contents[0])@($->size & 0xff) 241 print (struct Lisp_Vector *) $ptr
242 output ($->contents[0])@($->size & 0xff)
208end 243end
209document xcompiled 244document xcompiled
210Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. 245Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value.
211end 246end
212 247
213define xwindow 248define xwindow
214print (struct window *) (($ & $valmask) | gdb_data_seg_bits) 249 xgetptr $
215printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top 250 print (struct window *) $ptr
251 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
216end 252end
217document xwindow 253document xwindow
218Print $ as a window pointer, assuming it is an Emacs Lisp window value. 254Print $ as a window pointer, assuming it is an Emacs Lisp window value.
@@ -220,27 +256,30 @@ Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
220end 256end
221 257
222define xwinconfig 258define xwinconfig
223print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits) 259 xgetptr $
260 print (struct save_window_data *) $ptr
224end 261end
225document xwinconfig 262document xwinconfig
226Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. 263Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value.
227end 264end
228 265
229define xsubr 266define xsubr
230print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) 267 xgetptr $
231output *$ 268 print (struct Lisp_Subr *) $ptr
232echo \n 269 output *$
270 echo \n
233end 271end
234document xsubr 272document xsubr
235Print the address of the subr which the Lisp_Object $ points to. 273Print the address of the subr which the Lisp_Object $ points to.
236end 274end
237 275
238define xchartable 276define xchartable
239print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) 277 xgetptr $
240printf "Purpose: " 278 print (struct Lisp_Char_Table *) $ptr
241output (char*)&((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data 279 printf "Purpose: "
242printf " %d extra slots", ($->size & 0x1ff) - 388 280 xprintsym $->purpose
243echo \n 281 printf " %d extra slots", ($->size & 0x1ff) - 388
282 echo \n
244end 283end
245document xchartable 284document xchartable
246Print the address of the char-table $, and its purpose. 285Print the address of the char-table $, and its purpose.
@@ -248,9 +287,10 @@ This command assumes that $ is an Emacs Lisp char-table value.
248end 287end
249 288
250define xboolvector 289define xboolvector
251print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) 290 xgetptr $
252output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) 291 print (struct Lisp_Bool_Vector *) $ptr
253echo \n 292 output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8)
293 echo \n
254end 294end
255document xboolvector 295document xboolvector
256Print the contents and address of the bool-vector $. 296Print the contents and address of the bool-vector $.
@@ -258,9 +298,11 @@ This command assumes that $ is an Emacs Lisp bool-vector value.
258end 298end
259 299
260define xbuffer 300define xbuffer
261print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) 301 xgetptr $
262output ((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data 302 print (struct buffer *) $ptr
263echo \n 303 xgetptr $->name
304 output ((struct Lisp_String *) $ptr)->data
305 echo \n
264end 306end
265document xbuffer 307document xbuffer
266Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. 308Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
@@ -268,24 +310,26 @@ Print the name of the buffer.
268end 310end
269 311
270define xhashtable 312define xhashtable
271print (struct Lisp_Hash_Table *) (($ & $valmask) | gdb_data_seg_bits) 313 xgetptr $
314 print (struct Lisp_Hash_Table *) $ptr
272end 315end
273document xhashtable 316document xhashtable
274Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value. 317Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value.
275end 318end
276 319
277define xcons 320define xcons
278print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits) 321 xgetptr $
279output/x *$ 322 print (struct Lisp_Cons *) $ptr
280echo \n 323 output/x *$
324 echo \n
281end 325end
282document xcons 326document xcons
283Print the contents of $, assuming it is an Emacs Lisp cons. 327Print the contents of $, assuming it is an Emacs Lisp cons.
284end 328end
285 329
286define nextcons 330define nextcons
287p $.cdr 331 p $.cdr
288xcons 332 xcons
289end 333end
290document nextcons 334document nextcons
291Print the contents of the next cell in a list. 335Print the contents of the next cell in a list.
@@ -293,28 +337,34 @@ This assumes that the last thing you printed was a cons cell contents
293(type struct Lisp_Cons) or a pointer to one. 337(type struct Lisp_Cons) or a pointer to one.
294end 338end
295define xcar 339define xcar
296print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) 340 xgetptr $
341 xgettype $
342 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0)
297end 343end
298document xcar 344document xcar
299Print the car of $, assuming it is an Emacs Lisp pair. 345Print the car of $, assuming it is an Emacs Lisp pair.
300end 346end
301 347
302define xcdr 348define xcdr
303print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->cdr : 0) 349 xgetptr $
350 xgettype $
351 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->cdr : 0)
304end 352end
305document xcdr 353document xcdr
306Print the cdr of $, assuming it is an Emacs Lisp pair. 354Print the cdr of $, assuming it is an Emacs Lisp pair.
307end 355end
308 356
309define xfloat 357define xfloat
310print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data 358 xgetptr $
359 print ((struct Lisp_Float *) $ptr)->data
311end 360end
312document xfloat 361document xfloat
313Print $ assuming it is a lisp floating-point number. 362Print $ assuming it is a lisp floating-point number.
314end 363end
315 364
316define xscrollbar 365define xscrollbar
317print (struct scrollbar *) (($ & $valmask) | gdb_data_seg_bits) 366 xgetptr $
367 print (struct scrollbar *) $ptr
318output *$ 368output *$
319echo \n 369echo \n
320end 370end
@@ -323,10 +373,11 @@ Print $ as a scrollbar pointer.
323end 373end
324 374
325define xprintsym 375define xprintsym
326 set $sym = (struct Lisp_Symbol *) ((((int) $arg0) & $valmask) | gdb_data_seg_bits) 376 xgetptr $arg0
327 set $sym_name = ((struct Lisp_String *)(($sym->xname & $valmask) | gdb_data_seg_bits)) 377 set $sym = (struct Lisp_Symbol *) $ptr
378 xgetptr $sym->xname
379 set $sym_name = (struct Lisp_String *) $ptr
328 output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte) 380 output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte)
329 echo \n
330end 381end
331document xprintsym 382document xprintsym
332 Print argument as a symbol. 383 Print argument as a symbol.
@@ -335,14 +386,16 @@ end
335define xbacktrace 386define xbacktrace
336 set $bt = backtrace_list 387 set $bt = backtrace_list
337 while $bt 388 while $bt
338 set $type = (enum Lisp_Type) ((*$bt->function >> gdb_valbits) & 0x7) 389 xgettype (*$bt->function)
339 if $type == Lisp_Symbol 390 if $type == Lisp_Symbol
340 xprintsym *$bt->function 391 xprintsym (*$bt->function)
392 echo \n
341 else 393 else
342 printf "0x%x ", *$bt->function 394 printf "0x%x ", *$bt->function
343 if $type == Lisp_Vectorlike 395 if $type == Lisp_Vectorlike
344 set $size = ((struct Lisp_Vector *) ((*$bt->function & $valmask) | gdb_data_seg_bits))->size 396 xgetptr (*$bt->function)
345 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0) 397 set $size = ((struct Lisp_Vector *) $ptr)->size
398 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size
346 else 399 else
347 printf "Lisp type %d", $type 400 printf "Lisp type %d", $type
348 end 401 end
@@ -358,16 +411,17 @@ document xbacktrace
358end 411end
359 412
360define xreload 413define xreload
361 set $valmask = ((long)1 << gdb_valbits) - 1 414 set $tagmask = (((long)1 << gdb_gctypebits) - 1)
362 set $nonvalbits = gdb_emacs_intbits - gdb_valbits 415 set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1
363end 416end
364document xreload 417document xreload
365 When starting Emacs a second time in the same gdb session under 418 When starting Emacs a second time in the same gdb session under
366 FreeBSD 2.2.5, gdb 4.13, $valmask and $nonvalbits have lost 419 FreeBSD 2.2.5, gdb 4.13, $valmask have lost
367 their values. (The same happens on current (2000) versions of GNU/Linux 420 their values. (The same happens on current (2000) versions of GNU/Linux
368 with gdb 5.0.) 421 with gdb 5.0.)
369 This function reloads them. 422 This function reloads them.
370end 423end
424xreload
371 425
372define hook-run 426define hook-run
373 xreload 427 xreload
diff --git a/src/.gdbinit-union b/src/.gdbinit-union
deleted file mode 100644
index 1af2c0976c4..00000000000
--- a/src/.gdbinit-union
+++ /dev/null
@@ -1,402 +0,0 @@
1# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
2# Free Software Foundation, Inc.
3#
4# This file is part of GNU Emacs.
5#
6# GNU Emacs is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10#
11# GNU Emacs is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with GNU Emacs; see the file COPYING. If not, write to the
18# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19# Boston, MA 02111-1307, USA.
20
21# Force loading of symbols, enough to give us gdb_valbits etc.
22set main
23
24# Find lwlib source files too.
25dir ../lwlib
26#dir /gd/gnu/lesstif-0.89.9/lib/Xm
27
28# Don't enter GDB when user types C-g to quit.
29# This has one unfortunate effect: you can't type C-c
30# at the GDB to stop Emacs, when using X.
31# However, C-z works just as well in that case.
32handle 2 noprint pass
33
34# Don't pass SIGALRM to Emacs. This makes problems when
35# debugging.
36handle SIGALRM ignore
37
38# Set up a mask to use.
39# This should be EMACS_INT, but in some cases that is a macro.
40# long ought to work in all cases right now.
41set $valmask = ((long)1 << gdb_valbits) - 1
42set $nonvalbits = gdb_emacs_intbits - gdb_valbits
43
44# Set up something to print out s-expressions.
45define pr
46set debug_print ($)
47end
48document pr
49Print the emacs s-expression which is $.
50Works only when an inferior emacs is executing.
51end
52
53define xtype
54output (enum Lisp_Type) (($.i >> gdb_valbits) & 0x7)
55echo \n
56output ((($.i >> gdb_valbits) & 0x7) == Lisp_Misc ? (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits))->type) : (($.i >> gdb_valbits) & 0x7) == Lisp_Vectorlike ? ($size = ((struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits))->size, (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)) : 0)
57echo \n
58end
59document xtype
60Print the type of $, assuming it is an Emacs Lisp value.
61If the first type printed is Lisp_Vector or Lisp_Misc,
62the second line gives the more precise type.
63Otherwise the second line doesn't mean anything.
64end
65
66define xvectype
67 set $size = ((struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits))->size
68 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)
69 echo \n
70end
71document xvectype
72 Print the vector subtype of $, assuming it is a vector or pseudovector.
73end
74
75define xmisctype
76 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits))->type)
77 echo \n
78end
79document xmisctype
80 Print the specific type of $, assuming it is some misc type.
81end
82
83define xint
84 print (($.i & $valmask) << $nonvalbits) >> $nonvalbits
85end
86document xint
87 Print $, assuming it is an Emacs Lisp integer. This gets the sign right.
88end
89
90define xptr
91 print (void *) (($.i & $valmask) | gdb_data_seg_bits)
92end
93document xptr
94 Print the pointer portion of $, assuming it is an Emacs Lisp value.
95end
96
97define xmarker
98 print (struct Lisp_Marker *) (($.i & $valmask) | gdb_data_seg_bits)
99end
100document xmarker
101 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value.
102end
103
104define xoverlay
105 print (struct Lisp_Overlay *) (($.i & $valmask) | gdb_data_seg_bits)
106end
107document xoverlay
108 Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value.
109end
110
111define xmiscfree
112 print (struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits)
113end
114document xmiscfree
115 Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value.
116end
117
118define xintfwd
119 print (struct Lisp_Intfwd *) (($.i & $valmask) | gdb_data_seg_bits)
120end
121document xintfwd
122 Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value.
123end
124
125define xboolfwd
126 print (struct Lisp_Boolfwd *) (($.i & $valmask) | gdb_data_seg_bits)
127end
128document xboolfwd
129 Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value.
130end
131
132define xobjfwd
133 print (struct Lisp_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
134end
135document xobjfwd
136 Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value.
137end
138
139define xbufobjfwd
140 print (struct Lisp_Buffer_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
141end
142document xbufobjfwd
143 Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
144end
145
146define xkbobjfwd
147 print (struct Lisp_Kboard_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
148end
149document xkbobjfwd
150 Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
151end
152
153define xbuflocal
154 print (struct Lisp_Buffer_Local_Value *) (($.i & $valmask) | gdb_data_seg_bits)
155end
156document xbuflocal
157 Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value.
158end
159
160define xsymbol
161 print (struct Lisp_Symbol *) (($.i & $valmask) | gdb_data_seg_bits)
162 xprintsymptr $
163end
164document xsymbol
165 Print the name and address of the symbol $.
166 This command assumes that $ is an Emacs Lisp symbol value.
167end
168
169define xstring
170 print (struct Lisp_String *) (($.i & $valmask) | gdb_data_seg_bits)
171 output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte)
172 echo \n
173end
174document xstring
175 Print the contents and address of the string $.
176 This command assumes that $ is an Emacs Lisp string value.
177end
178
179define xvector
180 print (struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
181 output ($->size > 50) ? 0 : ($->contents[0])@($->size)
182 echo \n
183end
184document xvector
185 Print the contents and address of the vector $.
186 This command assumes that $ is an Emacs Lisp vector value.
187end
188
189define xprocess
190 print (struct Lisp_Process *) (($.i & $valmask) | gdb_data_seg_bits)
191 output *$
192 echo \n
193end
194document xprocess
195 Print the address of the struct Lisp_process which the Lisp_Object $ points to.
196end
197
198define xframe
199 print (struct frame *) (($.i & $valmask) | gdb_data_seg_bits)
200end
201document xframe
202 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
203end
204
205define xcompiled
206 print (struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
207 output ($->contents[0])@($->size & 0xff)
208end
209document xcompiled
210 Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value.
211end
212
213define xwindow
214 print (struct window *) (($.i & $valmask) | gdb_data_seg_bits)
215 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
216end
217document xwindow
218 Print $ as a window pointer, assuming it is an Emacs Lisp window value.
219 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
220end
221
222define xwinconfig
223 print (struct save_window_data *) (($.i & $valmask) | gdb_data_seg_bits)
224end
225document xwinconfig
226 Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value.
227end
228
229define xsubr
230 print (struct Lisp_Subr *) (($.i & $valmask) | gdb_data_seg_bits)
231 output *$
232 echo \n
233end
234document xsubr
235 Print the address of the subr which the Lisp_Object $ points to.
236end
237
238define xchartable
239 print (struct Lisp_Char_Table *) (($.i & $valmask) | gdb_data_seg_bits)
240 printf "Purpose: "
241 output (char*)&((struct Lisp_Symbol *) (($->purpose.i & $valmask) | gdb_data_seg_bits))->name->data
242 printf " %d extra slots", ($->size & 0x1ff) - 388
243 echo \n
244end
245document xchartable
246 Print the address of the char-table $, and its purpose.
247 This command assumes that $ is an Emacs Lisp char-table value.
248end
249
250define xboolvector
251 print (struct Lisp_Bool_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
252 output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8)
253 echo \n
254end
255document xboolvector
256 Print the contents and address of the bool-vector $.
257 This command assumes that $ is an Emacs Lisp bool-vector value.
258end
259
260define xbuffer
261 print (struct buffer *) (($.i & $valmask) | gdb_data_seg_bits)
262 output ((struct Lisp_String *) (($->name.i & $valmask) | gdb_data_seg_bits))->data
263 echo \n
264end
265document xbuffer
266 Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
267 Print the name of the buffer.
268end
269
270define xhashtable
271 print (struct Lisp_Hash_Table *) (($.i & $valmask) | gdb_data_seg_bits)
272end
273document xhashtable
274 Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value.
275end
276
277define xcons
278 print (struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits)
279 output/x *$
280 echo \n
281end
282document xcons
283 Print the contents of $, assuming it is an Emacs Lisp cons.
284end
285
286define nextcons
287 p $.cdr
288 xcons
289end
290document nextcons
291 Print the contents of the next cell in a list.
292 This assumes that the last thing you printed was a cons cell contents
293 (type struct Lisp_Cons) or a pointer to one.
294end
295
296define xcar
297 print/x ((($.i >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits))->car : 0)
298end
299document xcar
300 Print the car of $, assuming it is an Emacs Lisp pair.
301end
302
303define xcdr
304 print/x ((($.i >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits))->cdr : 0)
305end
306document xcdr
307 Print the cdr of $, assuming it is an Emacs Lisp pair.
308end
309
310define xfloat
311 print ((struct Lisp_Float *) (($.i & $valmask) | gdb_data_seg_bits))->data
312end
313document xfloat
314 Print $ assuming it is a lisp floating-point number.
315end
316
317define xscrollbar
318 print (struct scrollbar *) (($.i & $valmask) | gdb_data_seg_bits)
319 output *$
320 echo \n
321end
322document xscrollbar
323 Print $ as a scrollbar pointer.
324end
325
326define xprintsym
327 set $sym = ((struct Lisp_Symbol *) (($arg0.i & $valmask) | gdb_data_seg_bits))
328 xprintsymptr $sym
329end
330document xprintsym
331 Print argument as a symbol.
332end
333define xprintsymptr
334 set $sym = $arg0
335 set $sym_name = ((struct Lisp_String *)(($sym->xname.i & $valmask) | gdb_data_seg_bits))
336 output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte)
337 echo \n
338end
339
340define xbacktrace
341 set $bt = backtrace_list
342 while $bt
343 set $type = (enum Lisp_Type) (((*$bt->function).i >> gdb_valbits) & 0x7)
344 if $type == Lisp_Symbol
345 xprintsym (*$bt->function)
346 else
347 printf "0x%x ", (*$bt->function).i
348 if $type == Lisp_Vectorlike
349 set $size = ((struct Lisp_Vector *) (((*$bt->function).i & $valmask) | gdb_data_seg_bits))->size
350 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)
351 else
352 printf "Lisp type %d", $type
353 end
354 echo \n
355 end
356 set $bt = $bt->next
357 end
358end
359document xbacktrace
360 Print a backtrace of Lisp function calls from backtrace_list.
361 Set a breakpoint at Fsignal and call this to see from where
362 an error was signaled.
363end
364
365define xreload
366 set $valmask = ((long)1 << gdb_valbits) - 1
367 set $nonvalbits = gdb_emacs_intbits - gdb_valbits
368end
369document xreload
370 When starting Emacs a second time in the same gdb session under
371 FreeBSD 2.2.5, gdb 4.13, $valmask and $nonvalbits have lost
372 their values. (The same happens on current (2000) versions of GNU/Linux
373 with gdb 5.0.)
374 This function reloads them.
375end
376
377define hook-run
378 xreload
379end
380
381# Call xreload if a new Emacs executable is loaded.
382define hookpost-run
383 xreload
384end
385
386set print pretty on
387set print sevenbit-strings
388
389# show environment DISPLAY
390# show environment TERM
391# set args -geometry 80x40+0+0
392
393# Don't let abort actually run, as it will make
394# stdio stop working and therefore the `pr' command above as well.
395# break abort
396
397# If we are running in synchronous mode, we want a chance to look around
398# before Emacs exits. Perhaps we should put the break somewhere else
399# instead...
400# break x_error_quitter
401
402# arch-tag: 08f4d20d-0254-4374-a80c-179d5a517915
diff --git a/src/ChangeLog b/src/ChangeLog
index 357060188a5..a1c384ce535 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,46 @@
12004-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * .gdbinit-union: Remove.
4
5 * .gdbinit: Make it work for USE_LSB_TAG and !NO_LISP_UNION.
6 (xgetptr, xgetint, xgettype): New funs. Use them everywhere.
7 ($nonvalbits): Remove.
8 ($valmask): Set it by calling xreload to avoid redundancy.
9
10 * emacs.c (gdb_use_union, gdb_use_lsb): New vars.
11 (gdb_emacs_intbits): Remove.
12
132004-03-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
14
15 * data.c (Fbyteorder): Make test work even if unsigned is not 4 bytes.
16
172004-03-30 Kenichi Handa <handa@m17n.org>
18
19 * editfns.c (Fformat): Fix initialization of the array info.
20
212004-03-30 Kim F. Storm <storm@cua.dk>
22
23 * xterm.c (x_mouse_click_focus_ignore_position): New var.
24 (syms_of_xterm): DEFVAR_BOOL it.
25 (ignore_next_mouse_click_timeout): New var.
26 (handle_one_xevent): Clear it on KeyPress, set it on EnterNotify.
27 Use it to filter mouse clicks following focus event.
28
292004-03-29 David Ponce <david@dponce.com>
30
31 * callint.c (Fcall_interactively): Fix last change.
32
332004-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
34
35 * eval.c (Fcommandp): Simplify.
36
37 * data.c (Finteractive_form): Rename from Fsubr_interactive_form.
38 Extend to handle all kinds of functions.
39
40 * lisp.h (Finteractive_form): Declare.
41
42 * callint.c (Fcall_interactively): Use it.
43
12004-03-26 Kim F. Storm <storm@cua.dk> 442004-03-26 Kim F. Storm <storm@cua.dk>
2 45
3 * xdisp.c (syms_of_xdisp): Include `void-variable' in list_of_error 46 * xdisp.c (syms_of_xdisp): Include `void-variable' in list_of_error
@@ -39,7 +82,7 @@
39 * image.c (Qcenter): Move to xdisp.c. 82 * image.c (Qcenter): Move to xdisp.c.
40 83
41 * xdisp.c (Qcenter): Declare here. 84 * xdisp.c (Qcenter): Declare here.
42 (syms_of_xdisp): intern and staticpro it. 85 (syms_of_xdisp): Intern and staticpro it.
43 (handle_single_display_prop): Allow space display property on all 86 (handle_single_display_prop): Allow space display property on all
44 platforms. 87 platforms.
45 (display_mode_line): Set mode_line_p before displaying line. 88 (display_mode_line): Set mode_line_p before displaying line.
diff --git a/src/callint.c b/src/callint.c
index 21a6bd0b1ad..1d7d6f9f89f 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -1,5 +1,5 @@
1/* Call a Lisp function interactively. 1/* Call a Lisp function interactively.
2 Copyright (C) 1985, 86, 93, 94, 95, 1997, 2000, 02, 2003 2 Copyright (C) 1985, 86, 93, 94, 95, 1997, 2000, 02, 03, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -347,25 +347,17 @@ supply if the command inquires which events were used to invoke it. */)
347 goto lose; 347 goto lose;
348 specs = XVECTOR (fun)->contents[COMPILED_INTERACTIVE]; 348 specs = XVECTOR (fun)->contents[COMPILED_INTERACTIVE];
349 } 349 }
350 else if (!CONSP (fun)) 350 else
351 goto lose;
352 else if (funcar = XCAR (fun), EQ (funcar, Qautoload))
353 { 351 {
352 Lisp_Object form;
354 GCPRO2 (function, prefix_arg); 353 GCPRO2 (function, prefix_arg);
355 do_autoload (fun, function); 354 form = Finteractive_form (function);
356 UNGCPRO; 355 UNGCPRO;
357 goto retry; 356 if (CONSP (form))
358 } 357 specs = filter_specs = Fcar (XCDR (form));
359 else if (EQ (funcar, Qlambda)) 358 else
360 {
361 specs = Fassq (Qinteractive, Fcdr (XCDR (fun)));
362 if (NILP (specs))
363 goto lose; 359 goto lose;
364 filter_specs = Fnth (make_number (1), specs);
365 specs = Fcar (Fcdr (specs));
366 } 360 }
367 else
368 goto lose;
369 361
370 /* If either SPECS or STRING is set to a string, use it. */ 362 /* If either SPECS or STRING is set to a string, use it. */
371 if (STRINGP (specs)) 363 if (STRINGP (specs))
diff --git a/src/data.c b/src/data.c
index bff2baaed27..c3cf05e0f10 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,5 +1,5 @@
1/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. 1/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001, 2003 2 Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001, 03, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -761,17 +761,39 @@ function with `&rest' args, or `unevalled' for a special form. */)
761 return Fcons (make_number (minargs), make_number (maxargs)); 761 return Fcons (make_number (minargs), make_number (maxargs));
762} 762}
763 763
764DEFUN ("subr-interactive-form", Fsubr_interactive_form, Ssubr_interactive_form, 1, 1, 0, 764DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0,
765 doc: /* Return the interactive form of SUBR or nil if none. 765 doc: /* Return the interactive form of CMD or nil if none.
766SUBR must be a built-in function. Value, if non-nil, is a list 766CMD must be a command. Value, if non-nil, is a list
767\(interactive SPEC). */) 767\(interactive SPEC). */)
768 (subr) 768 (cmd)
769 Lisp_Object subr; 769 Lisp_Object cmd;
770{ 770{
771 if (!SUBRP (subr)) 771 Lisp_Object fun = indirect_function (cmd);
772 wrong_type_argument (Qsubrp, subr); 772
773 if (XSUBR (subr)->prompt) 773 if (SUBRP (fun))
774 return list2 (Qinteractive, build_string (XSUBR (subr)->prompt)); 774 {
775 if (XSUBR (fun)->prompt)
776 return list2 (Qinteractive, build_string (XSUBR (fun)->prompt));
777 }
778 else if (COMPILEDP (fun))
779 {
780 if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_INTERACTIVE)
781 return list2 (Qinteractive, AREF (fun, COMPILED_INTERACTIVE));
782 }
783 else if (CONSP (fun))
784 {
785 Lisp_Object funcar = XCAR (fun);
786 if (EQ (funcar, Qlambda))
787 return Fassq (Qinteractive, Fcdr (XCDR (fun)));
788 else if (EQ (funcar, Qautoload))
789 {
790 struct gcpro gcpro1;
791 GCPRO1 (cmd);
792 do_autoload (fun, cmd);
793 UNGCPRO;
794 return Finteractive_form (cmd);
795 }
796 }
775 return Qnil; 797 return Qnil;
776} 798}
777 799
@@ -2887,7 +2909,7 @@ lowercase l) for small endian machines. */)
2887 () 2909 ()
2888{ 2910{
2889 unsigned i = 0x04030201; 2911 unsigned i = 0x04030201;
2890 int order = *(char *)&i == 4 ? 66 : 108; 2912 int order = *(char *)&i == 1 ? 108 : 66;
2891 2913
2892 return make_number (order); 2914 return make_number (order);
2893} 2915}
@@ -3209,7 +3231,7 @@ syms_of_data ()
3209 staticpro (&Qhash_table); 3231 staticpro (&Qhash_table);
3210 3232
3211 defsubr (&Sindirect_variable); 3233 defsubr (&Sindirect_variable);
3212 defsubr (&Ssubr_interactive_form); 3234 defsubr (&Sinteractive_form);
3213 defsubr (&Seq); 3235 defsubr (&Seq);
3214 defsubr (&Snull); 3236 defsubr (&Snull);
3215 defsubr (&Stype_of); 3237 defsubr (&Stype_of);
diff --git a/src/editfns.c b/src/editfns.c
index df183155c4b..ce075f2696c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3280,7 +3280,7 @@ usage: (format STRING &rest OBJECTS) */)
3280 int i; 3280 int i;
3281 info = (struct info *) alloca (nbytes); 3281 info = (struct info *) alloca (nbytes);
3282 bzero (info, nbytes); 3282 bzero (info, nbytes);
3283 for (i = 0; i <= nargs; i++) 3283 for (i = 0; i < nargs; i++)
3284 info[i].start = -1; 3284 info[i].start = -1;
3285 discarded = (char *) alloca (SBYTES (args[0])); 3285 discarded = (char *) alloca (SBYTES (args[0]));
3286 bzero (discarded, SBYTES (args[0])); 3286 bzero (discarded, SBYTES (args[0]));
diff --git a/src/emacs.c b/src/emacs.c
index 1c7d595d3d3..011d66c5cab 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1,5 +1,5 @@
1/* Fully extensible Emacs, running on Unix, intended for GNU. 1/* Fully extensible Emacs, running on Unix, intended for GNU.
2 Copyright (C) 1985,86,87,93,94,95,97,98,1999,2001,02,2003 2 Copyright (C) 1985,86,87,93,94,95,97,98,1999,2001,02,03,2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -87,9 +87,18 @@ extern char *index P_ ((const char *, int));
87 87
88/* Make these values available in GDB, which doesn't see macros. */ 88/* Make these values available in GDB, which doesn't see macros. */
89 89
90#ifdef USE_LSB_TAG
91int gdb_use_lsb = 1;
92#else
93int gdb_use_lsb = 0;
94#endif
95#ifdef NO_UNION_TYPE
96int gdb_use_union = 0;
97#else
98int gdb_use_union = 1;
99#endif
90EMACS_INT gdb_valbits = VALBITS; 100EMACS_INT gdb_valbits = VALBITS;
91EMACS_INT gdb_gctypebits = GCTYPEBITS; 101EMACS_INT gdb_gctypebits = GCTYPEBITS;
92EMACS_INT gdb_emacs_intbits = sizeof (EMACS_INT) * BITS_PER_CHAR;
93#ifdef DATA_SEG_BITS 102#ifdef DATA_SEG_BITS
94EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS; 103EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS;
95#else 104#else
diff --git a/src/eval.c b/src/eval.c
index a5f66b295a6..0326a828a81 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,5 +1,5 @@
1/* Evaluator for GNU Emacs Lisp interpreter. 1/* Evaluator for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000, 2001, 2002 2 Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000, 2001, 02, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -1812,13 +1812,11 @@ then strings and vectors are not accepted. */)
1812 /* Lists may represent commands. */ 1812 /* Lists may represent commands. */
1813 if (!CONSP (fun)) 1813 if (!CONSP (fun))
1814 return Qnil; 1814 return Qnil;
1815 funcar = Fcar (fun); 1815 funcar = XCAR (fun);
1816 if (!SYMBOLP (funcar))
1817 return Fsignal (Qinvalid_function, Fcons (fun, Qnil));
1818 if (EQ (funcar, Qlambda)) 1816 if (EQ (funcar, Qlambda))
1819 return Fassq (Qinteractive, Fcdr (Fcdr (fun))); 1817 return Fassq (Qinteractive, Fcdr (XCDR (fun)));
1820 if (EQ (funcar, Qautoload)) 1818 if (EQ (funcar, Qautoload))
1821 return Fcar (Fcdr (Fcdr (Fcdr (fun)))); 1819 return Fcar (Fcdr (Fcdr (XCDR (fun))));
1822 else 1820 else
1823 return Qnil; 1821 return Qnil;
1824} 1822}
diff --git a/src/lisp.h b/src/lisp.h
index 2135f80f5e8..48b9c0c7912 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2034,6 +2034,7 @@ extern Lisp_Object Qnumberp, Qnumber_or_marker_p;
2034extern Lisp_Object Qinteger; 2034extern Lisp_Object Qinteger;
2035 2035
2036extern void circular_list_error P_ ((Lisp_Object)); 2036extern void circular_list_error P_ ((Lisp_Object));
2037EXFUN (Finteractive_form, 1);
2037 2038
2038/* Defined in frame.c */ 2039/* Defined in frame.c */
2039extern Lisp_Object Qframep; 2040extern Lisp_Object Qframep;
diff --git a/src/xterm.c b/src/xterm.c
index a297faa2ac0..fe1dca7fd71 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -216,6 +216,17 @@ static String Xt_default_resources[] = {0};
216 216
217static int toolkit_scroll_bar_interaction; 217static int toolkit_scroll_bar_interaction;
218 218
219/* Non-zero means to not move point as a result of clicking on a
220 frame to focus it (when focus-follows-mouse is nil). */
221
222int x_mouse_click_focus_ignore_position;
223
224/* Non-zero timeout value means ignore next mouse click if it arrives
225 before that timeout elapses (i.e. as part of the same sequence of
226 events resulting from clicking on a frame to select it). */
227
228static unsigned long ignore_next_mouse_click_timeout;
229
219/* Mouse movement. 230/* Mouse movement.
220 231
221 Formerly, we used PointerMotionHintMask (in standard_event_mask) 232 Formerly, we used PointerMotionHintMask (in standard_event_mask)
@@ -748,13 +759,13 @@ x_draw_fringe_bitmap (w, row, p)
748 759
749 if (p->overlay_p) 760 if (p->overlay_p)
750 { 761 {
751 clipmask = XCreatePixmapFromBitmapData (display, 762 clipmask = XCreatePixmapFromBitmapData (display,
752 FRAME_X_DISPLAY_INFO (f)->root_window, 763 FRAME_X_DISPLAY_INFO (f)->root_window,
753 bits, p->wd, p->h, 764 bits, p->wd, p->h,
754 1, 0, 1); 765 1, 0, 1);
755 gcv.clip_mask = clipmask; 766 gcv.clip_mask = clipmask;
756 gcv.clip_x_origin = p->x; 767 gcv.clip_x_origin = p->x;
757 gcv.clip_y_origin = p->y; 768 gcv.clip_y_origin = p->y;
758 XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin, &gcv); 769 XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin, &gcv);
759 } 770 }
760 771
@@ -5733,7 +5744,7 @@ event_handler_gdk (gxev, ev, data)
5733 else 5744 else
5734 { 5745 {
5735 current_count += 5746 current_count +=
5736 handle_one_xevent (dpyinfo, xev, &current_finish, 5747 handle_one_xevent (dpyinfo, xev, &current_finish,
5737 current_hold_quit); 5748 current_hold_quit);
5738 } 5749 }
5739 } 5750 }
@@ -6175,6 +6186,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6175 6186
6176 case KeyPress: 6187 case KeyPress:
6177 6188
6189 ignore_next_mouse_click_timeout = 0;
6190
6178#if defined (USE_X_TOOLKIT) || defined (USE_GTK) 6191#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
6179 /* Dispatch KeyPress events when in menu. */ 6192 /* Dispatch KeyPress events when in menu. */
6180 if (popup_activated ()) 6193 if (popup_activated ())
@@ -6534,6 +6547,9 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6534 6547
6535 f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); 6548 f = x_any_window_to_frame (dpyinfo, event.xcrossing.window);
6536 6549
6550 if (f && x_mouse_click_focus_ignore_position)
6551 ignore_next_mouse_click_timeout = event.xmotion.time + 200;
6552
6537#if 0 6553#if 0
6538 if (event.xcrossing.focus) 6554 if (event.xcrossing.focus)
6539 { 6555 {
@@ -6777,7 +6793,21 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6777#if defined (USE_X_TOOLKIT) || defined (USE_GTK) 6793#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
6778 if (! popup_activated ()) 6794 if (! popup_activated ())
6779#endif 6795#endif
6780 construct_mouse_click (&inev, &event, f); 6796 {
6797 if (ignore_next_mouse_click_timeout)
6798 {
6799 if (event.type == ButtonPress
6800 && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0)
6801 {
6802 ignore_next_mouse_click_timeout = 0;
6803 construct_mouse_click (&inev, &event, f);
6804 }
6805 if (event.type == ButtonRelease)
6806 ignore_next_mouse_click_timeout = 0;
6807 }
6808 else
6809 construct_mouse_click (&inev, &event, f);
6810 }
6781 } 6811 }
6782 } 6812 }
6783 else 6813 else
@@ -6925,7 +6955,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6925 any_help_event_p = 1; 6955 any_help_event_p = 1;
6926 gen_help_event (help_echo_string, frame, help_echo_window, 6956 gen_help_event (help_echo_string, frame, help_echo_window,
6927 help_echo_object, help_echo_pos); 6957 help_echo_object, help_echo_pos);
6928 } 6958 }
6929 else 6959 else
6930 { 6960 {
6931 help_echo_string = Qnil; 6961 help_echo_string = Qnil;
@@ -8241,7 +8271,7 @@ x_set_offset (f, xoff, yoff, change_gravity)
8241 f->win_gravity = NorthWestGravity; 8271 f->win_gravity = NorthWestGravity;
8242 } 8272 }
8243 x_calc_absolute_position (f); 8273 x_calc_absolute_position (f);
8244 8274
8245 BLOCK_INPUT; 8275 BLOCK_INPUT;
8246 x_wm_set_size_hint (f, (long) 0, 0); 8276 x_wm_set_size_hint (f, (long) 0, 0);
8247 8277
@@ -10365,7 +10395,7 @@ x_term_init (display_name, xrm_option, resource_name)
10365 get_bits_and_offset (dpyinfo->visual->green_mask, 10395 get_bits_and_offset (dpyinfo->visual->green_mask,
10366 &dpyinfo->green_bits, &dpyinfo->green_offset); 10396 &dpyinfo->green_bits, &dpyinfo->green_offset);
10367 } 10397 }
10368 10398
10369 /* See if a private colormap is requested. */ 10399 /* See if a private colormap is requested. */
10370 if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen)) 10400 if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen))
10371 { 10401 {
@@ -10790,6 +10820,7 @@ x_initialize ()
10790 x_noop_count = 0; 10820 x_noop_count = 0;
10791 last_tool_bar_item = -1; 10821 last_tool_bar_item = -1;
10792 any_help_event_p = 0; 10822 any_help_event_p = 0;
10823 ignore_next_mouse_click_timeout = 0;
10793 10824
10794#ifdef USE_GTK 10825#ifdef USE_GTK
10795 current_count = -1; 10826 current_count = -1;
@@ -10877,6 +10908,16 @@ UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
10877to 4.1, set this to nil. */); 10908to 4.1, set this to nil. */);
10878 x_use_underline_position_properties = 1; 10909 x_use_underline_position_properties = 1;
10879 10910
10911 DEFVAR_BOOL ("x-mouse-click-focus-ignore-position",
10912 &x_mouse_click_focus_ignore_position,
10913 doc: /* Non-nil means that a mouse click to focus a frame does not move point.
10914This variable is only used when the window manager requires that you
10915click on a frame to select it (give it focus). In that case, a value
10916of nil, means that the selected window and cursor position changes to
10917reflect the mouse click position, while a non-nil value means that the
10918selected window or cursor position is preserved. */);
10919 x_mouse_click_focus_ignore_position = 0;
10920
10880 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, 10921 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
10881 doc: /* What X toolkit scroll bars Emacs uses. 10922 doc: /* What X toolkit scroll bars Emacs uses.
10882A value of nil means Emacs doesn't use X toolkit scroll bars. 10923A value of nil means Emacs doesn't use X toolkit scroll bars.