diff options
| author | Karoly Lorentey | 2005-03-16 16:06:15 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-03-16 16:06:15 +0000 |
| commit | 14c0ac78c48e6bdf832e370ef15ecbef6573dd06 (patch) | |
| tree | ae0aa5371351ec1a2d0bdf7c55e60b8df4b0063c | |
| parent | 38d2de214077b4e600d9f9d20d7ec81e1f1c8908 (diff) | |
| parent | a7679889e8213289331577d1d9e6d1187a20d035 (diff) | |
| download | emacs-14c0ac78c48e6bdf832e370ef15ecbef6573dd06.tar.gz emacs-14c0ac78c48e6bdf832e370ef15ecbef6573dd06.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 37-38, 162-182)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-162
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-163
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-164
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-165
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-166
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-167
Tweak obsolete function/variable warning message
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-168
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-169
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-170
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-171
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-172
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-173
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-174
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-175
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-176
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-177
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-178
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-179
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-180
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-181
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-182
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-37
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-38
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-309
74 files changed, 1836 insertions, 1087 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-03-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * configure.in: Only add XASSERTS to cppflags. | ||
| 4 | * configure: Regenerate. | ||
| 5 | |||
| 1 | 2005-03-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 6 | 2005-03-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * configure.in: Added --enable-asserts. | 8 | * configure.in: Added --enable-asserts. |
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index ca6f2d94724..e9eac1065be 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -178,14 +178,14 @@ people who have checked it. | |||
| 178 | 178 | ||
| 179 | SECTION READERS | 179 | SECTION READERS |
| 180 | ----------------------------- | 180 | ----------------------------- |
| 181 | man/abbrevs.texi Chong Yidong | 181 | man/abbrevs.texi Chong Yidong Joakim Verona |
| 182 | man/anti.texi | 182 | man/anti.texi |
| 183 | man/basic.texi "Luc Teirlinck" Chong Yidong | 183 | man/basic.texi "Luc Teirlinck" Chong Yidong |
| 184 | man/buffers.texi "Luc Teirlinck" Chong Yidong | 184 | man/buffers.texi "Luc Teirlinck" Chong Yidong |
| 185 | man/building.texi "Ted Zlatanov" <tzz@lifelogs.com> | 185 | man/building.texi "Ted Zlatanov" <tzz@lifelogs.com> |
| 186 | man/calendar.texi joakim@verona.se | 186 | man/calendar.texi joakim@verona.se Chong Yidong |
| 187 | man/cmdargs.texi Chong Yidong | 187 | man/cmdargs.texi Chong Yidong |
| 188 | man/commands.texi "Luc Teirlinck" | 188 | man/commands.texi "Luc Teirlinck" Chong Yidong |
| 189 | man/custom.texi Chong Yidong | 189 | man/custom.texi Chong Yidong |
| 190 | man/dired.texi Chong Yidong joakim@verona.se | 190 | man/dired.texi Chong Yidong joakim@verona.se |
| 191 | man/display.texi "Luc Teirlinck" Chong Yidong | 191 | man/display.texi "Luc Teirlinck" Chong Yidong |
| @@ -194,7 +194,7 @@ man/entering.texi "Luc Teirlinck" Chong Yidong | |||
| 194 | man/files.texi "Luc Teirlinck" Chong Yidong | 194 | man/files.texi "Luc Teirlinck" Chong Yidong |
| 195 | man/fixit.texi "Luc Teirlinck" Chong Yidong | 195 | man/fixit.texi "Luc Teirlinck" Chong Yidong |
| 196 | man/frames.texi "Luc Teirlinck" Chong Yidong | 196 | man/frames.texi "Luc Teirlinck" Chong Yidong |
| 197 | man/glossary.texi | 197 | man/glossary.texi Chong Yidong |
| 198 | man/help.texi "Luc Teirlinck" Chong Yidong | 198 | man/help.texi "Luc Teirlinck" Chong Yidong |
| 199 | man/indent.texi "Luc Teirlinck" Chong Yidong | 199 | man/indent.texi "Luc Teirlinck" Chong Yidong |
| 200 | man/killing.texi "Luc Teirlinck" Chong Yidong | 200 | man/killing.texi "Luc Teirlinck" Chong Yidong |
| @@ -204,17 +204,17 @@ man/maintaining.texi | |||
| 204 | man/major.texi "Luc Teirlinck" Chong Yidong | 204 | man/major.texi "Luc Teirlinck" Chong Yidong |
| 205 | man/mark.texi "Luc Teirlinck" Chong Yidong | 205 | man/mark.texi "Luc Teirlinck" Chong Yidong |
| 206 | man/mini.texi "Luc Teirlinck" Chong Yidong | 206 | man/mini.texi "Luc Teirlinck" Chong Yidong |
| 207 | man/misc.texi | 207 | man/misc.texi Chong Yidong |
| 208 | man/msdog.texi Chong Yidong | 208 | man/msdog.texi Chong Yidong |
| 209 | man/mule.texi "Luc Teirlinck" | 209 | man/mule.texi "Luc Teirlinck" |
| 210 | man/m-x.texi "Luc Teirlinck" Chong Yidong | 210 | man/m-x.texi "Luc Teirlinck" Chong Yidong |
| 211 | man/picture.texi Joakim Verona <joakim@verona.se> | 211 | man/picture.texi Joakim Verona <joakim@verona.se> |
| 212 | man/programs.texi "Stephen Eglen" Chong Yidong | 212 | man/programs.texi "Stephen Eglen" Chong Yidong |
| 213 | man/regs.texi "Luc Teirlinck" Chong Yidong | 213 | man/regs.texi "Luc Teirlinck" Chong Yidong |
| 214 | man/rmail.texi | 214 | man/rmail.texi Chong Yidong |
| 215 | man/screen.texi "Luc Teirlinck" Chong Yidong | 215 | man/screen.texi "Luc Teirlinck" Chong Yidong |
| 216 | man/search.texi "Luc Teirlinck" | 216 | man/search.texi "Luc Teirlinck" |
| 217 | man/sending.texi | 217 | man/sending.texi Chong Yidong |
| 218 | man/text.texi "Luc Teirlinck" Chong Yidong | 218 | man/text.texi "Luc Teirlinck" Chong Yidong |
| 219 | man/trouble.texi Chong Yidong | 219 | man/trouble.texi Chong Yidong |
| 220 | man/windows.texi "Luc Teirlinck" Chong Yidong | 220 | man/windows.texi "Luc Teirlinck" Chong Yidong |
| @@ -234,14 +234,14 @@ lispref/advice.texi joakim@verona.se Chong Yidong | |||
| 234 | lispref/anti.texi | 234 | lispref/anti.texi |
| 235 | lispref/backups.texi "Luc Teirlinck" Chong Yidong | 235 | lispref/backups.texi "Luc Teirlinck" Chong Yidong |
| 236 | lispref/buffers.texi "Luc Teirlinck" Chong Yidong | 236 | lispref/buffers.texi "Luc Teirlinck" Chong Yidong |
| 237 | lispref/calendar.texi Joakim Verona <joakim@verona.se> | 237 | lispref/calendar.texi Joakim Verona <joakim@verona.se> Chong Yidong |
| 238 | lispref/commands.texi "Luc Teirlinck" Chong Yidong | 238 | lispref/commands.texi "Luc Teirlinck" Chong Yidong |
| 239 | lispref/compile.texi "Luc Teirlinck" Chong Yidong | 239 | lispref/compile.texi "Luc Teirlinck" Chong Yidong |
| 240 | lispref/control.texi "Luc Teirlinck" Chong Yidong | 240 | lispref/control.texi "Luc Teirlinck" Chong Yidong |
| 241 | lispref/customize.texi | 241 | lispref/customize.texi Chong Yidong |
| 242 | lispref/debugging.texi Joakim Verona <joakim@verona.se> Lute Kamstra | 242 | lispref/debugging.texi Joakim Verona <joakim@verona.se> Lute Kamstra |
| 243 | lispref/display.texi | 243 | lispref/display.texi Chong Yidong |
| 244 | lispref/edebug.texi | 244 | lispref/edebug.texi Chong Yidong |
| 245 | lispref/elisp.texi "Luc Teirlinck" | 245 | lispref/elisp.texi "Luc Teirlinck" |
| 246 | lispref/errors.texi "Luc Teirlinck" | 246 | lispref/errors.texi "Luc Teirlinck" |
| 247 | lispref/eval.texi "Luc Teirlinck" Chong Yidong | 247 | lispref/eval.texi "Luc Teirlinck" Chong Yidong |
| @@ -251,7 +251,7 @@ lispref/functions.texi "Luc Teirlinck" Chong Yidong | |||
| 251 | lispref/hash.texi "Luc Teirlinck" Chong Yidong | 251 | lispref/hash.texi "Luc Teirlinck" Chong Yidong |
| 252 | lispref/help.texi "Luc Teirlinck" Chong Yidong | 252 | lispref/help.texi "Luc Teirlinck" Chong Yidong |
| 253 | lispref/hooks.texi | 253 | lispref/hooks.texi |
| 254 | lispref/internals.texi "Luc Teirlinck" | 254 | lispref/internals.texi "Luc Teirlinck" Chong Yidong |
| 255 | lispref/intro.texi "Luc Teirlinck" | 255 | lispref/intro.texi "Luc Teirlinck" |
| 256 | lispref/keymaps.texi "Luc Teirlinck" Chong Yidong | 256 | lispref/keymaps.texi "Luc Teirlinck" Chong Yidong |
| 257 | lispref/lists.texi "Luc Teirlinck" Chong Yidong | 257 | lispref/lists.texi "Luc Teirlinck" Chong Yidong |
| @@ -262,7 +262,7 @@ lispref/maps.texi | |||
| 262 | lispref/markers.texi "Luc Teirlinck" Chong Yidong | 262 | lispref/markers.texi "Luc Teirlinck" Chong Yidong |
| 263 | lispref/minibuf.texi "Luc Teirlinck" Chong Yidong | 263 | lispref/minibuf.texi "Luc Teirlinck" Chong Yidong |
| 264 | lispref/modes.texi Chong Yidong | 264 | lispref/modes.texi Chong Yidong |
| 265 | lispref/nonascii.texi "Luc Teirlinck" | 265 | lispref/nonascii.texi "Luc Teirlinck" Chong Yidong |
| 266 | lispref/numbers.texi "Luc Teirlinck" Chong Yidong | 266 | lispref/numbers.texi "Luc Teirlinck" Chong Yidong |
| 267 | lispref/objects.texi "Luc Teirlinck" Chong Yidong | 267 | lispref/objects.texi "Luc Teirlinck" Chong Yidong |
| 268 | lispref/os.texi "Luc Teirlinck" Chong Yidong | 268 | lispref/os.texi "Luc Teirlinck" Chong Yidong |
| @@ -21987,7 +21987,6 @@ echo | |||
| 21987 | 21987 | ||
| 21988 | if test $USE_XASSERTS = yes; then | 21988 | if test $USE_XASSERTS = yes; then |
| 21989 | echo " Compiling with asserts turned on." | 21989 | echo " Compiling with asserts turned on." |
| 21990 | CFLAGS="$CFLAGS -DXASSERTS=1" | ||
| 21991 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | 21990 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" |
| 21992 | echo | 21991 | echo |
| 21993 | fi | 21992 | fi |
diff --git a/configure.in b/configure.in index a23b28f0cf8..291ae9a9c08 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -3103,7 +3103,6 @@ echo | |||
| 3103 | 3103 | ||
| 3104 | if test $USE_XASSERTS = yes; then | 3104 | if test $USE_XASSERTS = yes; then |
| 3105 | echo " Compiling with asserts turned on." | 3105 | echo " Compiling with asserts turned on." |
| 3106 | CFLAGS="$CFLAGS -DXASSERTS=1" | ||
| 3107 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | 3106 | CPPFLAGS="$CPPFLAGS -DXASSERTS=1" |
| 3108 | echo | 3107 | echo |
| 3109 | fi | 3108 | fi |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 3636682432a..92667a1afff 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,7 +1,11 @@ | |||
| 1 | 2005-03-10 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * NEWS: Explain how to default Tramp to FTP. | ||
| 4 | |||
| 1 | 2005-03-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 5 | 2005-03-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 6 | ||
| 3 | * NEWS: Mention Carbon build on Mac OS 9. | 7 | * NEWS: Mention Carbon build on Mac OS 9. |
| 4 | 8 | ||
| 5 | 2005-03-01 David Kastrup <dak@gnu.org> | 9 | 2005-03-01 David Kastrup <dak@gnu.org> |
| 6 | 10 | ||
| 7 | * DEBUG: Add information about `-fno-crossjumping' for GCC. | 11 | * DEBUG: Add information about `-fno-crossjumping' for GCC. |
| @@ -49,7 +53,7 @@ | |||
| 49 | 2005-01-13 Cheng Gao <chenggao@gmail.com> | 53 | 2005-01-13 Cheng Gao <chenggao@gmail.com> |
| 50 | 54 | ||
| 51 | * MORE.STUFF: Add entries of some well known and widely used packages. | 55 | * MORE.STUFF: Add entries of some well known and widely used packages. |
| 52 | 56 | ||
| 53 | 2005-01-07 Lars Hansen <larsh@math.ku.dk> | 57 | 2005-01-07 Lars Hansen <larsh@math.ku.dk> |
| 54 | 58 | ||
| 55 | * NEWS: Describe desktop package lazy restore feature. | 59 | * NEWS: Describe desktop package lazy restore feature. |
| @@ -103,6 +103,13 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. | |||
| 103 | 103 | ||
| 104 | * Changes in Emacs 22.1 | 104 | * Changes in Emacs 22.1 |
| 105 | 105 | ||
| 106 | ** The commands copy-file, rename-file, make-symbolic-link and | ||
| 107 | add-name-to-file, when given a directory as the "new name" argument, | ||
| 108 | convert it to a file name by merging in the within-directory part of | ||
| 109 | the existing file's name. (This is the same convention that shell | ||
| 110 | commands cp, mv, and ln follow.) Thus, M-x copy-file RET ~/foo RET | ||
| 111 | /tmp RET copies ~/foo to /tmp/foo. | ||
| 112 | |||
| 106 | ** C-u M-x goto-line now switches to the most recent previous buffer, | 113 | ** C-u M-x goto-line now switches to the most recent previous buffer, |
| 107 | and goes to the specified line in that buffer. | 114 | and goes to the specified line in that buffer. |
| 108 | 115 | ||
| @@ -2445,7 +2452,11 @@ connection using base64 or uu encoding) and the `out-of-band' methods | |||
| 2445 | `rsync' to do the copying). | 2452 | `rsync' to do the copying). |
| 2446 | 2453 | ||
| 2447 | Shell connections can be acquired via `rsh', `ssh', `telnet' and also | 2454 | Shell connections can be acquired via `rsh', `ssh', `telnet' and also |
| 2448 | `su' and `sudo'. | 2455 | `su' and `sudo'. Ange-FTP is still supported via the `ftp' method. |
| 2456 | |||
| 2457 | If you want to disable Tramp you should set | ||
| 2458 | |||
| 2459 | (setq tramp-default-method "ftp") | ||
| 2449 | 2460 | ||
| 2450 | --- | 2461 | --- |
| 2451 | ** The new global minor mode `file-name-shadow-mode' modifies the way | 2462 | ** The new global minor mode `file-name-shadow-mode' modifies the way |
| @@ -82,6 +82,12 @@ to the FSF. | |||
| 82 | to save their changes. If the user says yes, show them | 82 | to save their changes. If the user says yes, show them |
| 83 | in a Custom buffer using customize-customized. | 83 | in a Custom buffer using customize-customized. |
| 84 | 84 | ||
| 85 | ** Emacs Lisp mode could put an overlay on the defun for every | ||
| 86 | function that has advice. The overlay could have `after-text' like " | ||
| 87 | [Function has advice]". It might look like | ||
| 88 | (defun foo [Function has advice] (x y) | ||
| 89 | The overlay could also be a button that you could use to view the advice. | ||
| 90 | |||
| 85 | ** ange-ftp | 91 | ** ange-ftp |
| 86 | *** understand sftp | 92 | *** understand sftp |
| 87 | *** Use MLS for ange-ftp-insert-directory if a list of files is specified. | 93 | *** Use MLS for ange-ftp-insert-directory if a list of files is specified. |
diff --git a/leim/ChangeLog b/leim/ChangeLog index df9923f6a29..4d6603afe6f 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2005-03-15 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * quail/thai.el (thai-generate-quail-map): Fix the kesmanee layout. | ||
| 4 | |||
| 5 | 2005-03-08 Kenichi Handa <handa@m17n.org> | ||
| 6 | |||
| 7 | * quail/latin-pre.el ("latin-1-prefix"): Add rule "__"->"_". | ||
| 8 | ("latin-9-prefix"): Add rules "__"->"_", "_ "->NBSP. | ||
| 9 | |||
| 1 | 2004-12-04 Kenichi Handa <handa@m17n.org> | 10 | 2004-12-04 Kenichi Handa <handa@m17n.org> |
| 2 | 11 | ||
| 3 | * quail/lao.el (lao-key-alist): Declare it by defvar. | 12 | * quail/lao.el (lao-key-alist): Declare it by defvar. |
diff --git a/leim/quail/latin-pre.el b/leim/quail/latin-pre.el index 177e7d8d71e..171e835106c 100644 --- a/leim/quail/latin-pre.el +++ b/leim/quail/latin-pre.el | |||
| @@ -154,6 +154,7 @@ | |||
| 154 | ("_+" ?,A1(B) | 154 | ("_+" ?,A1(B) |
| 155 | ("_y" ?,A%(B) | 155 | ("_y" ?,A%(B) |
| 156 | ("_:" ?,Aw(B) | 156 | ("_:" ?,Aw(B) |
| 157 | ("__" ?_) | ||
| 157 | ("/c" ?,A"(B) | 158 | ("/c" ?,A"(B) |
| 158 | ("/\\" ?,AW(B) | 159 | ("/\\" ?,AW(B) |
| 159 | ("/2" ?,A=(B) | 160 | ("/2" ?,A=(B) |
| @@ -834,6 +835,8 @@ For example, the character named `aogonek' is obtained by `/a'." | |||
| 834 | ("_+" ?,b1(B) | 835 | ("_+" ?,b1(B) |
| 835 | ("_y" ?,b%(B) | 836 | ("_y" ?,b%(B) |
| 836 | ("_:" ?,bw(B) | 837 | ("_:" ?,bw(B) |
| 838 | ("_ " ?,b (B) | ||
| 839 | ("__" ?_) | ||
| 837 | ("/c" ?,b"(B) | 840 | ("/c" ?,b"(B) |
| 838 | ("/\\" ?,bW(B) | 841 | ("/\\" ?,bW(B) |
| 839 | ("/o" ?,b=(B) ; clash with ,bx(B, but ,bf(B uses / | 842 | ("/o" ?,b=(B) ; clash with ,bx(B, but ,bf(B uses / |
diff --git a/leim/quail/thai.el b/leim/quail/thai.el index b0e3c497fe3..c147ad308e9 100644 --- a/leim/quail/thai.el +++ b/leim/quail/thai.el | |||
| @@ -87,18 +87,32 @@ The difference from the ordinal Thai keyboard: | |||
| 87 | [ | 87 | [ |
| 88 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes | 88 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes |
| 89 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes | 89 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes |
| 90 | 0 "#" "." ",Tr(B" ",Ts(B" ",Tt(B" ",TQi(B" ",T'(B" ; SPC .. ' | 90 | ;; This data is quite old. |
| 91 | ;; 0 "#" "." ",Tr(B" ",Ts(B" ",Tt(B" ",TQi(B" ",T'(B" ; SPC .. ' | ||
| 92 | ;; ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. / | ||
| 93 | ;; ",T((B" ",TE(B" "/" "_" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7 | ||
| 94 | ;; ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ? | ||
| 95 | ;; ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G | ||
| 96 | ;; ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" ",Tn(B" ",Tl(B" ",TO(B" ; H .. O | ||
| 97 | ;; ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W | ||
| 98 | ;; ")" ",Tm(B" "(" ",T:(B" ",T_(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _ | ||
| 99 | ;; ",T#(B" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g | ||
| 100 | ;; ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o | ||
| 101 | ;; ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w | ||
| 102 | ;; ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",To(B" "," ",T%(B" 0 ; x .. DEL | ||
| 103 | ;; This is the correct data nowadays. | ||
| 104 | 0 "+" "." ",Tr(B" ",Ts(B" ",Tt(B" ",T_(B" ",T'(B" ; SPC .. ' | ||
| 91 | ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. / | 105 | ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. / |
| 92 | ",T((B" ",TE(B" "/" "_" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7 | 106 | ",T((B" ",Te(B" "/" "-" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7 |
| 93 | ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ? | 107 | ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ? |
| 94 | ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G | 108 | ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G |
| 95 | ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" ",Tn(B" ",Tl(B" ",TO(B" ; H .. O | 109 | ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" "?" ",Tl(B" ",TO(B" ; H .. O |
| 96 | ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W | 110 | ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W |
| 97 | ")" ",Tm(B" "(" ",T:(B" ",T_(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _ | 111 | "\)" ",Tm(B" "\(" ",T:(B" ",T#(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _ |
| 98 | ",T#(B" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g | 112 | "_" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g |
| 99 | ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o | 113 | ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o |
| 100 | ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w | 114 | ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w |
| 101 | ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",To(B" "," ",T%(B" 0 ; x .. DEL | 115 | ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",T%(B" "," "%" 0 ; x .. DEL |
| 102 | ])) | 116 | ])) |
| 103 | 117 | ||
| 104 | 118 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df930a970d7..3ce47461c4c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,270 @@ | |||
| 1 | 2005-03-15 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * isearch.el (isearch-error): New variable. | ||
| 4 | (isearch-invalid-regexp, isearch-within-brackets): Remove. | ||
| 5 | (isearch-error-state): Renamed from `isearch-invalid-regexp-state'. | ||
| 6 | (isearch-within-brackets-state): Remove. | ||
| 7 | (isearch-case-fold-search-state, isearch-pop-fun-state): | ||
| 8 | Decrease frame index. | ||
| 9 | (isearch-mode, isearch-top-state, isearch-push-state) | ||
| 10 | (isearch-edit-string, isearch-abort, isearch-search-and-update) | ||
| 11 | (isearch-fallback, isearch-message-prefix, isearch-message-suffix) | ||
| 12 | (isearch-search, isearch-lazy-highlight-new-loop): | ||
| 13 | Replace `isearch-invalid-regexp' with `isearch-error'. | ||
| 14 | Remove `isearch-within-brackets'. | ||
| 15 | (isearch-search): Add `search-failed' handler to `condition-case'. | ||
| 16 | (isearch-lazy-highlight-search): Add `condition-case' to catch | ||
| 17 | errors and allow `isearch-lazy-highlight-update' to try | ||
| 18 | highlighting from the beginning of the window. | ||
| 19 | (isearch-repeat): Move up code to set isearch-wrapped to t | ||
| 20 | before calling isearch-wrap-function. | ||
| 21 | |||
| 22 | * info.el (Info-isearch-initial-node): New internal variable. | ||
| 23 | (Info-search): Signal an error in isearch mode when search leaves | ||
| 24 | the initial node. Signal an error when `bound' is non-nil and | ||
| 25 | nothing was found in the current subfile. | ||
| 26 | (Info-isearch-search): Remove `condition-case'. | ||
| 27 | (Info-isearch-wrap): Don't wrap when search failed during leaving | ||
| 28 | the initial node. If `Info-isearch-search' is nil, wrap around | ||
| 29 | the current node. | ||
| 30 | (Info-isearch-start): New fun. | ||
| 31 | (Info-mode): Add buffer-local hook `Info-isearch-start' to | ||
| 32 | `isearch-mode-hook'. | ||
| 33 | |||
| 34 | 2005-03-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 35 | |||
| 36 | * simple.el (normal-erase-is-backspace): Set default to t if | ||
| 37 | running on Mac. | ||
| 38 | |||
| 39 | * term/mac-win.el (function-key-map): Sync with x-win.el. | ||
| 40 | |||
| 41 | 2005-03-15 Kenichi Handa <handa@m17n.org> | ||
| 42 | |||
| 43 | * international/mule-cmds.el (locale-language-names): Modify the | ||
| 44 | format of elements and add more entries. | ||
| 45 | (locale-preferred-coding-systems): Add more entries. | ||
| 46 | (set-locale-environment): Adjusted for the change of | ||
| 47 | locale-language-names. | ||
| 48 | |||
| 49 | 2005-03-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 50 | |||
| 51 | * pcvs.el (smerge-ediff): Remove bogus autoload. | ||
| 52 | |||
| 53 | 2005-03-14 Lute Kamstra <lute@gnu.org> | ||
| 54 | |||
| 55 | * emacs-lisp/debug.el (debugger-make-xrefs): Docstring fix. | ||
| 56 | Ignore a `*' at the beginning of a line. | ||
| 57 | |||
| 58 | * subr.el (macro-declaration-function): Move to emacs-lisp/byte-run.el. | ||
| 59 | * emacs-lisp/byte-run.el (macro-declaration-function): Move from | ||
| 60 | subr.el. | ||
| 61 | (dont-compile, eval-when-compile, eval-and-compile): Use declare | ||
| 62 | to specify indentation. | ||
| 63 | |||
| 64 | * generic.el (define-generic-mode): Let generic-mode-list be a | ||
| 65 | list of strings; test membership with equal. | ||
| 66 | |||
| 67 | 2005-03-14 Kim F. Storm <storm@cua.dk> | ||
| 68 | |||
| 69 | * simple.el (next-line, previous-line): Add optional try-vscroll | ||
| 70 | arg to recognize interactive use. Pass it on to line-move. | ||
| 71 | (line-move): Don't perform auto-window-vscroll when defining or | ||
| 72 | executing keyboard macro to ensure consistent behaviour. | ||
| 73 | |||
| 74 | 2005-03-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 75 | |||
| 76 | * pcvs-util.el (cvs-string->strings): Strip trailing whitespace. | ||
| 77 | |||
| 78 | 2005-03-13 Lute Kamstra <lute@gnu.org> | ||
| 79 | |||
| 80 | * emacs-lisp/debug.el (debug): Set debug-on-exit before calling | ||
| 81 | debugger-setup-buffer so that backtrace marks the frames set to | ||
| 82 | debug-on-exit and we don't have to do it manually. Set an extra | ||
| 83 | debug-on-exit for macro's. | ||
| 84 | (debugger-setup-buffer): Don't mark the top frame manually. | ||
| 85 | |||
| 86 | 2005-03-12 Lute Kamstra <lute@gnu.org> | ||
| 87 | |||
| 88 | * emacs-lisp/byte-run.el: Replace lisp-indent-hook with | ||
| 89 | lisp-indent-function throughout. | ||
| 90 | (with-no-warnings): Set lisp-indent-function property. | ||
| 91 | |||
| 92 | 2005-03-12 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 93 | |||
| 94 | * progmodes/dcl-mode.el (dcl-mode-syntax-table): | ||
| 95 | Add entry for backslash. | ||
| 96 | |||
| 97 | 2005-03-12 Juri Linkov <juri@jurta.org> | ||
| 98 | |||
| 99 | * info.el (Info-search): Four fixes for backward search. | ||
| 100 | |||
| 101 | 2005-03-11 Jay Belanger <belanger@truman.edu> | ||
| 102 | |||
| 103 | * calc/calc.el (calc-language-alist): New variable. | ||
| 104 | * calc/calc-embed.el (calc-embedded-language-alist): Remove. | ||
| 105 | (calc-embedded-find-modes): Use calc-language-alist instead of | ||
| 106 | calc-embedded-language-alist. | ||
| 107 | |||
| 108 | 2005-03-11 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 109 | |||
| 110 | * calendar/calendar.el (calendar-redrawing): New internal | ||
| 111 | variable. | ||
| 112 | (redraw-calendar): Remove bogus save-excursion from previous | ||
| 113 | change. Bind calendar-redrawing to t for mark-diary-entries. | ||
| 114 | * calendar/diary-lib.el (mark-diary-entries): No need to redraw | ||
| 115 | calendar if that is why we were called. | ||
| 116 | |||
| 117 | 2005-03-11 Kenichi Handa <handa@m17n.org> | ||
| 118 | |||
| 119 | * international/mule.el (make-coding-system): Set property | ||
| 120 | 'coding-system-define-form to nil. | ||
| 121 | (define-coding-system-alias): Likewise. | ||
| 122 | |||
| 123 | 2005-03-11 Kenichi Handa <handa@m17n.org> | ||
| 124 | |||
| 125 | These changes are suggested by Dave Love <fx@gnu.org>. | ||
| 126 | |||
| 127 | * textmodes/fill.el: Change encoding to iso-2022-7bit and add | ||
| 128 | coding: tag. | ||
| 129 | (adaptive-fill-regexp): Add more bullets. | ||
| 130 | (fill-french-nobreak-p): Add Latin-1 and Latin-9 guillemets in | ||
| 131 | regexps. | ||
| 132 | |||
| 133 | 2005-03-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 134 | |||
| 135 | * help.el (describe-mode): Properly handle non-trivial lighters. | ||
| 136 | Don't ignore minor modes that are not listed in minor-mode-list. | ||
| 137 | |||
| 138 | * tooltip.el (tooltip-mode): Don't complain that you can't turn the | ||
| 139 | feature ON when the user requests to turn it OFF. | ||
| 140 | |||
| 141 | 2005-03-10 Lute Kamstra <lute@gnu.org> | ||
| 142 | |||
| 143 | * emacs-lisp/debug.el (debug-entry-code): Delete it. | ||
| 144 | (implement-debug-on-entry): New function to replace debug-entry-code. | ||
| 145 | (debug-on-entry-1): Use implement-debug-on-entry. Delete the | ||
| 146 | second argument as the 2005-03-07 change makes it obsolete. | ||
| 147 | (debug-on-entry, cancel-debug-on-entry): Update call to | ||
| 148 | debug-on-entry-1. | ||
| 149 | (debug, debugger-setup-buffer): Comment update. | ||
| 150 | (debugger-frame-number): Update to work with implement-debug-on-entry. | ||
| 151 | |||
| 152 | 2005-03-10 Jay Belanger <belanger@truman.edu> | ||
| 153 | |||
| 154 | * calc/calc-embed.el (math-ms-args): Declare it. | ||
| 155 | (calc-embedded-eval-expr, calc-embedded-eval-get-var): Use variable | ||
| 156 | math-ms-args. | ||
| 157 | (calc-embedded-subst): Use math-multi-subst-rec to substitute | ||
| 158 | variables. | ||
| 159 | |||
| 160 | 2005-03-10 Nick Roberts <nickrob@snap.net.nz> | ||
| 161 | |||
| 162 | * progmodes/gdb-ui.el (gdb-var-create-handler, gdb-get-location): | ||
| 163 | Use message-box. | ||
| 164 | |||
| 165 | * tooltip.el (tooltip-mode): Use define-minor-mode and simplify. | ||
| 166 | (tooltip-activate-mouse-motions-if-enabled): Use dolist. | ||
| 167 | (tooltip-gud-tips): Simplify. | ||
| 168 | (tooltip-gud-tips-p): Remove superflouous :set. | ||
| 169 | (tooltip-gud-modes): Add fortran-mode. | ||
| 170 | (gdb-tooltip-print): Remove newline for tooltip-use-echo-area. | ||
| 171 | |||
| 172 | * bindings.el (mode-line-mode-menu): Add tooltip-mode to mode-line. | ||
| 173 | |||
| 174 | 2005-03-09 Kim F. Storm <storm@cua.dk> | ||
| 175 | |||
| 176 | * play/animate.el (animate-place-char): Use forward-line instead | ||
| 177 | of next-line to improve performance. | ||
| 178 | |||
| 179 | 2005-03-09 Simon Josefsson <jas@extundo.com> | ||
| 180 | |||
| 181 | * net/browse-url.el (browse-url-default-browser): Doc fix. | ||
| 182 | |||
| 183 | 2005-03-09 Miles Bader <miles@gnu.org> | ||
| 184 | |||
| 185 | * emacs-lisp/bytecomp.el (byte-compile-variable-ref) | ||
| 186 | (byte-compile-obsolete): Change " since VER" to " (as of Emacs VER)". | ||
| 187 | |||
| 188 | 2005-03-09 Kenichi Handa <handa@m17n.org> | ||
| 189 | |||
| 190 | * international/latin-1.el: Set case and syntax for 255 only if | ||
| 191 | set-case-syntax-set-multibyte is nil. | ||
| 192 | |||
| 193 | * textmodes/ispell.el (ispell-insert-word): New function. | ||
| 194 | (ispell-word): Use ispell-insert-word to insert a new word. | ||
| 195 | (ispell-process-line): Likewise. | ||
| 196 | (ispell-complete-word): Likewise. | ||
| 197 | |||
| 198 | 2005-03-09 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 199 | |||
| 200 | * calendar/calendar.el (redraw-calendar): Preserve point. | ||
| 201 | Reported by Matt Hodges <MPHodges@member.fsf.org>. | ||
| 202 | (calendar-week-start-day): Move after definition of | ||
| 203 | redraw-calendar. Delete buffer test, since redraw-calendar has | ||
| 204 | that now. | ||
| 205 | |||
| 206 | * calendar/diary-lib.el (mark-diary-entries): Only call | ||
| 207 | redraw-calendar in the first of any recursive calls. | ||
| 208 | Reported by Alan Shutko <ats@acm.org>. | ||
| 209 | |||
| 210 | 2005-03-08 Juri Linkov <juri@jurta.org> | ||
| 211 | |||
| 212 | * textmodes/sgml-mode.el (sgml-tag, html-tag-alist) | ||
| 213 | (html-horizontal-rule, html-line, html-image, html-checkboxes) | ||
| 214 | (html-radio-buttons): Add a space before the trailing `/>' where | ||
| 215 | sgml-xml-mode is non-nil. | ||
| 216 | (sgml-delete-tag): Check if the tag ends with `/>' to not delete | ||
| 217 | the subsequent tag of the empty XML tag. | ||
| 218 | (html-href-anchor): Don't set initial input to "http:". | ||
| 219 | (html-image): Ask for the image URL and set point inside alt="". | ||
| 220 | (html-name-anchor): Duplicate the name in the `id' attribute when | ||
| 221 | sgml-xml-mode is non-nil. | ||
| 222 | (html-paragraph): Remove \n before <p>. | ||
| 223 | (html-checkboxes, html-radio-buttons): Insert `checked="checked"' | ||
| 224 | instead of `checked' when sgml-xml-mode is non-nil. | ||
| 225 | |||
| 226 | * facemenu.el (list-colors-print): Print #RRGGBB in default face. | ||
| 227 | Remove 1 space before #RRGGBB to not truncate it on terminal | ||
| 228 | windows w/o fringes. Remove 1 space between bg and fg examples | ||
| 229 | to get more space. | ||
| 230 | (list-colors-duplicates): Replace `and' with `if' for `boundp' to | ||
| 231 | avoid byte-compile warnings. | ||
| 232 | |||
| 233 | * image-file.el (image-file-handler): Put `safe-magic' property to | ||
| 234 | `image-file-handler'. | ||
| 235 | |||
| 236 | * info.el (Info-isearch-search): Emulate word search in | ||
| 237 | isearching through multiple Info nodes with Info-search. | ||
| 238 | (Info-isearch-wrap): Allow isearch-word. | ||
| 239 | |||
| 240 | 2005-03-08 Lute Kamstra <lute@gnu.org> | ||
| 241 | |||
| 242 | * emacs-lisp/debug.el (debugger-step-through): Make sure that | ||
| 243 | stepping into the debugger's code is not possible. | ||
| 244 | (debugger-jumping-flag): Docstring update. | ||
| 245 | |||
| 246 | 2005-03-08 Jay Belanger <belanger@truman.edu> | ||
| 247 | |||
| 248 | * calc/calc-embed.el (calc-do-embedded): Reset mode line when | ||
| 249 | embedded mode begins. | ||
| 250 | (calc-embedded-language-alist): New variable. | ||
| 251 | (calc-embedded-find-modes): Use calc-embedded-language-alist to | ||
| 252 | set default language mode. | ||
| 253 | |||
| 254 | 2005-03-08 Kenichi Handa <handa@m17n.org> | ||
| 255 | |||
| 256 | * international/ccl.el (define-ccl-program): Fix docstring about | ||
| 257 | extra 256 bytes assured for the output buffer. | ||
| 258 | |||
| 259 | * international/utf-16.el (ccl-encode-mule-utf-16le-with-signature): | ||
| 260 | Fix BUFFER_MAGNIFICATION to 2. | ||
| 261 | (ccl-encode-mule-utf-16be-with-signature): Likewise. | ||
| 262 | |||
| 263 | 2005-03-07 Karl Chen <quarl@cs.berkeley.edu> | ||
| 264 | |||
| 265 | * align.el (align-rules-list): Added an alignment rule for CSS | ||
| 266 | declarations (applies to css-mode and html-mode buffers). | ||
| 267 | |||
| 1 | 2005-03-07 Stefan Monnier <monnier@iro.umontreal.ca> | 268 | 2005-03-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 269 | ||
| 3 | * emacs-lisp/debug.el (debug-on-entry-1): Fix handling of macros. | 270 | * emacs-lisp/debug.el (debug-on-entry-1): Fix handling of macros. |
| @@ -191,8 +458,7 @@ | |||
| 191 | that debug-entry-code can be safely removed from a function while | 458 | that debug-entry-code can be safely removed from a function while |
| 192 | this code is being evaluated. Revert the 2005-02-27 change as the | 459 | this code is being evaluated. Revert the 2005-02-27 change as the |
| 193 | new implementation no longer requires it. Make sure that a | 460 | new implementation no longer requires it. Make sure that a |
| 194 | function body containing just a string is not mistaken for a | 461 | function body containing just a string is not mistaken for a docstring. |
| 195 | docstring. | ||
| 196 | (debug): Skip one more frame in case of debug on entry. | 462 | (debug): Skip one more frame in case of debug on entry. |
| 197 | (debugger-setup-buffer): Delete one more frame line in case of | 463 | (debugger-setup-buffer): Delete one more frame line in case of |
| 198 | debug on entry. | 464 | debug on entry. |
diff --git a/lisp/align.el b/lisp/align.el index 5e739c8f7c0..5238a75807d 100644 --- a/lisp/align.el +++ b/lisp/align.el | |||
| @@ -466,13 +466,13 @@ The possible settings for `align-region-separate' are: | |||
| 466 | (repeat . t) | 466 | (repeat . t) |
| 467 | (modes . align-c++-modes) | 467 | (modes . align-c++-modes) |
| 468 | (run-if . ,(function (lambda () current-prefix-arg)))) | 468 | (run-if . ,(function (lambda () current-prefix-arg)))) |
| 469 | ; (valid | 469 | ; (valid |
| 470 | ; . ,(function | 470 | ; . ,(function |
| 471 | ; (lambda () | 471 | ; (lambda () |
| 472 | ; (memq (caar (c-guess-basic-syntax)) | 472 | ; (memq (caar (c-guess-basic-syntax)) |
| 473 | ; '(brace-list-intro | 473 | ; '(brace-list-intro |
| 474 | ; brace-list-entry | 474 | ; brace-list-entry |
| 475 | ; brace-entry-open)))))) | 475 | ; brace-entry-open)))))) |
| 476 | 476 | ||
| 477 | ;; With a prefix argument, comma delimiter will be aligned. Since | 477 | ;; With a prefix argument, comma delimiter will be aligned. Since |
| 478 | ;; perl-mode doesn't give us enough syntactic information (and we | 478 | ;; perl-mode doesn't give us enough syntactic information (and we |
| @@ -525,11 +525,11 @@ The possible settings for `align-region-separate' are: | |||
| 525 | (regexp . "\\(\\s-*\\)\\\\$") | 525 | (regexp . "\\(\\s-*\\)\\\\$") |
| 526 | (modes . align-c++-modes) | 526 | (modes . align-c++-modes) |
| 527 | (column . c-backslash-column)) | 527 | (column . c-backslash-column)) |
| 528 | ; (valid | 528 | ; (valid |
| 529 | ; . ,(function | 529 | ; . ,(function |
| 530 | ; (lambda () | 530 | ; (lambda () |
| 531 | ; (memq (caar (c-guess-basic-syntax)) | 531 | ; (memq (caar (c-guess-basic-syntax)) |
| 532 | ; '(cpp-macro cpp-macro-cont)))))) | 532 | ; '(cpp-macro cpp-macro-cont)))))) |
| 533 | 533 | ||
| 534 | (basic-line-continuation | 534 | (basic-line-continuation |
| 535 | (regexp . "\\(\\s-*\\)\\\\$") | 535 | (regexp . "\\(\\s-*\\)\\\\$") |
| @@ -578,7 +578,12 @@ The possible settings for `align-region-separate' are: | |||
| 578 | (justify . t) | 578 | (justify . t) |
| 579 | (run-if . ,(function | 579 | (run-if . ,(function |
| 580 | (lambda () | 580 | (lambda () |
| 581 | (eq '- current-prefix-arg)))))) | 581 | (eq '- current-prefix-arg))))) |
| 582 | |||
| 583 | (css-declaration | ||
| 584 | (regexp . "^\\s-*\\w+:\\(\\s-*\\).*;") | ||
| 585 | (group . (1)) | ||
| 586 | (modes . '(css-mode html-mode)))) | ||
| 582 | "*A list describing all of the available alignment rules. | 587 | "*A list describing all of the available alignment rules. |
| 583 | The format is: | 588 | The format is: |
| 584 | 589 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index 98b10f20ce2..44e4510c5f5 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -392,6 +392,9 @@ Menu of mode operations in the mode line.") | |||
| 392 | "Return the value of symbol VAR if it is bound, else nil." | 392 | "Return the value of symbol VAR if it is bound, else nil." |
| 393 | `(and (boundp (quote ,var)) ,var)) | 393 | `(and (boundp (quote ,var)) ,var)) |
| 394 | 394 | ||
| 395 | (define-key mode-line-mode-menu [tooltip-mode] | ||
| 396 | `(menu-item ,(purecopy "Tooltip") tooltip-mode | ||
| 397 | :button (:toggle . tooltip-mode))) | ||
| 395 | (define-key mode-line-mode-menu [overwrite-mode] | 398 | (define-key mode-line-mode-menu [overwrite-mode] |
| 396 | `(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode | 399 | `(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode |
| 397 | :button (:toggle . overwrite-mode))) | 400 | :button (:toggle . overwrite-mode))) |
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index e3b3b6b5b19..f1a273f7cf3 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el | |||
| @@ -244,6 +244,13 @@ This is not required to be present for user-written mode annotations.") | |||
| 244 | (use-local-map calc-mode-map) | 244 | (use-local-map calc-mode-map) |
| 245 | (setq calc-no-refresh-evaltos nil) | 245 | (setq calc-no-refresh-evaltos nil) |
| 246 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) | 246 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) |
| 247 | (let (str) | ||
| 248 | (save-excursion | ||
| 249 | (calc-select-buffer) | ||
| 250 | (setq str mode-line-buffer-identification)) | ||
| 251 | (unless (equal str mode-line-buffer-identification) | ||
| 252 | (setq mode-line-buffer-identification str) | ||
| 253 | (set-buffer-modified-p (buffer-modified-p)))) | ||
| 247 | (or (eq calc-embedded-quiet t) | 254 | (or (eq calc-embedded-quiet t) |
| 248 | (message "Embedded Calc mode enabled; %s to return to normal" | 255 | (message "Embedded Calc mode enabled; %s to return to normal" |
| 249 | (if calc-embedded-quiet | 256 | (if calc-embedded-quiet |
| @@ -717,6 +724,11 @@ The command \\[yank] can retrieve it from there." | |||
| 717 | (setq no-defaults nil))) | 724 | (setq no-defaults nil))) |
| 718 | (backward-char 6)) | 725 | (backward-char 6)) |
| 719 | (goto-char save-pt) | 726 | (goto-char save-pt) |
| 727 | (unless (assq 'the-language modes) | ||
| 728 | (let ((lang (assoc major-mode calc-language-alist))) | ||
| 729 | (if lang | ||
| 730 | (setq modes (cons (cons 'the-language (cdr lang)) | ||
| 731 | modes))))) | ||
| 720 | (list modes emodes pmodes))) | 732 | (list modes emodes pmodes))) |
| 721 | 733 | ||
| 722 | ;; The variable calc-embed-vars-used is local to calc-embedded-make-info, | 734 | ;; The variable calc-embed-vars-used is local to calc-embedded-make-info, |
| @@ -857,13 +869,13 @@ The command \\[yank] can retrieve it from there." | |||
| 857 | (while (setq x (cdr x)) | 869 | (while (setq x (cdr x)) |
| 858 | (calc-embedded-find-vars (car x)))))) | 870 | (calc-embedded-find-vars (car x)))))) |
| 859 | 871 | ||
| 860 | 872 | (defvar math-ms-args) | |
| 861 | (defun calc-embedded-evaluate-expr (x) | 873 | (defun calc-embedded-evaluate-expr (x) |
| 862 | (let ((calc-embed-vars-used (aref calc-embedded-info 10))) | 874 | (let ((calc-embed-vars-used (aref calc-embedded-info 10))) |
| 863 | (or calc-embed-vars-used (calc-embedded-find-vars x)) | 875 | (or calc-embed-vars-used (calc-embedded-find-vars x)) |
| 864 | (if calc-embed-vars-used | 876 | (if calc-embed-vars-used |
| 865 | (let ((active (assq (aref calc-embedded-info 0) calc-embedded-active)) | 877 | (let ((active (assq (aref calc-embedded-info 0) calc-embedded-active)) |
| 866 | (args nil)) | 878 | (math-ms-args nil)) |
| 867 | (save-excursion | 879 | (save-excursion |
| 868 | (calc-embedded-original-buffer t) | 880 | (calc-embedded-original-buffer t) |
| 869 | (or active | 881 | (or active |
| @@ -887,7 +899,7 @@ The command \\[yank] can retrieve it from there." | |||
| 887 | (list 'calcFunc-assign | 899 | (list 'calcFunc-assign |
| 888 | (nth 1 x) | 900 | (nth 1 x) |
| 889 | (calc-embedded-subst (nth 2 x))) | 901 | (calc-embedded-subst (nth 2 x))) |
| 890 | (calc-normalize (math-evaluate-expr-rec (math-multi-subst x nil nil)))))) | 902 | (calc-normalize (math-evaluate-expr-rec (math-multi-subst-rec x)))))) |
| 891 | 903 | ||
| 892 | (defun calc-embedded-eval-get-var (var base) | 904 | (defun calc-embedded-eval-get-var (var base) |
| 893 | (let ((entry base) | 905 | (let ((entry base) |
| @@ -914,7 +926,7 @@ The command \\[yank] can retrieve it from there." | |||
| 914 | (setq val (nth 2 val))) | 926 | (setq val (nth 2 val))) |
| 915 | (if (eq (car-safe val) 'calcFunc-assign) | 927 | (if (eq (car-safe val) 'calcFunc-assign) |
| 916 | (setq val (nth 2 val))) | 928 | (setq val (nth 2 val))) |
| 917 | (setq args (cons (cons var val) args))) | 929 | (setq math-ms-args (cons (cons var val) math-ms-args))) |
| 918 | (calc-embedded-activate) | 930 | (calc-embedded-activate) |
| 919 | (calc-embedded-eval-get-var var base)))))) | 931 | (calc-embedded-eval-get-var var base)))))) |
| 920 | 932 | ||
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 99857ce05a0..24336ad9333 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -717,6 +717,20 @@ If nil, selections displayed but ignored.") | |||
| 717 | (defvar var-gamma '(special-const (math-gamma-const))) | 717 | (defvar var-gamma '(special-const (math-gamma-const))) |
| 718 | (defvar var-Modes '(special-const (math-get-modes-vec))) | 718 | (defvar var-Modes '(special-const (math-get-modes-vec))) |
| 719 | 719 | ||
| 720 | (defvar calc-language-alist | ||
| 721 | '((latex-mode . latex) | ||
| 722 | (tex-mode . tex) | ||
| 723 | (plain-tex-mode . tex) | ||
| 724 | (context-mode . tex) | ||
| 725 | (nroff-mode . eqn) | ||
| 726 | (pascal-mode . pascal) | ||
| 727 | (c-mode . c) | ||
| 728 | (c++-mode . c) | ||
| 729 | (fortran-mode . fortran) | ||
| 730 | (f90-mode . fortran)) | ||
| 731 | "Alist of major modes with appropriate Calc languages.") | ||
| 732 | |||
| 733 | |||
| 720 | (mapcar (lambda (v) (or (boundp v) (set v nil))) | 734 | (mapcar (lambda (v) (or (boundp v) (set v nil))) |
| 721 | calc-local-var-list) | 735 | calc-local-var-list) |
| 722 | 736 | ||
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 66ee1875a23..8c78d9540bf 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -145,24 +145,6 @@ | |||
| 145 | "Name of the buffer used for the calendar.") | 145 | "Name of the buffer used for the calendar.") |
| 146 | 146 | ||
| 147 | ;;;###autoload | 147 | ;;;###autoload |
| 148 | (defcustom calendar-week-start-day 0 | ||
| 149 | "*The day of the week on which a week in the calendar begins. | ||
| 150 | 0 means Sunday (default), 1 means Monday, and so on. | ||
| 151 | |||
| 152 | If you change this variable directly (without using customize) | ||
| 153 | after starting `calendar', you should call `redraw-calendar' to | ||
| 154 | update the calendar display to reflect the change, otherwise | ||
| 155 | movement commands will not work correctly." | ||
| 156 | :type 'integer | ||
| 157 | :set (lambda (sym val) | ||
| 158 | (set sym val) | ||
| 159 | (let ((buffer (get-buffer calendar-buffer))) | ||
| 160 | (when (buffer-live-p buffer) | ||
| 161 | (with-current-buffer buffer | ||
| 162 | (redraw-calendar))))) | ||
| 163 | :group 'calendar) | ||
| 164 | |||
| 165 | ;;;###autoload | ||
| 166 | (defcustom calendar-offset 0 | 148 | (defcustom calendar-offset 0 |
| 167 | "*The offset of the principal month from the center of the calendar window. | 149 | "*The offset of the principal month from the center of the calendar window. |
| 168 | 0 means the principal month is in the center (default), -1 means on the left, | 150 | 0 means the principal month is in the center (default), -1 means on the left, |
| @@ -2168,15 +2150,34 @@ the inserted text. Value is always t." | |||
| 2168 | (forward-line 1)))) | 2150 | (forward-line 1)))) |
| 2169 | t) | 2151 | t) |
| 2170 | 2152 | ||
| 2153 | (defvar calendar-redrawing nil | ||
| 2154 | "Internal calendar variable, non-nil if inside redraw-calendar.") | ||
| 2155 | |||
| 2171 | (defun redraw-calendar () | 2156 | (defun redraw-calendar () |
| 2172 | "Redraw the calendar display, if `calendar-buffer' is live." | 2157 | "Redraw the calendar display, if `calendar-buffer' is live." |
| 2173 | (interactive) | 2158 | (interactive) |
| 2174 | (if (get-buffer calendar-buffer) | 2159 | (if (get-buffer calendar-buffer) |
| 2175 | (with-current-buffer calendar-buffer | 2160 | (with-current-buffer calendar-buffer |
| 2176 | (let ((cursor-date (calendar-cursor-to-nearest-date))) | 2161 | (let ((cursor-date (calendar-cursor-to-nearest-date)) |
| 2162 | (calendar-redrawing t)) | ||
| 2177 | (generate-calendar-window displayed-month displayed-year) | 2163 | (generate-calendar-window displayed-month displayed-year) |
| 2178 | (calendar-cursor-to-visible-date cursor-date))))) | 2164 | (calendar-cursor-to-visible-date cursor-date))))) |
| 2179 | 2165 | ||
| 2166 | ;;;###autoload | ||
| 2167 | (defcustom calendar-week-start-day 0 | ||
| 2168 | "*The day of the week on which a week in the calendar begins. | ||
| 2169 | 0 means Sunday (default), 1 means Monday, and so on. | ||
| 2170 | |||
| 2171 | If you change this variable directly (without using customize) | ||
| 2172 | after starting `calendar', you should call `redraw-calendar' to | ||
| 2173 | update the calendar display to reflect the change, otherwise | ||
| 2174 | movement commands will not work correctly." | ||
| 2175 | :type 'integer | ||
| 2176 | :set (lambda (sym val) | ||
| 2177 | (set sym val) | ||
| 2178 | (redraw-calendar)) | ||
| 2179 | :group 'calendar) | ||
| 2180 | |||
| 2180 | (defcustom calendar-debug-sexp nil | 2181 | (defcustom calendar-debug-sexp nil |
| 2181 | "*Turn debugging on when evaluating a sexp in the diary or holiday list." | 2182 | "*Turn debugging on when evaluating a sexp in the diary or holiday list." |
| 2182 | :type 'boolean | 2183 | :type 'boolean |
| @@ -2920,40 +2921,40 @@ MARK defaults to `diary-entry-marker'." | |||
| 2920 | (save-excursion | 2921 | (save-excursion |
| 2921 | (set-buffer calendar-buffer) | 2922 | (set-buffer calendar-buffer) |
| 2922 | (calendar-cursor-to-visible-date date) | 2923 | (calendar-cursor-to-visible-date date) |
| 2923 | (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; single-char | 2924 | (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; single-char |
| 2924 | (and (listp mark) (> (length mark) 0) mark) ; attr list | 2925 | (and (listp mark) (> (length mark) 0) mark) ; attr list |
| 2925 | (and (facep mark) mark) ; face-name | 2926 | (and (facep mark) mark) ; face-name |
| 2926 | diary-entry-marker))) | 2927 | diary-entry-marker))) |
| 2927 | (if (facep mark) | 2928 | (if (facep mark) |
| 2928 | (progn ; face or an attr-list that contained a face | 2929 | (progn ; face or an attr-list that contained a face |
| 2929 | (overlay-put | 2930 | (overlay-put |
| 2930 | (make-overlay (1- (point)) (1+ (point))) 'face mark)) | 2931 | (make-overlay (1- (point)) (1+ (point))) 'face mark)) |
| 2931 | (if (and (stringp mark) | 2932 | (if (and (stringp mark) |
| 2932 | (= (length mark) 1)) ; single-char | 2933 | (= (length mark) 1)) ; single-char |
| 2933 | (let ((buffer-read-only nil)) | 2934 | (let ((buffer-read-only nil)) |
| 2934 | (forward-char 1) | 2935 | (forward-char 1) |
| 2935 | (delete-char 1) | 2936 | (delete-char 1) |
| 2936 | (insert mark) | 2937 | (insert mark) |
| 2937 | (forward-char -2)) | 2938 | (forward-char -2)) |
| 2938 | (let ; attr list | 2939 | (let ; attr list |
| 2939 | ((temp-face | 2940 | ((temp-face |
| 2940 | (make-symbol (apply 'concat "temp-face-" | 2941 | (make-symbol (apply 'concat "temp-face-" |
| 2941 | (mapcar '(lambda (sym) | 2942 | (mapcar '(lambda (sym) |
| 2942 | (cond ((symbolp sym) (symbol-name sym)) | 2943 | (cond ((symbolp sym) (symbol-name sym)) |
| 2943 | ((numberp sym) (int-to-string sym)) | 2944 | ((numberp sym) (int-to-string sym)) |
| 2944 | (t sym))) mark)))) | 2945 | (t sym))) mark)))) |
| 2945 | (faceinfo mark)) | 2946 | (faceinfo mark)) |
| 2946 | (make-face temp-face) | 2947 | (make-face temp-face) |
| 2947 | ;; Remove :face info from the mark, copy the face info into temp-face | 2948 | ;; Remove :face info from the mark, copy the face info into temp-face |
| 2948 | (while (setq faceinfo (memq :face faceinfo)) | 2949 | (while (setq faceinfo (memq :face faceinfo)) |
| 2949 | (copy-face (read (nth 1 faceinfo)) temp-face) | 2950 | (copy-face (read (nth 1 faceinfo)) temp-face) |
| 2950 | (setcar faceinfo nil) | 2951 | (setcar faceinfo nil) |
| 2951 | (setcar (cdr faceinfo) nil)) | 2952 | (setcar (cdr faceinfo) nil)) |
| 2952 | (setq mark (delq nil mark)) | 2953 | (setq mark (delq nil mark)) |
| 2953 | ;; Apply the font aspects | 2954 | ;; Apply the font aspects |
| 2954 | (apply 'set-face-attribute temp-face nil mark) | 2955 | (apply 'set-face-attribute temp-face nil mark) |
| 2955 | (overlay-put | 2956 | (overlay-put |
| 2956 | (make-overlay (1- (point)) (1+ (point))) 'face temp-face)))))))) | 2957 | (make-overlay (1- (point)) (1+ (point))) 'face temp-face)))))))) |
| 2957 | 2958 | ||
| 2958 | (defun calendar-star-date () | 2959 | (defun calendar-star-date () |
| 2959 | "Replace the date under the cursor in the calendar window with asterisks. | 2960 | "Replace the date under the cursor in the calendar window with asterisks. |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 97dc1dd0a71..124b29c3fe7 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -842,7 +842,14 @@ After the entries are marked, the hooks `nongregorian-diary-marking-hook' and | |||
| 842 | `mark-diary-entries-hook' are run." | 842 | `mark-diary-entries-hook' are run." |
| 843 | (interactive) | 843 | (interactive) |
| 844 | ;; To remove any deleted diary entries. | 844 | ;; To remove any deleted diary entries. |
| 845 | (when mark-diary-entries-in-calendar | 845 | (when (and mark-diary-entries-in-calendar |
| 846 | ;; Avoid redrawing when called recursively, eg through | ||
| 847 | ;; mark-diary-entries-hook for #include's, else only get | ||
| 848 | ;; the last set of diary marks. | ||
| 849 | (not marking-diary-entries) | ||
| 850 | ;; If called from redraw-calendar, the calendar has been | ||
| 851 | ;; erased, so no need to unmark the diary entries. | ||
| 852 | (not calendar-redrawing)) | ||
| 846 | (setq mark-diary-entries-in-calendar nil) | 853 | (setq mark-diary-entries-in-calendar nil) |
| 847 | (redraw-calendar)) | 854 | (redraw-calendar)) |
| 848 | (let ((marking-diary-entries t) | 855 | (let ((marking-diary-entries t) |
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 2cd0896c835..60fc862676d 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; byte-run.el --- byte-compiler support for inlining | 1 | ;;; byte-run.el --- byte-compiler support for inlining |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jamie Zawinski <jwz@lucid.com> | 5 | ;; Author: Jamie Zawinski <jwz@lucid.com> |
| 6 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> | 6 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> |
| @@ -31,11 +31,35 @@ | |||
| 31 | 31 | ||
| 32 | ;;; Code: | 32 | ;;; Code: |
| 33 | 33 | ||
| 34 | ;; We define macro-declaration-function here because it is needed to | ||
| 35 | ;; handle declarations in macro definitions and this is the first file | ||
| 36 | ;; loaded by loadup.el that uses declarations in macros. | ||
| 37 | |||
| 38 | (defun macro-declaration-function (macro decl) | ||
| 39 | "Process a declaration found in a macro definition. | ||
| 40 | This is set as the value of the variable `macro-declaration-function'. | ||
| 41 | MACRO is the name of the macro being defined. | ||
| 42 | DECL is a list `(declare ...)' containing the declarations. | ||
| 43 | The return value of this function is not used." | ||
| 44 | ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons. | ||
| 45 | (let (d) | ||
| 46 | ;; Ignore the first element of `decl' (it's always `declare'). | ||
| 47 | (while (setq decl (cdr decl)) | ||
| 48 | (setq d (car decl)) | ||
| 49 | (cond ((and (consp d) (eq (car d) 'indent)) | ||
| 50 | (put macro 'lisp-indent-function (car (cdr d)))) | ||
| 51 | ((and (consp d) (eq (car d) 'debug)) | ||
| 52 | (put macro 'edebug-form-spec (car (cdr d)))) | ||
| 53 | (t | ||
| 54 | (message "Unknown declaration %s" d)))))) | ||
| 55 | |||
| 56 | (setq macro-declaration-function 'macro-declaration-function) | ||
| 57 | |||
| 58 | |||
| 34 | ;; Redefined in byte-optimize.el. | 59 | ;; Redefined in byte-optimize.el. |
| 35 | ;; This is not documented--it's not clear that we should promote it. | 60 | ;; This is not documented--it's not clear that we should promote it. |
| 36 | (fset 'inline 'progn) | 61 | (fset 'inline 'progn) |
| 37 | (put 'inline 'lisp-indent-hook 0) | 62 | (put 'inline 'lisp-indent-function 0) |
| 38 | |||
| 39 | 63 | ||
| 40 | ;;; Interface to inline functions. | 64 | ;;; Interface to inline functions. |
| 41 | 65 | ||
| @@ -105,11 +129,10 @@ was first made obsolete, for example a date or a release number." | |||
| 105 | (put variable 'byte-obsolete-variable (cons new when)) | 129 | (put variable 'byte-obsolete-variable (cons new when)) |
| 106 | variable) | 130 | variable) |
| 107 | 131 | ||
| 108 | (put 'dont-compile 'lisp-indent-hook 0) | ||
| 109 | (defmacro dont-compile (&rest body) | 132 | (defmacro dont-compile (&rest body) |
| 110 | "Like `progn', but the body always runs interpreted (not compiled). | 133 | "Like `progn', but the body always runs interpreted (not compiled). |
| 111 | If you think you need this, you're probably making a mistake somewhere." | 134 | If you think you need this, you're probably making a mistake somewhere." |
| 112 | (declare (debug t)) | 135 | (declare (debug t) (indent 0)) |
| 113 | (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body))))) | 136 | (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body))))) |
| 114 | 137 | ||
| 115 | 138 | ||
| @@ -118,22 +141,21 @@ If you think you need this, you're probably making a mistake somewhere." | |||
| 118 | ;;; definition in the file overrides the magic definitions on the | 141 | ;;; definition in the file overrides the magic definitions on the |
| 119 | ;;; byte-compile-macro-environment. | 142 | ;;; byte-compile-macro-environment. |
| 120 | 143 | ||
| 121 | (put 'eval-when-compile 'lisp-indent-hook 0) | ||
| 122 | (defmacro eval-when-compile (&rest body) | 144 | (defmacro eval-when-compile (&rest body) |
| 123 | "Like `progn', but evaluates the body at compile time. | 145 | "Like `progn', but evaluates the body at compile time. |
| 124 | The result of the body appears to the compiler as a quoted constant." | 146 | The result of the body appears to the compiler as a quoted constant." |
| 125 | (declare (debug t)) | 147 | (declare (debug t) (indent 0)) |
| 126 | ;; Not necessary because we have it in b-c-initial-macro-environment | 148 | ;; Not necessary because we have it in b-c-initial-macro-environment |
| 127 | ;; (list 'quote (eval (cons 'progn body))) | 149 | ;; (list 'quote (eval (cons 'progn body))) |
| 128 | (cons 'progn body)) | 150 | (cons 'progn body)) |
| 129 | 151 | ||
| 130 | (put 'eval-and-compile 'lisp-indent-hook 0) | ||
| 131 | (defmacro eval-and-compile (&rest body) | 152 | (defmacro eval-and-compile (&rest body) |
| 132 | "Like `progn', but evaluates the body at compile time and at load time." | 153 | "Like `progn', but evaluates the body at compile time and at load time." |
| 133 | (declare (debug t)) | 154 | (declare (debug t) (indent 0)) |
| 134 | ;; Remember, it's magic. | 155 | ;; Remember, it's magic. |
| 135 | (cons 'progn body)) | 156 | (cons 'progn body)) |
| 136 | 157 | ||
| 158 | (put 'with-no-warnings 'lisp-indent-function 0) | ||
| 137 | (defun with-no-warnings (&rest body) | 159 | (defun with-no-warnings (&rest body) |
| 138 | "Like `progn', but prevents compiler warnings in the body." | 160 | "Like `progn', but prevents compiler warnings in the body." |
| 139 | ;; The implementation for the interpreter is basically trivial. | 161 | ;; The implementation for the interpreter is basically trivial. |
| @@ -147,7 +169,7 @@ The result of the body appears to the compiler as a quoted constant." | |||
| 147 | ;;; There is hardly any reason to change these parameters, anyway. | 169 | ;;; There is hardly any reason to change these parameters, anyway. |
| 148 | ;;; --rms. | 170 | ;;; --rms. |
| 149 | 171 | ||
| 150 | ;; (put 'byte-compiler-options 'lisp-indent-hook 0) | 172 | ;; (put 'byte-compiler-options 'lisp-indent-function 0) |
| 151 | ;; (defmacro byte-compiler-options (&rest args) | 173 | ;; (defmacro byte-compiler-options (&rest args) |
| 152 | ;; "Set some compilation-parameters for this file. This will affect only the | 174 | ;; "Set some compilation-parameters for this file. This will affect only the |
| 153 | ;; file in which it appears; this does nothing when evaluated, and when loaded | 175 | ;; file in which it appears; this does nothing when evaluated, and when loaded |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 25a1ba080d1..08d5515524d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; bytecomp.el --- compilation of Lisp code into byte code | 1 | ;;; bytecomp.el --- compilation of Lisp code into byte code |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, | 3 | ;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, |
| 4 | ;; 2003, 2004 Free Software Foundation, Inc. | 4 | ;; 2003, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Jamie Zawinski <jwz@lucid.com> | 6 | ;; Author: Jamie Zawinski <jwz@lucid.com> |
| 7 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> | 7 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> |
| @@ -1039,7 +1039,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." | |||
| 1039 | (byte-compile-set-symbol-position (car form)) | 1039 | (byte-compile-set-symbol-position (car form)) |
| 1040 | (if (memq 'obsolete byte-compile-warnings) | 1040 | (if (memq 'obsolete byte-compile-warnings) |
| 1041 | (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form) | 1041 | (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form) |
| 1042 | (if when (concat " since " when) "") | 1042 | (if when (concat " (as of Emacs " when ")") "") |
| 1043 | (if (stringp (car new)) | 1043 | (if (stringp (car new)) |
| 1044 | (car new) | 1044 | (car new) |
| 1045 | (format "use `%s' instead." (car new))))) | 1045 | (format "use `%s' instead." (car new))))) |
| @@ -2779,7 +2779,7 @@ That command is designed for interactive use only" fn)) | |||
| 2779 | (let* ((ob (get var 'byte-obsolete-variable)) | 2779 | (let* ((ob (get var 'byte-obsolete-variable)) |
| 2780 | (when (cdr ob))) | 2780 | (when (cdr ob))) |
| 2781 | (byte-compile-warn "`%s' is an obsolete variable%s; %s" var | 2781 | (byte-compile-warn "`%s' is an obsolete variable%s; %s" var |
| 2782 | (if when (concat " since " when) "") | 2782 | (if when (concat " (as of Emacs " when ")") "") |
| 2783 | (if (stringp (car ob)) | 2783 | (if (stringp (car ob)) |
| 2784 | (car ob) | 2784 | (car ob) |
| 2785 | (format "use `%s' instead." (car ob)))))) | 2785 | (format "use `%s' instead." (car ob)))))) |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 67836215da3..e97e9012fc1 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -94,15 +94,8 @@ This is to optimize `debugger-make-xrefs'.") | |||
| 94 | 94 | ||
| 95 | (defvar debugger-jumping-flag nil | 95 | (defvar debugger-jumping-flag nil |
| 96 | "Non-nil means that debug-on-entry is disabled. | 96 | "Non-nil means that debug-on-entry is disabled. |
| 97 | This variable is used by `debugger-jump' and `debugger-reenable'.") | 97 | This variable is used by `debugger-jump', `debugger-step-through', |
| 98 | 98 | and `debugger-reenable' to temporarily disable debug-on-entry.") | |
| 99 | ;; When you change this, you may also need to change the number of | ||
| 100 | ;; frames that the debugger skips. | ||
| 101 | (defconst debug-entry-code | ||
| 102 | '(if (or inhibit-debug-on-entry debugger-jumping-flag) | ||
| 103 | nil | ||
| 104 | (debug 'debug)) | ||
| 105 | "Code added to a function to cause it to call the debugger upon entry.") | ||
| 106 | 99 | ||
| 107 | ;;;###autoload | 100 | ;;;###autoload |
| 108 | (setq debugger 'debug) | 101 | (setq debugger 'debug) |
| @@ -177,7 +170,14 @@ first will be printed into the backtrace buffer." | |||
| 177 | (save-excursion | 170 | (save-excursion |
| 178 | (save-window-excursion | 171 | (save-window-excursion |
| 179 | (with-no-warnings | 172 | (with-no-warnings |
| 180 | (setq unread-command-char -1)) | 173 | (setq unread-command-char -1)) |
| 174 | (when (eq (car debugger-args) 'debug) | ||
| 175 | ;; Skip the frames for backtrace-debug, byte-code, | ||
| 176 | ;; and implement-debug-on-entry. | ||
| 177 | (backtrace-debug 4 t) | ||
| 178 | ;; Place an extra debug-on-exit for macro's. | ||
| 179 | (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) | ||
| 180 | (backtrace-debug 5 t))) | ||
| 181 | (pop-to-buffer debugger-buffer) | 181 | (pop-to-buffer debugger-buffer) |
| 182 | (debugger-mode) | 182 | (debugger-mode) |
| 183 | (debugger-setup-buffer debugger-args) | 183 | (debugger-setup-buffer debugger-args) |
| @@ -197,10 +197,6 @@ first will be printed into the backtrace buffer." | |||
| 197 | (goto-char (point-min)) | 197 | (goto-char (point-min)) |
| 198 | (message "%s" (buffer-string)) | 198 | (message "%s" (buffer-string)) |
| 199 | (kill-emacs)) | 199 | (kill-emacs)) |
| 200 | (if (eq (car debugger-args) 'debug) | ||
| 201 | ;; Skip the frames for backtrace-debug, byte-code, | ||
| 202 | ;; and debug-entry-code. | ||
| 203 | (backtrace-debug 4 t)) | ||
| 204 | (message "") | 200 | (message "") |
| 205 | (let ((standard-output nil) | 201 | (let ((standard-output nil) |
| 206 | (buffer-read-only t)) | 202 | (buffer-read-only t)) |
| @@ -232,7 +228,7 @@ first will be printed into the backtrace buffer." | |||
| 232 | (setq last-command debugger-outer-last-command) | 228 | (setq last-command debugger-outer-last-command) |
| 233 | (setq this-command debugger-outer-this-command) | 229 | (setq this-command debugger-outer-this-command) |
| 234 | (with-no-warnings | 230 | (with-no-warnings |
| 235 | (setq unread-command-char debugger-outer-unread-command-char)) | 231 | (setq unread-command-char debugger-outer-unread-command-char)) |
| 236 | (setq unread-command-events debugger-outer-unread-command-events) | 232 | (setq unread-command-events debugger-outer-unread-command-events) |
| 237 | (setq unread-post-input-method-events | 233 | (setq unread-post-input-method-events |
| 238 | debugger-outer-unread-post-input-method-events) | 234 | debugger-outer-unread-post-input-method-events) |
| @@ -263,19 +259,14 @@ That buffer should be current already." | |||
| 263 | (progn | 259 | (progn |
| 264 | (search-forward "\n debug(") | 260 | (search-forward "\n debug(") |
| 265 | (forward-line (if (eq (car debugger-args) 'debug) | 261 | (forward-line (if (eq (car debugger-args) 'debug) |
| 266 | 2 ; Remove debug-entry-code frame. | 262 | 2 ; Remove implement-debug-on-entry frame. |
| 267 | 1)) | 263 | 1)) |
| 268 | (point))) | 264 | (point))) |
| 269 | (insert "Debugger entered") | 265 | (insert "Debugger entered") |
| 270 | ;; lambda is for debug-on-call when a function call is next. | 266 | ;; lambda is for debug-on-call when a function call is next. |
| 271 | ;; debug is for debug-on-entry function called. | 267 | ;; debug is for debug-on-entry function called. |
| 272 | (cond ((memq (car debugger-args) '(lambda debug)) | 268 | (cond ((memq (car debugger-args) '(lambda debug)) |
| 273 | (insert "--entering a function:\n") | 269 | (insert "--entering a function:\n")) |
| 274 | (if (eq (car debugger-args) 'debug) | ||
| 275 | (progn | ||
| 276 | (delete-char 1) | ||
| 277 | (insert ?*) | ||
| 278 | (beginning-of-line)))) | ||
| 279 | ;; Exiting a function. | 270 | ;; Exiting a function. |
| 280 | ((eq (car debugger-args) 'exit) | 271 | ((eq (car debugger-args) 'exit) |
| 281 | (insert "--returning value: ") | 272 | (insert "--returning value: ") |
| @@ -311,7 +302,7 @@ That buffer should be current already." | |||
| 311 | (debugger-make-xrefs)) | 302 | (debugger-make-xrefs)) |
| 312 | 303 | ||
| 313 | (defun debugger-make-xrefs (&optional buffer) | 304 | (defun debugger-make-xrefs (&optional buffer) |
| 314 | "Attach cross-references to symbol names in the `*Backtrace*' buffer." | 305 | "Attach cross-references to function names in the `*Backtrace*' buffer." |
| 315 | (interactive "b") | 306 | (interactive "b") |
| 316 | (save-excursion | 307 | (save-excursion |
| 317 | (set-buffer (or buffer (current-buffer))) | 308 | (set-buffer (or buffer (current-buffer))) |
| @@ -362,6 +353,7 @@ That buffer should be current already." | |||
| 362 | ;; Scan the new part of the backtrace, inserting xrefs. | 353 | ;; Scan the new part of the backtrace, inserting xrefs. |
| 363 | (goto-char (point-min)) | 354 | (goto-char (point-min)) |
| 364 | (while (progn | 355 | (while (progn |
| 356 | (goto-char (+ (point) 2)) | ||
| 365 | (skip-syntax-forward "^w_") | 357 | (skip-syntax-forward "^w_") |
| 366 | (not (eobp))) | 358 | (not (eobp))) |
| 367 | (let* ((beg (point)) | 359 | (let* ((beg (point)) |
| @@ -373,8 +365,8 @@ That buffer should be current already." | |||
| 373 | (goto-char beg) | 365 | (goto-char beg) |
| 374 | ;; help-xref-button needs to operate on something matched | 366 | ;; help-xref-button needs to operate on something matched |
| 375 | ;; by a regexp, so set that up for it. | 367 | ;; by a regexp, so set that up for it. |
| 376 | (re-search-forward "\\(\\(\\sw\\|\\s_\\)+\\)") | 368 | (re-search-forward "\\(\\sw\\|\\s_\\)+") |
| 377 | (help-xref-button 1 'help-function-def sym file))) | 369 | (help-xref-button 0 'help-function-def sym file))) |
| 378 | (forward-line 1)) | 370 | (forward-line 1)) |
| 379 | (widen)) | 371 | (widen)) |
| 380 | (setq debugger-previous-backtrace (buffer-string)))) | 372 | (setq debugger-previous-backtrace (buffer-string)))) |
| @@ -384,6 +376,8 @@ That buffer should be current already." | |||
| 384 | Enter another debugger on next entry to eval, apply or funcall." | 376 | Enter another debugger on next entry to eval, apply or funcall." |
| 385 | (interactive) | 377 | (interactive) |
| 386 | (setq debugger-step-after-exit t) | 378 | (setq debugger-step-after-exit t) |
| 379 | (setq debugger-jumping-flag t) | ||
| 380 | (add-hook 'post-command-hook 'debugger-reenable) | ||
| 387 | (message "Proceeding, will debug on next eval or call.") | 381 | (message "Proceeding, will debug on next eval or call.") |
| 388 | (exit-recursive-edit)) | 382 | (exit-recursive-edit)) |
| 389 | 383 | ||
| @@ -429,8 +423,8 @@ removes itself from that hook." | |||
| 429 | (count 0)) | 423 | (count 0)) |
| 430 | (while (not (eq (cadr (backtrace-frame count)) 'debug)) | 424 | (while (not (eq (cadr (backtrace-frame count)) 'debug)) |
| 431 | (setq count (1+ count))) | 425 | (setq count (1+ count))) |
| 432 | ;; Skip debug-entry-code frame. | 426 | ;; Skip implement-debug-on-entry frame. |
| 433 | (when (member '(debug (quote debug)) (cdr (backtrace-frame (1+ count)))) | 427 | (when (eq 'implement-debug-on-entry (cadr (backtrace-frame (1+ count)))) |
| 434 | (setq count (1+ count))) | 428 | (setq count (1+ count))) |
| 435 | (goto-char (point-min)) | 429 | (goto-char (point-min)) |
| 436 | (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):") | 430 | (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):") |
| @@ -513,12 +507,12 @@ Applies to the frame whose line point is on in the backtrace." | |||
| 513 | (unwind-protect | 507 | (unwind-protect |
| 514 | (progn | 508 | (progn |
| 515 | (with-no-warnings | 509 | (with-no-warnings |
| 516 | (setq unread-command-char debugger-outer-unread-command-char)) | 510 | (setq unread-command-char debugger-outer-unread-command-char)) |
| 517 | (prog1 (progn ,@body) | 511 | (prog1 (progn ,@body) |
| 518 | (with-no-warnings | 512 | (with-no-warnings |
| 519 | (setq debugger-outer-unread-command-char unread-command-char)))) | 513 | (setq debugger-outer-unread-command-char unread-command-char)))) |
| 520 | (with-no-warnings | 514 | (with-no-warnings |
| 521 | (setq unread-command-char save-ucc)))) | 515 | (setq unread-command-char save-ucc)))) |
| 522 | (setq debugger-outer-match-data (match-data)) | 516 | (setq debugger-outer-match-data (match-data)) |
| 523 | (setq debugger-outer-load-read-function load-read-function) | 517 | (setq debugger-outer-load-read-function load-read-function) |
| 524 | (setq debugger-outer-overriding-terminal-local-map | 518 | (setq debugger-outer-overriding-terminal-local-map |
| @@ -620,6 +614,16 @@ Complete list of commands: | |||
| 620 | (use-local-map debugger-mode-map) | 614 | (use-local-map debugger-mode-map) |
| 621 | (run-mode-hooks 'debugger-mode-hook)) | 615 | (run-mode-hooks 'debugger-mode-hook)) |
| 622 | 616 | ||
| 617 | ;; When you change this, you may also need to change the number of | ||
| 618 | ;; frames that the debugger skips. | ||
| 619 | (defun implement-debug-on-entry () | ||
| 620 | "Conditionally call the debugger. | ||
| 621 | A call to this function is inserted by `debug-on-entry' to cause | ||
| 622 | functions to break on entry." | ||
| 623 | (if (or inhibit-debug-on-entry debugger-jumping-flag) | ||
| 624 | nil | ||
| 625 | (funcall debugger 'debug))) | ||
| 626 | |||
| 623 | ;;;###autoload | 627 | ;;;###autoload |
| 624 | (defun debug-on-entry (function) | 628 | (defun debug-on-entry (function) |
| 625 | "Request FUNCTION to invoke debugger each time it is called. | 629 | "Request FUNCTION to invoke debugger each time it is called. |
| @@ -644,7 +648,7 @@ Redefining FUNCTION also cancels it." | |||
| 644 | (debug-convert-byte-code function)) | 648 | (debug-convert-byte-code function)) |
| 645 | (or (consp (symbol-function function)) | 649 | (or (consp (symbol-function function)) |
| 646 | (error "Definition of %s is not a list" function)) | 650 | (error "Definition of %s is not a list" function)) |
| 647 | (fset function (debug-on-entry-1 function (symbol-function function) t)) | 651 | (fset function (debug-on-entry-1 function t)) |
| 648 | (or (memq function debug-function-list) | 652 | (or (memq function debug-function-list) |
| 649 | (push function debug-function-list)) | 653 | (push function debug-function-list)) |
| 650 | function) | 654 | function) |
| @@ -661,7 +665,7 @@ If argument is nil or an empty string, cancel for all functions." | |||
| 661 | (if name (intern name))))) | 665 | (if name (intern name))))) |
| 662 | (if (and function (not (string= function ""))) | 666 | (if (and function (not (string= function ""))) |
| 663 | (progn | 667 | (progn |
| 664 | (let ((f (debug-on-entry-1 function (symbol-function function) nil))) | 668 | (let ((f (debug-on-entry-1 function nil))) |
| 665 | (condition-case nil | 669 | (condition-case nil |
| 666 | (if (and (equal (nth 1 f) '(&rest debug-on-entry-args)) | 670 | (if (and (equal (nth 1 f) '(&rest debug-on-entry-args)) |
| 667 | (eq (car (nth 3 f)) 'apply)) | 671 | (eq (car (nth 3 f)) 'apply)) |
| @@ -692,8 +696,9 @@ If argument is nil or an empty string, cancel for all functions." | |||
| 692 | (setq body (cons (documentation function) body))) | 696 | (setq body (cons (documentation function) body))) |
| 693 | (fset function (cons 'lambda (cons (car contents) body))))))) | 697 | (fset function (cons 'lambda (cons (car contents) body))))))) |
| 694 | 698 | ||
| 695 | (defun debug-on-entry-1 (function defn flag) | 699 | (defun debug-on-entry-1 (function flag) |
| 696 | (let ((tail defn)) | 700 | (let* ((defn (symbol-function function)) |
| 701 | (tail defn)) | ||
| 697 | (if (subrp tail) | 702 | (if (subrp tail) |
| 698 | (error "%s is a built-in function" function) | 703 | (error "%s is a built-in function" function) |
| 699 | (if (eq (car tail) 'macro) (setq tail (cdr tail))) | 704 | (if (eq (car tail) 'macro) (setq tail (cdr tail))) |
| @@ -705,10 +710,10 @@ If argument is nil or an empty string, cancel for all functions." | |||
| 705 | ;; Skip the interactive form. | 710 | ;; Skip the interactive form. |
| 706 | (when (eq 'interactive (car-safe (cadr tail))) | 711 | (when (eq 'interactive (car-safe (cadr tail))) |
| 707 | (setq tail (cdr tail))) | 712 | (setq tail (cdr tail))) |
| 708 | (unless (eq flag (equal (cadr tail) debug-entry-code)) | 713 | (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry))) |
| 709 | ;; Add/remove debug statement as needed. | 714 | ;; Add/remove debug statement as needed. |
| 710 | (if flag | 715 | (if flag |
| 711 | (setcdr tail (cons debug-entry-code (cdr tail))) | 716 | (setcdr tail (cons '(implement-debug-on-entry) (cdr tail))) |
| 712 | (setcdr tail (cddr tail)))) | 717 | (setcdr tail (cddr tail)))) |
| 713 | defn))) | 718 | defn))) |
| 714 | 719 | ||
diff --git a/lisp/facemenu.el b/lisp/facemenu.el index a996d4c15e7..cd3998520a1 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el | |||
| @@ -513,17 +513,17 @@ argument BUFFER-NAME is nil, it defaults to *Colors*." | |||
| 513 | 'face (cons 'background-color (car color))) | 513 | 'face (cons 'background-color (car color))) |
| 514 | (put-text-property | 514 | (put-text-property |
| 515 | (prog1 (point) | 515 | (prog1 (point) |
| 516 | (insert " " (if (cdr color) | 516 | (insert " " (if (cdr color) |
| 517 | (mapconcat 'identity (cdr color) ", ") | 517 | (mapconcat 'identity (cdr color) ", ") |
| 518 | (car color))) | 518 | (car color)))) |
| 519 | (indent-to (max (- (window-width) 8) 44)) | ||
| 520 | (insert (apply 'format " #%02x%02x%02x" | ||
| 521 | (mapcar (lambda (c) (lsh c -8)) | ||
| 522 | (color-values (car color))))) | ||
| 523 | |||
| 524 | (insert "\n")) | ||
| 525 | (point) | 519 | (point) |
| 526 | 'face (cons 'foreground-color (car color)))) | 520 | 'face (cons 'foreground-color (car color))) |
| 521 | (indent-to (max (- (window-width) 8) 44)) | ||
| 522 | (insert (apply 'format "#%02x%02x%02x" | ||
| 523 | (mapcar (lambda (c) (lsh c -8)) | ||
| 524 | (color-values (car color))))) | ||
| 525 | |||
| 526 | (insert "\n")) | ||
| 527 | (goto-char (point-min))) | 527 | (goto-char (point-min))) |
| 528 | 528 | ||
| 529 | (defun list-colors-duplicates (&optional list) | 529 | (defun list-colors-duplicates (&optional list) |
| @@ -539,8 +539,8 @@ a list of colors that the current display can handle." | |||
| 539 | (l list)) | 539 | (l list)) |
| 540 | (while (cdr l) | 540 | (while (cdr l) |
| 541 | (if (and (facemenu-color-equal (car (car l)) (car (car (cdr l)))) | 541 | (if (and (facemenu-color-equal (car (car l)) (car (car (cdr l)))) |
| 542 | (not (and (boundp 'w32-default-color-map) | 542 | (not (if (boundp 'w32-default-color-map) |
| 543 | (not (assoc (car (car l)) w32-default-color-map))))) | 543 | (not (assoc (car (car l)) w32-default-color-map))))) |
| 544 | (progn | 544 | (progn |
| 545 | (setcdr (car l) (cons (car (car (cdr l))) (cdr (car l)))) | 545 | (setcdr (car l) (cons (car (car (cdr l))) (cdr (car l)))) |
| 546 | (setcdr l (cdr (cdr l)))) | 546 | (setcdr l (cdr (cdr l)))) |
diff --git a/lisp/faces.el b/lisp/faces.el index 936e0a132a4..2d94c28c9f4 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -225,7 +225,8 @@ Value is FACE." | |||
| 225 | 225 | ||
| 226 | (defun face-id (face &optional frame) | 226 | (defun face-id (face &optional frame) |
| 227 | "Return the internal ID of face with name FACE. | 227 | "Return the internal ID of face with name FACE. |
| 228 | If optional argument FRAME is nil or omitted, use the selected frame." | 228 | The optional argument FRAME is ignored, since the internal face ID |
| 229 | of a face name is the same for all frames." | ||
| 229 | (check-face face) | 230 | (check-face face) |
| 230 | (get face 'face)) | 231 | (get face 'face)) |
| 231 | 232 | ||
diff --git a/lisp/generic.el b/lisp/generic.el index fe3c2c274af..9545b0970ac 100644 --- a/lisp/generic.el +++ b/lisp/generic.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; generic.el --- defining simple major modes with comment and font-lock | 1 | ;;; generic.el --- defining simple major modes with comment and font-lock |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 1999, 2004, 2005 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: Peter Breton <pbreton@cs.umb.edu> | 5 | ;; Author: Peter Breton <pbreton@cs.umb.edu> |
| 6 | ;; Created: Fri Sep 27 1996 | 6 | ;; Created: Fri Sep 27 1996 |
| @@ -215,8 +215,7 @@ FUNCTION-LIST is a list of functions to call to do some additional setup. | |||
| 215 | See the file generic-x.el for some examples of `define-generic-mode'." | 215 | See the file generic-x.el for some examples of `define-generic-mode'." |
| 216 | 216 | ||
| 217 | ;; Add a new entry | 217 | ;; Add a new entry |
| 218 | (unless (assq name generic-mode-list) | 218 | (add-to-list 'generic-mode-list (symbol-name name)) |
| 219 | (push (list (symbol-name name)) generic-mode-list)) | ||
| 220 | 219 | ||
| 221 | ;; Add it to auto-mode-alist | 220 | ;; Add it to auto-mode-alist |
| 222 | (dolist (re auto-mode-list) | 221 | (dolist (re auto-mode-list) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 76d4cb419cb..9213b44170c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,14 +1,28 @@ | |||
| 1 | 2005-03-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * nnimap.el (nnimap-retrieve-headers-from-server): Fix last change. | ||
| 4 | |||
| 5 | 2005-03-10 Arne J,Ax(Brgensen <arne@arnested.dk> (tiny change) | ||
| 6 | |||
| 7 | * nnimap.el (nnimap-retrieve-headers-from-server): Fix off-by-one | ||
| 8 | flaw. | ||
| 9 | |||
| 10 | 2005-03-08 Bjorn Solberg <bjorn_ding@hekneby.org> (tiny change) | ||
| 11 | |||
| 12 | * nnimap.el (nnimap-retrieve-headers-from-server): Sort NOV | ||
| 13 | buffer (since IMAP server might return FETCH response out of | ||
| 14 | order, and the nntp buffer must be sorted). | ||
| 15 | |||
| 1 | 2005-03-04 Reiner Steib <Reiner.Steib@gmx.de> | 16 | 2005-03-04 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 17 | ||
| 3 | * message.el: Don't autoload former message-utils variables. | 18 | * message.el: Don't autoload former message-utils variables. |
| 4 | (message-strip-subject-trailing-was): Changed doc string. | 19 | (message-strip-subject-trailing-was): Change doc string. |
| 5 | 20 | ||
| 6 | * nnweb.el: Fixes for `gnus-group-make-web-group'. | 21 | * nnweb.el: Fixes for `gnus-group-make-web-group'. |
| 7 | (nnweb-type-definition): Don't add "hl=en" in `address'. Added | 22 | (nnweb-type-definition): Don't add "hl=en" in `address'. Add `base'. |
| 8 | `base'. | ||
| 9 | (nnweb-google-search): Add "hl=en" here. | 23 | (nnweb-google-search): Add "hl=en" here. |
| 10 | (nnweb-google-parse-1, nnweb-google-create-mapping): Don't | 24 | (nnweb-google-parse-1, nnweb-google-create-mapping): |
| 11 | hardcode URL. | 25 | Don't hardcode URL. |
| 12 | 26 | ||
| 13 | 2005-03-03 Reiner Steib <Reiner.Steib@gmx.de> | 27 | 2005-03-03 Reiner Steib <Reiner.Steib@gmx.de> |
| 14 | 28 | ||
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 59b0178de42..09d9aef6f31 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -665,6 +665,8 @@ If EXAMINE is non-nil the group is selected read-only." | |||
| 665 | (if (imap-capability 'IMAP4rev1) | 665 | (if (imap-capability 'IMAP4rev1) |
| 666 | (format "BODY.PEEK[HEADER.FIELDS %s])" headers) | 666 | (format "BODY.PEEK[HEADER.FIELDS %s])" headers) |
| 667 | (format "RFC822.HEADER.LINES %s)" headers))))) | 667 | (format "RFC822.HEADER.LINES %s)" headers))))) |
| 668 | (with-current-buffer nntp-server-buffer | ||
| 669 | (sort-numeric-fields 1 (point-min) (point-max))) | ||
| 668 | (and (numberp nnmail-large-newsgroup) | 670 | (and (numberp nnmail-large-newsgroup) |
| 669 | (> nnimap-length nnmail-large-newsgroup) | 671 | (> nnimap-length nnmail-large-newsgroup) |
| 670 | (nnheader-message 6 "nnimap: Retrieving headers...done"))))) | 672 | (nnheader-message 6 "nnimap: Retrieving headers...done"))))) |
diff --git a/lisp/help.el b/lisp/help.el index de5ac093dd5..22d383559a1 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; help.el --- help commands for Emacs | 1 | ;;; help.el --- help commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2004 | 3 | ;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2004, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 7 | ;; Keywords: help, internal | 7 | ;; Keywords: help, internal |
| @@ -685,34 +685,35 @@ For this to work correctly for a minor mode, the mode's indicator | |||
| 685 | variable \(listed in `minor-mode-alist') must also be a function | 685 | variable \(listed in `minor-mode-alist') must also be a function |
| 686 | whose documentation describes the minor mode." | 686 | whose documentation describes the minor mode." |
| 687 | (interactive) | 687 | (interactive) |
| 688 | (help-setup-xref (list #'describe-mode (or buffer (current-buffer))) | 688 | (unless buffer (setq buffer (current-buffer))) |
| 689 | (help-setup-xref (list #'describe-mode buffer) | ||
| 689 | (interactive-p)) | 690 | (interactive-p)) |
| 690 | ;; For the sake of help-do-xref and help-xref-go-back, | 691 | ;; For the sake of help-do-xref and help-xref-go-back, |
| 691 | ;; don't switch buffers before calling `help-buffer'. | 692 | ;; don't switch buffers before calling `help-buffer'. |
| 692 | (with-output-to-temp-buffer (help-buffer) | 693 | (with-output-to-temp-buffer (help-buffer) |
| 693 | (save-excursion | 694 | (with-current-buffer buffer |
| 694 | (when buffer (set-buffer buffer)) | ||
| 695 | (let (minor-modes) | 695 | (let (minor-modes) |
| 696 | ;; Older packages do not register in minor-mode-list but only in | ||
| 697 | ;; minor-mode-alist. | ||
| 698 | (dolist (x minor-mode-alist) | ||
| 699 | (setq x (car x)) | ||
| 700 | (unless (memq x minor-mode-list) | ||
| 701 | (push x minor-mode-list))) | ||
| 696 | ;; Find enabled minor mode we will want to mention. | 702 | ;; Find enabled minor mode we will want to mention. |
| 697 | (dolist (mode minor-mode-list) | 703 | (dolist (mode minor-mode-list) |
| 698 | ;; Document a minor mode if it is listed in minor-mode-alist, | 704 | ;; Document a minor mode if it is listed in minor-mode-alist, |
| 699 | ;; non-nil, and has a function definition. | 705 | ;; non-nil, and has a function definition. |
| 700 | (and (boundp mode) (symbol-value mode) | 706 | (and (boundp mode) (symbol-value mode) |
| 701 | (fboundp mode) | 707 | (fboundp mode) |
| 702 | (let ((pretty-minor-mode mode) | 708 | (let ((pretty-minor-mode mode)) |
| 703 | indicator) | ||
| 704 | (if (string-match "\\(-minor\\)?-mode\\'" | 709 | (if (string-match "\\(-minor\\)?-mode\\'" |
| 705 | (symbol-name mode)) | 710 | (symbol-name mode)) |
| 706 | (setq pretty-minor-mode | 711 | (setq pretty-minor-mode |
| 707 | (capitalize | 712 | (capitalize |
| 708 | (substring (symbol-name mode) | 713 | (substring (symbol-name mode) |
| 709 | 0 (match-beginning 0))))) | 714 | 0 (match-beginning 0))))) |
| 710 | (setq indicator (cadr (assq mode minor-mode-alist))) | 715 | (push (list pretty-minor-mode mode |
| 711 | (while (and indicator (symbolp indicator) | 716 | (format-mode-line (assq mode minor-mode-alist))) |
| 712 | (boundp indicator) | ||
| 713 | (not (eq indicator (symbol-value indicator)))) | ||
| 714 | (setq indicator (symbol-value indicator))) | ||
| 715 | (push (list pretty-minor-mode mode indicator) | ||
| 716 | minor-modes)))) | 717 | minor-modes)))) |
| 717 | (if auto-fill-function | 718 | (if auto-fill-function |
| 718 | ;; copy pure string so we can add face property to it below. | 719 | ;; copy pure string so we can add face property to it below. |
| @@ -729,6 +730,9 @@ whose documentation describes the minor mode." | |||
| 729 | (let ((pretty-minor-mode (nth 0 mode)) | 730 | (let ((pretty-minor-mode (nth 0 mode)) |
| 730 | (mode-function (nth 1 mode)) | 731 | (mode-function (nth 1 mode)) |
| 731 | (indicator (nth 2 mode))) | 732 | (indicator (nth 2 mode))) |
| 733 | (setq indicator (if (zerop (length indicator)) | ||
| 734 | "no indicator" | ||
| 735 | (format "indicator%s" indicator))) | ||
| 732 | (add-text-properties 0 (length pretty-minor-mode) | 736 | (add-text-properties 0 (length pretty-minor-mode) |
| 733 | '(face bold) pretty-minor-mode) | 737 | '(face bold) pretty-minor-mode) |
| 734 | (save-excursion | 738 | (save-excursion |
| @@ -737,20 +741,14 @@ whose documentation describes the minor mode." | |||
| 737 | (push (point-marker) help-button-cache) | 741 | (push (point-marker) help-button-cache) |
| 738 | ;; Document the minor modes fully. | 742 | ;; Document the minor modes fully. |
| 739 | (insert pretty-minor-mode) | 743 | (insert pretty-minor-mode) |
| 740 | (princ (format " minor mode (%s):\n" | 744 | (princ (format " minor mode (%s):\n" indicator)) |
| 741 | (if indicator | ||
| 742 | (format "indicator%s" indicator) | ||
| 743 | "no indicator"))) | ||
| 744 | (princ (documentation mode-function))) | 745 | (princ (documentation mode-function))) |
| 745 | (princ " ") | 746 | (princ " ") |
| 746 | (insert-button pretty-minor-mode | 747 | (insert-button pretty-minor-mode |
| 747 | 'action (car help-button-cache) | 748 | 'action (car help-button-cache) |
| 748 | 'follow-link t | 749 | 'follow-link t |
| 749 | 'help-echo "mouse-2, RET: show full information") | 750 | 'help-echo "mouse-2, RET: show full information") |
| 750 | (princ (format " minor mode (%s):\n" | 751 | (princ (format " minor mode (%s):\n" indicator))))) |
| 751 | (if indicator | ||
| 752 | (format "indicator%s" indicator) | ||
| 753 | "no indicator")))))) | ||
| 754 | (princ "\n(Full information about these minor modes | 752 | (princ "\n(Full information about these minor modes |
| 755 | follows the description of the major mode.)\n\n")) | 753 | follows the description of the major mode.)\n\n")) |
| 756 | ;; Document the major mode. | 754 | ;; Document the major mode. |
| @@ -896,5 +894,5 @@ out of view." | |||
| 896 | ;; defcustoms which require 'help'. | 894 | ;; defcustoms which require 'help'. |
| 897 | (provide 'help) | 895 | (provide 'help) |
| 898 | 896 | ||
| 899 | ;;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423 | 897 | ;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423 |
| 900 | ;;; help.el ends here | 898 | ;;; help.el ends here |
diff --git a/lisp/image-file.el b/lisp/image-file.el index 4a13019a090..11676021afd 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el | |||
| @@ -135,6 +135,7 @@ the command `insert-file-contents'." | |||
| 135 | (setq truncate-lines t)))) | 135 | (setq truncate-lines t)))) |
| 136 | rval)) | 136 | rval)) |
| 137 | 137 | ||
| 138 | (put 'image-file-handler 'safe-magic t) | ||
| 138 | (defun image-file-handler (operation &rest args) | 139 | (defun image-file-handler (operation &rest args) |
| 139 | "Filename handler for inserting image files. | 140 | "Filename handler for inserting image files. |
| 140 | OPERATION is the operation to perform, on ARGS. | 141 | OPERATION is the operation to perform, on ARGS. |
diff --git a/lisp/info.el b/lisp/info.el index 4905bf0844e..b2920bd6ecb 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -210,6 +210,8 @@ top/final node depending on search direction." | |||
| 210 | :type 'boolean | 210 | :type 'boolean |
| 211 | :group 'info) | 211 | :group 'info) |
| 212 | 212 | ||
| 213 | (defvar Info-isearch-initial-node nil) | ||
| 214 | |||
| 213 | (defcustom Info-mode-hook | 215 | (defcustom Info-mode-hook |
| 214 | ;; Try to obey obsolete Info-fontify settings. | 216 | ;; Try to obey obsolete Info-fontify settings. |
| 215 | (unless (and (boundp 'Info-fontify) (null Info-fontify)) | 217 | (unless (and (boundp 'Info-fontify) (null Info-fontify)) |
| @@ -1502,7 +1504,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1502 | ;; Skip node header line | 1504 | ;; Skip node header line |
| 1503 | (and (save-excursion (forward-line -1) | 1505 | (and (save-excursion (forward-line -1) |
| 1504 | (looking-at "\^_")) | 1506 | (looking-at "\^_")) |
| 1505 | (forward-line 1)) | 1507 | (forward-line (if backward -1 1))) |
| 1506 | ;; Skip Tag Table node | 1508 | ;; Skip Tag Table node |
| 1507 | (save-excursion | 1509 | (save-excursion |
| 1508 | (and (search-backward "\^_" nil t) | 1510 | (and (search-backward "\^_" nil t) |
| @@ -1514,6 +1516,14 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1514 | (setq found (point) beg-found (if backward (match-end 0) | 1516 | (setq found (point) beg-found (if backward (match-end 0) |
| 1515 | (match-beginning 0))) | 1517 | (match-beginning 0))) |
| 1516 | (setq give-up t)))))) | 1518 | (setq give-up t)))))) |
| 1519 | |||
| 1520 | (when (and isearch-mode Info-isearch-search | ||
| 1521 | (not Info-isearch-initial-node) | ||
| 1522 | (not bound) | ||
| 1523 | (or give-up (and found (not (and (> found opoint-min) | ||
| 1524 | (< found opoint-max)))))) | ||
| 1525 | (signal 'search-failed (list regexp "initial node"))) | ||
| 1526 | |||
| 1517 | ;; If no subfiles, give error now. | 1527 | ;; If no subfiles, give error now. |
| 1518 | (if give-up | 1528 | (if give-up |
| 1519 | (if (null Info-current-subfile) | 1529 | (if (null Info-current-subfile) |
| @@ -1523,6 +1533,9 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1523 | (re-search-forward regexp))) | 1533 | (re-search-forward regexp))) |
| 1524 | (setq found nil))) | 1534 | (setq found nil))) |
| 1525 | 1535 | ||
| 1536 | (if (and bound (not found)) | ||
| 1537 | (signal 'search-failed (list regexp))) | ||
| 1538 | |||
| 1526 | (unless (or found bound) | 1539 | (unless (or found bound) |
| 1527 | (unwind-protect | 1540 | (unwind-protect |
| 1528 | ;; Try other subfiles. | 1541 | ;; Try other subfiles. |
| @@ -1540,6 +1553,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1540 | (search-forward (concat "\n" osubfile ": ")) | 1553 | (search-forward (concat "\n" osubfile ": ")) |
| 1541 | ;; Skip that one. | 1554 | ;; Skip that one. |
| 1542 | (forward-line (if backward 0 1)) | 1555 | (forward-line (if backward 0 1)) |
| 1556 | (if backward (forward-char -1)) | ||
| 1543 | ;; Make a list of all following subfiles. | 1557 | ;; Make a list of all following subfiles. |
| 1544 | ;; Each elt has the form (VIRT-POSITION . SUBFILENAME). | 1558 | ;; Each elt has the form (VIRT-POSITION . SUBFILENAME). |
| 1545 | (while (not (if backward (bobp) (eobp))) | 1559 | (while (not (if backward (bobp) (eobp))) |
| @@ -1578,7 +1592,7 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1578 | ;; Skip node header line | 1592 | ;; Skip node header line |
| 1579 | (and (save-excursion (forward-line -1) | 1593 | (and (save-excursion (forward-line -1) |
| 1580 | (looking-at "\^_")) | 1594 | (looking-at "\^_")) |
| 1581 | (forward-line 1)) | 1595 | (forward-line (if backward -1 1))) |
| 1582 | ;; Skip Tag Table node | 1596 | ;; Skip Tag Table node |
| 1583 | (save-excursion | 1597 | (save-excursion |
| 1584 | (and (search-backward "\^_" nil t) | 1598 | (and (search-backward "\^_" nil t) |
| @@ -1615,7 +1629,8 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1615 | ;; Use string-equal, not equal, to ignore text props. | 1629 | ;; Use string-equal, not equal, to ignore text props. |
| 1616 | (or (and (string-equal onode Info-current-node) | 1630 | (or (and (string-equal onode Info-current-node) |
| 1617 | (equal ofile Info-current-file)) | 1631 | (equal ofile Info-current-file)) |
| 1618 | (and isearch-mode isearch-wrapped (eq opoint opoint-min)) | 1632 | (and isearch-mode isearch-wrapped |
| 1633 | (eq opoint (if isearch-forward opoint-min opoint-max))) | ||
| 1619 | (setq Info-history (cons (list ofile onode opoint) | 1634 | (setq Info-history (cons (list ofile onode opoint) |
| 1620 | Info-history)))))) | 1635 | Info-history)))))) |
| 1621 | 1636 | ||
| @@ -1646,21 +1661,30 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1646 | (Info-search regexp bound noerror count 'backward)) | 1661 | (Info-search regexp bound noerror count 'backward)) |
| 1647 | 1662 | ||
| 1648 | (defun Info-isearch-search () | 1663 | (defun Info-isearch-search () |
| 1649 | (if (and Info-isearch-search (not isearch-word)) | 1664 | (if Info-isearch-search |
| 1650 | (lambda (string &optional bound noerror count) | 1665 | (lambda (string &optional bound noerror count) |
| 1651 | (condition-case nil | 1666 | (if isearch-word |
| 1652 | (progn | 1667 | (Info-search (concat "\\b" (replace-regexp-in-string |
| 1653 | (Info-search (if isearch-regexp string (regexp-quote string)) | 1668 | "\\W+" "\\\\W+" |
| 1654 | bound noerror count | 1669 | (replace-regexp-in-string |
| 1655 | (unless isearch-forward 'backward)) | 1670 | "^\\W+\\|\\W+$" "" string)) "\\b") |
| 1656 | (point)) | 1671 | bound noerror count |
| 1657 | (error nil))) | 1672 | (unless isearch-forward 'backward)) |
| 1673 | (Info-search (if isearch-regexp string (regexp-quote string)) | ||
| 1674 | bound noerror count | ||
| 1675 | (unless isearch-forward 'backward)) | ||
| 1676 | (point))) | ||
| 1658 | (let ((isearch-search-fun-function nil)) | 1677 | (let ((isearch-search-fun-function nil)) |
| 1659 | (isearch-search-fun)))) | 1678 | (isearch-search-fun)))) |
| 1660 | 1679 | ||
| 1661 | (defun Info-isearch-wrap () | 1680 | (defun Info-isearch-wrap () |
| 1662 | (when (and Info-isearch-search (not isearch-word)) | 1681 | (if Info-isearch-search |
| 1663 | (if isearch-forward (Info-top-node) (Info-final-node)) | 1682 | (if Info-isearch-initial-node |
| 1683 | (progn | ||
| 1684 | (if isearch-forward (Info-top-node) (Info-final-node)) | ||
| 1685 | (goto-char (if isearch-forward (point-min) (point-max)))) | ||
| 1686 | (setq Info-isearch-initial-node Info-current-node) | ||
| 1687 | (setq isearch-wrapped nil)) | ||
| 1664 | (goto-char (if isearch-forward (point-min) (point-max))))) | 1688 | (goto-char (if isearch-forward (point-min) (point-max))))) |
| 1665 | 1689 | ||
| 1666 | (defun Info-isearch-push-state () | 1690 | (defun Info-isearch-push-state () |
| @@ -1672,6 +1696,8 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1672 | (string= Info-current-node node)) | 1696 | (string= Info-current-node node)) |
| 1673 | (progn (Info-find-node file node) (sit-for 0)))) | 1697 | (progn (Info-find-node file node) (sit-for 0)))) |
| 1674 | 1698 | ||
| 1699 | (defun Info-isearch-start () | ||
| 1700 | (setq Info-isearch-initial-node nil)) | ||
| 1675 | 1701 | ||
| 1676 | (defun Info-extract-pointer (name &optional errorname) | 1702 | (defun Info-extract-pointer (name &optional errorname) |
| 1677 | "Extract the value of the node-pointer named NAME. | 1703 | "Extract the value of the node-pointer named NAME. |
| @@ -3209,6 +3235,7 @@ Advanced commands: | |||
| 3209 | (setq desktop-save-buffer 'Info-desktop-buffer-misc-data) | 3235 | (setq desktop-save-buffer 'Info-desktop-buffer-misc-data) |
| 3210 | (add-hook 'clone-buffer-hook 'Info-clone-buffer-hook nil t) | 3236 | (add-hook 'clone-buffer-hook 'Info-clone-buffer-hook nil t) |
| 3211 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) | 3237 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) |
| 3238 | (add-hook 'isearch-mode-hook 'Info-isearch-start nil t) | ||
| 3212 | (set (make-local-variable 'isearch-search-fun-function) | 3239 | (set (make-local-variable 'isearch-search-fun-function) |
| 3213 | 'Info-isearch-search) | 3240 | 'Info-isearch-search) |
| 3214 | (set (make-local-variable 'isearch-wrap-function) | 3241 | (set (make-local-variable 'isearch-wrap-function) |
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index e55f1fbcf36..93ad9358721 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el | |||
| @@ -1305,7 +1305,9 @@ CCL-PROGRAM has this form: | |||
| 1305 | 1305 | ||
| 1306 | BUFFER_MAGNIFICATION is an integer value specifying the approximate | 1306 | BUFFER_MAGNIFICATION is an integer value specifying the approximate |
| 1307 | output buffer magnification size compared with the bytes of input data | 1307 | output buffer magnification size compared with the bytes of input data |
| 1308 | text. If the value is zero, the CCL program can't execute `read' and | 1308 | text. It is assured that the actual output buffer has 256 bytes |
| 1309 | more than the size calculated by BUFFER_MAGNIFICATION. | ||
| 1310 | If the value is zero, the CCL program can't execute `read' and | ||
| 1309 | `write' commands. | 1311 | `write' commands. |
| 1310 | 1312 | ||
| 1311 | CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE | 1313 | CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE |
diff --git a/lisp/international/latin-1.el b/lisp/international/latin-1.el index 3c30ba0721b..610ed1cb9f1 100644 --- a/lisp/international/latin-1.el +++ b/lisp/international/latin-1.el | |||
| @@ -104,7 +104,10 @@ | |||
| 104 | (set-case-syntax-pair 222 254 tbl) ;latin letter thorn (Icelandic) | 104 | (set-case-syntax-pair 222 254 tbl) ;latin letter thorn (Icelandic) |
| 105 | (set-case-syntax 223 "w" tbl) ;latin small letter sharp s (German) | 105 | (set-case-syntax 223 "w" tbl) ;latin small letter sharp s (German) |
| 106 | (set-case-syntax 247 "_" tbl) ;division sign | 106 | (set-case-syntax 247 "_" tbl) ;division sign |
| 107 | (set-case-syntax 255 "w" tbl)) ;latin small letter y with diaeresis | 107 | ;; The following setting should be suppressed when we are loading |
| 108 | ;; this file for setting syntax of multibyte characters. | ||
| 109 | (or set-case-syntax-set-multibyte | ||
| 110 | (set-case-syntax 255 "w" tbl))) ;latin small letter y with diaeresis | ||
| 108 | 111 | ||
| 109 | ;; When preloading this file, don't provide the feature. | 112 | ;; When preloading this file, don't provide the feature. |
| 110 | ;; Explicit `require' is used to load this for 8-bit characters. | 113 | ;; Explicit `require' is used to load this for 8-bit characters. |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 24992b3c10b..3fac3ab6dd9 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -2043,55 +2043,60 @@ of `buffer-file-coding-system' set by this function." | |||
| 2043 | ;; and Chinese are exceptions, which are listed in the | 2043 | ;; and Chinese are exceptions, which are listed in the |
| 2044 | ;; non-standard section at the bottom of locale-language-names. | 2044 | ;; non-standard section at the bottom of locale-language-names. |
| 2045 | 2045 | ||
| 2046 | ; aa Afar | 2046 | ("aa_DJ" . "Latin-1") ; Afar |
| 2047 | ; ab Abkhazian | 2047 | ("aa" . "UTF-8") |
| 2048 | ;; ab Abkhazian | ||
| 2048 | ("af" . "Latin-1") ; Afrikaans | 2049 | ("af" . "Latin-1") ; Afrikaans |
| 2049 | ("am" . "Ethiopic") ; Amharic | 2050 | ("am" "Ethiopic" utf-8) ; Amharic |
| 2051 | ("an" . "Latin-9") ; Aragonese | ||
| 2050 | ; ar Arabic glibc uses 8859-6 | 2052 | ; ar Arabic glibc uses 8859-6 |
| 2051 | ; as Assamese | 2053 | ; as Assamese |
| 2052 | ; ay Aymara | 2054 | ; ay Aymara |
| 2053 | ; az Azerbaijani | 2055 | ("az" . "UTF-8") ; Azerbaijani |
| 2054 | ; ba Bashkir | 2056 | ; ba Bashkir |
| 2055 | ("be" . "Belarusian") ; Belarusian [Byelorussian until early 1990s] | 2057 | ("be" "Belarusian" cp1251) ; Belarusian [Byelorussian until early 1990s] |
| 2056 | ("bg" . "Bulgarian") ; Bulgarian | 2058 | ("bg" "Bulgarian" cp1251) ; Bulgarian |
| 2057 | ; bh Bihari | 2059 | ; bh Bihari |
| 2058 | ; bi Bislama | 2060 | ; bi Bislama |
| 2059 | ; bn Bengali, Bangla | 2061 | ("bn" . "UTF-8") ; Bengali, Bangla |
| 2060 | ("bo" . "Tibetan") | 2062 | ("bo" . "Tibetan") |
| 2061 | ("br" . "Latin-1") ; Breton | 2063 | ("br" . "Latin-1") ; Breton |
| 2062 | ("bs" . "Latin-2") ; Bosnian | 2064 | ("bs" . "Latin-2") ; Bosnian |
| 2065 | ("byn" . "UTF-8") ; Bilin; Blin | ||
| 2063 | ("ca" . "Latin-1") ; Catalan | 2066 | ("ca" . "Latin-1") ; Catalan |
| 2064 | ; co Corsican | 2067 | ; co Corsican |
| 2065 | ("cs" . "Czech") | 2068 | ("cs" "Czech" iso-8859-2) |
| 2066 | ("cy" . "Welsh") ; Welsh [glibc uses Latin-8. Did this change?] | 2069 | ("cy" "Welsh" iso-8859-14) |
| 2067 | ("da" . "Latin-1") ; Danish | 2070 | ("da" . "Latin-1") ; Danish |
| 2068 | ("de" . "German") | 2071 | ("de" "German" iso-8859-1) |
| 2069 | ; dz Bhutani | 2072 | ; dz Bhutani |
| 2070 | ("el" . "Greek") | 2073 | ("el" "Greek" iso-8859-7) |
| 2071 | ;; Users who specify "en" explicitly typically want Latin-1, not ASCII. | 2074 | ;; Users who specify "en" explicitly typically want Latin-1, not ASCII. |
| 2072 | ;; That's actually what the GNU locales define, modulo things like | 2075 | ;; That's actually what the GNU locales define, modulo things like |
| 2073 | ;; en_IN -- fx. | 2076 | ;; en_IN -- fx. |
| 2077 | ("en_IN" "English" utf-8) ; glibc uses utf-8 for English in India | ||
| 2074 | ("en" . "Latin-1") ; English | 2078 | ("en" . "Latin-1") ; English |
| 2075 | ("eo" . "Latin-3") ; Esperanto | 2079 | ("eo" . "Latin-3") ; Esperanto |
| 2076 | ("es" . "Spanish") | 2080 | ("es" "Spanish" iso-8859-1) |
| 2077 | ("et" . "Latin-4") ; Estonian | 2081 | ("et" . "Latin-1") ; Estonian |
| 2078 | ("eu" . "Latin-1") ; Basque | 2082 | ("eu" . "Latin-1") ; Basque |
| 2079 | ; fa Persian glibc uses utf-8 | 2083 | ("fa" . "UTF-8") ; Persian |
| 2080 | ("fi" . "Latin-1") ; Finnish | 2084 | ("fi" . "Latin-1") ; Finnish |
| 2081 | ; fj Fiji | 2085 | ("fj" . "Latin-1") ; Fiji |
| 2082 | ("fo" . "Latin-1") ; Faroese | 2086 | ("fo" . "Latin-1") ; Faroese |
| 2083 | ("fr" . "French") ; French | 2087 | ("fr" "French" iso-8859-1) ; French |
| 2084 | ("fy" . "Latin-1") ; Frisian | 2088 | ("fy" . "Latin-1") ; Frisian |
| 2085 | ("ga" . "Latin-1") ; Irish Gaelic (new orthography) | 2089 | ("ga" . "Latin-1") ; Irish Gaelic (new orthography) |
| 2086 | ("gd" . "Latin-1") ; Scots Gaelic | 2090 | ("gd" . "Latin-9") ; Scots Gaelic |
| 2087 | ("gl" . "Latin-1") ; Galician | 2091 | ("gez" "Ethiopic" utf-8) ; Geez |
| 2092 | ("gl" . "Latin-1") ; Gallegan; Galician | ||
| 2088 | ; gn Guarani | 2093 | ; gn Guarani |
| 2089 | ; gu Gujarati | 2094 | ("gu" . "UTF-8") ; Gujarati |
| 2090 | ("gv" . "Latin-8") ; Manx Gaelic glibc uses 8859-1 | 2095 | ("gv" . "Latin-1") ; Manx Gaelic |
| 2091 | ; ha Hausa | 2096 | ; ha Hausa |
| 2092 | ("he" . "Hebrew") | 2097 | ("he" "Hebrew" iso-8859-8) |
| 2093 | ("hi" . "Devanagari") ; Hindi glibc uses utf-8 | 2098 | ("hi" "Devanagari" utf-8) ; Hindi |
| 2094 | ("hr" . "Croatian") ; Croatian | 2099 | ("hr" "Croatian" iso-8859-2) ; Croatian |
| 2095 | ("hu" . "Latin-2") ; Hungarian | 2100 | ("hu" . "Latin-2") ; Hungarian |
| 2096 | ; hy Armenian | 2101 | ; hy Armenian |
| 2097 | ; ia Interlingua | 2102 | ; ia Interlingua |
| @@ -2099,110 +2104,114 @@ of `buffer-file-coding-system' set by this function." | |||
| 2099 | ; ie Interlingue | 2104 | ; ie Interlingue |
| 2100 | ; ik Inupiak | 2105 | ; ik Inupiak |
| 2101 | ("is" . "Latin-1") ; Icelandic | 2106 | ("is" . "Latin-1") ; Icelandic |
| 2102 | ("it" . "Italian") ; Italian | 2107 | ("it" "Italian" iso-8859-1) ; Italian |
| 2103 | ; iu Inuktitut | 2108 | ; iu Inuktitut |
| 2104 | ("ja" . "Japanese") | 2109 | ("iw" "Hebrew" iso-8859-8) |
| 2110 | ("ja" "Japanese" euc-jp) | ||
| 2105 | ; jw Javanese | 2111 | ; jw Javanese |
| 2106 | ("ka" . "Georgian") ; Georgian | 2112 | ("ka" "Georgian" georgian-ps) ; Georgian |
| 2107 | ; kk Kazakh | 2113 | ; kk Kazakh |
| 2108 | ("kl" . "Latin-1") ; Greenlandic | 2114 | ("kl" . "Latin-1") ; Greenlandic |
| 2109 | ; km Cambodian | 2115 | ; km Cambodian |
| 2110 | ; kn Kannada | 2116 | ("kn" "Kannada" utf-8) |
| 2111 | ("ko" . "Korean") | 2117 | ("ko" "Korean" euc-kr) |
| 2112 | ; ks Kashmiri | 2118 | ; ks Kashmiri |
| 2113 | ; ku Kurdish | 2119 | ; ku Kurdish |
| 2114 | ("kw" . "Latin-1") ; Cornish | 2120 | ("kw" . "Latin-1") ; Cornish |
| 2115 | ; ky Kirghiz | 2121 | ; ky Kirghiz |
| 2116 | ("la" . "Latin-1") ; Latin | 2122 | ("la" . "Latin-1") ; Latin |
| 2117 | ("lb" . "Latin-1") ; Luxemburgish | 2123 | ("lb" . "Latin-1") ; Luxemburgish |
| 2124 | ("lg" . "Laint-6") ; Ganda | ||
| 2118 | ; ln Lingala | 2125 | ; ln Lingala |
| 2119 | ("lo" . "Lao") ; Laothian | 2126 | ("lo" "Lao" utf-8) ; Laothian |
| 2120 | ("lt" . "Lithuanian") | 2127 | ("lt" "Lithuanian" iso-8859-13) |
| 2121 | ("lv" . "Latvian") ; Latvian, Lettish | 2128 | ("lv" . "Latvian") ; Latvian, Lettish |
| 2122 | ; mg Malagasy | 2129 | ; mg Malagasy |
| 2123 | ("mi" . "Latin-7") ; Maori | 2130 | ("mi" . "Latin-7") ; Maori |
| 2124 | ("mk" . "Cyrillic-ISO") ; Macedonian | 2131 | ("mk" "Cyrillic-ISO" iso-8859-5) ; Macedonian |
| 2125 | ; ml Malayalam | 2132 | ("ml" "Malayalam" utf-8) |
| 2126 | ; mn Mongolian | 2133 | ("mn" . "UTF-8") ; Mongolian |
| 2127 | ; mo Moldavian | 2134 | ; mo Moldavian |
| 2128 | ("mr" . "Devanagari") ; Marathi glibc uses utf-8 | 2135 | ("mr" "Devanagari" utf-8) ; Marathi |
| 2129 | ("ms" . "Latin-1") ; Malay | 2136 | ("ms" . "Latin-1") ; Malay |
| 2130 | ("mt" . "Latin-3") ; Maltese | 2137 | ("mt" . "Latin-3") ; Maltese |
| 2131 | ; my Burmese | 2138 | ; my Burmese |
| 2132 | ; na Nauru | 2139 | ; na Nauru |
| 2133 | ("ne" . "Devanagari") ; Nepali | 2140 | ("nb" . "Latin-1") ; Norwegian |
| 2134 | ("nl" . "Dutch") | 2141 | ("ne" "Devanagari" utf-8) ; Nepali |
| 2142 | ("nl" "Dutch" iso-8859-1) | ||
| 2135 | ("no" . "Latin-1") ; Norwegian | 2143 | ("no" . "Latin-1") ; Norwegian |
| 2136 | ("oc" . "Latin-1") ; Occitan | 2144 | ("oc" . "Latin-1") ; Occitan |
| 2137 | ; om (Afan) Oromo | 2145 | ("om_ET" . "UTF-8") ; (Afan) Oromo |
| 2146 | ("om" . "Latin-1") ; (Afan) Oromo | ||
| 2138 | ; or Oriya | 2147 | ; or Oriya |
| 2139 | ; pa Punjabi | 2148 | ("pa" . "UTF-8") ; Punjabi |
| 2140 | ("pl" . "Latin-2") ; Polish | 2149 | ("pl" . "Latin-2") ; Polish |
| 2141 | ; ps Pashto, Pushto | 2150 | ; ps Pashto, Pushto |
| 2142 | ("pt" . "Latin-1") ; Portuguese | 2151 | ("pt" . "Latin-1") ; Portuguese |
| 2143 | ; qu Quechua | 2152 | ; qu Quechua |
| 2144 | ("rm" . "Latin-1") ; Rhaeto-Romanic | 2153 | ("rm" . "Latin-1") ; Rhaeto-Romanic |
| 2145 | ; rn Kirundi | 2154 | ; rn Kirundi |
| 2146 | ("ro" . "Romanian") | 2155 | ("ro" "Romanian" iso-8859-2) |
| 2147 | ("ru.*[_.]koi8" . "Russian") | 2156 | ("ru_RU" "Russian" iso-8859-5) |
| 2148 | ("ru" . "Cyrillic-ISO") ; Russian | 2157 | ("ru_UA" "Russian" koi8-u) |
| 2149 | ; rw Kinyarwanda | 2158 | ; rw Kinyarwanda |
| 2150 | ("sa" . "Devanagari") ; Sanskrit | 2159 | ("sa" . "Devanagari") ; Sanskrit |
| 2151 | ; sd Sindhi | 2160 | ; sd Sindhi |
| 2152 | ; se Northern Sami | 2161 | ("se" . "UTF-8") ; Northern Sami |
| 2153 | ; sg Sangho | 2162 | ; sg Sangho |
| 2154 | ("sh" . "Latin-2") ; Serbo-Croatian | 2163 | ("sh" . "Latin-2") ; Serbo-Croatian |
| 2155 | ; si Sinhalese | 2164 | ; si Sinhalese |
| 2156 | ("sk" . "Slovak") | 2165 | ("sid" . "UTF-8") ; Sidamo |
| 2157 | ("sl" . "Slovenian") | 2166 | ("sk" "Slovak" iso-8859-2) |
| 2167 | ("sl" "Slovenian" iso-8859-2) | ||
| 2158 | ; sm Samoan | 2168 | ; sm Samoan |
| 2159 | ; sn Shona | 2169 | ; sn Shona |
| 2160 | ; so Somali | 2170 | ("so_ET" "UTF-8") ; Somali |
| 2171 | ("so" "Latin-1") ; Somali | ||
| 2161 | ("sq" . "Latin-1") ; Albanian | 2172 | ("sq" . "Latin-1") ; Albanian |
| 2173 | ("sr_YU@cyrillic" . "Cyrillic-ISO") ; Serbian (Cyrillic alphabet) | ||
| 2162 | ("sr" . "Latin-2") ; Serbian (Latin alphabet) | 2174 | ("sr" . "Latin-2") ; Serbian (Latin alphabet) |
| 2163 | ("sr_YU@cyrillic" . "Cyrillic-ISO") ; per glibc | ||
| 2164 | ; ss Siswati | 2175 | ; ss Siswati |
| 2165 | ; st Sesotho | 2176 | ("st" . "Latin-1") ; Sesotho |
| 2166 | ; su Sundanese | 2177 | ; su Sundanese |
| 2167 | ("sv" . "Swedish") ; Swedish | 2178 | ("sv" "Swedish" iso-8859-1) ; Swedish |
| 2168 | ("sw" . "Latin-1") ; Swahili | 2179 | ("sw" . "Latin-1") ; Swahili |
| 2169 | ; ta Tamil glibc uses utf-8 | 2180 | ("ta" "Tamil" utf-8) |
| 2170 | ; te Telugu glibc uses utf-8 | 2181 | ("te" . "UTF-8") ; Telugu |
| 2171 | ("tg" . "Tajik") | 2182 | ("tg" "Tajik" koi8-t) |
| 2172 | ("th" . "Thai") | 2183 | ("th" "Thai" tis-620) |
| 2173 | ; ti Tigrinya | 2184 | ("ti" "Ethiopic" utf-8) ; Tigrinya |
| 2185 | ("tig_ER" . "UTF-8") ; Tigre | ||
| 2174 | ; tk Turkmen | 2186 | ; tk Turkmen |
| 2175 | ("tl" . "Latin-1") ; Tagalog | 2187 | ("tl" . "Latin-1") ; Tagalog |
| 2176 | ; tn Setswana | 2188 | ; tn Setswana |
| 2177 | ; to Tonga | 2189 | ; to Tonga |
| 2178 | ("tr" . "Turkish") | 2190 | ("tr" "Turkish" iso-8859-9) |
| 2179 | ; ts Tsonga | 2191 | ; ts Tsonga |
| 2180 | ; tt Tatar | 2192 | ("tt" . "UTF-8") ; Tatar |
| 2181 | ; tw Twi | 2193 | ; tw Twi |
| 2182 | ; ug Uighur | 2194 | ; ug Uighur |
| 2183 | ("uk" . "Ukrainian") ; Ukrainian | 2195 | ("uk" "Ukrainian" koi8-u) |
| 2184 | ; ur Urdu glibc uses utf-8 | 2196 | ("ur" . "UTF-8") ; Urdu |
| 2197 | ("uz_UZ@cyrillic" . "UTF-8"); Uzbek | ||
| 2185 | ("uz" . "Latin-1") ; Uzbek | 2198 | ("uz" . "Latin-1") ; Uzbek |
| 2186 | ("vi" . "Vietnamese") ; glibc uses utf-8 | 2199 | ("vi" "Vietnamese" utf-8) |
| 2187 | ; vo Volapuk | 2200 | ; vo Volapuk |
| 2188 | ("wa" . "Latin-1") ; Walloon | 2201 | ("wa" . "Latin-1") ; Walloon |
| 2189 | ; wo Wolof | 2202 | ; wo Wolof |
| 2190 | ; xh Xhosa | 2203 | ("xh" . "Latin-1") ; Xhosa |
| 2191 | ("yi" . "Windows-1255") ; Yiddish | 2204 | ("yi" . "Windows-1255") ; Yiddish |
| 2192 | ; yo Yoruba | 2205 | ; yo Yoruba |
| 2193 | ; za Zhuang | 2206 | ; za Zhuang |
| 2194 | 2207 | ("zh_HK" . "Chinese-Big5") | |
| 2195 | ; glibc: | 2208 | ("zh_TW" . "Chinese-Big5") |
| 2209 | ("zh_CN" . "Chinese-GB") | ||
| 2210 | ("zh" . "Chinese-GB") | ||
| 2196 | ; zh_CN.GB18030/GB18030 \ | 2211 | ; zh_CN.GB18030/GB18030 \ |
| 2197 | ; zh_CN.GBK/GBK \ | 2212 | ; zh_CN.GBK/GBK \ |
| 2198 | ; zh_HK/BIG5-HKSCS \ | 2213 | ; zh_HK/BIG5-HKSCS \ |
| 2199 | 2214 | ("zu" . "Latin-1") ; Zulu | |
| 2200 | ("zh.*[._]big5" . "Chinese-BIG5") | ||
| 2201 | ("zh.*[._]gbk" . nil) ; Solaris 2.7; has gbk-0 as well as GB 2312.1980-0 | ||
| 2202 | ("zh_tw" . "Chinese-CNS") ; glibc uses big5 | ||
| 2203 | ("zh_tw[._]euc-tw" . "Chinese-EUC-TW") | ||
| 2204 | ("zh" . "Chinese-GB") | ||
| 2205 | ; zu Zulu | ||
| 2206 | 2215 | ||
| 2207 | ;; ISO standard locales | 2216 | ;; ISO standard locales |
| 2208 | ("c$" . "ASCII") | 2217 | ("c$" . "ASCII") |
| @@ -2222,10 +2231,16 @@ of `buffer-file-coding-system' set by this function." | |||
| 2222 | ("chs" . "Chinese-GB") ; MS Windows Chinese Simplified | 2231 | ("chs" . "Chinese-GB") ; MS Windows Chinese Simplified |
| 2223 | ("cht" . "Chinese-BIG5") ; MS Windows Chinese Traditional | 2232 | ("cht" . "Chinese-BIG5") ; MS Windows Chinese Traditional |
| 2224 | )) | 2233 | )) |
| 2225 | "List of pairs of locale regexps and language names. | 2234 | "Alist of locale regexps vs the corresponding languages and coding systems. |
| 2226 | The first element whose locale regexp matches the start of a downcased locale | 2235 | Each element has these form: |
| 2227 | specifies the language name corresponding to that locale. | 2236 | \(LOCALE-REGEXP LANG-ENV CODING-SYSTEM) |
| 2228 | If the language name is nil, there is no corresponding language environment.") | 2237 | The first element whose LOCALE-REGEXP matches the start of a |
| 2238 | downcased locale specifies the LANG-ENV \(language environtment) | ||
| 2239 | and CODING-SYSTEM corresponding to that locale. If there is no | ||
| 2240 | appropriate language environment, the element may have this form: | ||
| 2241 | \(LOCALE-REGEXP . LANG-ENV) | ||
| 2242 | In this case, LANG-ENV is one of generic language environments for an | ||
| 2243 | specific encoding such as \"Latin-1\" and \"UTF-8\".") | ||
| 2229 | 2244 | ||
| 2230 | (defconst locale-charset-language-names | 2245 | (defconst locale-charset-language-names |
| 2231 | (purecopy | 2246 | (purecopy |
| @@ -2243,20 +2258,43 @@ If the language name is nil, there is no corresponding language environment.") | |||
| 2243 | "List of pairs of locale regexps and charset language names. | 2258 | "List of pairs of locale regexps and charset language names. |
| 2244 | The first element whose locale regexp matches the start of a downcased locale | 2259 | The first element whose locale regexp matches the start of a downcased locale |
| 2245 | specifies the language name whose charset corresponds to that locale. | 2260 | specifies the language name whose charset corresponds to that locale. |
| 2246 | This language name is used if its charsets disagree with the charsets of | 2261 | This language name is used if the locale is not listed in |
| 2247 | the language name that would otherwise be used for this locale.") | 2262 | `locale-language-names'") |
| 2248 | 2263 | ||
| 2249 | (defconst locale-preferred-coding-systems | 2264 | (defconst locale-preferred-coding-systems |
| 2250 | (purecopy | 2265 | (purecopy |
| 2251 | '(("ja.*[._]euc" . japanese-iso-8bit) | 2266 | '((".*8859[-_]?1\\>" . iso-8859-1) |
| 2267 | (".*8859[-_]?2\\>" . iso-8859-2) | ||
| 2268 | (".*8859[-_]?3\\>" . iso-8859-3) | ||
| 2269 | (".*8859[-_]?4\\>" . iso-8859-4) | ||
| 2270 | (".*8859[-_]?9\\>" . iso-8859-9) | ||
| 2271 | (".*8859[-_]?14\\>" . iso-8859-14) | ||
| 2272 | (".*8859[-_]?15\\>" . iso-8859-15) | ||
| 2273 | (".*utf\\(?:-?8\\)?" . utf-8) | ||
| 2274 | ;; utf-8@euro exists, so put this after utf-8. (@euro really | ||
| 2275 | ;; specifies the currency, rather than the charset.) | ||
| 2276 | (".*@euro" . iso-8859-15) | ||
| 2277 | ("koi8-?r" . koi8-r) | ||
| 2278 | ("koi8-?u" . koi8-u) | ||
| 2279 | ("tcvn" . tcvn) | ||
| 2280 | ("big5" . big5) | ||
| 2281 | ("euc-?tw" . euc-tw) | ||
| 2282 | ;; We don't support GBK, but as it is upper compatible with | ||
| 2283 | ;; GB-2312, we setup the default coding system to gb2312. | ||
| 2284 | ("gbk" . gb2312) | ||
| 2285 | ;; We don't support BIG5-HKSCS, but as it is upper compatible with | ||
| 2286 | ;; BIG5, we setup the default coding system to big5. | ||
| 2287 | ("big5hkscs" . big5) | ||
| 2288 | ("ja.*[._]euc" . japanese-iso-8bit) | ||
| 2252 | ("ja.*[._]jis7" . iso-2022-jp) | 2289 | ("ja.*[._]jis7" . iso-2022-jp) |
| 2253 | ("ja.*[._]pck" . japanese-shift-jis) | 2290 | ("ja.*[._]pck" . japanese-shift-jis) |
| 2254 | ("ja.*[._]sjis" . japanese-shift-jis) | 2291 | ("ja.*[._]sjis" . japanese-shift-jis) |
| 2255 | ("jpn" . japanese-shift-jis) ; MS-Windows uses this. | 2292 | ("jpn" . japanese-shift-jis) ; MS-Windows uses this. |
| 2256 | (".*[._]utf" . utf-8))) | 2293 | )) |
| 2257 | "List of pairs of locale regexps and preferred coding systems. | 2294 | "List of pairs of locale regexps and preferred coding systems. |
| 2258 | The first element whose locale regexp matches the start of a downcased locale | 2295 | The first element whose locale regexp matches the start of a downcased locale |
| 2259 | specifies the coding system to prefer when using that locale.") | 2296 | specifies the coding system to prefer when using that locale. |
| 2297 | This coding system is used if the locale specifies a specific charset.") | ||
| 2260 | 2298 | ||
| 2261 | (defun locale-name-match (key alist) | 2299 | (defun locale-name-match (key alist) |
| 2262 | "Search for KEY in ALIST, which should be a list of regexp-value pairs. | 2300 | "Search for KEY in ALIST, which should be a list of regexp-value pairs. |
| @@ -2462,12 +2500,17 @@ See also `locale-charset-language-names', `locale-language-names', | |||
| 2462 | (coding-system | 2500 | (coding-system |
| 2463 | (get-locale-coding-system locale))) | 2501 | (get-locale-coding-system locale))) |
| 2464 | 2502 | ||
| 2465 | ;; Give preference to charset-language-name over language-name. | 2503 | (if (consp language-name) |
| 2466 | (if (and charset-language-name | 2504 | ;; locale-language-names specify both lang-env and coding. |
| 2467 | (not | 2505 | ;; But, what specified in locale-preferred-coding-systems |
| 2468 | (equal (get-language-info language-name 'charset) | 2506 | ;; has higher priority. |
| 2469 | (get-language-info charset-language-name 'charset)))) | 2507 | (setq coding-system (or coding-system |
| 2470 | (setq language-name charset-language-name)) | 2508 | (nth 1 language-name)) |
| 2509 | language-name (car language-name)) | ||
| 2510 | ;; Otherwise, if locale is not listed in locale-language-names, | ||
| 2511 | ;; use what listed in locale-charset-language-names. | ||
| 2512 | (if (not language-name) | ||
| 2513 | (setq language-name charset-language-name))) | ||
| 2471 | 2514 | ||
| 2472 | (when language-name | 2515 | (when language-name |
| 2473 | 2516 | ||
| @@ -2478,7 +2521,9 @@ See also `locale-charset-language-names', `locale-language-names', | |||
| 2478 | (setq locale-coding-system | 2521 | (setq locale-coding-system |
| 2479 | (car (get-language-info language-name 'coding-priority)))) | 2522 | (car (get-language-info language-name 'coding-priority)))) |
| 2480 | 2523 | ||
| 2481 | (when coding-system | 2524 | (when (and coding-system |
| 2525 | (not (coding-system-equal coding-system | ||
| 2526 | locale-coding-system))) | ||
| 2482 | (prefer-coding-system coding-system) | 2527 | (prefer-coding-system coding-system) |
| 2483 | (setq locale-coding-system coding-system)))) | 2528 | (setq locale-coding-system coding-system)))) |
| 2484 | 2529 | ||
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 9a5646217ec..1b1d77ff461 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1041,6 +1041,7 @@ a value of `safe-charsets' in PLIST." | |||
| 1041 | (setq coding-category (plist-get plist 'coding-category)) | 1041 | (setq coding-category (plist-get plist 'coding-category)) |
| 1042 | (aset coding-spec coding-spec-plist-idx plist)) | 1042 | (aset coding-spec coding-spec-plist-idx plist)) |
| 1043 | (put coding-system 'coding-system coding-spec) | 1043 | (put coding-system 'coding-system coding-spec) |
| 1044 | (put coding-system 'coding-system-define-form nil) | ||
| 1044 | (put coding-category 'coding-systems | 1045 | (put coding-category 'coding-systems |
| 1045 | (cons coding-system (get coding-category 'coding-systems)))) | 1046 | (cons coding-system (get coding-category 'coding-systems)))) |
| 1046 | 1047 | ||
| @@ -1102,6 +1103,7 @@ a value of `safe-charsets' in PLIST." | |||
| 1102 | (defun define-coding-system-alias (alias coding-system) | 1103 | (defun define-coding-system-alias (alias coding-system) |
| 1103 | "Define ALIAS as an alias for coding system CODING-SYSTEM." | 1104 | "Define ALIAS as an alias for coding system CODING-SYSTEM." |
| 1104 | (put alias 'coding-system (coding-system-spec coding-system)) | 1105 | (put alias 'coding-system (coding-system-spec coding-system)) |
| 1106 | (put alias 'coding-system-define-form nil) | ||
| 1105 | (add-to-coding-system-list alias) | 1107 | (add-to-coding-system-list alias) |
| 1106 | (setq coding-system-alist (cons (list (symbol-name alias)) | 1108 | (setq coding-system-alist (cons (list (symbol-name alias)) |
| 1107 | coding-system-alist)) | 1109 | coding-system-alist)) |
diff --git a/lisp/international/utf-16.el b/lisp/international/utf-16.el index 04c9f682139..0c3d3724ea4 100644 --- a/lisp/international/utf-16.el +++ b/lisp/international/utf-16.el | |||
| @@ -411,7 +411,7 @@ after translation through the translation-table named | |||
| 411 | Others are encoded as U+FFFD.") | 411 | Others are encoded as U+FFFD.") |
| 412 | 412 | ||
| 413 | (define-ccl-program ccl-encode-mule-utf-16le-with-signature | 413 | (define-ccl-program ccl-encode-mule-utf-16le-with-signature |
| 414 | `(4 | 414 | `(2 |
| 415 | ((write #xFF) | 415 | ((write #xFF) |
| 416 | (write #xFE) | 416 | (write #xFE) |
| 417 | ,@utf-16le-encode-loop)) | 417 | ,@utf-16le-encode-loop)) |
| @@ -423,7 +423,7 @@ after translation through the translation-table of name | |||
| 423 | Others are encoded as U+FFFD.") | 423 | Others are encoded as U+FFFD.") |
| 424 | 424 | ||
| 425 | (define-ccl-program ccl-encode-mule-utf-16be-with-signature | 425 | (define-ccl-program ccl-encode-mule-utf-16be-with-signature |
| 426 | `(4 | 426 | `(2 |
| 427 | ((write #xFE) | 427 | ((write #xFE) |
| 428 | (write #xFF) | 428 | (write #xFF) |
| 429 | ,@utf-16be-encode-loop)) | 429 | ,@utf-16be-encode-loop)) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 77208c42ee4..66bf0dc5c20 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -437,9 +437,8 @@ Each set is a vector of the form: | |||
| 437 | (defvar isearch-string "") ; The current search string. | 437 | (defvar isearch-string "") ; The current search string. |
| 438 | (defvar isearch-message "") ; text-char-description version of isearch-string | 438 | (defvar isearch-message "") ; text-char-description version of isearch-string |
| 439 | 439 | ||
| 440 | (defvar isearch-success t) ; Searching is currently successful. | 440 | (defvar isearch-success t) ; Searching is currently successful. |
| 441 | (defvar isearch-invalid-regexp nil) ; Regexp not well formed. | 441 | (defvar isearch-error nil) ; Error message for failed search. |
| 442 | (defvar isearch-within-brackets nil) ; Regexp has unclosed [. | ||
| 443 | (defvar isearch-other-end nil) ; Start (end) of match if forward (backward). | 442 | (defvar isearch-other-end nil) ; Start (end) of match if forward (backward). |
| 444 | (defvar isearch-wrapped nil) ; Searching restarted from the top (bottom). | 443 | (defvar isearch-wrapped nil) ; Searching restarted from the top (bottom). |
| 445 | (defvar isearch-barrier 0) | 444 | (defvar isearch-barrier 0) |
| @@ -640,8 +639,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." | |||
| 640 | isearch-barrier (point) | 639 | isearch-barrier (point) |
| 641 | isearch-adjusted nil | 640 | isearch-adjusted nil |
| 642 | isearch-yank-flag nil | 641 | isearch-yank-flag nil |
| 643 | isearch-invalid-regexp nil | 642 | isearch-error nil |
| 644 | isearch-within-brackets nil | ||
| 645 | isearch-slow-terminal-mode (and (<= baud-rate search-slow-speed) | 643 | isearch-slow-terminal-mode (and (<= baud-rate search-slow-speed) |
| 646 | (> (window-height) | 644 | (> (window-height) |
| 647 | (* 4 | 645 | (* 4 |
| @@ -867,7 +865,7 @@ REGEXP says which ring to use." | |||
| 867 | (defsubst isearch-word-state (frame) | 865 | (defsubst isearch-word-state (frame) |
| 868 | "Return the search-by-word flag in FRAME." | 866 | "Return the search-by-word flag in FRAME." |
| 869 | (aref frame 6)) | 867 | (aref frame 6)) |
| 870 | (defsubst isearch-invalid-regexp-state (frame) | 868 | (defsubst isearch-error-state (frame) |
| 871 | "Return the regexp error message in FRAME, or nil if its regexp is valid." | 869 | "Return the regexp error message in FRAME, or nil if its regexp is valid." |
| 872 | (aref frame 7)) | 870 | (aref frame 7)) |
| 873 | (defsubst isearch-wrapped-state (frame) | 871 | (defsubst isearch-wrapped-state (frame) |
| @@ -876,15 +874,12 @@ REGEXP says which ring to use." | |||
| 876 | (defsubst isearch-barrier-state (frame) | 874 | (defsubst isearch-barrier-state (frame) |
| 877 | "Return the barrier value in FRAME." | 875 | "Return the barrier value in FRAME." |
| 878 | (aref frame 9)) | 876 | (aref frame 9)) |
| 879 | (defsubst isearch-within-brackets-state (frame) | ||
| 880 | "Return the in-character-class flag in FRAME." | ||
| 881 | (aref frame 10)) | ||
| 882 | (defsubst isearch-case-fold-search-state (frame) | 877 | (defsubst isearch-case-fold-search-state (frame) |
| 883 | "Return the case-folding flag in FRAME." | 878 | "Return the case-folding flag in FRAME." |
| 884 | (aref frame 11)) | 879 | (aref frame 10)) |
| 885 | (defsubst isearch-pop-fun-state (frame) | 880 | (defsubst isearch-pop-fun-state (frame) |
| 886 | "Return the function restoring the mode-specific isearch state in FRAME." | 881 | "Return the function restoring the mode-specific isearch state in FRAME." |
| 887 | (aref frame 12)) | 882 | (aref frame 11)) |
| 888 | 883 | ||
| 889 | (defun isearch-top-state () | 884 | (defun isearch-top-state () |
| 890 | (let ((cmd (car isearch-cmds))) | 885 | (let ((cmd (car isearch-cmds))) |
| @@ -894,10 +889,9 @@ REGEXP says which ring to use." | |||
| 894 | isearch-forward (isearch-forward-state cmd) | 889 | isearch-forward (isearch-forward-state cmd) |
| 895 | isearch-other-end (isearch-other-end-state cmd) | 890 | isearch-other-end (isearch-other-end-state cmd) |
| 896 | isearch-word (isearch-word-state cmd) | 891 | isearch-word (isearch-word-state cmd) |
| 897 | isearch-invalid-regexp (isearch-invalid-regexp-state cmd) | 892 | isearch-error (isearch-error-state cmd) |
| 898 | isearch-wrapped (isearch-wrapped-state cmd) | 893 | isearch-wrapped (isearch-wrapped-state cmd) |
| 899 | isearch-barrier (isearch-barrier-state cmd) | 894 | isearch-barrier (isearch-barrier-state cmd) |
| 900 | isearch-within-brackets (isearch-within-brackets-state cmd) | ||
| 901 | isearch-case-fold-search (isearch-case-fold-search-state cmd)) | 895 | isearch-case-fold-search (isearch-case-fold-search-state cmd)) |
| 902 | (if (functionp (isearch-pop-fun-state cmd)) | 896 | (if (functionp (isearch-pop-fun-state cmd)) |
| 903 | (funcall (isearch-pop-fun-state cmd) cmd)) | 897 | (funcall (isearch-pop-fun-state cmd) cmd)) |
| @@ -912,8 +906,8 @@ REGEXP says which ring to use." | |||
| 912 | (cons (vector isearch-string isearch-message (point) | 906 | (cons (vector isearch-string isearch-message (point) |
| 913 | isearch-success isearch-forward isearch-other-end | 907 | isearch-success isearch-forward isearch-other-end |
| 914 | isearch-word | 908 | isearch-word |
| 915 | isearch-invalid-regexp isearch-wrapped isearch-barrier | 909 | isearch-error isearch-wrapped isearch-barrier |
| 916 | isearch-within-brackets isearch-case-fold-search | 910 | isearch-case-fold-search |
| 917 | (if isearch-push-state-function | 911 | (if isearch-push-state-function |
| 918 | (funcall isearch-push-state-function))) | 912 | (funcall isearch-push-state-function))) |
| 919 | isearch-cmds))) | 913 | isearch-cmds))) |
| @@ -976,8 +970,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst | |||
| 976 | (isearch-barrier isearch-barrier) | 970 | (isearch-barrier isearch-barrier) |
| 977 | (isearch-adjusted isearch-adjusted) | 971 | (isearch-adjusted isearch-adjusted) |
| 978 | (isearch-yank-flag isearch-yank-flag) | 972 | (isearch-yank-flag isearch-yank-flag) |
| 979 | (isearch-invalid-regexp isearch-invalid-regexp) | 973 | (isearch-error isearch-error) |
| 980 | (isearch-within-brackets isearch-within-brackets) | ||
| 981 | ;;; Don't bind this. We want isearch-search, below, to set it. | 974 | ;;; Don't bind this. We want isearch-search, below, to set it. |
| 982 | ;;; And the old value won't matter after that. | 975 | ;;; And the old value won't matter after that. |
| 983 | ;;; (isearch-other-end isearch-other-end) | 976 | ;;; (isearch-other-end isearch-other-end) |
| @@ -1124,7 +1117,7 @@ Use `isearch-exit' to quit without signaling." | |||
| 1124 | (isearch-cancel)) | 1117 | (isearch-cancel)) |
| 1125 | ;; If search is failing, or has an incomplete regexp, | 1118 | ;; If search is failing, or has an incomplete regexp, |
| 1126 | ;; rub out until it is once more successful. | 1119 | ;; rub out until it is once more successful. |
| 1127 | (while (or (not isearch-success) isearch-invalid-regexp) | 1120 | (while (or (not isearch-success) isearch-error) |
| 1128 | (isearch-pop-state)) | 1121 | (isearch-pop-state)) |
| 1129 | (isearch-update))) | 1122 | (isearch-update))) |
| 1130 | 1123 | ||
| @@ -1146,10 +1139,11 @@ Use `isearch-exit' to quit without signaling." | |||
| 1146 | ;; If already have what to search for, repeat it. | 1139 | ;; If already have what to search for, repeat it. |
| 1147 | (or isearch-success | 1140 | (or isearch-success |
| 1148 | (progn | 1141 | (progn |
| 1142 | ;; Set isearch-wrapped before calling isearch-wrap-function | ||
| 1143 | (setq isearch-wrapped t) | ||
| 1149 | (if isearch-wrap-function | 1144 | (if isearch-wrap-function |
| 1150 | (funcall isearch-wrap-function) | 1145 | (funcall isearch-wrap-function) |
| 1151 | (goto-char (if isearch-forward (point-min) (point-max)))) | 1146 | (goto-char (if isearch-forward (point-min) (point-max))))))) |
| 1152 | (setq isearch-wrapped t)))) | ||
| 1153 | ;; C-s in reverse or C-r in forward, change direction. | 1147 | ;; C-s in reverse or C-r in forward, change direction. |
| 1154 | (setq isearch-forward (not isearch-forward))) | 1148 | (setq isearch-forward (not isearch-forward))) |
| 1155 | 1149 | ||
| @@ -1384,8 +1378,7 @@ might return the position of the end of the line." | |||
| 1384 | (min isearch-opoint isearch-barrier)))) | 1378 | (min isearch-opoint isearch-barrier)))) |
| 1385 | (progn | 1379 | (progn |
| 1386 | (setq isearch-success t | 1380 | (setq isearch-success t |
| 1387 | isearch-invalid-regexp nil | 1381 | isearch-error nil |
| 1388 | isearch-within-brackets nil | ||
| 1389 | isearch-other-end (match-end 0)) | 1382 | isearch-other-end (match-end 0)) |
| 1390 | (if (and (eq isearch-case-fold-search t) search-upper-case) | 1383 | (if (and (eq isearch-case-fold-search t) search-upper-case) |
| 1391 | (setq isearch-case-fold-search | 1384 | (setq isearch-case-fold-search |
| @@ -1432,8 +1425,8 @@ barrier." | |||
| 1432 | (not want-backslash)) | 1425 | (not want-backslash)) |
| 1433 | ;; We have to check 2 stack frames because the last might be | 1426 | ;; We have to check 2 stack frames because the last might be |
| 1434 | ;; invalid just because of a backslash. | 1427 | ;; invalid just because of a backslash. |
| 1435 | (or (not isearch-invalid-regexp) | 1428 | (or (not isearch-error) |
| 1436 | (not (isearch-invalid-regexp-state (cadr isearch-cmds))) | 1429 | (not (isearch-error-state (cadr isearch-cmds))) |
| 1437 | allow-invalid)) | 1430 | allow-invalid)) |
| 1438 | (if to-barrier | 1431 | (if to-barrier |
| 1439 | (progn (goto-char isearch-barrier) | 1432 | (progn (goto-char isearch-barrier) |
| @@ -1448,7 +1441,7 @@ barrier." | |||
| 1448 | ;; Also skip over postfix operators -- though horrid, | 1441 | ;; Also skip over postfix operators -- though horrid, |
| 1449 | ;; 'ab?\{5,6\}+\{1,2\}*' is perfectly legal. | 1442 | ;; 'ab?\{5,6\}+\{1,2\}*' is perfectly legal. |
| 1450 | (while (and previous | 1443 | (while (and previous |
| 1451 | (or (isearch-invalid-regexp-state frame) | 1444 | (or (isearch-error-state frame) |
| 1452 | (let* ((string (isearch-string-state frame)) | 1445 | (let* ((string (isearch-string-state frame)) |
| 1453 | (lchar (aref string (1- (length string))))) | 1446 | (lchar (aref string (1- (length string))))) |
| 1454 | ;; The operators aren't always operators; check | 1447 | ;; The operators aren't always operators; check |
| @@ -1981,11 +1974,10 @@ If there is no completion possible, say so and continue searching." | |||
| 1981 | ;; If about to search, and previous search regexp was invalid, | 1974 | ;; If about to search, and previous search regexp was invalid, |
| 1982 | ;; check that it still is. If it is valid now, | 1975 | ;; check that it still is. If it is valid now, |
| 1983 | ;; let the message we display while searching say that it is valid. | 1976 | ;; let the message we display while searching say that it is valid. |
| 1984 | (and isearch-invalid-regexp ellipsis | 1977 | (and isearch-error ellipsis |
| 1985 | (condition-case () | 1978 | (condition-case () |
| 1986 | (progn (re-search-forward isearch-string (point) t) | 1979 | (progn (re-search-forward isearch-string (point) t) |
| 1987 | (setq isearch-invalid-regexp nil | 1980 | (setq isearch-error nil)) |
| 1988 | isearch-within-brackets nil)) | ||
| 1989 | (error nil))) | 1981 | (error nil))) |
| 1990 | ;; If currently failing, display no ellipsis. | 1982 | ;; If currently failing, display no ellipsis. |
| 1991 | (or isearch-success (setq ellipsis nil)) | 1983 | (or isearch-success (setq ellipsis nil)) |
| @@ -2011,8 +2003,8 @@ If there is no completion possible, say so and continue searching." | |||
| 2011 | 2003 | ||
| 2012 | (defun isearch-message-suffix (&optional c-q-hack ellipsis) | 2004 | (defun isearch-message-suffix (&optional c-q-hack ellipsis) |
| 2013 | (concat (if c-q-hack "^Q" "") | 2005 | (concat (if c-q-hack "^Q" "") |
| 2014 | (if isearch-invalid-regexp | 2006 | (if isearch-error |
| 2015 | (concat " [" isearch-invalid-regexp "]") | 2007 | (concat " [" isearch-error "]") |
| 2016 | ""))) | 2008 | ""))) |
| 2017 | 2009 | ||
| 2018 | 2010 | ||
| @@ -2049,8 +2041,7 @@ Can be changed via `isearch-search-fun-function' for special needs." | |||
| 2049 | (case-fold-search isearch-case-fold-search) | 2041 | (case-fold-search isearch-case-fold-search) |
| 2050 | (search-spaces-regexp search-whitespace-regexp) | 2042 | (search-spaces-regexp search-whitespace-regexp) |
| 2051 | (retry t)) | 2043 | (retry t)) |
| 2052 | (if isearch-regexp (setq isearch-invalid-regexp nil)) | 2044 | (setq isearch-error nil) |
| 2053 | (setq isearch-within-brackets nil) | ||
| 2054 | (while retry | 2045 | (while retry |
| 2055 | (setq isearch-success | 2046 | (setq isearch-success |
| 2056 | (funcall | 2047 | (funcall |
| @@ -2074,16 +2065,19 @@ Can be changed via `isearch-search-fun-function' for special needs." | |||
| 2074 | (setq isearch-success nil)) | 2065 | (setq isearch-success nil)) |
| 2075 | 2066 | ||
| 2076 | (invalid-regexp | 2067 | (invalid-regexp |
| 2077 | (setq isearch-invalid-regexp (car (cdr lossage))) | 2068 | (setq isearch-error (car (cdr lossage))) |
| 2078 | (setq isearch-within-brackets (string-match "\\`Unmatched \\[" | ||
| 2079 | isearch-invalid-regexp)) | ||
| 2080 | (if (string-match | 2069 | (if (string-match |
| 2081 | "\\`Premature \\|\\`Unmatched \\|\\`Invalid " | 2070 | "\\`Premature \\|\\`Unmatched \\|\\`Invalid " |
| 2082 | isearch-invalid-regexp) | 2071 | isearch-error) |
| 2083 | (setq isearch-invalid-regexp "incomplete input"))) | 2072 | (setq isearch-error "incomplete input"))) |
| 2073 | |||
| 2074 | (search-failed | ||
| 2075 | (setq isearch-success nil) | ||
| 2076 | (setq isearch-error (nth 2 lossage))) | ||
| 2077 | |||
| 2084 | (error | 2078 | (error |
| 2085 | ;; stack overflow in regexp search. | 2079 | ;; stack overflow in regexp search. |
| 2086 | (setq isearch-invalid-regexp (format "%s" lossage)))) | 2080 | (setq isearch-error (format "%s" lossage)))) |
| 2087 | 2081 | ||
| 2088 | (if isearch-success | 2082 | (if isearch-success |
| 2089 | nil | 2083 | nil |
| @@ -2315,7 +2309,7 @@ since they have special meaning in a regexp." | |||
| 2315 | ;; `isearch-word' and `isearch-regexp'; | 2309 | ;; `isearch-word' and `isearch-regexp'; |
| 2316 | ;; - the direction of the current search is expected to be given by | 2310 | ;; - the direction of the current search is expected to be given by |
| 2317 | ;; `isearch-forward'; | 2311 | ;; `isearch-forward'; |
| 2318 | ;; - the variable `isearch-invalid-regexp' is expected to be true | 2312 | ;; - the variable `isearch-error' is expected to be true |
| 2319 | ;; iff `isearch-string' is an invalid regexp. | 2313 | ;; iff `isearch-string' is an invalid regexp. |
| 2320 | 2314 | ||
| 2321 | (defvar isearch-lazy-highlight-overlays nil) | 2315 | (defvar isearch-lazy-highlight-overlays nil) |
| @@ -2369,7 +2363,7 @@ by other Emacs features." | |||
| 2369 | isearch-lazy-highlight-window-end)))) | 2363 | isearch-lazy-highlight-window-end)))) |
| 2370 | ;; something important did indeed change | 2364 | ;; something important did indeed change |
| 2371 | (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays | 2365 | (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays |
| 2372 | (when (not isearch-invalid-regexp) | 2366 | (when (not isearch-error) |
| 2373 | (setq isearch-lazy-highlight-start-limit beg | 2367 | (setq isearch-lazy-highlight-start-limit beg |
| 2374 | isearch-lazy-highlight-end-limit end) | 2368 | isearch-lazy-highlight-end-limit end) |
| 2375 | (setq isearch-lazy-highlight-window (selected-window) | 2369 | (setq isearch-lazy-highlight-window (selected-window) |
| @@ -2391,18 +2385,20 @@ by other Emacs features." | |||
| 2391 | Attempt to do the search exactly the way the pending isearch would." | 2385 | Attempt to do the search exactly the way the pending isearch would." |
| 2392 | (let ((case-fold-search isearch-case-fold-search) | 2386 | (let ((case-fold-search isearch-case-fold-search) |
| 2393 | (search-spaces-regexp search-whitespace-regexp)) | 2387 | (search-spaces-regexp search-whitespace-regexp)) |
| 2394 | (funcall (isearch-search-fun) | 2388 | (condition-case nil |
| 2395 | isearch-string | 2389 | (funcall (isearch-search-fun) |
| 2396 | (if isearch-forward | 2390 | isearch-string |
| 2397 | (min (or isearch-lazy-highlight-end-limit (point-max)) | 2391 | (if isearch-forward |
| 2398 | (if isearch-lazy-highlight-wrapped | 2392 | (min (or isearch-lazy-highlight-end-limit (point-max)) |
| 2399 | isearch-lazy-highlight-start | 2393 | (if isearch-lazy-highlight-wrapped |
| 2400 | (window-end))) | 2394 | isearch-lazy-highlight-start |
| 2401 | (max (or isearch-lazy-highlight-start-limit (point-min)) | 2395 | (window-end))) |
| 2402 | (if isearch-lazy-highlight-wrapped | 2396 | (max (or isearch-lazy-highlight-start-limit (point-min)) |
| 2403 | isearch-lazy-highlight-end | 2397 | (if isearch-lazy-highlight-wrapped |
| 2404 | (window-start)))) | 2398 | isearch-lazy-highlight-end |
| 2405 | t))) | 2399 | (window-start)))) |
| 2400 | t) | ||
| 2401 | (error nil)))) | ||
| 2406 | 2402 | ||
| 2407 | (defun isearch-lazy-highlight-update () | 2403 | (defun isearch-lazy-highlight-update () |
| 2408 | "Update highlighting of other matches for current search." | 2404 | "Update highlighting of other matches for current search." |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 78c8e976269..9b5708d6503 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -815,8 +815,9 @@ the effect of `browse-url-new-window-flag'. | |||
| 815 | When called non-interactively, optional second argument NEW-WINDOW is | 815 | When called non-interactively, optional second argument NEW-WINDOW is |
| 816 | used instead of `browse-url-new-window-flag'. | 816 | used instead of `browse-url-new-window-flag'. |
| 817 | 817 | ||
| 818 | The order attempted is gnome-moz-remote, Mozilla, Galeon, Netscape, | 818 | The order attempted is gnome-moz-remote, Mozilla, Galeon, |
| 819 | Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3." | 819 | Konqueror, Netscape, Mosaic, IXI Mosaic, Lynx in an xterm, MMM, |
| 820 | and then W3." | ||
| 820 | (apply | 821 | (apply |
| 821 | (cond | 822 | (cond |
| 822 | ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) | 823 | ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) |
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el index a4eda95e23e..2cbb00b324c 100644 --- a/lisp/pcvs-util.el +++ b/lisp/pcvs-util.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- | 1 | ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2001, 2004 Free Software Foundation, Inc. | 4 | ;; 2000, 2001, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 7 | ;; Keywords: pcl-cvs | 7 | ;; Keywords: pcl-cvs |
| @@ -205,8 +205,8 @@ It understands elisp style quoting within STRING such that | |||
| 205 | The SEPARATOR regexp defaults to \"\\s-+\"." | 205 | The SEPARATOR regexp defaults to \"\\s-+\"." |
| 206 | (let ((sep (or separator "\\s-+")) | 206 | (let ((sep (or separator "\\s-+")) |
| 207 | (i (string-match "[\"]" string))) | 207 | (i (string-match "[\"]" string))) |
| 208 | (if (null i) (split-string string sep) ; no quoting: easy | 208 | (if (null i) (split-string string sep t) ; no quoting: easy |
| 209 | (append (unless (eq i 0) (split-string (substring string 0 i) sep)) | 209 | (append (unless (eq i 0) (split-string (substring string 0 i) sep t)) |
| 210 | (let ((rfs (read-from-string string i))) | 210 | (let ((rfs (read-from-string string i))) |
| 211 | (cons (car rfs) | 211 | (cons (car rfs) |
| 212 | (cvs-string->strings (substring string (cdr rfs)) | 212 | (cvs-string->strings (substring string (cdr rfs)) |
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 2c0016dcc47..b00de07e50f 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el | |||
| @@ -1704,8 +1704,6 @@ Signal an error if there is no backup file." | |||
| 1704 | (message "Retrieving revision %s... Done" rev) | 1704 | (message "Retrieving revision %s... Done" rev) |
| 1705 | (current-buffer)))))) | 1705 | (current-buffer)))))) |
| 1706 | 1706 | ||
| 1707 | (eval-and-compile (autoload 'smerge-ediff "smerge-mode")) | ||
| 1708 | |||
| 1709 | ;; FIXME: The user should be able to specify ancestor/head/backup and we should | 1707 | ;; FIXME: The user should be able to specify ancestor/head/backup and we should |
| 1710 | ;; provide sensible defaults when merge info is unavailable (rather than rely | 1708 | ;; provide sensible defaults when merge info is unavailable (rather than rely |
| 1711 | ;; on smerge-ediff). Also provide sane defaults for need-merge files. | 1709 | ;; on smerge-ediff). Also provide sane defaults for need-merge files. |
diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 23e7939f47a..dcbf3bc2610 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el | |||
| @@ -80,9 +80,11 @@ | |||
| 80 | ;;; Place the character CHAR at position VPOS, HPOS in the current buffer. | 80 | ;;; Place the character CHAR at position VPOS, HPOS in the current buffer. |
| 81 | (defun animate-place-char (char vpos hpos) | 81 | (defun animate-place-char (char vpos hpos) |
| 82 | (goto-char (window-start)) | 82 | (goto-char (window-start)) |
| 83 | (let ((next-line-add-newlines t)) | 83 | (let (abbrev-mode) |
| 84 | (dotimes (i vpos) | 84 | (dotimes (i vpos) |
| 85 | (next-line 1))) | 85 | (end-of-line) |
| 86 | (if (= (forward-line 1) 1) | ||
| 87 | (insert "\n")))) | ||
| 86 | (beginning-of-line) | 88 | (beginning-of-line) |
| 87 | (move-to-column (floor hpos) t) | 89 | (move-to-column (floor hpos) t) |
| 88 | (unless (eolp) (delete-char 1)) | 90 | (unless (eolp) (delete-char 1)) |
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 861c3bbb8c6..81ed7780a64 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -284,13 +284,13 @@ See `imenu-generic-expression' for details." | |||
| 284 | 284 | ||
| 285 | (defvar dcl-mode-syntax-table nil | 285 | (defvar dcl-mode-syntax-table nil |
| 286 | "Syntax table used in DCL-buffers.") | 286 | "Syntax table used in DCL-buffers.") |
| 287 | (if dcl-mode-syntax-table | 287 | (unless dcl-mode-syntax-table |
| 288 | () | ||
| 289 | (setq dcl-mode-syntax-table (make-syntax-table)) | 288 | (setq dcl-mode-syntax-table (make-syntax-table)) |
| 290 | (modify-syntax-entry ?! "<" dcl-mode-syntax-table) ; comment start | 289 | (modify-syntax-entry ?! "<" dcl-mode-syntax-table) ; comment start |
| 291 | (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end | 290 | (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end |
| 292 | (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ... | 291 | (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ... |
| 293 | (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair | 292 | (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair |
| 293 | (modify-syntax-entry ?\\ "_" dcl-mode-syntax-table) ; not an escape | ||
| 294 | ) | 294 | ) |
| 295 | 295 | ||
| 296 | 296 | ||
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 4fc259cae51..86d0bfaaf4b 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -351,7 +351,7 @@ detailed description of this mode. | |||
| 351 | ,(nth 1 var) nil)))) | 351 | ,(nth 1 var) nil)))) |
| 352 | (setq gdb-var-changed t))) | 352 | (setq gdb-var-changed t))) |
| 353 | (if (re-search-forward "Undefined command" nil t) | 353 | (if (re-search-forward "Undefined command" nil t) |
| 354 | (message "Watching expressions requires gdb 6.0 onwards") | 354 | (message-box "Watching expressions requires gdb 6.0 onwards") |
| 355 | (message "No symbol %s in current context." expr))))) | 355 | (message "No symbol %s in current context." expr))))) |
| 356 | 356 | ||
| 357 | (defun gdb-var-evaluate-expression-handler (varnum changed) | 357 | (defun gdb-var-evaluate-expression-handler (varnum changed) |
| @@ -2119,13 +2119,8 @@ Put in buffer and place breakpoint icon." | |||
| 2119 | (push (cons bptno (match-string 0)) gdb-location-list)) | 2119 | (push (cons bptno (match-string 0)) gdb-location-list)) |
| 2120 | (gdb-resync) | 2120 | (gdb-resync) |
| 2121 | (push (cons bptno "File not found") gdb-location-list) | 2121 | (push (cons bptno "File not found") gdb-location-list) |
| 2122 | (if (eq window-system 'x) | 2122 | (message-box "Cannot find source file for breakpoint location.\n\ |
| 2123 | (x-popup-dialog | 2123 | Add directory to search path for source files using the GDB command, dir.") |
| 2124 | t '("Cannot find source file for breakpoint location.\n\ | ||
| 2125 | Add directory to search path for source files using the GDB command, dir." | ||
| 2126 | ("Ok" . nil))) | ||
| 2127 | (message "Cannot find source file for breakpoint location.\n\ | ||
| 2128 | Add directory to search path for source files using the GDB command, dir.")) | ||
| 2129 | (throw 'file-not-found nil)) | 2124 | (throw 'file-not-found nil)) |
| 2130 | (with-current-buffer | 2125 | (with-current-buffer |
| 2131 | (find-file-noselect (match-string 0)) | 2126 | (find-file-noselect (match-string 0)) |
diff --git a/lisp/simple.el b/lisp/simple.el index d0d5f9f0170..99e826a6d18 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3181,8 +3181,9 @@ commands which are sensitive to the Transient Mark mode." | |||
| 3181 | :version "21.1" | 3181 | :version "21.1" |
| 3182 | :group 'editing-basics) | 3182 | :group 'editing-basics) |
| 3183 | 3183 | ||
| 3184 | (defun next-line (&optional arg) | 3184 | (defun next-line (&optional arg try-vscroll) |
| 3185 | "Move cursor vertically down ARG lines. | 3185 | "Move cursor vertically down ARG lines. |
| 3186 | Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. | ||
| 3186 | If there is no character in the target line exactly under the current column, | 3187 | If there is no character in the target line exactly under the current column, |
| 3187 | the cursor is positioned after the character in that line which spans this | 3188 | the cursor is positioned after the character in that line which spans this |
| 3188 | column, or at the end of the line if it is not long enough. | 3189 | column, or at the end of the line if it is not long enough. |
| @@ -3201,7 +3202,7 @@ when there is no goal column. | |||
| 3201 | If you are thinking of using this in a Lisp program, consider | 3202 | If you are thinking of using this in a Lisp program, consider |
| 3202 | using `forward-line' instead. It is usually easier to use | 3203 | using `forward-line' instead. It is usually easier to use |
| 3203 | and more reliable (no dependence on goal column, etc.)." | 3204 | and more reliable (no dependence on goal column, etc.)." |
| 3204 | (interactive "p") | 3205 | (interactive "p\np") |
| 3205 | (or arg (setq arg 1)) | 3206 | (or arg (setq arg 1)) |
| 3206 | (if (and next-line-add-newlines (= arg 1)) | 3207 | (if (and next-line-add-newlines (= arg 1)) |
| 3207 | (if (save-excursion (end-of-line) (eobp)) | 3208 | (if (save-excursion (end-of-line) (eobp)) |
| @@ -3209,16 +3210,17 @@ and more reliable (no dependence on goal column, etc.)." | |||
| 3209 | (let ((abbrev-mode nil)) | 3210 | (let ((abbrev-mode nil)) |
| 3210 | (end-of-line) | 3211 | (end-of-line) |
| 3211 | (insert "\n")) | 3212 | (insert "\n")) |
| 3212 | (line-move arg nil nil t)) | 3213 | (line-move arg nil nil try-vscroll)) |
| 3213 | (if (interactive-p) | 3214 | (if (interactive-p) |
| 3214 | (condition-case nil | 3215 | (condition-case nil |
| 3215 | (line-move arg nil nil t) | 3216 | (line-move arg nil nil try-vscroll) |
| 3216 | ((beginning-of-buffer end-of-buffer) (ding))) | 3217 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3217 | (line-move arg nil nil t))) | 3218 | (line-move arg nil nil try-vscroll))) |
| 3218 | nil) | 3219 | nil) |
| 3219 | 3220 | ||
| 3220 | (defun previous-line (&optional arg) | 3221 | (defun previous-line (&optional arg try-vscroll) |
| 3221 | "Move cursor vertically up ARG lines. | 3222 | "Move cursor vertically up ARG lines. |
| 3223 | Interactively, vscroll tall lines if `auto-window-vscroll' is enabled. | ||
| 3222 | If there is no character in the target line exactly over the current column, | 3224 | If there is no character in the target line exactly over the current column, |
| 3223 | the cursor is positioned after the character in that line which spans this | 3225 | the cursor is positioned after the character in that line which spans this |
| 3224 | column, or at the end of the line if it is not long enough. | 3226 | column, or at the end of the line if it is not long enough. |
| @@ -3233,13 +3235,13 @@ when there is no goal column. | |||
| 3233 | If you are thinking of using this in a Lisp program, consider using | 3235 | If you are thinking of using this in a Lisp program, consider using |
| 3234 | `forward-line' with a negative argument instead. It is usually easier | 3236 | `forward-line' with a negative argument instead. It is usually easier |
| 3235 | to use and more reliable (no dependence on goal column, etc.)." | 3237 | to use and more reliable (no dependence on goal column, etc.)." |
| 3236 | (interactive "p") | 3238 | (interactive "p\np") |
| 3237 | (or arg (setq arg 1)) | 3239 | (or arg (setq arg 1)) |
| 3238 | (if (interactive-p) | 3240 | (if (interactive-p) |
| 3239 | (condition-case nil | 3241 | (condition-case nil |
| 3240 | (line-move (- arg) nil nil t) | 3242 | (line-move (- arg) nil nil try-vscroll) |
| 3241 | ((beginning-of-buffer end-of-buffer) (ding))) | 3243 | ((beginning-of-buffer end-of-buffer) (ding))) |
| 3242 | (line-move (- arg) nil nil t)) | 3244 | (line-move (- arg) nil nil try-vscroll)) |
| 3243 | nil) | 3245 | nil) |
| 3244 | 3246 | ||
| 3245 | (defcustom track-eol nil | 3247 | (defcustom track-eol nil |
| @@ -3278,8 +3280,11 @@ Outline mode sets this." | |||
| 3278 | (assq prop buffer-invisibility-spec))))) | 3280 | (assq prop buffer-invisibility-spec))))) |
| 3279 | 3281 | ||
| 3280 | ;; Perform vertical scrolling of tall images if necessary. | 3282 | ;; Perform vertical scrolling of tall images if necessary. |
| 3283 | ;; Don't vscroll in a keyboard macro. | ||
| 3281 | (defun line-move (arg &optional noerror to-end try-vscroll) | 3284 | (defun line-move (arg &optional noerror to-end try-vscroll) |
| 3282 | (if (and auto-window-vscroll try-vscroll) | 3285 | (if (and auto-window-vscroll try-vscroll |
| 3286 | (not defining-kbd-macro) | ||
| 3287 | (not executing-kbd-macro)) | ||
| 3283 | (let ((forward (> arg 0)) | 3288 | (let ((forward (> arg 0)) |
| 3284 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) | 3289 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) |
| 3285 | (if (and (consp part) | 3290 | (if (and (consp part) |
| @@ -5068,6 +5073,7 @@ the front of the list of recently selected ones." | |||
| 5068 | (defcustom normal-erase-is-backspace | 5073 | (defcustom normal-erase-is-backspace |
| 5069 | (and (not noninteractive) | 5074 | (and (not noninteractive) |
| 5070 | (or (memq system-type '(ms-dos windows-nt)) | 5075 | (or (memq system-type '(ms-dos windows-nt)) |
| 5076 | (eq initial-window-system 'mac) | ||
| 5071 | (and (memq initial-window-system '(x)) | 5077 | (and (memq initial-window-system '(x)) |
| 5072 | (fboundp 'x-backspace-delete-keys-p) | 5078 | (fboundp 'x-backspace-delete-keys-p) |
| 5073 | (x-backspace-delete-keys-p)) | 5079 | (x-backspace-delete-keys-p)) |
diff --git a/lisp/subr.el b/lisp/subr.el index b318f224918..27abec6781a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -37,27 +37,6 @@ Each element of this list holds the arguments to one call to `defcustom'.") | |||
| 37 | (cons arguments custom-declare-variable-list))) | 37 | (cons arguments custom-declare-variable-list))) |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | (defun macro-declaration-function (macro decl) | ||
| 41 | "Process a declaration found in a macro definition. | ||
| 42 | This is set as the value of the variable `macro-declaration-function'. | ||
| 43 | MACRO is the name of the macro being defined. | ||
| 44 | DECL is a list `(declare ...)' containing the declarations. | ||
| 45 | The return value of this function is not used." | ||
| 46 | ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons. | ||
| 47 | (let (d) | ||
| 48 | ;; Ignore the first element of `decl' (it's always `declare'). | ||
| 49 | (while (setq decl (cdr decl)) | ||
| 50 | (setq d (car decl)) | ||
| 51 | (cond ((and (consp d) (eq (car d) 'indent)) | ||
| 52 | (put macro 'lisp-indent-function (car (cdr d)))) | ||
| 53 | ((and (consp d) (eq (car d) 'debug)) | ||
| 54 | (put macro 'edebug-form-spec (car (cdr d)))) | ||
| 55 | (t | ||
| 56 | (message "Unknown declaration %s" d)))))) | ||
| 57 | |||
| 58 | (setq macro-declaration-function 'macro-declaration-function) | ||
| 59 | |||
| 60 | |||
| 61 | ;;;; Lisp language features. | 40 | ;;;; Lisp language features. |
| 62 | 41 | ||
| 63 | (defalias 'not 'null) | 42 | (defalias 'not 'null) |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index d43264f275e..69438c349a4 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1010,20 +1010,29 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") | |||
| 1010 | 1010 | ||
| 1011 | ;; Map certain keypad keys into ASCII characters | 1011 | ;; Map certain keypad keys into ASCII characters |
| 1012 | ;; that people usually expect. | 1012 | ;; that people usually expect. |
| 1013 | (define-key function-key-map [return] [?\C-m]) | ||
| 1014 | (define-key function-key-map [M-return] [?\M-\C-m]) | ||
| 1015 | (define-key function-key-map [tab] [?\t]) | ||
| 1016 | (define-key function-key-map [M-tab] [?\M-\t]) | ||
| 1017 | (define-key function-key-map [backspace] [?\d]) | 1013 | (define-key function-key-map [backspace] [?\d]) |
| 1018 | (define-key function-key-map [M-backspace] [?\M-\d]) | 1014 | (define-key function-key-map [delete] [?\d]) |
| 1015 | (define-key function-key-map [tab] [?\t]) | ||
| 1016 | (define-key function-key-map [linefeed] [?\n]) | ||
| 1017 | (define-key function-key-map [clear] [?\C-l]) | ||
| 1018 | (define-key function-key-map [return] [?\C-m]) | ||
| 1019 | (define-key function-key-map [escape] [?\e]) | 1019 | (define-key function-key-map [escape] [?\e]) |
| 1020 | (define-key function-key-map [M-backspace] [?\M-\d]) | ||
| 1021 | (define-key function-key-map [M-delete] [?\M-\d]) | ||
| 1022 | (define-key function-key-map [M-tab] [?\M-\t]) | ||
| 1023 | (define-key function-key-map [M-linefeed] [?\M-\n]) | ||
| 1024 | (define-key function-key-map [M-clear] [?\M-\C-l]) | ||
| 1025 | (define-key function-key-map [M-return] [?\M-\C-m]) | ||
| 1020 | (define-key function-key-map [M-escape] [?\M-\e]) | 1026 | (define-key function-key-map [M-escape] [?\M-\e]) |
| 1021 | 1027 | ||
| 1022 | ;; These tell read-char how to convert | 1028 | ;; These tell read-char how to convert |
| 1023 | ;; these special chars to ASCII. | 1029 | ;; these special chars to ASCII. |
| 1024 | (put 'return 'ascii-character ?\C-m) | ||
| 1025 | (put 'tab 'ascii-character ?\t) | ||
| 1026 | (put 'backspace 'ascii-character ?\d) | 1030 | (put 'backspace 'ascii-character ?\d) |
| 1031 | (put 'delete 'ascii-character ?\d) | ||
| 1032 | (put 'tab 'ascii-character ?\t) | ||
| 1033 | (put 'linefeed 'ascii-character ?\n) | ||
| 1034 | (put 'clear 'ascii-character ?\C-l) | ||
| 1035 | (put 'return 'ascii-character ?\C-m) | ||
| 1027 | (put 'escape 'ascii-character ?\e) | 1036 | (put 'escape 'ascii-character ?\e) |
| 1028 | 1037 | ||
| 1029 | 1038 | ||
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index dfd471a87c4..ccd7f21f502 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; fill.el --- fill commands for Emacs | 1 | ;;; fill.el --- fill commands for Emacs -*- coding: iso-2022-7bit -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 | 3 | ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| @@ -87,7 +87,7 @@ reinserts the fill prefix in each resulting line." | |||
| 87 | (defcustom adaptive-fill-regexp | 87 | (defcustom adaptive-fill-regexp |
| 88 | ;; Added `!' for doxygen comments starting with `//!' or `/*!'. | 88 | ;; Added `!' for doxygen comments starting with `//!' or `/*!'. |
| 89 | ;; Added `%' for TeX comments. | 89 | ;; Added `%' for TeX comments. |
| 90 | (purecopy "[ \t]*\\([-!|#%;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*") | 90 | (purecopy "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*") |
| 91 | "*Regexp to match text at start of line that constitutes indentation. | 91 | "*Regexp to match text at start of line that constitutes indentation. |
| 92 | If Adaptive Fill mode is enabled, a prefix matching this pattern | 92 | If Adaptive Fill mode is enabled, a prefix matching this pattern |
| 93 | on the first and second lines of a paragraph is used as the | 93 | on the first and second lines of a paragraph is used as the |
| @@ -304,12 +304,12 @@ after an opening paren or just before a closing paren or a punctuation | |||
| 304 | mark such as `?' or `:'. It is common in French writing to put a space | 304 | mark such as `?' or `:'. It is common in French writing to put a space |
| 305 | at such places, which would normally allow breaking the line at those | 305 | at such places, which would normally allow breaking the line at those |
| 306 | places." | 306 | places." |
| 307 | (or (looking-at "[ \t]*[])}»?!;:-]") | 307 | (or (looking-at "[ \t]*[])},A;,b;(B?!;:-]") |
| 308 | (save-excursion | 308 | (save-excursion |
| 309 | (skip-chars-backward " \t") | 309 | (skip-chars-backward " \t") |
| 310 | (unless (bolp) | 310 | (unless (bolp) |
| 311 | (backward-char 1) | 311 | (backward-char 1) |
| 312 | (or (looking-at "[([{«]") | 312 | (or (looking-at "[([{,A+,b+(B]") |
| 313 | ;; Don't cut right after a single-letter word. | 313 | ;; Don't cut right after a single-letter word. |
| 314 | (and (memq (preceding-char) '(?\t ?\ )) | 314 | (and (memq (preceding-char) '(?\t ?\ )) |
| 315 | (eq (char-syntax (following-char)) ?w))))))) | 315 | (eq (char-syntax (following-char)) ?w))))))) |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 2a84d584634..38f69bd2250 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1406,6 +1406,14 @@ This allows it to improve the suggestion list based on actual mispellings." | |||
| 1406 | (setq more-lines (= 0 (forward-line)))))))))))))) | 1406 | (setq more-lines (= 0 (forward-line)))))))))))))) |
| 1407 | 1407 | ||
| 1408 | 1408 | ||
| 1409 | ;; Insert WORD while translating Latin characters to the equivalent | ||
| 1410 | ;; characters that is supported by buffer-file-coding-system. | ||
| 1411 | |||
| 1412 | (defun ispell-insert-word (word) | ||
| 1413 | (let ((pos (point))) | ||
| 1414 | (insert word) | ||
| 1415 | (if (char-table-p translation-table-for-input) | ||
| 1416 | (translate-region pos (point) translation-table-for-input)))) | ||
| 1409 | 1417 | ||
| 1410 | ;;;###autoload | 1418 | ;;;###autoload |
| 1411 | (defun ispell-word (&optional following quietly continue) | 1419 | (defun ispell-word (&optional following quietly continue) |
| @@ -1504,7 +1512,7 @@ quit spell session exited." | |||
| 1504 | (progn | 1512 | (progn |
| 1505 | (delete-region start end) | 1513 | (delete-region start end) |
| 1506 | (setq start (point)) | 1514 | (setq start (point)) |
| 1507 | (insert new-word) | 1515 | (ispell-insert-word new-word) |
| 1508 | (setq end (point)))) | 1516 | (setq end (point)))) |
| 1509 | (if (not (atom replace)) ;recheck spelling of replacement | 1517 | (if (not (atom replace)) ;recheck spelling of replacement |
| 1510 | (progn | 1518 | (progn |
| @@ -2883,7 +2891,7 @@ Returns the sum shift due to changes in word replacements." | |||
| 2883 | (delete-region (point) (+ word-len (point))) | 2891 | (delete-region (point) (+ word-len (point))) |
| 2884 | (if (not (listp replace)) | 2892 | (if (not (listp replace)) |
| 2885 | (progn | 2893 | (progn |
| 2886 | (insert replace) ; insert dictionary word | 2894 | (ispell-insert-word replace) ; insert dictionary word |
| 2887 | (ispell-send-replacement (car poss) replace) | 2895 | (ispell-send-replacement (car poss) replace) |
| 2888 | (setq accept-list (cons replace accept-list))) | 2896 | (setq accept-list (cons replace accept-list))) |
| 2889 | (let ((replace-word (car replace))) | 2897 | (let ((replace-word (car replace))) |
| @@ -3052,7 +3060,7 @@ Standard ispell choices are then available." | |||
| 3052 | (setq word (if (atom replacement) replacement (car replacement)) | 3060 | (setq word (if (atom replacement) replacement (car replacement)) |
| 3053 | cursor-location (+ (- (length word) (- end start)) | 3061 | cursor-location (+ (- (length word) (- end start)) |
| 3054 | cursor-location)) | 3062 | cursor-location)) |
| 3055 | (insert word) | 3063 | (ispell-insert-word word) |
| 3056 | (if (not (atom replacement)) ; recheck spelling of replacement. | 3064 | (if (not (atom replacement)) ; recheck spelling of replacement. |
| 3057 | (progn | 3065 | (progn |
| 3058 | (goto-char cursor-location) | 3066 | (goto-char cursor-location) |
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 694903b1fb6..6fcf5869143 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -350,7 +350,7 @@ an optional alist of possible values." | |||
| 350 | "*When non-nil, tag insertion functions will be XML-compliant. | 350 | "*When non-nil, tag insertion functions will be XML-compliant. |
| 351 | If this variable is customized, the custom value is used always. | 351 | If this variable is customized, the custom value is used always. |
| 352 | Otherwise, it is set to be buffer-local when the file has | 352 | Otherwise, it is set to be buffer-local when the file has |
| 353 | a DOCTYPE or an XML declaration." | 353 | a DOCTYPE or an XML declaration." |
| 354 | :type 'boolean | 354 | :type 'boolean |
| 355 | :version "22.1" | 355 | :version "22.1" |
| 356 | :group 'sgml) | 356 | :group 'sgml) |
| @@ -629,7 +629,7 @@ skeleton-transformation RET upcase RET, or put this in your `.emacs': | |||
| 629 | (backward-char) | 629 | (backward-char) |
| 630 | '(("") " [ " _ " ]]")) | 630 | '(("") " [ " _ " ]]")) |
| 631 | ((and (eq v2 t) sgml-xml-mode (member ,str sgml-empty-tags)) | 631 | ((and (eq v2 t) sgml-xml-mode (member ,str sgml-empty-tags)) |
| 632 | '(("") -1 "/>")) | 632 | '(("") -1 " />")) |
| 633 | ((or (and (eq v2 t) (not sgml-xml-mode)) (string-match "^[/!?]" ,str)) | 633 | ((or (and (eq v2 t) (not sgml-xml-mode)) (string-match "^[/!?]" ,str)) |
| 634 | nil) | 634 | nil) |
| 635 | ((symbolp v2) | 635 | ((symbolp v2) |
| @@ -818,7 +818,8 @@ With prefix argument ARG, repeat this ARG times." | |||
| 818 | (goto-char close) | 818 | (goto-char close) |
| 819 | (kill-sexp 1)) | 819 | (kill-sexp 1)) |
| 820 | (setq open (point)) | 820 | (setq open (point)) |
| 821 | (when (sgml-skip-tag-forward 1) | 821 | (when (and (sgml-skip-tag-forward 1) |
| 822 | (not (looking-back "/>"))) | ||
| 822 | (kill-sexp -1))) | 823 | (kill-sexp -1))) |
| 823 | ;; Delete any resulting empty line. If we didn't kill-sexp, | 824 | ;; Delete any resulting empty line. If we didn't kill-sexp, |
| 824 | ;; this *should* do nothing, because we're right after the tag. | 825 | ;; this *should* do nothing, because we're right after the tag. |
| @@ -1572,7 +1573,7 @@ This takes effect when first loading the library.") | |||
| 1572 | ("dir" ,@list) | 1573 | ("dir" ,@list) |
| 1573 | ("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7) | 1574 | ("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7) |
| 1574 | ("form" (\n _ \n "<input type=\"submit\" value=\"\"" | 1575 | ("form" (\n _ \n "<input type=\"submit\" value=\"\"" |
| 1575 | (if sgml-xml-mode "/>" ">")) | 1576 | (if sgml-xml-mode " />" ">")) |
| 1576 | ("action" ,@(cdr href)) ("method" ("get") ("post"))) | 1577 | ("action" ,@(cdr href)) ("method" ("get") ("post"))) |
| 1577 | ("h1" ,@align) | 1578 | ("h1" ,@align) |
| 1578 | ("h2" ,@align) | 1579 | ("h2" ,@align) |
| @@ -1891,13 +1892,15 @@ Can be used as a value for `html-mode-hook'." | |||
| 1891 | (define-skeleton html-href-anchor | 1892 | (define-skeleton html-href-anchor |
| 1892 | "HTML anchor tag with href attribute." | 1893 | "HTML anchor tag with href attribute." |
| 1893 | "URL: " | 1894 | "URL: " |
| 1894 | '(setq input "http:") | 1895 | ;; '(setq input "http:") |
| 1895 | "<a href=\"" str "\">" _ "</a>") | 1896 | "<a href=\"" str "\">" _ "</a>") |
| 1896 | 1897 | ||
| 1897 | (define-skeleton html-name-anchor | 1898 | (define-skeleton html-name-anchor |
| 1898 | "HTML anchor tag with name attribute." | 1899 | "HTML anchor tag with name attribute." |
| 1899 | "Name: " | 1900 | "Name: " |
| 1900 | "<a name=\"" str "\">" _ "</a>") | 1901 | "<a name=\"" str "\"" |
| 1902 | (if sgml-xml-mode (concat " id=\"" str "\"")) | ||
| 1903 | ">" _ "</a>") | ||
| 1901 | 1904 | ||
| 1902 | (define-skeleton html-headline-1 | 1905 | (define-skeleton html-headline-1 |
| 1903 | "HTML level 1 headline tags." | 1906 | "HTML level 1 headline tags." |
| @@ -1932,18 +1935,18 @@ Can be used as a value for `html-mode-hook'." | |||
| 1932 | (define-skeleton html-horizontal-rule | 1935 | (define-skeleton html-horizontal-rule |
| 1933 | "HTML horizontal rule tag." | 1936 | "HTML horizontal rule tag." |
| 1934 | nil | 1937 | nil |
| 1935 | (if sgml-xml-mode "<hr/>" "<hr>") \n) | 1938 | (if sgml-xml-mode "<hr />" "<hr>") \n) |
| 1936 | 1939 | ||
| 1937 | (define-skeleton html-image | 1940 | (define-skeleton html-image |
| 1938 | "HTML image tag." | 1941 | "HTML image tag." |
| 1939 | nil | 1942 | "Image URL: " |
| 1940 | "<img src=\"" _ "\"" | 1943 | "<img src=\"" str "\" alt=\"" _ "\"" |
| 1941 | (if sgml-xml-mode "/>" ">")) | 1944 | (if sgml-xml-mode " />" ">")) |
| 1942 | 1945 | ||
| 1943 | (define-skeleton html-line | 1946 | (define-skeleton html-line |
| 1944 | "HTML line break tag." | 1947 | "HTML line break tag." |
| 1945 | nil | 1948 | nil |
| 1946 | (if sgml-xml-mode "<br/>" "<br>") \n) | 1949 | (if sgml-xml-mode "<br />" "<br>") \n) |
| 1947 | 1950 | ||
| 1948 | (define-skeleton html-ordered-list | 1951 | (define-skeleton html-ordered-list |
| 1949 | "HTML ordered list tags." | 1952 | "HTML ordered list tags." |
| @@ -1969,7 +1972,7 @@ Can be used as a value for `html-mode-hook'." | |||
| 1969 | "HTML paragraph tag." | 1972 | "HTML paragraph tag." |
| 1970 | nil | 1973 | nil |
| 1971 | (if (bolp) nil ?\n) | 1974 | (if (bolp) nil ?\n) |
| 1972 | \n "<p>" _ (if sgml-xml-mode "</p>")) | 1975 | "<p>" _ (if sgml-xml-mode "</p>")) |
| 1973 | 1976 | ||
| 1974 | (define-skeleton html-checkboxes | 1977 | (define-skeleton html-checkboxes |
| 1975 | "Group of connected checkbox inputs." | 1978 | "Group of connected checkbox inputs." |
| @@ -1981,12 +1984,13 @@ Can be used as a value for `html-mode-hook'." | |||
| 1981 | "\" name=\"" (or v1 (setq v1 (skeleton-read "Name: "))) | 1984 | "\" name=\"" (or v1 (setq v1 (skeleton-read "Name: "))) |
| 1982 | "\" value=\"" str ?\" | 1985 | "\" value=\"" str ?\" |
| 1983 | (when (y-or-n-p "Set \"checked\" attribute? ") | 1986 | (when (y-or-n-p "Set \"checked\" attribute? ") |
| 1984 | (funcall skeleton-transformation " checked")) | 1987 | (funcall skeleton-transformation |
| 1985 | (if sgml-xml-mode "/>" ">") | 1988 | (if sgml-xml-mode " checked=\"checked\"" " checked"))) |
| 1989 | (if sgml-xml-mode " />" ">") | ||
| 1986 | (skeleton-read "Text: " (capitalize str)) | 1990 | (skeleton-read "Text: " (capitalize str)) |
| 1987 | (or v2 (setq v2 (if (y-or-n-p "Newline after text? ") | 1991 | (or v2 (setq v2 (if (y-or-n-p "Newline after text? ") |
| 1988 | (funcall skeleton-transformation | 1992 | (funcall skeleton-transformation |
| 1989 | (if sgml-xml-mode "<br/>" "<br>")) | 1993 | (if sgml-xml-mode "<br />" "<br>")) |
| 1990 | ""))) | 1994 | ""))) |
| 1991 | \n)) | 1995 | \n)) |
| 1992 | 1996 | ||
| @@ -2000,12 +2004,13 @@ Can be used as a value for `html-mode-hook'." | |||
| 2000 | "\" name=\"" (or (car v2) (setcar v2 (skeleton-read "Name: "))) | 2004 | "\" name=\"" (or (car v2) (setcar v2 (skeleton-read "Name: "))) |
| 2001 | "\" value=\"" str ?\" | 2005 | "\" value=\"" str ?\" |
| 2002 | (when (and (not v1) (setq v1 (y-or-n-p "Set \"checked\" attribute? "))) | 2006 | (when (and (not v1) (setq v1 (y-or-n-p "Set \"checked\" attribute? "))) |
| 2003 | (funcall skeleton-transformation " checked")) | 2007 | (funcall skeleton-transformation |
| 2004 | (if sgml-xml-mode "/>" ">") | 2008 | (if sgml-xml-mode " checked=\"checked\"" " checked"))) |
| 2009 | (if sgml-xml-mode " />" ">") | ||
| 2005 | (skeleton-read "Text: " (capitalize str)) | 2010 | (skeleton-read "Text: " (capitalize str)) |
| 2006 | (or (cdr v2) (setcdr v2 (if (y-or-n-p "Newline after text? ") | 2011 | (or (cdr v2) (setcdr v2 (if (y-or-n-p "Newline after text? ") |
| 2007 | (funcall skeleton-transformation | 2012 | (funcall skeleton-transformation |
| 2008 | (if sgml-xml-mode "<br/>" "<br>")) | 2013 | (if sgml-xml-mode "<br />" "<br>")) |
| 2009 | ""))) | 2014 | ""))) |
| 2010 | \n)) | 2015 | \n)) |
| 2011 | 2016 | ||
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index c4ac57eac95..e4cab1beba1 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; tooltip.el --- show tooltip windows | 1 | ;;; tooltip.el --- show tooltip windows |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 | 3 | ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Gerd Moellmann <gerd@acm.org> | 6 | ;; Author: Gerd Moellmann <gerd@acm.org> |
| @@ -41,8 +41,6 @@ | |||
| 41 | :version "21.1" | 41 | :version "21.1" |
| 42 | :tag "Tool Tips") | 42 | :tag "Tool Tips") |
| 43 | 43 | ||
| 44 | (defvar tooltip-mode) | ||
| 45 | |||
| 46 | (defcustom tooltip-delay 0.7 | 44 | (defcustom tooltip-delay 0.7 |
| 47 | "Seconds to wait before displaying a tooltip the first time." | 45 | "Seconds to wait before displaying a tooltip the first time." |
| 48 | :tag "Delay" | 46 | :tag "Delay" |
| @@ -122,11 +120,9 @@ position to pop up the tooltip." | |||
| 122 | "*Non-nil means show tooltips in GUD sessions." | 120 | "*Non-nil means show tooltips in GUD sessions." |
| 123 | :type 'boolean | 121 | :type 'boolean |
| 124 | :tag "GUD" | 122 | :tag "GUD" |
| 125 | :set #'(lambda (symbol on) | ||
| 126 | (setq tooltip-gud-tips-p on)) | ||
| 127 | :group 'tooltip) | 123 | :group 'tooltip) |
| 128 | 124 | ||
| 129 | (defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode) | 125 | (defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode fortran-mode) |
| 130 | "List of modes for which to enable GUD tips." | 126 | "List of modes for which to enable GUD tips." |
| 131 | :type 'sexp | 127 | :type 'sexp |
| 132 | :tag "GUD modes" | 128 | :tag "GUD modes" |
| @@ -187,26 +183,23 @@ This might return nil if the event did not occur over a buffer." | |||
| 187 | ;; would be accompanied by a full redisplay. | 183 | ;; would be accompanied by a full redisplay. |
| 188 | 184 | ||
| 189 | ;;;###autoload | 185 | ;;;###autoload |
| 190 | (defun tooltip-mode (&optional arg) | 186 | (define-minor-mode tooltip-mode |
| 191 | "Mode for tooltip display. | 187 | "Toggle Tooltip display. |
| 192 | With ARG, turn tooltip mode on if and only if ARG is positive." | 188 | With ARG, turn tooltip mode on if and only if ARG is positive." |
| 193 | (interactive "P") | 189 | :global t |
| 194 | (unless (fboundp 'x-show-tip) | 190 | :group 'tooltip |
| 191 | (unless (or (null tooltip-mode) (fboundp 'x-show-tip)) | ||
| 195 | (error "Sorry, tooltips are not yet available on this system")) | 192 | (error "Sorry, tooltips are not yet available on this system")) |
| 196 | (let* ((on (if arg | 193 | (let ((hook-fn (if tooltip-mode 'add-hook 'remove-hook))) |
| 197 | (> (prefix-numeric-value arg) 0) | ||
| 198 | (not tooltip-mode))) | ||
| 199 | (hook-fn (if on 'add-hook 'remove-hook))) | ||
| 200 | (setq tooltip-mode on) | ||
| 201 | (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode) | 194 | (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode) |
| 202 | (tooltip-activate-mouse-motions-if-enabled) | 195 | (tooltip-activate-mouse-motions-if-enabled) |
| 203 | (funcall hook-fn 'pre-command-hook 'tooltip-hide) | 196 | (funcall hook-fn 'pre-command-hook 'tooltip-hide) |
| 204 | (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips) | 197 | (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips) |
| 205 | (funcall hook-fn 'tooltip-hook 'tooltip-help-tips) | 198 | (funcall hook-fn 'tooltip-hook 'tooltip-help-tips) |
| 206 | (setq show-help-function (if on 'tooltip-show-help-function nil)) | 199 | (setq show-help-function (if tooltip-mode 'tooltip-show-help-function nil)) |
| 207 | ;; `ignore' is the default binding for mouse movements. | 200 | ;; `ignore' is the default binding for mouse movements. |
| 208 | (define-key global-map [mouse-movement] | 201 | (define-key global-map [mouse-movement] |
| 209 | (if on 'tooltip-mouse-motion 'ignore)))) | 202 | (if tooltip-mode 'tooltip-mouse-motion 'ignore)))) |
| 210 | 203 | ||
| 211 | 204 | ||
| 212 | ;;; Timeout for tooltip display | 205 | ;;; Timeout for tooltip display |
| @@ -246,16 +239,14 @@ With ARG, turn tooltip mode on if and only if ARG is positive." | |||
| 246 | (defun tooltip-activate-mouse-motions-if-enabled () | 239 | (defun tooltip-activate-mouse-motions-if-enabled () |
| 247 | "Reconsider for all buffers whether mouse motion events are desired." | 240 | "Reconsider for all buffers whether mouse motion events are desired." |
| 248 | (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled) | 241 | (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled) |
| 249 | (let ((buffers (buffer-list))) | 242 | (dolist (buffer (buffer-list)) |
| 250 | (save-excursion | 243 | (save-excursion |
| 251 | (while buffers | 244 | (set-buffer buffer) |
| 252 | (set-buffer (car buffers)) | 245 | (if (and tooltip-mode |
| 253 | (if (and tooltip-mode | 246 | tooltip-gud-tips-p |
| 254 | tooltip-gud-tips-p | 247 | (memq major-mode tooltip-gud-modes)) |
| 255 | (memq major-mode tooltip-gud-modes)) | 248 | (tooltip-activate-mouse-motions t) |
| 256 | (tooltip-activate-mouse-motions t) | 249 | (tooltip-activate-mouse-motions nil))))) |
| 257 | (tooltip-activate-mouse-motions nil)) | ||
| 258 | (setq buffers (cdr buffers)))))) | ||
| 259 | 250 | ||
| 260 | (defvar tooltip-mouse-motions-active nil | 251 | (defvar tooltip-mouse-motions-active nil |
| 261 | "Locally t in a buffer if tooltip processing of mouse motion is enabled.") | 252 | "Locally t in a buffer if tooltip processing of mouse motion is enabled.") |
| @@ -441,12 +432,11 @@ region for the tip window to be shown. If tooltip-gud-dereference is t, | |||
| 441 | add a `*' in front of the printed expression. | 432 | add a `*' in front of the printed expression. |
| 442 | 433 | ||
| 443 | This function must return nil if it doesn't handle EVENT." | 434 | This function must return nil if it doesn't handle EVENT." |
| 444 | (let (gud-buffer process) | 435 | (let (process) |
| 445 | (when (and (eventp event) | 436 | (when (and (eventp event) |
| 446 | tooltip-gud-tips-p | 437 | tooltip-gud-tips-p |
| 447 | (boundp 'gud-comint-buffer) | 438 | (boundp 'gud-comint-buffer) |
| 448 | (setq gud-buffer gud-comint-buffer) | 439 | (setq process (get-buffer-process gud-comint-buffer)) |
| 449 | (setq process (get-buffer-process gud-buffer)) | ||
| 450 | (posn-point (event-end event)) | 440 | (posn-point (event-end event)) |
| 451 | (progn (setq tooltip-gud-event event) | 441 | (progn (setq tooltip-gud-event event) |
| 452 | (eval (cons 'and tooltip-gud-display)))) | 442 | (eval (cons 'and tooltip-gud-display)))) |
| @@ -464,9 +454,11 @@ This function must return nil if it doesn't handle EVENT." | |||
| 464 | expr))))))) | 454 | expr))))))) |
| 465 | 455 | ||
| 466 | (defun gdb-tooltip-print () | 456 | (defun gdb-tooltip-print () |
| 467 | (tooltip-show | 457 | (tooltip-show |
| 468 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) | 458 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) |
| 469 | (buffer-string)))) | 459 | (let ((string (buffer-string))) |
| 460 | ;; remove newline for tooltip-use-echo-area | ||
| 461 | (substring string 0 (- (length string) 1)))))) | ||
| 470 | 462 | ||
| 471 | 463 | ||
| 472 | ;;; Tooltip help. | 464 | ;;; Tooltip help. |
| @@ -520,23 +512,6 @@ Value is non-nil if this function handled the tip." | |||
| 520 | (tooltip-show tooltip-help-message) | 512 | (tooltip-show tooltip-help-message) |
| 521 | t)) | 513 | t)) |
| 522 | 514 | ||
| 523 | |||
| 524 | ;;; Do this after all functions have been defined that are called from | ||
| 525 | ;;; `tooltip-mode'. The actual default value of `tooltip-mode' is set | ||
| 526 | ;;; in startup.el. | ||
| 527 | |||
| 528 | ;;;###autoload | ||
| 529 | (defcustom tooltip-mode nil | ||
| 530 | "Non-nil if Tooltip mode is enabled. | ||
| 531 | Setting this variable directly does not take effect; | ||
| 532 | use either \\[customize] or the function `tooltip-mode'." | ||
| 533 | :set (lambda (symbol value) | ||
| 534 | (tooltip-mode (or value 0))) | ||
| 535 | :initialize 'custom-initialize-default | ||
| 536 | :type 'boolean | ||
| 537 | :require 'tooltip | ||
| 538 | :group 'tooltip) | ||
| 539 | |||
| 540 | (provide 'tooltip) | 515 | (provide 'tooltip) |
| 541 | 516 | ||
| 542 | ;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f | 517 | ;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index a9dd276796a..9cb76017e39 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,64 @@ | |||
| 1 | 2005-03-15 Lute Kamstra <lute@gnu.org> | ||
| 2 | |||
| 3 | * edebug.texi (Instrumenting Macro Calls): Fix typos. | ||
| 4 | |||
| 5 | 2005-03-08 Kim F. Storm <storm@cua.dk> | ||
| 6 | |||
| 7 | * display.texi (Specified Space): Property :width is support on | ||
| 8 | non-graphic terminals, :height is not. | ||
| 9 | |||
| 10 | 2005-03-07 Richard M. Stallman <rms@gnu.org> | ||
| 11 | |||
| 12 | * display.texi (Overlay Arrow, Fringe Bitmaps, Customizing Bitmaps): | ||
| 13 | Now subnodes of Fringes. | ||
| 14 | (Overlay Arrow): Document overlay-arrow-variable-list. | ||
| 15 | (Fringe Size/Pos): New node, broken out of Fringes. | ||
| 16 | (Display): Explain clearing vs redisplay better. | ||
| 17 | (Truncation): Clarify use of bitmaps. | ||
| 18 | (The Echo Area): Clarify the uses of the echo area. | ||
| 19 | Add max-mini-window-height. | ||
| 20 | (Progress): Clarify. | ||
| 21 | (Invisible Text): Explain that main loop moves point out. | ||
| 22 | (Selective Display): Say "hidden", not "invisible". | ||
| 23 | (Managing Overlays): Moved up. Describe relation to Undo here. | ||
| 24 | (Overlay Properties): Clarify intro. | ||
| 25 | (Finding Overlays): Explain return values when nothing found. | ||
| 26 | (Width): truncate-string-to-width has added arg. | ||
| 27 | (Displaying Faces): Clarify and update mode line face handling. | ||
| 28 | (Face Functions): Minor cleanup. | ||
| 29 | (Conditional Display): Merged into Other Display Specs. | ||
| 30 | (Pixel Specification, Other Display Specs): Minor cleanups. | ||
| 31 | (Images, Image Descriptors): Minor cleanups. | ||
| 32 | (GIF Images): Patents have expired. | ||
| 33 | (Showing Images): Explain default text for insert-image. | ||
| 34 | (Manipulating Button Types): Merged into Manipulating Buttons. | ||
| 35 | (Making Buttons): Explain return values. | ||
| 36 | (Button Buffer Commands): Add xref. | ||
| 37 | (Inverse Video): Update mode-line-inverse-video. | ||
| 38 | (Display Table Format): Clarify. | ||
| 39 | (Active Display Table): Give defaults for window-display-table. | ||
| 40 | |||
| 41 | * calendar.texi (Calendar Customizing): calendar-holiday-marker | ||
| 42 | and calendar-today-marker are strings, not chars. | ||
| 43 | (Holiday Customizing): Minor fix. | ||
| 44 | |||
| 45 | * nonascii.texi (Text Representations): Clarify position-bytes. | ||
| 46 | (Character Sets): Add list-charset-chars. | ||
| 47 | (Scanning Charsets): Add charset-after. | ||
| 48 | (Encoding and I/O): Minor fix. | ||
| 49 | |||
| 50 | * internals.texi (Writing Emacs Primitives): Update `or' example. | ||
| 51 | Update limit on # args of subr. | ||
| 52 | |||
| 53 | * edebug.texi (Using Edebug): Arrow is in fringe. | ||
| 54 | (Instrumenting): Arg to eval-defun works without loading edebug. | ||
| 55 | (Edebug Execution Modes): Add xref. | ||
| 56 | |||
| 57 | * customize.texi (Common Keywords): Clarify :require. | ||
| 58 | Mention :version here. | ||
| 59 | (Variable Definitions, Group Definitions): Not here. | ||
| 60 | (Variable Definitions): Clarify symbol arg to :initialize and :set fns. | ||
| 61 | |||
| 1 | 2005-03-06 Richard M. Stallman <rms@gnu.org> | 62 | 2005-03-06 Richard M. Stallman <rms@gnu.org> |
| 2 | 63 | ||
| 3 | * windows.texi (Vertical Scrolling): Get rid of "Emacs 21". | 64 | * windows.texi (Vertical Scrolling): Get rid of "Emacs 21". |
| @@ -14,9 +75,9 @@ | |||
| 14 | * os.texi (Translating Input): Replace flow-control example | 75 | * os.texi (Translating Input): Replace flow-control example |
| 15 | with a less obsolete example that uses `keyboard-translate'. | 76 | with a less obsolete example that uses `keyboard-translate'. |
| 16 | 77 | ||
| 17 | * objects.texi (Hash Table Type, Circular Objects): | 78 | * objects.texi (Hash Table Type, Circular Objects): |
| 18 | Get rid of "Emacs 21". | 79 | Get rid of "Emacs 21". |
| 19 | 80 | ||
| 20 | * modes.texi (Mode Line Format): Get rid of "Emacs 21". | 81 | * modes.texi (Mode Line Format): Get rid of "Emacs 21". |
| 21 | (Mode Line Data, Properties in Mode, Header Lines): Likewise. | 82 | (Mode Line Data, Properties in Mode, Header Lines): Likewise. |
| 22 | 83 | ||
diff --git a/lispref/calendar.texi b/lispref/calendar.texi index 8c5ca54221c..5c63d6f9591 100644 --- a/lispref/calendar.texi +++ b/lispref/calendar.texi | |||
| @@ -62,12 +62,12 @@ asterisk (@samp{*}). | |||
| 62 | @vindex calendar-holiday-marker | 62 | @vindex calendar-holiday-marker |
| 63 | @vindex diary-entry-marker | 63 | @vindex diary-entry-marker |
| 64 | The variable @code{calendar-holiday-marker} specifies how to mark a | 64 | The variable @code{calendar-holiday-marker} specifies how to mark a |
| 65 | date as being a holiday. Its value may be a character to insert next to | 65 | date as being a holiday. Its value may be a single-character string |
| 66 | the date, or a face name to use for displaying the date. Likewise, the | 66 | to insert next to the date, or a face name to use for displaying the |
| 67 | variable @code{diary-entry-marker} specifies how to mark a date that has | 67 | date. Likewise, the variable @code{diary-entry-marker} specifies how |
| 68 | diary entries. The calendar creates faces named @code{holiday-face} and | 68 | to mark a date that has diary entries. The calendar creates faces |
| 69 | @code{diary-face} for these purposes; those symbols are the default | 69 | named @code{holiday-face} and @code{diary-face} for these purposes; |
| 70 | values of these variables. | 70 | those symbols are the default values of these variables. |
| 71 | 71 | ||
| 72 | @vindex calendar-load-hook | 72 | @vindex calendar-load-hook |
| 73 | The variable @code{calendar-load-hook} is a normal hook run when the | 73 | The variable @code{calendar-load-hook} is a normal hook run when the |
| @@ -103,11 +103,11 @@ changing its face or by adding an asterisk. Here's how to use it: | |||
| 103 | 103 | ||
| 104 | @noindent | 104 | @noindent |
| 105 | @vindex calendar-today-marker | 105 | @vindex calendar-today-marker |
| 106 | The variable @code{calendar-today-marker} specifies how to mark today's | 106 | The variable @code{calendar-today-marker} specifies how to mark |
| 107 | date. Its value should be a character to insert next to the date or a | 107 | today's date. Its value should be a single-character string to insert |
| 108 | face name to use for displaying the date. A face named | 108 | next to the date or a face name to use for displaying the date. A |
| 109 | @code{calendar-today-face} is provided for this purpose; that symbol is | 109 | face named @code{calendar-today-face} is provided for this purpose; |
| 110 | the default for this variable. | 110 | that symbol is the default for this variable. |
| 111 | 111 | ||
| 112 | @vindex today-invisible-calendar-hook | 112 | @vindex today-invisible-calendar-hook |
| 113 | @noindent | 113 | @noindent |
| @@ -130,7 +130,7 @@ You can customize these lists of holidays to your own needs, adding or | |||
| 130 | deleting holidays. The lists of holidays that Emacs uses are for | 130 | deleting holidays. The lists of holidays that Emacs uses are for |
| 131 | general holidays (@code{general-holidays}), local holidays | 131 | general holidays (@code{general-holidays}), local holidays |
| 132 | (@code{local-holidays}), Christian holidays (@code{christian-holidays}), | 132 | (@code{local-holidays}), Christian holidays (@code{christian-holidays}), |
| 133 | Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Moslem) | 133 | Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim) |
| 134 | holidays (@code{islamic-holidays}), and other holidays | 134 | holidays (@code{islamic-holidays}), and other holidays |
| 135 | (@code{other-holidays}). | 135 | (@code{other-holidays}). |
| 136 | 136 | ||
diff --git a/lispref/customize.texi b/lispref/customize.texi index 225a487af9b..a1a61ab6b09 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi | |||
| @@ -84,13 +84,17 @@ item. Loading is done with @code{load-library}, and only if the file is | |||
| 84 | not already loaded. | 84 | not already loaded. |
| 85 | 85 | ||
| 86 | @item :require @var{feature} | 86 | @item :require @var{feature} |
| 87 | Require feature @var{feature} (a symbol) when installing a value for | 87 | Execute @code{(require '@var{feature})} when your saved customizations |
| 88 | this item (an option or a face) that was saved using the customization | 88 | set the value of this item. @var{feature} should be a symbol. |
| 89 | feature. This is done by calling @code{require}. | ||
| 90 | 89 | ||
| 91 | The most common reason to use @code{:require} is when a variable enables | 90 | The most common reason to use @code{:require} is when a variable enables |
| 92 | a feature such as a minor mode, and just setting the variable won't have | 91 | a feature such as a minor mode, and just setting the variable won't have |
| 93 | any effect unless the code which implements the mode is loaded. | 92 | any effect unless the code which implements the mode is loaded. |
| 93 | |||
| 94 | @item :version @var{version} | ||
| 95 | This option specifies that the item was first introduced in Emacs | ||
| 96 | version @var{version}, or that its default value was changed in that | ||
| 97 | version. The value @var{version} must be a string. | ||
| 94 | @end table | 98 | @end table |
| 95 | 99 | ||
| 96 | @node Group Definitions | 100 | @node Group Definitions |
| @@ -130,17 +134,9 @@ is a symbol, and @var{widget} is a widget type for editing that symbol. | |||
| 130 | Useful widgets are @code{custom-variable} for a variable, | 134 | Useful widgets are @code{custom-variable} for a variable, |
| 131 | @code{custom-face} for a face, and @code{custom-group} for a group. | 135 | @code{custom-face} for a face, and @code{custom-group} for a group. |
| 132 | 136 | ||
| 133 | When a new group is introduced into Emacs, use this keyword in | 137 | When you introduce a new group into Emacs, use the @code{:version} |
| 134 | @code{defgroup}: | 138 | keyword in the @code{defgroup}; then you need not use it for |
| 135 | 139 | the individual members of the group. | |
| 136 | @table @code | ||
| 137 | @item :version @var{version} | ||
| 138 | This option specifies that the group was first introduced in Emacs | ||
| 139 | version @var{version}. The value @var{version} must be a string. | ||
| 140 | @end table | ||
| 141 | |||
| 142 | Tag the group with a version like this when it is introduced, rather | ||
| 143 | than the individual members (@pxref{Variable Definitions}). | ||
| 144 | 140 | ||
| 145 | In addition to the common keywords (@pxref{Common Keywords}), you can | 141 | In addition to the common keywords (@pxref{Common Keywords}), you can |
| 146 | also use this keyword in @code{defgroup}: | 142 | also use this keyword in @code{defgroup}: |
| @@ -223,26 +219,13 @@ This is meaningful only for certain types, currently including | |||
| 223 | @code{hook}, @code{plist} and @code{alist}. See the definition of the | 219 | @code{hook}, @code{plist} and @code{alist}. See the definition of the |
| 224 | individual types for a description of how to use @code{:options}. | 220 | individual types for a description of how to use @code{:options}. |
| 225 | 221 | ||
| 226 | @item :version @var{version} | ||
| 227 | This option specifies that the variable was first introduced, or its | ||
| 228 | default value was changed, in Emacs version @var{version}. The value | ||
| 229 | @var{version} must be a string. For example, | ||
| 230 | |||
| 231 | @example | ||
| 232 | (defcustom foo-max 34 | ||
| 233 | "*Maximum number of foo's allowed." | ||
| 234 | :type 'integer | ||
| 235 | :group 'foo | ||
| 236 | :version "20.3") | ||
| 237 | @end example | ||
| 238 | |||
| 239 | @item :set @var{setfunction} | 222 | @item :set @var{setfunction} |
| 240 | Specify @var{setfunction} as the way to change the value of this option. | 223 | Specify @var{setfunction} as the way to change the value of this |
| 241 | The function @var{setfunction} should take two arguments, a symbol and | 224 | option. The function @var{setfunction} should take two arguments, a |
| 242 | the new value, and should do whatever is necessary to update the value | 225 | symbol (the option name) and the new value, and should do whatever is |
| 243 | properly for this option (which may not mean simply setting the option | 226 | necessary to update the value properly for this option (which may not |
| 244 | as a Lisp variable). The default for @var{setfunction} is | 227 | mean simply setting the option as a Lisp variable). The default for |
| 245 | @code{set-default}. | 228 | @var{setfunction} is @code{set-default}. |
| 246 | 229 | ||
| 247 | @item :get @var{getfunction} | 230 | @item :get @var{getfunction} |
| 248 | Specify @var{getfunction} as the way to extract the value of this | 231 | Specify @var{getfunction} as the way to extract the value of this |
| @@ -258,10 +241,10 @@ is almost surely a mistake to specify @code{getfunction} for a value | |||
| 258 | that really is stored in a Lisp variable. | 241 | that really is stored in a Lisp variable. |
| 259 | 242 | ||
| 260 | @item :initialize @var{function} | 243 | @item :initialize @var{function} |
| 261 | @var{function} should be a function used to initialize the variable when | 244 | @var{function} should be a function used to initialize the variable |
| 262 | the @code{defcustom} is evaluated. It should take two arguments, the | 245 | when the @code{defcustom} is evaluated. It should take two arguments, |
| 263 | symbol and value. Here are some predefined functions meant for use in | 246 | the option name (a symbol) and the value. Here are some predefined |
| 264 | this way: | 247 | functions meant for use in this way: |
| 265 | 248 | ||
| 266 | @table @code | 249 | @table @code |
| 267 | @item custom-initialize-set | 250 | @item custom-initialize-set |
diff --git a/lispref/display.texi b/lispref/display.texi index de2ab26cf96..43329f35ced 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -19,7 +19,6 @@ that Emacs presents to the user. | |||
| 19 | * Progress:: Informing user about progress of a long operation. | 19 | * Progress:: Informing user about progress of a long operation. |
| 20 | * Invisible Text:: Hiding part of the buffer text. | 20 | * Invisible Text:: Hiding part of the buffer text. |
| 21 | * Selective Display:: Hiding part of the buffer text (the old way). | 21 | * Selective Display:: Hiding part of the buffer text (the old way). |
| 22 | * Overlay Arrow:: Display of an arrow to indicate position. | ||
| 23 | * Temporary Displays:: Displays that go away automatically. | 22 | * Temporary Displays:: Displays that go away automatically. |
| 24 | * Overlays:: Use overlays to highlight parts of the buffer. | 23 | * Overlays:: Use overlays to highlight parts of the buffer. |
| 25 | * Width:: How wide a character or string is on the screen. | 24 | * Width:: How wide a character or string is on the screen. |
| @@ -27,8 +26,6 @@ that Emacs presents to the user. | |||
| 27 | * Faces:: A face defines a graphics style for text characters: | 26 | * Faces:: A face defines a graphics style for text characters: |
| 28 | font, colors, etc. | 27 | font, colors, etc. |
| 29 | * Fringes:: Controlling window fringes. | 28 | * Fringes:: Controlling window fringes. |
| 30 | * Fringe Bitmaps:: Displaying bitmaps in the window fringes. | ||
| 31 | * Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes. | ||
| 32 | * Scroll Bars:: Controlling vertical scroll bars. | 29 | * Scroll Bars:: Controlling vertical scroll bars. |
| 33 | * Pointer Shape:: Controlling the mouse pointer shape. | 30 | * Pointer Shape:: Controlling the mouse pointer shape. |
| 34 | * Display Property:: Enabling special display features. | 31 | * Display Property:: Enabling special display features. |
| @@ -45,29 +42,30 @@ that Emacs presents to the user. | |||
| 45 | @node Refresh Screen | 42 | @node Refresh Screen |
| 46 | @section Refreshing the Screen | 43 | @section Refreshing the Screen |
| 47 | 44 | ||
| 48 | The function @code{redraw-frame} redisplays the entire contents of a | 45 | The function @code{redraw-frame} clears and redisplays the entire |
| 49 | given frame (@pxref{Frames}). | 46 | contents of a given frame (@pxref{Frames}). This is useful if the |
| 47 | screen is corrupted. | ||
| 50 | 48 | ||
| 51 | @c Emacs 19 feature | 49 | @c Emacs 19 feature |
| 52 | @defun redraw-frame frame | 50 | @defun redraw-frame frame |
| 53 | This function clears and redisplays frame @var{frame}. | 51 | This function clears and redisplays frame @var{frame}. |
| 54 | @end defun | 52 | @end defun |
| 55 | 53 | ||
| 56 | Even more powerful is @code{redraw-display}: | 54 | Even more powerful is @code{redraw-display}: |
| 57 | 55 | ||
| 58 | @deffn Command redraw-display | 56 | @deffn Command redraw-display |
| 59 | This function clears and redisplays all visible frames. | 57 | This function clears and redisplays all visible frames. |
| 60 | @end deffn | 58 | @end deffn |
| 61 | 59 | ||
| 62 | This function forces certain windows to be redisplayed | 60 | This function calls for redisplay of certain windows, the next time |
| 63 | but does not clear them. | 61 | redisplay is done, but does not clear them first. |
| 64 | 62 | ||
| 65 | @defun force-window-update object | 63 | @defun force-window-update &optional object |
| 66 | This function forces redisplay of some or all windows. If | 64 | This function forces redisplay of some or all windows. If |
| 67 | @var{object} is a window, it forces redisplay of that window. If | 65 | @var{object} is a window, it forces redisplay of that window. If |
| 68 | @var{object} is a buffer or buffer name, it forces redisplay of all | 66 | @var{object} is a buffer or buffer name, it forces redisplay of all |
| 69 | windows displaying that buffer. If @var{object} is @code{nil}, it | 67 | windows displaying that buffer. If @var{object} is @code{nil} (or |
| 70 | forces redisplay of all windows. | 68 | omitted), it forces redisplay of all windows. |
| 71 | @end defun | 69 | @end defun |
| 72 | 70 | ||
| 73 | Processing user input takes absolute priority over redisplay. If you | 71 | Processing user input takes absolute priority over redisplay. If you |
| @@ -130,8 +128,8 @@ the rightmost column indicates a line that ``wraps'' onto the next line, | |||
| 130 | which is also called @dfn{continuing} the line. (The display table can | 128 | which is also called @dfn{continuing} the line. (The display table can |
| 131 | specify alternative indicators; see @ref{Display Tables}.) | 129 | specify alternative indicators; see @ref{Display Tables}.) |
| 132 | 130 | ||
| 133 | On a windowed display, the @samp{$} and @samp{\} indicators are | 131 | On a window system display, the @samp{$} and @samp{\} indicators are |
| 134 | replaced with graphics bitmaps displayed in the window fringes | 132 | replaced with arrow images displayed in the window fringes |
| 135 | (@pxref{Fringes}). | 133 | (@pxref{Fringes}). |
| 136 | 134 | ||
| 137 | Note that continuation is different from filling; continuation happens | 135 | Note that continuation is different from filling; continuation happens |
| @@ -164,9 +162,6 @@ If it is non-@code{nil}, these lines are truncated; otherwise, | |||
| 164 | When horizontal scrolling (@pxref{Horizontal Scrolling}) is in use in | 162 | When horizontal scrolling (@pxref{Horizontal Scrolling}) is in use in |
| 165 | a window, that forces truncation. | 163 | a window, that forces truncation. |
| 166 | 164 | ||
| 167 | You can override the glyphs that indicate continuation or truncation | ||
| 168 | using the display table; see @ref{Display Tables}. | ||
| 169 | |||
| 170 | If your buffer contains @emph{very} long lines, and you use | 165 | If your buffer contains @emph{very} long lines, and you use |
| 171 | continuation to display them, just thinking about them can make Emacs | 166 | continuation to display them, just thinking about them can make Emacs |
| 172 | redisplay slow. The column computation and indentation functions also | 167 | redisplay slow. The column computation and indentation functions also |
| @@ -189,14 +184,14 @@ This variable is automatically buffer-local in every buffer. | |||
| 189 | @cindex error display | 184 | @cindex error display |
| 190 | @cindex echo area | 185 | @cindex echo area |
| 191 | 186 | ||
| 192 | The @dfn{echo area} is used for displaying messages made with the | 187 | The @dfn{echo area} is used for displaying error messages |
| 193 | @code{message} primitive, and for echoing keystrokes. It is not the | 188 | (@pxref{Errors}), for messages made with the @code{message} primitive, |
| 194 | same as the minibuffer, despite the fact that the minibuffer appears | 189 | and for echoing keystrokes. It is not the same as the minibuffer, |
| 195 | (when active) in the same place on the screen as the echo area. The | 190 | despite the fact that the minibuffer appears (when active) in the same |
| 196 | @cite{GNU Emacs Manual} specifies the rules for resolving conflicts | 191 | place on the screen as the echo area. The @cite{GNU Emacs Manual} |
| 197 | between the echo area and the minibuffer for use of that screen space | 192 | specifies the rules for resolving conflicts between the echo area and |
| 198 | (@pxref{Minibuffer,, The Minibuffer, emacs, The GNU Emacs Manual}). | 193 | the minibuffer for use of that screen space (@pxref{Minibuffer,, The |
| 199 | Error messages appear in the echo area; see @ref{Errors}. | 194 | Minibuffer, emacs, The GNU Emacs Manual}). |
| 200 | 195 | ||
| 201 | You can write output in the echo area by using the Lisp printing | 196 | You can write output in the echo area by using the Lisp printing |
| 202 | functions with @code{t} as the stream (@pxref{Output Functions}), or as | 197 | functions with @code{t} as the stream (@pxref{Output Functions}), or as |
| @@ -243,9 +238,15 @@ Minibuffer depth is 0. | |||
| 243 | @end example | 238 | @end example |
| 244 | 239 | ||
| 245 | To automatically display a message in the echo area or in a pop-buffer, | 240 | To automatically display a message in the echo area or in a pop-buffer, |
| 246 | depending on its size, use @code{display-message-or-buffer}. | 241 | depending on its size, use @code{display-message-or-buffer} (see below). |
| 247 | @end defun | 242 | @end defun |
| 248 | 243 | ||
| 244 | @defopt max-mini-window-height | ||
| 245 | This variable specifies the maximum height for resizing minibuffer | ||
| 246 | windows. If a float, it specifies a fraction of the height of the | ||
| 247 | frame. If an integer, it specifies a number of lines. | ||
| 248 | @end defopt | ||
| 249 | |||
| 249 | @tindex with-temp-message | 250 | @tindex with-temp-message |
| 250 | @defmac with-temp-message message &rest body | 251 | @defmac with-temp-message message &rest body |
| 251 | This construct displays a message in the echo area temporarily, during | 252 | This construct displays a message in the echo area temporarily, during |
| @@ -538,11 +539,11 @@ that warning is not logged. | |||
| 538 | @section Reporting Operation Progress | 539 | @section Reporting Operation Progress |
| 539 | @cindex progress reporting | 540 | @cindex progress reporting |
| 540 | 541 | ||
| 541 | When an operation can take a while to finish, you should inform the | 542 | When an operation can take a while to finish, you should inform the |
| 542 | user about the progress it makes. This way the user can estimate | 543 | user about the progress it makes. This way the user can estimate |
| 543 | remaining time and clearly see that Emacs is busy working, not hung. | 544 | remaining time and clearly see that Emacs is busy working, not hung. |
| 544 | 545 | ||
| 545 | Functions listed in this section provide simple and efficient way of | 546 | Functions listed in this section provide simple and efficient way of |
| 546 | reporting operation progress. Here is a working example that does | 547 | reporting operation progress. Here is a working example that does |
| 547 | nothing useful: | 548 | nothing useful: |
| 548 | 549 | ||
| @@ -557,15 +558,16 @@ nothing useful: | |||
| 557 | @end example | 558 | @end example |
| 558 | 559 | ||
| 559 | @defun make-progress-reporter message min-value max-value &optional current-value min-change min-time | 560 | @defun make-progress-reporter message min-value max-value &optional current-value min-change min-time |
| 560 | This function creates a progress reporter---the object you will use as | 561 | This function creates and returns a @dfn{progress reporter}---an |
| 561 | an argument for all other functions listed here. The idea is to | 562 | object you will use as an argument for all other functions listed |
| 562 | precompute as much data as possible to make progress reporting very | 563 | here. The idea is to precompute as much data as possible to make |
| 563 | fast. | 564 | progress reporting very fast. |
| 564 | 565 | ||
| 565 | The @var{message} will be displayed in the echo area, followed by | 566 | When this progress reporter is subsequently used, it will display |
| 566 | progress percentage. @var{message} is treated as a simple string. If | 567 | @var{message} in the echo area, followed by progress percentage. |
| 567 | you need it to depend on a filename, for instance, use @code{format} | 568 | @var{message} is treated as a simple string. If you need it to depend |
| 568 | before calling this function. | 569 | on a filename, for instance, use @code{format} before calling this |
| 570 | function. | ||
| 569 | 571 | ||
| 570 | @var{min-value} and @var{max-value} arguments stand for starting and | 572 | @var{min-value} and @var{max-value} arguments stand for starting and |
| 571 | final states of your operation. For instance, if you scan a buffer, | 573 | final states of your operation. For instance, if you scan a buffer, |
| @@ -592,9 +594,10 @@ message is printed immediately. | |||
| 592 | 594 | ||
| 593 | @defun progress-reporter-update reporter value | 595 | @defun progress-reporter-update reporter value |
| 594 | This function does the main work of reporting progress of your | 596 | This function does the main work of reporting progress of your |
| 595 | operation. It print the message of @var{reporter} followed by | 597 | operation. It displays the message of @var{reporter}, followed by |
| 596 | progress percentage determined by @var{value}. If percentage is zero, | 598 | progress percentage determined by @var{value}. If percentage is zero, |
| 597 | then it is not printed at all. | 599 | or close enough according to the @var{min-change} and @var{min-time} |
| 600 | arguments, then it is omitted from the output. | ||
| 598 | 601 | ||
| 599 | @var{reporter} must be the result of a call to | 602 | @var{reporter} must be the result of a call to |
| 600 | @code{make-progress-reporter}. @var{value} specifies the current | 603 | @code{make-progress-reporter}. @var{value} specifies the current |
| @@ -655,7 +658,9 @@ this macro this way: | |||
| 655 | You can make characters @dfn{invisible}, so that they do not appear on | 658 | You can make characters @dfn{invisible}, so that they do not appear on |
| 656 | the screen, with the @code{invisible} property. This can be either a | 659 | the screen, with the @code{invisible} property. This can be either a |
| 657 | text property (@pxref{Text Properties}) or a property of an overlay | 660 | text property (@pxref{Text Properties}) or a property of an overlay |
| 658 | (@pxref{Overlays}). | 661 | (@pxref{Overlays}). Cursor motion also partly ignores these |
| 662 | characters; if the command loop finds point within them, it moves | ||
| 663 | point to the other side of them. | ||
| 659 | 664 | ||
| 660 | In the simplest case, any non-@code{nil} @code{invisible} property makes | 665 | In the simplest case, any non-@code{nil} @code{invisible} property makes |
| 661 | a character invisible. This is the default case---if you don't alter | 666 | a character invisible. This is the default case---if you don't alter |
| @@ -784,10 +789,11 @@ make it invisible again. | |||
| 784 | @dfn{Selective display} refers to a pair of related features for | 789 | @dfn{Selective display} refers to a pair of related features for |
| 785 | hiding certain lines on the screen. | 790 | hiding certain lines on the screen. |
| 786 | 791 | ||
| 787 | The first variant, explicit selective display, is designed for use in | 792 | The first variant, explicit selective display, is designed for use |
| 788 | a Lisp program: it controls which lines are hidden by altering the text. | 793 | in a Lisp program: it controls which lines are hidden by altering the |
| 789 | The invisible text feature (@pxref{Invisible Text}) has partially | 794 | text. This kind of hiding in some ways resembles the effect of the |
| 790 | replaced this feature. | 795 | @code{invisible} property (@pxref{Invisible Text}), but the two |
| 796 | features are different and do not work the same way. | ||
| 791 | 797 | ||
| 792 | In the second variant, the choice of lines to hide is made | 798 | In the second variant, the choice of lines to hide is made |
| 793 | automatically based on indentation. This variant is designed to be a | 799 | automatically based on indentation. This variant is designed to be a |
| @@ -795,32 +801,32 @@ user-level feature. | |||
| 795 | 801 | ||
| 796 | The way you control explicit selective display is by replacing a | 802 | The way you control explicit selective display is by replacing a |
| 797 | newline (control-j) with a carriage return (control-m). The text that | 803 | newline (control-j) with a carriage return (control-m). The text that |
| 798 | was formerly a line following that newline is now invisible. Strictly | 804 | was formerly a line following that newline is now hidden. Strictly |
| 799 | speaking, it is temporarily no longer a line at all, since only newlines | 805 | speaking, it is temporarily no longer a line at all, since only |
| 800 | can separate lines; it is now part of the previous line. | 806 | newlines can separate lines; it is now part of the previous line. |
| 801 | 807 | ||
| 802 | Selective display does not directly affect editing commands. For | 808 | Selective display does not directly affect editing commands. For |
| 803 | example, @kbd{C-f} (@code{forward-char}) moves point unhesitatingly into | 809 | example, @kbd{C-f} (@code{forward-char}) moves point unhesitatingly |
| 804 | invisible text. However, the replacement of newline characters with | 810 | into hidden text. However, the replacement of newline characters with |
| 805 | carriage return characters affects some editing commands. For example, | 811 | carriage return characters affects some editing commands. For |
| 806 | @code{next-line} skips invisible lines, since it searches only for | 812 | example, @code{next-line} skips hidden lines, since it searches only |
| 807 | newlines. Modes that use selective display can also define commands | 813 | for newlines. Modes that use selective display can also define |
| 808 | that take account of the newlines, or that make parts of the text | 814 | commands that take account of the newlines, or that control which |
| 809 | visible or invisible. | 815 | parts of the text are hidden. |
| 810 | 816 | ||
| 811 | When you write a selectively displayed buffer into a file, all the | 817 | When you write a selectively displayed buffer into a file, all the |
| 812 | control-m's are output as newlines. This means that when you next read | 818 | control-m's are output as newlines. This means that when you next read |
| 813 | in the file, it looks OK, with nothing invisible. The selective display | 819 | in the file, it looks OK, with nothing hidden. The selective display |
| 814 | effect is seen only within Emacs. | 820 | effect is seen only within Emacs. |
| 815 | 821 | ||
| 816 | @defvar selective-display | 822 | @defvar selective-display |
| 817 | This buffer-local variable enables selective display. This means that | 823 | This buffer-local variable enables selective display. This means that |
| 818 | lines, or portions of lines, may be made invisible. | 824 | lines, or portions of lines, may be made hidden. |
| 819 | 825 | ||
| 820 | @itemize @bullet | 826 | @itemize @bullet |
| 821 | @item | 827 | @item |
| 822 | If the value of @code{selective-display} is @code{t}, then the character | 828 | If the value of @code{selective-display} is @code{t}, then the character |
| 823 | control-m marks the start of invisible text; the control-m, and the rest | 829 | control-m marks the start of hidden text; the control-m, and the rest |
| 824 | of the line following it, are not displayed. This is explicit selective | 830 | of the line following it, are not displayed. This is explicit selective |
| 825 | display. | 831 | display. |
| 826 | 832 | ||
| @@ -830,12 +836,12 @@ lines that start with more than that many columns of indentation are not | |||
| 830 | displayed. | 836 | displayed. |
| 831 | @end itemize | 837 | @end itemize |
| 832 | 838 | ||
| 833 | When some portion of a buffer is invisible, the vertical movement | 839 | When some portion of a buffer is hidden, the vertical movement |
| 834 | commands operate as if that portion did not exist, allowing a single | 840 | commands operate as if that portion did not exist, allowing a single |
| 835 | @code{next-line} command to skip any number of invisible lines. | 841 | @code{next-line} command to skip any number of hidden lines. |
| 836 | However, character movement commands (such as @code{forward-char}) do | 842 | However, character movement commands (such as @code{forward-char}) do |
| 837 | not skip the invisible portion, and it is possible (if tricky) to insert | 843 | not skip the hidden portion, and it is possible (if tricky) to insert |
| 838 | or delete text in an invisible portion. | 844 | or delete text in an hidden portion. |
| 839 | 845 | ||
| 840 | In the examples below, we show the @emph{display appearance} of the | 846 | In the examples below, we show the @emph{display appearance} of the |
| 841 | buffer @code{foo}, which changes with the value of | 847 | buffer @code{foo}, which changes with the value of |
| @@ -873,7 +879,7 @@ change. | |||
| 873 | 879 | ||
| 874 | @defvar selective-display-ellipses | 880 | @defvar selective-display-ellipses |
| 875 | If this buffer-local variable is non-@code{nil}, then Emacs displays | 881 | If this buffer-local variable is non-@code{nil}, then Emacs displays |
| 876 | @samp{@dots{}} at the end of a line that is followed by invisible text. | 882 | @samp{@dots{}} at the end of a line that is followed by hidden text. |
| 877 | This example is a continuation of the previous one. | 883 | This example is a continuation of the previous one. |
| 878 | 884 | ||
| 879 | @example | 885 | @example |
| @@ -894,42 +900,6 @@ You can use a display table to substitute other text for the ellipsis | |||
| 894 | (@samp{@dots{}}). @xref{Display Tables}. | 900 | (@samp{@dots{}}). @xref{Display Tables}. |
| 895 | @end defvar | 901 | @end defvar |
| 896 | 902 | ||
| 897 | @node Overlay Arrow | ||
| 898 | @section The Overlay Arrow | ||
| 899 | @cindex overlay arrow | ||
| 900 | |||
| 901 | The @dfn{overlay arrow} is useful for directing the user's attention | ||
| 902 | to a particular line in a buffer. For example, in the modes used for | ||
| 903 | interface to debuggers, the overlay arrow indicates the line of code | ||
| 904 | about to be executed. | ||
| 905 | |||
| 906 | @defvar overlay-arrow-string | ||
| 907 | This variable holds the string to display to call attention to a | ||
| 908 | particular line, or @code{nil} if the arrow feature is not in use. | ||
| 909 | On a graphical display the contents of the string are ignored; instead a | ||
| 910 | glyph is displayed in the fringe area to the left of the display area. | ||
| 911 | @end defvar | ||
| 912 | |||
| 913 | @defvar overlay-arrow-position | ||
| 914 | This variable holds a marker that indicates where to display the overlay | ||
| 915 | arrow. It should point at the beginning of a line. On a non-graphical | ||
| 916 | display the arrow text | ||
| 917 | appears at the beginning of that line, overlaying any text that would | ||
| 918 | otherwise appear. Since the arrow is usually short, and the line | ||
| 919 | usually begins with indentation, normally nothing significant is | ||
| 920 | overwritten. | ||
| 921 | |||
| 922 | The overlay string is displayed only in the buffer that this marker | ||
| 923 | points into. Thus, only one buffer can have an overlay arrow at any | ||
| 924 | given time. | ||
| 925 | @c !!! overlay-arrow-position: but the overlay string may remain in the display | ||
| 926 | @c of some other buffer until an update is required. This should be fixed | ||
| 927 | @c now. Is it? | ||
| 928 | @end defvar | ||
| 929 | |||
| 930 | You can do a similar job by creating an overlay with a | ||
| 931 | @code{before-string} property. @xref{Overlay Properties}. | ||
| 932 | |||
| 933 | @node Temporary Displays | 903 | @node Temporary Displays |
| 934 | @section Temporary Displays | 904 | @section Temporary Displays |
| 935 | 905 | ||
| @@ -1092,28 +1062,152 @@ you can specify whether text inserted at the beginning should be | |||
| 1092 | inside the overlay or outside, and likewise for the end of the overlay. | 1062 | inside the overlay or outside, and likewise for the end of the overlay. |
| 1093 | 1063 | ||
| 1094 | @menu | 1064 | @menu |
| 1065 | * Managing Overlays:: Creating and moving overlays. | ||
| 1095 | * Overlay Properties:: How to read and set properties. | 1066 | * Overlay Properties:: How to read and set properties. |
| 1096 | What properties do to the screen display. | 1067 | What properties do to the screen display. |
| 1097 | * Managing Overlays:: Creating and moving overlays. | ||
| 1098 | * Finding Overlays:: Searching for overlays. | 1068 | * Finding Overlays:: Searching for overlays. |
| 1099 | @end menu | 1069 | @end menu |
| 1100 | 1070 | ||
| 1071 | @node Managing Overlays | ||
| 1072 | @subsection Managing Overlays | ||
| 1073 | |||
| 1074 | This section describes the functions to create, delete and move | ||
| 1075 | overlays, and to examine their contents. Overlay changes are not | ||
| 1076 | recorded in the buffer's undo list, since the overlays are not | ||
| 1077 | part of the buffer's contents. | ||
| 1078 | |||
| 1079 | @defun overlayp object | ||
| 1080 | This function returns @code{t} if @var{object} is an overlay. | ||
| 1081 | @end defun | ||
| 1082 | |||
| 1083 | @defun make-overlay start end &optional buffer front-advance rear-advance | ||
| 1084 | This function creates and returns an overlay that belongs to | ||
| 1085 | @var{buffer} and ranges from @var{start} to @var{end}. Both @var{start} | ||
| 1086 | and @var{end} must specify buffer positions; they may be integers or | ||
| 1087 | markers. If @var{buffer} is omitted, the overlay is created in the | ||
| 1088 | current buffer. | ||
| 1089 | |||
| 1090 | The arguments @var{front-advance} and @var{rear-advance} specify the | ||
| 1091 | insertion type for the start of the overlay and for the end of the | ||
| 1092 | overlay, respectively. @xref{Marker Insertion Types}. If | ||
| 1093 | @var{front-advance} is non-@code{nil}, text inserted at the beginning | ||
| 1094 | of the overlay is excluded from the overlay. If @var{read-advance} is | ||
| 1095 | non-@code{nil}, text inserted at the beginning of the overlay is | ||
| 1096 | included in the overlay. | ||
| 1097 | @end defun | ||
| 1098 | |||
| 1099 | @defun overlay-start overlay | ||
| 1100 | This function returns the position at which @var{overlay} starts, | ||
| 1101 | as an integer. | ||
| 1102 | @end defun | ||
| 1103 | |||
| 1104 | @defun overlay-end overlay | ||
| 1105 | This function returns the position at which @var{overlay} ends, | ||
| 1106 | as an integer. | ||
| 1107 | @end defun | ||
| 1108 | |||
| 1109 | @defun overlay-buffer overlay | ||
| 1110 | This function returns the buffer that @var{overlay} belongs to. It | ||
| 1111 | returns @code{nil} if @var{overlay} has been deleted. | ||
| 1112 | @end defun | ||
| 1113 | |||
| 1114 | @defun delete-overlay overlay | ||
| 1115 | This function deletes @var{overlay}. The overlay continues to exist as | ||
| 1116 | a Lisp object, and its property list is unchanged, but it ceases to be | ||
| 1117 | attached to the buffer it belonged to, and ceases to have any effect on | ||
| 1118 | display. | ||
| 1119 | |||
| 1120 | A deleted overlay is not permanently disconnected. You can give it a | ||
| 1121 | position in a buffer again by calling @code{move-overlay}. | ||
| 1122 | @end defun | ||
| 1123 | |||
| 1124 | @defun move-overlay overlay start end &optional buffer | ||
| 1125 | This function moves @var{overlay} to @var{buffer}, and places its bounds | ||
| 1126 | at @var{start} and @var{end}. Both arguments @var{start} and @var{end} | ||
| 1127 | must specify buffer positions; they may be integers or markers. | ||
| 1128 | |||
| 1129 | If @var{buffer} is omitted, @var{overlay} stays in the same buffer it | ||
| 1130 | was already associated with; if @var{overlay} was deleted, it goes into | ||
| 1131 | the current buffer. | ||
| 1132 | |||
| 1133 | The return value is @var{overlay}. | ||
| 1134 | |||
| 1135 | This is the only valid way to change the endpoints of an overlay. Do | ||
| 1136 | not try modifying the markers in the overlay by hand, as that fails to | ||
| 1137 | update other vital data structures and can cause some overlays to be | ||
| 1138 | ``lost''. | ||
| 1139 | @end defun | ||
| 1140 | |||
| 1141 | Here are some examples: | ||
| 1142 | |||
| 1143 | @example | ||
| 1144 | ;; @r{Create an overlay.} | ||
| 1145 | (setq foo (make-overlay 1 10)) | ||
| 1146 | @result{} #<overlay from 1 to 10 in display.texi> | ||
| 1147 | (overlay-start foo) | ||
| 1148 | @result{} 1 | ||
| 1149 | (overlay-end foo) | ||
| 1150 | @result{} 10 | ||
| 1151 | (overlay-buffer foo) | ||
| 1152 | @result{} #<buffer display.texi> | ||
| 1153 | ;; @r{Give it a property we can check later.} | ||
| 1154 | (overlay-put foo 'happy t) | ||
| 1155 | @result{} t | ||
| 1156 | ;; @r{Verify the property is present.} | ||
| 1157 | (overlay-get foo 'happy) | ||
| 1158 | @result{} t | ||
| 1159 | ;; @r{Move the overlay.} | ||
| 1160 | (move-overlay foo 5 20) | ||
| 1161 | @result{} #<overlay from 5 to 20 in display.texi> | ||
| 1162 | (overlay-start foo) | ||
| 1163 | @result{} 5 | ||
| 1164 | (overlay-end foo) | ||
| 1165 | @result{} 20 | ||
| 1166 | ;; @r{Delete the overlay.} | ||
| 1167 | (delete-overlay foo) | ||
| 1168 | @result{} nil | ||
| 1169 | ;; @r{Verify it is deleted.} | ||
| 1170 | foo | ||
| 1171 | @result{} #<overlay in no buffer> | ||
| 1172 | ;; @r{A deleted overlay has no position.} | ||
| 1173 | (overlay-start foo) | ||
| 1174 | @result{} nil | ||
| 1175 | (overlay-end foo) | ||
| 1176 | @result{} nil | ||
| 1177 | (overlay-buffer foo) | ||
| 1178 | @result{} nil | ||
| 1179 | ;; @r{Undelete the overlay.} | ||
| 1180 | (move-overlay foo 1 20) | ||
| 1181 | @result{} #<overlay from 1 to 20 in display.texi> | ||
| 1182 | ;; @r{Verify the results.} | ||
| 1183 | (overlay-start foo) | ||
| 1184 | @result{} 1 | ||
| 1185 | (overlay-end foo) | ||
| 1186 | @result{} 20 | ||
| 1187 | (overlay-buffer foo) | ||
| 1188 | @result{} #<buffer display.texi> | ||
| 1189 | ;; @r{Moving and deleting the overlay does not change its properties.} | ||
| 1190 | (overlay-get foo 'happy) | ||
| 1191 | @result{} t | ||
| 1192 | @end example | ||
| 1193 | |||
| 1101 | @node Overlay Properties | 1194 | @node Overlay Properties |
| 1102 | @subsection Overlay Properties | 1195 | @subsection Overlay Properties |
| 1103 | 1196 | ||
| 1104 | Overlay properties are like text properties in that the properties that | 1197 | Overlay properties are like text properties in that the properties that |
| 1105 | alter how a character is displayed can come from either source. But in | 1198 | alter how a character is displayed can come from either source. But in |
| 1106 | most respects they are different. Text properties are considered a part | 1199 | most respects they are different. @xref{Text Properties}, for comparison. |
| 1107 | of the text; overlays are specifically considered not to be part of the | 1200 | |
| 1108 | text. Thus, copying text between various buffers and strings preserves | 1201 | Text properties are considered a part of the text; overlays and |
| 1109 | text properties, but does not try to preserve overlays. Changing a | 1202 | their properties are specifically considered not to be part of the |
| 1110 | buffer's text properties marks the buffer as modified, while moving an | 1203 | text. Thus, copying text between various buffers and strings |
| 1111 | overlay or changing its properties does not. Unlike text property | 1204 | preserves text properties, but does not try to preserve overlays. |
| 1112 | changes, overlay changes are not recorded in the buffer's undo list. | 1205 | Changing a buffer's text properties marks the buffer as modified, |
| 1113 | @xref{Text Properties}, for comparison. | 1206 | while moving an overlay or changing its properties does not. Unlike |
| 1114 | 1207 | text property changes, overlay property changes are not recorded in | |
| 1115 | These functions are used for reading and writing the properties of an | 1208 | the buffer's undo list. |
| 1116 | overlay: | 1209 | |
| 1210 | These functions read and set the properties of an overlay: | ||
| 1117 | 1211 | ||
| 1118 | @defun overlay-get overlay prop | 1212 | @defun overlay-get overlay prop |
| 1119 | This function returns the value of property @var{prop} recorded in | 1213 | This function returns the value of property @var{prop} recorded in |
| @@ -1301,127 +1395,6 @@ buffer's local map (and the map specified by the @code{local-map} | |||
| 1301 | property) rather than replacing it. | 1395 | property) rather than replacing it. |
| 1302 | @end table | 1396 | @end table |
| 1303 | 1397 | ||
| 1304 | @node Managing Overlays | ||
| 1305 | @subsection Managing Overlays | ||
| 1306 | |||
| 1307 | This section describes the functions to create, delete and move | ||
| 1308 | overlays, and to examine their contents. | ||
| 1309 | |||
| 1310 | @defun overlayp object | ||
| 1311 | This function returns @code{t} if @var{object} is an overlay. | ||
| 1312 | @end defun | ||
| 1313 | |||
| 1314 | @defun make-overlay start end &optional buffer front-advance rear-advance | ||
| 1315 | This function creates and returns an overlay that belongs to | ||
| 1316 | @var{buffer} and ranges from @var{start} to @var{end}. Both @var{start} | ||
| 1317 | and @var{end} must specify buffer positions; they may be integers or | ||
| 1318 | markers. If @var{buffer} is omitted, the overlay is created in the | ||
| 1319 | current buffer. | ||
| 1320 | |||
| 1321 | The arguments @var{front-advance} and @var{rear-advance} specify the | ||
| 1322 | insertion type for the start of the overlay and for the end of the | ||
| 1323 | overlay, respectively. @xref{Marker Insertion Types}. If | ||
| 1324 | @var{front-advance} is non-@code{nil}, text inserted at the beginning | ||
| 1325 | of the overlay is excluded from the overlay. If @var{read-advance} is | ||
| 1326 | non-@code{nil}, text inserted at the beginning of the overlay is | ||
| 1327 | included in the overlay. | ||
| 1328 | @end defun | ||
| 1329 | |||
| 1330 | @defun overlay-start overlay | ||
| 1331 | This function returns the position at which @var{overlay} starts, | ||
| 1332 | as an integer. | ||
| 1333 | @end defun | ||
| 1334 | |||
| 1335 | @defun overlay-end overlay | ||
| 1336 | This function returns the position at which @var{overlay} ends, | ||
| 1337 | as an integer. | ||
| 1338 | @end defun | ||
| 1339 | |||
| 1340 | @defun overlay-buffer overlay | ||
| 1341 | This function returns the buffer that @var{overlay} belongs to. It | ||
| 1342 | returns @code{nil} if @var{overlay} has been deleted. | ||
| 1343 | @end defun | ||
| 1344 | |||
| 1345 | @defun delete-overlay overlay | ||
| 1346 | This function deletes @var{overlay}. The overlay continues to exist as | ||
| 1347 | a Lisp object, and its property list is unchanged, but it ceases to be | ||
| 1348 | attached to the buffer it belonged to, and ceases to have any effect on | ||
| 1349 | display. | ||
| 1350 | |||
| 1351 | A deleted overlay is not permanently disconnected. You can give it a | ||
| 1352 | position in a buffer again by calling @code{move-overlay}. | ||
| 1353 | @end defun | ||
| 1354 | |||
| 1355 | @defun move-overlay overlay start end &optional buffer | ||
| 1356 | This function moves @var{overlay} to @var{buffer}, and places its bounds | ||
| 1357 | at @var{start} and @var{end}. Both arguments @var{start} and @var{end} | ||
| 1358 | must specify buffer positions; they may be integers or markers. | ||
| 1359 | |||
| 1360 | If @var{buffer} is omitted, @var{overlay} stays in the same buffer it | ||
| 1361 | was already associated with; if @var{overlay} was deleted, it goes into | ||
| 1362 | the current buffer. | ||
| 1363 | |||
| 1364 | The return value is @var{overlay}. | ||
| 1365 | |||
| 1366 | This is the only valid way to change the endpoints of an overlay. Do | ||
| 1367 | not try modifying the markers in the overlay by hand, as that fails to | ||
| 1368 | update other vital data structures and can cause some overlays to be | ||
| 1369 | ``lost''. | ||
| 1370 | @end defun | ||
| 1371 | |||
| 1372 | Here are some examples: | ||
| 1373 | |||
| 1374 | @example | ||
| 1375 | ;; @r{Create an overlay.} | ||
| 1376 | (setq foo (make-overlay 1 10)) | ||
| 1377 | @result{} #<overlay from 1 to 10 in display.texi> | ||
| 1378 | (overlay-start foo) | ||
| 1379 | @result{} 1 | ||
| 1380 | (overlay-end foo) | ||
| 1381 | @result{} 10 | ||
| 1382 | (overlay-buffer foo) | ||
| 1383 | @result{} #<buffer display.texi> | ||
| 1384 | ;; @r{Give it a property we can check later.} | ||
| 1385 | (overlay-put foo 'happy t) | ||
| 1386 | @result{} t | ||
| 1387 | ;; @r{Verify the property is present.} | ||
| 1388 | (overlay-get foo 'happy) | ||
| 1389 | @result{} t | ||
| 1390 | ;; @r{Move the overlay.} | ||
| 1391 | (move-overlay foo 5 20) | ||
| 1392 | @result{} #<overlay from 5 to 20 in display.texi> | ||
| 1393 | (overlay-start foo) | ||
| 1394 | @result{} 5 | ||
| 1395 | (overlay-end foo) | ||
| 1396 | @result{} 20 | ||
| 1397 | ;; @r{Delete the overlay.} | ||
| 1398 | (delete-overlay foo) | ||
| 1399 | @result{} nil | ||
| 1400 | ;; @r{Verify it is deleted.} | ||
| 1401 | foo | ||
| 1402 | @result{} #<overlay in no buffer> | ||
| 1403 | ;; @r{A deleted overlay has no position.} | ||
| 1404 | (overlay-start foo) | ||
| 1405 | @result{} nil | ||
| 1406 | (overlay-end foo) | ||
| 1407 | @result{} nil | ||
| 1408 | (overlay-buffer foo) | ||
| 1409 | @result{} nil | ||
| 1410 | ;; @r{Undelete the overlay.} | ||
| 1411 | (move-overlay foo 1 20) | ||
| 1412 | @result{} #<overlay from 1 to 20 in display.texi> | ||
| 1413 | ;; @r{Verify the results.} | ||
| 1414 | (overlay-start foo) | ||
| 1415 | @result{} 1 | ||
| 1416 | (overlay-end foo) | ||
| 1417 | @result{} 20 | ||
| 1418 | (overlay-buffer foo) | ||
| 1419 | @result{} #<buffer display.texi> | ||
| 1420 | ;; @r{Moving and deleting the overlay does not change its properties.} | ||
| 1421 | (overlay-get foo 'happy) | ||
| 1422 | @result{} t | ||
| 1423 | @end example | ||
| 1424 | |||
| 1425 | @node Finding Overlays | 1398 | @node Finding Overlays |
| 1426 | @subsection Searching for Overlays | 1399 | @subsection Searching for Overlays |
| 1427 | 1400 | ||
| @@ -1457,12 +1430,14 @@ they are located at @var{beg}, or strictly between @var{beg} and @var{end}. | |||
| 1457 | 1430 | ||
| 1458 | @defun next-overlay-change pos | 1431 | @defun next-overlay-change pos |
| 1459 | This function returns the buffer position of the next beginning or end | 1432 | This function returns the buffer position of the next beginning or end |
| 1460 | of an overlay, after @var{pos}. | 1433 | of an overlay, after @var{pos}. If there is none, it returns |
| 1434 | @code{(point-max)}. | ||
| 1461 | @end defun | 1435 | @end defun |
| 1462 | 1436 | ||
| 1463 | @defun previous-overlay-change pos | 1437 | @defun previous-overlay-change pos |
| 1464 | This function returns the buffer position of the previous beginning or | 1438 | This function returns the buffer position of the previous beginning or |
| 1465 | end of an overlay, before @var{pos}. | 1439 | end of an overlay, before @var{pos}. If there is none, it returns |
| 1440 | @code{(point-min)}. | ||
| 1466 | @end defun | 1441 | @end defun |
| 1467 | 1442 | ||
| 1468 | Here's an easy way to use @code{next-overlay-change} to search for the | 1443 | Here's an easy way to use @code{next-overlay-change} to search for the |
| @@ -1496,7 +1471,7 @@ This function returns the width in columns of the string @var{string}, | |||
| 1496 | if it were displayed in the current buffer and the selected window. | 1471 | if it were displayed in the current buffer and the selected window. |
| 1497 | @end defun | 1472 | @end defun |
| 1498 | 1473 | ||
| 1499 | @defun truncate-string-to-width string width &optional start-column padding | 1474 | @defun truncate-string-to-width string width &optional start-column padding ellipsis |
| 1500 | This function returns the part of @var{string} that fits within | 1475 | This function returns the part of @var{string} that fits within |
| 1501 | @var{width} columns, as a new string. | 1476 | @var{width} columns, as a new string. |
| 1502 | 1477 | ||
| @@ -1519,6 +1494,13 @@ end of the result if it falls short of @var{width}. It is also used at | |||
| 1519 | the beginning of the result if one multi-column character in | 1494 | the beginning of the result if one multi-column character in |
| 1520 | @var{string} extends across the column @var{start-column}. | 1495 | @var{string} extends across the column @var{start-column}. |
| 1521 | 1496 | ||
| 1497 | If @var{ellipsis} is non-@code{nil}, it should be a string which will | ||
| 1498 | replace the end of @var{str} (including any padding) if it extends | ||
| 1499 | beyond @var{end-column}, unless the display width of @var{str} is | ||
| 1500 | equal to or less than the display width of @var{ellipsis}. If | ||
| 1501 | @var{ellipsis} is non-@code{nil} and not a string, it stands for | ||
| 1502 | @code{"..."}. | ||
| 1503 | |||
| 1522 | @example | 1504 | @example |
| 1523 | (truncate-string-to-width "\tab\t" 12 4) | 1505 | (truncate-string-to-width "\tab\t" 12 4) |
| 1524 | @result{} "ab" | 1506 | @result{} "ab" |
| @@ -2286,8 +2268,10 @@ With defaults. The @code{default} face is used as the ultimate | |||
| 2286 | default for all text. (In Emacs 19 and 20, the @code{default} | 2268 | default for all text. (In Emacs 19 and 20, the @code{default} |
| 2287 | face is used only when no other face is specified.) | 2269 | face is used only when no other face is specified.) |
| 2288 | 2270 | ||
| 2289 | For a mode line or header line, the face @code{modeline} or | 2271 | @item |
| 2290 | @code{header-line} is used just before @code{default}. | 2272 | For a mode line or header line, the face @code{mode-line} or |
| 2273 | @code{mode-line-inactive}, or @code{header-line}, is merged in just | ||
| 2274 | before @code{default}. | ||
| 2291 | 2275 | ||
| 2292 | @item | 2276 | @item |
| 2293 | With text properties. A character can have a @code{face} property; if | 2277 | With text properties. A character can have a @code{face} property; if |
| @@ -2313,20 +2297,16 @@ number. @xref{Glyphs}. | |||
| 2313 | 2297 | ||
| 2314 | If these various sources together specify more than one face for a | 2298 | If these various sources together specify more than one face for a |
| 2315 | particular character, Emacs merges the attributes of the various faces | 2299 | particular character, Emacs merges the attributes of the various faces |
| 2316 | specified. The attributes of the faces of special glyphs come first; | 2300 | specified. For each attribute, Emacs tries first the face of any |
| 2317 | then comes the face for region highlighting, if appropriate; | 2301 | special glyph; then the face for region highlighting, if appropriate; |
| 2318 | then come attributes of faces from overlays, followed by those from text | 2302 | then the faces specified by overlays, followed by those specified by |
| 2319 | properties, and last the default face. | 2303 | text properties, then the @code{mode-line} or |
| 2304 | @code{mode-line-inactive} or @code{header-line} face (if in a mode | ||
| 2305 | line or a header line), and last the @code{default} face. | ||
| 2320 | 2306 | ||
| 2321 | When multiple overlays cover one character, an overlay with higher | 2307 | When multiple overlays cover one character, an overlay with higher |
| 2322 | priority overrides those with lower priority. @xref{Overlays}. | 2308 | priority overrides those with lower priority. @xref{Overlays}. |
| 2323 | 2309 | ||
| 2324 | In Emacs 20, if an attribute such as the font or a color is not | ||
| 2325 | specified in any of the above ways, the frame's own font or color is | ||
| 2326 | used. In newer Emacs versions, this cannot happen, because the | ||
| 2327 | @code{default} face specifies all attributes---in fact, the frame's own | ||
| 2328 | font and colors are synonymous with those of the default face. | ||
| 2329 | |||
| 2330 | @node Font Selection | 2310 | @node Font Selection |
| 2331 | @subsection Font Selection | 2311 | @subsection Font Selection |
| 2332 | 2312 | ||
| @@ -2469,7 +2449,7 @@ This function returns a list of all defined face names. | |||
| 2469 | @end defun | 2449 | @end defun |
| 2470 | 2450 | ||
| 2471 | @defun copy-face old-face new-name &optional frame new-frame | 2451 | @defun copy-face old-face new-name &optional frame new-frame |
| 2472 | This function defines the face @var{new-name} as a copy of the existing | 2452 | This function defines a face named @var{new-name} as a copy of the existing |
| 2473 | face named @var{old-face}. It creates the face @var{new-name} if that | 2453 | face named @var{old-face}. It creates the face @var{new-name} if that |
| 2474 | doesn't already exist. | 2454 | doesn't already exist. |
| 2475 | 2455 | ||
| @@ -2758,15 +2738,25 @@ does that, this function's value may not be accurate. | |||
| 2758 | 2738 | ||
| 2759 | The @dfn{fringes} of a window are thin vertical strips down the | 2739 | The @dfn{fringes} of a window are thin vertical strips down the |
| 2760 | sides that are used for displaying bitmaps that indicate truncation, | 2740 | sides that are used for displaying bitmaps that indicate truncation, |
| 2761 | continuation, horizontal scrolling, and the overlay arrow. The | 2741 | continuation, horizontal scrolling, and the overlay arrow. |
| 2762 | fringes normally appear between the display margins and the window | 2742 | |
| 2763 | text, but you can put them outside the display margins for a specific | 2743 | @menu |
| 2764 | buffer by setting @code{fringes-outside-margins} buffer-locally to a | 2744 | * Fringe Size/Pos:: Specifying where to put the window fringes. |
| 2765 | non-@code{nil} value. | 2745 | * Fringe Bitmaps:: Displaying bitmaps in the window fringes. |
| 2746 | * Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes. | ||
| 2747 | * Overlay Arrow:: Display of an arrow to indicate position. | ||
| 2748 | @end menu | ||
| 2749 | |||
| 2750 | @node Fringe Size/Pos | ||
| 2751 | @subsection Fringe Size and Position | ||
| 2752 | |||
| 2753 | Here's how to control the position and width of the window fringes. | ||
| 2766 | 2754 | ||
| 2767 | @defvar fringes-outside-margins | 2755 | @defvar fringes-outside-margins |
| 2768 | If the value is non-@code{nil}, the frames appear outside | 2756 | If the value is non-@code{nil}, the frames appear outside the display |
| 2769 | the display margins. | 2757 | margins. The fringes normally appear between the display margins and |
| 2758 | the window text. It works to set @code{fringes-outside-margins} | ||
| 2759 | buffer-locally. @xref{Display Margins}. | ||
| 2770 | @end defvar | 2760 | @end defvar |
| 2771 | 2761 | ||
| 2772 | @defvar left-fringe-width | 2762 | @defvar left-fringe-width |
| @@ -2799,7 +2789,7 @@ should appear outside of the display margins. | |||
| 2799 | This function returns information about the fringes of a window | 2789 | This function returns information about the fringes of a window |
| 2800 | @var{window}. If @var{window} is omitted or @code{nil}, the selected | 2790 | @var{window}. If @var{window} is omitted or @code{nil}, the selected |
| 2801 | window is used. The value has the form @code{(@var{left-width} | 2791 | window is used. The value has the form @code{(@var{left-width} |
| 2802 | @var{right-width} @var{frames-outside-margins})}. | 2792 | @var{right-width} @var{outside-margins})}. |
| 2803 | @end defun | 2793 | @end defun |
| 2804 | 2794 | ||
| 2805 | @defvar overflow-newline-into-fringe | 2795 | @defvar overflow-newline-into-fringe |
| @@ -2810,7 +2800,7 @@ fringe. | |||
| 2810 | @end defvar | 2800 | @end defvar |
| 2811 | 2801 | ||
| 2812 | @node Fringe Bitmaps | 2802 | @node Fringe Bitmaps |
| 2813 | @section Fringe Bitmaps | 2803 | @subsection Fringe Bitmaps |
| 2814 | @cindex fringe bitmaps | 2804 | @cindex fringe bitmaps |
| 2815 | @cindex bitmaps, fringe | 2805 | @cindex bitmaps, fringe |
| 2816 | 2806 | ||
| @@ -2870,7 +2860,7 @@ If @var{pos} is @code{nil}, that stands for the value of point in | |||
| 2870 | @end defun | 2860 | @end defun |
| 2871 | 2861 | ||
| 2872 | @node Customizing Bitmaps | 2862 | @node Customizing Bitmaps |
| 2873 | @section Customizing Fringe Bitmaps | 2863 | @subsection Customizing Fringe Bitmaps |
| 2874 | 2864 | ||
| 2875 | @defun define-fringe-bitmap bitmap bits &optional height width align | 2865 | @defun define-fringe-bitmap bitmap bits &optional height width align |
| 2876 | This function defines the symbol @var{bitmap} as a new fringe bitmap, | 2866 | This function defines the symbol @var{bitmap} as a new fringe bitmap, |
| @@ -2921,6 +2911,61 @@ The face you use here should be derived from @code{fringe}, and should | |||
| 2921 | specify only the foreground color. | 2911 | specify only the foreground color. |
| 2922 | @end defun | 2912 | @end defun |
| 2923 | 2913 | ||
| 2914 | @node Overlay Arrow | ||
| 2915 | @subsection The Overlay Arrow | ||
| 2916 | @cindex overlay arrow | ||
| 2917 | |||
| 2918 | The @dfn{overlay arrow} is useful for directing the user's attention | ||
| 2919 | to a particular line in a buffer. For example, in the modes used for | ||
| 2920 | interface to debuggers, the overlay arrow indicates the line of code | ||
| 2921 | about to be executed. This feature has nothing to do with | ||
| 2922 | @dfn{overlays} (@pxref{Overlays}). | ||
| 2923 | |||
| 2924 | @defvar overlay-arrow-string | ||
| 2925 | This variable holds the string to display to call attention to a | ||
| 2926 | particular line, or @code{nil} if the arrow feature is not in use. | ||
| 2927 | On a graphical display the contents of the string are ignored; instead a | ||
| 2928 | glyph is displayed in the fringe area to the left of the display area. | ||
| 2929 | @end defvar | ||
| 2930 | |||
| 2931 | @defvar overlay-arrow-position | ||
| 2932 | This variable holds a marker that indicates where to display the overlay | ||
| 2933 | arrow. It should point at the beginning of a line. On a non-graphical | ||
| 2934 | display the arrow text | ||
| 2935 | appears at the beginning of that line, overlaying any text that would | ||
| 2936 | otherwise appear. Since the arrow is usually short, and the line | ||
| 2937 | usually begins with indentation, normally nothing significant is | ||
| 2938 | overwritten. | ||
| 2939 | |||
| 2940 | The overlay string is displayed only in the buffer that this marker | ||
| 2941 | points into. Thus, only one buffer can have an overlay arrow at any | ||
| 2942 | given time. | ||
| 2943 | @c !!! overlay-arrow-position: but the overlay string may remain in the display | ||
| 2944 | @c of some other buffer until an update is required. This should be fixed | ||
| 2945 | @c now. Is it? | ||
| 2946 | @end defvar | ||
| 2947 | |||
| 2948 | You can do a similar job by creating an overlay with a | ||
| 2949 | @code{before-string} property. @xref{Overlay Properties}. | ||
| 2950 | |||
| 2951 | You can define multiple overlay arrows via the variable | ||
| 2952 | @code{overlay-arrow-variable-list}. | ||
| 2953 | |||
| 2954 | @defvar overlay-arrow-variable-list | ||
| 2955 | This variable's value is a list of varibles, each of which specifies | ||
| 2956 | the position of an overlay arrow. The variable | ||
| 2957 | @code{overlay-arrow-position} has its normal meaning because it is on | ||
| 2958 | this list. | ||
| 2959 | @end defvar | ||
| 2960 | |||
| 2961 | Each variable on this list can have properties | ||
| 2962 | @code{overlay-arrow-string} and @code{overlay-arrow-bitmap} that | ||
| 2963 | specify an overlay arrow string (for text-only terminals) or fringe | ||
| 2964 | bitmap (for graphical terminals) to display at the corresponding | ||
| 2965 | overlay arrow position. If either property is not set, the default | ||
| 2966 | (@code{overlay-arrow-string} or @code{overlay-arrow-fringe-bitmap}) is | ||
| 2967 | used. | ||
| 2968 | |||
| 2924 | @node Scroll Bars | 2969 | @node Scroll Bars |
| 2925 | @section Scroll Bars | 2970 | @section Scroll Bars |
| 2926 | 2971 | ||
| @@ -3029,8 +3074,6 @@ display specifications and what they mean. | |||
| 3029 | up or down on the page; adjusting the width | 3074 | up or down on the page; adjusting the width |
| 3030 | of spaces within text. | 3075 | of spaces within text. |
| 3031 | * Display Margins:: Displaying text or images to the side of the main text. | 3076 | * Display Margins:: Displaying text or images to the side of the main text. |
| 3032 | * Conditional Display:: Making any of the above features conditional | ||
| 3033 | depending on some Lisp expression. | ||
| 3034 | @end menu | 3077 | @end menu |
| 3035 | 3078 | ||
| 3036 | @node Specified Space | 3079 | @node Specified Space |
| @@ -3093,7 +3136,7 @@ with a @dfn{pixel ascent} specification (@pxref{Pixel Specification}). | |||
| 3093 | 3136 | ||
| 3094 | Don't use both @code{:height} and @code{:relative-height} together. | 3137 | Don't use both @code{:height} and @code{:relative-height} together. |
| 3095 | 3138 | ||
| 3096 | The @code{:height} and @code{:align-to} properties are supported on | 3139 | The @code{:width} and @code{:align-to} properties are supported on |
| 3097 | non-graphic terminals, but the other space properties in this section | 3140 | non-graphic terminals, but the other space properties in this section |
| 3098 | are not. | 3141 | are not. |
| 3099 | 3142 | ||
| @@ -3156,10 +3199,11 @@ the left-margin, use | |||
| 3156 | to the left edge of the text area. For example, @samp{:align-to 0} in a | 3199 | to the left edge of the text area. For example, @samp{:align-to 0} in a |
| 3157 | header-line aligns with the first text column in the text area. | 3200 | header-line aligns with the first text column in the text area. |
| 3158 | 3201 | ||
| 3159 | A value of the form @code{(@var{num} . @var{expr})} stands | 3202 | A value of the form @code{(@var{num} . @var{expr})} stands for the |
| 3160 | multiplying the values of @var{num} and @var{expr}. For example, | 3203 | product of the values of @var{num} and @var{expr}. For example, |
| 3161 | @code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 . | 3204 | @code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 . |
| 3162 | @var{image})} specifies half the width (or height) of the specified image. | 3205 | @var{image})} specifies half the width (or height) of the specified |
| 3206 | image. | ||
| 3163 | 3207 | ||
| 3164 | The form @code{(+ @var{expr} ...)} adds up the value of the | 3208 | The form @code{(+ @var{expr} ...)} adds up the value of the |
| 3165 | expressions. The form @code{(- @var{expr} ...)} negates or subtracts | 3209 | expressions. The form @code{(- @var{expr} ...)} negates or subtracts |
| @@ -3173,9 +3217,9 @@ in the @code{display} text property. | |||
| 3173 | 3217 | ||
| 3174 | @table @code | 3218 | @table @code |
| 3175 | @item (image . @var{image-props}) | 3219 | @item (image . @var{image-props}) |
| 3176 | This is in fact an image descriptor (@pxref{Images}). When used as a | 3220 | This display specification is an image descriptor (@pxref{Images}). |
| 3177 | display specification, it means to display the image instead of the text | 3221 | When used as a display specification, it means to display the image |
| 3178 | that has the display specification. | 3222 | instead of the text that has the display specification. |
| 3179 | 3223 | ||
| 3180 | @item (slice @var{x} @var{y} @var{width} @var{height}) | 3224 | @item (slice @var{x} @var{y} @var{width} @var{height}) |
| 3181 | This specification together with @code{image} specifies a @dfn{slice} | 3225 | This specification together with @code{image} specifies a @dfn{slice} |
| @@ -3246,6 +3290,17 @@ not affect the amount of raising or lowering, which is based on the | |||
| 3246 | faces used for the text. | 3290 | faces used for the text. |
| 3247 | @end table | 3291 | @end table |
| 3248 | 3292 | ||
| 3293 | You can make any display specification conditional. To do that, | ||
| 3294 | package it in another list of the form @code{(when @var{condition} . | ||
| 3295 | @var{spec})}. Then the specification @var{spec} applies only when | ||
| 3296 | @var{condition} evaluates to a non-@code{nil} value. During the | ||
| 3297 | evaluation, @code{object} is bound to the string or buffer having the | ||
| 3298 | conditional @code{display} property. @code{position} and | ||
| 3299 | @code{buffer-position} are bound to the position within @code{object} | ||
| 3300 | and the buffer position where the @code{display} property was found, | ||
| 3301 | respectively. Both positions can be different when @code{object} is a | ||
| 3302 | string. | ||
| 3303 | |||
| 3249 | @node Display Margins | 3304 | @node Display Margins |
| 3250 | @subsection Displaying in the Margins | 3305 | @subsection Displaying in the Margins |
| 3251 | @cindex display margins | 3306 | @cindex display margins |
| @@ -3308,21 +3363,6 @@ as a cons cell of the form @code{(@var{left} . @var{right})}. | |||
| 3308 | If @var{window} is @code{nil}, the selected window is used. | 3363 | If @var{window} is @code{nil}, the selected window is used. |
| 3309 | @end defun | 3364 | @end defun |
| 3310 | 3365 | ||
| 3311 | @node Conditional Display | ||
| 3312 | @subsection Conditional Display Specifications | ||
| 3313 | @cindex conditional display specifications | ||
| 3314 | |||
| 3315 | You can make any display specification conditional. To do that, | ||
| 3316 | package it in another list of the form @code{(when @var{condition} . | ||
| 3317 | @var{spec})}. Then the specification @var{spec} applies only when | ||
| 3318 | @var{condition} evaluates to a non-@code{nil} value. During the | ||
| 3319 | evaluation, @code{object} is bound to the string or buffer having the | ||
| 3320 | conditional @code{display} property. @code{position} and | ||
| 3321 | @code{buffer-position} are bound to the position within @code{object} | ||
| 3322 | and the buffer position where the @code{display} property was found, | ||
| 3323 | respectively. Both positions can be different when @code{object} is a | ||
| 3324 | string. | ||
| 3325 | |||
| 3326 | @node Images | 3366 | @node Images |
| 3327 | @section Images | 3367 | @section Images |
| 3328 | @cindex images in buffers | 3368 | @cindex images in buffers |
| @@ -3333,16 +3373,16 @@ property of text that is displayed (@pxref{Display Property}). | |||
| 3333 | 3373 | ||
| 3334 | Emacs can display a number of different image formats; some of them | 3374 | Emacs can display a number of different image formats; some of them |
| 3335 | are supported only if particular support libraries are installed on | 3375 | are supported only if particular support libraries are installed on |
| 3336 | your machine. In some environments, Emacs allows loading image | 3376 | your machine. In some environments, Emacs can load image |
| 3337 | libraries on demand; if so, the variable @code{image-library-alist} | 3377 | libraries on demand; if so, the variable @code{image-library-alist} |
| 3338 | can be used to modify the set of known names for these dynamic | 3378 | can be used to modify the set of known names for these dynamic |
| 3339 | libraries (though it is not possible to add new image formats). | 3379 | libraries (though it is not possible to add new image formats). |
| 3340 | 3380 | ||
| 3341 | The supported image formats include XBM, XPM (needing the | 3381 | The supported image formats include XBM, XPM (this requires the |
| 3342 | libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing | 3382 | libraries @code{libXpm} version 3.4k and @code{libz}), GIF (requiring |
| 3343 | @code{libungif} 4.1.0), Postscript, PBM, JPEG (needing the | 3383 | @code{libungif} 4.1.0), Postscript, PBM, JPEG (requiring the |
| 3344 | @code{libjpeg} library version v6a), TIFF (needing @code{libtiff} v3.4), | 3384 | @code{libjpeg} library version v6a), TIFF (requiring @code{libtiff} |
| 3345 | and PNG (needing @code{libpng} 1.0.2). | 3385 | v3.4), and PNG (requiring @code{libpng} 1.0.2). |
| 3346 | 3386 | ||
| 3347 | You specify one of these formats with an image type symbol. The image | 3387 | You specify one of these formats with an image type symbol. The image |
| 3348 | type symbols are @code{xbm}, @code{xpm}, @code{gif}, @code{postscript}, | 3388 | type symbols are @code{xbm}, @code{xpm}, @code{gif}, @code{postscript}, |
| @@ -3423,12 +3463,12 @@ types: | |||
| 3423 | 3463 | ||
| 3424 | @table @code | 3464 | @table @code |
| 3425 | @item :file @var{file} | 3465 | @item :file @var{file} |
| 3426 | The @code{:file} property specifies to load the image from file | 3466 | The @code{:file} property says to load the image from file |
| 3427 | @var{file}. If @var{file} is not an absolute file name, it is expanded | 3467 | @var{file}. If @var{file} is not an absolute file name, it is expanded |
| 3428 | in @code{data-directory}. | 3468 | in @code{data-directory}. |
| 3429 | 3469 | ||
| 3430 | @item :data @var{data} | 3470 | @item :data @var{data} |
| 3431 | The @code{:data} property specifies the actual contents of the image. | 3471 | The @code{:data} property says the actual contents of the image. |
| 3432 | Each image must use either @code{:data} or @code{:file}, but not both. | 3472 | Each image must use either @code{:data} or @code{:file}, but not both. |
| 3433 | For most image types, the value of the @code{:data} property should be a | 3473 | For most image types, the value of the @code{:data} property should be a |
| 3434 | string containing the image data; we recommend using a unibyte string. | 3474 | string containing the image data; we recommend using a unibyte string. |
| @@ -3687,12 +3727,7 @@ specifies the actual color to use for displaying that name. | |||
| 3687 | @subsection GIF Images | 3727 | @subsection GIF Images |
| 3688 | @cindex GIF | 3728 | @cindex GIF |
| 3689 | 3729 | ||
| 3690 | For GIF images, specify image type @code{gif}. Because of the patents | 3730 | For GIF images, specify image type @code{gif}. |
| 3691 | in the US covering the LZW algorithm, the continued use of GIF format is | ||
| 3692 | a problem for the whole Internet; to end this problem, it is a good idea | ||
| 3693 | for everyone, even outside the US, to stop using GIFs right away | ||
| 3694 | (@uref{http://www.burnallgifs.org/}). But if you still want to use | ||
| 3695 | them, Emacs can display them. | ||
| 3696 | 3731 | ||
| 3697 | @table @code | 3732 | @table @code |
| 3698 | @item :index @var{index} | 3733 | @item :index @var{index} |
| @@ -3871,8 +3906,9 @@ section. | |||
| 3871 | This function inserts @var{image} in the current buffer at point. The | 3906 | This function inserts @var{image} in the current buffer at point. The |
| 3872 | value @var{image} should be an image descriptor; it could be a value | 3907 | value @var{image} should be an image descriptor; it could be a value |
| 3873 | returned by @code{create-image}, or the value of a symbol defined with | 3908 | returned by @code{create-image}, or the value of a symbol defined with |
| 3874 | @code{defimage}. The argument @var{string} specifies the text to put in | 3909 | @code{defimage}. The argument @var{string} specifies the text to put |
| 3875 | the buffer to hold the image. | 3910 | in the buffer to hold the image. If it is omitted or @code{nil}, |
| 3911 | @code{insert-image} uses @code{" "} by default. | ||
| 3876 | 3912 | ||
| 3877 | The argument @var{area} specifies whether to put the image in a margin. | 3913 | The argument @var{area} specifies whether to put the image in a margin. |
| 3878 | If it is @code{left-margin}, the image appears in the left margin; | 3914 | If it is @code{left-margin}, the image appears in the left margin; |
| @@ -3983,16 +4019,16 @@ manipulating clickable (with the mouse, or via keyboard commands) | |||
| 3983 | buttons in Emacs buffers, such as might be used for help hyper-links, | 4019 | buttons in Emacs buffers, such as might be used for help hyper-links, |
| 3984 | etc. Emacs uses buttons for the hyper-links in help text and the like. | 4020 | etc. Emacs uses buttons for the hyper-links in help text and the like. |
| 3985 | 4021 | ||
| 3986 | A button is essentially a set of properties attached (via text | 4022 | A button is essentially a set of properties attached (via text |
| 3987 | properties or overlays) to a region of text in an Emacs buffer, which | 4023 | properties or overlays) to a region of text in an Emacs buffer. These |
| 3988 | are called its button properties. @xref{Button Properties}. | 4024 | properties are called @dfn{button properties}. |
| 3989 | 4025 | ||
| 3990 | One of the these properties (@code{action}) is a function, which will | 4026 | One of the these properties (@code{action}) is a function, which will |
| 3991 | be called when the user invokes it using the keyboard or the mouse. | 4027 | be called when the user invokes it using the keyboard or the mouse. |
| 3992 | The invoked function may then examine the button and use its other | 4028 | The invoked function may then examine the button and use its other |
| 3993 | properties as desired. | 4029 | properties as desired. |
| 3994 | 4030 | ||
| 3995 | In some ways the Emacs button package duplicates functionality offered | 4031 | In some ways the Emacs button package duplicates functionality offered |
| 3996 | by the widget package (@pxref{Top, , Introduction, widget, The Emacs | 4032 | by the widget package (@pxref{Top, , Introduction, widget, The Emacs |
| 3997 | Widget Library}), but the button package has the advantage that it is | 4033 | Widget Library}), but the button package has the advantage that it is |
| 3998 | much faster, much smaller, and much simpler to use (for elisp | 4034 | much faster, much smaller, and much simpler to use (for elisp |
| @@ -4008,7 +4044,6 @@ entries). | |||
| 4008 | * Making Buttons:: Adding buttons to Emacs buffers. | 4044 | * Making Buttons:: Adding buttons to Emacs buffers. |
| 4009 | * Manipulating Buttons:: Getting and setting properties of buttons. | 4045 | * Manipulating Buttons:: Getting and setting properties of buttons. |
| 4010 | * Button Buffer Commands:: Buffer-wide commands and bindings for buttons. | 4046 | * Button Buffer Commands:: Buffer-wide commands and bindings for buttons. |
| 4011 | * Manipulating Button Types:: | ||
| 4012 | @end menu | 4047 | @end menu |
| 4013 | 4048 | ||
| 4014 | @node Button Properties | 4049 | @node Button Properties |
| @@ -4017,13 +4052,10 @@ entries). | |||
| 4017 | 4052 | ||
| 4018 | Buttons have an associated list of properties defining their | 4053 | Buttons have an associated list of properties defining their |
| 4019 | appearance and behavior, and other arbitrary properties may be used | 4054 | appearance and behavior, and other arbitrary properties may be used |
| 4020 | for application specific purposes. | 4055 | for application specific purposes. Some properties that have special |
| 4021 | 4056 | meaning to the button package include: | |
| 4022 | Some properties that have special meaning to the button package | ||
| 4023 | include: | ||
| 4024 | 4057 | ||
| 4025 | @table @code | 4058 | @table @code |
| 4026 | |||
| 4027 | @item action | 4059 | @item action |
| 4028 | @kindex action @r{(button property)} | 4060 | @kindex action @r{(button property)} |
| 4029 | The function to call when the user invokes the button, which is passed | 4061 | The function to call when the user invokes the button, which is passed |
| @@ -4078,7 +4110,7 @@ in finding regions of text that comprise buttons (which is what the | |||
| 4078 | standard button functions do). | 4110 | standard button functions do). |
| 4079 | @end table | 4111 | @end table |
| 4080 | 4112 | ||
| 4081 | There are other properties defined for the regions of text in a | 4113 | There are other properties defined for the regions of text in a |
| 4082 | button, but these are not generally interesting for typical uses. | 4114 | button, but these are not generally interesting for typical uses. |
| 4083 | 4115 | ||
| 4084 | @node Button Types | 4116 | @node Button Types |
| @@ -4106,9 +4138,9 @@ property values. Note that this inheritance happens only when | |||
| 4106 | reflected in its subtypes. | 4138 | reflected in its subtypes. |
| 4107 | @end defun | 4139 | @end defun |
| 4108 | 4140 | ||
| 4109 | Using @code{define-button-type} to define default properties for | 4141 | Using @code{define-button-type} to define default properties for |
| 4110 | buttons is not necessary---buttons without any specified type use the | 4142 | buttons is not necessary---buttons without any specified type use the |
| 4111 | built-in button-type @code{button}---but it is is encouraged, since | 4143 | built-in button-type @code{button}---but it is encouraged, since |
| 4112 | doing so usually makes the resulting code clearer and more efficient. | 4144 | doing so usually makes the resulting code clearer and more efficient. |
| 4113 | 4145 | ||
| 4114 | @node Making Buttons | 4146 | @node Making Buttons |
| @@ -4116,19 +4148,19 @@ doing so usually makes the resulting code clearer and more efficient. | |||
| 4116 | @cindex making buttons | 4148 | @cindex making buttons |
| 4117 | 4149 | ||
| 4118 | Buttons are associated with a region of text, using an overlay or | 4150 | Buttons are associated with a region of text, using an overlay or |
| 4119 | text-properties to hold button-specific information, all of which are | 4151 | text properties to hold button-specific information, all of which are |
| 4120 | initialized from the button's type (which defaults to the built-in | 4152 | initialized from the button's type (which defaults to the built-in |
| 4121 | button type @code{button}). Like all Emacs text, the appearance of | 4153 | button type @code{button}). Like all Emacs text, the appearance of |
| 4122 | the button is governed by the @code{face} property; by default (via | 4154 | the button is governed by the @code{face} property; by default (via |
| 4123 | the @code{face} property inherited from the @code{button} button-type) | 4155 | the @code{face} property inherited from the @code{button} button-type) |
| 4124 | this is a simple underline, like a typical web-page link. | 4156 | this is a simple underline, like a typical web-page link. |
| 4125 | 4157 | ||
| 4126 | For convenience, there are two sorts of button-creation functions, | 4158 | For convenience, there are two sorts of button-creation functions, |
| 4127 | those that add button properties to an existing region of a buffer, | 4159 | those that add button properties to an existing region of a buffer, |
| 4128 | called @code{make-...button}, and those also insert the button text, | 4160 | called @code{make-...button}, and those also insert the button text, |
| 4129 | called @code{insert-...button}. | 4161 | called @code{insert-...button}. |
| 4130 | 4162 | ||
| 4131 | The button-creation functions all take the @code{&rest} argument | 4163 | The button-creation functions all take the @code{&rest} argument |
| 4132 | @var{properties}, which should be a sequence of @var{property value} | 4164 | @var{properties}, which should be a sequence of @var{property value} |
| 4133 | pairs, specifying properties to add to the button; see @ref{Button | 4165 | pairs, specifying properties to add to the button; see @ref{Button |
| 4134 | Properties}. In addition, the keyword argument @code{:type} may be | 4166 | Properties}. In addition, the keyword argument @code{:type} may be |
| @@ -4137,40 +4169,41 @@ see @ref{Button Types}. Any properties not explicitly specified | |||
| 4137 | during creation will be inherited from the button's type (if the type | 4169 | during creation will be inherited from the button's type (if the type |
| 4138 | defines such a property). | 4170 | defines such a property). |
| 4139 | 4171 | ||
| 4140 | The following functions add a button using an overlay | 4172 | The following functions add a button using an overlay |
| 4141 | (@pxref{Overlays}) to hold the button properties: | 4173 | (@pxref{Overlays}) to hold the button properties: |
| 4142 | 4174 | ||
| 4143 | @defun make-button beg end &rest properties | 4175 | @defun make-button beg end &rest properties |
| 4144 | @tindex make-button | 4176 | @tindex make-button |
| 4145 | Make a button from @var{beg} to @var{end} in the current buffer. | 4177 | This makes a button from @var{beg} to @var{end} in the |
| 4178 | current buffer, and returns it. | ||
| 4146 | @end defun | 4179 | @end defun |
| 4147 | 4180 | ||
| 4148 | @defun insert-button label &rest properties | 4181 | @defun insert-button label &rest properties |
| 4149 | @tindex insert-button | 4182 | @tindex insert-button |
| 4150 | Insert a button with the label @var{label}. | 4183 | This insert a button with the label @var{label} at point, |
| 4184 | and returns it. | ||
| 4151 | @end defun | 4185 | @end defun |
| 4152 | 4186 | ||
| 4153 | The following functions are similar, but use Emacs text-properties | 4187 | The following functions are similar, but use Emacs text properties |
| 4154 | (@pxref{Text Properties}) to hold the button properties, making the | 4188 | (@pxref{Text Properties}) to hold the button properties, making the |
| 4155 | button actually part of the text instead of being a property of the | 4189 | button actually part of the text instead of being a property of the |
| 4156 | buffer (using text-properties is usually faster than using overlays, | 4190 | buffer. Buttons using text properties do not create markers into the |
| 4157 | so this may be preferable when creating large numbers of buttons): | 4191 | buffer, which is important for speed when you use extremely large |
| 4192 | numbers of buttons. Both functions return the position of the start | ||
| 4193 | of the new button: | ||
| 4158 | 4194 | ||
| 4159 | @defun make-text-button beg end &rest properties | 4195 | @defun make-text-button beg end &rest properties |
| 4160 | @tindex make-text-button | 4196 | @tindex make-text-button |
| 4161 | Make a button from @var{beg} to @var{end} in the current buffer, using | 4197 | This makes a button from @var{beg} to @var{end} in the current buffer, using |
| 4162 | text-properties. | 4198 | text properties. |
| 4163 | @end defun | 4199 | @end defun |
| 4164 | 4200 | ||
| 4165 | @defun insert-text-button label &rest properties | 4201 | @defun insert-text-button label &rest properties |
| 4166 | @tindex insert-text-button | 4202 | @tindex insert-text-button |
| 4167 | Insert a button with the label @var{label}, using text-properties. | 4203 | This inserts a button with the label @var{label} at point, using text |
| 4204 | properties. | ||
| 4168 | @end defun | 4205 | @end defun |
| 4169 | 4206 | ||
| 4170 | Buttons using text-properties retain no markers into the buffer are | ||
| 4171 | retained, which is important for speed in cases where there are | ||
| 4172 | extremely large numbers of buttons. | ||
| 4173 | |||
| 4174 | @node Manipulating Buttons | 4207 | @node Manipulating Buttons |
| 4175 | @subsection Manipulating Buttons | 4208 | @subsection Manipulating Buttons |
| 4176 | @cindex manipulating buttons | 4209 | @cindex manipulating buttons |
| @@ -4234,6 +4267,21 @@ Return @code{t} if @var{button} has button-type @var{type}, or one of | |||
| 4234 | Return the button at position @var{pos} in the current buffer, or @code{nil}. | 4267 | Return the button at position @var{pos} in the current buffer, or @code{nil}. |
| 4235 | @end defun | 4268 | @end defun |
| 4236 | 4269 | ||
| 4270 | @defun button-type-put type prop val | ||
| 4271 | @tindex button-type-put | ||
| 4272 | Set the button-type @var{type}'s @var{prop} property to @var{val}. | ||
| 4273 | @end defun | ||
| 4274 | |||
| 4275 | @defun button-type-get type prop | ||
| 4276 | @tindex button-type-get | ||
| 4277 | Get the property of button-type @var{type} named @var{prop}. | ||
| 4278 | @end defun | ||
| 4279 | |||
| 4280 | @defun button-type-subtype-p type supertype | ||
| 4281 | @tindex button-type-subtype-p | ||
| 4282 | Return @code{t} if button-type @var{type} is a subtype of @var{supertype}. | ||
| 4283 | @end defun | ||
| 4284 | |||
| 4237 | @node Button Buffer Commands | 4285 | @node Button Buffer Commands |
| 4238 | @subsection Button Buffer Commands | 4286 | @subsection Button Buffer Commands |
| 4239 | @cindex button buffer commands | 4287 | @cindex button buffer commands |
| @@ -4251,8 +4299,9 @@ which uses buttons may want to use @code{button-buffer-map} as a | |||
| 4251 | parent keymap for its keymap. | 4299 | parent keymap for its keymap. |
| 4252 | 4300 | ||
| 4253 | If the button has a non-@code{nil} @code{follow-link} property, and | 4301 | If the button has a non-@code{nil} @code{follow-link} property, and |
| 4254 | @var{mouse-1-click-follows-link} is set, a @key{Mouse-1} click will | 4302 | @var{mouse-1-click-follows-link} is set, a quick @key{Mouse-1} click |
| 4255 | also activate the @code{push-button} command. | 4303 | will also activate the @code{push-button} command. |
| 4304 | @xref{Links and Mouse-1}. | ||
| 4256 | 4305 | ||
| 4257 | @deffn Command push-button &optional pos use-mouse-action | 4306 | @deffn Command push-button &optional pos use-mouse-action |
| 4258 | @tindex push-button | 4307 | @tindex push-button |
| @@ -4304,25 +4353,6 @@ buffer. If @var{count-current} is non-@code{nil}, count any button at | |||
| 4304 | @var{pos} in the search, instead of starting at the next button. | 4353 | @var{pos} in the search, instead of starting at the next button. |
| 4305 | @end defun | 4354 | @end defun |
| 4306 | 4355 | ||
| 4307 | @node Manipulating Button Types | ||
| 4308 | @subsection Manipulating Button Types | ||
| 4309 | @cindex manipulating button types | ||
| 4310 | |||
| 4311 | @defun button-type-put type prop val | ||
| 4312 | @tindex button-type-put | ||
| 4313 | Set the button-type @var{type}'s @var{prop} property to @var{val}. | ||
| 4314 | @end defun | ||
| 4315 | |||
| 4316 | @defun button-type-get type prop | ||
| 4317 | @tindex button-type-get | ||
| 4318 | Get the property of button-type @var{type} named @var{prop}. | ||
| 4319 | @end defun | ||
| 4320 | |||
| 4321 | @defun button-type-subtype-p type supertype | ||
| 4322 | @tindex button-type-subtype-p | ||
| 4323 | Return @code{t} if button-type @var{type} is a subtype of @var{supertype}. | ||
| 4324 | @end defun | ||
| 4325 | |||
| 4326 | @node Blinking | 4356 | @node Blinking |
| 4327 | @section Blinking Parentheses | 4357 | @section Blinking Parentheses |
| 4328 | @cindex parenthesis matching | 4358 | @cindex parenthesis matching |
| @@ -4396,14 +4426,10 @@ default is @code{nil}. | |||
| 4396 | @end defopt | 4426 | @end defopt |
| 4397 | 4427 | ||
| 4398 | @defopt mode-line-inverse-video | 4428 | @defopt mode-line-inverse-video |
| 4399 | This variable controls the use of inverse video for mode lines and menu | 4429 | This variable controls the use of inverse video for mode lines and |
| 4400 | bars. If it is non-@code{nil}, then these lines are displayed in | 4430 | menu bars. If it is non-@code{nil}, then these lines are displayed in |
| 4401 | inverse video. Otherwise, these lines are displayed normally, just like | 4431 | the face @code{mode-line}. Otherwise, these lines are displayed |
| 4402 | other text. The default is @code{t}. | 4432 | normally, just like other text. The default is @code{t}. |
| 4403 | |||
| 4404 | For window frames, this feature actually applies the face named | ||
| 4405 | @code{mode-line}; that face is normally set up as the inverse of the | ||
| 4406 | default face, unless you change it. | ||
| 4407 | @end defopt | 4433 | @end defopt |
| 4408 | 4434 | ||
| 4409 | @node Usual Display | 4435 | @node Usual Display |
| @@ -4587,22 +4613,26 @@ means to use the default for that slot, as stated below. | |||
| 4587 | @table @asis | 4613 | @table @asis |
| 4588 | @item 0 | 4614 | @item 0 |
| 4589 | The glyph for the end of a truncated screen line (the default for this | 4615 | The glyph for the end of a truncated screen line (the default for this |
| 4590 | is @samp{$}). @xref{Glyphs}. Newer Emacs versions, on some platforms, | 4616 | is @samp{$}). @xref{Glyphs}. On graphical terminals, Emacs uses |
| 4591 | display arrows to indicate truncation---the display table has no effect | 4617 | arrows in the fringes to indicate truncation, so the display table has |
| 4592 | in these situations. | 4618 | no effect. |
| 4619 | |||
| 4593 | @item 1 | 4620 | @item 1 |
| 4594 | The glyph for the end of a continued line (the default is @samp{\}). | 4621 | The glyph for the end of a continued line (the default is @samp{\}). |
| 4595 | Newer Emacs versions, on some platforms, display curved arrows to | 4622 | On graphical terminals, Emacs uses curved arrows in the fringes to |
| 4596 | indicate continuation---the display table has no effect in these | 4623 | indicate continuation, so the display table has no effect. |
| 4597 | situations. | 4624 | |
| 4598 | @item 2 | 4625 | @item 2 |
| 4599 | The glyph for indicating a character displayed as an octal character | 4626 | The glyph for indicating a character displayed as an octal character |
| 4600 | code (the default is @samp{\}). | 4627 | code (the default is @samp{\}). |
| 4628 | |||
| 4601 | @item 3 | 4629 | @item 3 |
| 4602 | The glyph for indicating a control character (the default is @samp{^}). | 4630 | The glyph for indicating a control character (the default is @samp{^}). |
| 4631 | |||
| 4603 | @item 4 | 4632 | @item 4 |
| 4604 | A vector of glyphs for indicating the presence of invisible lines (the | 4633 | A vector of glyphs for indicating the presence of invisible lines (the |
| 4605 | default is @samp{...}). @xref{Selective Display}. | 4634 | default is @samp{...}). @xref{Selective Display}. |
| 4635 | |||
| 4606 | @item 5 | 4636 | @item 5 |
| 4607 | The glyph used to draw the border between side-by-side windows (the | 4637 | The glyph used to draw the border between side-by-side windows (the |
| 4608 | default is @samp{|}). @xref{Splitting Windows}. This takes effect only | 4638 | default is @samp{|}). @xref{Splitting Windows}. This takes effect only |
| @@ -4662,9 +4692,10 @@ table for buffer @var{b} if it has one; otherwise, the standard display | |||
| 4662 | table if any. The display table chosen is called the @dfn{active} | 4692 | table if any. The display table chosen is called the @dfn{active} |
| 4663 | display table. | 4693 | display table. |
| 4664 | 4694 | ||
| 4665 | @defun window-display-table window | 4695 | @defun window-display-table &optional window |
| 4666 | This function returns @var{window}'s display table, or @code{nil} | 4696 | This function returns @var{window}'s display table, or @code{nil} |
| 4667 | if @var{window} does not have an assigned display table. | 4697 | if @var{window} does not have an assigned display table. The default |
| 4698 | for @var{window} is the selected window. | ||
| 4668 | @end defun | 4699 | @end defun |
| 4669 | 4700 | ||
| 4670 | @defun set-window-display-table window table | 4701 | @defun set-window-display-table window table |
diff --git a/lispref/edebug.texi b/lispref/edebug.texi index 835ddf91e94..a007f81dcfb 100644 --- a/lispref/edebug.texi +++ b/lispref/edebug.texi | |||
| @@ -99,7 +99,7 @@ which stops execution. @xref{Edebug Execution Modes}. | |||
| 99 | the Lisp code you are debugging. This is referred to as the @dfn{source | 99 | the Lisp code you are debugging. This is referred to as the @dfn{source |
| 100 | code buffer}, and it is temporarily read-only. | 100 | code buffer}, and it is temporarily read-only. |
| 101 | 101 | ||
| 102 | An arrow at the left margin indicates the line where the function is | 102 | An arrow in the left fringe indicates the line where the function is |
| 103 | executing. Point initially shows where within the line the function is | 103 | executing. Point initially shows where within the line the function is |
| 104 | executing, but this ceases to be true if you move point yourself. | 104 | executing, but this ceases to be true if you move point yourself. |
| 105 | 105 | ||
| @@ -158,16 +158,15 @@ into it, to invoke Edebug at the proper places. | |||
| 158 | 158 | ||
| 159 | @kindex C-M-x | 159 | @kindex C-M-x |
| 160 | @findex eval-defun (Edebug) | 160 | @findex eval-defun (Edebug) |
| 161 | Once you have loaded Edebug, the command @kbd{C-M-x} | 161 | When you invoke command @kbd{C-M-x} (@code{eval-defun}) with a |
| 162 | (@code{eval-defun}) is redefined so that when invoked with a prefix | 162 | prefix argument on a function definition, it instruments the |
| 163 | argument on a definition, it instruments the definition before | 163 | definition before evaluating it. (This does not modify the source |
| 164 | evaluating it. (The source code itself is not modified.) If the | 164 | code itself.) If the variable @code{edebug-all-defs} is |
| 165 | variable @code{edebug-all-defs} is non-@code{nil}, that inverts the | 165 | non-@code{nil}, that inverts the meaning of the prefix argument: in |
| 166 | meaning of the prefix argument: in this case, @kbd{C-M-x} instruments the | 166 | this case, @kbd{C-M-x} instruments the definition @emph{unless} it has |
| 167 | definition @emph{unless} it has a prefix argument. The default value of | 167 | a prefix argument. The default value of @code{edebug-all-defs} is |
| 168 | @code{edebug-all-defs} is @code{nil}. The command @kbd{M-x | 168 | @code{nil}. The command @kbd{M-x edebug-all-defs} toggles the value |
| 169 | edebug-all-defs} toggles the value of the variable | 169 | of the variable @code{edebug-all-defs}. |
| 170 | @code{edebug-all-defs}. | ||
| 171 | 170 | ||
| 172 | @findex eval-region @r{(Edebug)} | 171 | @findex eval-region @r{(Edebug)} |
| 173 | @findex eval-current-buffer @r{(Edebug)} | 172 | @findex eval-current-buffer @r{(Edebug)} |
| @@ -302,11 +301,12 @@ executing a keyboard macro outside of Edebug does not affect commands | |||
| 302 | inside Edebug. This is usually an advantage. See also the | 301 | inside Edebug. This is usually an advantage. See also the |
| 303 | @code{edebug-continue-kbd-macro} option (@pxref{Edebug Options}). | 302 | @code{edebug-continue-kbd-macro} option (@pxref{Edebug Options}). |
| 304 | 303 | ||
| 305 | When you enter a new Edebug level, the initial execution mode comes from | 304 | When you enter a new Edebug level, the initial execution mode comes |
| 306 | the value of the variable @code{edebug-initial-mode}. By default, this | 305 | from the value of the variable @code{edebug-initial-mode}. |
| 307 | specifies step mode. Note that you may reenter the same Edebug level | 306 | (@xref{Edebug Options}.) By default, this specifies step mode. Note |
| 308 | several times if, for example, an instrumented function is called | 307 | that you may reenter the same Edebug level several times if, for |
| 309 | several times from one command. | 308 | example, an instrumented function is called several times from one |
| 309 | command. | ||
| 310 | 310 | ||
| 311 | @defopt edebug-sit-for-seconds | 311 | @defopt edebug-sit-for-seconds |
| 312 | This option specifies how many seconds to wait between execution steps | 312 | This option specifies how many seconds to wait between execution steps |
| @@ -1074,7 +1074,7 @@ time later.) | |||
| 1074 | 1074 | ||
| 1075 | Therefore, you must define an Edebug specification for each macro | 1075 | Therefore, you must define an Edebug specification for each macro |
| 1076 | that Edebug will encounter, to explain the format of calls to that | 1076 | that Edebug will encounter, to explain the format of calls to that |
| 1077 | macro. To do this, add an @code{edebug} declaration to the macro | 1077 | macro. To do this, add a @code{debug} declaration to the macro |
| 1078 | definition. Here is a simple example that shows the specification for | 1078 | definition. Here is a simple example that shows the specification for |
| 1079 | the @code{for} example macro (@pxref{Argument Evaluation}). | 1079 | the @code{for} example macro (@pxref{Argument Evaluation}). |
| 1080 | 1080 | ||
| @@ -1095,10 +1095,9 @@ the @code{declare} form. | |||
| 1095 | 1095 | ||
| 1096 | You can also define an edebug specification for a macro separately | 1096 | You can also define an edebug specification for a macro separately |
| 1097 | from the macro definition with @code{def-edebug-spec}. Adding | 1097 | from the macro definition with @code{def-edebug-spec}. Adding |
| 1098 | @code{edebug} declarations is preferred, and more convenient, for | 1098 | @code{debug} declarations is preferred, and more convenient, for macro |
| 1099 | macro definitions in Lisp, but @code{def-edebug-spec} makes it | 1099 | definitions in Lisp, but @code{def-edebug-spec} makes it possible to |
| 1100 | possible to define Edebug specifications for special forms implemented | 1100 | define Edebug specifications for special forms implemented in C. |
| 1101 | in C. | ||
| 1102 | 1101 | ||
| 1103 | @deffn Macro def-edebug-spec macro specification | 1102 | @deffn Macro def-edebug-spec macro specification |
| 1104 | Specify which expressions of a call to macro @var{macro} are forms to be | 1103 | Specify which expressions of a call to macro @var{macro} are forms to be |
diff --git a/lispref/internals.texi b/lispref/internals.texi index a4c641a40a8..5a83c82ff5f 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi | |||
| @@ -477,28 +477,22 @@ usage: (or CONDITIONS ...) */) | |||
| 477 | (args) | 477 | (args) |
| 478 | Lisp_Object args; | 478 | Lisp_Object args; |
| 479 | @{ | 479 | @{ |
| 480 | register Lisp_Object val; | 480 | register Lisp_Object val = Qnil; |
| 481 | Lisp_Object args_left; | ||
| 482 | struct gcpro gcpro1; | 481 | struct gcpro gcpro1; |
| 483 | @end group | 482 | @end group |
| 484 | 483 | ||
| 485 | @group | 484 | @group |
| 486 | if (NILP (args)) | 485 | GCPRO1 (args); |
| 487 | return Qnil; | ||
| 488 | |||
| 489 | args_left = args; | ||
| 490 | GCPRO1 (args_left); | ||
| 491 | @end group | 486 | @end group |
| 492 | 487 | ||
| 493 | @group | 488 | @group |
| 494 | do | 489 | while (CONSP (args)) |
| 495 | @{ | 490 | @{ |
| 496 | val = Feval (Fcar (args_left)); | 491 | val = Feval (XCAR (args)); |
| 497 | if (!NILP (val)) | 492 | if (!NILP (val)) |
| 498 | break; | 493 | break; |
| 499 | args_left = Fcdr (args_left); | 494 | args = XCDR (args); |
| 500 | @} | 495 | @} |
| 501 | while (!NILP (args_left)); | ||
| 502 | @end group | 496 | @end group |
| 503 | 497 | ||
| 504 | @group | 498 | @group |
| @@ -549,7 +543,7 @@ indicating a special form that receives unevaluated arguments, or | |||
| 549 | @code{MANY}, indicating an unlimited number of evaluated arguments (the | 543 | @code{MANY}, indicating an unlimited number of evaluated arguments (the |
| 550 | equivalent of @code{&rest}). Both @code{UNEVALLED} and @code{MANY} are | 544 | equivalent of @code{&rest}). Both @code{UNEVALLED} and @code{MANY} are |
| 551 | macros. If @var{max} is a number, it may not be less than @var{min} and | 545 | macros. If @var{max} is a number, it may not be less than @var{min} and |
| 552 | it may not be greater than seven. | 546 | it may not be greater than eight. |
| 553 | 547 | ||
| 554 | @item interactive | 548 | @item interactive |
| 555 | This is an interactive specification, a string such as might be used as | 549 | This is an interactive specification, a string such as might be used as |
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index 62bd28fd78b..cf9e0acc819 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi | |||
| @@ -95,9 +95,10 @@ default value to @code{nil} early in startup. | |||
| 95 | 95 | ||
| 96 | @defun position-bytes position | 96 | @defun position-bytes position |
| 97 | @tindex position-bytes | 97 | @tindex position-bytes |
| 98 | Return the byte-position corresponding to buffer position @var{position} | 98 | Return the byte-position corresponding to buffer position |
| 99 | in the current buffer. If @var{position} is out of range, the value | 99 | @var{position} in the current buffer. This is 1 at the start of the |
| 100 | is @code{nil}. | 100 | buffer, and counts upward in bytes. If @var{position} is out of |
| 101 | range, the value is @code{nil}. | ||
| 101 | @end defun | 102 | @end defun |
| 102 | 103 | ||
| 103 | @defun byte-to-position byte-position | 104 | @defun byte-to-position byte-position |
| @@ -359,6 +360,11 @@ as the property list of that symbol. Charset properties are used for | |||
| 359 | special purposes within Emacs. | 360 | special purposes within Emacs. |
| 360 | @end defun | 361 | @end defun |
| 361 | 362 | ||
| 363 | @deffn Command list-charset-chars charset | ||
| 364 | This command displays a list of characters in the character set | ||
| 365 | @var{charset}. | ||
| 366 | @end deffn | ||
| 367 | |||
| 362 | @node Chars and Bytes | 368 | @node Chars and Bytes |
| 363 | @section Characters and Bytes | 369 | @section Characters and Bytes |
| 364 | @cindex bytes and characters | 370 | @cindex bytes and characters |
| @@ -474,6 +480,13 @@ part of a buffer or a string. One use for this is in determining which | |||
| 474 | coding systems (@pxref{Coding Systems}) are capable of representing all | 480 | coding systems (@pxref{Coding Systems}) are capable of representing all |
| 475 | of the text in question. | 481 | of the text in question. |
| 476 | 482 | ||
| 483 | @defun charset-after &optional pos | ||
| 484 | This function return the charset of a character in the current buffer | ||
| 485 | at position @var{pos}. If @var{pos} is omitted or @code{nil}, it | ||
| 486 | defauls to the current value of point. If @var{pos} is out of range, | ||
| 487 | the value is @code{nil}. | ||
| 488 | @end defun | ||
| 489 | |||
| 477 | @defun find-charset-region beg end &optional translation | 490 | @defun find-charset-region beg end &optional translation |
| 478 | This function returns a list of the character sets that appear in the | 491 | This function returns a list of the character sets that appear in the |
| 479 | current buffer between positions @var{beg} and @var{end}. | 492 | current buffer between positions @var{beg} and @var{end}. |
| @@ -673,7 +686,7 @@ a coding system for decoding the file data, and @code{write-region} | |||
| 673 | uses one to encode the buffer contents. | 686 | uses one to encode the buffer contents. |
| 674 | 687 | ||
| 675 | You can specify the coding system to use either explicitly | 688 | You can specify the coding system to use either explicitly |
| 676 | (@pxref{Specifying Coding Systems}), or implicitly using the defaulting | 689 | (@pxref{Specifying Coding Systems}), or implicitly using a default |
| 677 | mechanism (@pxref{Default Coding Systems}). But these methods may not | 690 | mechanism (@pxref{Default Coding Systems}). But these methods may not |
| 678 | completely specify what to do. For example, they may choose a coding | 691 | completely specify what to do. For example, they may choose a coding |
| 679 | system such as @code{undefined} which leaves the character code | 692 | system such as @code{undefined} which leaves the character code |
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 487c842f6f2..0160265e60f 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-03-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xlwmenuP.h: | ||
| 4 | * xlwmenu.h: Add missing copyright and license notice. | ||
| 5 | |||
| 1 | 2004-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 6 | 2004-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * xlwmenu.c (xlwMenuActionsList): Install MenuGadgetEscape as an | 8 | * xlwmenu.c (xlwMenuActionsList): Install MenuGadgetEscape as an |
| @@ -19,11 +24,11 @@ | |||
| 19 | 24 | ||
| 20 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 25 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 21 | 26 | ||
| 22 | * lwlib.h (_widget_value): Added lname and lkey. | 27 | * lwlib.h (_widget_value): Add lname and lkey. |
| 23 | 28 | ||
| 24 | 2004-01-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 29 | 2004-01-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 25 | 30 | ||
| 26 | * xlwmenuP.h (_XlwMenu_part): Added top_depth. | 31 | * xlwmenuP.h (_XlwMenu_part): Add top_depth. |
| 27 | 32 | ||
| 28 | * xlwmenu.h: Removed declaration of pop_up_menu | 33 | * xlwmenu.h: Removed declaration of pop_up_menu |
| 29 | 34 | ||
| @@ -56,8 +61,8 @@ | |||
| 56 | 61 | ||
| 57 | * lwlib-Xlw.c: Include lisp.h, not ../src/lisp.h. | 62 | * lwlib-Xlw.c: Include lisp.h, not ../src/lisp.h. |
| 58 | (lw_lucid_widget_p): Remove unused `mw'. | 63 | (lw_lucid_widget_p): Remove unused `mw'. |
| 59 | (xlw_update_one_widget, xlw_pop_instance) [PROTOTYPES]: Provide | 64 | (xlw_update_one_widget, xlw_pop_instance) [PROTOTYPES]: |
| 60 | ISO C arglists. | 65 | Provide ISO C arglists. |
| 61 | 66 | ||
| 62 | 2003-04-30 Lute Kamstra <lute@gnu.org> | 67 | 2003-04-30 Lute Kamstra <lute@gnu.org> |
| 63 | 68 | ||
| @@ -84,8 +89,7 @@ | |||
| 84 | 2002-11-20 Dave Love <fx@gnu.org> | 89 | 2002-11-20 Dave Love <fx@gnu.org> |
| 85 | 90 | ||
| 86 | * lwlib.c: Remove obsolete USE_OLIT code. | 91 | * lwlib.c: Remove obsolete USE_OLIT code. |
| 87 | [PROTOTYPES]: Provide ISO C arglists for functions with Boolean | 92 | [PROTOTYPES]: Provide ISO C arglists for functions with Boolean args. |
| 88 | args. | ||
| 89 | (lwlib_memset): Declare length arg as size_t. | 93 | (lwlib_memset): Declare length arg as size_t. |
| 90 | (malloc_widget_value): Cast arg of lwlib_memset. | 94 | (malloc_widget_value): Cast arg of lwlib_memset. |
| 91 | 95 | ||
| @@ -248,7 +252,7 @@ | |||
| 248 | 252 | ||
| 249 | * lwlib-Xm.c (make_menu_in_widget): Add an XmNpopdownCallback | 253 | * lwlib-Xm.c (make_menu_in_widget): Add an XmNpopdownCallback |
| 250 | instead of an XmNunmapCallback. | 254 | instead of an XmNunmapCallback. |
| 251 | (xm_unmap_callback): Removed. | 255 | (xm_unmap_callback): Remove. |
| 252 | 256 | ||
| 253 | * lwlib-Xm.c (make_menubar): Take out code in #if 0. | 257 | * lwlib-Xm.c (make_menubar): Take out code in #if 0. |
| 254 | 258 | ||
diff --git a/lwlib/xlwmenu.h b/lwlib/xlwmenu.h index c1f37b5617b..5ba052f1285 100644 --- a/lwlib/xlwmenu.h +++ b/lwlib/xlwmenu.h | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | /* Interface of a lightweight menubar widget. | ||
| 2 | Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of the Lucid Widget Library. | ||
| 5 | |||
| 6 | The Lucid Widget Library is free software; you can redistribute it and/or | ||
| 7 | modify 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 | The Lucid Widget Library 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 | |||
| 1 | #ifndef _XlwMenu_h | 21 | #ifndef _XlwMenu_h |
| 2 | #define _XlwMenu_h | 22 | #define _XlwMenu_h |
| 3 | 23 | ||
diff --git a/lwlib/xlwmenuP.h b/lwlib/xlwmenuP.h index f6aa0f4a58c..38bce796941 100644 --- a/lwlib/xlwmenuP.h +++ b/lwlib/xlwmenuP.h | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | /* Internals of a lightweight menubar widget. | ||
| 2 | Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of the Lucid Widget Library. | ||
| 5 | |||
| 6 | The Lucid Widget Library is free software; you can redistribute it and/or | ||
| 7 | modify 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 | The Lucid Widget Library 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 | |||
| 1 | #ifndef _XlwMenuP_h | 21 | #ifndef _XlwMenuP_h |
| 2 | #define _XlwMenuP_h | 22 | #define _XlwMenuP_h |
| 3 | 23 | ||
diff --git a/man/ChangeLog b/man/ChangeLog index e529e8dfb97..855d97973ee 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2005-03-14 Nick Roberts <nickrob@snap.net.nz> | ||
| 2 | |||
| 3 | * building.texi (Commands of GUD): Move paragraph on setting | ||
| 4 | breakpoints with mouse to the GDB Graphical Interface node. | ||
| 5 | |||
| 6 | 2005-03-07 Richard M. Stallman <rms@gnu.org> | ||
| 7 | |||
| 8 | * url.texi: Fix usage of "e.g.". | ||
| 9 | (HTTP language/coding): Explain the rules for these strings. | ||
| 10 | |||
| 11 | * misc.texi (Single Shell, Shell Options): Fix previous change. | ||
| 12 | |||
| 13 | * building.texi (Debugger Operation): Update GUD tooltip enable info. | ||
| 14 | |||
| 1 | 2005-03-06 Richard M. Stallman <rms@gnu.org> | 15 | 2005-03-06 Richard M. Stallman <rms@gnu.org> |
| 2 | 16 | ||
| 3 | * building.texi (Starting GUD): Don't explain text vs graphical | 17 | * building.texi (Starting GUD): Don't explain text vs graphical |
diff --git a/man/building.texi b/man/building.texi index 0adb55e38e7..8d0caaae281 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -414,11 +414,13 @@ history commands to repeat them. @xref{Shell Mode}. | |||
| 414 | 414 | ||
| 415 | @cindex tooltips with GUD | 415 | @cindex tooltips with GUD |
| 416 | @vindex tooltip-gud-modes | 416 | @vindex tooltip-gud-modes |
| 417 | @vindex tooltip-gud-tips-p | ||
| 417 | The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. | 418 | The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. |
| 418 | You activate this feature by customizing the @code{tooltip} group. | 419 | You activate this feature by setting the variable |
| 419 | Then you can display a variable's value in a tooltip simply by | 420 | @code{tooltip-gud-tips-p} to @code{t}. Then you can display a |
| 420 | pointing at it with the mouse. This operates in the GUD buffer and in | 421 | variable's value in a tooltip simply by pointing at it with the mouse. |
| 421 | source buffers with major modes in the list @code{tooltip-gud-modes}. | 422 | This operates in the GUD buffer and in source buffers with major modes |
| 423 | in the list @code{tooltip-gud-modes}. | ||
| 422 | 424 | ||
| 423 | @node Commands of GUD | 425 | @node Commands of GUD |
| 424 | @subsection Commands of GUD | 426 | @subsection Commands of GUD |
| @@ -568,14 +570,6 @@ be bizarre. See the GDB manual entry regarding @code{jump} for | |||
| 568 | details. | 570 | details. |
| 569 | @end table | 571 | @end table |
| 570 | 572 | ||
| 571 | With the GDB Graphical Interface, you can click @kbd{Mouse-1} on a | ||
| 572 | line of the source buffer, in the fringe or display margin, to set a | ||
| 573 | breakpoint there. If a breakpoint already exists on that line, this | ||
| 574 | action will remove it (@code{gdb-mouse-set-clear-breakpoint}). Where | ||
| 575 | Emacs uses the margin to display breakpoints, it is also possible to | ||
| 576 | enable or disable them when you click @kbd{Mouse-3} there | ||
| 577 | (@code{gdb-mouse-toggle--breakpoint}). | ||
| 578 | |||
| 579 | These commands interpret a numeric argument as a repeat count, when | 573 | These commands interpret a numeric argument as a repeat count, when |
| 580 | that makes sense. | 574 | that makes sense. |
| 581 | 575 | ||
| @@ -656,7 +650,14 @@ ignores any numeric argument. | |||
| 656 | interface where you view and control the program's data using Emacs | 650 | interface where you view and control the program's data using Emacs |
| 657 | windows. You can still interact with GDB through the GUD buffer, but | 651 | windows. You can still interact with GDB through the GUD buffer, but |
| 658 | the point of this mode is that you can do it through menus and clicks, | 652 | the point of this mode is that you can do it through menus and clicks, |
| 659 | without needing to know GDB commands. | 653 | without needing to know GDB commands. For example, you can click |
| 654 | @kbd{Mouse-1} on a line of the source buffer, in the fringe or display | ||
| 655 | margin, to set a breakpoint there. If a breakpoint already exists on | ||
| 656 | that line, this action will remove it | ||
| 657 | (@code{gdb-mouse-set-clear-breakpoint}). Where Emacs uses the margin | ||
| 658 | to display breakpoints, it is also possible to enable or disable them | ||
| 659 | when you click @kbd{Mouse-3} there | ||
| 660 | (@code{gdb-mouse-toggle--breakpoint}). | ||
| 660 | 661 | ||
| 661 | @vindex gud-gdb-command-name | 662 | @vindex gud-gdb-command-name |
| 662 | @findex gdba | 663 | @findex gdba |
diff --git a/man/misc.texi b/man/misc.texi index 9dae303fb05..d5c7572abcf 100644 --- a/man/misc.texi +++ b/man/misc.texi | |||
| @@ -391,7 +391,7 @@ returns the command's exit status when it is called from a Lisp program. | |||
| 391 | 391 | ||
| 392 | One use for @kbd{M-|} is to run @code{gpg} to see what keys are in | 392 | One use for @kbd{M-|} is to run @code{gpg} to see what keys are in |
| 393 | the buffer. For instance, if the buffer contains a GPG key, type | 393 | the buffer. For instance, if the buffer contains a GPG key, type |
| 394 | @kbd{C-x h M-| uudecode @key{RET}} to feed the entire buffer contents | 394 | @kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents |
| 395 | to the @code{gpg} program. That program will ignore everything except | 395 | to the @code{gpg} program. That program will ignore everything except |
| 396 | the encoded keys, and will output a list of the keys it contains. | 396 | the encoded keys, and will output a list of the keys it contains. |
| 397 | 397 | ||
| @@ -958,7 +958,7 @@ point does not jump to the end. | |||
| 958 | 958 | ||
| 959 | @vindex comint-prompt-read-only | 959 | @vindex comint-prompt-read-only |
| 960 | If you set @code{comint-prompt-read-only}, the prompts in the Comint | 960 | If you set @code{comint-prompt-read-only}, the prompts in the Comint |
| 961 | buffer a read-only. | 961 | buffer are read-only. |
| 962 | 962 | ||
| 963 | @vindex comint-input-ignoredups | 963 | @vindex comint-input-ignoredups |
| 964 | The variable @code{comint-input-ignoredups} controls whether successive | 964 | The variable @code{comint-input-ignoredups} controls whether successive |
diff --git a/man/url.texi b/man/url.texi index aa4188b196f..e06656ef5b5 100644 --- a/man/url.texi +++ b/man/url.texi | |||
| @@ -109,7 +109,7 @@ use the `well known' port for that service when accessing URLs. With | |||
| 109 | the possible exception of @code{telnet}, it is rare for ports to be | 109 | the possible exception of @code{telnet}, it is rare for ports to be |
| 110 | specified, and it is possible using a non-standard port may have | 110 | specified, and it is possible using a non-standard port may have |
| 111 | undesired consequences if a different service is listening on that | 111 | undesired consequences if a different service is listening on that |
| 112 | port (e.g.@: an HTTP URL specifying the SMTP port can cause mail to be | 112 | port (e.g., an HTTP URL specifying the SMTP port can cause mail to be |
| 113 | sent).@c , but @xref{Other Variables, url-bad-port-list}. | 113 | sent).@c , but @xref{Other Variables, url-bad-port-list}. |
| 114 | The meaning of | 114 | The meaning of |
| 115 | the @var{path} component depends on the service. | 115 | the @var{path} component depends on the service. |
| @@ -142,7 +142,7 @@ URLs. These are actually vectors of the form: | |||
| 142 | @noindent where | 142 | @noindent where |
| 143 | @table @var | 143 | @table @var |
| 144 | @item type | 144 | @item type |
| 145 | is the type of the URL scheme, e.g.@: @code{http} | 145 | is the type of the URL scheme, e.g., @code{http} |
| 146 | @item user | 146 | @item user |
| 147 | is the username associated with it, or @code{nil}; | 147 | is the username associated with it, or @code{nil}; |
| 148 | @item password | 148 | @item password |
| @@ -182,7 +182,7 @@ is @code{t} for a fully-specified URL, with a host part indicated by | |||
| 182 | @findex url-set-attributes | 182 | @findex url-set-attributes |
| 183 | @findex url-set-full | 183 | @findex url-set-full |
| 184 | These attributes have accessors named @code{url-@var{part}}, where | 184 | These attributes have accessors named @code{url-@var{part}}, where |
| 185 | @var{part} is the name of one of the elements above, e.g.@: | 185 | @var{part} is the name of one of the elements above, e.g., |
| 186 | @code{url-host}. Similarly, there are setters of the form | 186 | @code{url-host}. Similarly, there are setters of the form |
| 187 | @code{url-set-@var{part}}. | 187 | @code{url-set-@var{part}}. |
| 188 | 188 | ||
| @@ -317,7 +317,12 @@ Default is one hour. | |||
| 317 | @subsection Language and Encoding Preferences | 317 | @subsection Language and Encoding Preferences |
| 318 | 318 | ||
| 319 | HTTP allows clients to express preferences for the language and | 319 | HTTP allows clients to express preferences for the language and |
| 320 | encoding of documents which servers may honour. | 320 | encoding of documents which servers may honour. For each of these |
| 321 | variables, the value is a string; it can specify a single choice, or | ||
| 322 | it can be a comma-separated list in descending order of preference. | ||
| 323 | Each element can be followed by @samp{;q=@var{priority}} to specify | ||
| 324 | its preference level; e.g., for @code{url-mime-language-string}, | ||
| 325 | @w{@code{"de, en-gb;q=0.8, en;q=0.7"}}. | ||
| 321 | 326 | ||
| 322 | @defopt url-mime-charset-string | 327 | @defopt url-mime-charset-string |
| 323 | @cindex character sets | 328 | @cindex character sets |
| @@ -325,23 +330,22 @@ encoding of documents which servers may honour. | |||
| 325 | This variable specifies a preference for character sets when documents | 330 | This variable specifies a preference for character sets when documents |
| 326 | can be served in more than one encoding. | 331 | can be served in more than one encoding. |
| 327 | 332 | ||
| 328 | HTTP allows specifying a list of MIME charsets which indicate your | 333 | HTTP allows specifying a series of MIME charsets which indicate your |
| 329 | preferred character set encodings, e.g.@: Latin-9 or Big5, and these | 334 | preferred character set encodings, e.g., Latin-9 or Big5, and these |
| 330 | can be weighted. This list is generated automatically from the list | 335 | can be weighted. The default series is generated automatically from |
| 331 | of defined coding systems which have associated MIME types. These are | 336 | the associated MIME types of all defined coding systems, sorted by the |
| 332 | sorted by coding priority. @xref{Recognize Coding, , Recognizing | 337 | coding system priority specified in Emacs. @xref{Recognize Coding, , |
| 333 | Coding Systems, emacs, The GNU Emacs Manual}. | 338 | Recognizing Coding Systems, emacs, The GNU Emacs Manual}. |
| 334 | @end defopt | 339 | @end defopt |
| 335 | 340 | ||
| 336 | @defopt url-mime-language-string | 341 | @defopt url-mime-language-string |
| 337 | @cindex language preferences | 342 | @cindex language preferences |
| 338 | A string specifying the preferred language when servers can serve | 343 | A string specifying the preferred language when servers can serve |
| 339 | files in several languages. Use RFC 1766 abbreviations, e.g.@: | 344 | files in several languages. Use RFC 1766 abbreviations, e.g., |
| 340 | @samp{en} for English, @samp{de} for German. It can be a | 345 | @samp{en} for English, @samp{de} for German. |
| 341 | comma-separated list in descending order of preference. The ordering | 346 | |
| 342 | can be made explicit using `q' factors defined by HTTP, e.g.@: | 347 | The string can be @code{"*"} to get the first available language (as |
| 343 | @w{@samp{de, en-gb;q=0.8, en;q=0.7}}. It can be @samp{*} to get the | 348 | opposed to the default). |
| 344 | first available language (as opposed to the default). | ||
| 345 | @end defopt | 349 | @end defopt |
| 346 | 350 | ||
| 347 | @node HTTP URL Options | 351 | @node HTTP URL Options |
diff --git a/src/ChangeLog b/src/ChangeLog index 854a8673458..f0f27785e3d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,64 @@ | |||
| 1 | 2005-03-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * macterm.c (keycode_to_xkeysym_table): Change mapping so that it | ||
| 4 | coincide with that in Apple X11 except `clear', `enter' on | ||
| 5 | laptops, and fn + `enter' on laptops. | ||
| 6 | |||
| 7 | 2005-03-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8 | |||
| 9 | * xmenu.c (ENCODE_MENU_STRING): Explicitly use string_make_unibyte. | ||
| 10 | (list_of_panes, list_of_items, Fx_popup_menu): Use XCAR/XCDR. | ||
| 11 | (digest_single_submenu, xmenu_show): Use ENCODE_MENU_STRING. | ||
| 12 | |||
| 13 | * xfns.c (xic_defaut_fontset): New constant. | ||
| 14 | (xic_create_fontsetname): New function. | ||
| 15 | Extracted from create_frame_xic. Try to generate a slightly | ||
| 16 | better fontset. | ||
| 17 | (xic_create_xfontset): Use it. | ||
| 18 | (create_frame_xic): Simplify. | ||
| 19 | |||
| 20 | 2005-03-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 21 | |||
| 22 | * fileio.c (Fmake_symbolic_link): Fix last change. | ||
| 23 | |||
| 24 | 2005-03-11 Richard M. Stallman <rms@gnu.org> | ||
| 25 | |||
| 26 | * fileio.c (Frename_file, Fadd_name_to_file) | ||
| 27 | (Fmake_symbolic_link): If NEWNAME or LINKNAME is a directory, | ||
| 28 | expand the basename of FILE relative to it. | ||
| 29 | |||
| 30 | 2005-03-11 Kenichi Handa <handa@m17n.org> | ||
| 31 | |||
| 32 | * fileio.c (Finsert_file_contents): Call Fcheck_coding_system | ||
| 33 | before calling setup_coding_system so that autoloading of a coding | ||
| 34 | system work. | ||
| 35 | |||
| 36 | 2005-03-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 37 | |||
| 38 | * xfns.c (hourglass_started): New function. | ||
| 39 | |||
| 40 | * dispextern.h: Declare hourglass_started. | ||
| 41 | |||
| 42 | * keyboard.c (Fexecute_extended_command): Restart hourglass | ||
| 43 | after call to Fcompleting_read if already started. | ||
| 44 | |||
| 45 | * gtkutil.c (xg_update_scrollbar_pos): Call x_sync so that the | ||
| 46 | GTK main loop is entered in xterm.c, thus doing the redraw. | ||
| 47 | |||
| 48 | 2005-03-10 Kim F. Storm <storm@cua.dk> | ||
| 49 | |||
| 50 | * xdisp.c (pos_visible_p): Fix X value in last line of buffer. | ||
| 51 | |||
| 52 | 2005-03-08 Kenichi Handa <handa@m17n.org> | ||
| 53 | |||
| 54 | * frame.c (x_set_font): Call set_default_ascii_font if an | ||
| 55 | available font is found. | ||
| 56 | |||
| 57 | * fontset.c (set_default_ascii_font): New function. | ||
| 58 | (syms_of_fontset): Don't set FONTSET_ASCII (Vdefault_fontset) here. | ||
| 59 | |||
| 60 | * fontset.h (set_default_ascii_font): Extern it. | ||
| 61 | |||
| 1 | 2005-03-07 Kim F. Storm <storm@cua.dk> | 62 | 2005-03-07 Kim F. Storm <storm@cua.dk> |
| 2 | 63 | ||
| 3 | * xdisp.c (CLEAR_IMAGE_CACHE_COUNT): New const. | 64 | * xdisp.c (CLEAR_IMAGE_CACHE_COUNT): New const. |
| @@ -55,13 +116,11 @@ | |||
| 55 | * emacs.c (main): Change `#ifdef HAVE_CARBON' to `#if | 116 | * emacs.c (main): Change `#ifdef HAVE_CARBON' to `#if |
| 56 | defined (MAC_OSX) && defined (HAVE_CARBON)'. | 117 | defined (MAC_OSX) && defined (HAVE_CARBON)'. |
| 57 | 118 | ||
| 58 | * image.c [!MAC_OSX && TARGET_API_MAC_CARBON]: Include | 119 | * image.c [!MAC_OSX && TARGET_API_MAC_CARBON]: Include QuickTime.h. |
| 59 | QuickTime.h. | ||
| 60 | 120 | ||
| 61 | * mac.c [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | 121 | * mac.c [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. |
| 62 | [!MAC_OSX] (select) [TARGET_API_MAC_CARBON]: Use ReceiveNextEvent. | 122 | [!MAC_OSX] (select) [TARGET_API_MAC_CARBON]: Use ReceiveNextEvent. |
| 63 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname): New | 123 | (posix_pathname_to_fsspec, fsspec_to_posix_pathname): New functions. |
| 64 | functions. | ||
| 65 | (mac_clear_font_name_table): Move extern to macterm.h. | 124 | (mac_clear_font_name_table): Move extern to macterm.h. |
| 66 | 125 | ||
| 67 | * macfns.c (install_window_handler): Move extern to macterm.h. | 126 | * macfns.c (install_window_handler): Move extern to macterm.h. |
| @@ -69,16 +128,15 @@ | |||
| 69 | valid. Don't check !NILP (dir) because it is already checked with | 128 | valid. Don't check !NILP (dir) because it is already checked with |
| 70 | CHECK_STRING. | 129 | CHECK_STRING. |
| 71 | (Fx_file_dialog) [!MAC_OSX]: Use FSSpec instead of FSRef for | 130 | (Fx_file_dialog) [!MAC_OSX]: Use FSSpec instead of FSRef for |
| 72 | specifying the default location and obtaining the selected | 131 | specifying the default location and obtaining the selected filename. |
| 73 | filename. | ||
| 74 | 132 | ||
| 75 | * macgui.h [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. | 133 | * macgui.h [!MAC_OSX && HAVE_CARBON]: Include Carbon.h. |
| 76 | 134 | ||
| 77 | * macmenu.c [TARGET_API_MAC_CARBON]: Don't include headers that | 135 | * macmenu.c [TARGET_API_MAC_CARBON]: Don't include headers that |
| 78 | are included via Carbon.h. | 136 | are included via Carbon.h. |
| 79 | 137 | ||
| 80 | * macterm.c [TARGET_API_MAC_CARBON && !MAC_OSX]: Define | 138 | * macterm.c [TARGET_API_MAC_CARBON && !MAC_OSX]: |
| 81 | USE_CARBON_EVENTS to 1. | 139 | Define USE_CARBON_EVENTS to 1. |
| 82 | (qd) [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare. | 140 | (qd) [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare. |
| 83 | (x_free_frame_resources): Call remove_window_handler for | 141 | (x_free_frame_resources): Call remove_window_handler for |
| 84 | non-tooltip windows. | 142 | non-tooltip windows. |
| @@ -91,12 +149,12 @@ | |||
| 91 | (install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for | 149 | (install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for |
| 92 | drag-and-drop handler functions and register them. | 150 | drag-and-drop handler functions and register them. |
| 93 | (remove_window_handler): New function. | 151 | (remove_window_handler): New function. |
| 94 | (do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: Use | 152 | (do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: |
| 95 | fsspec_to_posix_pathname. | 153 | Use fsspec_to_posix_pathname. |
| 96 | (main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8. | 154 | (main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8. |
| 97 | (XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM. | 155 | (XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM. |
| 98 | [MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: Set | 156 | [MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: |
| 99 | default cursors. | 157 | Set default cursors. |
| 100 | (mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call | 158 | (mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call |
| 101 | init_service_handler or init_quit_char_handler. | 159 | init_service_handler or init_quit_char_handler. |
| 102 | (mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess. | 160 | (mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess. |
diff --git a/src/coding.c b/src/coding.c index 9cd493ab062..6a3868b016d 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7819,7 +7819,10 @@ updated by the functions `make-coding-system' and | |||
| 7819 | On detecting a coding system, Emacs tries code detection algorithms | 7819 | On detecting a coding system, Emacs tries code detection algorithms |
| 7820 | associated with each coding-category one by one in this order. When | 7820 | associated with each coding-category one by one in this order. When |
| 7821 | one algorithm agrees with a byte sequence of source text, the coding | 7821 | one algorithm agrees with a byte sequence of source text, the coding |
| 7822 | system bound to the corresponding coding-category is selected. */); | 7822 | system bound to the corresponding coding-category is selected. |
| 7823 | |||
| 7824 | When you modify this variable, `update-coding-systems-internal' must | ||
| 7825 | be called. */); | ||
| 7823 | { | 7826 | { |
| 7824 | int i; | 7827 | int i; |
| 7825 | 7828 | ||
diff --git a/src/dispextern.h b/src/dispextern.h index 60f24feef5b..8861a9705c4 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2808,6 +2808,7 @@ EXFUN (Fx_show_tip, 6); | |||
| 2808 | EXFUN (Fx_hide_tip, 0); | 2808 | EXFUN (Fx_hide_tip, 0); |
| 2809 | extern void start_hourglass P_ ((void)); | 2809 | extern void start_hourglass P_ ((void)); |
| 2810 | extern void cancel_hourglass P_ ((void)); | 2810 | extern void cancel_hourglass P_ ((void)); |
| 2811 | extern int hourglass_started P_ ((void)); | ||
| 2811 | extern int display_hourglass_p; | 2812 | extern int display_hourglass_p; |
| 2812 | 2813 | ||
| 2813 | /* Returns the background color of IMG, calculating one heuristically if | 2814 | /* Returns the background color of IMG, calculating one heuristically if |
diff --git a/src/fileio.c b/src/fileio.c index 3212c51d096..1eaad3192d7 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* File IO for GNU Emacs. | 1 | /* File IO for GNU Emacs. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, |
| 3 | 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. | 3 | 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -2693,7 +2693,11 @@ This is what happens in interactive use with M-x. */) | |||
| 2693 | CHECK_STRING (file); | 2693 | CHECK_STRING (file); |
| 2694 | CHECK_STRING (newname); | 2694 | CHECK_STRING (newname); |
| 2695 | file = Fexpand_file_name (file, Qnil); | 2695 | file = Fexpand_file_name (file, Qnil); |
| 2696 | newname = Fexpand_file_name (newname, Qnil); | 2696 | |
| 2697 | if (!NILP (Ffile_directory_p (newname))) | ||
| 2698 | newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); | ||
| 2699 | else | ||
| 2700 | newname = Fexpand_file_name (newname, Qnil); | ||
| 2697 | 2701 | ||
| 2698 | /* If the file name has special constructs in it, | 2702 | /* If the file name has special constructs in it, |
| 2699 | call the corresponding file handler. */ | 2703 | call the corresponding file handler. */ |
| @@ -2776,7 +2780,11 @@ This is what happens in interactive use with M-x. */) | |||
| 2776 | CHECK_STRING (file); | 2780 | CHECK_STRING (file); |
| 2777 | CHECK_STRING (newname); | 2781 | CHECK_STRING (newname); |
| 2778 | file = Fexpand_file_name (file, Qnil); | 2782 | file = Fexpand_file_name (file, Qnil); |
| 2779 | newname = Fexpand_file_name (newname, Qnil); | 2783 | |
| 2784 | if (!NILP (Ffile_directory_p (newname))) | ||
| 2785 | newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); | ||
| 2786 | else | ||
| 2787 | newname = Fexpand_file_name (newname, Qnil); | ||
| 2780 | 2788 | ||
| 2781 | /* If the file name has special constructs in it, | 2789 | /* If the file name has special constructs in it, |
| 2782 | call the corresponding file handler. */ | 2790 | call the corresponding file handler. */ |
| @@ -2843,7 +2851,11 @@ This happens for interactive use with M-x. */) | |||
| 2843 | we want to permit links to relative file names. */ | 2851 | we want to permit links to relative file names. */ |
| 2844 | if (SREF (filename, 0) == '~') | 2852 | if (SREF (filename, 0) == '~') |
| 2845 | filename = Fexpand_file_name (filename, Qnil); | 2853 | filename = Fexpand_file_name (filename, Qnil); |
| 2846 | linkname = Fexpand_file_name (linkname, Qnil); | 2854 | |
| 2855 | if (!NILP (Ffile_directory_p (linkname))) | ||
| 2856 | linkname = Fexpand_file_name (Ffile_name_nondirectory (filename), linkname); | ||
| 2857 | else | ||
| 2858 | linkname = Fexpand_file_name (linkname, Qnil); | ||
| 2847 | 2859 | ||
| 2848 | /* If the file name has special constructs in it, | 2860 | /* If the file name has special constructs in it, |
| 2849 | call the corresponding file handler. */ | 2861 | call the corresponding file handler. */ |
| @@ -4505,12 +4517,12 @@ actually used. */) | |||
| 4505 | this way, we can run Lisp program safely before decoding | 4517 | this way, we can run Lisp program safely before decoding |
| 4506 | the inserted text. */ | 4518 | the inserted text. */ |
| 4507 | Lisp_Object unwind_data; | 4519 | Lisp_Object unwind_data; |
| 4508 | int count = SPECPDL_INDEX (); | 4520 | int count = SPECPDL_INDEX (); |
| 4509 | 4521 | ||
| 4510 | unwind_data = Fcons (current_buffer->enable_multibyte_characters, | 4522 | unwind_data = Fcons (current_buffer->enable_multibyte_characters, |
| 4511 | Fcons (current_buffer->undo_list, | 4523 | Fcons (current_buffer->undo_list, |
| 4512 | Fcurrent_buffer ())); | 4524 | Fcurrent_buffer ())); |
| 4513 | current_buffer->enable_multibyte_characters = Qnil; | 4525 | current_buffer->enable_multibyte_characters = Qnil; |
| 4514 | current_buffer->undo_list = Qt; | 4526 | current_buffer->undo_list = Qt; |
| 4515 | record_unwind_protect (decide_coding_unwind, unwind_data); | 4527 | record_unwind_protect (decide_coding_unwind, unwind_data); |
| 4516 | 4528 | ||
| @@ -4532,7 +4544,6 @@ actually used. */) | |||
| 4532 | if (CONSP (coding_systems)) | 4544 | if (CONSP (coding_systems)) |
| 4533 | val = XCAR (coding_systems); | 4545 | val = XCAR (coding_systems); |
| 4534 | } | 4546 | } |
| 4535 | |||
| 4536 | unbind_to (count, Qnil); | 4547 | unbind_to (count, Qnil); |
| 4537 | inserted = Z_BYTE - BEG_BYTE; | 4548 | inserted = Z_BYTE - BEG_BYTE; |
| 4538 | } | 4549 | } |
| @@ -4543,7 +4554,7 @@ actually used. */) | |||
| 4543 | on some system. */ | 4554 | on some system. */ |
| 4544 | { | 4555 | { |
| 4545 | struct coding_system temp_coding; | 4556 | struct coding_system temp_coding; |
| 4546 | setup_coding_system (val, &temp_coding); | 4557 | setup_coding_system (Fcheck_coding_system (val), &temp_coding); |
| 4547 | bcopy (&temp_coding, &coding, sizeof coding); | 4558 | bcopy (&temp_coding, &coding, sizeof coding); |
| 4548 | } | 4559 | } |
| 4549 | /* Ensure we set Vlast_coding_system_used. */ | 4560 | /* Ensure we set Vlast_coding_system_used. */ |
diff --git a/src/fontset.c b/src/fontset.c index 7dff29f3ed8..c427b22e379 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -765,6 +765,23 @@ fs_load_font (f, c, fontname, id, face) | |||
| 765 | #pragma optimize("", on) | 765 | #pragma optimize("", on) |
| 766 | #endif | 766 | #endif |
| 767 | 767 | ||
| 768 | /* Set the ASCII font of the default fontset to FONTNAME if that is | ||
| 769 | not yet set. */ | ||
| 770 | void | ||
| 771 | set_default_ascii_font (fontname) | ||
| 772 | Lisp_Object fontname; | ||
| 773 | { | ||
| 774 | if (! CONSP (FONTSET_ASCII (Vdefault_fontset))) | ||
| 775 | { | ||
| 776 | int id = fs_query_fontset (fontname, 2); | ||
| 777 | |||
| 778 | if (id >= 0) | ||
| 779 | fontname = XCDR (FONTSET_ASCII (FONTSET_FROM_ID (id))); | ||
| 780 | FONTSET_ASCII (Vdefault_fontset) | ||
| 781 | = Fcons (make_number (0), fontname); | ||
| 782 | } | ||
| 783 | } | ||
| 784 | |||
| 768 | 785 | ||
| 769 | /* Cache data used by fontset_pattern_regexp. The car part is a | 786 | /* Cache data used by fontset_pattern_regexp. The car part is a |
| 770 | pattern string containing at least one wild card, the cdr part is | 787 | pattern string containing at least one wild card, the cdr part is |
| @@ -1628,19 +1645,6 @@ syms_of_fontset () | |||
| 1628 | FONTSET_ID (Vdefault_fontset) = make_number (0); | 1645 | FONTSET_ID (Vdefault_fontset) = make_number (0); |
| 1629 | FONTSET_NAME (Vdefault_fontset) | 1646 | FONTSET_NAME (Vdefault_fontset) |
| 1630 | = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); | 1647 | = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); |
| 1631 | #if defined (MAC_OS) | ||
| 1632 | FONTSET_ASCII (Vdefault_fontset) | ||
| 1633 | = Fcons (make_number (0), | ||
| 1634 | build_string ("-apple-monaco-medium-r-*--*-120-*-*-*-*-mac-roman")); | ||
| 1635 | #elif defined (WINDOWSNT) | ||
| 1636 | FONTSET_ASCII (Vdefault_fontset) | ||
| 1637 | = Fcons (make_number (0), | ||
| 1638 | build_string ("-*-courier new-normal-r-*-*-*-100-*-*-*-*-iso8859-1")); | ||
| 1639 | #else | ||
| 1640 | FONTSET_ASCII (Vdefault_fontset) | ||
| 1641 | = Fcons (make_number (0), | ||
| 1642 | build_string ("-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1")); | ||
| 1643 | #endif | ||
| 1644 | AREF (Vfontset_table, 0) = Vdefault_fontset; | 1648 | AREF (Vfontset_table, 0) = Vdefault_fontset; |
| 1645 | next_fontset_id = 1; | 1649 | next_fontset_id = 1; |
| 1646 | 1650 | ||
diff --git a/src/fontset.h b/src/fontset.h index c0f0f2d22e4..eee5e515b98 100644 --- a/src/fontset.h +++ b/src/fontset.h | |||
| @@ -194,6 +194,7 @@ extern Lisp_Object fontset_font_pattern P_ ((FRAME_PTR, int, int)); | |||
| 194 | extern int face_suitable_for_char_p P_ ((struct face *, int)); | 194 | extern int face_suitable_for_char_p P_ ((struct face *, int)); |
| 195 | extern int face_for_char P_ ((FRAME_PTR, struct face *, int)); | 195 | extern int face_for_char P_ ((FRAME_PTR, struct face *, int)); |
| 196 | extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int)); | 196 | extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int)); |
| 197 | extern void set_default_ascii_font P_ ((Lisp_Object)); | ||
| 197 | extern struct font_info *fs_load_font P_ ((struct frame *, int, char *, int, | 198 | extern struct font_info *fs_load_font P_ ((struct frame *, int, char *, int, |
| 198 | struct face *)); | 199 | struct face *)); |
| 199 | extern int fs_query_fontset P_ ((Lisp_Object, int)); | 200 | extern int fs_query_fontset P_ ((Lisp_Object, int)); |
diff --git a/src/frame.c b/src/frame.c index 06ffc04f2d1..375b1a20a9d 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3321,6 +3321,7 @@ x_set_font (f, arg, oldval) | |||
| 3321 | error ("The characters of the given font have varying widths"); | 3321 | error ("The characters of the given font have varying widths"); |
| 3322 | else if (STRINGP (result)) | 3322 | else if (STRINGP (result)) |
| 3323 | { | 3323 | { |
| 3324 | set_default_ascii_font (result); | ||
| 3324 | if (STRINGP (fontset_name)) | 3325 | if (STRINGP (fontset_name)) |
| 3325 | { | 3326 | { |
| 3326 | /* Fontset names are built from ASCII font names, so the | 3327 | /* Fontset names are built from ASCII font names, so the |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 6dcba3036c0..8bd83e40043 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -2999,9 +2999,14 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height) | |||
| 2999 | GtkWidget *wparent = gtk_widget_get_parent (wscroll); | 2999 | GtkWidget *wparent = gtk_widget_get_parent (wscroll); |
| 3000 | 3000 | ||
| 3001 | /* Move and resize to new values. */ | 3001 | /* Move and resize to new values. */ |
| 3002 | gtk_widget_set_size_request (wscroll, width, height); | ||
| 3003 | gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); | 3002 | gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); |
| 3004 | 3003 | gtk_widget_set_size_request (wscroll, width, height); | |
| 3004 | gtk_widget_queue_draw (wparent); | ||
| 3005 | gdk_window_process_all_updates (); | ||
| 3006 | /* GTK does not redraw until the main loop is entered again, but | ||
| 3007 | if there are no X events pending we will not enter it. So we sync | ||
| 3008 | here to get some events. */ | ||
| 3009 | x_sync (f); | ||
| 3005 | SET_FRAME_GARBAGED (f); | 3010 | SET_FRAME_GARBAGED (f); |
| 3006 | cancel_mouse_face (f); | 3011 | cancel_mouse_face (f); |
| 3007 | } | 3012 | } |
diff --git a/src/keyboard.c b/src/keyboard.c index 3fa6240381e..fcc35cb1235 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1335,6 +1335,11 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "", | |||
| 1335 | cancel_hourglass (); | 1335 | cancel_hourglass (); |
| 1336 | #endif | 1336 | #endif |
| 1337 | 1337 | ||
| 1338 | /* Unblock input if we enter with input blocked. This may happen if | ||
| 1339 | redisplay traps e.g. during tool-bar update with input blocked. */ | ||
| 1340 | while (INPUT_BLOCKED_P) | ||
| 1341 | UNBLOCK_INPUT; | ||
| 1342 | |||
| 1338 | return Fthrow (Qtop_level, Qnil); | 1343 | return Fthrow (Qtop_level, Qnil); |
| 1339 | } | 1344 | } |
| 1340 | 1345 | ||
| @@ -9780,6 +9785,15 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_ | |||
| 9780 | Lisp_Object saved_keys, saved_last_point_position_buffer; | 9785 | Lisp_Object saved_keys, saved_last_point_position_buffer; |
| 9781 | Lisp_Object bindings, value; | 9786 | Lisp_Object bindings, value; |
| 9782 | struct gcpro gcpro1, gcpro2, gcpro3; | 9787 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 9788 | #ifdef HAVE_X_WINDOWS | ||
| 9789 | /* The call to Fcompleting_read wil start and cancel the hourglass, | ||
| 9790 | but if the hourglass was already scheduled, this means that no | ||
| 9791 | hourglass will be shown for the actual M-x command itself. | ||
| 9792 | So we restart it if it is already scheduled. Note that checking | ||
| 9793 | hourglass_shown_p is not enough, normally the hourglass is not shown, | ||
| 9794 | just scheduled to be shown. */ | ||
| 9795 | int hstarted = hourglass_started (); | ||
| 9796 | #endif | ||
| 9783 | 9797 | ||
| 9784 | saved_keys = Fvector (this_command_key_count, | 9798 | saved_keys = Fvector (this_command_key_count, |
| 9785 | XVECTOR (this_command_keys)->contents); | 9799 | XVECTOR (this_command_keys)->contents); |
| @@ -9811,6 +9825,10 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_ | |||
| 9811 | Qt, Qnil, Qextended_command_history, Qnil, | 9825 | Qt, Qnil, Qextended_command_history, Qnil, |
| 9812 | Qnil); | 9826 | Qnil); |
| 9813 | 9827 | ||
| 9828 | #ifdef HAVE_X_WINDOWS | ||
| 9829 | if (hstarted) start_hourglass (); | ||
| 9830 | #endif | ||
| 9831 | |||
| 9814 | if (STRINGP (function) && SCHARS (function) == 0) | 9832 | if (STRINGP (function) && SCHARS (function) == 0) |
| 9815 | error ("No command name given"); | 9833 | error ("No command name given"); |
| 9816 | 9834 | ||
diff --git a/src/macterm.c b/src/macterm.c index a98d4ae5eb4..a6039dbf5c6 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -8451,19 +8451,23 @@ main (void) | |||
| 8451 | #endif | 8451 | #endif |
| 8452 | 8452 | ||
| 8453 | /* Table for translating Mac keycode to X keysym values. Contributed | 8453 | /* Table for translating Mac keycode to X keysym values. Contributed |
| 8454 | by Sudhir Shenoy. */ | 8454 | by Sudhir Shenoy. |
| 8455 | Mapping for special keys is now identical to that in Apple X11 | ||
| 8456 | except `clear' (-> <clear>) on the KeyPad, `enter' (-> <kp-enter>) | ||
| 8457 | on the right of the Cmd key on laptops, and fn + `enter' (-> | ||
| 8458 | <linefeed>). */ | ||
| 8455 | static unsigned char keycode_to_xkeysym_table[] = { | 8459 | static unsigned char keycode_to_xkeysym_table[] = { |
| 8456 | /*0x00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 8460 | /*0x00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 8457 | /*0x10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 8461 | /*0x10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 8458 | /*0x20*/ 0, 0, 0, 0, 0x0d /*return*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 8462 | /*0x20*/ 0, 0, 0, 0, 0x0d /*return*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 8459 | 8463 | ||
| 8460 | /*0x30*/ 0x09 /*tab*/, 0 /*0x0020 space*/, 0, 0x08 /*backspace*/, | 8464 | /*0x30*/ 0x09 /*tab*/, 0 /*0x0020 space*/, 0, 0x08 /*backspace*/, |
| 8461 | /*0x34*/ 0, 0x1b /*escape*/, 0, 0, | 8465 | /*0x34*/ 0x8d /*enter on laptops*/, 0x1b /*escape*/, 0, 0, |
| 8462 | /*0x38*/ 0, 0, 0, 0, | 8466 | /*0x38*/ 0, 0, 0, 0, |
| 8463 | /*0x3C*/ 0, 0, 0, 0, | 8467 | /*0x3C*/ 0, 0, 0, 0, |
| 8464 | 8468 | ||
| 8465 | /*0x40*/ 0, 0xae /*kp-.*/, 0, 0xaa /*kp-**/, | 8469 | /*0x40*/ 0, 0xae /*kp-.*/, 0, 0xaa /*kp-**/, |
| 8466 | /*0x44*/ 0, 0xab /*kp-+*/, 0, 0x7f /*kp-clear*/, | 8470 | /*0x44*/ 0, 0xab /*kp-+*/, 0, 0x0b /*clear*/, |
| 8467 | /*0x48*/ 0, 0, 0, 0xaf /*kp-/*/, | 8471 | /*0x48*/ 0, 0, 0, 0xaf /*kp-/*/, |
| 8468 | /*0x4C*/ 0x8d /*kp-enter*/, 0, 0xad /*kp--*/, 0, | 8472 | /*0x4C*/ 0x8d /*kp-enter*/, 0, 0xad /*kp--*/, 0, |
| 8469 | 8473 | ||
| @@ -8475,11 +8479,11 @@ static unsigned char keycode_to_xkeysym_table[] = { | |||
| 8475 | /*0x60*/ 0xc2 /*f5*/, 0xc3 /*f6*/, 0xc4 /*f7*/, 0xc0 /*f3*/, | 8479 | /*0x60*/ 0xc2 /*f5*/, 0xc3 /*f6*/, 0xc4 /*f7*/, 0xc0 /*f3*/, |
| 8476 | /*0x64*/ 0xc5 /*f8*/, 0xc6 /*f9*/, 0, 0xc8 /*f11*/, | 8480 | /*0x64*/ 0xc5 /*f8*/, 0xc6 /*f9*/, 0, 0xc8 /*f11*/, |
| 8477 | /*0x68*/ 0, 0xca /*f13*/, 0, 0xcb /*f14*/, | 8481 | /*0x68*/ 0, 0xca /*f13*/, 0, 0xcb /*f14*/, |
| 8478 | /*0x6C*/ 0, 0xc7 /*f10*/, 0, 0xc9 /*f12*/, | 8482 | /*0x6C*/ 0, 0xc7 /*f10*/, 0x0a /*fn+enter on laptops*/, 0xc9 /*f12*/, |
| 8479 | 8483 | ||
| 8480 | /*0x70*/ 0, 0xcc /*f15*/, 0x9e /*insert (or 0x6a==help)*/, 0x95 /*home*/, | 8484 | /*0x70*/ 0, 0xcc /*f15*/, 0x6a /*help*/, 0x50 /*home*/, |
| 8481 | /*0x74*/ 0x9a /*pgup*/, 0x9f /*delete*/, 0xc1 /*f4*/, 0x9c /*end*/, | 8485 | /*0x74*/ 0x55 /*pgup*/, 0xff /*delete*/, 0xc1 /*f4*/, 0x57 /*end*/, |
| 8482 | /*0x78*/ 0xbf /*f2*/, 0x9b /*pgdown*/, 0xbe /*f1*/, 0x51 /*left*/, | 8486 | /*0x78*/ 0xbf /*f2*/, 0x56 /*pgdown*/, 0xbe /*f1*/, 0x51 /*left*/, |
| 8483 | /*0x7C*/ 0x53 /*right*/, 0x54 /*down*/, 0x52 /*up*/, 0 | 8487 | /*0x7C*/ 0x53 /*right*/, 0x54 /*down*/, 0x52 /*up*/, 0 |
| 8484 | }; | 8488 | }; |
| 8485 | 8489 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 7f7e60e81b8..b08029b5b7f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1294,6 +1294,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1294 | /* Note that we may overshoot because of invisible text. */ | 1294 | /* Note that we may overshoot because of invisible text. */ |
| 1295 | if (IT_CHARPOS (it) >= charpos) | 1295 | if (IT_CHARPOS (it) >= charpos) |
| 1296 | { | 1296 | { |
| 1297 | int top_x = it.current_x; | ||
| 1297 | int top_y = it.current_y; | 1298 | int top_y = it.current_y; |
| 1298 | int bottom_y = (last_height = 0, line_bottom_y (&it)); | 1299 | int bottom_y = (last_height = 0, line_bottom_y (&it)); |
| 1299 | int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); | 1300 | int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); |
| @@ -1302,15 +1303,12 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1302 | visible_p = bottom_y > window_top_y; | 1303 | visible_p = bottom_y > window_top_y; |
| 1303 | else if (top_y < it.last_visible_y) | 1304 | else if (top_y < it.last_visible_y) |
| 1304 | visible_p = 1; | 1305 | visible_p = 1; |
| 1305 | if (visible_p && x) | 1306 | if (visible_p) |
| 1306 | { | 1307 | { |
| 1307 | *x = it.current_x; | 1308 | *x = top_x; |
| 1308 | *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); | 1309 | *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); |
| 1309 | if (rtop) | 1310 | *rtop = max (0, window_top_y - top_y); |
| 1310 | { | 1311 | *rbot = max (0, bottom_y - it.last_visible_y); |
| 1311 | *rtop = max (0, window_top_y - top_y); | ||
| 1312 | *rbot = max (0, bottom_y - it.last_visible_y); | ||
| 1313 | } | ||
| 1314 | } | 1312 | } |
| 1315 | } | 1313 | } |
| 1316 | else | 1314 | else |
| @@ -1323,18 +1321,12 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1323 | if (charpos < IT_CHARPOS (it)) | 1321 | if (charpos < IT_CHARPOS (it)) |
| 1324 | { | 1322 | { |
| 1325 | visible_p = 1; | 1323 | visible_p = 1; |
| 1326 | if (x) | 1324 | move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); |
| 1327 | { | 1325 | *x = it2.current_x; |
| 1328 | move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); | 1326 | *y = it2.current_y + it2.max_ascent - it2.ascent; |
| 1329 | *x = it2.current_x; | 1327 | *rtop = max (0, -it2.current_y); |
| 1330 | *y = it2.current_y + it2.max_ascent - it2.ascent; | 1328 | *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent) |
| 1331 | if (rtop) | 1329 | - it.last_visible_y)); |
| 1332 | { | ||
| 1333 | *rtop = max (0, -it2.current_y); | ||
| 1334 | *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent) | ||
| 1335 | - it.last_visible_y)); | ||
| 1336 | } | ||
| 1337 | } | ||
| 1338 | } | 1330 | } |
| 1339 | } | 1331 | } |
| 1340 | 1332 | ||
diff --git a/src/xfns.c b/src/xfns.c index db2e3f74045..4c9b38d2556 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1969,6 +1969,88 @@ static XIMStyle supported_xim_styles[] = | |||
| 1969 | 1969 | ||
| 1970 | /* Create an X fontset on frame F with base font name BASE_FONTNAME. */ | 1970 | /* Create an X fontset on frame F with base font name BASE_FONTNAME. */ |
| 1971 | 1971 | ||
| 1972 | char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; | ||
| 1973 | |||
| 1974 | char * | ||
| 1975 | xic_create_fontsetname (base_fontname) | ||
| 1976 | char *base_fontname; | ||
| 1977 | { | ||
| 1978 | /* Make a fontset name from the base font name. */ | ||
| 1979 | if (xic_defaut_fontset == base_fontname) | ||
| 1980 | /* There is no base font name, use the default. */ | ||
| 1981 | return base_fontname; | ||
| 1982 | else | ||
| 1983 | { | ||
| 1984 | /* Make a fontset name from the base font name. | ||
| 1985 | The font set will be made of the following elements: | ||
| 1986 | - the base font. | ||
| 1987 | - the base font where the charset spec is replaced by -*-*. | ||
| 1988 | - the same but with the family also replaced with -*-*-. */ | ||
| 1989 | char *p = base_fontname; | ||
| 1990 | char *fontsetname; | ||
| 1991 | int i; | ||
| 1992 | |||
| 1993 | for (i = 0; *p; p++) | ||
| 1994 | if (*p == '-') i++; | ||
| 1995 | if (i != 14) | ||
| 1996 | { /* As the font name doesn't conform to XLFD, we can't | ||
| 1997 | modify it to generalize it to allcs and allfamilies. | ||
| 1998 | Use the specified font plus the default. */ | ||
| 1999 | int len = strlen (base_fontname) + strlen (xic_defaut_fontset) + 2; | ||
| 2000 | fontsetname = xmalloc (len); | ||
| 2001 | bzero (fontsetname, len); | ||
| 2002 | strcpy (fontsetname, base_fontname); | ||
| 2003 | strcat (fontsetname, ","); | ||
| 2004 | strcat (fontsetname, xic_defaut_fontset); | ||
| 2005 | } | ||
| 2006 | else | ||
| 2007 | { | ||
| 2008 | int len; | ||
| 2009 | char *p1 = NULL; | ||
| 2010 | char *font_allcs = NULL; | ||
| 2011 | char *font_allfamilies = NULL; | ||
| 2012 | char *allcs = "*-*-*-*-*-*-*"; | ||
| 2013 | char *allfamilies = "-*-*-"; | ||
| 2014 | |||
| 2015 | for (i = 0, p = base_fontname; i < 8; p++) | ||
| 2016 | { | ||
| 2017 | if (*p == '-') | ||
| 2018 | { | ||
| 2019 | i++; | ||
| 2020 | if (i == 3) | ||
| 2021 | p1 = p + 1; | ||
| 2022 | } | ||
| 2023 | } | ||
| 2024 | /* Build the font spec that matches all charsets. */ | ||
| 2025 | len = p - base_fontname + strlen (allcs) + 1; | ||
| 2026 | font_allcs = (char *) alloca (len); | ||
| 2027 | bzero (font_allcs, len); | ||
| 2028 | bcopy (base_fontname, font_allcs, p - base_fontname); | ||
| 2029 | strcat (font_allcs, allcs); | ||
| 2030 | |||
| 2031 | /* Build the font spec that matches all families. */ | ||
| 2032 | len = p - p1 + strlen (allcs) + strlen (allfamilies) + 1; | ||
| 2033 | font_allfamilies = (char *) alloca (len); | ||
| 2034 | bzero (font_allfamilies, len); | ||
| 2035 | strcpy (font_allfamilies, allfamilies); | ||
| 2036 | bcopy (p1, font_allfamilies + (strlen (allfamilies)), p - p1); | ||
| 2037 | strcat (font_allfamilies, allcs); | ||
| 2038 | |||
| 2039 | /* Build the actual font set name. */ | ||
| 2040 | len = strlen (base_fontname) + strlen (font_allcs) | ||
| 2041 | + strlen (font_allfamilies) + 3; | ||
| 2042 | fontsetname = xmalloc (len); | ||
| 2043 | bzero (fontsetname, len); | ||
| 2044 | strcpy (fontsetname, base_fontname); | ||
| 2045 | strcat (fontsetname, ","); | ||
| 2046 | strcat (fontsetname, font_allcs); | ||
| 2047 | strcat (fontsetname, ","); | ||
| 2048 | strcat (fontsetname, font_allfamilies); | ||
| 2049 | } | ||
| 2050 | return fontsetname; | ||
| 2051 | } | ||
| 2052 | } | ||
| 2053 | |||
| 1972 | static XFontSet | 2054 | static XFontSet |
| 1973 | xic_create_xfontset (f, base_fontname) | 2055 | xic_create_xfontset (f, base_fontname) |
| 1974 | struct frame *f; | 2056 | struct frame *f; |
| @@ -1980,6 +2062,9 @@ xic_create_xfontset (f, base_fontname) | |||
| 1980 | char *def_string; | 2062 | char *def_string; |
| 1981 | Lisp_Object rest, frame; | 2063 | Lisp_Object rest, frame; |
| 1982 | 2064 | ||
| 2065 | if (!base_fontname) | ||
| 2066 | base_fontname = xic_defaut_fontset; | ||
| 2067 | |||
| 1983 | /* See if there is another frame already using same fontset. */ | 2068 | /* See if there is another frame already using same fontset. */ |
| 1984 | FOR_EACH_FRAME (rest, frame) | 2069 | FOR_EACH_FRAME (rest, frame) |
| 1985 | { | 2070 | { |
| @@ -1996,12 +2081,16 @@ xic_create_xfontset (f, base_fontname) | |||
| 1996 | 2081 | ||
| 1997 | if (!xfs) | 2082 | if (!xfs) |
| 1998 | { | 2083 | { |
| 2084 | char *fontsetname = xic_create_fontsetname (base_fontname); | ||
| 2085 | |||
| 1999 | /* New fontset. */ | 2086 | /* New fontset. */ |
| 2000 | xfs = XCreateFontSet (FRAME_X_DISPLAY (f), | 2087 | xfs = XCreateFontSet (FRAME_X_DISPLAY (f), |
| 2001 | base_fontname, &missing_list, | 2088 | fontsetname, &missing_list, |
| 2002 | &missing_count, &def_string); | 2089 | &missing_count, &def_string); |
| 2003 | if (missing_list) | 2090 | if (missing_list) |
| 2004 | XFreeStringList (missing_list); | 2091 | XFreeStringList (missing_list); |
| 2092 | if (fontsetname != base_fontname) | ||
| 2093 | xfree (fontsetname); | ||
| 2005 | } | 2094 | } |
| 2006 | 2095 | ||
| 2007 | if (FRAME_XIC_BASE_FONTNAME (f)) | 2096 | if (FRAME_XIC_BASE_FONTNAME (f)) |
| @@ -2083,6 +2172,11 @@ create_frame_xic (f) | |||
| 2083 | if (FRAME_XIC (f)) | 2172 | if (FRAME_XIC (f)) |
| 2084 | return; | 2173 | return; |
| 2085 | 2174 | ||
| 2175 | /* Create X fontset. */ | ||
| 2176 | xfs = xic_create_xfontset | ||
| 2177 | (f, (FRAME_FONTSET (f) < 0) ? NULL | ||
| 2178 | : (char *) SDATA (fontset_ascii (FRAME_FONTSET (f)))); | ||
| 2179 | |||
| 2086 | xim = FRAME_X_XIM (f); | 2180 | xim = FRAME_X_XIM (f); |
| 2087 | if (xim) | 2181 | if (xim) |
| 2088 | { | 2182 | { |
| @@ -2090,52 +2184,9 @@ create_frame_xic (f) | |||
| 2090 | XPoint spot; | 2184 | XPoint spot; |
| 2091 | XVaNestedList preedit_attr; | 2185 | XVaNestedList preedit_attr; |
| 2092 | XVaNestedList status_attr; | 2186 | XVaNestedList status_attr; |
| 2093 | char *base_fontname; | ||
| 2094 | int fontset; | ||
| 2095 | 2187 | ||
| 2096 | s_area.x = 0; s_area.y = 0; s_area.width = 1; s_area.height = 1; | 2188 | s_area.x = 0; s_area.y = 0; s_area.width = 1; s_area.height = 1; |
| 2097 | spot.x = 0; spot.y = 1; | 2189 | spot.x = 0; spot.y = 1; |
| 2098 | /* Create X fontset. */ | ||
| 2099 | fontset = FRAME_FONTSET (f); | ||
| 2100 | if (fontset < 0) | ||
| 2101 | base_fontname = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; | ||
| 2102 | else | ||
| 2103 | { | ||
| 2104 | /* Determine the base fontname from the ASCII font name of | ||
| 2105 | FONTSET. */ | ||
| 2106 | char *ascii_font = (char *) SDATA (fontset_ascii (fontset)); | ||
| 2107 | char *p = ascii_font; | ||
| 2108 | int i; | ||
| 2109 | |||
| 2110 | for (i = 0; *p; p++) | ||
| 2111 | if (*p == '-') i++; | ||
| 2112 | if (i != 14) | ||
| 2113 | /* As the font name doesn't conform to XLFD, we can't | ||
| 2114 | modify it to get a suitable base fontname for the | ||
| 2115 | frame. */ | ||
| 2116 | base_fontname = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; | ||
| 2117 | else | ||
| 2118 | { | ||
| 2119 | int len = strlen (ascii_font) + 1; | ||
| 2120 | char *p1 = NULL; | ||
| 2121 | |||
| 2122 | for (i = 0, p = ascii_font; i < 8; p++) | ||
| 2123 | { | ||
| 2124 | if (*p == '-') | ||
| 2125 | { | ||
| 2126 | i++; | ||
| 2127 | if (i == 3) | ||
| 2128 | p1 = p + 1; | ||
| 2129 | } | ||
| 2130 | } | ||
| 2131 | base_fontname = (char *) alloca (len); | ||
| 2132 | bzero (base_fontname, len); | ||
| 2133 | strcpy (base_fontname, "-*-*-"); | ||
| 2134 | bcopy (p1, base_fontname + 5, p - p1); | ||
| 2135 | strcat (base_fontname, "*-*-*-*-*-*-*"); | ||
| 2136 | } | ||
| 2137 | } | ||
| 2138 | xfs = xic_create_xfontset (f, base_fontname); | ||
| 2139 | 2190 | ||
| 2140 | /* Determine XIC style. */ | 2191 | /* Determine XIC style. */ |
| 2141 | if (xic_style == 0) | 2192 | if (xic_style == 0) |
| @@ -4310,6 +4361,14 @@ static Lisp_Object Vhourglass_delay; | |||
| 4310 | static void show_hourglass P_ ((struct atimer *)); | 4361 | static void show_hourglass P_ ((struct atimer *)); |
| 4311 | static void hide_hourglass P_ ((void)); | 4362 | static void hide_hourglass P_ ((void)); |
| 4312 | 4363 | ||
| 4364 | /* Return non-zero if houglass timer has been started or hourglass is shown. */ | ||
| 4365 | |||
| 4366 | int | ||
| 4367 | hourglass_started () | ||
| 4368 | { | ||
| 4369 | return hourglass_shown_p || hourglass_atimer != NULL; | ||
| 4370 | } | ||
| 4371 | |||
| 4313 | 4372 | ||
| 4314 | /* Cancel a currently active hourglass timer, and start a new one. */ | 4373 | /* Cancel a currently active hourglass timer, and start a new one. */ |
| 4315 | 4374 | ||
diff --git a/src/xmenu.c b/src/xmenu.c index b6a5186f1f1..41c1c2fe078 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* X Communication module for terminals which understand the X protocol. | 1 | /* X Communication module for terminals which understand the X protocol. |
| 2 | Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004 | 2 | Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004, |
| 3 | Free Software Foundation, Inc. | 3 | 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -138,12 +138,7 @@ static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); | |||
| 138 | /* gtk just uses utf-8. */ | 138 | /* gtk just uses utf-8. */ |
| 139 | # define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str) | 139 | # define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str) |
| 140 | #else | 140 | #else |
| 141 | /* I'm not convinced ENCODE_SYSTEM is defined correctly, or maybe | 141 | # define ENCODE_MENU_STRING(str) string_make_unibyte (str) |
| 142 | something else should be used here. Except under MS-Windows it | ||
| 143 | just converts to unibyte, but encoding with `locale-coding-system' | ||
| 144 | seems better -- X may actually display the result correctly, and | ||
| 145 | it's not necessarily equivalent to the unibyte text. -- fx */ | ||
| 146 | # define ENCODE_MENU_STRING(str) ENCODE_SYSTEM (str) | ||
| 147 | #endif | 142 | #endif |
| 148 | 143 | ||
| 149 | static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, | 144 | static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, |
| @@ -645,10 +640,10 @@ list_of_panes (menu) | |||
| 645 | 640 | ||
| 646 | init_menu_items (); | 641 | init_menu_items (); |
| 647 | 642 | ||
| 648 | for (tail = menu; !NILP (tail); tail = Fcdr (tail)) | 643 | for (tail = menu; CONSP (tail); tail = XCDR (tail)) |
| 649 | { | 644 | { |
| 650 | Lisp_Object elt, pane_name, pane_data; | 645 | Lisp_Object elt, pane_name, pane_data; |
| 651 | elt = Fcar (tail); | 646 | elt = XCAR (tail); |
| 652 | pane_name = Fcar (elt); | 647 | pane_name = Fcar (elt); |
| 653 | CHECK_STRING (pane_name); | 648 | CHECK_STRING (pane_name); |
| 654 | push_menu_pane (ENCODE_MENU_STRING (pane_name), Qnil); | 649 | push_menu_pane (ENCODE_MENU_STRING (pane_name), Qnil); |
| @@ -668,22 +663,22 @@ list_of_items (pane) | |||
| 668 | { | 663 | { |
| 669 | Lisp_Object tail, item, item1; | 664 | Lisp_Object tail, item, item1; |
| 670 | 665 | ||
| 671 | for (tail = pane; !NILP (tail); tail = Fcdr (tail)) | 666 | for (tail = pane; CONSP (tail); tail = XCDR (tail)) |
| 672 | { | 667 | { |
| 673 | item = Fcar (tail); | 668 | item = XCAR (tail); |
| 674 | if (STRINGP (item)) | 669 | if (STRINGP (item)) |
| 675 | push_menu_item (ENCODE_MENU_STRING (item), Qnil, Qnil, Qt, | 670 | push_menu_item (ENCODE_MENU_STRING (item), Qnil, Qnil, Qt, |
| 676 | Qnil, Qnil, Qnil, Qnil); | 671 | Qnil, Qnil, Qnil, Qnil); |
| 677 | else if (NILP (item)) | 672 | else if (CONSP (item)) |
| 678 | push_left_right_boundary (); | ||
| 679 | else | ||
| 680 | { | 673 | { |
| 681 | CHECK_CONS (item); | 674 | item1 = XCAR (item); |
| 682 | item1 = Fcar (item); | ||
| 683 | CHECK_STRING (item1); | 675 | CHECK_STRING (item1); |
| 684 | push_menu_item (ENCODE_MENU_STRING (item1), Qt, Fcdr (item), | 676 | push_menu_item (ENCODE_MENU_STRING (item1), Qt, XCDR (item), |
| 685 | Qt, Qnil, Qnil, Qnil, Qnil); | 677 | Qt, Qnil, Qnil, Qnil, Qnil); |
| 686 | } | 678 | } |
| 679 | else | ||
| 680 | push_left_right_boundary (); | ||
| 681 | |||
| 687 | } | 682 | } |
| 688 | } | 683 | } |
| 689 | 684 | ||
| @@ -802,8 +797,8 @@ cached information about equivalent key sequences. */) | |||
| 802 | if (CONSP (tem)) | 797 | if (CONSP (tem)) |
| 803 | { | 798 | { |
| 804 | window = Fcar (Fcdr (position)); | 799 | window = Fcar (Fcdr (position)); |
| 805 | x = Fcar (tem); | 800 | x = XCAR (tem); |
| 806 | y = Fcar (Fcdr (tem)); | 801 | y = Fcar (XCDR (tem)); |
| 807 | } | 802 | } |
| 808 | else | 803 | else |
| 809 | { | 804 | { |
| @@ -931,11 +926,11 @@ cached information about equivalent key sequences. */) | |||
| 931 | 926 | ||
| 932 | /* The first keymap that has a prompt string | 927 | /* The first keymap that has a prompt string |
| 933 | supplies the menu title. */ | 928 | supplies the menu title. */ |
| 934 | for (tem = menu, i = 0; CONSP (tem); tem = Fcdr (tem)) | 929 | for (tem = menu, i = 0; CONSP (tem); tem = XCDR (tem)) |
| 935 | { | 930 | { |
| 936 | Lisp_Object prompt; | 931 | Lisp_Object prompt; |
| 937 | 932 | ||
| 938 | maps[i++] = keymap = get_keymap (Fcar (tem), 1, 0); | 933 | maps[i++] = keymap = get_keymap (XCAR (tem), 1, 0); |
| 939 | 934 | ||
| 940 | prompt = Fkeymap_prompt (keymap); | 935 | prompt = Fkeymap_prompt (keymap); |
| 941 | if (NILP (title) && !NILP (prompt)) | 936 | if (NILP (title) && !NILP (prompt)) |
| @@ -1750,7 +1745,7 @@ digest_single_submenu (start, end, top_level_items) | |||
| 1750 | #ifndef HAVE_MULTILINGUAL_MENU | 1745 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1751 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) | 1746 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) |
| 1752 | { | 1747 | { |
| 1753 | pane_name = ENCODE_SYSTEM (pane_name); | 1748 | pane_name = ENCODE_MENU_STRING (pane_name); |
| 1754 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; | 1749 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; |
| 1755 | } | 1750 | } |
| 1756 | #endif | 1751 | #endif |
| @@ -2695,7 +2690,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2695 | #ifndef HAVE_MULTILINGUAL_MENU | 2690 | #ifndef HAVE_MULTILINGUAL_MENU |
| 2696 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) | 2691 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) |
| 2697 | { | 2692 | { |
| 2698 | pane_name = ENCODE_SYSTEM (pane_name); | 2693 | pane_name = ENCODE_MENU_STRING (pane_name); |
| 2699 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; | 2694 | AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name; |
| 2700 | } | 2695 | } |
| 2701 | #endif | 2696 | #endif |