diff options
| author | Karoly Lorentey | 2005-02-19 00:06:48 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-02-19 00:06:48 +0000 |
| commit | 60c73d2ed638e5d51643c65a0fc6dea618fc72c8 (patch) | |
| tree | 3d9e0adc703f9cfd5df162c66ac15999c4106738 | |
| parent | c20213c90736fc9c2a6eca2ca44d6e200dbf5efe (diff) | |
| parent | 8a59305430c68ee23d3cc7ab7487ab3acebdbe7f (diff) | |
| download | emacs-60c73d2ed638e5d51643c65a0fc6dea618fc72c8.tar.gz emacs-60c73d2ed638e5d51643c65a0fc6dea618fc72c8.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 14-16, 95-106)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-95
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-96
Move Gnus images into etc/images
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-97
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-98
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-99
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-100
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-101
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-102
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-103
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-104
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-105
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-106
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-14
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-15
Update from CVS: lisp/imap.el (imap-log): Doc fix.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-16
Merge from emacs--cvs-trunk--0
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-295
| -rw-r--r-- | admin/ChangeLog | 13 | ||||
| -rw-r--r-- | admin/FOR-RELEASE | 46 | ||||
| -rwxr-xr-x | admin/nt/makedist.bat | 251 | ||||
| -rw-r--r-- | etc/ChangeLog | 8 | ||||
| -rw-r--r-- | etc/NEWS | 8 | ||||
| -rw-r--r-- | etc/TODO | 2 | ||||
| -rw-r--r-- | etc/TUTORIAL.nl | 1471 | ||||
| -rw-r--r-- | etc/images/gnus/bar.xbm (renamed from lisp/gnus/bar.xbm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/bar.xpm (renamed from lisp/gnus/bar.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/catchup.pbm (renamed from lisp/gnus/catchup.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/catchup.xpm (renamed from lisp/gnus/catchup.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/cu-exit.pbm (renamed from lisp/gnus/cu-exit.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/cu-exit.xpm (renamed from lisp/gnus/cu-exit.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/dead.xpm (renamed from lisp/gnus/dead.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/describe-group.pbm (renamed from lisp/gnus/describe-group.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/describe-group.xpm (renamed from lisp/gnus/describe-group.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/exit-gnus.pbm (renamed from lisp/gnus/exit-gnus.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/exit-gnus.xpm (renamed from lisp/gnus/exit-gnus.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/exit-summ.pbm (renamed from lisp/gnus/exit-summ.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/exit-summ.xpm (renamed from lisp/gnus/exit-summ.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/followup.pbm (renamed from lisp/gnus/followup.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/followup.xpm (renamed from lisp/gnus/followup.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/fuwo.pbm (renamed from lisp/gnus/fuwo.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/fuwo.xpm (renamed from lisp/gnus/fuwo.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/get-news.pbm (renamed from lisp/gnus/get-news.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/get-news.xpm (renamed from lisp/gnus/get-news.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/gnntg.pbm (renamed from lisp/gnus/gnntg.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/gnntg.xpm (renamed from lisp/gnus/gnntg.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/gnus-pointer.xbm (renamed from lisp/gnus/gnus-pointer.xbm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/gnus-pointer.xpm (renamed from lisp/gnus/gnus-pointer.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/gnus.xbm (renamed from lisp/gnus/gnus.xbm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/gnus.xpm (renamed from lisp/gnus/gnus.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/important.xpm (renamed from lisp/gnus/important.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/kill-group.pbm (renamed from lisp/gnus/kill-group.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/kill-group.xpm (renamed from lisp/gnus/kill-group.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/mail-reply.pbm (renamed from lisp/gnus/mail-reply.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/mail-reply.xpm (renamed from lisp/gnus/mail-reply.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/next-ur.pbm (renamed from lisp/gnus/next-ur.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/next-ur.xpm (renamed from lisp/gnus/next-ur.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/post.pbm (renamed from lisp/gnus/post.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/post.xpm (renamed from lisp/gnus/post.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/prev-ur.pbm (renamed from lisp/gnus/prev-ur.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/prev-ur.xpm (renamed from lisp/gnus/prev-ur.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/preview.xbm (renamed from lisp/gnus/preview.xbm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/preview.xpm (renamed from lisp/gnus/preview.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/receipt.xpm (renamed from lisp/gnus/receipt.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/reply-wo.pbm (renamed from lisp/gnus/reply-wo.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/reply-wo.xpm (renamed from lisp/gnus/reply-wo.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/reply.pbm (renamed from lisp/gnus/reply.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/reply.xpm (renamed from lisp/gnus/reply.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/reverse-smile.xpm (renamed from lisp/gnus/reverse-smile.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/rot13.pbm (renamed from lisp/gnus/rot13.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/rot13.xpm (renamed from lisp/gnus/rot13.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/save-aif.pbm (renamed from lisp/gnus/save-aif.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/save-aif.xpm (renamed from lisp/gnus/save-aif.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/save-art.pbm (renamed from lisp/gnus/save-art.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/save-art.xpm (renamed from lisp/gnus/save-art.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/subscribe.pbm (renamed from lisp/gnus/subscribe.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/subscribe.xpm (renamed from lisp/gnus/subscribe.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/unimportant.xpm (renamed from lisp/gnus/unimportant.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/unsubscribe.pbm (renamed from lisp/gnus/unsubscribe.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/unsubscribe.xpm (renamed from lisp/gnus/unsubscribe.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/uu-decode.pbm (renamed from lisp/gnus/uu-decode.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/uu-decode.xpm (renamed from lisp/gnus/uu-decode.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/gnus/uu-post.pbm (renamed from lisp/gnus/uu-post.pbm) | bin | 81 -> 81 bytes | |||
| -rw-r--r-- | etc/images/gnus/uu-post.xpm (renamed from lisp/gnus/uu-post.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/blink.pbm (renamed from lisp/gnus/blink.pbm) | bin | 37 -> 37 bytes | |||
| -rw-r--r-- | etc/images/smilies/blink.xpm (renamed from lisp/gnus/blink.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/braindamaged.xpm (renamed from lisp/gnus/braindamaged.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/cry.xpm (renamed from lisp/gnus/cry.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/evil.xpm (renamed from lisp/gnus/evil.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/forced.xpm (renamed from lisp/gnus/forced.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/frown.pbm (renamed from lisp/gnus/frown.pbm) | bin | 37 -> 37 bytes | |||
| -rw-r--r-- | etc/images/smilies/frown.xpm (renamed from lisp/gnus/frown.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/grin.xpm (renamed from lisp/gnus/grin.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/indifferent.xpm (renamed from lisp/gnus/indifferent.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/sad.pbm (renamed from lisp/gnus/sad.pbm) | bin | 37 -> 37 bytes | |||
| -rw-r--r-- | etc/images/smilies/sad.xpm (renamed from lisp/gnus/sad.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/smile.pbm (renamed from lisp/gnus/smile.pbm) | bin | 37 -> 37 bytes | |||
| -rw-r--r-- | etc/images/smilies/smile.xpm (renamed from lisp/gnus/smile.xpm) | 0 | ||||
| -rw-r--r-- | etc/images/smilies/wry.pbm (renamed from lisp/gnus/wry.pbm) | bin | 37 -> 37 bytes | |||
| -rw-r--r-- | etc/images/smilies/wry.xpm (renamed from lisp/gnus/wry.xpm) | 0 | ||||
| -rw-r--r-- | lisp/ChangeLog | 124 | ||||
| -rw-r--r-- | lisp/autorevert.el | 10 | ||||
| -rw-r--r-- | lisp/calc/calc-alg.el | 128 | ||||
| -rw-r--r-- | lisp/calc/calc-arith.el | 8 | ||||
| -rw-r--r-- | lisp/calc/calc-ext.el | 15 | ||||
| -rw-r--r-- | lisp/calc/calc-math.el | 389 | ||||
| -rw-r--r-- | lisp/calc/calc-rules.el | 10 | ||||
| -rw-r--r-- | lisp/calc/calc-undo.el | 3 | ||||
| -rw-r--r-- | lisp/calc/calc-units.el | 39 | ||||
| -rw-r--r-- | lisp/calc/calcalg2.el | 83 | ||||
| -rw-r--r-- | lisp/calc/calccomp.el | 2 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 8 | ||||
| -rw-r--r-- | lisp/cus-start.el | 18 | ||||
| -rw-r--r-- | lisp/dired.el | 1 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 11 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 17 | ||||
| -rw-r--r-- | lisp/gnus/gnus.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/imap.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/mm-util.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/smiley.el | 2 | ||||
| -rw-r--r-- | lisp/ido.el | 3 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 6 | ||||
| -rw-r--r-- | lisp/isearch.el | 35 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 8 | ||||
| -rw-r--r-- | lisp/novice.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 75 | ||||
| -rw-r--r-- | lisp/ps-print.el | 14 | ||||
| -rw-r--r-- | lisp/replace.el | 16 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-cite.el | 5 | ||||
| -rw-r--r-- | lisp/url/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/url/url-http.el | 2 | ||||
| -rw-r--r-- | lispref/ChangeLog | 69 | ||||
| -rw-r--r-- | lispref/compile.texi | 30 | ||||
| -rw-r--r-- | lispref/control.texi | 23 | ||||
| -rw-r--r-- | lispref/elisp.texi | 3 | ||||
| -rw-r--r-- | lispref/functions.texi | 86 | ||||
| -rw-r--r-- | lispref/hash.texi | 24 | ||||
| -rw-r--r-- | lispref/lists.texi | 109 | ||||
| -rw-r--r-- | lispref/loading.texi | 34 | ||||
| -rw-r--r-- | lispref/minibuf.texi | 5 | ||||
| -rw-r--r-- | lispref/numbers.texi | 62 | ||||
| -rw-r--r-- | lispref/objects.texi | 191 | ||||
| -rw-r--r-- | lispref/streams.texi | 2 | ||||
| -rw-r--r-- | lispref/symbols.texi | 4 | ||||
| -rw-r--r-- | lispref/variables.texi | 7 | ||||
| -rw-r--r-- | man/ChangeLog | 73 | ||||
| -rw-r--r-- | man/basic.texi | 21 | ||||
| -rw-r--r-- | man/dired.texi | 26 | ||||
| -rw-r--r-- | man/display.texi | 210 | ||||
| -rw-r--r-- | man/emacs.texi | 20 | ||||
| -rw-r--r-- | man/fixit.texi | 9 | ||||
| -rw-r--r-- | man/frames.texi | 2 | ||||
| -rw-r--r-- | man/help.texi | 80 | ||||
| -rw-r--r-- | man/indent.texi | 22 | ||||
| -rw-r--r-- | man/kmacro.texi | 23 | ||||
| -rw-r--r-- | man/major.texi | 13 | ||||
| -rw-r--r-- | man/msdog.texi | 64 | ||||
| -rw-r--r-- | man/programs.texi | 55 | ||||
| -rw-r--r-- | man/sending.texi | 16 | ||||
| -rw-r--r-- | man/text.texi | 10 | ||||
| -rw-r--r-- | man/trouble.texi | 18 | ||||
| -rw-r--r-- | man/windows.texi | 14 | ||||
| -rw-r--r-- | src/ChangeLog | 113 | ||||
| -rw-r--r-- | src/coding.c | 43 | ||||
| -rw-r--r-- | src/data.c | 4 | ||||
| -rw-r--r-- | src/dispextern.h | 15 | ||||
| -rw-r--r-- | src/doc.c | 11 | ||||
| -rw-r--r-- | src/emacs.c | 3 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/keymap.c | 80 | ||||
| -rw-r--r-- | src/keymap.h | 2 | ||||
| -rw-r--r-- | src/lread.c | 4 | ||||
| -rw-r--r-- | src/s/ms-w32.h | 2 | ||||
| -rw-r--r-- | src/w32.c | 2 | ||||
| -rw-r--r-- | src/w32.h | 22 | ||||
| -rw-r--r-- | src/w32select.c | 1095 | ||||
| -rw-r--r-- | src/xdisp.c | 149 | ||||
| -rw-r--r-- | src/xfns.c | 44 | ||||
| -rw-r--r-- | src/xselect.c | 20 | ||||
| -rw-r--r-- | src/xterm.c | 111 |
162 files changed, 3974 insertions, 1928 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index ac21c3aeabc..dbc48dfa696 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-02-15 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * nt/makedist.bat: Do not rely on non-standard behaviour of | ||
| 4 | tar --exclude. | ||
| 5 | |||
| 1 | 2004-11-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 6 | 2004-11-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * FOR-RELEASE (Indications): Remove two stage update for toolbar (Done). | 8 | * FOR-RELEASE (Indications): Remove two stage update for toolbar (Done). |
| @@ -31,7 +36,7 @@ | |||
| 31 | 36 | ||
| 32 | * FOR-RELEASE: Remove entry about GTK and monochrome displays (done). | 37 | * FOR-RELEASE: Remove entry about GTK and monochrome displays (done). |
| 33 | 38 | ||
| 34 | 2002-06-26 Eli Zaretskii <eliz@is.elta.co.il> | 39 | 2004-06-26 Eli Zaretskii <eliz@is.elta.co.il> |
| 35 | 40 | ||
| 36 | * FOR-RELEASE: Moved here from the etc directory. | 41 | * FOR-RELEASE: Moved here from the etc directory. |
| 37 | 42 | ||
| @@ -44,6 +49,10 @@ | |||
| 44 | * quick-install-emacs: Don't use "function" keyword when defining | 49 | * quick-install-emacs: Don't use "function" keyword when defining |
| 45 | shell functions. | 50 | shell functions. |
| 46 | 51 | ||
| 52 | 2003-09-29 Lute Kamstra <lute@gnu.org> | ||
| 53 | |||
| 54 | * make-tarball.txt: Mention regenerating Emacs' AUTHORS file. | ||
| 55 | |||
| 47 | 2003-09-27 Miles Bader <miles@gnu.ai.mit.edu> | 56 | 2003-09-27 Miles Bader <miles@gnu.ai.mit.edu> |
| 48 | 57 | ||
| 49 | * quick-install-emacs: Remove fns-* pruning, since that file no | 58 | * quick-install-emacs: Remove fns-* pruning, since that file no |
| @@ -193,7 +202,7 @@ | |||
| 193 | version of tar used. | 202 | version of tar used. |
| 194 | 203 | ||
| 195 | ;; Local Variables: | 204 | ;; Local Variables: |
| 196 | ;; coding: iso-2022-7bit-unix | 205 | ;; coding: iso-2022-7bit |
| 197 | ;; End: | 206 | ;; End: |
| 198 | 207 | ||
| 199 | Copyright (C) 2001 Free Software Foundation, Inc. | 208 | Copyright (C) 2001 Free Software Foundation, Inc. |
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 55505c1ae6b..b4750dbc22d 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -218,40 +218,40 @@ man/anti.texi | |||
| 218 | man/basic.texi "Luc Teirlinck" Chong Yidong | 218 | man/basic.texi "Luc Teirlinck" Chong Yidong |
| 219 | man/buffers.texi "Luc Teirlinck" Chong Yidong | 219 | man/buffers.texi "Luc Teirlinck" Chong Yidong |
| 220 | man/building.texi "Ted Zlatanov" <tzz@lifelogs.com> | 220 | man/building.texi "Ted Zlatanov" <tzz@lifelogs.com> |
| 221 | man/calendar.texi Joakim Verona <joakim@verona.se> | 221 | man/calendar.texi joakim@verona.se |
| 222 | man/cmdargs.texi Chong Yidong | 222 | man/cmdargs.texi Chong Yidong |
| 223 | man/commands.texi "Luc Teirlinck" | 223 | man/commands.texi "Luc Teirlinck" |
| 224 | man/custom.texi Chong Yidong | 224 | man/custom.texi Chong Yidong |
| 225 | man/dired.texi | 225 | man/dired.texi Chong Yidong joakim@verona.se |
| 226 | man/display.texi "Luc Teirlinck" | 226 | man/display.texi "Luc Teirlinck" Chong Yidong |
| 227 | man/emacs.texi "Luc Teirlinck" | 227 | man/emacs.texi "Luc Teirlinck" |
| 228 | man/entering.texi "Luc Teirlinck" Chong Yidong | 228 | man/entering.texi "Luc Teirlinck" Chong Yidong |
| 229 | man/files.texi "Luc Teirlinck" Chong Yidong | 229 | man/files.texi "Luc Teirlinck" Chong Yidong |
| 230 | man/fixit.texi "Luc Teirlinck" | 230 | man/fixit.texi "Luc Teirlinck" |
| 231 | man/frames.texi "Luc Teirlinck" Chong Yidong | 231 | man/frames.texi "Luc Teirlinck" Chong Yidong |
| 232 | man/glossary.texi | 232 | man/glossary.texi |
| 233 | man/help.texi "Luc Teirlinck" | 233 | man/help.texi "Luc Teirlinck" Chong Yidong |
| 234 | man/indent.texi "Luc Teirlinck" | 234 | man/indent.texi "Luc Teirlinck" Chong Yidong |
| 235 | man/killing.texi "Luc Teirlinck" Chong Yidong | 235 | man/killing.texi "Luc Teirlinck" Chong Yidong |
| 236 | man/kmacro.texi "Luc Teirlinck" | 236 | man/kmacro.texi "Luc Teirlinck" Chong Yidong |
| 237 | man/macos.texi | 237 | man/macos.texi |
| 238 | man/maintaining.texi | 238 | man/maintaining.texi |
| 239 | man/major.texi "Luc Teirlinck" | 239 | man/major.texi "Luc Teirlinck" Chong Yidong |
| 240 | man/mark.texi "Luc Teirlinck" | 240 | man/mark.texi "Luc Teirlinck" |
| 241 | man/mini.texi "Luc Teirlinck" | 241 | man/mini.texi "Luc Teirlinck" |
| 242 | man/misc.texi | 242 | man/misc.texi |
| 243 | man/msdog.texi | 243 | man/msdog.texi Chong Yidong |
| 244 | man/mule.texi "Luc Teirlinck" | 244 | man/mule.texi "Luc Teirlinck" |
| 245 | man/m-x.texi "Luc Teirlinck" | 245 | man/m-x.texi "Luc Teirlinck" |
| 246 | man/picture.texi Joakim Verona <joakim@verona.se> | 246 | man/picture.texi Joakim Verona <joakim@verona.se> |
| 247 | man/programs.texi "Stephen Eglen" | 247 | man/programs.texi "Stephen Eglen" Chong Yidong |
| 248 | man/regs.texi "Luc Teirlinck" Chong Yidong | 248 | man/regs.texi "Luc Teirlinck" Chong Yidong |
| 249 | man/rmail.texi | 249 | man/rmail.texi |
| 250 | man/screen.texi "Luc Teirlinck" | 250 | man/screen.texi "Luc Teirlinck" |
| 251 | man/search.texi "Luc Teirlinck" | 251 | man/search.texi "Luc Teirlinck" |
| 252 | man/sending.texi | 252 | man/sending.texi |
| 253 | man/text.texi "Luc Teirlinck" Chong Yidong | 253 | man/text.texi "Luc Teirlinck" Chong Yidong |
| 254 | man/trouble.texi | 254 | man/trouble.texi Chong Yidong |
| 255 | man/windows.texi "Luc Teirlinck" Chong Yidong | 255 | man/windows.texi "Luc Teirlinck" Chong Yidong |
| 256 | man/xresources.texi | 256 | man/xresources.texi |
| 257 | 257 | ||
| @@ -271,47 +271,47 @@ lispref/backups.texi "Luc Teirlinck" | |||
| 271 | lispref/buffers.texi "Luc Teirlinck" Chong Yidong | 271 | lispref/buffers.texi "Luc Teirlinck" Chong Yidong |
| 272 | lispref/calendar.texi Joakim Verona <joakim@verona.se> | 272 | lispref/calendar.texi Joakim Verona <joakim@verona.se> |
| 273 | lispref/commands.texi "Luc Teirlinck" | 273 | lispref/commands.texi "Luc Teirlinck" |
| 274 | lispref/compile.texi "Luc Teirlinck" | 274 | lispref/compile.texi "Luc Teirlinck" Chong Yidong |
| 275 | lispref/control.texi "Luc Teirlinck" | 275 | lispref/control.texi "Luc Teirlinck" Chong Yidong |
| 276 | lispref/customize.texi | 276 | lispref/customize.texi |
| 277 | lispref/debugging.texi Joakim Verona <joakim@verona.se> | 277 | lispref/debugging.texi Joakim Verona <joakim@verona.se> |
| 278 | lispref/display.texi | 278 | lispref/display.texi |
| 279 | lispref/edebug.texi | 279 | lispref/edebug.texi |
| 280 | lispref/elisp.texi "Luc Teirlinck" | 280 | lispref/elisp.texi "Luc Teirlinck" |
| 281 | lispref/errors.texi "Luc Teirlinck" | 281 | lispref/errors.texi "Luc Teirlinck" |
| 282 | lispref/eval.texi "Luc Teirlinck" | 282 | lispref/eval.texi "Luc Teirlinck" Chong Yidong |
| 283 | lispref/files.texi "Luc Teirlinck" Chong Yidong | 283 | lispref/files.texi "Luc Teirlinck" Chong Yidong |
| 284 | lispref/frames.texi "Luc Teirlinck" Chong Yidong | 284 | lispref/frames.texi "Luc Teirlinck" Chong Yidong |
| 285 | lispref/functions.texi "Luc Teirlinck" | 285 | lispref/functions.texi "Luc Teirlinck" Chong Yidong |
| 286 | lispref/hash.texi "Luc Teirlinck" | 286 | lispref/hash.texi "Luc Teirlinck" Chong Yidong |
| 287 | lispref/help.texi "Luc Teirlinck" | 287 | lispref/help.texi "Luc Teirlinck" |
| 288 | lispref/hooks.texi | 288 | lispref/hooks.texi |
| 289 | lispref/internals.texi "Luc Teirlinck" | 289 | lispref/internals.texi "Luc Teirlinck" |
| 290 | lispref/intro.texi "Luc Teirlinck" | 290 | lispref/intro.texi "Luc Teirlinck" |
| 291 | lispref/keymaps.texi "Luc Teirlinck" | 291 | lispref/keymaps.texi "Luc Teirlinck" |
| 292 | lispref/lists.texi "Luc Teirlinck" | 292 | lispref/lists.texi "Luc Teirlinck" Chong Yidong |
| 293 | lispref/loading.texi "Luc Teirlinck" | 293 | lispref/loading.texi "Luc Teirlinck" Chong Yidong |
| 294 | lispref/locals.texi | 294 | lispref/locals.texi |
| 295 | lispref/macros.texi "Luc Teirlinck" | 295 | lispref/macros.texi "Luc Teirlinck" |
| 296 | lispref/maps.texi | 296 | lispref/maps.texi |
| 297 | lispref/markers.texi "Luc Teirlinck" | 297 | lispref/markers.texi "Luc Teirlinck" |
| 298 | lispref/minibuf.texi "Luc Teirlinck" | 298 | lispref/minibuf.texi "Luc Teirlinck" Chong Yidong |
| 299 | lispref/modes.texi Chong Yidong | 299 | lispref/modes.texi Chong Yidong |
| 300 | lispref/nonascii.texi "Luc Teirlinck" | 300 | lispref/nonascii.texi "Luc Teirlinck" |
| 301 | lispref/numbers.texi "Luc Teirlinck" | 301 | lispref/numbers.texi "Luc Teirlinck" Chong Yidong |
| 302 | lispref/objects.texi "Luc Teirlinck" | 302 | lispref/objects.texi "Luc Teirlinck" Chong Yidong |
| 303 | lispref/os.texi "Luc Teirlinck" | 303 | lispref/os.texi "Luc Teirlinck" |
| 304 | lispref/positions.texi "Luc Teirlinck" Chong Yidong | 304 | lispref/positions.texi "Luc Teirlinck" Chong Yidong |
| 305 | lispref/processes.texi | 305 | lispref/processes.texi |
| 306 | lispref/searching.texi "Luc Teirlinck" | 306 | lispref/searching.texi "Luc Teirlinck" |
| 307 | lispref/sequences.texi "Luc Teirlinck" | 307 | lispref/sequences.texi "Luc Teirlinck" |
| 308 | lispref/streams.texi "Luc Teirlinck" | 308 | lispref/streams.texi "Luc Teirlinck" Chong Yidong |
| 309 | lispref/strings.texi "Luc Teirlinck" Chong Yidong | 309 | lispref/strings.texi "Luc Teirlinck" Chong Yidong |
| 310 | lispref/symbols.texi "Luc Teirlinck" | 310 | lispref/symbols.texi "Luc Teirlinck" Chong Yidong |
| 311 | lispref/syntax.texi "Luc Teirlinck" | 311 | lispref/syntax.texi "Luc Teirlinck" |
| 312 | lispref/text.texi Chong Yidong | 312 | lispref/text.texi Chong Yidong |
| 313 | lispref/tips.texi "Luc Teirlinck" | 313 | lispref/tips.texi "Luc Teirlinck" |
| 314 | lispref/variables.texi "Luc Teirlinck" | 314 | lispref/variables.texi "Luc Teirlinck" Chong Yidong |
| 315 | lispref/windows.texi "Luc Teirlinck" Chong Yidong | 315 | lispref/windows.texi "Luc Teirlinck" Chong Yidong |
| 316 | 316 | ||
| 317 | 317 | ||
diff --git a/admin/nt/makedist.bat b/admin/nt/makedist.bat index feb6799080f..d48e6736004 100755 --- a/admin/nt/makedist.bat +++ b/admin/nt/makedist.bat | |||
| @@ -1,127 +1,130 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | 2 | ||
| 3 | rem This batch file doesn't work with Cygwin tar because #files# | 3 | rem Beware broken ports of tar. Recent cygwin versions work well, older |
| 4 | rem has DOS line endings, which Cygwin tar misinterprets. | 4 | rem cygwin versions and the current MSys port have problems with DOS |
| 5 | rem I use the version of tar from | 5 | rem line ends when reading file names from a file. Other ports have their |
| 6 | rem ftp://ftp.gnu.org/gnu/windows/emacs/utilities/i386/tar-1.11.2a.exe | 6 | rem own problems too. |
| 7 | rem renamed as wtar.exe. | 7 | set TAR=tar |
| 8 | set TAR=wtar | 8 | |
| 9 | 9 | rem Make a copy of current Emacs source | |
| 10 | rem Make a copy of current Emacs source | 10 | if (%3) == () goto usage |
| 11 | if (%3) == () goto usage | 11 | if not (%4) == () goto %4 |
| 12 | if not (%4) == () goto %4 | 12 | if not (%4) == (src) goto :lisp |
| 13 | if not (%4) == (src) goto :lisp | 13 | |
| 14 | 14 | :src | |
| 15 | :src | 15 | |
| 16 | 16 | echo Create full source distribution, excluding leim | |
| 17 | echo Create full source distribution, excluding leim | 17 | %TAR% --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz |
| 18 | %TAR% --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz | 18 | if not (%4) == () goto end |
| 19 | if not (%4) == () goto end | 19 | |
| 20 | 20 | :lisp | |
| 21 | :lisp | 21 | echo Create limited elisp source distribution |
| 22 | echo Create limited elisp source distribution | 22 | %TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz |
| 23 | %TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz | 23 | if not (%4) == () goto end |
| 24 | if not (%4) == () goto end | 24 | |
| 25 | 25 | :bin | |
| 26 | :bin | 26 | |
| 27 | 27 | set eld=emacs-%1/lisp | |
| 28 | set eld=emacs-%1/lisp | 28 | |
| 29 | 29 | rem Keep this list in sync with the DONTCOMPILE list in lisp/makefile.w32-in | |
| 30 | rem Keep this list in sync with the DONTCOMPILE list in lisp/Makefile.in | 30 | |
| 31 | 31 | set elfiles=%eld%/cus-load.el %eld%/cus-start.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-maint.el %eld%/eshell/esh-groups.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/generic-x.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/version.el | |
| 32 | set elfiles=%eld%/cus-load.el %eld%/cus-start.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-maint.el %eld%/eshell/esh-groups.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/generic-x.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/version.el | 32 | |
| 33 | 33 | set fns_el= | |
| 34 | set fns_el= | 34 | for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f |
| 35 | for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f | 35 | |
| 36 | 36 | echo Create bin distribution | |
| 37 | echo Create bin distribution | 37 | copy %3\README.W32 emacs-%1\README.W32 |
| 38 | copy %3\README.W32 emacs-%1\README.W32 | 38 | |
| 39 | 39 | del #files# #elfiles# | |
| 40 | del #files# | 40 | for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files# |
| 41 | for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files# | 41 | for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#elfiles# |
| 42 | for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#files# | 42 | for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp) do echo %%f>>#files# |
| 43 | for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%) do echo %%f>>#files# | 43 | for %%f in (emacs-%1/lock emacs-%1/site-lisp) do echo %%f>>#files# |
| 44 | for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#files# | 44 | for %%f in (%elfiles% emacs-%1/site-lisp/subdirs.el) do echo %%f>>#elfiles# |
| 45 | for %%f in (emacs-%1/lock emacs-%1/site-lisp emacs-%1/site-lisp/subdirs.el) do echo %%f>>#files# | 45 | for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#elfiles# |
| 46 | %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *.el --exclude *~ -T #files# -cvf - | gzip -9 > %2-bin-i386.tar.gz | 46 | |
| 47 | del emacs-%1\README.W32 | 47 | %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude "*.el" --exclude "*~" -T #files# -cvf %2-bin-i386.tar |
| 48 | del #files# | 48 | %TAR% -T #elfiles# -rvf %2-bin-i386.tar |
| 49 | if not (%4) == () goto end | 49 | gzip -9 %2-bin-i386.tar |
| 50 | 50 | del emacs-%1\README.W32 | |
| 51 | :fullbin | 51 | rem del #files# #elfiles# |
| 52 | 52 | if not (%4) == () goto end | |
| 53 | echo Create full bin distribution | 53 | |
| 54 | copy %3\README.W32 emacs-%1\README.W32 | 54 | :fullbin |
| 55 | 55 | ||
| 56 | %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz | 56 | echo Create full bin distribution |
| 57 | del emacs-%1\README.W32 | 57 | copy %3\README.W32 emacs-%1\README.W32 |
| 58 | if not (%4) == () goto end | 58 | |
| 59 | 59 | %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz | |
| 60 | :leim | 60 | del emacs-%1\README.W32 |
| 61 | 61 | if not (%4) == () goto end | |
| 62 | echo Create archive with precompiled leim files | 62 | |
| 63 | %TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz | 63 | :leim |
| 64 | if not (%4) == () goto end | 64 | |
| 65 | 65 | echo Create archive with precompiled leim files | |
| 66 | :undumped | 66 | %TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz |
| 67 | 67 | if not (%4) == () goto end | |
| 68 | echo Create archive with extra files needed for redumping emacs | 68 | |
| 69 | copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32 | 69 | :undumped |
| 70 | copy %3\dump.bat emacs-%1\bin | 70 | |
| 71 | if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin | 71 | echo Create archive with extra files needed for redumping emacs |
| 72 | if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin | 72 | copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32 |
| 73 | %TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz | 73 | copy %3\dump.bat emacs-%1\bin |
| 74 | del emacs-%1\bin\temacs.exe | 74 | if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin |
| 75 | del emacs-%1\bin\dump.bat | 75 | if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin |
| 76 | del emacs-%1\README-UNDUMP.W32 | 76 | %TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz |
| 77 | if not (%4) == () goto end | 77 | del emacs-%1\bin\temacs.exe |
| 78 | 78 | del emacs-%1\bin\dump.bat | |
| 79 | :barebin | 79 | del emacs-%1\README-UNDUMP.W32 |
| 80 | 80 | if not (%4) == () goto end | |
| 81 | echo Create archive with just the basic binaries and generated files | 81 | |
| 82 | echo (the user needs to unpack the full source distribution for | 82 | :barebin |
| 83 | echo everything else) | 83 | |
| 84 | copy %3\README.W32 emacs-%1\README.W32 | 84 | echo Create archive with just the basic binaries and generated files |
| 85 | %TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz | 85 | echo (the user needs to unpack the full source distribution for |
| 86 | del emacs-%1\README.W32 | 86 | echo everything else) |
| 87 | if not (%4) == () goto end | 87 | copy %3\README.W32 emacs-%1\README.W32 |
| 88 | 88 | %TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz | |
| 89 | goto end | 89 | del emacs-%1\README.W32 |
| 90 | 90 | if not (%4) == () goto end | |
| 91 | rem Only do this if explicitly requested | 91 | |
| 92 | :zipfiles | 92 | goto end |
| 93 | 93 | ||
| 94 | echo Create zip files for bin and lisp archives | 94 | rem Only do this if explicitly requested |
| 95 | mkdir distrib | 95 | :zipfiles |
| 96 | cd distrib | 96 | |
| 97 | gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf - | 97 | echo Create zip files for bin and lisp archives |
| 98 | rem Need to split emacs.exe into fragments because it is too big now | 98 | mkdir distrib |
| 99 | rem to fit on a floppy even by itself. | 99 | cd distrib |
| 100 | copy %3\stitch.bat %2\bin | 100 | gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf - |
| 101 | cd %2\bin | 101 | rem Need to split emacs.exe into fragments because it is too big now |
| 102 | split -b 1000000 emacs.exe emacs | 102 | rem to fit on a floppy even by itself. |
| 103 | del emacs.exe | 103 | copy %3\stitch.bat %2\bin |
| 104 | cd ..\.. | 104 | cd %2\bin |
| 105 | zip -rp9 em%5bin %2 | 105 | split -b 1000000 emacs.exe emacs |
| 106 | rm -rf %2 | 106 | del emacs.exe |
| 107 | zipsplit -n 1400000 -b .. em%5bin.zip | 107 | cd ..\.. |
| 108 | del em%5bin.zip | 108 | zip -rp9 em%5bin %2 |
| 109 | gunzip -c ..\%2-lisp.tar.gz | %TAR% xf - | 109 | rm -rf %2 |
| 110 | zip -rp9 em%5lis %2 | 110 | zipsplit -n 1400000 -b .. em%5bin.zip |
| 111 | rm -rf %2 | 111 | del em%5bin.zip |
| 112 | zipsplit -n 1400000 -b .. em%5lis.zip | 112 | gunzip -c ..\%2-lisp.tar.gz | %TAR% xf - |
| 113 | del em%5lis.zip | 113 | zip -rp9 em%5lis %2 |
| 114 | cd .. | 114 | rm -rf %2 |
| 115 | 115 | zipsplit -n 1400000 -b .. em%5lis.zip | |
| 116 | goto end | 116 | del em%5lis.zip |
| 117 | 117 | cd .. | |
| 118 | :usage | 118 | |
| 119 | echo Generate source and binary distributions of emacs. | 119 | goto end |
| 120 | echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin] | 120 | |
| 121 | echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles) | 121 | :usage |
| 122 | echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version | 122 | echo Generate source and binary distributions of emacs. |
| 123 | echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206) | 123 | echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin] |
| 124 | :end | 124 | echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles) |
| 125 | echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version | ||
| 126 | echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206) | ||
| 127 | :end | ||
| 125 | 128 | ||
| 126 | goto skipArchTag | 129 | goto skipArchTag |
| 127 | arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68 | 130 | arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68 |
diff --git a/etc/ChangeLog b/etc/ChangeLog index e464e75dbe1..e357de8121a 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-02-14 Lute Kamstra <lute@gnu.org> | ||
| 2 | |||
| 3 | * TODO: Remove battery.el entry (DONE). | ||
| 4 | |||
| 5 | * TUTORIAL.nl: Synchronize with TUTORIAL. Correct some typos. | ||
| 6 | Make the terminology more consistent. Fill the text using the | ||
| 7 | default `fill-column'. | ||
| 8 | |||
| 1 | 2005-02-08 Lute Kamstra <lute@gnu.org> | 9 | 2005-02-08 Lute Kamstra <lute@gnu.org> |
| 2 | 10 | ||
| 3 | * TUTORIAL: Remove some uses of the term "buffer" before it is | 11 | * TUTORIAL: Remove some uses of the term "buffer" before it is |
| @@ -2188,6 +2188,14 @@ some of them to initialize some of the default faces. | |||
| 2188 | `list-colors-display' shows the list of System color names, in case | 2188 | `list-colors-display' shows the list of System color names, in case |
| 2189 | you wish to use them in other faces. | 2189 | you wish to use them in other faces. |
| 2190 | 2190 | ||
| 2191 | --- | ||
| 2192 | ** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations. | ||
| 2193 | Those systems use Unicode internally, so this allows Emacs to share | ||
| 2194 | multilingual text with other applications. On other versions of | ||
| 2195 | MS Windows, Emacs now uses the appropriate locale coding-system, so | ||
| 2196 | the clipboard should work correctly for your local language without | ||
| 2197 | any customizations. | ||
| 2198 | |||
| 2191 | +++ | 2199 | +++ |
| 2192 | ** Under X11, it is possible to swap Alt and Meta (and Super and Hyper). | 2200 | ** Under X11, it is possible to swap Alt and Meta (and Super and Hyper). |
| 2193 | The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym', | 2201 | The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym', |
| @@ -15,8 +15,6 @@ to the FSF. | |||
| 15 | ought to be possible to omit text which is invisible (due to a | 15 | ought to be possible to omit text which is invisible (due to a |
| 16 | text-property, overlay, or selective display) from the kill-ring. | 16 | text-property, overlay, or selective display) from the kill-ring. |
| 17 | 17 | ||
| 18 | ** battery.el display-battery should be replaced with a minor mode. | ||
| 19 | |||
| 20 | ** Redefine define-generic-mode as a macro, so the compiler | 18 | ** Redefine define-generic-mode as a macro, so the compiler |
| 21 | sees the definitions it generates. | 19 | sees the definitions it generates. |
| 22 | 20 | ||
diff --git a/etc/TUTORIAL.nl b/etc/TUTORIAL.nl index d02ddce4eb2..b4849dd73a1 100644 --- a/etc/TUTORIAL.nl +++ b/etc/TUTORIAL.nl | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | Copyright (c) 1985, 2004, 2005 Free Software Foundation, Inc; Zie de voorwaarden onderaan. | 1 | Je leest nu de Emacs-inleiding. De kopieervoorwaarden staan onderaan. |
| 2 | Je leest nu de Emacs-inleiding, zoals vertaald door Pieter Schoenmakers. | 2 | Copyright (c) 1985, 1996, 1997, 2003, 2004, 2005 Free Software Foundation |
| 3 | 3 | ||
| 4 | De meeste Emacs-commando's gebruiken de CONTROL-toets (soms CTRL of CTL | 4 | De meeste Emacs-commando's gebruiken de CONTROL-toets (soms CTRL of CTL |
| 5 | genaamd) en/of de META-toets (soms genaamd EDIT of ALT). In plaats van | 5 | genaamd) en/of de META-toets (soms genaamd EDIT of ALT). In plaats van |
| @@ -7,31 +7,32 @@ steeds de volledige naam te noemen, gebruiken we de volgende afkortingen: | |||
| 7 | 7 | ||
| 8 | C-<ltr> betekent: houd de CONTROL-toets ingedrukt en tik de toets <ltr> | 8 | C-<ltr> betekent: houd de CONTROL-toets ingedrukt en tik de toets <ltr> |
| 9 | Dus C-f wordt: houd de CONTROL-toets ingedrukt en tik f. | 9 | Dus C-f wordt: houd de CONTROL-toets ingedrukt en tik f. |
| 10 | M-<ltr> betekent: houd de META-, EDIT- of ALT-toets ingedrukt en tik de | 10 | M-<ltr> betekent: houd de META-, EDIT- of ALT-toets ingedrukt en tik |
| 11 | toets <chr>. Als er geen toets META, EDIT of ALT is, kun je ook | 11 | de toets <ltr>. Als er geen toets META, EDIT of ALT is, kun |
| 12 | eerst de ESC-toets tikken, gevolgd door <ltr>. We verwijzen naar | 12 | je ook eerst de ESC-toets tikken, gevolgd door <ltr>. We |
| 13 | de ESC toets als <ESC>. | 13 | verwijzen naar de ESC-toets als <ESC>. |
| 14 | 14 | ||
| 15 | BELANGRIJK: om Emacs te verlaten, tik C-x C-c (twee tekens). | 15 | BELANGRIJK: om Emacs te verlaten, tik C-x C-c (twee tekens). |
| 16 | De tekens ">>" tegen de linkerkantlijn nodigen je uit om een | 16 | De tekens ">>" tegen de linkerkantlijn nodigen je uit om een bepaald |
| 17 | bepaald commando te proberen. Bijvoorbeeld: | 17 | commando te proberen. Bijvoorbeeld: |
| 18 | <<Blank lines inserted here by startup of help-with-tutorial>> | 18 | <<Blank lines inserted around following line by help-with-tutorial>> |
| 19 | >> Tik nu C-v (volgend scherm) om naar het volgende scherm te gaan. | 19 | [Lege regels om didactische redenen. Hieronder gaat het verder.] |
| 20 | (Geef nu het commando door de CONTROL-toets ingedrukt te houden | 20 | >> Tik nu C-v (volgend scherm) om naar het volgende scherm te gaan. |
| 21 | terwijl je de v tikt.) | 21 | (Geef nu het commando door de CONTROL-toets ingedrukt te |
| 22 | Vanaf nu moet je dit steeds herhalen als je klaar bent met het | 22 | houden terwijl je de v tikt.) Vanaf nu moet je dit steeds |
| 23 | lezen van een scherm. | 23 | herhalen als je klaar bent met het lezen van een scherm. |
| 24 | 24 | ||
| 25 | Merk op dat er een overlapping van twee regels is als je van een scherm naar | 25 | Merk op dat er een overlapping van twee regels is als je van een |
| 26 | het volgende gaat; dat zorgt voor continuïteit bij het lezen van | 26 | scherm naar het volgende gaat; dat zorgt voor continuïteit bij het |
| 27 | de tekst. | 27 | lezen van de tekst. |
| 28 | 28 | ||
| 29 | Het eerste wat je moet weten, is hoe je je naar verschillende plaatsen in de | 29 | Het eerste wat je moet weten, is hoe je je naar verschillende plaatsen |
| 30 | tekst kan bewegen. Je weet al hoe je een scherm vooruit moet gaan: met | 30 | in de tekst kan bewegen. Je weet al hoe je een scherm vooruit moet |
| 31 | C-v. Om een scherm terug te gaan, tik je M-v (houd de META-toets ingedrukt | 31 | gaan: met C-v. Om een scherm terug te gaan, tik je M-v (houd de |
| 32 | en tik v, of tik <ESC>-v als je geen META, EDIT of ALT toets hebt). | 32 | META-toets ingedrukt en tik v, of tik <ESC> v als je geen META-, EDIT- |
| 33 | of ALT-toets hebt). | ||
| 33 | 34 | ||
| 34 | >> Probeer nu een paar keer M-v, steeds gevolgd door C-v. | 35 | >> Probeer nu een paar keer M-v, steeds gevolgd door C-v. |
| 35 | 36 | ||
| 36 | 37 | ||
| 37 | * SAMENVATTING | 38 | * SAMENVATTING |
| @@ -39,16 +40,20 @@ en tik v, of tik <ESC>-v als je geen META, EDIT of ALT toets hebt). | |||
| 39 | 40 | ||
| 40 | De volgende commando's zijn handig om volledige schermen te bekijken: | 41 | De volgende commando's zijn handig om volledige schermen te bekijken: |
| 41 | 42 | ||
| 42 | C-v ga een scherm vooruit | 43 | C-v Ga een scherm vooruit |
| 43 | M-v ga een scherm terug | 44 | M-v Ga een scherm terug |
| 44 | C-l maak het scherm schoon en teken alle tekst | 45 | C-l Maak het scherm schoon en teken alle tekst opnieuw, |
| 45 | opnieuw, waarbij de regel waarop de cursor | 46 | waarbij de regel waarop de cursor staat, op het |
| 46 | staat, op het midden van het scherm terecht | 47 | midden van het scherm terecht komt. (C-l is |
| 47 | komt. (C-l is CONTROL-L, niet CONTROL-1.) | 48 | CONTROL-L, niet CONTROL-1.) |
| 48 | 49 | ||
| 49 | >> Kijk waar de cursor staat, en onthoud de tekst errond. | 50 | >> Kijk waar de cursor staat, en onthoud de tekst er omheen. Tik C-l. |
| 50 | Tik C-l. | 51 | Zoek de cursor en merk op dat hij nog steeds bij dezelfde tekst |
| 51 | Zoek de cursor en merk op dat hij nog steeds bij dezelfde tekst staat. | 52 | staat. |
| 53 | |||
| 54 | Als je toetsenbord PageUp- en PageDn-toetsen heeft dan kun je deze ook | ||
| 55 | gebruiken om een scherm terug dan wel vooruit te gaan, maar het werken | ||
| 56 | met C-v en M-v is efficiënter. | ||
| 52 | 57 | ||
| 53 | 58 | ||
| 54 | * BASISCOMMANDO'S CURSORBEWEGINGEN | 59 | * BASISCOMMANDO'S CURSORBEWEGINGEN |
| @@ -58,12 +63,12 @@ Het is handig om je per scherm te bewegen, maar hoe beweeg je je nu | |||
| 58 | naar een specifieke plaats op het scherm? | 63 | naar een specifieke plaats op het scherm? |
| 59 | 64 | ||
| 60 | Er is een aantal manieren waarop je dit kan doen. Je kan de | 65 | Er is een aantal manieren waarop je dit kan doen. Je kan de |
| 61 | pijltjestoetsen gebruiken, maar het is efficïenter om je handen in de | 66 | pijltjestoetsen gebruiken, maar het is efficiënter om je handen in de |
| 62 | standaardhouding te laten, en de commando's C-p, C-b, C-f en C-n te | 67 | standaardhouding te laten, en de commando's C-p, C-b, C-f en C-n te |
| 63 | gebruiken. Elk van deze commando's | 68 | gebruiken. Elk van deze commando's verplaatst de cursor precies een |
| 64 | verplaatst de cursor precies een regel of teken in een bepaalde richting | 69 | regel of teken in een bepaalde richting op het scherm. Hier volgt een |
| 65 | op het scherm. Hier volgt een figuur met de vier commando's en de | 70 | figuur met de vier commando's en de richting waarin ze de cursor |
| 66 | richting waarin ze de cursor bewegen: | 71 | bewegen: |
| 67 | 72 | ||
| 68 | vorige regel, C-p | 73 | vorige regel, C-p |
| 69 | : | 74 | : |
| @@ -73,113 +78,115 @@ richting waarin ze de cursor bewegen: | |||
| 73 | : | 78 | : |
| 74 | volgende regel, C-n | 79 | volgende regel, C-n |
| 75 | 80 | ||
| 76 | >> Verplaats, met C-n of C-p, de cursor naar de middelste regel van | 81 | >> Verplaats, met C-n of C-p, de cursor naar de middelste regel van de |
| 77 | de figuur. Tik dan C-l om de hele figuur in het midden van het | 82 | figuur. Tik dan C-l om de hele figuur in het midden van het |
| 78 | centrum te plaatsen. | 83 | centrum te plaatsen. |
| 79 | 84 | ||
| 80 | Met een beetje kennis van het Engels zijn deze commando's gemakkelijk te | 85 | Met een beetje kennis van het Engels zijn deze commando's gemakkelijk |
| 81 | onthouden: de p komt van "previous" (vorige), de n van "next" (volgende), de | 86 | te onthouden: de p komt van "previous" (vorige), de n van "next" |
| 82 | b van "backward" (achteruit) en de f van "forward" (vooruit). Dit zijn de | 87 | (volgende), de b van "backward" (achteruit) en de f van "forward" |
| 83 | basiscommando's om de cursor te bewegen, dus je zult ze VOORTDUREND | 88 | (vooruit). Dit zijn de basiscommando's om de cursor te bewegen, dus |
| 84 | gebruiken: het is vooruitziend als je ze nu leert te gebruiken. | 89 | je zult ze VOORTDUREND gebruiken: het is vooruitziend als je ze nu |
| 90 | leert te gebruiken. | ||
| 85 | 91 | ||
| 86 | >> Tik een paar keer C-n om de cursor op deze regel te krijgen. | 92 | >> Tik een paar keer C-n om de cursor op deze regel te krijgen. |
| 87 | 93 | ||
| 88 | >> Beweeg je binnen de regel met C-f (herhaaldelijk) en terug omhoog met C-p. | 94 | >> Beweeg je binnen de regel met C-f (herhaaldelijk) en terug omhoog |
| 89 | Let op wat C-p doet als de cursor midden in een regel staat. | 95 | met C-p. Let op wat C-p doet als de cursor midden in een regel |
| 96 | staat. | ||
| 90 | 97 | ||
| 91 | Elke regel eindigt met een Newline-teken (het Engelse "new line" betekent | 98 | Elke regel eindigt met een Newline-teken (het Engelse "new line" |
| 92 | "nieuwe regel"); dit teken scheidt elke regel van de volgende. De laatste | 99 | betekent "nieuwe regel"); dit teken scheidt elke regel van de |
| 93 | regel in een bestand zou eigenlijk ook met een Newline moeten eindigen (maar dat | 100 | volgende. De laatste regel in een bestand zou eigenlijk ook met een |
| 94 | is niet noodzakelijk voor Emacs). | 101 | Newline moeten eindigen (maar dat is niet noodzakelijk voor Emacs). |
| 95 | 102 | ||
| 96 | >> Probeer C-b aan het begin van een regel. | 103 | >> Probeer C-b aan het begin van een regel. De cursor zal zich naar |
| 97 | De cursor zal zich naar het eind van de vorige regel bewegen, | 104 | het eind van de vorige regel bewegen, omdat je achteruit over het |
| 98 | omdat je achteruit over het Newline teken gaat. | 105 | Newline teken gaat. |
| 99 | 106 | ||
| 100 | Net als C-b kan ook C-f zich over Newline-tekens heen bewegen. | 107 | Net als C-b kan ook C-f zich over Newline-tekens heen bewegen. |
| 101 | 108 | ||
| 102 | >> Tik nog een aantal keren het commando C-b, zodat je een gevoel krijgt waar de | 109 | >> Tik nog een aantal keren het commando C-b, zodat je een gevoel |
| 103 | cursor is. | 110 | krijgt waar de cursor is. Tik dan enkele keren C-f om de cursor |
| 104 | Tik dan enkele keren C-f om de cursor terug naar het einde van de regel | 111 | terug naar het einde van de regel te bewegen. Een verder C-f |
| 105 | te bewegen. | 112 | commando beweegt de cursor dan naar de volgende regel. |
| 106 | Een verder C-f commando beweegt de cursor dan naar de volgende regel. | ||
| 107 | 113 | ||
| 108 | Wanneer je de cursor voorbij het begin of het einde van het scherm beweegt, | 114 | Wanneer je de cursor voorbij het begin of het einde van het scherm |
| 109 | zal de tekst over het scherm heen schuiven. Dit heet "scrollen", of | 115 | beweegt, zal de tekst over het scherm heen schuiven. Dit heet |
| 110 | "schuiven" in goed Nederlands. Door te scrollen zorgt Emacs ervoor dat de | 116 | "scrollen", of "schuiven" in goed Nederlands. Door te scrollen zorgt |
| 111 | cursor de gewenste beweging kan maken zonder dat de cursor van het scherm | 117 | Emacs ervoor dat de cursor de gewenste beweging kan maken zonder dat |
| 112 | af beweegt. | 118 | de cursor van het scherm af beweegt. |
| 113 | 119 | ||
| 114 | >> Probeer de cursor voorbij de onderkant van het scherm te bewegen met | 120 | >> Probeer de cursor voorbij de onderkant van het scherm te bewegen |
| 115 | C-n en zie wat er gebeurt. | 121 | met C-n en zie wat er gebeurt. |
| 116 | 122 | ||
| 117 | Als de beweging per teken te langzaam gaat, kan je de cursor ook per | 123 | Als de beweging per teken te langzaam gaat, kan je de cursor ook per |
| 118 | woord bewegen. M-f (META-f) beweegt de cursor een woord vooruit en M-b | 124 | woord bewegen. M-f (META-f) beweegt de cursor een woord vooruit en |
| 119 | een woord achteruit. | 125 | M-b een woord achteruit. |
| 120 | 126 | ||
| 121 | >> Tik enkele keren M-f en M-b. | 127 | >> Tik enkele keren M-f en M-b. |
| 122 | 128 | ||
| 123 | Als je midden in een woord staat, beweegt M-f de cursor naar het eind van | 129 | Als je midden in een woord staat, beweegt M-f de cursor naar het eind |
| 124 | het woord. Als je op een witte ruimte tussen twee woorden staat, beweegt M-f de | 130 | van het woord. Als je op een witte ruimte tussen twee woorden staat, |
| 125 | cursor naar het eind van het volgende woord. Het commando M-b beweegt | 131 | beweegt M-f de cursor naar het eind van het volgende woord. Het |
| 126 | de cursor analoog de andere kant op. | 132 | commando M-b beweegt de cursor analoog de andere kant op. |
| 127 | 133 | ||
| 128 | >> Tik enkele keren M-f en M-b en daar tussendoor een paar maal C-f en C-b, | 134 | >> Tik enkele keren M-f en M-b en daar tussendoor een paar maal C-f en |
| 129 | zodat je ziet wat M-f en M-b doen vanaf bepaalde plaatsen in een | 135 | C-b, zodat je ziet wat M-f en M-b doen vanaf bepaalde plaatsen in |
| 130 | woord en tussen twee woorden. | 136 | een woord en tussen twee woorden. |
| 131 | 137 | ||
| 132 | Merk op dat er een analogie bestaat tussen enerzijds C-f en C-b en | 138 | Merk op dat er een analogie bestaat tussen enerzijds C-f en C-b en |
| 133 | anderzijds M-f en M-b. Het is bij veel commando's zo dat META-tekens | 139 | anderzijds M-f en M-b. Het is bij veel commando's zo dat META-tekens |
| 134 | gebruikt worden om iets te doen in eenheden van de taal (woorden, | 140 | gebruikt worden om iets te doen in eenheden van de taal (woorden, |
| 135 | zinnen, alinea's) terwijl Control-tekens te maken hebben met dingen die | 141 | zinnen, alinea's) terwijl CONTROL-tekens te maken hebben met dingen |
| 136 | los staan van wat je aan het editeren bent (tekens, regels, enz.). | 142 | die los staan van wat je aan het bewerken bent (tekens, regels, enz.). |
| 137 | 143 | ||
| 138 | Deze analogie gaat ook op voor regels en zinnen: C-a en C-e bewegen de | 144 | Deze analogie gaat ook op voor regels en zinnen: C-a en C-e bewegen de |
| 139 | cursor naar het begin of eind van een regel, terwijl met M-a, | 145 | cursor naar het begin of eind van een regel, terwijl met M-a, |
| 140 | respectievelijk M-e, de cursor naar het begin, respectievelijk het eind, | 146 | respectievelijk M-e, de cursor naar het begin, respectievelijk het |
| 141 | van een zin gaat. | 147 | eind, van een zin gaat. |
| 142 | 148 | ||
| 143 | >> Tik enkele keren C-a, en dan een enkele keren C-e. | 149 | >> Tik enkele keren C-a, en dan een enkele keren C-e. |
| 144 | Tik een paar maal M-a, en dan enkele keren M-e. | 150 | Tik een paar maal M-a, en dan enkele keren M-e. |
| 145 | 151 | ||
| 146 | Bemerk hoe herhaalde C-a commando's niets doen, terwijl herhaalde M-a | 152 | Bemerk hoe herhaalde C-a commando's niets doen, terwijl herhaalde M-a |
| 147 | commando's de cursor steeds een zin achteruit bewegen. Alhoewel ze niet volledig | 153 | commando's de cursor steeds een zin achteruit bewegen. Alhoewel ze |
| 148 | overeenkomen, is het gedrag van beide heel natuurlijk. | 154 | niet volledig overeenkomen, is het gedrag van beide heel natuurlijk. |
| 149 | 155 | ||
| 150 | De plaats van de cursor in de tekst wordt "punt" genoemd (zonder | 156 | De plaats van de cursor in de tekst wordt "punt" genoemd (zonder |
| 151 | lidwoord, "point" in het Engels). Anders gezegd: de cursor laat op het | 157 | lidwoord, "point" in het Engels). Anders gezegd: de cursor laat op |
| 152 | scherm de plek zien waar punt in de tekst staat. | 158 | het scherm de plek zien waar punt in de tekst staat. |
| 153 | 159 | ||
| 154 | Nu volgt een samenvatting van eenvoudige cursorbewegingen, | 160 | Nu volgt een samenvatting van eenvoudige cursorbewegingen, met |
| 155 | met inbegrip van de commando's die de cursor per woord of zin bewegen: | 161 | inbegrip van de commando's die de cursor per woord of zin bewegen: |
| 156 | 162 | ||
| 157 | C-f ga een teken vooruit | 163 | C-f Ga een teken vooruit |
| 158 | C-b ga een teken achteruit | 164 | C-b Ga een teken achteruit |
| 159 | 165 | ||
| 160 | M-f ga een woord vooruit | 166 | M-f Ga een woord vooruit |
| 161 | M-b ga een woord achteruit | 167 | M-b Ga een woord achteruit |
| 162 | 168 | ||
| 163 | C-n ga naar de volgende regel | 169 | C-n Ga naar de volgende regel |
| 164 | C-p ga naar de vorige regel | 170 | C-p Ga naar de vorige regel |
| 165 | 171 | ||
| 166 | C-a ga naar het begin van de regel | 172 | C-a Ga naar het begin van de regel |
| 167 | C-e ga naar het eind van de regel | 173 | C-e Ga naar het eind van de regel |
| 168 | 174 | ||
| 169 | M-a ga terug naar het begin van de zin | 175 | M-a Ga terug naar het begin van de zin |
| 170 | M-e ga vooruit naar het eind van de zin | 176 | M-e Ga vooruit naar het eind van de zin |
| 171 | 177 | ||
| 172 | >> Probeer al deze commando's een paar keer als oefening. | 178 | >> Probeer al deze commando's een paar keer als oefening. Deze |
| 173 | Deze commando's worden het vaakst gebruikt. | 179 | commando's worden het vaakst gebruikt. |
| 174 | 180 | ||
| 175 | Er zijn nog twee belangrijke cursorbewegingen: M-< | 181 | Er zijn nog twee belangrijke cursorbewegingen: M-< (META kleiner-dan) |
| 176 | (META kleiner-dan) beweegt de cursor naar het begin van het bestand, | 182 | beweegt de cursor naar het begin van het bestand, en M-> (META |
| 177 | en M-> (META groter-dan) beweegt hem naar het eind. | 183 | groter-dan) beweegt hem naar het eind. |
| 178 | 184 | ||
| 179 | Op de meeste toetsenborden zit de '<' boven de komma, zodat je de | 185 | Op de meeste toetsenborden zit de '<' boven de komma, zodat je de |
| 180 | Shift-toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om het | 186 | Shift-toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om |
| 181 | '<'-teken in te tikken. Op deze toetsenborden moet je ook de shift | 187 | het '<'-teken in te tikken. Op deze toetsenborden moet je ook de |
| 182 | gebruiken om M-< in te tikken: zonder shift zou je M-, (META komma) tikken. | 188 | shift gebruiken om M-< in te tikken: zonder shift zou je M-, (META |
| 189 | komma) tikken. | ||
| 183 | 190 | ||
| 184 | >> Tik nu M-< om naar het begin van dit bestand te gaan. | 191 | >> Tik nu M-< om naar het begin van dit bestand te gaan. |
| 185 | Gebruik daarna C-v om hier weer terug te komen. | 192 | Gebruik daarna C-v om hier weer terug te komen. |
| @@ -187,24 +194,25 @@ gebruiken om M-< in te tikken: zonder shift zou je M-, (META komma) tikken. | |||
| 187 | >> Tik nu M-> om naar het eind van het bestand te springen. | 194 | >> Tik nu M-> om naar het eind van het bestand te springen. |
| 188 | Gebruik daarna M-v om hier weer terug te komen. | 195 | Gebruik daarna M-v om hier weer terug te komen. |
| 189 | 196 | ||
| 190 | Als je toetsenbord pijltjestoetsen heeft, kan je die ook gebruiken om de | 197 | Als je toetsenbord pijltjestoetsen heeft, kan je die ook gebruiken om |
| 191 | cursor te verplaatsen. We raden je aan om C-b, C-f, C-n en C-p | 198 | de cursor te verplaatsen. We raden je aan om C-b, C-f, C-n en C-p te |
| 192 | te leren, om drie redenen. Ten eerste werken ze op alle | 199 | leren, om drie redenen. Ten eerste werken ze op alle toetsenborden, |
| 193 | toetsenborden, ook die zonder pijltjestoetsen. Ten tweede zul je merken | 200 | ook die zonder pijltjestoetsen. Ten tweede zul je merken dat wanneer |
| 194 | dat wanneer je eenmaal wat ervaring hebt opgedaan in de omgang met | 201 | je eenmaal wat ervaring hebt opgedaan in de omgang met Emacs, het |
| 195 | Emacs, het gebruik van de CTRL-tekens sneller is dan werken met de | 202 | gebruik van de CONTROL-tekens sneller is dan werken met de |
| 196 | pijltjestoetsen (omdat je handen in de normale tikpositie kunnen blijven). Ten | 203 | pijltjestoetsen (omdat je handen in de normale tikpositie kunnen |
| 197 | derde, als je eenmaal gewend bent aan deze commando's met CTRL-tekens, | 204 | blijven). Ten derde, als je eenmaal gewend bent aan deze commando's |
| 198 | kan je makkelijk andere gevorderde cursorbewegingscommando's leren. | 205 | met CONTROL-tekens, kan je makkelijk andere gevorderde |
| 206 | cursorbewegingscommando's leren. | ||
| 199 | 207 | ||
| 200 | De meeste Emacs-commando's accepteren een numeriek argument. Voor de | 208 | De meeste Emacs-commando's accepteren een numeriek argument. Voor de |
| 201 | meeste commando's is dit argument het aantal keren dat het commando | 209 | meeste commando's is dit argument het aantal keren dat het commando |
| 202 | herhaald moet worden. Je geeft dit numerieke argument aan met C-u en | 210 | herhaald moet worden. Je geeft dit numerieke argument aan met C-u en |
| 203 | vervolgens de cijfers van het getal, vóór het commando. | 211 | vervolgens de cijfers van het getal, vóór het commando. Als je |
| 204 | Als je toetsenbord een META- (of EDIT- of ALT-) toets hebt, is er ook | 212 | toetsenbord een META- (of EDIT- of ALT-) toets heeft, is er ook een |
| 205 | een andere manier om het getal aan te geven: tik de cijfers terwijl | 213 | andere manier om het getal aan te geven: tik de cijfers terwijl je de |
| 206 | je de META toets ingedrukt houdt. We raden je aan de C-u manier te | 214 | META toets ingedrukt houdt. We raden je aan de C-u manier te leren |
| 207 | leren omdat die beschikbaar is op elke terminal. | 215 | omdat die beschikbaar is op elke terminal. |
| 208 | 216 | ||
| 209 | Bijvoorbeeld, C-u 8 C-f beweegt de cursor 8 plaatsen naar voren. | 217 | Bijvoorbeeld, C-u 8 C-f beweegt de cursor 8 plaatsen naar voren. |
| 210 | 218 | ||
| @@ -212,194 +220,221 @@ Bijvoorbeeld, C-u 8 C-f beweegt de cursor 8 plaatsen naar voren. | |||
| 212 | met slechts een commando naar een regel in de buurt van deze zin te | 220 | met slechts een commando naar een regel in de buurt van deze zin te |
| 213 | bewegen. | 221 | bewegen. |
| 214 | 222 | ||
| 215 | Voor de meeste commando's is het numerieke argument het aantal keren dat | 223 | Voor de meeste commando's is het numerieke argument het aantal keren |
| 216 | het commando herhaald moet worden. Voor sommige commando's betekent het | 224 | dat het commando herhaald moet worden. Voor sommige commando's |
| 217 | echter iets anders. Verschillende commando's (die je totnogtoe niet | 225 | betekent het echter iets anders. Verschillende commando's (die je |
| 218 | geleerd hebt) gebruiken het als een vlag -- de aanwezigheid van een | 226 | totnogtoe niet geleerd hebt) gebruiken het als een vlag -- de |
| 219 | prefix-argument, ongeacht zijn waarde, maakt dat het commando iets anders | 227 | aanwezigheid van een prefix-argument, ongeacht zijn waarde, maakt dat |
| 220 | doet. | 228 | het commando iets anders doet. |
| 221 | 229 | ||
| 222 | C-v en M-v vormen een andere uitzondering. Met een numeriek | 230 | C-v en M-v vormen een andere uitzondering. Met een numeriek argument |
| 223 | argument verschuiven deze commando's de tekst het aangegeven aantal regels | 231 | verschuiven deze commando's de tekst het aangegeven aantal regels in |
| 224 | in plaats van (bijna) een heel scherm. Bijvoorbeeld, C-u 4 C-v verschuift | 232 | plaats van (bijna) een heel scherm. Bijvoorbeeld, C-u 4 C-v |
| 225 | de tekst 4 regels. | 233 | verschuift de tekst 4 regels. |
| 226 | 234 | ||
| 227 | >> Probeer nu C-u 8 C-v. | 235 | >> Probeer nu C-u 8 C-v. |
| 228 | 236 | ||
| 229 | Daarmee zou je tekst 8 regels opgeschoven moeten zijn. Als je terug | 237 | Daarmee zou je tekst 8 regels opgeschoven moeten zijn. Als je terug |
| 230 | omlaag wil scrollen, kan je M-v een argument geven. | 238 | omlaag wil scrollen, kan je M-v een argument geven. |
| 231 | 239 | ||
| 232 | Als je een scherm met vensters gebruikt, zoals X Windows of MS-Windows, | 240 | Als je een scherm met vensters gebruikt, zoals X Windows of |
| 233 | zou je een grote rechthoek moeten zien aan de linkerkant van het | 241 | MS-Windows, zou je een grote rechthoek moeten zien aan de linkerkant |
| 234 | Emacs-venster. Deze rechthoek heet een schuifbalk ("scrollbar"). Je kan | 242 | van het Emacs-venster. Deze rechthoek heet een schuifbalk |
| 235 | de tekst scrollen door met de muis in de schuifbalk te klikken. | 243 | ("scrollbar"). Je kan de tekst scrollen door met de muis in de |
| 244 | schuifbalk te klikken. | ||
| 236 | 245 | ||
| 237 | >> Klik met de middelste muisknop bovenaan het heldere gebied in de | 246 | >> Klik met de middelste muisknop bovenaan het heldere gebied in de |
| 238 | schuifbalk. Dit zou de tekst moeten verschuiven naar een positie die | 247 | schuifbalk. Dit zou de tekst moeten verschuiven naar een positie |
| 239 | afhankelijk is van hoe hoog of laag je klikt. | 248 | die afhankelijk is van hoe hoog of laag je klikt. |
| 240 | 249 | ||
| 241 | >> Beweeg de muis op en neer terwijl je de middelste muisknop ingedrukt | 250 | >> Beweeg de muis op en neer terwijl je de middelste muisknop |
| 242 | houdt. Je zal zien dat de tekst met de muis mee heen en weer scrollt. | 251 | ingedrukt houdt. Je zal zien dat de tekst met de muis mee heen en |
| 252 | weer scrollt. | ||
| 243 | 253 | ||
| 244 | 254 | ||
| 245 | * ALS EMACS HANGT | 255 | * ALS EMACS HANGT |
| 246 | ----------------- | 256 | ----------------- |
| 247 | 257 | ||
| 248 | Als Emacs niet meer op commando's reageert, kan je het veilig onderbreken | 258 | Als Emacs niet meer op commando's reageert, kan je het veilig |
| 249 | door C-g te tikken. Je kan C-g gebruiken om een commando te stoppen als | 259 | onderbreken door C-g te tikken. Je kan C-g gebruiken om een commando |
| 250 | het te lang duurt om uit te voeren. | 260 | te stoppen als het te lang duurt om uit te voeren. |
| 251 | 261 | ||
| 252 | Je kan C-g ook gebruiken om een numeriek argument te verwijderen of om het | 262 | Je kan C-g ook gebruiken om een numeriek argument te verwijderen of om |
| 253 | begin van een commando dat je niet wilt afmaken, te verwijderen. | 263 | het begin van een commando dat je niet wilt afmaken, te verwijderen. |
| 254 | 264 | ||
| 255 | >> Tik nu C-u 100 om een numeriek argument te maken met de waarde 100, en | 265 | >> Tik nu C-u 100 om een numeriek argument te maken met de waarde 100, |
| 256 | tik dan C-g. Tik vervolgens C-f. Het zou de cursor maar | 266 | en tik dan C-g. Tik vervolgens C-f. Het zou de cursor maar één |
| 257 | één positie mogen verplaatsen, omdat je het argument verwijderd hebt met C-g. | 267 | positie mogen verplaatsen, omdat je het argument verwijderd hebt |
| 268 | met C-g. | ||
| 258 | 269 | ||
| 259 | Als je per ongeluk een <ESC> tikt, kan je dat ongedaan maken met het | 270 | Als je per ongeluk een <ESC> tikt, kan je dat ongedaan maken met het |
| 260 | commando C-g. | 271 | commando C-g. |
| 261 | 272 | ||
| 262 | 273 | ||
| 263 | * ONMOGELIJKE COMMANDO'S | 274 | * UITGESCHAKELDE COMMANDO'S |
| 264 | ------------------------ | 275 | --------------------------- |
| 265 | 276 | ||
| 266 | Sommige Emacs-commando's zijn uitgeschakeld zodat beginnende gebruikers ze | 277 | Sommige Emacs-commando's zijn uitgeschakeld zodat beginnende |
| 267 | niet per ongeluk kunnen uitvoeren. | 278 | gebruikers ze niet per ongeluk kunnen uitvoeren. |
| 268 | 279 | ||
| 269 | Als je een van de uitgeschakelde commando's intikt, laat Emacs uitleg zien | 280 | Als je een van de uitgeschakelde commando's intikt, laat Emacs uitleg |
| 270 | over het commando dat je gegeven hebt, en vraagt of je het werkelijk wil | 281 | zien over het commando dat je gegeven hebt, en vraagt of je het |
| 271 | uitvoeren. | 282 | werkelijk wil uitvoeren. |
| 272 | 283 | ||
| 273 | Wanneer je het commando echt wil uitvoeren, tik dan Spatie (de | 284 | Wanneer je het commando echt wil uitvoeren, tik dan <SPC> (de |
| 274 | spatiebalk) als antwoord op de vraag. Normaal wil je het commando niet | 285 | spatiebalk) als antwoord op de vraag. Normaal wil je het commando |
| 275 | uitvoeren en beantwoord je de vraag met "n" (van "no" of "nee"). | 286 | niet uitvoeren en beantwoord je de vraag met "n" (van "no" of "nee"). |
| 276 | 287 | ||
| 277 | >> Tik C-x C-l (een uitgeschakeld commando), | 288 | >> Tik C-x C-l (een uitgeschakeld commando), en tik dan n als antwoord |
| 278 | en tik dan n als antwoord op de vraag. | 289 | op de vraag. |
| 279 | 290 | ||
| 280 | 291 | ||
| 281 | * VENSTERS | 292 | * VENSTERS |
| 282 | ---------- | 293 | ---------- |
| 283 | 294 | ||
| 284 | Emacs kan meerdere vensters laten zien, elk venster met zijn eigen tekst. | 295 | Emacs kan meerdere vensters laten zien, elk venster met zijn eigen |
| 285 | We zullen later uitleggen hoe je met meerdere vensters om kan gaan. Op | 296 | tekst. We zullen later uitleggen hoe je met meerdere vensters om kan |
| 286 | dit moment willen we slechts uitleggen hoe je van extra vensters af kunt | 297 | gaan. Op dit moment willen we slechts uitleggen hoe je van extra |
| 287 | komen en terug kan keren naar eenvoudig editeren met één venster. Het is | 298 | vensters af kunt komen en terug kan keren naar het werken met één |
| 288 | eenvoudig: | 299 | venster. Het is eenvoudig: |
| 289 | 300 | ||
| 290 | C-x 1 een enkel venster (dat wil zeggen: verwijder alle andere vensters) | 301 | C-x 1 Een enkel venster (dat wil zeggen: verwijder alle |
| 302 | andere vensters). | ||
| 291 | 303 | ||
| 292 | Het commando is CONTROL-x gevolgd door het cijfer 1. C-x 1 vergroot het | 304 | Het commando is CONTROL-x gevolgd door het cijfer 1. C-x 1 vergroot |
| 293 | venster waar de cursor in staat tot het hele scherm. Alle andere vensters | 305 | het venster waar de cursor in staat tot het hele scherm. Alle andere |
| 294 | worden verwijderd. | 306 | vensters worden verwijderd. |
| 295 | 307 | ||
| 296 | >> Zet de cursor op deze regel en tik C-u 0 C-l. | 308 | >> Zet de cursor op deze regel en tik C-u 0 C-l. |
| 297 | >> Tik nu Control-h k Control-f. | 309 | >> Tik nu C-h k C-f. |
| 298 | Zie hoe dit venster kleiner is geworden, terwijl een nieuw venster verschijnt | 310 | Zie hoe dit venster kleiner is geworden, terwijl een nieuw venster |
| 299 | om de documentatie van het Control-f commando te laten zien. | 311 | verschijnt om de documentatie van het C-f commando te laten zien. |
| 300 | 312 | ||
| 301 | >> Tik nu C-x 1 en zie het documentatievenster verdwijnen. | 313 | >> Tik nu C-x 1 en zie het documentatievenster verdwijnen. |
| 302 | 314 | ||
| 315 | Dit commando is anders dan de commando's die je tot nu toe geleerd | ||
| 316 | hebt aangezien het uit twee tekens bestaat. Het begint met het teken | ||
| 317 | CONTROL-x. Er zijn een heleboel commando's die met CONTROL-x | ||
| 318 | beginnen. Veel van die commando's hebben te maken met vensters, | ||
| 319 | bestanden, buffers, en gelijkaardige dingen. Dergelijke commando's | ||
| 320 | bestaan uit twee, drie of vier tekens. | ||
| 321 | |||
| 303 | 322 | ||
| 304 | * TOEVOEGEN EN WEGHALEN | 323 | * TOEVOEGEN EN WEGHALEN |
| 305 | ----------------------- | 324 | ----------------------- |
| 306 | 325 | ||
| 307 | Als je tekst toe wil voegen, tik je die eenvoudigweg in. Tekens die je | 326 | Als je tekst toe wil voegen, tik je die eenvoudigweg in. Tekens die |
| 308 | kan zien, zoals A, 7, * en dergelijke, worden door Emacs als tekst | 327 | je kan zien, zoals A, 7, * en dergelijke, worden door Emacs als tekst |
| 309 | geïnterpreteerd en meteen aan de tekst toegevoegd. Tik <Return> (de | 328 | geïnterpreteerd en meteen aan de tekst toegevoegd. Tik <Return> (de |
| 310 | "volgende regel"-toets) om een Newline toe te voegen en dus een nieuwe | 329 | "volgende regel"-toets) om een Newline toe te voegen en dus een nieuwe |
| 311 | regel te beginnen. | 330 | regel te beginnen. |
| 312 | 331 | ||
| 313 | Je kan het laatste teken dat je hebt ingetikt weghalen door <Delback> te tikken. | 332 | Je kan het laatste teken dat je hebt ingetikt weghalen door <Delback> |
| 314 | <Delback> is een toets op het toetsenbord -- dezelfde toets die je normaal | 333 | te tikken. <Delback> is een toets op het toetsenbord -- dezelfde |
| 315 | gesproken gebruikt, buiten Emacs, om het laatst ingetikte teken te wissen. | 334 | toets die je normaal gesproken gebruikt, buiten Emacs, om het laatst |
| 316 | Het is meestal een grote toets, een paar rijen boven de <Return>-toets, | 335 | ingetikte teken te wissen. Het is meestal een grote toets, een paar |
| 317 | waar "Delete", "Del" of "Backspace" op staat. | 336 | rijen boven de <Return>-toets, waar "Delete", "Del" of "Backspace" op |
| 337 | staat. | ||
| 318 | 338 | ||
| 319 | Als er op die grote toets "Backspace" staat, dan is dat degene die je | 339 | Als er op die grote toets "Backspace" staat, dan is dat degene die je |
| 320 | gebruikt voor <Delback>. Er kan op een andere plaats ook nog een andere | 340 | gebruikt voor <Delback>. Er kan op een andere plaats ook nog een |
| 321 | toets zijn waarop "Delete" staat, maar dat is niet <Delback>. | 341 | andere toets zijn waarop "Delete" staat, maar dat is niet <Delback>. |
| 322 | 342 | ||
| 323 | In het algemeen haalt <Delback> het teken weg dat juist voor de cursorpositie | 343 | In het algemeen haalt <Delback> het teken weg dat juist voor de |
| 324 | staat. | 344 | cursorpositie staat. |
| 325 | 345 | ||
| 326 | >> Probeer dit nu: tik een paar letters en haal ze weer weg door een paar | 346 | >> Probeer dit nu: tik een paar letters en haal ze weer weg door een |
| 327 | keer op <Delback> te drukken. Maak je niet druk over het feit dat dit | 347 | paar keer op <Delback> te drukken. Maak je niet druk over het feit |
| 328 | bestand verandert; je zal niets veranderen aan de originele versie van | 348 | dat dit bestand verandert; je zal niets veranderen aan de originele |
| 329 | deze inleiding. Je zit slechts je eigen kopie te wijzigen. | 349 | versie van deze inleiding. Je zit slechts je eigen kopie te |
| 350 | wijzigen. | ||
| 330 | 351 | ||
| 331 | Als een regel tekst te lang wordt om helemaal op het scherm getoond | 352 | Als een regel tekst te lang wordt om helemaal op het scherm getoond te |
| 332 | te worden, dan gaat hij verder op de volgende schermregel. Een backslash | 353 | worden, dan gaat hij verder op de volgende schermregel. Een backslash |
| 333 | ("\") in de rechtermarge (of, als je een scherm met vensters | 354 | ("\") in de rechtermarge (of, als je een scherm met vensters gebruikt, |
| 334 | gebruikt, een kleine gebogen pijl) laat dan zien dat de regel op de | 355 | een kleine gebogen pijl) laat dan zien dat de regel op de volgende |
| 335 | volgende schermregel verder gaat. | 356 | schermregel verder gaat. |
| 336 | 357 | ||
| 337 | >> Voeg nu tekst toe totdat je de rechter kantlijn raakt, en blijf | 358 | >> Voeg nu tekst toe totdat je de rechter kantlijn raakt, en blijf |
| 338 | toevoegen. Je zal zien dat er een vervolgregel verschijnt. | 359 | toevoegen. Je zal zien dat er een vervolgregel verschijnt. |
| 339 | 360 | ||
| 340 | >> Tik weer enkele keren <Delback> om zoveel tekens weg te halen tot | 361 | >> Tik weer enkele keren <Delback> om zoveel tekens weg te halen tot |
| 341 | de regel weer op een schermregel past. De vervolgregel zal verdwijnen. | 362 | de regel weer op een schermregel past. De vervolgregel zal |
| 363 | verdwijnen. | ||
| 342 | 364 | ||
| 343 | Je kan een Newline zoals elk ander teken verwijderen. Als je een Newline | 365 | Je kan een Newline zoals elk ander teken verwijderen. Als je een |
| 344 | verwijdert, voeg je de twee regels waar de Newline tussen staat samen tot een | 366 | Newline verwijdert, voeg je de twee regels waar de Newline tussen |
| 345 | enkele regel. Als de regel die het resultaat is van deze operatie niet op | 367 | staat samen tot een enkele regel. Als de regel die het resultaat is |
| 346 | een schermregel past, zal hij getoond worden met een vervolgregel. | 368 | van deze operatie niet op een schermregel past, zal hij getoond worden |
| 369 | met een vervolgregel. | ||
| 347 | 370 | ||
| 348 | >> Beweeg de cursor naar het begin van een regel en tik <Delback>. Dit | 371 | >> Beweeg de cursor naar het begin van een regel en tik <Delback>. |
| 349 | voegt de huidige en vorige regel samen. | 372 | Dit voegt de huidige en vorige regel samen. |
| 350 | 373 | ||
| 351 | >> Tik <Return> om de Newline die je net verwijderd hebt weer toe te voegen. | 374 | >> Tik <Return> om de Newline die je net verwijderd hebt weer toe te |
| 375 | voegen. | ||
| 352 | 376 | ||
| 353 | Je herinnert je dat je bij de meeste Emacs-commando's het aantal keren op kan | 377 | Je herinnert je dat je bij de meeste Emacs-commando's het aantal keren |
| 354 | geven, dat ze herhaald moeten worden. Dit geldt ook voor gewone tekens. | 378 | op kan geven, dat ze herhaald moeten worden. Dit geldt ook voor |
| 355 | Als je een gewoon teken herhaalt, wordt dat teken herhaaldelijk toegevoegd. | 379 | gewone tekens. Als je een gewoon teken herhaalt, wordt dat teken |
| 380 | herhaaldelijk toegevoegd. | ||
| 356 | 381 | ||
| 357 | >> Probeer dat nu: tik C-u 8 * om ******** toe te voegen. | 382 | >> Probeer dat nu: tik C-u 8 * om ******** toe te voegen. |
| 358 | 383 | ||
| 359 | Je hebt nu de eenvoudigste manier geleerd om iets in Emacs te tikken en fouten te | 384 | Je hebt nu de eenvoudigste manier geleerd om iets in Emacs te tikken |
| 360 | verbeteren. Je kan tekst ook per woord of regel verwijderen. Hier volgt | 385 | en fouten te verbeteren. Je kan tekst ook per woord of regel |
| 361 | een samenvatting van de commando's om tekst te verwijderen: | 386 | verwijderen. Hier volgt een samenvatting van de commando's om tekst |
| 362 | 387 | te verwijderen: | |
| 363 | <Delback> haal het teken weg dat voor de cursor staat | 388 | |
| 364 | C-d haal het teken weg dat achter de cursor staat | 389 | <Delback> Haal het teken weg dat voor de cursor staat |
| 365 | 390 | C-d Haal het teken weg dat achter de cursor staat | |
| 366 | M-<Delback> verwijder het woord dat voor de cursor staat | 391 | |
| 367 | M-d verwijder het woord dat achter de cursor staat | 392 | M-<Delback> Verwijder het woord dat voor de cursor staat |
| 368 | 393 | M-d Verwijder het woord dat achter de cursor staat | |
| 369 | C-k verwijder alles van de cursor tot het eind van de regel | 394 | |
| 370 | M-k verwijder alles van de cursor tot het eind van de zin | 395 | C-k Verwijder alles van de cursor tot het eind van de regel |
| 371 | 396 | M-k Verwijder alles van de cursor tot het eind van de zin | |
| 372 | Merk op dat <Delback> en C-d, met M-<Delback> en M-d de analogie verder | 397 | |
| 373 | trekken, die begon met C-f en M-f (waarbij we voor het gemak even vergeten dat | 398 | Merk op dat <Delback> en C-d, met M-<Delback> en M-d de analogie |
| 374 | <Delback> niet echt een control teken is). C-k en M-k lijken enigzins op | 399 | verder trekken, die begon met C-f en M-f (waarbij we voor het gemak |
| 375 | C-e en M-e in hun relatie tot regels en zinnen. | 400 | even vergeten dat <Delback> niet echt een CONTROL-teken is). C-k en |
| 376 | 401 | M-k lijken enigzins op C-e en M-e in hun relatie tot regels en zinnen. | |
| 377 | Als je meer dan een enkel teken tegelijk weghaalt, bewaart Emacs de tekst | 402 | |
| 378 | die je verwijdert, zodat je hem weer terug kan halen. Verwijderde tekst | 403 | Je kunt ook op één uniforme manier een willekeurig deel van de tekst |
| 379 | terughalen heet "yanken". Je kan verwijderde tekst terugbrengen op de | 404 | verwijderen. Beweeg daartoe naar één kant van het gedeelte dat je |
| 380 | plaats waar je hem hebt verwijderd of op een andere plaats in de tekst. | 405 | wilt verwijderen en tik C-@ of C-<SPC>. (<SPC> is de spatiebalk.) |
| 381 | Je kan ook meerdere keren yanken om er meedere kopieën van te maken. Het | 406 | Beweeg daarna naar de andere kant en tik C-w. Dat verwijdert alle |
| 382 | yank-commando is C-y. | 407 | tekst tussen de twee posities. |
| 383 | 408 | ||
| 384 | Merk op dat er een verschil is tussen iets weghalen en iets verwijderen: | 409 | >> Beweeg de cursor naar de J aan het begin van de vorige alinea. |
| 385 | iets dat je hebt verwijderd, kan je terugbrengen, maar iets dat je hebt | 410 | >> Tik C-<SPC>. Emacs toont nu de mededeling "Mark set" ("Markering |
| 411 | geplaatst") onderaan het scherm. | ||
| 412 | >> Plaats de cursor op de n van "kant" op de tweede regel van de | ||
| 413 | alinea. | ||
| 414 | >> Tik C-w. Dit zal de tekst vanaf de J tot vlak voor de n | ||
| 415 | verwijderen. | ||
| 416 | |||
| 417 | Er is een verschil tussen iets weghalen en iets verwijderen: iets dat | ||
| 418 | je hebt verwijderd, kan je terugbrengen, maar iets dat je hebt | ||
| 386 | weggehaald niet. (In het Engels is het verschil tussen "killing" en | 419 | weggehaald niet. (In het Engels is het verschil tussen "killing" en |
| 387 | "deleting" duidelijker dan tussen de Nederlandse vertalingen "verwijderen" en | 420 | "deleting" duidelijker dan tussen de Nederlandse vertalingen |
| 388 | "weghalen".) In het algemeen geldt dat de commando's die meer tekst dan | 421 | "verwijderen" en "weghalen".) Verwijderde tekst terughalen heet |
| 389 | een enkel teken, Newline of spatie verwijderen, deze tekst bewaren zodat hij | 422 | "yanken". In het algemeen geldt dat de commando's die meer tekst dan |
| 390 | geyankt kan worden, terwijl dat niet geldt voor commando's die slechts een | 423 | een enkel teken, Newline of spatie verwijderen, deze tekst bewaren |
| 391 | enkel teken weghalen. | 424 | zodat hij geyankt kan worden, terwijl dat niet geldt voor commando's |
| 425 | die slechts een enkel teken weghalen. | ||
| 392 | 426 | ||
| 393 | >> Zet de cursor op het begin van een regel die niet leeg is. | 427 | >> Zet de cursor op het begin van een regel die niet leeg is. |
| 394 | Tik C-k om de tekst op die regel te verwijderen. | 428 | Tik C-k om de tekst op die regel te verwijderen. |
| 395 | >> Tik C-k een tweede keer. Nu verwijdert dit commando het Newline-teken. | 429 | >> Tik C-k een tweede keer. Nu verwijdert dit commando het |
| 430 | Newline-teken. | ||
| 396 | 431 | ||
| 397 | Merk op hoe een enkel C-k commando de inhoud van een regel verwijdert, een | 432 | Merk op hoe een enkel C-k commando de inhoud van een regel verwijdert, |
| 398 | tweede C-k commando de regel zelf zodat alle volgende regels een regel | 433 | een tweede C-k commando de regel zelf zodat alle volgende regels een |
| 399 | omhoog komen. Het numerieke argument is voor C-k bijzonder: het aangegeven | 434 | regel omhoog komen. Het numerieke argument is voor C-k bijzonder: het |
| 400 | aantal regels zal worden verwijderd, inclusief de inhoud. Dit is meer dan | 435 | aangegeven aantal regels zal worden verwijderd, inclusief de inhoud. |
| 401 | simpelweg herhaling: C-u 2 C-k verwijdert twee regels, terwijl tweemaal | 436 | Dit is meer dan simpelweg herhaling: C-u 2 C-k verwijdert twee regels, |
| 402 | C-k tikken dat niet doet. | 437 | terwijl tweemaal C-k tikken dat niet doet. |
| 403 | 438 | ||
| 404 | Om de laatst verwijderde tekst terug te halen naar de plaats waar de | 439 | Om de laatst verwijderde tekst terug te halen naar de plaats waar de |
| 405 | cursor nu op staat (te yanken), tik C-y. | 440 | cursor nu op staat (te yanken), tik C-y. |
| @@ -408,199 +443,229 @@ cursor nu op staat (te yanken), tik C-y. | |||
| 408 | 443 | ||
| 409 | Het is alsof je met C-y iets uit de prullenbak haalt wat je net had | 444 | Het is alsof je met C-y iets uit de prullenbak haalt wat je net had |
| 410 | verwijderd. Merk op dat verschillende C-k's achter elkaar alle regels | 445 | verwijderd. Merk op dat verschillende C-k's achter elkaar alle regels |
| 411 | die verwijderd worden, bij elkaar bewaart zodat een enkele C-y die regels | 446 | die verwijderd worden, bij elkaar bewaart zodat een enkele C-y die |
| 412 | in een keer terugbrengt. | 447 | regels in een keer terugbrengt. |
| 413 | 448 | ||
| 414 | >> Probeer het nu: tik C-k een paar keer. | 449 | >> Probeer het nu: tik C-k een paar keer. |
| 415 | 450 | ||
| 416 | Om de verwijderde tekst terug te halen: | 451 | Om de verwijderde tekst terug te halen: |
| 417 | 452 | ||
| 418 | >> Tik C-y. Beweeg de cursor enkele regels naar beneden en tik weer C-y. | 453 | >> Tik C-y. Beweeg de cursor enkele regels naar beneden en tik weer |
| 419 | Je ziet nu hoe je tekst kan kopiëren. | 454 | C-y. Je ziet nu hoe je tekst kan kopiëren. |
| 420 | 455 | ||
| 421 | Wat moet je doen als je wat tekst terug wilt brengen, maar je intussen | 456 | Wat moet je doen als je wat tekst terug wilt brengen, maar je intussen |
| 422 | al iets anders verwijderd hebt? C-y zou datgene terugbrengen wat je het | 457 | al iets anders verwijderd hebt? C-y zou datgene terugbrengen wat je |
| 423 | recentst hebt verwijderd. Gelukkig is de voorgaande tekst niet verloren | 458 | het recentst hebt verwijderd. Gelukkig is de voorgaande tekst niet |
| 424 | gegaan. Je kunt die tekst terughalen met M-y. Nadat je C-y hebt getikt | 459 | verloren gegaan. Je kunt die tekst terughalen met M-y. Nadat je C-y |
| 425 | om de recentst weggegooide tekst terug te halen, vervangt M-y die tekst | 460 | hebt getikt om de recentst weggegooide tekst terug te halen, vervangt |
| 426 | met de tekst die je daarvoor had weggegooid. Je kunt M-y herhalen om | 461 | M-y die tekst met de tekst die je daarvoor had weggegooid. Je kunt |
| 427 | tekst terug te halen die je al langer geleden hebt weggegooid. Als | 462 | M-y herhalen om tekst terug te halen die je al langer geleden hebt |
| 428 | je de tekst te pakken hebt die je zocht, hoef je niets te doen om die | 463 | weggegooid. Als je de tekst te pakken hebt die je zocht, hoef je |
| 429 | daar te houden. Je kan gewoon verder werken en de teruggehaalde tekst | 464 | niets te doen om die daar te houden. Je kan gewoon verder werken en |
| 430 | met rust laten. | 465 | de teruggehaalde tekst met rust laten. |
| 431 | 466 | ||
| 432 | Als je M-y vaak genoeg tikt kom je terug waar je begon, bij de laatst | 467 | Als je M-y vaak genoeg tikt kom je terug waar je begon, bij de laatst |
| 433 | verwijderde tekst. | 468 | verwijderde tekst. |
| 434 | 469 | ||
| 435 | >> Verwijder een regel, beweeg de cursor wat, en verwijder nog een regel. | 470 | >> Verwijder een regel, beweeg de cursor wat, en verwijder nog een |
| 436 | Tik C-y om de tweede regel die je verwijderde, terug te halen. | 471 | regel. Tik C-y om de tweede regel die je verwijderde, terug te |
| 437 | Tik nog een M-y en die regel wordt vervangen door de eerste regel | 472 | halen. Tik nog een M-y en die regel wordt vervangen door de eerste |
| 438 | die je verwijderde. | 473 | regel die je verwijderde. Tik nog enkele keren M-y en zie wat er |
| 439 | Tik nog enkele keren M-y en zie wat er langs komt. Herhaal dit tot de | 474 | langs komt. Herhaal dit tot de tweede regel weer langs komt, en |
| 440 | tweede regel weer langs komt, en dan nog een paar keer. | 475 | dan nog een paar keer. Je kan ook experimenteren met positieve en |
| 441 | Je kan ook experimenteren met positieve en negatieve argumenten bij | 476 | negatieve argumenten bij M-y. |
| 442 | M-y. | ||
| 443 | 477 | ||
| 444 | 478 | ||
| 445 | * HERSTELLEN | 479 | * HERSTELLEN |
| 446 | ------------ | 480 | ------------ |
| 447 | 481 | ||
| 448 | Als je de tekst veranderd hebt en je daar toch niet tevreden mee bent, | 482 | Als je de tekst veranderd hebt en je daar toch niet tevreden mee bent, |
| 449 | dan kan je de verandering ongedaan maken met het herstelcommando, C-x u. | 483 | dan kan je de verandering ongedaan maken met het herstelcommando, C-x |
| 484 | u. | ||
| 450 | 485 | ||
| 451 | Normaal gesproken herstelt C-x u de veranderingen die het gevolg zijn van | 486 | Normaal gesproken herstelt C-x u de veranderingen die het gevolg zijn |
| 452 | een enkel commando; door herhaaldelijk C-x u te tikken, worden steeds | 487 | van een enkel commando; door herhaaldelijk C-x u te tikken, worden |
| 453 | eerdere commando's hersteld. | 488 | steeds eerdere commando's hersteld. |
| 454 | 489 | ||
| 455 | Er zijn echter twee uitzonderingen: commando's die de tekst niet wijzigen, | 490 | Er zijn echter twee uitzonderingen: commando's die de tekst niet |
| 456 | zoals cursorbewegingen, worden overgeslagen, en commando's die simpelweg | 491 | wijzigen, zoals cursorbewegingen, worden overgeslagen, en commando's |
| 457 | het ingetikte teken aan de tekst toevoegen, worden meestal gegroepeerd | 492 | die simpelweg het ingetikte teken aan de tekst toevoegen, worden |
| 458 | in groepjes van maximaal 20 tekens, zodat je minder vaak het commando | 493 | meestal gegroepeerd in groepjes van maximaal 20 tekens, zodat je |
| 459 | C-x u hoeft te tikken om teksttoevoegingen te herstellen. | 494 | minder vaak het commando C-x u hoeft te tikken om teksttoevoegingen te |
| 495 | herstellen. | ||
| 460 | 496 | ||
| 461 | >> Gooi deze regel weg met C-k; met C-x u zou hij weer moeten verschijnen. | 497 | >> Gooi deze regel weg met C-k; met C-x u zou hij weer moeten |
| 498 | verschijnen. | ||
| 462 | 499 | ||
| 463 | C-_ is een alternatief voor C-x u. Het levert exact hetzelfde resultaat | 500 | C-_ is een alternatief voor C-x u. Het levert exact hetzelfde |
| 464 | op, maar is makkelijker om een paar keer achter elkaar te tikken. Een | 501 | resultaat op, maar is makkelijker om een paar keer achter elkaar te |
| 465 | nadeel van C-_ is dat op sommige toetsenborden het intikken ervan niet | 502 | tikken. Een nadeel van C-_ is dat op sommige toetsenborden het |
| 466 | gebruiksvriendelijk is. Dat is ook de reden voor het alternatief, C-x u. | 503 | intikken ervan niet gebruiksvriendelijk is. Dat is ook de reden voor |
| 467 | Op sommige terminals kan je C-_ tikken door "/" te tikken terwijl je de | 504 | het alternatief, C-x u. Op sommige terminals kan je C-_ tikken door |
| 468 | CONTROL-toets ingedrukt houdt. | 505 | "/" te tikken terwijl je de CONTROL-toets ingedrukt houdt. |
| 469 | 506 | ||
| 470 | Een numeriek argument bij C-_ of C-x u duidt het aantal herhalingen aan. | 507 | Een numeriek argument bij C-_ of C-x u duidt het aantal herhalingen |
| 508 | aan. | ||
| 471 | 509 | ||
| 472 | 510 | ||
| 473 | * BESTANDEN | 511 | * BESTANDEN |
| 474 | ----------- | 512 | ----------- |
| 475 | 513 | ||
| 476 | Om een tekst die je gemaakt of veranderd hebt op te slaan, moet je de tekst | 514 | Om een tekst die je gemaakt of veranderd hebt op te slaan, moet je de |
| 477 | in een bestand stoppen ("to save a file" in het Engels). Als je dat niet | 515 | tekst in een bestand stoppen ("to save a file" in het Engels). Als je |
| 478 | doet, ben je die veranderingen kwijt op het moment dat je Emacs verlaat. | 516 | dat niet doet, ben je die veranderingen kwijt op het moment dat je |
| 479 | Je kan een bestand veranderen door het bestand te "bezoeken". (Ook wel | 517 | Emacs verlaat. Je kan een bestand veranderen door het bestand te |
| 480 | "vinden"; "finding" of "visiting" in het Engels.) | 518 | "bezoeken". (Ook wel "vinden"; "finding" of "visiting" in het |
| 519 | Engels.) | ||
| 481 | 520 | ||
| 482 | Een bestand bezoeken betekent dat je de inhoud van dat bestand in | 521 | Een bestand bezoeken betekent dat je de inhoud van dat bestand in |
| 483 | Emacs ziet. Het lijkt er dan op alsof je het bestand aan het veranderen | 522 | Emacs ziet. Het lijkt er dan op alsof je het bestand aan het |
| 484 | bent. Deze veranderingen zijn echter slechts tijdelijk zolang je het | 523 | veranderen bent. Deze veranderingen zijn echter slechts tijdelijk |
| 485 | bestand niet opslaat. Op deze manier kan je nooit per ongeluk een half | 524 | zolang je het bestand niet opslaat. Op deze manier kan je nooit per |
| 486 | gewijzigd bestand op het systeem achterlaten. Zelfs als je het bestand | 525 | ongeluk een half gewijzigd bestand op het systeem achterlaten. Zelfs |
| 487 | opslaat, zorgt Emacs ervoor dat het originele bestand onder een gewijzigde | 526 | als je het bestand opslaat, zorgt Emacs ervoor dat het originele |
| 488 | naam nog steeds beschikbaar is, voor het geval je later besluit dat de | 527 | bestand onder een gewijzigde naam nog steeds beschikbaar is, voor het |
| 489 | veranderingen toch niet zo goed waren. | 528 | geval je later besluit dat de veranderingen toch niet zo goed waren. |
| 490 | 529 | ||
| 491 | Bij de onderkant van het scherm zie je een regel die begint en | 530 | Bij de onderkant van het scherm zie je een regel die begint en eindigt |
| 492 | eindigt met streepjes, met aan het begin "--:-- TUTORIAL.nl" of iets | 531 | met streepjes, met aan het begin "-1:-- TUTORIAL.nl" of iets |
| 493 | dergelijks. Dit deel van het scherm laat normaal de naam van het bestand | 532 | dergelijks. Dit deel van het scherm laat normaal de naam van het |
| 494 | zien dat je op dat moment bezoekt. Op dit moment bezoek je een bestand | 533 | bestand zien dat je op dat moment bezoekt. Op dit moment bezoek je |
| 495 | dat "TUTORIAL.nl" heet; het is je eigen kopie van de Nederlandstalige | 534 | een bestand dat "TUTORIAL.nl" heet; het is je eigen kopie van de |
| 496 | Emacs-inleiding ("tutorial" in het Engels). Als je in Emacs een bestand | 535 | Nederlandstalige Emacs-inleiding ("tutorial" in het Engels). Als je |
| 497 | bezoekt dan staat de naam van het bestand altijd op deze plaats. | 536 | in Emacs een bestand bezoekt dan staat de naam van het bestand altijd |
| 498 | 537 | op deze plaats. | |
| 499 | De commando's om een bestand te bezoeken of op te slaan zijn anders dan de | 538 | |
| 500 | commando's die je tot nu toe geleerd hebt; ze bestaan namelijk uit twee | 539 | Iets bijzonders aan het commando om een bestand te bezoeken, is dat je |
| 501 | tekens. Beide commando's beginnen met het teken Control-x. Er zijn een | ||
| 502 | heleboel commando's die met Control-x beginnen. Veel van die commando's | ||
| 503 | hebben te maken met bestanden, buffers, en gelijkaardige dingen. | ||
| 504 | Dergelijke commando's bestaan uit twee, drie of vier tekens. | ||
| 505 | |||
| 506 | Nog iets bijzonders aan het commando om een bestand te bezoeken, is dat je | ||
| 507 | aan moet geven welk bestand je wil. Dit heet dat het commando "een | 540 | aan moet geven welk bestand je wil. Dit heet dat het commando "een |
| 508 | argument van de gebruiker vraagt"; in dit geval de naam van het bestand. | 541 | argument van de gebruiker vraagt"; in dit geval de naam van het |
| 509 | Nadat je het commando | 542 | bestand. Nadat je het commando |
| 510 | 543 | ||
| 511 | C-x C-f bezoek bestand (met de f van "find file") | 544 | C-x C-f Bezoek bestand (met de f van "find file"). |
| 512 | 545 | ||
| 513 | hebt getikt vraagt Emacs om de naam van het bestand. De naam die je | 546 | hebt getikt vraagt Emacs om de naam van het bestand. De naam die je |
| 514 | intikt verschijnt op de onderste regel van het scherm. Wanneer die regel | 547 | intikt verschijnt op de onderste regel van het scherm. Wanneer die |
| 515 | voor dit soort invoer gebruikt wordt, heet hij de minibuffer. Je kan gewone | 548 | regel voor dit soort invoer gebruikt wordt, heet hij de minibuffer. |
| 516 | Emacs commando's gebruiken om de bestandsnaam te veranderen. | 549 | Je kan gewone Emacs commando's gebruiken om de bestandsnaam te |
| 550 | veranderen. | ||
| 517 | 551 | ||
| 518 | Tijdens het invoeren van de bestandsnaam (of om het even welke | 552 | Tijdens het invoeren van de bestandsnaam (of om het even welke invoer |
| 519 | invoer in de minibuffer) kan je het commando afbreken met C-g. | 553 | in de minibuffer) kan je het commando afbreken met C-g. |
| 520 | 554 | ||
| 521 | >> Tik C-x C-f gevolgd door C-g. Dit commando breekt de minibuffer af en | 555 | >> Tik C-x C-f gevolgd door C-g. Dit commando breekt de minibuffer af |
| 522 | ook het C-x C-f commando dat van de minibuffer gebruik maakte. | 556 | en ook het C-x C-f commando dat van de minibuffer gebruik maakte. |
| 523 | Het resultaat is dat je geen bestand bezoekt. | 557 | Het resultaat is dat je geen bestand bezoekt. |
| 524 | 558 | ||
| 525 | Als je de naam van een bestand hebt ingevoerd, tik dan <Return> om het | 559 | Als je de naam van een bestand hebt ingevoerd, tik dan <Return> om het |
| 526 | commando af te sluiten. Hierna gaat het C-x C-f commando aan het werk en haalt | 560 | commando af te sluiten. Hierna gaat het C-x C-f commando aan het werk |
| 527 | het bestand op dat je aangegeven hebt. Als het C-x C-f commando daarmee | 561 | en haalt het bestand op dat je aangegeven hebt. Als het C-x C-f |
| 528 | klaar is, verdwijnt de minibuffer. | 562 | commando daarmee klaar is, verdwijnt de minibuffer. |
| 529 | 563 | ||
| 530 | Na korte tijd verschijnt de inhoud van het bestand op het scherm en kan | 564 | Na korte tijd verschijnt de inhoud van het bestand op het scherm en |
| 531 | je de inhoud wijzigen. Als je de wijzigingen op wilt slaan, tik dan het | 565 | kan je de inhoud wijzigen. Als je de wijzigingen op wilt slaan, tik |
| 532 | commando | 566 | dan het commando |
| 533 | 567 | ||
| 534 | C-x C-s sla bestand op (met de s van "save file") | 568 | C-x C-s Sla bestand op (met de s van "save file"). |
| 535 | 569 | ||
| 536 | Dit commando slaat de tekst zoals Emacs die nu heeft in het bestand op. | 570 | Dit commando slaat de tekst zoals Emacs die nu heeft in het bestand |
| 537 | De eerste keer dat je dit doet, slaat Emacs het originele bestand onder een | 571 | op. De eerste keer dat je dit doet, slaat Emacs het originele bestand |
| 538 | andere naam op, zodat het niet verloren gaat. De nieuwe naam bestaat uit de | 572 | onder een andere naam op, zodat het niet verloren gaat. De nieuwe |
| 539 | oude bestandsnaam gevolgd door een "~". | 573 | naam bestaat uit de oude bestandsnaam gevolgd door een "~". |
| 540 | 574 | ||
| 541 | Als Emacs het bestand heeft opgeslagen, laat het de naam van het | 575 | Als Emacs het bestand heeft opgeslagen, laat het de naam van het |
| 542 | bestand zien. Het is een goede gewoonte een bestand regelmatig te op te slaan | 576 | bestand zien. Het is een goede gewoonte een bestand regelmatig op te |
| 543 | zodat er niet teveel werk verloren gaat als het systeem hangt of crasht. | 577 | slaan zodat er niet teveel werk verloren gaat als het systeem hangt of |
| 544 | 578 | crasht. | |
| 545 | >> Tik C-x C-s, om je kopie van deze inleiding op te slaan. Als het goed is | 579 | |
| 546 | verschijnt "Wrote ...TUTORIAL" op de onderste schermregel. | 580 | >> Tik C-x C-s, om je kopie van deze inleiding op te slaan. Als het |
| 547 | 581 | goed is verschijnt "Wrote ...TUTORIAL.nl" op de onderste | |
| 548 | OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-x C-s | 582 | schermregel. |
| 549 | tikt, en daarna ook niets meer. Dit komt door een eigenschap van de | 583 | |
| 550 | machine waarop je werkt die te maken heeft met "flow control". Met C-s | 584 | OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-x |
| 551 | stopt de "flow" en komt niets meer van wat je tikt bij Emacs terecht. Om | 585 | C-s tikt, en daarna ook niets meer. Dit komt door een eigenschap van |
| 552 | deze situatie te herstellen, tik C-q. Lees daarna het hoofdstuk | 586 | de machine waarop je werkt die te maken heeft met "flow control". Met |
| 553 | "Spontaneous Entry to Incremental Search" in het Emacs-handboek over hoe | 587 | C-s stopt de "flow" en komt niets meer van wat je tikt bij Emacs |
| 554 | je moet omgaan met deze situatie. | 588 | terecht. Om deze situatie te herstellen, tik C-q. Lees daarna het |
| 589 | hoofdstuk "Spontaneous Entry to Incremental Search" in het | ||
| 590 | Emacs-handboek over hoe je moet omgaan met deze situatie. | ||
| 555 | 591 | ||
| 556 | Je kan een bestaand bestand bezoeken om het te bekijken of het te | 592 | Je kan een bestaand bestand bezoeken om het te bekijken of het te |
| 557 | wijzigen. Je kan ook een bestand bezoeken dat nog niet bestaat. Dit is | 593 | wijzigen. Je kan ook een bestand bezoeken dat nog niet bestaat. Dit |
| 558 | de manier om met Emacs een nieuw bestand te maken: bezoek het bestand, dat | 594 | is de manier om met Emacs een nieuw bestand te maken: bezoek het |
| 559 | eerst leeg zal zijn, en voeg tekst toe. Zodra je de tekst opslaat, wordt | 595 | bestand, dat eerst leeg zal zijn, en voeg tekst toe. Zodra je de |
| 560 | het bestand werkelijk gecreëerd, met de tekst als inhoud. Vanaf dat | 596 | tekst opslaat, wordt het bestand werkelijk gecreëerd, met de tekst als |
| 561 | moment ben je dus bezig met een bestaand bestand. | 597 | inhoud. Vanaf dat moment ben je dus bezig met een bestaand bestand. |
| 562 | 598 | ||
| 563 | 599 | ||
| 564 | * BUFFERS | 600 | * BUFFERS |
| 565 | --------- | 601 | --------- |
| 566 | 602 | ||
| 567 | Als je een tweede bestand bezoekt met C-x C-f, blijft het eerste bestand | 603 | Als je een tweede bestand bezoekt met C-x C-f, blijft het eerste |
| 568 | gewoon in Emacs. Je kan naar dat bestand terug door het gewoon nog een | 604 | bestand gewoon in Emacs. Je kan naar dat bestand terug door het |
| 569 | keer te bezoeken met C-x C-f. Op deze manier kan je een behoorlijk aantal | 605 | gewoon nog een keer te bezoeken met C-x C-f. Op deze manier kan je |
| 570 | bestanden in Emacs krijgen. | 606 | een behoorlijk aantal bestanden in Emacs krijgen. |
| 571 | 607 | ||
| 572 | >> Creëer een bestand dat "foo" heet door te tikken: C-f C-f foo | 608 | >> Creëer een bestand dat "foo" heet door te tikken: C-x C-f foo |
| 573 | <Return>. Voeg hieraan wat tekst toe, wijzig hem, en sla "foo" op | 609 | <Return>. Voeg hieraan wat tekst toe, wijzig hem, en sla "foo" op |
| 574 | door C-x C-s te tikken. Tik hierna C-x C-f TUTORIAL <Return> om | 610 | door C-x C-s te tikken. Tik hierna C-x C-f TUTORIAL <Return> om |
| 575 | weer hier, in de inleiding, terug te komen. | 611 | weer hier, in de inleiding, terug te komen. |
| 576 | 612 | ||
| 577 | Emacs bewaart intern de tekst van elk bestand in een ding dat een "buffer" | 613 | Emacs bewaart intern de tekst van elk bestand in een ding dat een |
| 578 | genoemd wordt. Als je een bestand bezoekt wordt er een nieuwe buffer | 614 | "buffer" genoemd wordt. Als je een bestand bezoekt wordt er een |
| 579 | gemaakt. Om een lijst van de huidige buffers te zien, tik | 615 | nieuwe buffer gemaakt. Om een lijst van de huidige buffers te zien, |
| 616 | tik | ||
| 580 | 617 | ||
| 581 | C-x C-b laat de bufferlijst zien | 618 | C-x C-b Laat de bufferlijst zien |
| 582 | 619 | ||
| 583 | >> Probeer C-x C-b nu. | 620 | >> Probeer C-x C-b nu. |
| 584 | 621 | ||
| 585 | Bemerk dat elke buffer een naam heeft en mogelijk ook een bestandsnaam; dit | 622 | Bemerk dat elke buffer een naam heeft en mogelijk ook een |
| 586 | is de naam van het bestand waarmee de buffer overeenkomt. Sommige buffers | 623 | bestandsnaam; dit is de naam van het bestand waarmee de buffer |
| 587 | hebben niets met een bestand te maken. Bijvoorbeeld, de buffer die | 624 | overeenkomt. ALLE tekst die je in een Emacs venster ziet is altijd |
| 588 | "*Buffer List*" heet heeft geen bestand. Die buffer is de buffer die de | 625 | onderdeel van een of andere buffer. |
| 589 | lijst bevat die door C-x C-b gemaakt wordt. ALLE tekst die je in een | ||
| 590 | Emacs venster ziet is altijd onderdeel van een of andere buffer. | ||
| 591 | 626 | ||
| 592 | >> Tik C-x 1 om de bufferlijst te verwijderen. | 627 | >> Tik C-x 1 om de bufferlijst te verwijderen. |
| 593 | 628 | ||
| 629 | Wanneer je met meerdere buffers werkt, dan is op elk moment slechts | ||
| 630 | één van die buffers "actueel". De actuele buffer is degene die je aan | ||
| 631 | het bewerken bent. Als je een andere buffer wilt bewerken, dan moet | ||
| 632 | je daarnaar "omschakelen". Als je wilt omschakelen naar een buffer | ||
| 633 | die overeenkomt met een bestand, dan kun je dit doen door dat bestand | ||
| 634 | opnieuw te bezoeken met C-x C-f. Er is ook een makkelijkere manier: | ||
| 635 | gebruik het commando C-x b. Dit commando vraagt je naar de naam van | ||
| 636 | de buffer. | ||
| 637 | |||
| 638 | >> Tik C-x b foo <Return> om terug te gaan naar de buffer "foo" die de | ||
| 639 | tekst van het bestand "foo" bevat. Tik vervolgens C-x b TUTORIAL | ||
| 640 | <Return> om terug te komen naar deze Emacs-inleiding. | ||
| 641 | |||
| 642 | Meestal is de naam van de buffer gelijk aan de naam van het bestand | ||
| 643 | (minus de naam van de directory). Dit klopt echter niet altijd. De | ||
| 644 | lijst met buffers die je maakt met C-x C-b laat je altijd de naam van | ||
| 645 | elke buffer zien. | ||
| 646 | |||
| 647 | ALLE tekst die je ziet in een venster van Emacs is altijd onderdeel | ||
| 648 | van een of andere buffer. Sommige buffers komen niet overeen met een | ||
| 649 | bestand. De buffer genaamd "*Buffer List*" heeft bijvoorbeeld geen | ||
| 650 | bijbehorend bestand. Deze buffer bevat de lijst met buffers die je | ||
| 651 | gemaakt hebt met C-x C-b. Ook de buffer "*Messages*" heeft geen | ||
| 652 | geassocieerd bestand; deze buffer bevat de mededelingen die Emacs je | ||
| 653 | op de onderste regel toonde. | ||
| 654 | |||
| 655 | >> Tik C-x b *Messages* <Return> om de buffer met mededelingen te | ||
| 656 | bekijken. Tik daarna weer C-x b TUTORIAL <Return> om terug te | ||
| 657 | keren naar deze buffer met de Emacs-inleiding | ||
| 658 | |||
| 594 | Als je de tekst van het ene bestand verandert en dan een ander bestand | 659 | Als je de tekst van het ene bestand verandert en dan een ander bestand |
| 595 | bezoekt, wordt het eerste bestand niet opgeslagen. De wijzigingen blijven | 660 | bezoekt, wordt het eerste bestand niet opgeslagen. De wijzigingen |
| 596 | in Emacs, in de buffer die bij het bestand hoort. Het creëren of | 661 | blijven in Emacs, in de buffer die bij het bestand hoort. Het creëren |
| 597 | veranderen van de buffer van het tweede bestand heeft geen effect op de | 662 | of veranderen van de buffer van het tweede bestand heeft geen effect |
| 598 | eerste buffer. Dit is erg nuttig, maar betekent ook dat er een eenvoudige | 663 | op de eerste buffer. Dit is erg nuttig, maar betekent ook dat er een |
| 599 | manier nodig is om het eerste bestand te bewaren. Het zou erg vervelend | 664 | eenvoudige manier nodig is om het eerste bestand te bewaren. Het zou |
| 600 | zijn om er eerst naar terug te moeten gaan met C-x C-f om het dan te | 665 | erg vervelend zijn om er eerst naar terug te moeten gaan met C-x C-f |
| 601 | kunnen bewaren met C-x C-s. Dus hebben we het commando: | 666 | om het dan te kunnen bewaren met C-x C-s. Dus hebben we het commando: |
| 602 | 667 | ||
| 603 | C-x s sla een paar buffers op | 668 | C-x s Sla een paar buffers op |
| 604 | 669 | ||
| 605 | C-x s vraagt voor elke buffer die veranderingen heeft die nog niet | 670 | C-x s vraagt voor elke buffer die veranderingen heeft die nog niet |
| 606 | opgeslagen zijn, of je de buffer wilt bewaren. | 671 | opgeslagen zijn, of je de buffer wilt bewaren. |
| @@ -616,56 +681,62 @@ opgeslagen zijn, of je de buffer wilt bewaren. | |||
| 616 | 681 | ||
| 617 | Er zijn veel meer Emacs commando's dan er op de toetsen van het | 682 | Er zijn veel meer Emacs commando's dan er op de toetsen van het |
| 618 | toetsenbord passen, zelfs als we hun aantal kunnen vergroten door de | 683 | toetsenbord passen, zelfs als we hun aantal kunnen vergroten door de |
| 619 | control of meta toets te gebruiken. Emacs lost dit probleem op met het X | 684 | CONTROL- of META-toets te gebruiken. Emacs lost dit probleem op met |
| 620 | commando (met de X van eXtensie of uitbreiding). Het X commando komt voor in | 685 | het X commando (met de X van eXtensie of uitbreiding). Het X commando |
| 621 | twee smaken: | 686 | komt voor in twee smaken: |
| 622 | 687 | ||
| 623 | C-x Tekenuitbreiding. Bevolgd door een teken. | 688 | C-x Tekenuitbreiding. Gevolgd door een teken. |
| 624 | M-x Commando-naam-uitbreiding. Wordt gevolgd door een naam. | 689 | M-x Commando-naam-uitbreiding. Wordt gevolgd door een naam. |
| 625 | 690 | ||
| 626 | Deze commando's zijn in het algemeen nuttig, maar worden minder gebruikt | 691 | Deze commando's zijn in het algemeen nuttig, maar worden minder |
| 627 | dan de commando's die je tot nu toe al geleerd hebt. Je hebt al twee van deze | 692 | gebruikt dan de commando's die je tot nu toe al geleerd hebt. Je hebt |
| 628 | commando's gezien: C-x C-f om een bestand te bezoeken, en C-x C-s om het | 693 | al enkele van deze commando's gezien: C-x C-f om een bestand te |
| 629 | te bewaren. Een ander voorbeeld is het commando om Emacs te verlaten: dit | 694 | bezoeken en C-x C-s om het te bewaren, bijvoorbeeld. Een ander |
| 630 | is C-x C-c. (Maak je geen zorgen over het verloren gaan van veranderingen | 695 | voorbeeld is het commando om Emacs te verlaten: dit is C-x C-c. (Maak |
| 631 | die niet opgeslagen zijn; C-x C-c vraagt of je veranderde buffers wilt | 696 | je geen zorgen over het verloren gaan van veranderingen die niet |
| 632 | bewaren voordat Emacs helemaal eindigt.) | 697 | opgeslagen zijn; C-x C-c vraagt of je veranderde buffers wilt bewaren |
| 633 | 698 | voordat Emacs helemaal eindigt.) | |
| 634 | C-z is het commando om Emacs *tijdelijk* te verlaten, zodat je daarna weer | 699 | |
| 635 | terug kan keren in dezelfde Emacs-sessie. | 700 | C-z is het commando om Emacs *tijdelijk* te verlaten, zodat je daarna |
| 636 | 701 | weer terug kan keren in dezelfde Emacs-sessie. | |
| 637 | Op systemen die deze mogelijkheid bieden, zet C-z Emacs stil: je komt weer | 702 | |
| 638 | terug in de shell, maar Emacs is nog aanwezig. In de meeste shells kan je | 703 | Op systemen die deze mogelijkheid bieden, zet C-z Emacs stil: je komt |
| 639 | Emacs weer activeren met het "fg" commando, of met "%emacs". | 704 | weer terug in de shell, maar Emacs is nog aanwezig. In de meeste |
| 640 | 705 | shells kan je Emacs weer activeren met het "fg" commando, of met | |
| 641 | Op systemen die niet de mogelijkheid bieden om programma's stil te zetten, | 706 | "%emacs". |
| 642 | creëert C-z een subshell onder Emacs om je zo in de gelegenheid te | 707 | |
| 643 | stellen andere programma's uit te voeren en daarna weer in Emacs terug te | 708 | Op systemen die niet de mogelijkheid bieden om programma's stil te |
| 644 | keren; Emacs wordt dus niet werkelijk verlaten. In dit geval is het | 709 | zetten, creëert C-z een subshell onder Emacs om je zo in de |
| 645 | shellcommando "exit" de normale manier om de subshell te verlaten en in | 710 | gelegenheid te stellen andere programma's uit te voeren en daarna weer |
| 646 | Emacs terug te keren. | 711 | in Emacs terug te keren; Emacs wordt dus niet werkelijk verlaten. In |
| 647 | 712 | dit geval is het shellcommando "exit" de normale manier om de subshell | |
| 648 | Het moment om C-x C-c te gebruiken is wanneer je uit gaat loggen. Het is | 713 | te verlaten en in Emacs terug te keren. |
| 649 | ook het juiste commando om Emacs te beëindigen wanneer Emacs opgestart | 714 | |
| 650 | was door een mail-programma of iets dergelijks, aangezien die misschien | 715 | Het moment om C-x C-c te gebruiken is wanneer je uit gaat loggen. Het |
| 651 | niet met een stilgezette Emacs om kunnen gaan. Normaal gezien is het | 716 | is ook het juiste commando om Emacs te beëindigen wanneer Emacs |
| 652 | echter beter Emacs stil te zetten met C-z dan om Emacs te verlaten, | 717 | opgestart was door een mail-programma of iets dergelijks, aangezien |
| 653 | behalve als je uit wilt loggen natuurlijk. | 718 | die misschien niet met een stilgezette Emacs om kunnen gaan. Normaal |
| 654 | 719 | gezien is het echter beter Emacs stil te zetten met C-z dan om Emacs | |
| 655 | Er bestaan vele C-x commando's. Hier is een lijst van degene die je nu al | 720 | te verlaten, behalve als je uit wilt loggen natuurlijk. |
| 656 | kent: | 721 | |
| 657 | 722 | Er bestaan vele C-x commando's. Hier is een lijst van degene die je | |
| 658 | C-x C-f bezoek bestand | 723 | nu al kent: |
| 659 | C-x C-s sla bestand op | 724 | |
| 660 | C-x C-b laat bufferlijst zien | 725 | C-x C-f Bezoek bestand |
| 661 | C-x C-c verlaat Emacs | 726 | C-x C-s Sla bestand op |
| 662 | C-x u herstel | 727 | C-x s Sla een paar buffers op |
| 663 | 728 | C-x C-b Laat bufferlijst zien | |
| 664 | Commando-naam-bevelen worden nog minder vaak gebruikt, of alleen onder bepaalde omstandigheden. | 729 | C-x b Schakel naar een buffer |
| 665 | Een voorbeeld is het commando replace-string, dat in de hele tekst een string | 730 | C-x C-c Verlaat Emacs |
| 666 | vervangt door een andere string ("to replace" betekent "vervangen"). | 731 | C-x 1 Een enkel venster |
| 667 | Als je M-x tikt, toont Emacs onderaan het scherm "M-x" en moet je de naam van | 732 | C-x u Herstel |
| 668 | het commando intikken, in dit geval "replace-string". Als je gewoon | 733 | |
| 734 | Commando-naam-bevelen worden nog minder vaak gebruikt, of alleen onder | ||
| 735 | bepaalde omstandigheden. Een voorbeeld is het commando | ||
| 736 | replace-string, dat in de hele tekst een string vervangt door een | ||
| 737 | andere string ("to replace" betekent "vervangen"). Als je M-x tikt, | ||
| 738 | toont Emacs onderaan het scherm "M-x" en moet je de naam van het | ||
| 739 | commando intikken, in dit geval "replace-string". Als je gewoon | ||
| 669 | "repl s<TAB>" tikt maakt Emacs de naam zelf af. Beëindig het commando | 740 | "repl s<TAB>" tikt maakt Emacs de naam zelf af. Beëindig het commando |
| 670 | met <Return>. | 741 | met <Return>. |
| 671 | 742 | ||
| @@ -676,137 +747,146 @@ Je sluit elk argument af met <Return>. | |||
| 676 | >> Plaats de cursor op de lege regel twee regels onder deze regel. | 747 | >> Plaats de cursor op de lege regel twee regels onder deze regel. |
| 677 | Tik dan M-x repl s<Return>gewijzigd<Return>veranderd<Return>. | 748 | Tik dan M-x repl s<Return>gewijzigd<Return>veranderd<Return>. |
| 678 | 749 | ||
| 679 | Zie hoe deze regel daardoor gewijzigd is. Je hebt elk voorkomen van | 750 | Zie hoe deze regel daardoor gewijzigd is. Je hebt elk voorkomen |
| 680 | het woord g-e-w-i-j-z-i-g-d vervangen door "veranderd"; te beginnen op | 751 | van het woord g-e-w-i-j-z-i-g-d vervangen door "veranderd"; te |
| 681 | de plek waar de cursor staat. | 752 | beginnen op de plek waar de cursor staat. |
| 682 | 753 | ||
| 683 | 754 | ||
| 684 | * AUTOMATISCH BEWAREN | 755 | * AUTOMATISCH BEWAREN |
| 685 | --------------------- | 756 | --------------------- |
| 686 | 757 | ||
| 687 | Als je een bestand veranderd hebt maar het nog niet opgeslagen hebt, zouden | 758 | Als je een bestand veranderd hebt maar het nog niet opgeslagen hebt, |
| 688 | de veranderingen verloren kunnen gaan als het systeem zou hangen of | 759 | zouden de veranderingen verloren kunnen gaan als het systeem zou |
| 689 | herstarten. Om je hiertegen te beschermen, slaat Emacs regelmatig | 760 | hangen of herstarten. Om je hiertegen te beschermen, slaat Emacs |
| 690 | de veranderde tekst automatisch op. De naam van het bestand waarin de | 761 | regelmatig de veranderde tekst automatisch op. De naam van het |
| 691 | tekst automatisch wordt opgeslagen begint en eindigt met een #. | 762 | bestand waarin de tekst automatisch wordt opgeslagen begint en eindigt |
| 692 | Bijvoorbeeld, als je het bestand "hello.c" aan het editeren bent, wordt | 763 | met een #. Bijvoorbeeld, als je het bestand "hello.c" aan het |
| 693 | de tekst automatisch opgeslagen in een bestand dat "#hello.c#" heet. Zodra | 764 | bewerken bent, wordt de tekst automatisch opgeslagen in een bestand |
| 694 | je het bestand werkelijk opslaat, wordt het automatisch opgeslagen bestand | 765 | dat "#hello.c#" heet. Zodra je het bestand werkelijk opslaat, wordt |
| 695 | verwijderd. | 766 | het automatisch opgeslagen bestand verwijderd. |
| 696 | 767 | ||
| 697 | Als de computer crasht, kan je de automatisch opgeslagen tekst terugkrijgen | 768 | Als de computer crasht, kan je de automatisch opgeslagen tekst |
| 698 | door het bestand gewoon te bezoeken (het originele bestand, niet het automatisch | 769 | terugkrijgen door het bestand gewoon te bezoeken (het originele |
| 699 | opgeslagen), gevolgd door M-x recover-file<Return>. Als Emacs vraagt om | 770 | bestand, niet het automatisch opgeslagen), gevolgd door M-x |
| 700 | bevestiging, antwoord dan met yes<Return> en de automatisch opgeslagen | 771 | recover-file<Return>. Als Emacs vraagt om bevestiging, antwoord dan |
| 701 | informatie wordt teruggehaald. | 772 | met yes<Return> en de automatisch opgeslagen informatie wordt |
| 773 | teruggehaald. | ||
| 702 | 774 | ||
| 703 | 775 | ||
| 704 | * ECHO-GEBIED | 776 | * ECHO-GEBIED |
| 705 | ------------- | 777 | ------------- |
| 706 | 778 | ||
| 707 | Als je een commando langzaam intikt, toont Emacs de tekens aan de | 779 | Als je een commando langzaam intikt, toont Emacs de tekens aan de |
| 708 | onderkant van het scherm in een deel dat het "echo-gebied" genoemd wordt. | 780 | onderkant van het scherm in een deel dat het "echo-gebied" genoemd |
| 709 | Dit gebied omvat de onderste regel van het scherm. | 781 | wordt. Dit gebied omvat de onderste regel van het scherm. |
| 710 | 782 | ||
| 711 | 783 | ||
| 712 | * MODUS-REGEL | 784 | * MODUS-REGEL |
| 713 | ------------- | 785 | ------------- |
| 714 | 786 | ||
| 715 | De regel direct boven het echo gebied heet de "modusregel". De modusregel | 787 | De regel direct boven het echo gebied heet de "modusregel". De |
| 716 | ziet er ongeveer zo uit: | 788 | modusregel ziet er ongeveer zo uit: |
| 789 | |||
| 790 | -1:** TUTORIAL.nl 62% L763 (Fundamental)----------------------- | ||
| 717 | 791 | ||
| 718 | --**-Emacs: TUTORIAL.nl (Fundamental)--68%------------------------ | 792 | Deze regel geeft interessante informatie over Emacs en de tekst die je |
| 793 | aan het bewerken bent. | ||
| 719 | 794 | ||
| 720 | Deze regel geeft interessante informatie over Emacs en de tekst die | 795 | Je weet al wat de bestandsnaam betekent: het is de naam van het |
| 721 | je aan het editeren bent. | 796 | bestand dat je bezoekt. NN% geeft je huidige positie in de tekst aan: |
| 797 | NN procent van de tekst bevindt zich boven het scherm. Als het | ||
| 798 | bestand vanaf het begin op het scherm staat, staat er "Top" in plaats | ||
| 799 | van " 0%". Als het laatste stuk tekst op het scherm staat, zal er | ||
| 800 | "Bot" staan (van "bottom", "onderkant" in het Nederlands). Als de | ||
| 801 | tekst zo klein is dat hij volledig op het scherm past staat "All" in | ||
| 802 | de modus-regel. | ||
| 722 | 803 | ||
| 723 | Je weet al wat de bestandsnaam betekent: het is de naam van het bestand | 804 | De L gevolgd door een getal geeft het nummer van de regel waarin punt |
| 724 | dat je bezoekt. -NN%-- geeft je huidige positie in de tekst aan: NN | 805 | zich bevindt. |
| 725 | procent van de tekst bevindt zich boven het scherm. Als het bestand vanaf | ||
| 726 | het begin op het scherm staat, staat er --Top-- in plaats van --00%--. | ||
| 727 | Als het laatste stuk tekst op het scherm staat, zal er --Bot-- staan (van | ||
| 728 | "bottom", "onderkant" in het Nederlands). Als de tekst zo klein is dat hij | ||
| 729 | volledig op het scherm past staat --All-- in de modus-regel. | ||
| 730 | 806 | ||
| 731 | De sterretjes aan het begin betekenen dat je de tekst veranderd hebt. | 807 | De sterretjes aan het begin betekenen dat je de tekst veranderd hebt. |
| 732 | Direct na het bezoeken of opslaan staan er gewoon streepjes. | 808 | Direct na het bezoeken of opslaan staan er gewoon streepjes. |
| 733 | 809 | ||
| 734 | In de modusregel staat tussen haakjes in welke modus je aan het werken | 810 | In de modusregel staat tussen haakjes in welke modus je aan het werken |
| 735 | bent. De standaardmodus is de "Fundamental" modus, die je nu gebruikt | 811 | bent. De standaardmodus is de "Fundamental" modus, die je nu gebruikt |
| 736 | ("fundamental" is "basis" in het Nederlands). Een dergelijke | 812 | ("fundamental" is "basis" in het Nederlands). Een dergelijke modus |
| 737 | modus heet een hoofdmodus ("major mode" in het Engels). | 813 | heet een hoofdmodus ("major mode" in het Engels). |
| 738 | 814 | ||
| 739 | Emacs heeft verschillende hoofdmodi. Sommige daarvan zijn bedoeld voor | 815 | Emacs heeft verschillende hoofdmodi. Sommige daarvan zijn bedoeld |
| 740 | het editeren van verschillende talen of soorten tekst, zoals bijvoorbeeld | 816 | voor het bewerken van verschillende talen of soorten tekst, zoals |
| 741 | Lisp modus, Text modus, etc. Op elk moment is er altijd precies een modus | 817 | bijvoorbeeld Lisp modus, Text modus, etc. Op elk moment is er altijd |
| 742 | actief, en de naam daarvan staat in de modusregel, op de plaats waar nu | 818 | precies een modus actief, en de naam daarvan staat in de modusregel, |
| 743 | "Fundamental" staat. | 819 | op de plaats waar nu "Fundamental" staat. |
| 744 | 820 | ||
| 745 | Elke hoofdmodus zorgt ervoor dat sommige commando's zich anders gedragen. | 821 | Elke hoofdmodus zorgt ervoor dat sommige commando's zich anders |
| 746 | Zo bestaat er een commando om een commentaar in een programma te tikken, en | 822 | gedragen. Zo bestaat er een commando om een commentaar in een |
| 747 | aangezien elke programmeertaal een ander idee heeft over hoe commentaar | 823 | programma te tikken, en aangezien elke programmeertaal een ander idee |
| 748 | eruit moet zien, moet elke hoofdmodus op een andere manier het commentaar | 824 | heeft over hoe commentaar eruit moet zien, moet elke hoofdmodus op een |
| 749 | beginnen. Elke hoofdmodus is de naam van een uitgebreid commando, en met | 825 | andere manier het commentaar beginnen. Elke hoofdmodus is de naam van |
| 750 | dat commando schakel je om naar die hoofdmodus. Zo is bijvoorbeeld | 826 | een uitgebreid commando, en met dat commando schakel je om naar die |
| 751 | M-x fundamental-mode het commando om naar de basismodus om te schakelen. | 827 | hoofdmodus. Zo is bijvoorbeeld M-x fundamental-mode het commando om |
| 752 | 828 | naar de basismodus om te schakelen. | |
| 753 | Als je Nederlandse of Engelse tekst wil gaan editeren, zoals bijvoorbeeld | 829 | |
| 754 | dit bestand, kan je beter "Text mode" gebruiken, de modus om tekst in een | 830 | Als je Nederlandse of Engelse tekst wil gaan bewerken, zoals |
| 755 | gewone taal te editeren: | 831 | bijvoorbeeld dit bestand, kan je beter "Text mode" gebruiken, de modus |
| 832 | om tekst in een gewone taal te bewerken: | ||
| 756 | 833 | ||
| 757 | >> Tik M-x text-mode<Return>. | 834 | >> Tik M-x text-mode<Return>. |
| 758 | 835 | ||
| 759 | Wees gerust; geen van de commando's die je geleerd hebt zorgen voor | 836 | Wees gerust; geen van de commando's die je geleerd hebt zorgen voor |
| 760 | grondige veranderingen in Emacs. Een van de dingen die je kan merken, is | 837 | grondige veranderingen in Emacs. Een van de dingen die je kan merken, |
| 761 | bijvoorbeeld dat M-f en M-b nu apostrofs als onderdeel van een woord | 838 | is bijvoorbeeld dat M-f en M-b nu apostrofs als onderdeel van een |
| 762 | beschouwen. In de vorige modus (Fundamental) behandelen M-f en M-b de | 839 | woord beschouwen. In de vorige modus (Fundamental) behandelen M-f en |
| 763 | apostrof als ruimte tussen twee woorden. | 840 | M-b de apostrof als ruimte tussen twee woorden. |
| 764 | 841 | ||
| 765 | Het is gebruikelijk dat hoofdmodi dergelijke subtiele verschillen hebben. | 842 | Het is gebruikelijk dat hoofdmodi dergelijke subtiele verschillen |
| 766 | De meeste commando's doen dus min of meer hetzelfde in elke hoofdmodus. | 843 | hebben. De meeste commando's doen dus min of meer hetzelfde in elke |
| 844 | hoofdmodus. | ||
| 767 | 845 | ||
| 768 | Met het commando C-h m kan je de documentatie over de huidige hoofdmodus | 846 | Met het commando C-h m kan je de documentatie over de huidige |
| 769 | lezen. | 847 | hoofdmodus lezen. |
| 770 | 848 | ||
| 771 | >> Gebruik C-u C-v een paar keer om deze zin in de buurt van de bovenkant | 849 | >> Gebruik C-u C-v een paar keer om deze zin in de buurt van de |
| 772 | van het scherm te krijgen. | 850 | bovenkant van het scherm te krijgen. |
| 773 | >> Tik C-h m om te zien hoe de tekstmodus verschilt van de basismodus. | 851 | >> Tik C-h m om te zien hoe de tekstmodus verschilt van de basismodus. |
| 774 | >> Tik C-x 1 om de documentatie van het scherm te verwijderen. | 852 | >> Tik C-x 1 om de documentatie van het scherm te verwijderen. |
| 775 | 853 | ||
| 776 | Hoofdmodi heten zo omdat er ook bijmodi zijn. Bijmodi zijn | 854 | Hoofdmodi heten zo omdat er ook bijmodi zijn. Bijmodi zijn geen |
| 777 | geen alternatieven voor hoofdmodi; het zijn slechts kleine aanpassingen | 855 | alternatieven voor hoofdmodi; het zijn slechts kleine aanpassingen |
| 778 | daarvan. Elke bijmodus kan aan- of uitgezet worden, onafhankelijk van | 856 | daarvan. Elke bijmodus kan aan- of uitgezet worden, onafhankelijk van |
| 779 | andere bijmodi en onafhankelijk van de hoofdmodus. Het is dus mogelijk geen bijmodi, één bijmodus | 857 | andere bijmodi en onafhankelijk van de hoofdmodus. Het is dus |
| 780 | of een willekeurige combinatie van bijmodi te gebruiken. | 858 | mogelijk geen bijmodi, één bijmodus of een willekeurige combinatie van |
| 781 | 859 | bijmodi te gebruiken. | |
| 782 | Een nuttige bijmodus voor het editeren van tekst in een natuurlijke taal, | 860 | |
| 783 | zoals het Nederlands, is Auto Fill modus ("auto fill" betekent automatisch | 861 | Een nuttige bijmodus voor het bewerken van tekst in een natuurlijke |
| 784 | uitvullen). Wanneer deze modus aanstaat, breekt Emacs automatisch een | 862 | taal, zoals het Nederlands, is Auto Fill modus ("auto fill" betekent |
| 785 | regel tussen twee woorden af als de regel te lang wordt. | 863 | automatisch uitvullen). Wanneer deze modus aanstaat, breekt Emacs |
| 786 | 864 | automatisch een regel tussen twee woorden af als de regel te lang | |
| 787 | Je kan Auto Fill modus aanzetten met M-x auto-fill-mode<Return>. Als deze | 865 | wordt. |
| 788 | modus al aanstaat, kan je hem uitzetten met M-x auto-fill-mode<Return>. | 866 | |
| 789 | Als de modus uitstaat, zet dit commando de modus aan; als ze aanstaat, zet | 867 | Je kan Auto Fill modus aanzetten met M-x auto-fill-mode<Return>. Als |
| 790 | dit commando de modus uit. We zeggen dat het commando de modus "schakelt" | 868 | deze modus al aanstaat, kan je hem uitzetten met M-x |
| 791 | ("to toggle" in het Engels). | 869 | auto-fill-mode<Return>. Als de modus uitstaat, zet dit commando de |
| 792 | 870 | modus aan; als ze aanstaat, zet dit commando de modus uit. We zeggen | |
| 793 | >> Tik nu M-x auto-fill-mode<Return>. Tik nu vele malen "asdf " op een | 871 | dat het commando de modus "schakelt" ("to toggle" in het Engels). |
| 794 | regel zodat je kan zien dat de regel in tweeën gesplitst wordt. Er | 872 | |
| 795 | moeten wel spaties tussen de woorden staan, omdat de Auto Fill modus | 873 | >> Tik nu M-x auto-fill-mode<Return>. Tik nu vele malen "asdf " op |
| 796 | de regel alleen op spaties breekt. | 874 | een regel zodat je kan zien dat de regel in tweeën gesplitst wordt. |
| 797 | 875 | Er moeten wel spaties tussen de woorden staan, omdat de Auto Fill | |
| 798 | De rechterkantlijn staat meestal op 70 tekens, maar die kan je veranderen | 876 | modus de regel alleen op spaties breekt. |
| 799 | met het C-x f commando. Dit commando accepteert een numeriek argument | 877 | |
| 800 | om de gewenste kantlijn te verkrijgen. | 878 | De rechterkantlijn staat meestal op 70 tekens, maar die kan je |
| 879 | veranderen met het C-x f commando. Dit commando accepteert een | ||
| 880 | numeriek argument om de gewenste kantlijn te verkrijgen. | ||
| 801 | 881 | ||
| 802 | >> Tik C-x f met 20 als argument (C-u 20 C-x f). | 882 | >> Tik C-x f met 20 als argument (C-u 20 C-x f). |
| 803 | Tik wat tekst en zie dat Emacs de regels afbreekt bij 20 tekens. | 883 | Tik wat tekst en zie dat Emacs de regels afbreekt bij 20 tekens. |
| 804 | Zet de kantlijn nu terug op 70, dus met met C-u 70 C-x f. | 884 | Zet de kantlijn nu terug op 70, dus met met C-u 70 C-x f. |
| 805 | 885 | ||
| 806 | Als je de tekst midden in een regel verandert vult Auto Fill modus | 886 | Als je de tekst midden in een regel verandert vult Auto Fill modus de |
| 807 | de regel niet opnieuw. | 887 | regel niet opnieuw. |
| 808 | Om een alinea opnieuw te vullen, tik M-q (META-q) terwijl de | 888 | Om een alinea opnieuw te vullen, tik M-q (META-q) terwijl de cursor in |
| 809 | cursor in de alinea staat. | 889 | de alinea staat. |
| 810 | 890 | ||
| 811 | >> Plaats de cursor in de voorgaande alinea en tik M-q. | 891 | >> Plaats de cursor in de voorgaande alinea en tik M-q. |
| 812 | 892 | ||
| @@ -814,64 +894,75 @@ cursor in de alinea staat. | |||
| 814 | * ZOEKEN | 894 | * ZOEKEN |
| 815 | -------- | 895 | -------- |
| 816 | 896 | ||
| 817 | Emacs kan tekenreeksen ("strings") zoeken, zowel volgend op | 897 | Emacs kan tekenreeksen ("strings") zoeken, zowel volgend op de |
| 818 | de cursorpositie, als eraan voorafgaand. Het zoeken naar een string | 898 | cursorpositie, als eraan voorafgaand. Het zoeken naar een string |
| 819 | verplaatst de cursor naar de volgende plaats waar de gezochte string | 899 | verplaatst de cursor naar de volgende plaats waar de gezochte string |
| 820 | voorkomt. | 900 | voorkomt. |
| 821 | 901 | ||
| 822 | Het zoekcommando van Emacs is anders dan de zoekcommando's van de meeste | 902 | Het zoekcommando van Emacs is anders dan de zoekcommando's van de |
| 823 | tekstverwerkers; het zoekt incrementeel. Dit betekent dat het zoeken | 903 | meeste tekstverwerkers; het zoekt incrementeel. Dit betekent dat het |
| 824 | gebeurt tijdens het intikken van de gezochte string. | 904 | zoeken gebeurt tijdens het intikken van de gezochte string. |
| 825 | 905 | ||
| 826 | Het commando om het voorwaarts zoeken te starten is C-s (met de "s" van "to | 906 | Het commando om het voorwaarts zoeken te starten is C-s (met de "s" |
| 827 | search", zoeken); C-r start het achterwaarts zoeken (met de "r" van | 907 | van "to search", zoeken); C-r start het achterwaarts zoeken (met de |
| 828 | "reverse" of achteruit). MAAR WACHT! Probeer ze nu nog niet. | 908 | "r" van "reverse" of achteruit). MAAR WACHT! Probeer ze nu nog niet. |
| 829 | 909 | ||
| 830 | Als je C-s tikt verschijnt de string "I-search" in het echo-gebied. Dit | 910 | Als je C-s tikt verschijnt de string "I-search" in het echo-gebied. |
| 831 | betekent dat Emacs bezig is met een "incremental search" (incrementele | 911 | Dit betekent dat Emacs bezig is met een "incremental search" |
| 832 | zoekopdracht) en wacht op het intikken van de zoekstring. <RET> beëindigt | 912 | (incrementele zoekopdracht) en wacht op het intikken van de |
| 833 | het zoeken. | 913 | zoekstring. <Return> beëindigt het zoeken. |
| 834 | 914 | ||
| 835 | >> Tik nu C-s om het zoeken te starten. Tik nu, LANGZAAM, één letter per | 915 | >> Tik nu C-s om het zoeken te starten. Tik nu, LANGZAAM, één letter |
| 836 | keer, het woord "cursor", met een pauze na elke letter zodat je kan | 916 | per keer, het woord "cursor", met een pauze na elke letter zodat je |
| 837 | zien wat er met de cursor gebeurt. Je hebt nu eenmaal naar het woord | 917 | kan zien wat er met de cursor gebeurt. Je hebt nu eenmaal naar het |
| 838 | "cursor" gezocht. | 918 | woord "cursor" gezocht. |
| 839 | >> Tik nogmaals C-s, om naar het volgende voorkomen van het woord "cursor" te | 919 | >> Tik nogmaals C-s, om naar het volgende voorkomen van het woord |
| 840 | zoeken. | 920 | "cursor" te zoeken. |
| 841 | >> Tik nu viermaal <Delback> en let op de cursorbewegingen. | 921 | >> Tik nu viermaal <Delback> en let op de cursorbewegingen. |
| 842 | >> Tik <RET> om het zoeken te beëindigen. | 922 | >> Tik <Return> om het zoeken te beëindigen. |
| 923 | |||
| 924 | Zag je wat er gebeurde? Tijdens incrementeel zoeken probeert Emacs | ||
| 925 | naar de eerste plek te gaan waar de string staat die je tot dan toe | ||
| 926 | getikt hebt. Om naar de volgende plek te gaan, tik je C-s nog een | ||
| 927 | keer. Als er geen volgende plek is gevonden, biept Emacs en vertelt | ||
| 928 | je dat de zoekopdracht niets gevonden heeft ("failing" in het Engels). | ||
| 929 | C-g zou het zoeken ook afbreken. | ||
| 843 | 930 | ||
| 844 | Zag je wat er gebeurde? Tijdens incrementeel zoeken probeert Emacs naar | 931 | OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-s |
| 845 | de eerste plek te gaan waar de string staat die je tot dan toe getikt | 932 | tikt, en daarna ook niets meer. Dit komt door een eigenschap van de |
| 846 | hebt. Om naar de volgende plek te gaan, tik je C-s nog een keer. Als er | 933 | machine waarop je werkt die te maken heeft met "flow control". Met |
| 847 | geen volgende plek is gevonden, biept Emacs en vertelt je dat de zoekopdracht | 934 | C-s stopt de "flow" en komt niets meer van wat je tikt bij Emacs |
| 848 | niets gevonden heeft ("is failing" in het Engels). C-g zou het zoeken ook afbreken. | 935 | terecht. Om deze situatie te herstellen, tik C-q. Lees daarna het |
| 936 | hoofdstuk "Spontaneous Entry to Incremental Search" in het | ||
| 937 | Emacs-handboek over hoe je moet omgaan met deze situatie. | ||
| 849 | 938 | ||
| 850 | Als je tijdens incrementeel zoeken <Delback> tikt, zal je zien dat het | 939 | Als je tijdens incrementeel zoeken <Delback> tikt, zal je zien dat het |
| 851 | laatste teken dat je aan de zoekstring toegevoegd hebt, weggehaald wordt en dat het | 940 | laatste teken dat je aan de zoekstring toegevoegd hebt, weggehaald |
| 852 | zoeken teruggaat naar de voorgaande plaats. Als je bijvoorbeeld begint | 941 | wordt en dat het zoeken teruggaat naar de voorgaande plaats. Als je |
| 853 | met zoeken en je tikt een "c", dan ga je naar de plaats waar de "c" het | 942 | bijvoorbeeld begint met zoeken en je tikt een "c", dan ga je naar de |
| 854 | eerst voorkomt. Tik je vervolgens een "u", dan gaat de cursor naar de | 943 | plaats waar de "c" het eerst voorkomt. Tik je vervolgens een "u", dan |
| 855 | plaats waar de string "cu" het eerst voorkomt. Als je nu <Delback> tikt, dan | 944 | gaat de cursor naar de plaats waar de string "cu" het eerst voorkomt. |
| 856 | wordt de "u" van de zoekstring afgehaald, en gaat de cursor terug naar de | 945 | Als je nu <Delback> tikt, dan wordt de "u" van de zoekstring |
| 857 | plaats waar hij stond voordat je de "u" intikte, namelijk daar waar "c" het | 946 | afgehaald, en gaat de cursor terug naar de plaats waar hij stond |
| 858 | eerst voorkwam. | 947 | voordat je de "u" intikte, namelijk daar waar "c" het eerst voorkwam. |
| 859 | 948 | ||
| 860 | Als je tijdens een zoekoperatie een CONTROL- of META-teken intikt, dan | 949 | Als je tijdens een zoekoperatie een CONTROL- of META-teken intikt, dan |
| 861 | wordt het zoeken beëindigd. Er zijn een paar uitzonderingen, namelijk | 950 | wordt het zoeken beëindigd. Er zijn een paar uitzonderingen, namelijk |
| 862 | tekens die tijdens zoeken een speciale betekenis hebben, zoals C-s en C-r. | 951 | tekens die tijdens zoeken een speciale betekenis hebben, zoals C-s en |
| 952 | C-r. | ||
| 863 | 953 | ||
| 864 | Met C-s begin je te zoeken naar de plaats waar de zoekstring voor het eerst | 954 | Met C-s begin je te zoeken naar de plaats waar de zoekstring voor het |
| 865 | voorkomt NA de huidige cursorpositie. Als je iets wilt zoeken dat eerder in | 955 | eerst voorkomt NA de huidige cursorpositie. Als je iets wilt zoeken |
| 866 | de tekst moet voorkomen, gebruik dan C-r in plaats van C-s. Alles wat we nu weten | 956 | dat eerder in de tekst moet voorkomen, gebruik dan C-r in plaats van |
| 867 | over C-s geldt ook voor C-r, alleen is de zoekrichting omgedraaid. | 957 | C-s. Alles wat we nu weten over C-s geldt ook voor C-r, alleen is de |
| 958 | zoekrichting omgedraaid. | ||
| 868 | 959 | ||
| 869 | 960 | ||
| 870 | * MEERDERE VENSTERS | 961 | * MEERDERE VENSTERS |
| 871 | ------------------- | 962 | ------------------- |
| 872 | 963 | ||
| 873 | Een van Emacs' aardige eigenschappen is dat je meerdere vensters op het | 964 | Een van Emacs' aardige eigenschappen is dat je meerdere vensters op |
| 874 | scherm kan laten zien. | 965 | het scherm kan laten zien. |
| 875 | 966 | ||
| 876 | >> Zet de cursor op deze regel en tik C-u 0 C-l. | 967 | >> Zet de cursor op deze regel en tik C-u 0 C-l. |
| 877 | 968 | ||
| @@ -880,52 +971,59 @@ scherm kan laten zien. | |||
| 880 | bovenste venster. | 971 | bovenste venster. |
| 881 | 972 | ||
| 882 | >> Tik C-M-v om de tekst in het onderste venster te verschuiven. | 973 | >> Tik C-M-v om de tekst in het onderste venster te verschuiven. |
| 883 | (Als je geen META-toets hebt, tik dan ESC C-v.) | 974 | (Als je geen META-toets hebt, tik dan <ESC> C-v.) |
| 884 | 975 | ||
| 885 | >> Tik C-x o (met de o van "other"; "ander" in het Nederlands) | 976 | >> Tik C-x o (met de o van "other"; "ander" in het Nederlands) om de |
| 886 | om de cursor naar het andere venster te verplaatsen. | 977 | cursor naar het andere venster te verplaatsen. |
| 887 | 978 | ||
| 888 | >> Verschuif de tekst in het onderste venster, met C-v en M-v. | 979 | >> Verschuif de tekst in het onderste venster, met C-v en M-v. |
| 889 | Zorg ervoor dat je deze inleiding in het bovenste venster leest. | 980 | Zorg ervoor dat je deze inleiding in het bovenste venster leest. |
| 890 | 981 | ||
| 891 | >> Tik weer C-x o om de cursor weer in het bovenste venster | 982 | >> Tik weer C-x o om de cursor weer in het bovenste venster te zetten. |
| 892 | te zetten. De cursor staat weer precies op de plaats waar | 983 | De cursor staat weer precies op de plaats waar hij stond toen je |
| 893 | hij stond toen je het venster verliet. | 984 | het venster verliet. |
| 894 | 985 | ||
| 895 | Je kan C-x o blijven gebruiken om van venster naar venster te gaan. Elk | 986 | Je kan C-x o blijven gebruiken om van venster naar venster te gaan. |
| 896 | venster heeft zijn eigen cursorpositie; de cursor is altijd enkel zichtbaar | 987 | Elk venster heeft zijn eigen cursorpositie; de cursor is altijd enkel |
| 897 | in een daarvan. Alle normale commando's hebben betrekking op het venster | 988 | zichtbaar in een daarvan. Alle normale commando's hebben betrekking |
| 898 | waarin de cursor staat. Dit venster is het "geselecteerde venster" | 989 | op het venster waarin de cursor staat. Dit venster is het |
| 899 | ("selected window" in het Engels). | 990 | "geselecteerde venster" ("selected window" in het Engels). |
| 900 | 991 | ||
| 901 | Het C-M-v commando is erg nuttig wanneer je tekst aan het editeren bent in | 992 | Het C-M-v commando is erg nuttig wanneer je tekst aan het bewerken |
| 902 | het ene venster, terwijl je het andere venster als referentie gebruikt. | 993 | bent in het ene venster, terwijl je het andere venster als referentie |
| 903 | Je kan de cursor dan altijd in het venster houden waarin je bezig bent, | 994 | gebruikt. Je kan de cursor dan altijd in het venster houden waarin je |
| 904 | terwijl je met C-M-v door de tekst in het andere venster loopt. | 995 | bezig bent, terwijl je met C-M-v door de tekst in het andere venster |
| 996 | loopt. | ||
| 905 | 997 | ||
| 906 | C-M-v is een voorbeeld van een CONTROL-META teken. Als je een echte | 998 | C-M-v is een voorbeeld van een CONTROL-META teken. Als je een echte |
| 907 | META-toets hebt kan je C-M-v intikken door zowel CTRL als META ingedrukt te | 999 | META-toets hebt kan je C-M-v intikken door zowel CONTROL als META |
| 908 | houden terwijl je v tikt. Het maakt niet uit in welke volgorde je CTRL en | 1000 | ingedrukt te houden terwijl je v tikt. Het maakt niet uit in welke |
| 909 | META indrukt; het gaat erom welke toetsen ingedrukt zijn terwijl je tikt. | 1001 | volgorde je CONTROL en META indrukt; het gaat erom welke toetsen |
| 1002 | ingedrukt zijn terwijl je tikt. | ||
| 910 | 1003 | ||
| 911 | Als je geen echte META-toets hebt kan je ESC gebruiken; de volgorde is dan | 1004 | Als je geen echte META-toets hebt kan je <ESC> gebruiken; de volgorde |
| 912 | wel belangrijk. Je moet dan eerst ESC tikken, gevolgd door CTRL-v; | 1005 | is dan wel belangrijk. Je moet dan eerst <ESC> tikken, gevolgd door |
| 913 | CTRL-ESC v zal niet werken. Dit komt doordat ESC zelf een teken is, | 1006 | CONTROL-v; CONTROL-<ESC> v zal niet werken. Dit komt doordat <ESC> |
| 914 | terwijl CTRL en META dat niet zijn. | 1007 | zelf een teken is, terwijl CONTROL en META dat niet zijn. |
| 915 | 1008 | ||
| 916 | >> Tik C-x 1 (in het bovenste venster) om het onderste venster te laten | 1009 | >> Tik C-x 1 (in het bovenste venster) om het onderste venster te |
| 917 | verdwijnen. | 1010 | laten verdwijnen. |
| 918 | 1011 | ||
| 919 | (Als je C-x 1 tikt in het onderste venster laat je het bovenste | 1012 | (Als je C-x 1 tikt in het onderste venster laat je het bovenste |
| 920 | verdwijnen. C-x 1 betekent zoveel als "ik wil maar 1 venster, | 1013 | verdwijnen. C-x 1 betekent zoveel als "ik wil maar 1 venster, en wel |
| 921 | en wel dat venster waar de cursor nu in staat.") | 1014 | dat venster waar de cursor nu in staat.") |
| 922 | 1015 | ||
| 923 | Hier is nog een manier om twee venster te krijgen die elk een andere tekst | 1016 | Je hoeft niet dezelfde buffer in beide vensters te hebben. Wanneer je |
| 924 | laten zien: | 1017 | C-x C-f gebruikt om een bestand in één van de vensters te bezoeken, |
| 1018 | zal het andere venster niet veranderen. Je kunt de vensters | ||
| 1019 | onafhankelijk van elkaar gebruiken om bestanden te bezoeken. | ||
| 925 | 1020 | ||
| 926 | >> Tik C-x 4 C-f gevolgd door de naam van een van je bestanden, gevolgd | 1021 | Hier is nog een manier om twee venster te krijgen die elk een andere |
| 927 | door <Return>. Het opgegeven bestand zal in het onderste venster | 1022 | tekst laten zien: |
| 928 | verschijnen, en de cursor zal in dat venster staan. | 1023 | |
| 1024 | >> Tik C-x 4 C-f gevolgd door de naam van een van je bestanden, | ||
| 1025 | gevolgd door <Return>. Het opgegeven bestand zal in het onderste | ||
| 1026 | venster verschijnen, en de cursor zal in dat venster staan. | ||
| 929 | 1027 | ||
| 930 | >> Tik C-x o om terug naar het bovenste venster te gaan, en C-x 1 om | 1028 | >> Tik C-x o om terug naar het bovenste venster te gaan, en C-x 1 om |
| 931 | het onderste venster te laten verdwijnen. | 1029 | het onderste venster te laten verdwijnen. |
| @@ -934,74 +1032,80 @@ laten zien: | |||
| 934 | * RECURSIEVE BEWERKINGSNIVEAUS | 1032 | * RECURSIEVE BEWERKINGSNIVEAUS |
| 935 | ------------------------------ | 1033 | ------------------------------ |
| 936 | 1034 | ||
| 937 | Soms kom je in Emacs in een recursief bewerkingsniveau terecht (Engels: | 1035 | Soms kom je in Emacs in een recursief bewerkingsniveau terecht |
| 938 | "recursive editing level"). Dit is te zien in de modusregel aan de vierkante | 1036 | (Engels: "recursive editing level"). Dit is te zien in de modusregel |
| 939 | haken die om de haakjes van de naam van de hoofdmodus staan. Dan staat er | 1037 | aan de vierkante haken die om de haakjes van de naam van de hoofdmodus |
| 940 | bijvoorbeeld [(Fundamental)] in plaats van (Fundamental). | 1038 | staan. Dan staat er bijvoorbeeld [(Fundamental)] in plaats van |
| 1039 | (Fundamental). | ||
| 941 | 1040 | ||
| 942 | Tik ESC ESC ESC Om uit een recursief bewerkingsniveau te komen. Dit is | 1041 | Tik <ESC> <ESC> <ESC> Om uit een recursief bewerkingsniveau te komen. |
| 943 | een algemeen "ontsnappingscommando". Je kan het ook gebruiken om extra | 1042 | Dit is een algemeen "ontsnappingscommando". Je kan het ook gebruiken |
| 944 | vensters te verwijderen of om uit de minibuffer te komen. | 1043 | om extra vensters te verwijderen of om uit de minibuffer te komen. |
| 945 | 1044 | ||
| 946 | >> Tik M-x om in een minibuffer te komen, en tik dan ESC ESC ESC | 1045 | >> Tik M-x om in een minibuffer te komen, en tik dan <ESC> <ESC> <ESC> |
| 947 | om er weer uit te komen. | 1046 | om er weer uit te komen. |
| 948 | 1047 | ||
| 949 | C-g is niet bruikbaar om uit een recursief bewerkingsniveau te komen. De | 1048 | C-g is niet bruikbaar om uit een recursief bewerkingsniveau te komen. |
| 950 | reden hiervoor is dat C-g gebruikt wordt om commando's af te breken BINNEN | 1049 | De reden hiervoor is dat C-g gebruikt wordt om commando's af te breken |
| 951 | het recursieve bewerkingsniveau. | 1050 | BINNEN het recursieve bewerkingsniveau. |
| 952 | 1051 | ||
| 953 | 1052 | ||
| 954 | * MEER INFORMATIE | 1053 | * MEER INFORMATIE |
| 955 | ----------------- | 1054 | ----------------- |
| 956 | 1055 | ||
| 957 | We hebben geprobeerd je met deze inleiding precies genoeg informatie te leveren | 1056 | We hebben geprobeerd je met deze inleiding precies genoeg informatie |
| 958 | om met Emacs te beginnen werken. De mogelijkheden van Emacs zijn zo groot dat | 1057 | te leveren om met Emacs te beginnen werken. De mogelijkheden van |
| 959 | het onmogelijk is nu alles uit te leggen. Het kan zijn dat je meer over | 1058 | Emacs zijn zo groot dat het onmogelijk is nu alles uit te leggen. Het |
| 960 | Emacs wil leren omdat het zoveel nuttige mogelijkheden heeft. Emacs heeft | 1059 | kan zijn dat je meer over Emacs wil leren omdat het zoveel nuttige |
| 961 | commando's om documentatie te laten zien over Emacs commando's. Deze | 1060 | mogelijkheden heeft. Emacs heeft commando's om documentatie te laten |
| 962 | "helpcommando's" beginnen allemaal met C-h: "het Hulpteken". | 1061 | zien over Emacs commando's. Deze "helpcommando's" beginnen allemaal |
| 1062 | met C-h: "het Hulpteken". | ||
| 963 | 1063 | ||
| 964 | Om hulp te krijgen tik je C-h, gevolgd door een teken om aan te duiden | 1064 | Om hulp te krijgen tik je C-h, gevolgd door een teken om aan te duiden |
| 965 | welke hulp je wilt. Als je het echt niet meer weet, tik C-h ? en Emacs | 1065 | welke hulp je wilt. Als je het echt niet meer weet, tik C-h ? en |
| 966 | vertelt welke hulp het allemaal te bieden heeft. Als je C-h hebt getikt | 1066 | Emacs vertelt welke hulp het allemaal te bieden heeft. Als je C-h |
| 967 | maar van gedachten veranderd bent, tik je gewoon C-g om het af te breken. | 1067 | hebt getikt maar van gedachten veranderd bent, tik je gewoon C-g om |
| 968 | 1068 | het af te breken. | |
| 969 | (In sommige installaties wordt de betekenis van C-h veranderd. Dat is geen goed | 1069 | |
| 970 | idee, zeker als die verandering op alle gebruikers invloed heeft, en is | 1070 | (In sommige installaties wordt de betekenis van C-h veranderd. Dat is |
| 971 | een geldige reden om je beklag te doen bij de systeembeheerder of de | 1071 | geen goed idee, zeker als die verandering op alle gebruikers invloed |
| 972 | helpdesk. Als C-h intussen niet een bericht onderaan het scherm laat zien | 1072 | heeft, en is een geldige reden om je beklag te doen bij de |
| 973 | over mogelijke hulp, probeer dan de F1 toets (functietoets 1) of gebruik | 1073 | systeembeheerder of de helpdesk. Als C-h intussen niet een bericht |
| 974 | M-x help RET.) | 1074 | onderaan het scherm laat zien over mogelijke hulp, probeer dan de F1 |
| 1075 | toets (functietoets 1) of gebruik M-x help <Return>.) | ||
| 975 | 1076 | ||
| 976 | De eenvoudigste hulp is C-h c. Tik C-h, het teken "c" en een teken of | 1077 | De eenvoudigste hulp is C-h c. Tik C-h, het teken "c" en een teken of |
| 977 | uitgebreid commando, en Emacs laat een zeer korte beschrijving van het | 1078 | uitgebreid commando, en Emacs laat een zeer korte beschrijving van het |
| 978 | commando zien. | 1079 | commando zien. |
| 979 | 1080 | ||
| 980 | >> Tik C-h c Control-p. | 1081 | >> Tik C-h c C-p. |
| 981 | De beschrijving die getoond wordt zou zoiets moeten zijn als | 1082 | |
| 1083 | De beschrijving die getoond wordt, zou zoiets moeten zijn als: | ||
| 982 | 1084 | ||
| 983 | C-p runs the command previous-line | 1085 | C-p runs the command previous-line |
| 984 | 1086 | ||
| 985 | (Nederlands: C-p voert het commando previous-line uit.) | 1087 | (Nederlands: C-p voert het commando previous-line uit.) |
| 986 | 1088 | ||
| 987 | Dit commando vertelt je "de naam van de functie". Functies worden vooral | 1089 | Dit commando vertelt je "de naam van de functie". Functies worden |
| 988 | gebruikt om Emacs uit te breiden of aan de wensen van de gebruiker aan te | 1090 | vooral gebruikt om Emacs uit te breiden of aan de wensen van de |
| 989 | passen. Aangezien functienamen gekozen zijn om aan te geven wat de | 1091 | gebruiker aan te passen. Aangezien functienamen gekozen zijn om aan |
| 990 | functie doet, zijn ze ook geschikt als heel korte documentatie; genoeg om | 1092 | te geven wat de functie doet, zijn ze ook geschikt als heel korte |
| 991 | je te herinneren aan wat de commando's die je al geleerd hebt betekenen. | 1093 | documentatie; genoeg om je te herinneren aan wat de commando's die je |
| 1094 | al geleerd hebt betekenen. | ||
| 992 | 1095 | ||
| 993 | Uitgebreide commando's zoals C-x C-s en (als je geen META-, EDIT- of | 1096 | Uitgebreide commando's zoals C-x C-s en (als je geen META-, EDIT- of |
| 994 | ALT-toets hebt) <ESC> v kunnen ook getikt worden na C-h c. | 1097 | ALT-toets hebt) <ESC> v kunnen ook getikt worden na C-h c. |
| 995 | 1098 | ||
| 996 | Om meer informatie over een commando te krijgen, tik C-h k in plaats van | 1099 | Om meer informatie over een commando te krijgen, tik C-h k in plaats |
| 997 | C-h c. | 1100 | van C-h c. |
| 998 | 1101 | ||
| 999 | >> Tik C-h k C-p. | 1102 | >> Tik C-h k C-p. |
| 1000 | 1103 | ||
| 1001 | Dit laat de documentatie van de functie, inclusief de naam van de functie, | 1104 | Dit laat de documentatie van de functie, inclusief de naam van de |
| 1002 | in een apart venster zien. Als je klaar bent met lezen, tik C-x 1 om van | 1105 | functie, in een apart venster zien. Als je klaar bent met lezen, tik |
| 1003 | dat venster af te komen. Je hoeft dat natuurlijk niet meteen te doen. Je | 1106 | C-x 1 om van dat venster af te komen. Je hoeft dat natuurlijk niet |
| 1004 | kan ook eerst wat anders doen voordat je C-x 1 tikt. | 1107 | meteen te doen. Je kan ook eerst wat anders doen voordat je C-x 1 |
| 1108 | tikt. | ||
| 1005 | 1109 | ||
| 1006 | Hier zijn nog wat nuttige mogelijkheden van C-h: | 1110 | Hier zijn nog wat nuttige mogelijkheden van C-h: |
| 1007 | 1111 | ||
| @@ -1009,91 +1113,134 @@ Hier zijn nog wat nuttige mogelijkheden van C-h: | |||
| 1009 | intikken. | 1113 | intikken. |
| 1010 | 1114 | ||
| 1011 | >> Tik C-h f previous-line<Return> | 1115 | >> Tik C-h f previous-line<Return> |
| 1012 | Dit laat alle informatie zien die Emacs heeft over de functie die het | 1116 | Dit laat alle informatie zien die Emacs heeft over de functie die |
| 1013 | C-p commando implementeert. | 1117 | het C-p commando implementeert. |
| 1118 | |||
| 1119 | Een vergelijkbaar commando C-h v toont de documentatie van variabelen | ||
| 1120 | die je kunt instellen om het gedrag van Emacs naar wens aan te passen. | ||
| 1121 | Het commando vraagt je om de naam van een variabele. | ||
| 1014 | 1122 | ||
| 1015 | C-h a Commando Apropos. Tik een woord in en Emacs zal een | 1123 | C-h a Commando Apropos. Tik een woord in en Emacs zal een |
| 1016 | lijst van alle commando's laten zien waarin dat woord | 1124 | lijst van alle commando's laten zien waarin dat woord |
| 1017 | voorkomt. Al deze commando's kunnen aangeroepen worden | 1125 | voorkomt. Al deze commando's kunnen aangeroepen |
| 1018 | met M-x. Bij sommige commando's staat met welke tekens | 1126 | worden met M-x. Bij sommige commando's staat met |
| 1019 | dit commando direct uitgevoerd kan worden. | 1127 | welke tekens dit commando direct uitgevoerd kan |
| 1128 | worden. | ||
| 1020 | 1129 | ||
| 1021 | >> Tik C-h a file<Return>. | 1130 | >> Tik C-h a file<Return>. |
| 1022 | 1131 | ||
| 1023 | Dit laat in een ander venster alle M-x commando's zien met "file" in hun | 1132 | Dit laat in een ander venster alle M-x commando's zien met "file" in |
| 1024 | naam. Je zal teken-commando's zien als C-x C-f naast de overeenkomende | 1133 | hun naam. Je zal teken-commando's zien als C-x C-f naast de |
| 1025 | commandonaam zoals find-file. | 1134 | overeenkomende commandonaam zoals find-file. |
| 1026 | 1135 | ||
| 1027 | >> Tik C-M-v herhaaldelijk om de tekst in het hulpvenster te verschuiven. | 1136 | >> Tik C-M-v herhaaldelijk om de tekst in het hulpvenster te |
| 1137 | verschuiven. | ||
| 1028 | 1138 | ||
| 1029 | >> Tik C-x 1 om het hulpvenster te verwijderen. | 1139 | >> Tik C-x 1 om het hulpvenster te verwijderen. |
| 1030 | 1140 | ||
| 1141 | C-h i Lees de online handleidingen (ook wel Info genoemd). | ||
| 1142 | Dit commando zet je in een speciale buffer genaamd | ||
| 1143 | "*info*" waar je online handleidingen kunt lezen van | ||
| 1144 | software die op je computer is geïnstalleerd. Tik m | ||
| 1145 | Emacs <Return> om de handleiding van Emacs te lezen. | ||
| 1146 | Als je nog nooit Info hebt gebruikt dan kun je ? | ||
| 1147 | tikken zodat Emacs je een rondleiding geeft langs de | ||
| 1148 | mogelijkheden van het Info systeem. Wanneer je klaar | ||
| 1149 | bent met deze Emacs-inleiding dan kun je de | ||
| 1150 | Emacs-Info-handleiding gebruiken als je primaire bron | ||
| 1151 | van informatie. | ||
| 1152 | |||
| 1153 | |||
| 1154 | * MEER MOGELIJKHEDEN | ||
| 1155 | -------------------- | ||
| 1156 | |||
| 1157 | Je kunt meer over Emacs leren door haar handleiding te lezen. Deze is | ||
| 1158 | zowel als boek als in elektronische vorm via Info beschikbaar (gebruik | ||
| 1159 | het Help menu of tik <F10> h r). Kijk bijvoorbeeld eens naar | ||
| 1160 | "completion", hetgeen minder tikwerk oplevert, of "dired" wat het | ||
| 1161 | omgaan met bestanden vereenvoudigt. | ||
| 1162 | |||
| 1163 | "Completion" (of "afmaken", in het Nederlands) is een manier om | ||
| 1164 | onnodig tikwerk te voorkomen. Als je bijvoorbeeld naar de | ||
| 1165 | "*Messages*" buffer wilt omschakelen, dan kun je C-x b *M<Tab> tikken | ||
| 1166 | en dan zal Emacs de rest van de buffernaam invullen voor zover dit | ||
| 1167 | mogelijk is. Completion staat beschreven in de node "Completion" in | ||
| 1168 | de Emacs-Info-handleiding. | ||
| 1169 | |||
| 1170 | "Dired" toont je een lijst van bestanden in een directory, waarmee je | ||
| 1171 | gemakkelijk bestanden kunt bezoeken, van naam kunt veranderen, kunt | ||
| 1172 | wissen, of andere acties op uit kunt voeren. Informatie over Dired | ||
| 1173 | kun je vinden in de node "Dired" van de Emacs-Info-handleiding. | ||
| 1174 | |||
| 1031 | 1175 | ||
| 1032 | * CONCLUSIE | 1176 | * CONCLUSIE |
| 1033 | ----------- | 1177 | ----------- |
| 1034 | 1178 | ||
| 1035 | Denk eraan dat je met C-x C-c gebruikt om Emacs te verlaten. Om tijdelijk | 1179 | Denk eraan dat je met C-x C-c Emacs permanent verlaat. Om tijdelijk |
| 1036 | een shell te krijgen en daarna weer in Emacs terug te komen, tik C-z. | 1180 | een shell te krijgen en daarna weer in Emacs terug te komen, tik je |
| 1181 | C-z. | ||
| 1037 | 1182 | ||
| 1038 | De bedoeling van deze inleiding is dat ze begrijpelijk is voor alle nieuwe | 1183 | De bedoeling van deze inleiding is dat ze begrijpelijk is voor alle |
| 1039 | Emacs-gebruikers. Als je dus iets onduidelijks bent tegengekomen, blijf | 1184 | nieuwe Emacs-gebruikers. Als je dus iets onduidelijks bent |
| 1040 | dan niet zitten en maak jezelf geen verwijten. Doe je beklag! | 1185 | tegengekomen, blijf dan niet zitten en maak jezelf geen verwijten. |
| 1186 | Doe je beklag! | ||
| 1041 | 1187 | ||
| 1042 | 1188 | ||
| 1043 | * KOPIËREN | 1189 | * KOPIËREN |
| 1044 | ----------- | 1190 | ----------- |
| 1045 | 1191 | ||
| 1046 | (De Engelse versie van) deze inleiding is voorafgegaan door een lange reeks | 1192 | (De Engelse versie van) deze inleiding is voorafgegaan door een lange |
| 1047 | van Emacs-inleidingen, die begon met de inleiding die Stuart Cracraft schreef | 1193 | reeks van Emacs-inleidingen, die begon met de inleiding die Stuart |
| 1048 | voor de originele Emacs. Deze Nederlandse vertaling is gemaakt door | 1194 | Cracraft schreef voor de originele Emacs. Deze Nederlandse vertaling |
| 1049 | Pieter Schoenmakers <tiggr@ics.ele.tue.nl> op basis van de GNU Emacs 20.2 | 1195 | is gemaakt door Pieter Schoenmakers <tiggr@ics.ele.tue.nl> op basis |
| 1050 | TUTORIAL, en verbeterd en verbeterd door Frederik Fouvry. | 1196 | van de GNU Emacs 20.2 TUTORIAL, en nagezien en verbeterd door Frederik |
| 1197 | Fouvry en Lute Kamstra. | ||
| 1051 | 1198 | ||
| 1052 | (Wat nu volgt is een vertaling naar het Nederlands van de condities voor | 1199 | (Wat nu volgt is een vertaling naar het Nederlands van de condities |
| 1053 | gebruik en verspreiding van deze inleiding. Deze vertaling is niet | 1200 | voor gebruik en verspreiding van deze inleiding. Deze vertaling is |
| 1054 | gecontroleerd door een jurist. Er kunnen derhalve geen rechten aan de | 1201 | niet gecontroleerd door een jurist. Er kunnen derhalve geen rechten |
| 1055 | vertaling worden ontleend, en de vertaling wordt gevolgd door het Engelse | 1202 | aan de vertaling worden ontleend, en de vertaling wordt gevolgd door |
| 1056 | origineel.) | 1203 | het Engelse origineel.) |
| 1057 | 1204 | ||
| 1058 | Deze versie van de inleiding valt onder copyright, net als GNU Emacs. | 1205 | Deze versie van de inleiding valt onder copyright, net als GNU Emacs. |
| 1059 | Je mag deze inleiding verdelen onder bepaalde voorwaarden: | 1206 | Je mag deze inleiding verspreiden onder bepaalde voorwaarden: |
| 1060 | 1207 | ||
| 1061 | Copyright (c) 1985, 1996, 1997 Free Software Foundation | 1208 | Copyright (c) 1985, 1996, 1997, 2003, 2004, 2005 Free Software Foundation |
| 1062 | 1209 | ||
| 1063 | Iedereen mag letterlijke kopieën van dit document, zowel ontvangen als | 1210 | Iedereen mag letterlijke kopieën van dit document, zowel ontvangen |
| 1064 | verspreiden, op elk medium, vooropgesteld dat de copyrightvermelding en | 1211 | als verspreiden, op elk medium, vooropgesteld dat de |
| 1065 | de toestemmingsmelding niet veranderd worden en dat de verspreider aan de | 1212 | copyrightvermelding en de toestemmingsmelding niet veranderd worden |
| 1066 | ontvanger dezelfde distributierechten verleent als aan hem verleend | 1213 | en dat de verspreider aan de ontvanger dezelfde distributierechten |
| 1067 | worden door deze melding. | 1214 | verleent als aan hem verleend worden door deze melding. |
| 1068 | 1215 | ||
| 1069 | Toestemming wordt verleend om veranderde versies van dit document, | 1216 | Toestemming wordt verleend om veranderde versies van dit document, |
| 1070 | of delen daarvan, te verspreiden, onder bovenstaande voorwaarden, | 1217 | of delen daarvan, te verspreiden, onder bovenstaande voorwaarden, |
| 1071 | vooropgesteld dat ze ook duidelijk vermelden wie als | 1218 | vooropgesteld dat ze ook duidelijk vermelden wie als laatste |
| 1072 | laatste veranderingen aangebracht heeft. | 1219 | veranderingen aangebracht heeft. |
| 1073 | 1220 | ||
| 1074 | De condities voor het kopiëren van Emacs zelf zijn ingewikkelder dan dit, | 1221 | De condities voor het kopiëren van Emacs zelf zijn ingewikkelder dan |
| 1075 | maar gebaseerd op dezelfde gedachte. Lees het bestand COPYING en geef | 1222 | dit, maar gebaseerd op dezelfde gedachte. Lees het bestand COPYING en |
| 1076 | vervolgens kopieën van Emacs aan al je vrienden. Help bij het uitroeien | 1223 | geef vervolgens kopieën van Emacs aan al je vrienden. Help bij het |
| 1077 | van softwarebeschermingspolitiek ("eigendom") door vrije software | 1224 | uitroeien van softwarebeschermingspolitiek ("eigendom") door vrije |
| 1078 | te gebruiken, te schrijven en te delen! | 1225 | software te gebruiken, te schrijven en te delen! |
| 1079 | 1226 | ||
| 1080 | (Engels origineel van de copyrightmelding en condities: | 1227 | (Engels origineel van de copyrightmelding en condities: |
| 1081 | 1228 | ||
| 1082 | This version of the tutorial, like GNU Emacs, is copyrighted, and | 1229 | This version of the tutorial, like GNU Emacs, is copyrighted, and |
| 1083 | comes with permission to distribute copies on certain conditions: | 1230 | comes with permission to distribute copies on certain conditions: |
| 1084 | 1231 | ||
| 1085 | Copyright (c) 1985, 1996 Free Software Foundation | 1232 | Copyright (c) 1985, 1996, 1997, 2003, 2004, 2005 Free Software Foundation |
| 1086 | 1233 | ||
| 1087 | Permission is granted to anyone to make or distribute verbatim copies | 1234 | Permission is granted to anyone to make or distribute verbatim |
| 1088 | of this document as received, in any medium, provided that the | 1235 | copies of this document as received, in any medium, provided that |
| 1089 | copyright notice and permission notice are preserved, | 1236 | the copyright notice and permission notice are preserved, and that |
| 1090 | and that the distributor grants the recipient permission | 1237 | the distributor grants the recipient permission for further |
| 1091 | for further redistribution as permitted by this notice. | 1238 | redistribution as permitted by this notice. |
| 1092 | 1239 | ||
| 1093 | Permission is granted to distribute modified versions | 1240 | Permission is granted to distribute modified versions of this |
| 1094 | of this document, or of portions of it, | 1241 | document, or of portions of it, under the above conditions, |
| 1095 | under the above conditions, provided also that they | 1242 | provided also that they carry prominent notices stating who last |
| 1096 | carry prominent notices stating who last altered them. | 1243 | altered them. |
| 1097 | 1244 | ||
| 1098 | The conditions for copying Emacs itself are more complex, but in the | 1245 | The conditions for copying Emacs itself are more complex, but in the |
| 1099 | same spirit. Please read the file COPYING and then do give copies of | 1246 | same spirit. Please read the file COPYING and then do give copies of |
diff --git a/lisp/gnus/bar.xbm b/etc/images/gnus/bar.xbm index e61300adb20..e61300adb20 100644 --- a/lisp/gnus/bar.xbm +++ b/etc/images/gnus/bar.xbm | |||
diff --git a/lisp/gnus/bar.xpm b/etc/images/gnus/bar.xpm index 2985065a5c6..2985065a5c6 100644 --- a/lisp/gnus/bar.xpm +++ b/etc/images/gnus/bar.xpm | |||
diff --git a/lisp/gnus/catchup.pbm b/etc/images/gnus/catchup.pbm index 3fc571bdf80..3fc571bdf80 100644 --- a/lisp/gnus/catchup.pbm +++ b/etc/images/gnus/catchup.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/catchup.xpm b/etc/images/gnus/catchup.xpm index cba849712df..cba849712df 100644 --- a/lisp/gnus/catchup.xpm +++ b/etc/images/gnus/catchup.xpm | |||
diff --git a/lisp/gnus/cu-exit.pbm b/etc/images/gnus/cu-exit.pbm index 210869cce78..210869cce78 100644 --- a/lisp/gnus/cu-exit.pbm +++ b/etc/images/gnus/cu-exit.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/cu-exit.xpm b/etc/images/gnus/cu-exit.xpm index 17236223fed..17236223fed 100644 --- a/lisp/gnus/cu-exit.xpm +++ b/etc/images/gnus/cu-exit.xpm | |||
diff --git a/lisp/gnus/dead.xpm b/etc/images/gnus/dead.xpm index 56463a72951..56463a72951 100644 --- a/lisp/gnus/dead.xpm +++ b/etc/images/gnus/dead.xpm | |||
diff --git a/lisp/gnus/describe-group.pbm b/etc/images/gnus/describe-group.pbm index de7bf110431..de7bf110431 100644 --- a/lisp/gnus/describe-group.pbm +++ b/etc/images/gnus/describe-group.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/describe-group.xpm b/etc/images/gnus/describe-group.xpm index b4a6f42a94b..b4a6f42a94b 100644 --- a/lisp/gnus/describe-group.xpm +++ b/etc/images/gnus/describe-group.xpm | |||
diff --git a/lisp/gnus/exit-gnus.pbm b/etc/images/gnus/exit-gnus.pbm index 32ad0e0ebe9..32ad0e0ebe9 100644 --- a/lisp/gnus/exit-gnus.pbm +++ b/etc/images/gnus/exit-gnus.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/exit-gnus.xpm b/etc/images/gnus/exit-gnus.xpm index 534f3c2fafb..534f3c2fafb 100644 --- a/lisp/gnus/exit-gnus.xpm +++ b/etc/images/gnus/exit-gnus.xpm | |||
diff --git a/lisp/gnus/exit-summ.pbm b/etc/images/gnus/exit-summ.pbm index d0192310607..d0192310607 100644 --- a/lisp/gnus/exit-summ.pbm +++ b/etc/images/gnus/exit-summ.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/exit-summ.xpm b/etc/images/gnus/exit-summ.xpm index 5234ccb11ec..5234ccb11ec 100644 --- a/lisp/gnus/exit-summ.xpm +++ b/etc/images/gnus/exit-summ.xpm | |||
diff --git a/lisp/gnus/followup.pbm b/etc/images/gnus/followup.pbm index 61be114096b..61be114096b 100644 --- a/lisp/gnus/followup.pbm +++ b/etc/images/gnus/followup.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/followup.xpm b/etc/images/gnus/followup.xpm index 444895a4399..444895a4399 100644 --- a/lisp/gnus/followup.xpm +++ b/etc/images/gnus/followup.xpm | |||
diff --git a/lisp/gnus/fuwo.pbm b/etc/images/gnus/fuwo.pbm index b81af10c399..b81af10c399 100644 --- a/lisp/gnus/fuwo.pbm +++ b/etc/images/gnus/fuwo.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/fuwo.xpm b/etc/images/gnus/fuwo.xpm index 362cbc5725a..362cbc5725a 100644 --- a/lisp/gnus/fuwo.xpm +++ b/etc/images/gnus/fuwo.xpm | |||
diff --git a/lisp/gnus/get-news.pbm b/etc/images/gnus/get-news.pbm index c0080716c44..c0080716c44 100644 --- a/lisp/gnus/get-news.pbm +++ b/etc/images/gnus/get-news.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/get-news.xpm b/etc/images/gnus/get-news.xpm index d7e7b4a3553..d7e7b4a3553 100644 --- a/lisp/gnus/get-news.xpm +++ b/etc/images/gnus/get-news.xpm | |||
diff --git a/lisp/gnus/gnntg.pbm b/etc/images/gnus/gnntg.pbm index 2f5e5261a97..2f5e5261a97 100644 --- a/lisp/gnus/gnntg.pbm +++ b/etc/images/gnus/gnntg.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/gnntg.xpm b/etc/images/gnus/gnntg.xpm index 21bc5f16eb2..21bc5f16eb2 100644 --- a/lisp/gnus/gnntg.xpm +++ b/etc/images/gnus/gnntg.xpm | |||
diff --git a/lisp/gnus/gnus-pointer.xbm b/etc/images/gnus/gnus-pointer.xbm index 94e915428c3..94e915428c3 100644 --- a/lisp/gnus/gnus-pointer.xbm +++ b/etc/images/gnus/gnus-pointer.xbm | |||
diff --git a/lisp/gnus/gnus-pointer.xpm b/etc/images/gnus/gnus-pointer.xpm index c47443dbb74..c47443dbb74 100644 --- a/lisp/gnus/gnus-pointer.xpm +++ b/etc/images/gnus/gnus-pointer.xpm | |||
diff --git a/lisp/gnus/gnus.xbm b/etc/images/gnus/gnus.xbm index 58d1ac845aa..58d1ac845aa 100644 --- a/lisp/gnus/gnus.xbm +++ b/etc/images/gnus/gnus.xbm | |||
diff --git a/lisp/gnus/gnus.xpm b/etc/images/gnus/gnus.xpm index b6ee4d0d733..b6ee4d0d733 100644 --- a/lisp/gnus/gnus.xpm +++ b/etc/images/gnus/gnus.xpm | |||
diff --git a/lisp/gnus/important.xpm b/etc/images/gnus/important.xpm index e972facff24..e972facff24 100644 --- a/lisp/gnus/important.xpm +++ b/etc/images/gnus/important.xpm | |||
diff --git a/lisp/gnus/kill-group.pbm b/etc/images/gnus/kill-group.pbm index 50831447f50..50831447f50 100644 --- a/lisp/gnus/kill-group.pbm +++ b/etc/images/gnus/kill-group.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/kill-group.xpm b/etc/images/gnus/kill-group.xpm index 1ee4fa42add..1ee4fa42add 100644 --- a/lisp/gnus/kill-group.xpm +++ b/etc/images/gnus/kill-group.xpm | |||
diff --git a/lisp/gnus/mail-reply.pbm b/etc/images/gnus/mail-reply.pbm index 9ca76596fb1..9ca76596fb1 100644 --- a/lisp/gnus/mail-reply.pbm +++ b/etc/images/gnus/mail-reply.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/mail-reply.xpm b/etc/images/gnus/mail-reply.xpm index a87f7846170..a87f7846170 100644 --- a/lisp/gnus/mail-reply.xpm +++ b/etc/images/gnus/mail-reply.xpm | |||
diff --git a/lisp/gnus/next-ur.pbm b/etc/images/gnus/next-ur.pbm index 678bbb09f8b..678bbb09f8b 100644 --- a/lisp/gnus/next-ur.pbm +++ b/etc/images/gnus/next-ur.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/next-ur.xpm b/etc/images/gnus/next-ur.xpm index bea13280b68..bea13280b68 100644 --- a/lisp/gnus/next-ur.xpm +++ b/etc/images/gnus/next-ur.xpm | |||
diff --git a/lisp/gnus/post.pbm b/etc/images/gnus/post.pbm index 577d6236bfd..577d6236bfd 100644 --- a/lisp/gnus/post.pbm +++ b/etc/images/gnus/post.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/post.xpm b/etc/images/gnus/post.xpm index 7a3eaa5e3b1..7a3eaa5e3b1 100644 --- a/lisp/gnus/post.xpm +++ b/etc/images/gnus/post.xpm | |||
diff --git a/lisp/gnus/prev-ur.pbm b/etc/images/gnus/prev-ur.pbm index 49389198bdf..49389198bdf 100644 --- a/lisp/gnus/prev-ur.pbm +++ b/etc/images/gnus/prev-ur.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/prev-ur.xpm b/etc/images/gnus/prev-ur.xpm index 80131332832..80131332832 100644 --- a/lisp/gnus/prev-ur.xpm +++ b/etc/images/gnus/prev-ur.xpm | |||
diff --git a/lisp/gnus/preview.xbm b/etc/images/gnus/preview.xbm index a42e153d5d2..a42e153d5d2 100644 --- a/lisp/gnus/preview.xbm +++ b/etc/images/gnus/preview.xbm | |||
diff --git a/lisp/gnus/preview.xpm b/etc/images/gnus/preview.xpm index f5743f91526..f5743f91526 100644 --- a/lisp/gnus/preview.xpm +++ b/etc/images/gnus/preview.xpm | |||
diff --git a/lisp/gnus/receipt.xpm b/etc/images/gnus/receipt.xpm index 18caaf1cf78..18caaf1cf78 100644 --- a/lisp/gnus/receipt.xpm +++ b/etc/images/gnus/receipt.xpm | |||
diff --git a/lisp/gnus/reply-wo.pbm b/etc/images/gnus/reply-wo.pbm index def54da8ede..def54da8ede 100644 --- a/lisp/gnus/reply-wo.pbm +++ b/etc/images/gnus/reply-wo.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/reply-wo.xpm b/etc/images/gnus/reply-wo.xpm index 370678af70d..370678af70d 100644 --- a/lisp/gnus/reply-wo.xpm +++ b/etc/images/gnus/reply-wo.xpm | |||
diff --git a/lisp/gnus/reply.pbm b/etc/images/gnus/reply.pbm index ee181e663be..ee181e663be 100644 --- a/lisp/gnus/reply.pbm +++ b/etc/images/gnus/reply.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/reply.xpm b/etc/images/gnus/reply.xpm index a45884803fe..a45884803fe 100644 --- a/lisp/gnus/reply.xpm +++ b/etc/images/gnus/reply.xpm | |||
diff --git a/lisp/gnus/reverse-smile.xpm b/etc/images/gnus/reverse-smile.xpm index 56db090e4b3..56db090e4b3 100644 --- a/lisp/gnus/reverse-smile.xpm +++ b/etc/images/gnus/reverse-smile.xpm | |||
diff --git a/lisp/gnus/rot13.pbm b/etc/images/gnus/rot13.pbm index 104246cdb8f..104246cdb8f 100644 --- a/lisp/gnus/rot13.pbm +++ b/etc/images/gnus/rot13.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/rot13.xpm b/etc/images/gnus/rot13.xpm index 6e2d7ac3ccf..6e2d7ac3ccf 100644 --- a/lisp/gnus/rot13.xpm +++ b/etc/images/gnus/rot13.xpm | |||
diff --git a/lisp/gnus/save-aif.pbm b/etc/images/gnus/save-aif.pbm index 15829c289e7..15829c289e7 100644 --- a/lisp/gnus/save-aif.pbm +++ b/etc/images/gnus/save-aif.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/save-aif.xpm b/etc/images/gnus/save-aif.xpm index f0325ac2fb9..f0325ac2fb9 100644 --- a/lisp/gnus/save-aif.xpm +++ b/etc/images/gnus/save-aif.xpm | |||
diff --git a/lisp/gnus/save-art.pbm b/etc/images/gnus/save-art.pbm index 68fe0cb3098..68fe0cb3098 100644 --- a/lisp/gnus/save-art.pbm +++ b/etc/images/gnus/save-art.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/save-art.xpm b/etc/images/gnus/save-art.xpm index fe9726fa3fe..fe9726fa3fe 100644 --- a/lisp/gnus/save-art.xpm +++ b/etc/images/gnus/save-art.xpm | |||
diff --git a/lisp/gnus/subscribe.pbm b/etc/images/gnus/subscribe.pbm index fe6b3920d36..fe6b3920d36 100644 --- a/lisp/gnus/subscribe.pbm +++ b/etc/images/gnus/subscribe.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/subscribe.xpm b/etc/images/gnus/subscribe.xpm index ff193a9e8ab..ff193a9e8ab 100644 --- a/lisp/gnus/subscribe.xpm +++ b/etc/images/gnus/subscribe.xpm | |||
diff --git a/lisp/gnus/unimportant.xpm b/etc/images/gnus/unimportant.xpm index 4298224e56c..4298224e56c 100644 --- a/lisp/gnus/unimportant.xpm +++ b/etc/images/gnus/unimportant.xpm | |||
diff --git a/lisp/gnus/unsubscribe.pbm b/etc/images/gnus/unsubscribe.pbm index 7d869fb53fe..7d869fb53fe 100644 --- a/lisp/gnus/unsubscribe.pbm +++ b/etc/images/gnus/unsubscribe.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/unsubscribe.xpm b/etc/images/gnus/unsubscribe.xpm index a91180d00f8..a91180d00f8 100644 --- a/lisp/gnus/unsubscribe.xpm +++ b/etc/images/gnus/unsubscribe.xpm | |||
diff --git a/lisp/gnus/uu-decode.pbm b/etc/images/gnus/uu-decode.pbm index 2b7fada1473..2b7fada1473 100644 --- a/lisp/gnus/uu-decode.pbm +++ b/etc/images/gnus/uu-decode.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/uu-decode.xpm b/etc/images/gnus/uu-decode.xpm index b9d940cc99e..b9d940cc99e 100644 --- a/lisp/gnus/uu-decode.xpm +++ b/etc/images/gnus/uu-decode.xpm | |||
diff --git a/lisp/gnus/uu-post.pbm b/etc/images/gnus/uu-post.pbm index a5face70980..a5face70980 100644 --- a/lisp/gnus/uu-post.pbm +++ b/etc/images/gnus/uu-post.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/uu-post.xpm b/etc/images/gnus/uu-post.xpm index 7c4204c6957..7c4204c6957 100644 --- a/lisp/gnus/uu-post.xpm +++ b/etc/images/gnus/uu-post.xpm | |||
diff --git a/lisp/gnus/blink.pbm b/etc/images/smilies/blink.pbm index 6c7531b92c6..6c7531b92c6 100644 --- a/lisp/gnus/blink.pbm +++ b/etc/images/smilies/blink.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/blink.xpm b/etc/images/smilies/blink.xpm index 5035122119f..5035122119f 100644 --- a/lisp/gnus/blink.xpm +++ b/etc/images/smilies/blink.xpm | |||
diff --git a/lisp/gnus/braindamaged.xpm b/etc/images/smilies/braindamaged.xpm index 25bd3e7bbee..25bd3e7bbee 100644 --- a/lisp/gnus/braindamaged.xpm +++ b/etc/images/smilies/braindamaged.xpm | |||
diff --git a/lisp/gnus/cry.xpm b/etc/images/smilies/cry.xpm index 8d8558dbc5b..8d8558dbc5b 100644 --- a/lisp/gnus/cry.xpm +++ b/etc/images/smilies/cry.xpm | |||
diff --git a/lisp/gnus/evil.xpm b/etc/images/smilies/evil.xpm index c364ac34ae1..c364ac34ae1 100644 --- a/lisp/gnus/evil.xpm +++ b/etc/images/smilies/evil.xpm | |||
diff --git a/lisp/gnus/forced.xpm b/etc/images/smilies/forced.xpm index 43ba8d2b502..43ba8d2b502 100644 --- a/lisp/gnus/forced.xpm +++ b/etc/images/smilies/forced.xpm | |||
diff --git a/lisp/gnus/frown.pbm b/etc/images/smilies/frown.pbm index f51ea4f3094..f51ea4f3094 100644 --- a/lisp/gnus/frown.pbm +++ b/etc/images/smilies/frown.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/frown.xpm b/etc/images/smilies/frown.xpm index 25ca99d11a2..25ca99d11a2 100644 --- a/lisp/gnus/frown.xpm +++ b/etc/images/smilies/frown.xpm | |||
diff --git a/lisp/gnus/grin.xpm b/etc/images/smilies/grin.xpm index 292cb1110e8..292cb1110e8 100644 --- a/lisp/gnus/grin.xpm +++ b/etc/images/smilies/grin.xpm | |||
diff --git a/lisp/gnus/indifferent.xpm b/etc/images/smilies/indifferent.xpm index 639523855a9..639523855a9 100644 --- a/lisp/gnus/indifferent.xpm +++ b/etc/images/smilies/indifferent.xpm | |||
diff --git a/lisp/gnus/sad.pbm b/etc/images/smilies/sad.pbm index 892e34352d7..892e34352d7 100644 --- a/lisp/gnus/sad.pbm +++ b/etc/images/smilies/sad.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/sad.xpm b/etc/images/smilies/sad.xpm index b0acef42a53..b0acef42a53 100644 --- a/lisp/gnus/sad.xpm +++ b/etc/images/smilies/sad.xpm | |||
diff --git a/lisp/gnus/smile.pbm b/etc/images/smilies/smile.pbm index f64e883498c..f64e883498c 100644 --- a/lisp/gnus/smile.pbm +++ b/etc/images/smilies/smile.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/smile.xpm b/etc/images/smilies/smile.xpm index 374d240a955..374d240a955 100644 --- a/lisp/gnus/smile.xpm +++ b/etc/images/smilies/smile.xpm | |||
diff --git a/lisp/gnus/wry.pbm b/etc/images/smilies/wry.pbm index 5fa5e9f2288..5fa5e9f2288 100644 --- a/lisp/gnus/wry.pbm +++ b/etc/images/smilies/wry.pbm | |||
| Binary files differ | |||
diff --git a/lisp/gnus/wry.xpm b/etc/images/smilies/wry.xpm index 8cd8dedce65..8cd8dedce65 100644 --- a/lisp/gnus/wry.xpm +++ b/etc/images/smilies/wry.xpm | |||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f4e50061105..39b29326077 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,127 @@ | |||
| 1 | 2005-02-18 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * ps-print.el (ps-font-info-database): New entry | ||
| 4 | ZapfChancery-MediumItalic with correct font name. Fix font name | ||
| 5 | of the entry Zapf-Chancery-MediumItalic. | ||
| 6 | |||
| 7 | 2005-02-16 Luc Teirlinck <teirllm@auburn.edu> | ||
| 8 | |||
| 9 | * autorevert.el (auto-revert-stop-on-user-input): Further doc fix. | ||
| 10 | |||
| 11 | 2005-02-16 Kim F. Storm <storm@cua.dk> | ||
| 12 | |||
| 13 | * ido.el (ido-fallback-command): Pass user input to fallback command. | ||
| 14 | |||
| 15 | 2005-02-16 Nick Roberts <nickrob@snap.net.nz> | ||
| 16 | |||
| 17 | * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers) | ||
| 18 | (gdb-find-file-hook): Add server prefix. | ||
| 19 | |||
| 20 | 2005-02-16 Richard M. Stallman <rms@gnu.org> | ||
| 21 | |||
| 22 | * replace.el (perform-replace): Pass new args to replace-highlight. | ||
| 23 | (replace-highlight): Take region args, | ||
| 24 | and pass them to isearch-lazy-highlight-new-loop. | ||
| 25 | |||
| 26 | * novice.el (disabled-command-hook): Autoload the defalias | ||
| 27 | and the make-obsolete-variable call. | ||
| 28 | |||
| 29 | * menu-bar.el (menu-bar-select-frame): FRAME defaults to selected. | ||
| 30 | |||
| 31 | * isearch.el (isearch-lazy-highlight-start-limit) | ||
| 32 | (isearch-lazy-highlight-end-limit): New variables limit | ||
| 33 | the region for highlighting. | ||
| 34 | (isearch-lazy-highlight-new-loop): New args BEG and END. | ||
| 35 | (isearch-lazy-highlight-search): Use the new vars. | ||
| 36 | (isearch-lazy-highlight-update): Likewise. | ||
| 37 | |||
| 38 | * dired.el (dired-build-subdir-alist): Bind buffer-undo-list to t. | ||
| 39 | |||
| 40 | * cus-start.el (all): Use default-boundp. | ||
| 41 | |||
| 42 | 2005-02-15 David Casperson <casper@unbc.ca> (tiny change) | ||
| 43 | |||
| 44 | * menu-bar.el (menu-bar-select-frame): Handle current frame. | ||
| 45 | |||
| 46 | 2005-02-15 Luc Teirlinck <teirllm@auburn.edu> | ||
| 47 | |||
| 48 | * autorevert.el (auto-revert-stop-on-user-input) | ||
| 49 | (auto-revert-verbose): Doc fixes. | ||
| 50 | |||
| 51 | 2005-02-15 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> | ||
| 52 | |||
| 53 | * international/mule-cmds.el (set-locale-environment): Remove call | ||
| 54 | to set-selection-coding-system on Windows. | ||
| 55 | |||
| 56 | 2005-02-15 Jay Belanger <belanger@truman.edu> | ||
| 57 | |||
| 58 | * calc/calc-alg.el: Add simplification rules for calcFunc-sec, | ||
| 59 | calcFunc-csc, calcFunc-cot, calcFunc-sech, calcFunc-csch and | ||
| 60 | calcFunc-coth. | ||
| 61 | (math-simplify-sqrt): Add simplifications. | ||
| 62 | |||
| 63 | * calc/calc-arith.el (math-real-if-arg-functions): Add functions | ||
| 64 | to list. | ||
| 65 | |||
| 66 | * calc/calc-ext.el: Add functions to autoloads. | ||
| 67 | |||
| 68 | * calc/calc-math.el (calc-sec, calc-csc, calc-cot, calc-sech) | ||
| 69 | (calc-csch, calc-coth, calcFunc-sec, calcFunc-csc, calcFunc-cot) | ||
| 70 | (calcFunc-sech, calcFunc-csch, calcFunc-coth, math-sec-raw) | ||
| 71 | (math-csc-raw, math-cot-raw): New functions. | ||
| 72 | |||
| 73 | * calc/calc-rules.el (calc-DistribRules, calc-NegateRules): Add rules. | ||
| 74 | |||
| 75 | * calc/calc-undo.el (calc-handle-undo): Remove prefix from | ||
| 76 | the variable name in a message. | ||
| 77 | |||
| 78 | * calc/calc-units.el: Add simplification rules for calcFunc-sec, | ||
| 79 | calcFunc-csc, calcFunc-cot. | ||
| 80 | |||
| 81 | * calc/calcalg2.el: Add derivative and integration rules for | ||
| 82 | calcFunc-sec, calcFunc-csc, calcFunc-cot, calcFunc-sech, | ||
| 83 | calcFunc-csch, calcFunc-coth. | ||
| 84 | (math-do-integral-methods): Add to checks for when to use | ||
| 85 | substitutions. | ||
| 86 | |||
| 87 | * calc/calccomp.el (math-eqn-special-funcs): Add functions to list. | ||
| 88 | |||
| 89 | 2005-02-15 Lute Kamstra <lute@gnu.org> | ||
| 90 | |||
| 91 | * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add | ||
| 92 | ;;;###autoload to `outline-regexp'. Suggested by Stefan Monnier | ||
| 93 | <monnier@iro.umontreal.ca> | ||
| 94 | (lisp-outline-level): Improve efficiency. Suggested by David | ||
| 95 | Kastrup <dak@gnu.org>. | ||
| 96 | |||
| 97 | 2005-02-15 Nick Roberts <nickrob@snap.net.nz> | ||
| 98 | |||
| 99 | * progmodes/gdb-ui.el (gdb-find-file-unhook): New variable. | ||
| 100 | (gdb-set-gud-minor-mode, gdb-set-gud-minor-mode-1) | ||
| 101 | (gdb-set-gud-minor-mode-existing-buffers): New functions. | ||
| 102 | (gdb-find-file-hook): New hook. Add it to find-file-hook. | ||
| 103 | (gdb-info-breakpoints-custom, gdb-source-info): Simplify. | ||
| 104 | |||
| 105 | 2005-02-14 Luc Teirlinck <teirllm@auburn.edu> | ||
| 106 | |||
| 107 | * cus-start.el (all): Comment change. | ||
| 108 | |||
| 109 | 2005-02-14 Lute Kamstra <lute@gnu.org> | ||
| 110 | |||
| 111 | * cus-start.el (all): Check if symbol is void. | ||
| 112 | |||
| 113 | 2005-02-14 Carsten Dominik <dominik@science.uva.nl> | ||
| 114 | |||
| 115 | * textmodes/reftex-cite.el (reftex-do-citation): Cleanup single | ||
| 116 | optional argument to \cite. | ||
| 117 | |||
| 118 | 2005-02-14 Richard M. Stallman <rms@gnu.org> | ||
| 119 | |||
| 120 | * cus-edit.el (custom-buffer-create-internal): Update help message. | ||
| 121 | (custom-magic-alist): Update help messages. | ||
| 122 | |||
| 123 | * cus-start.el (all): Allow a var to specify a standard value. | ||
| 124 | |||
| 1 | 2005-02-12 Luc Teirlinck <teirllm@auburn.edu> | 125 | 2005-02-12 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 126 | ||
| 3 | * custom.el (custom-theme-set-variables): Handle variable aliases. | 127 | * custom.el (custom-theme-set-variables): Handle variable aliases. |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 8f209d8c488..d4a3d10d167 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -150,12 +150,18 @@ next editing session." | |||
| 150 | (auto-revert-set-timer)))) | 150 | (auto-revert-set-timer)))) |
| 151 | 151 | ||
| 152 | (defcustom auto-revert-stop-on-user-input t | 152 | (defcustom auto-revert-stop-on-user-input t |
| 153 | "When non-nil Auto-Revert Mode stops checking files on user input." | 153 | "When non-nil, user input temporarily interrupts Auto-Revert Mode. |
| 154 | With this setting, Auto-Revert Mode checks for user input after | ||
| 155 | handling each buffer and does not process any further buffers | ||
| 156 | \(until the next run of the timer) if user input is available. | ||
| 157 | When nil, Auto-Revert Mode checks files and reverts buffers, | ||
| 158 | with quitting disabled, without paying attention to user input. | ||
| 159 | Thus, with this setting, Emacs might be non-responsive at times." | ||
| 154 | :group 'auto-revert | 160 | :group 'auto-revert |
| 155 | :type 'boolean) | 161 | :type 'boolean) |
| 156 | 162 | ||
| 157 | (defcustom auto-revert-verbose t | 163 | (defcustom auto-revert-verbose t |
| 158 | "When nil, Auto-Revert Mode will not generate any messages. | 164 | "When nil, Auto-Revert Mode does not generate any messages. |
| 159 | When non-nil, a message is generated whenever a file is reverted." | 165 | When non-nil, a message is generated whenever a file is reverted." |
| 160 | :group 'auto-revert | 166 | :group 'auto-revert |
| 161 | :type 'boolean) | 167 | :type 'boolean) |
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index 4901883d094..b722261907d 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el | |||
| @@ -746,6 +746,55 @@ | |||
| 746 | (list '* (list 'calcFunc-sin (list '* (1- n) a)) | 746 | (list '* (list 'calcFunc-sin (list '* (1- n) a)) |
| 747 | (list 'calcFunc-sin a)))))))) | 747 | (list 'calcFunc-sin a)))))))) |
| 748 | 748 | ||
| 749 | (math-defsimplify calcFunc-sec | ||
| 750 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) | ||
| 751 | (list 'calcFunc-sec (math-neg (nth 1 math-simplify-expr)))) | ||
| 752 | (and (eq calc-angle-mode 'rad) | ||
| 753 | (let ((n (math-linear-in (nth 1 math-simplify-expr) '(var pi var-pi)))) | ||
| 754 | (and n | ||
| 755 | (math-div 1 (math-known-sin (car n) (nth 1 n) 120 300))))) | ||
| 756 | (and (eq calc-angle-mode 'deg) | ||
| 757 | (let ((n (math-integer-plus (nth 1 math-simplify-expr)))) | ||
| 758 | (and n | ||
| 759 | (math-div 1 (math-known-sin (car n) (nth 1 n) '(frac 2 3) 300))))) | ||
| 760 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arcsin) | ||
| 761 | (math-div | ||
| 762 | 1 | ||
| 763 | (list 'calcFunc-sqrt | ||
| 764 | (math-sub 1 (math-sqr (nth 1 (nth 1 math-simplify-expr))))))) | ||
| 765 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arccos) | ||
| 766 | (math-div | ||
| 767 | 1 | ||
| 768 | (nth 1 (nth 1 math-simplify-expr)))) | ||
| 769 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arctan) | ||
| 770 | (list 'calcFunc-sqrt | ||
| 771 | (math-add 1 | ||
| 772 | (math-sqr (nth 1 (nth 1 math-simplify-expr)))))))) | ||
| 773 | |||
| 774 | (math-defsimplify calcFunc-csc | ||
| 775 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) | ||
| 776 | (math-neg (list 'calcFunc-csc (math-neg (nth 1 math-simplify-expr))))) | ||
| 777 | (and (eq calc-angle-mode 'rad) | ||
| 778 | (let ((n (math-linear-in (nth 1 math-simplify-expr) '(var pi var-pi)))) | ||
| 779 | (and n | ||
| 780 | (math-div 1 (math-known-sin (car n) (nth 1 n) 120 0))))) | ||
| 781 | (and (eq calc-angle-mode 'deg) | ||
| 782 | (let ((n (math-integer-plus (nth 1 math-simplify-expr)))) | ||
| 783 | (and n | ||
| 784 | (math-div 1 (math-known-sin (car n) (nth 1 n) '(frac 2 3) 0))))) | ||
| 785 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arcsin) | ||
| 786 | (math-div 1 (nth 1 (nth 1 math-simplify-expr)))) | ||
| 787 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arccos) | ||
| 788 | (math-div | ||
| 789 | 1 | ||
| 790 | (list 'calcFunc-sqrt (math-sub 1 (math-sqr | ||
| 791 | (nth 1 (nth 1 math-simplify-expr))))))) | ||
| 792 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arctan) | ||
| 793 | (math-div (list 'calcFunc-sqrt | ||
| 794 | (math-add 1 (math-sqr | ||
| 795 | (nth 1 (nth 1 math-simplify-expr))))) | ||
| 796 | (nth 1 (nth 1 math-simplify-expr)))))) | ||
| 797 | |||
| 749 | (defun math-should-expand-trig (x &optional hyperbolic) | 798 | (defun math-should-expand-trig (x &optional hyperbolic) |
| 750 | (let ((m (math-is-multiple x))) | 799 | (let ((m (math-is-multiple x))) |
| 751 | (and math-living-dangerously | 800 | (and math-living-dangerously |
| @@ -827,6 +876,28 @@ | |||
| 827 | (math-div (list 'calcFunc-sin (nth 1 math-simplify-expr)) | 876 | (math-div (list 'calcFunc-sin (nth 1 math-simplify-expr)) |
| 828 | (list 'calcFunc-cos (nth 1 math-simplify-expr)))))))) | 877 | (list 'calcFunc-cos (nth 1 math-simplify-expr)))))))) |
| 829 | 878 | ||
| 879 | (math-defsimplify calcFunc-cot | ||
| 880 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) | ||
| 881 | (math-neg (list 'calcFunc-cot (math-neg (nth 1 math-simplify-expr))))) | ||
| 882 | (and (eq calc-angle-mode 'rad) | ||
| 883 | (let ((n (math-linear-in (nth 1 math-simplify-expr) '(var pi var-pi)))) | ||
| 884 | (and n | ||
| 885 | (math-div 1 (math-known-tan (car n) (nth 1 n) 120))))) | ||
| 886 | (and (eq calc-angle-mode 'deg) | ||
| 887 | (let ((n (math-integer-plus (nth 1 math-simplify-expr)))) | ||
| 888 | (and n | ||
| 889 | (math-div 1 (math-known-tan (car n) (nth 1 n) '(frac 2 3)))))) | ||
| 890 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arcsin) | ||
| 891 | (math-div (list 'calcFunc-sqrt | ||
| 892 | (math-sub 1 (math-sqr (nth 1 (nth 1 math-simplify-expr))))) | ||
| 893 | (nth 1 (nth 1 math-simplify-expr)))) | ||
| 894 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arccos) | ||
| 895 | (math-div (nth 1 (nth 1 math-simplify-expr)) | ||
| 896 | (list 'calcFunc-sqrt | ||
| 897 | (math-sub 1 (math-sqr (nth 1 (nth 1 math-simplify-expr))))))) | ||
| 898 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arctan) | ||
| 899 | (math-div 1 (nth 1 (nth 1 math-simplify-expr)))))) | ||
| 900 | |||
| 830 | (defun math-known-tan (plus n mul) | 901 | (defun math-known-tan (plus n mul) |
| 831 | (setq n (math-mul n mul)) | 902 | (setq n (math-mul n mul)) |
| 832 | (and (math-num-integerp n) | 903 | (and (math-num-integerp n) |
| @@ -930,6 +1001,58 @@ | |||
| 930 | (math-div (list 'calcFunc-sinh (nth 1 math-simplify-expr)) | 1001 | (math-div (list 'calcFunc-sinh (nth 1 math-simplify-expr)) |
| 931 | (list 'calcFunc-cosh (nth 1 math-simplify-expr)))))))) | 1002 | (list 'calcFunc-cosh (nth 1 math-simplify-expr)))))))) |
| 932 | 1003 | ||
| 1004 | (math-defsimplify calcFunc-sech | ||
| 1005 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) | ||
| 1006 | (list 'calcFunc-sech (math-neg (nth 1 math-simplify-expr)))) | ||
| 1007 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arcsinh) | ||
| 1008 | math-living-dangerously | ||
| 1009 | (math-div | ||
| 1010 | 1 | ||
| 1011 | (list 'calcFunc-sqrt | ||
| 1012 | (math-add (math-sqr (nth 1 (nth 1 math-simplify-expr))) 1)))) | ||
| 1013 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arccosh) | ||
| 1014 | math-living-dangerously | ||
| 1015 | (math-div 1 (nth 1 (nth 1 math-simplify-expr))) 1) | ||
| 1016 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arctanh) | ||
| 1017 | math-living-dangerously | ||
| 1018 | (list 'calcFunc-sqrt | ||
| 1019 | (math-sub 1 (math-sqr (nth 1 (nth 1 math-simplify-expr)))))))) | ||
| 1020 | |||
| 1021 | (math-defsimplify calcFunc-csch | ||
| 1022 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) | ||
| 1023 | (math-neg (list 'calcFunc-csch (math-neg (nth 1 math-simplify-expr))))) | ||
| 1024 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arcsinh) | ||
| 1025 | math-living-dangerously | ||
| 1026 | (math-div 1 (nth 1 (nth 1 math-simplify-expr)))) | ||
| 1027 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arccosh) | ||
| 1028 | math-living-dangerously | ||
| 1029 | (math-div | ||
| 1030 | 1 | ||
| 1031 | (list 'calcFunc-sqrt | ||
| 1032 | (math-sub (math-sqr (nth 1 (nth 1 math-simplify-expr))) 1)))) | ||
| 1033 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arctanh) | ||
| 1034 | math-living-dangerously | ||
| 1035 | (math-div (list 'calcFunc-sqrt | ||
| 1036 | (math-sub 1 (math-sqr (nth 1 (nth 1 math-simplify-expr))))) | ||
| 1037 | (nth 1 (nth 1 math-simplify-expr)))))) | ||
| 1038 | |||
| 1039 | (math-defsimplify calcFunc-coth | ||
| 1040 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) | ||
| 1041 | (math-neg (list 'calcFunc-coth (math-neg (nth 1 math-simplify-expr))))) | ||
| 1042 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arcsinh) | ||
| 1043 | math-living-dangerously | ||
| 1044 | (math-div (list 'calcFunc-sqrt | ||
| 1045 | (math-add (math-sqr (nth 1 (nth 1 math-simplify-expr))) 1)) | ||
| 1046 | (nth 1 (nth 1 math-simplify-expr)))) | ||
| 1047 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arccosh) | ||
| 1048 | math-living-dangerously | ||
| 1049 | (math-div (nth 1 (nth 1 math-simplify-expr)) | ||
| 1050 | (list 'calcFunc-sqrt | ||
| 1051 | (math-sub (math-sqr (nth 1 (nth 1 math-simplify-expr))) 1)))) | ||
| 1052 | (and (eq (car-safe (nth 1 math-simplify-expr)) 'calcFunc-arctanh) | ||
| 1053 | math-living-dangerously | ||
| 1054 | (math-div 1 (nth 1 (nth 1 math-simplify-expr)))))) | ||
| 1055 | |||
| 933 | (math-defsimplify calcFunc-arcsin | 1056 | (math-defsimplify calcFunc-arcsin |
| 934 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) | 1057 | (or (and (math-looks-negp (nth 1 math-simplify-expr)) |
| 935 | (math-neg (list 'calcFunc-arcsin (math-neg (nth 1 math-simplify-expr))))) | 1058 | (math-neg (list 'calcFunc-arcsin (math-neg (nth 1 math-simplify-expr))))) |
| @@ -1043,8 +1166,13 @@ | |||
| 1043 | (math-equal-int (nth 2 a) 2) | 1166 | (math-equal-int (nth 2 a) 2) |
| 1044 | (or (and (eq (car-safe (nth 1 a)) 'calcFunc-sinh) | 1167 | (or (and (eq (car-safe (nth 1 a)) 'calcFunc-sinh) |
| 1045 | (list 'calcFunc-cosh (nth 1 (nth 1 a)))) | 1168 | (list 'calcFunc-cosh (nth 1 (nth 1 a)))) |
| 1169 | (and (eq (car-safe (nth 1 a)) 'calcFunc-csch) | ||
| 1170 | (list 'calcFunc-coth (nth 1 (nth 1 a)))) | ||
| 1046 | (and (eq (car-safe (nth 1 a)) 'calcFunc-tan) | 1171 | (and (eq (car-safe (nth 1 a)) 'calcFunc-tan) |
| 1047 | (list '/ 1 (list 'calcFunc-cos | 1172 | (list '/ 1 (list 'calcFunc-cos |
| 1173 | (nth 1 (nth 1 a))))) | ||
| 1174 | (and (eq (car-safe (nth 1 a)) 'calcFunc-cot) | ||
| 1175 | (list '/ 1 (list 'calcFunc-sin | ||
| 1048 | (nth 1 (nth 1 a))))))))) | 1176 | (nth 1 (nth 1 a))))))))) |
| 1049 | (and (eq (car-safe (nth 1 math-simplify-expr)) '^) | 1177 | (and (eq (car-safe (nth 1 math-simplify-expr)) '^) |
| 1050 | (list '^ | 1178 | (list '^ |
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index 3a436cb1d36..38c10f5cc9f 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el | |||
| @@ -70,9 +70,13 @@ | |||
| 70 | calcFunc-max calcFunc-min)) | 70 | calcFunc-max calcFunc-min)) |
| 71 | 71 | ||
| 72 | (defvar math-real-if-arg-functions '(calcFunc-sin calcFunc-cos | 72 | (defvar math-real-if-arg-functions '(calcFunc-sin calcFunc-cos |
| 73 | calcFunc-tan calcFunc-arctan | 73 | calcFunc-tan calcFunc-sec |
| 74 | calcFunc-csc calcFunc-cot | ||
| 75 | calcFunc-arctan | ||
| 74 | calcFunc-sinh calcFunc-cosh | 76 | calcFunc-sinh calcFunc-cosh |
| 75 | calcFunc-tanh calcFunc-exp | 77 | calcFunc-tanh calcFunc-sech |
| 78 | calcFunc-csch calcFunc-coth | ||
| 79 | calcFunc-exp | ||
| 76 | calcFunc-gamma calcFunc-fact)) | 80 | calcFunc-gamma calcFunc-fact)) |
| 77 | 81 | ||
| 78 | (defvar math-integer-functions '(calcFunc-idiv | 82 | (defvar math-integer-functions '(calcFunc-idiv |
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 374e89ec1f1..d4d50d64658 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el | |||
| @@ -801,13 +801,16 @@ math-mul-mat-vec math-mul-mats math-row-matrix) | |||
| 801 | 801 | ||
| 802 | ("calc-math" calcFunc-alog calcFunc-arccos | 802 | ("calc-math" calcFunc-alog calcFunc-arccos |
| 803 | calcFunc-arccosh calcFunc-arcsin calcFunc-arcsincos calcFunc-arcsinh | 803 | calcFunc-arccosh calcFunc-arcsin calcFunc-arcsincos calcFunc-arcsinh |
| 804 | calcFunc-arctan calcFunc-arctan2 calcFunc-arctanh calcFunc-cos | 804 | calcFunc-arctan calcFunc-arctan2 calcFunc-arctanh calcFunc-csc |
| 805 | calcFunc-cosh calcFunc-deg calcFunc-exp calcFunc-exp10 calcFunc-expm1 | 805 | calcFunc-csch calcFunc-cos calcFunc-cosh calcFunc-cot calcFunc-coth |
| 806 | calcFunc-deg calcFunc-exp calcFunc-exp10 calcFunc-expm1 | ||
| 806 | calcFunc-hypot calcFunc-ilog calcFunc-isqrt calcFunc-ln calcFunc-lnp1 | 807 | calcFunc-hypot calcFunc-ilog calcFunc-isqrt calcFunc-ln calcFunc-lnp1 |
| 807 | calcFunc-log calcFunc-log10 calcFunc-nroot calcFunc-rad calcFunc-sin | 808 | calcFunc-log calcFunc-log10 calcFunc-nroot calcFunc-rad calcFunc-sec |
| 809 | calcFunc-sech calcFunc-sin | ||
| 808 | calcFunc-sincos calcFunc-sinh calcFunc-sqr calcFunc-sqrt calcFunc-tan | 810 | calcFunc-sincos calcFunc-sinh calcFunc-sqr calcFunc-sqrt calcFunc-tan |
| 809 | calcFunc-tanh math-arccos-raw math-arcsin-raw math-arctan-raw | 811 | calcFunc-tanh math-arccos-raw math-arcsin-raw math-arctan-raw |
| 810 | math-arctan2-raw math-cos-raw math-exp-minus-1-raw math-exp-raw | 812 | math-arctan2-raw math-cos-raw math-cot-raw math-csc-raw |
| 813 | math-exp-minus-1-raw math-exp-raw | ||
| 811 | math-from-radians math-from-radians-2 math-hypot math-infinite-dir | 814 | math-from-radians math-from-radians-2 math-hypot math-infinite-dir |
| 812 | math-isqrt-small math-ln-raw math-nearly-equal math-nearly-equal-float | 815 | math-isqrt-small math-ln-raw math-nearly-equal math-nearly-equal-float |
| 813 | math-nearly-zerop math-nearly-zerop-float math-nth-root | 816 | math-nearly-zerop math-nearly-zerop-float math-nth-root |
| @@ -1008,9 +1011,11 @@ calc-map-equation calc-map-stack calc-outer-product calc-reduce) | |||
| 1008 | 1011 | ||
| 1009 | ("calc-math" calc-arccos calc-arccosh calc-arcsin calc-arcsinh | 1012 | ("calc-math" calc-arccos calc-arccosh calc-arcsin calc-arcsinh |
| 1010 | calc-arctan calc-arctan2 calc-arctanh calc-conj calc-cos calc-cosh | 1013 | calc-arctan calc-arctan2 calc-arctanh calc-conj calc-cos calc-cosh |
| 1014 | calc-cot calc-coth calc-csc calc-csch | ||
| 1011 | calc-degrees-mode calc-exp calc-expm1 calc-hypot calc-ilog | 1015 | calc-degrees-mode calc-exp calc-expm1 calc-hypot calc-ilog |
| 1012 | calc-imaginary calc-isqrt calc-ln calc-lnp1 calc-log calc-log10 | 1016 | calc-imaginary calc-isqrt calc-ln calc-lnp1 calc-log calc-log10 |
| 1013 | calc-pi calc-radians-mode calc-sin calc-sincos calc-sinh calc-sqrt | 1017 | calc-pi calc-radians-mode calc-sec calc-sech |
| 1018 | calc-sin calc-sincos calc-sinh calc-sqrt | ||
| 1014 | calc-tan calc-tanh calc-to-degrees calc-to-radians) | 1019 | calc-tan calc-tanh calc-to-degrees calc-to-radians) |
| 1015 | 1020 | ||
| 1016 | ("calc-mode" calc-alg-simplify-mode calc-algebraic-mode | 1021 | ("calc-mode" calc-alg-simplify-mode calc-algebraic-mode |
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 02c65ac22ea..d2c66c34d49 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el | |||
| @@ -144,6 +144,18 @@ | |||
| 144 | (calc-hyperbolic-func) | 144 | (calc-hyperbolic-func) |
| 145 | (calc-sin arg)) | 145 | (calc-sin arg)) |
| 146 | 146 | ||
| 147 | (defun calc-sec (arg) | ||
| 148 | (interactive "P") | ||
| 149 | (calc-slow-wrapper | ||
| 150 | (if (calc-is-hyperbolic) | ||
| 151 | (calc-unary-op "sech" 'calcFunc-sech arg) | ||
| 152 | (calc-unary-op "sec" 'calcFunc-sec arg)))) | ||
| 153 | |||
| 154 | (defun calc-sech (arg) | ||
| 155 | (interactive "P") | ||
| 156 | (calc-hyperbolic-func) | ||
| 157 | (calc-sec arg)) | ||
| 158 | |||
| 147 | (defun calc-cos (arg) | 159 | (defun calc-cos (arg) |
| 148 | (interactive "P") | 160 | (interactive "P") |
| 149 | (calc-slow-wrapper | 161 | (calc-slow-wrapper |
| @@ -171,6 +183,18 @@ | |||
| 171 | (calc-hyperbolic-func) | 183 | (calc-hyperbolic-func) |
| 172 | (calc-cos arg)) | 184 | (calc-cos arg)) |
| 173 | 185 | ||
| 186 | (defun calc-csc (arg) | ||
| 187 | (interactive "P") | ||
| 188 | (calc-slow-wrapper | ||
| 189 | (if (calc-is-hyperbolic) | ||
| 190 | (calc-unary-op "csch" 'calcFunc-csch arg) | ||
| 191 | (calc-unary-op "csc" 'calcFunc-csc arg)))) | ||
| 192 | |||
| 193 | (defun calc-csch (arg) | ||
| 194 | (interactive "P") | ||
| 195 | (calc-hyperbolic-func) | ||
| 196 | (calc-csc arg)) | ||
| 197 | |||
| 174 | (defun calc-sincos () | 198 | (defun calc-sincos () |
| 175 | (interactive) | 199 | (interactive) |
| 176 | (calc-slow-wrapper | 200 | (calc-slow-wrapper |
| @@ -205,6 +229,29 @@ | |||
| 205 | (calc-hyperbolic-func) | 229 | (calc-hyperbolic-func) |
| 206 | (calc-tan arg)) | 230 | (calc-tan arg)) |
| 207 | 231 | ||
| 232 | (defun calc-cot (arg) | ||
| 233 | (interactive "P") | ||
| 234 | (calc-slow-wrapper | ||
| 235 | (if (calc-is-hyperbolic) | ||
| 236 | (calc-unary-op "coth" 'calcFunc-coth arg) | ||
| 237 | (calc-unary-op "cot" 'calcFunc-cot arg)))) | ||
| 238 | |||
| 239 | (defun calc-arctan (arg) | ||
| 240 | (interactive "P") | ||
| 241 | (calc-invert-func) | ||
| 242 | (calc-tan arg)) | ||
| 243 | |||
| 244 | (defun calc-tanh (arg) | ||
| 245 | (interactive "P") | ||
| 246 | (calc-hyperbolic-func) | ||
| 247 | (calc-tan arg)) | ||
| 248 | |||
| 249 | (defun calc-arctanh (arg) | ||
| 250 | (interactive "P") | ||
| 251 | (calc-invert-func) | ||
| 252 | (calc-hyperbolic-func) | ||
| 253 | (calc-tan arg)) | ||
| 254 | |||
| 208 | (defun calc-arctan2 () | 255 | (defun calc-arctan2 () |
| 209 | (interactive) | 256 | (interactive) |
| 210 | (calc-slow-wrapper | 257 | (calc-slow-wrapper |
| @@ -220,8 +267,6 @@ | |||
| 220 | (calc-slow-wrapper | 267 | (calc-slow-wrapper |
| 221 | (calc-pop-push-record 1 "i*" (math-imaginary (calc-top-n 1))))) | 268 | (calc-pop-push-record 1 "i*" (math-imaginary (calc-top-n 1))))) |
| 222 | 269 | ||
| 223 | |||
| 224 | |||
| 225 | (defun calc-to-degrees (arg) | 270 | (defun calc-to-degrees (arg) |
| 226 | (interactive "P") | 271 | (interactive "P") |
| 227 | (calc-wrapper | 272 | (calc-wrapper |
| @@ -794,6 +839,169 @@ | |||
| 794 | (t (calc-record-why 'scalarp x) | 839 | (t (calc-record-why 'scalarp x) |
| 795 | (list 'calcFunc-tan x)))) | 840 | (list 'calcFunc-tan x)))) |
| 796 | 841 | ||
| 842 | (defun calcFunc-sec (x) | ||
| 843 | (cond ((and (integerp x) | ||
| 844 | (eq calc-angle-mode 'deg) | ||
| 845 | (= (% x 180) 0)) | ||
| 846 | (if (= (% x 360) 0) | ||
| 847 | 1 | ||
| 848 | -1)) | ||
| 849 | ((and (integerp x) | ||
| 850 | (eq calc-angle-mode 'rad) | ||
| 851 | (= x 0)) | ||
| 852 | 1) | ||
| 853 | ((Math-scalarp x) | ||
| 854 | (math-with-extra-prec 2 | ||
| 855 | (math-sec-raw (math-to-radians (math-float x))))) | ||
| 856 | ((eq (car x) 'sdev) | ||
| 857 | (if (math-constp x) | ||
| 858 | (math-with-extra-prec 2 | ||
| 859 | (let* ((xx (math-to-radians (math-float (nth 1 x)))) | ||
| 860 | (xs (math-to-radians (math-float (nth 2 x)))) | ||
| 861 | (sc (math-sin-cos-raw xx))) | ||
| 862 | (if (and (math-zerop (cdr sc)) | ||
| 863 | (not calc-infinite-mode)) | ||
| 864 | (progn | ||
| 865 | (calc-record-why "*Division by zero") | ||
| 866 | (list 'calcFunc-sec x)) | ||
| 867 | (math-make-sdev (math-div-float '(float 1 0) (cdr sc)) | ||
| 868 | (math-div-float | ||
| 869 | (math-mul xs (car sc)) | ||
| 870 | (math-sqr (cdr sc))))))) | ||
| 871 | (math-make-sdev (calcFunc-sec (nth 1 x)) | ||
| 872 | (math-div | ||
| 873 | (math-mul (nth 2 x) | ||
| 874 | (calcFunc-sin (nth 1 x))) | ||
| 875 | (math-sqr (calcFunc-cos (nth 1 x))))))) | ||
| 876 | ((and (eq (car x) 'intv) | ||
| 877 | (math-intv-constp x)) | ||
| 878 | (math-with-extra-prec 2 | ||
| 879 | (let* ((xx (math-to-radians (math-float x))) | ||
| 880 | (na (math-floor (math-div (math-sub (nth 2 xx) | ||
| 881 | (math-pi-over-2)) | ||
| 882 | (math-pi)))) | ||
| 883 | (nb (math-floor (math-div (math-sub (nth 3 xx) | ||
| 884 | (math-pi-over-2)) | ||
| 885 | (math-pi)))) | ||
| 886 | (naa (math-floor (math-div (nth 2 xx) (math-pi-over-2)))) | ||
| 887 | (nbb (math-floor (math-div (nth 3 xx) (math-pi-over-2)))) | ||
| 888 | (span (math-sub nbb naa))) | ||
| 889 | (if (not (equal na nb)) | ||
| 890 | '(intv 3 (neg (var inf var-inf)) (var inf var-inf)) | ||
| 891 | (let ((int (math-sort-intv (nth 1 x) | ||
| 892 | (math-sec-raw (nth 2 xx)) | ||
| 893 | (math-sec-raw (nth 3 xx))))) | ||
| 894 | (if (eq span 1) | ||
| 895 | (if (math-evenp (math-div (math-add naa 1) 2)) | ||
| 896 | (math-make-intv (logior (nth 1 int) 2) | ||
| 897 | 1 | ||
| 898 | (nth 3 int)) | ||
| 899 | (math-make-intv (logior (nth 1 int) 1) | ||
| 900 | (nth 2 int) | ||
| 901 | -1)) | ||
| 902 | int)))))) | ||
| 903 | ((equal x '(var nan var-nan)) | ||
| 904 | x) | ||
| 905 | (t (calc-record-why 'scalarp x) | ||
| 906 | (list 'calcFunc-sec x)))) | ||
| 907 | |||
| 908 | (defun calcFunc-csc (x) | ||
| 909 | (cond ((and (integerp x) | ||
| 910 | (eq calc-angle-mode 'deg) | ||
| 911 | (= (% (- x 90) 180) 0)) | ||
| 912 | (if (= (% (- x 90) 360) 0) | ||
| 913 | 1 | ||
| 914 | -1)) | ||
| 915 | ((Math-scalarp x) | ||
| 916 | (math-with-extra-prec 2 | ||
| 917 | (math-csc-raw (math-to-radians (math-float x))))) | ||
| 918 | ((eq (car x) 'sdev) | ||
| 919 | (if (math-constp x) | ||
| 920 | (math-with-extra-prec 2 | ||
| 921 | (let* ((xx (math-to-radians (math-float (nth 1 x)))) | ||
| 922 | (xs (math-to-radians (math-float (nth 2 x)))) | ||
| 923 | (sc (math-sin-cos-raw xx))) | ||
| 924 | (if (and (math-zerop (car sc)) | ||
| 925 | (not calc-infinite-mode)) | ||
| 926 | (progn | ||
| 927 | (calc-record-why "*Division by zero") | ||
| 928 | (list 'calcFunc-csc x)) | ||
| 929 | (math-make-sdev (math-div-float '(float 1 0) (car sc)) | ||
| 930 | (math-div-float | ||
| 931 | (math-mul xs (cdr sc)) | ||
| 932 | (math-sqr (car sc))))))) | ||
| 933 | (math-make-sdev (calcFunc-csc (nth 1 x)) | ||
| 934 | (math-div | ||
| 935 | (math-mul (nth 2 x) | ||
| 936 | (calcFunc-cos (nth 1 x))) | ||
| 937 | (math-sqr (calcFunc-sin (nth 1 x))))))) | ||
| 938 | ((and (eq (car x) 'intv) | ||
| 939 | (math-intv-constp x)) | ||
| 940 | (math-with-extra-prec 2 | ||
| 941 | (let* ((xx (math-to-radians (math-float x))) | ||
| 942 | (na (math-floor (math-div (nth 2 xx) (math-pi)))) | ||
| 943 | (nb (math-floor (math-div (nth 3 xx) (math-pi)))) | ||
| 944 | (naa (math-floor (math-div (nth 2 xx) (math-pi-over-2)))) | ||
| 945 | (nbb (math-floor (math-div (nth 3 xx) (math-pi-over-2)))) | ||
| 946 | (span (math-sub nbb naa))) | ||
| 947 | (if (not (equal na nb)) | ||
| 948 | '(intv 3 (neg (var inf var-inf)) (var inf var-inf)) | ||
| 949 | (let ((int (math-sort-intv (nth 1 x) | ||
| 950 | (math-csc-raw (nth 2 xx)) | ||
| 951 | (math-csc-raw (nth 3 xx))))) | ||
| 952 | (if (eq span 1) | ||
| 953 | (if (math-evenp (math-div naa 2)) | ||
| 954 | (math-make-intv (logior (nth 1 int) 2) | ||
| 955 | 1 | ||
| 956 | (nth 3 int)) | ||
| 957 | (math-make-intv (logior (nth 1 int) 1) | ||
| 958 | (nth 2 int) | ||
| 959 | -1)) | ||
| 960 | int)))))) | ||
| 961 | ((equal x '(var nan var-nan)) | ||
| 962 | x) | ||
| 963 | (t (calc-record-why 'scalarp x) | ||
| 964 | (list 'calcFunc-csc x)))) | ||
| 965 | |||
| 966 | (defun calcFunc-cot (x) ; [N N] [Public] | ||
| 967 | (cond ((and (integerp x) | ||
| 968 | (if (eq calc-angle-mode 'deg) | ||
| 969 | (= (% (- x 90) 180) 0) | ||
| 970 | (= x 0))) | ||
| 971 | 0) | ||
| 972 | ((Math-scalarp x) | ||
| 973 | (math-with-extra-prec 2 | ||
| 974 | (math-cot-raw (math-to-radians (math-float x))))) | ||
| 975 | ((eq (car x) 'sdev) | ||
| 976 | (if (math-constp x) | ||
| 977 | (math-with-extra-prec 2 | ||
| 978 | (let* ((xx (math-to-radians (math-float (nth 1 x)))) | ||
| 979 | (xs (math-to-radians (math-float (nth 2 x)))) | ||
| 980 | (sc (math-sin-cos-raw xx))) | ||
| 981 | (if (and (math-zerop (car sc)) (not calc-infinite-mode)) | ||
| 982 | (progn | ||
| 983 | (calc-record-why "*Division by zero") | ||
| 984 | (list 'calcFunc-cot x)) | ||
| 985 | (math-make-sdev (math-div-float (cdr sc) (car sc)) | ||
| 986 | (math-div-float xs (math-sqr (car sc))))))) | ||
| 987 | (math-make-sdev (calcFunc-cot (nth 1 x)) | ||
| 988 | (math-div (nth 2 x) | ||
| 989 | (math-sqr (calcFunc-sin (nth 1 x))))))) | ||
| 990 | ((and (eq (car x) 'intv) (math-intv-constp x)) | ||
| 991 | (or (math-with-extra-prec 2 | ||
| 992 | (let* ((xx (math-to-radians (math-float x))) | ||
| 993 | (na (math-floor (math-div (nth 2 xx) (math-pi)))) | ||
| 994 | (nb (math-floor (math-div (nth 3 xx) (math-pi)))) | ||
| 995 | (and (equal na nb) | ||
| 996 | (math-sort-intv (nth 1 x) | ||
| 997 | (math-cot-raw (nth 2 xx)) | ||
| 998 | (math-cot-raw (nth 3 xx))))))) | ||
| 999 | '(intv 3 (neg (var inf var-inf)) (var inf var-inf)))) | ||
| 1000 | ((equal x '(var nan var-nan)) | ||
| 1001 | x) | ||
| 1002 | (t (calc-record-why 'scalarp x) | ||
| 1003 | (list 'calcFunc-cot x)))) | ||
| 1004 | |||
| 797 | (defun math-sin-raw (x) ; [N N] | 1005 | (defun math-sin-raw (x) ; [N N] |
| 798 | (cond ((eq (car x) 'cplx) | 1006 | (cond ((eq (car x) 'cplx) |
| 799 | (let* ((expx (math-exp-raw (nth 2 x))) | 1007 | (let* ((expx (math-exp-raw (nth 2 x))) |
| @@ -819,6 +1027,85 @@ | |||
| 819 | (math-polar (math-cos-raw (math-complex x))) | 1027 | (math-polar (math-cos-raw (math-complex x))) |
| 820 | (math-sin-raw (math-sub (math-pi-over-2) x)))) | 1028 | (math-sin-raw (math-sub (math-pi-over-2) x)))) |
| 821 | 1029 | ||
| 1030 | (defun math-sec-raw (x) ; [N N] | ||
| 1031 | (cond ((eq (car x) 'cplx) | ||
| 1032 | (let* ((x (math-mul x '(float 1 0))) | ||
| 1033 | (expx (math-exp-raw (nth 2 x))) | ||
| 1034 | (expmx (math-div-float '(float 1 0) expx)) | ||
| 1035 | (sh (math-mul-float (math-sub-float expx expmx) '(float 5 -1))) | ||
| 1036 | (ch (math-mul-float (math-add-float expx expmx) '(float 5 -1))) | ||
| 1037 | (sc (math-sin-cos-raw (nth 1 x))) | ||
| 1038 | (d (math-add-float | ||
| 1039 | (math-mul-float (math-sqr (car sc)) | ||
| 1040 | (math-sqr sh)) | ||
| 1041 | (math-mul-float (math-sqr (cdr sc)) | ||
| 1042 | (math-sqr ch))))) | ||
| 1043 | (and (not (eq (nth 1 d) 0)) | ||
| 1044 | (list 'cplx | ||
| 1045 | (math-div-float (math-mul-float (cdr sc) ch) d) | ||
| 1046 | (math-div-float (math-mul-float (car sc) sh) d))))) | ||
| 1047 | ((eq (car x) 'polar) | ||
| 1048 | (math-polar (math-sec-raw (math-complex x)))) | ||
| 1049 | (t | ||
| 1050 | (let ((cs (math-cos-raw x))) | ||
| 1051 | (if (eq cs 0) | ||
| 1052 | (math-div 1 0) | ||
| 1053 | (math-div-float '(float 1 0) cs)))))) | ||
| 1054 | |||
| 1055 | (defun math-csc-raw (x) ; [N N] | ||
| 1056 | (cond ((eq (car x) 'cplx) | ||
| 1057 | (let* ((x (math-mul x '(float 1 0))) | ||
| 1058 | (expx (math-exp-raw (nth 2 x))) | ||
| 1059 | (expmx (math-div-float '(float 1 0) expx)) | ||
| 1060 | (sh (math-mul-float (math-sub-float expx expmx) '(float 5 -1))) | ||
| 1061 | (ch (math-mul-float (math-add-float expx expmx) '(float 5 -1))) | ||
| 1062 | (sc (math-sin-cos-raw (nth 1 x))) | ||
| 1063 | (d (math-add-float | ||
| 1064 | (math-mul-float (math-sqr (car sc)) | ||
| 1065 | (math-sqr ch)) | ||
| 1066 | (math-mul-float (math-sqr (cdr sc)) | ||
| 1067 | (math-sqr sh))))) | ||
| 1068 | (and (not (eq (nth 1 d) 0)) | ||
| 1069 | (list 'cplx | ||
| 1070 | (math-div-float (math-mul-float (car sc) ch) d) | ||
| 1071 | (math-div-float (math-mul-float (cdr sc) sh) d))))) | ||
| 1072 | ((eq (car x) 'polar) | ||
| 1073 | (math-polar (math-csc-raw (math-complex x)))) | ||
| 1074 | (t | ||
| 1075 | (let ((sn (math-sin-raw x))) | ||
| 1076 | (if (eq sn 0) | ||
| 1077 | (math-div 1 0) | ||
| 1078 | (math-div-float '(float 1 0) sn)))))) | ||
| 1079 | |||
| 1080 | (defun math-cot-raw (x) ; [N N] | ||
| 1081 | (cond ((eq (car x) 'cplx) | ||
| 1082 | (let* ((x (math-mul x '(float 1 0))) | ||
| 1083 | (expx (math-exp-raw (nth 2 x))) | ||
| 1084 | (expmx (math-div-float '(float 1 0) expx)) | ||
| 1085 | (sh (math-mul-float (math-sub-float expx expmx) '(float 5 -1))) | ||
| 1086 | (ch (math-mul-float (math-add-float expx expmx) '(float 5 -1))) | ||
| 1087 | (sc (math-sin-cos-raw (nth 1 x))) | ||
| 1088 | (d (math-add-float | ||
| 1089 | (math-sqr (car sc)) | ||
| 1090 | (math-sqr sh)))) | ||
| 1091 | (and (not (eq (nth 1 d) 0)) | ||
| 1092 | (list 'cplx | ||
| 1093 | (math-div-float | ||
| 1094 | (math-mul-float (car sc) (cdr sc)) | ||
| 1095 | d) | ||
| 1096 | (math-neg | ||
| 1097 | (math-div-float | ||
| 1098 | (math-mul-float sh ch) | ||
| 1099 | d)))))) | ||
| 1100 | ((eq (car x) 'polar) | ||
| 1101 | (math-polar (math-cot-raw (math-complex x)))) | ||
| 1102 | (t | ||
| 1103 | (let ((sc (math-sin-cos-raw x))) | ||
| 1104 | (if (eq (nth 1 (car sc)) 0) | ||
| 1105 | (math-div (cdr sc) 0) | ||
| 1106 | (math-div-float (cdr sc) (car sc))))))) | ||
| 1107 | |||
| 1108 | |||
| 822 | ;;; This could use a smarter method: Reduce x as in math-sin-raw, then | 1109 | ;;; This could use a smarter method: Reduce x as in math-sin-raw, then |
| 823 | ;;; compute either sin(x) or cos(x), whichever is smaller, and compute | 1110 | ;;; compute either sin(x) or cos(x), whichever is smaller, and compute |
| 824 | ;;; the other using the identity sin(x)^2 + cos(x)^2 = 1. | 1111 | ;;; the other using the identity sin(x)^2 + cos(x)^2 = 1. |
| @@ -1537,6 +1824,104 @@ | |||
| 1537 | (list 'calcFunc-tanh x)))) | 1824 | (list 'calcFunc-tanh x)))) |
| 1538 | (put 'calcFunc-tanh 'math-expandable t) | 1825 | (put 'calcFunc-tanh 'math-expandable t) |
| 1539 | 1826 | ||
| 1827 | (defun calcFunc-sech (x) ; [N N] [Public] | ||
| 1828 | (cond ((eq x 0) 1) | ||
| 1829 | (math-expand-formulas | ||
| 1830 | (math-normalize | ||
| 1831 | (list '/ 2 (list '+ (list 'calcFunc-exp x) | ||
| 1832 | (list 'calcFunc-exp (list 'neg x)))))) | ||
| 1833 | ((Math-numberp x) | ||
| 1834 | (if calc-symbolic-mode (signal 'inexact-result nil)) | ||
| 1835 | (math-with-extra-prec 2 | ||
| 1836 | (let ((expx (math-exp-raw (math-float x)))) | ||
| 1837 | (math-div '(float 2 0) (math-add expx (math-div 1 expx)))))) | ||
| 1838 | ((eq (car-safe x) 'sdev) | ||
| 1839 | (math-make-sdev (calcFunc-sech (nth 1 x)) | ||
| 1840 | (math-mul (nth 2 x) | ||
| 1841 | (math-mul (calcFunc-sech (nth 1 x)) | ||
| 1842 | (calcFunc-tanh (nth 1 x)))))) | ||
| 1843 | ((and (eq (car x) 'intv) (math-intv-constp x)) | ||
| 1844 | (setq x (math-abs x)) | ||
| 1845 | (math-sort-intv (nth 1 x) | ||
| 1846 | (calcFunc-sech (nth 2 x)) | ||
| 1847 | (calcFunc-sech (nth 3 x)))) | ||
| 1848 | ((or (equal x '(var inf var-inf)) | ||
| 1849 | (equal x '(neg (var inf var-inf)))) | ||
| 1850 | 0) | ||
| 1851 | ((equal x '(var nan var-nan)) | ||
| 1852 | x) | ||
| 1853 | (t (calc-record-why 'numberp x) | ||
| 1854 | (list 'calcFunc-sech x)))) | ||
| 1855 | (put 'calcFunc-sech 'math-expandable t) | ||
| 1856 | |||
| 1857 | (defun calcFunc-csch (x) ; [N N] [Public] | ||
| 1858 | (cond ((eq x 0) (math-div 1 0)) | ||
| 1859 | (math-expand-formulas | ||
| 1860 | (math-normalize | ||
| 1861 | (list '/ 2 (list '- (list 'calcFunc-exp x) | ||
| 1862 | (list 'calcFunc-exp (list 'neg x)))))) | ||
| 1863 | ((Math-numberp x) | ||
| 1864 | (if calc-symbolic-mode (signal 'inexact-result nil)) | ||
| 1865 | (math-with-extra-prec 2 | ||
| 1866 | (let ((expx (math-exp-raw (math-float x)))) | ||
| 1867 | (math-div '(float 2 0) (math-add expx (math-div -1 expx)))))) | ||
| 1868 | ((eq (car-safe x) 'sdev) | ||
| 1869 | (math-make-sdev (calcFunc-csch (nth 1 x)) | ||
| 1870 | (math-mul (nth 2 x) | ||
| 1871 | (math-mul (calcFunc-csch (nth 1 x)) | ||
| 1872 | (calcFunc-coth (nth 1 x)))))) | ||
| 1873 | ((eq (car x) 'intv) | ||
| 1874 | (if (and (Math-negp (nth 2 x)) | ||
| 1875 | (Math-posp (nth 3 x))) | ||
| 1876 | '(intv 3 (neg (var inf var-inf)) (var inf var-inf)) | ||
| 1877 | (math-sort-intv (nth 1 x) | ||
| 1878 | (calcFunc-csch (nth 2 x)) | ||
| 1879 | (calcFunc-csch (nth 3 x))))) | ||
| 1880 | ((or (equal x '(var inf var-inf)) | ||
| 1881 | (equal x '(neg (var inf var-inf)))) | ||
| 1882 | 0) | ||
| 1883 | ((equal x '(var nan var-nan)) | ||
| 1884 | x) | ||
| 1885 | (t (calc-record-why 'numberp x) | ||
| 1886 | (list 'calcFunc-csch x)))) | ||
| 1887 | (put 'calcFunc-csch 'math-expandable t) | ||
| 1888 | |||
| 1889 | (defun calcFunc-coth (x) ; [N N] [Public] | ||
| 1890 | (cond ((eq x 0) (math-div 1 0)) | ||
| 1891 | (math-expand-formulas | ||
| 1892 | (math-normalize | ||
| 1893 | (let ((expx (list 'calcFunc-exp x)) | ||
| 1894 | (expmx (list 'calcFunc-exp (list 'neg x)))) | ||
| 1895 | (math-normalize | ||
| 1896 | (list '/ (list '+ expx expmx) (list '- expx expmx)))))) | ||
| 1897 | ((Math-numberp x) | ||
| 1898 | (if calc-symbolic-mode (signal 'inexact-result nil)) | ||
| 1899 | (math-with-extra-prec 2 | ||
| 1900 | (let* ((expx (calcFunc-exp (math-float x))) | ||
| 1901 | (expmx (math-div 1 expx))) | ||
| 1902 | (math-div (math-add expx expmx) | ||
| 1903 | (math-sub expx expmx))))) | ||
| 1904 | ((eq (car-safe x) 'sdev) | ||
| 1905 | (math-make-sdev (calcFunc-coth (nth 1 x)) | ||
| 1906 | (math-div (nth 2 x) | ||
| 1907 | (math-sqr (calcFunc-sinh (nth 1 x)))))) | ||
| 1908 | ((eq (car x) 'intv) | ||
| 1909 | (if (and (Math-negp (nth 2 x)) | ||
| 1910 | (Math-posp (nth 3 x))) | ||
| 1911 | '(intv 3 (neg (var inf var-inf)) (var inf var-inf)) | ||
| 1912 | (math-sort-intv (nth 1 x) | ||
| 1913 | (calcFunc-coth (nth 2 x)) | ||
| 1914 | (calcFunc-coth (nth 3 x))))) | ||
| 1915 | ((equal x '(var inf var-inf)) | ||
| 1916 | 1) | ||
| 1917 | ((equal x '(neg (var inf var-inf))) | ||
| 1918 | -1) | ||
| 1919 | ((equal x '(var nan var-nan)) | ||
| 1920 | x) | ||
| 1921 | (t (calc-record-why 'numberp x) | ||
| 1922 | (list 'calcFunc-coth x)))) | ||
| 1923 | (put 'calcFunc-coth 'math-expandable t) | ||
| 1924 | |||
| 1540 | (defun calcFunc-arcsinh (x) ; [N N] [Public] | 1925 | (defun calcFunc-arcsinh (x) ; [N N] [Public] |
| 1541 | (cond ((eq x 0) 0) | 1926 | (cond ((eq x 0) 0) |
| 1542 | (math-expand-formulas | 1927 | (math-expand-formulas |
diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el index 1ccbf3fffac..7a11cfa5012 100644 --- a/lisp/calc/calc-rules.el +++ b/lisp/calc/calc-rules.el | |||
| @@ -153,10 +153,14 @@ tan(select(2 a)) := 2 tan(select(a)) / (1 - tan(a)^2), | |||
| 153 | tan(select(n a)) := (tan((n-1) select(a)) + tan(a)) / | 153 | tan(select(n a)) := (tan((n-1) select(a)) + tan(a)) / |
| 154 | (1 - tan((n-1) a) tan(a)) | 154 | (1 - tan((n-1) a) tan(a)) |
| 155 | :: integer(n) :: n > 2, | 155 | :: integer(n) :: n > 2, |
| 156 | cot(select(a + b)) := (cot(select(a)) cot(b) - 1) / | ||
| 157 | (cot(a) + cot(b)), | ||
| 156 | sinh(select(a + b)) := sinh(select(a)) cosh(b) + cosh(a) sinh(b), | 158 | sinh(select(a + b)) := sinh(select(a)) cosh(b) + cosh(a) sinh(b), |
| 157 | cosh(select(a + b)) := cosh(select(a)) cosh(b) + sinh(a) sinh(b), | 159 | cosh(select(a + b)) := cosh(select(a)) cosh(b) + sinh(a) sinh(b), |
| 158 | tanh(select(a + b)) := (tanh(select(a)) + tanh(b)) / | 160 | tanh(select(a + b)) := (tanh(select(a)) + tanh(b)) / |
| 159 | (1 + tanh(a) tanh(b)), | 161 | (1 + tanh(a) tanh(b)), |
| 162 | coth(select(a + b)) := (coth(select(a)) coth(b) + 1) / | ||
| 163 | (coth(a) + coth(b)), | ||
| 160 | x && select(a || b) := (x && select(a)) || (x && b), | 164 | x && select(a || b) := (x && select(a)) || (x && b), |
| 161 | select(a || b) && x := (select(a) && x) || (b && x), | 165 | select(a || b) && x := (select(a) && x) || (b && x), |
| 162 | ! select(a && b) := (!a) || (!b), | 166 | ! select(a && b) := (!a) || (!b), |
| @@ -269,12 +273,18 @@ exp(select(x)) := 1 / exp(select(-x)), | |||
| 269 | sin(select(x)) := -sin(select(-x)), | 273 | sin(select(x)) := -sin(select(-x)), |
| 270 | cos(select(x)) := cos(select(-x)), | 274 | cos(select(x)) := cos(select(-x)), |
| 271 | tan(select(x)) := -tan(select(-x)), | 275 | tan(select(x)) := -tan(select(-x)), |
| 276 | sec(select(x)) := sec(select(-x)), | ||
| 277 | csc(select(x)) := -csc(select(-x)), | ||
| 278 | cot(select(x)) := -cot(select(-x)), | ||
| 272 | arcsin(select(x)) := -arcsin(select(-x)), | 279 | arcsin(select(x)) := -arcsin(select(-x)), |
| 273 | arccos(select(x)) := 4 arctan(1) - arccos(select(-x)), | 280 | arccos(select(x)) := 4 arctan(1) - arccos(select(-x)), |
| 274 | arctan(select(x)) := -arctan(select(-x)), | 281 | arctan(select(x)) := -arctan(select(-x)), |
| 275 | sinh(select(x)) := -sinh(select(-x)), | 282 | sinh(select(x)) := -sinh(select(-x)), |
| 276 | cosh(select(x)) := cosh(select(-x)), | 283 | cosh(select(x)) := cosh(select(-x)), |
| 277 | tanh(select(x)) := -tanh(select(-x)), | 284 | tanh(select(x)) := -tanh(select(-x)), |
| 285 | sech(select(x)) := sech(select(-x)), | ||
| 286 | csch(select(x)) := -csch(select(-x)), | ||
| 287 | coth(select(x)) := -coth(select(-x)), | ||
| 278 | arcsinh(select(x)) := -arcsinh(select(-x)), | 288 | arcsinh(select(x)) := -arcsinh(select(-x)), |
| 279 | arctanh(select(x)) := -arctanh(select(-x)), | 289 | arctanh(select(x)) := -arctanh(select(-x)), |
| 280 | select(x) = a := select(-x) = -a, | 290 | select(x) = a := select(-x) = -a, |
diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el index a49c34010ab..d946a1390d3 100644 --- a/lisp/calc/calc-undo.el +++ b/lisp/calc/calc-undo.el | |||
| @@ -77,7 +77,8 @@ | |||
| 77 | (let ((v (intern (nth 1 action)))) | 77 | (let ((v (intern (nth 1 action)))) |
| 78 | (calc-record-undo (list 'store (nth 1 action) | 78 | (calc-record-undo (list 'store (nth 1 action) |
| 79 | (and (boundp v) (symbol-value v)))) | 79 | (and (boundp v) (symbol-value v)))) |
| 80 | (if (y-or-n-p (format "Un-store variable %s? " (nth 1 action))) | 80 | (if (y-or-n-p (format "Un-store variable %s? " |
| 81 | (calc-var-name (nth 1 action)))) | ||
| 81 | (progn | 82 | (progn |
| 82 | (if (nth 2 action) | 83 | (if (nth 2 action) |
| 83 | (set v (nth 2 action)) | 84 | (set v (nth 2 action)) |
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index e8a3abfe958..4b3c284ddad 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el | |||
| @@ -1241,6 +1241,45 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).") | |||
| 1241 | (eq (nth 1 (nth 2 rad)) 'rad) | 1241 | (eq (nth 1 (nth 2 rad)) 'rad) |
| 1242 | (list 'calcFunc-tan (nth 1 rad)))))) | 1242 | (list 'calcFunc-tan (nth 1 rad)))))) |
| 1243 | 1243 | ||
| 1244 | (math-defsimplify calcFunc-sec | ||
| 1245 | (and math-simplifying-units | ||
| 1246 | (math-units-in-expr-p (nth 1 math-simplify-expr) nil) | ||
| 1247 | (let ((rad (math-simplify-units | ||
| 1248 | (math-evaluate-expr | ||
| 1249 | (math-to-standard-units (nth 1 math-simplify-expr) nil)))) | ||
| 1250 | (calc-angle-mode 'rad)) | ||
| 1251 | (and (eq (car-safe rad) '*) | ||
| 1252 | (math-realp (nth 1 rad)) | ||
| 1253 | (eq (car-safe (nth 2 rad)) 'var) | ||
| 1254 | (eq (nth 1 (nth 2 rad)) 'rad) | ||
| 1255 | (list 'calcFunc-sec (nth 1 rad)))))) | ||
| 1256 | |||
| 1257 | (math-defsimplify calcFunc-csc | ||
| 1258 | (and math-simplifying-units | ||
| 1259 | (math-units-in-expr-p (nth 1 math-simplify-expr) nil) | ||
| 1260 | (let ((rad (math-simplify-units | ||
| 1261 | (math-evaluate-expr | ||
| 1262 | (math-to-standard-units (nth 1 math-simplify-expr) nil)))) | ||
| 1263 | (calc-angle-mode 'rad)) | ||
| 1264 | (and (eq (car-safe rad) '*) | ||
| 1265 | (math-realp (nth 1 rad)) | ||
| 1266 | (eq (car-safe (nth 2 rad)) 'var) | ||
| 1267 | (eq (nth 1 (nth 2 rad)) 'rad) | ||
| 1268 | (list 'calcFunc-csc (nth 1 rad)))))) | ||
| 1269 | |||
| 1270 | (math-defsimplify calcFunc-cot | ||
| 1271 | (and math-simplifying-units | ||
| 1272 | (math-units-in-expr-p (nth 1 math-simplify-expr) nil) | ||
| 1273 | (let ((rad (math-simplify-units | ||
| 1274 | (math-evaluate-expr | ||
| 1275 | (math-to-standard-units (nth 1 math-simplify-expr) nil)))) | ||
| 1276 | (calc-angle-mode 'rad)) | ||
| 1277 | (and (eq (car-safe rad) '*) | ||
| 1278 | (math-realp (nth 1 rad)) | ||
| 1279 | (eq (car-safe (nth 2 rad)) 'var) | ||
| 1280 | (eq (nth 1 (nth 2 rad)) 'rad) | ||
| 1281 | (list 'calcFunc-cot (nth 1 rad)))))) | ||
| 1282 | |||
| 1244 | 1283 | ||
| 1245 | (defun math-remove-units (expr) | 1284 | (defun math-remove-units (expr) |
| 1246 | (if (math-check-unit-name expr) | 1285 | (if (math-check-unit-name expr) |
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 18b6c1328d7..d5a9009c1ac 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el | |||
| @@ -412,6 +412,30 @@ | |||
| 412 | (math-normalize | 412 | (math-normalize |
| 413 | (list 'calcFunc-cos u)))))))) | 413 | (list 'calcFunc-cos u)))))))) |
| 414 | 414 | ||
| 415 | (put 'calcFunc-sec\' 'math-derivative-1 | ||
| 416 | (function (lambda (u) (math-to-radians-2 | ||
| 417 | (math-mul | ||
| 418 | (math-normalize | ||
| 419 | (list 'calcFunc-sec u)) | ||
| 420 | (math-normalize | ||
| 421 | (list 'calcFunc-tan u))))))) | ||
| 422 | |||
| 423 | (put 'calcFunc-csc\' 'math-derivative-1 | ||
| 424 | (function (lambda (u) (math-neg | ||
| 425 | (math-to-radians-2 | ||
| 426 | (math-mul | ||
| 427 | (math-normalize | ||
| 428 | (list 'calcFunc-csc u)) | ||
| 429 | (math-normalize | ||
| 430 | (list 'calcFunc-cot u)))))))) | ||
| 431 | |||
| 432 | (put 'calcFunc-cot\' 'math-derivative-1 | ||
| 433 | (function (lambda (u) (math-neg | ||
| 434 | (math-to-radians-2 | ||
| 435 | (math-div 1 (math-sqr | ||
| 436 | (math-normalize | ||
| 437 | (list 'calcFunc-sin u))))))))) | ||
| 438 | |||
| 415 | (put 'calcFunc-arcsin\' 'math-derivative-1 | 439 | (put 'calcFunc-arcsin\' 'math-derivative-1 |
| 416 | (function (lambda (u) | 440 | (function (lambda (u) |
| 417 | (math-from-radians-2 | 441 | (math-from-radians-2 |
| @@ -441,6 +465,24 @@ | |||
| 441 | (math-normalize | 465 | (math-normalize |
| 442 | (list 'calcFunc-cosh u))))))) | 466 | (list 'calcFunc-cosh u))))))) |
| 443 | 467 | ||
| 468 | (put 'calcFunc-sech\' 'math-derivative-1 | ||
| 469 | (function (lambda (u) (math-neg | ||
| 470 | (math-mul | ||
| 471 | (math-normalize (list 'calcFunc-sech u)) | ||
| 472 | (math-normalize (list 'calcFunc-tanh u))))))) | ||
| 473 | |||
| 474 | (put 'calcFunc-csch\' 'math-derivative-1 | ||
| 475 | (function (lambda (u) (math-neg | ||
| 476 | (math-mul | ||
| 477 | (math-normalize (list 'calcFunc-csch u)) | ||
| 478 | (math-normalize (list 'calcFunc-coth u))))))) | ||
| 479 | |||
| 480 | (put 'calcFunc-tanh\' 'math-derivative-1 | ||
| 481 | (function (lambda (u) (math-neg | ||
| 482 | (math-div 1 (math-sqr | ||
| 483 | (math-normalize | ||
| 484 | (list 'calcFunc-sinh u)))))))) | ||
| 485 | |||
| 444 | (put 'calcFunc-arcsinh\' 'math-derivative-1 | 486 | (put 'calcFunc-arcsinh\' 'math-derivative-1 |
| 445 | (function (lambda (u) | 487 | (function (lambda (u) |
| 446 | (math-div 1 (math-normalize | 488 | (math-div 1 (math-normalize |
| @@ -1053,7 +1095,10 @@ | |||
| 1053 | (while (and p | 1095 | (while (and p |
| 1054 | (memq (car (car p)) '(calcFunc-sin | 1096 | (memq (car (car p)) '(calcFunc-sin |
| 1055 | calcFunc-cos | 1097 | calcFunc-cos |
| 1056 | calcFunc-tan)) | 1098 | calcFunc-tan |
| 1099 | calcFunc-sec | ||
| 1100 | calcFunc-csc | ||
| 1101 | calcFunc-cot)) | ||
| 1057 | (equal (nth 1 (car p)) math-integ-var)) | 1102 | (equal (nth 1 (car p)) math-integ-var)) |
| 1058 | (setq p (cdr p))) | 1103 | (setq p (cdr p))) |
| 1059 | (null p)) | 1104 | (null p)) |
| @@ -1068,6 +1113,9 @@ | |||
| 1068 | (memq (car (car p)) '(calcFunc-sinh | 1113 | (memq (car (car p)) '(calcFunc-sinh |
| 1069 | calcFunc-cosh | 1114 | calcFunc-cosh |
| 1070 | calcFunc-tanh | 1115 | calcFunc-tanh |
| 1116 | calcFunc-sech | ||
| 1117 | calcFunc-csch | ||
| 1118 | calcFunc-coth | ||
| 1071 | calcFunc-exp)) | 1119 | calcFunc-exp)) |
| 1072 | (equal (nth 1 (car p)) math-integ-var)) | 1120 | (equal (nth 1 (car p)) math-integ-var)) |
| 1073 | (setq p (cdr p))) | 1121 | (setq p (cdr p))) |
| @@ -1619,6 +1667,27 @@ | |||
| 1619 | (math-neg (math-from-radians-2 | 1667 | (math-neg (math-from-radians-2 |
| 1620 | (list 'calcFunc-ln (list 'calcFunc-cos u)))))) | 1668 | (list 'calcFunc-ln (list 'calcFunc-cos u)))))) |
| 1621 | 1669 | ||
| 1670 | (math-defintegral calcFunc-sec | ||
| 1671 | (and (equal u math-integ-var) | ||
| 1672 | (math-from-radians-2 | ||
| 1673 | (list 'calcFunc-ln | ||
| 1674 | (math-add | ||
| 1675 | (list 'calcFunc-sec u) | ||
| 1676 | (list 'calcFunc-tan u)))))) | ||
| 1677 | |||
| 1678 | (math-defintegral calcFunc-csc | ||
| 1679 | (and (equal u math-integ-var) | ||
| 1680 | (math-from-radians-2 | ||
| 1681 | (list 'calcFunc-ln | ||
| 1682 | (math-sub | ||
| 1683 | (list 'calcFunc-csc u) | ||
| 1684 | (list 'calcFunc-cot u)))))) | ||
| 1685 | |||
| 1686 | (math-defintegral calcFunc-cot | ||
| 1687 | (and (equal u math-integ-var) | ||
| 1688 | (math-from-radians-2 | ||
| 1689 | (list 'calcFunc-ln (list 'calcFunc-sin u))))) | ||
| 1690 | |||
| 1622 | (math-defintegral calcFunc-arcsin | 1691 | (math-defintegral calcFunc-arcsin |
| 1623 | (and (equal u math-integ-var) | 1692 | (and (equal u math-integ-var) |
| 1624 | (math-add (math-mul u (list 'calcFunc-arcsin u)) | 1693 | (math-add (math-mul u (list 'calcFunc-arcsin u)) |
| @@ -1650,6 +1719,18 @@ | |||
| 1650 | (and (equal u math-integ-var) | 1719 | (and (equal u math-integ-var) |
| 1651 | (list 'calcFunc-ln (list 'calcFunc-cosh u)))) | 1720 | (list 'calcFunc-ln (list 'calcFunc-cosh u)))) |
| 1652 | 1721 | ||
| 1722 | (math-defintegral calcFunc-sech | ||
| 1723 | (and (equal u math-integ-var) | ||
| 1724 | (list 'calcFunc-arctan (list 'calcFunc-sinh u)))) | ||
| 1725 | |||
| 1726 | (math-defintegral calcFunc-csch | ||
| 1727 | (and (equal u math-integ-var) | ||
| 1728 | (list 'calcFunc-ln (list 'calcFunc-tanh (math-div u 2))))) | ||
| 1729 | |||
| 1730 | (math-defintegral calcFunc-coth | ||
| 1731 | (and (equal u math-integ-var) | ||
| 1732 | (list 'calcFunc-ln (list 'calcFunc-sinh u)))) | ||
| 1733 | |||
| 1653 | (math-defintegral calcFunc-arcsinh | 1734 | (math-defintegral calcFunc-arcsinh |
| 1654 | (and (equal u math-integ-var) | 1735 | (and (equal u math-integ-var) |
| 1655 | (math-sub (math-mul u (list 'calcFunc-arcsinh u)) | 1736 | (math-sub (math-mul u (list 'calcFunc-arcsinh u)) |
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index eff7df2373d..305e155843e 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el | |||
| @@ -35,7 +35,9 @@ | |||
| 35 | '( calcFunc-log | 35 | '( calcFunc-log |
| 36 | calcFunc-ln calcFunc-exp | 36 | calcFunc-ln calcFunc-exp |
| 37 | calcFunc-sin calcFunc-cos calcFunc-tan | 37 | calcFunc-sin calcFunc-cos calcFunc-tan |
| 38 | calcFunc-sec calcFunc-csc calcFunc-cot | ||
| 38 | calcFunc-sinh calcFunc-cosh calcFunc-tanh | 39 | calcFunc-sinh calcFunc-cosh calcFunc-tanh |
| 40 | calcFunc-sech calcFunc-csch calcFunc-coth | ||
| 39 | calcFunc-arcsin calcFunc-arccos calcFunc-arctan | 41 | calcFunc-arcsin calcFunc-arccos calcFunc-arctan |
| 40 | calcFunc-arcsinh calcFunc-arccosh calcFunc-arctanh)) | 42 | calcFunc-arcsinh calcFunc-arccosh calcFunc-arctanh)) |
| 41 | 43 | ||
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 9ac11a85803..71fe7e18fe4 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1397,7 +1397,7 @@ Make your editing in this buffer take effect for this session." | |||
| 1397 | :tag "Save for Future Sessions" | 1397 | :tag "Save for Future Sessions" |
| 1398 | :help-echo "\ | 1398 | :help-echo "\ |
| 1399 | Make your editing in this buffer take effect for future Emacs sessions. | 1399 | Make your editing in this buffer take effect for future Emacs sessions. |
| 1400 | This updates your Emacs initialization file or creates a new one one." | 1400 | This updates your Emacs initialization file or creates a new one." |
| 1401 | :action (lambda (widget &optional event) | 1401 | :action (lambda (widget &optional event) |
| 1402 | (Custom-save))) | 1402 | (Custom-save))) |
| 1403 | (if custom-reset-button-menu | 1403 | (if custom-reset-button-menu |
| @@ -1671,15 +1671,15 @@ group now hidden, invoke \"Show\", above, to show contents.") | |||
| 1671 | the value displayed for this %c is invalid and cannot be set.") | 1671 | the value displayed for this %c is invalid and cannot be set.") |
| 1672 | (modified "*" custom-modified-face "\ | 1672 | (modified "*" custom-modified-face "\ |
| 1673 | you have edited the value as text, but you have not set the %c." "\ | 1673 | you have edited the value as text, but you have not set the %c." "\ |
| 1674 | you have edited something in this group, but not set it.") | 1674 | you have edited something in this group, but not set anything yet.") |
| 1675 | (set "+" custom-set-face "\ | 1675 | (set "+" custom-set-face "\ |
| 1676 | you have set this %c, but not saved it for future sessions." "\ | 1676 | you have set this %c, but not saved it for future sessions." "\ |
| 1677 | something in this group has been set, but not saved.") | 1677 | you have set something in this group, but not saved anything yet.") |
| 1678 | (changed ":" custom-changed-face "\ | 1678 | (changed ":" custom-changed-face "\ |
| 1679 | this %c has been changed outside the customize buffer." "\ | 1679 | this %c has been changed outside the customize buffer." "\ |
| 1680 | something in this group has been changed outside customize.") | 1680 | something in this group has been changed outside customize.") |
| 1681 | (saved "!" custom-saved-face "\ | 1681 | (saved "!" custom-saved-face "\ |
| 1682 | this %c has been set and saved." "\ | 1682 | You have set this %c and saved it through Customize in your init file." "\ |
| 1683 | something in this group has been set and saved.") | 1683 | something in this group has been set and saved.") |
| 1684 | (rogue "@" custom-rogue-face "\ | 1684 | (rogue "@" custom-rogue-face "\ |
| 1685 | this %c has not been changed with customize." "\ | 1685 | this %c has not been changed with customize." "\ |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index ccee43822ee..36bebf68871 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cus-start.el --- define customization properties of builtins | 1 | ;;; cus-start.el --- define customization properties of builtins |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> | 5 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> |
| 6 | ;; Keywords: internal | 6 | ;; Keywords: internal |
| @@ -39,6 +39,8 @@ | |||
| 39 | (pre-abbrev-expand-hook abbrev-mode hook) | 39 | (pre-abbrev-expand-hook abbrev-mode hook) |
| 40 | ;; alloc.c | 40 | ;; alloc.c |
| 41 | (gc-cons-threshold alloc integer) | 41 | (gc-cons-threshold alloc integer) |
| 42 | (garbage-collection-messages alloc boolean) | ||
| 43 | ;; undo.c | ||
| 42 | (undo-limit undo integer) | 44 | (undo-limit undo integer) |
| 43 | (undo-strong-limit undo integer) | 45 | (undo-strong-limit undo integer) |
| 44 | (undo-outer-limit undo | 46 | (undo-outer-limit undo |
| @@ -52,7 +54,6 @@ This should only be chosen under exceptional circumstances, | |||
| 52 | since it could result in memory overflow and make Emacs crash." | 54 | since it could result in memory overflow and make Emacs crash." |
| 53 | nil)) | 55 | nil)) |
| 54 | "22.1") | 56 | "22.1") |
| 55 | (garbage-collection-messages alloc boolean) | ||
| 56 | ;; buffer.c | 57 | ;; buffer.c |
| 57 | (mode-line-format modeline sexp) ;Hard to do right. | 58 | (mode-line-format modeline sexp) ;Hard to do right. |
| 58 | (default-major-mode internal function) | 59 | (default-major-mode internal function) |
| @@ -288,7 +289,7 @@ since it could result in memory overflow and make Emacs crash." | |||
| 288 | (mouse-autoselect-window display boolean "21.3") | 289 | (mouse-autoselect-window display boolean "21.3") |
| 289 | (x-use-underline-position-properties display boolean "21.3") | 290 | (x-use-underline-position-properties display boolean "21.3") |
| 290 | (x-stretch-cursor display boolean "21.1"))) | 291 | (x-stretch-cursor display boolean "21.1"))) |
| 291 | this symbol group type native-p version | 292 | this symbol group type standard version native-p |
| 292 | ;; This function turns a value | 293 | ;; This function turns a value |
| 293 | ;; into an expression which produces that value. | 294 | ;; into an expression which produces that value. |
| 294 | (quoter (lambda (sexp) | 295 | (quoter (lambda (sexp) |
| @@ -297,8 +298,6 @@ since it could result in memory overflow and make Emacs crash." | |||
| 297 | (and (listp sexp) | 298 | (and (listp sexp) |
| 298 | (memq (car sexp) '(lambda))) | 299 | (memq (car sexp) '(lambda))) |
| 299 | (stringp sexp) | 300 | (stringp sexp) |
| 300 | ;; (and (fboundp 'characterp) | ||
| 301 | ;; (characterp sexp)) | ||
| 302 | (numberp sexp)) | 301 | (numberp sexp)) |
| 303 | sexp | 302 | sexp |
| 304 | (list 'quote sexp))))) | 303 | (list 'quote sexp))))) |
| @@ -309,6 +308,12 @@ since it could result in memory overflow and make Emacs crash." | |||
| 309 | group (nth 1 this) | 308 | group (nth 1 this) |
| 310 | type (nth 2 this) | 309 | type (nth 2 this) |
| 311 | version (nth 3 this) | 310 | version (nth 3 this) |
| 311 | ;; If we did not specify any standard value expression above, | ||
| 312 | ;; use the current value as the standard value. | ||
| 313 | standard (if (nthcdr 4 this) | ||
| 314 | (nth 4 this) | ||
| 315 | (when (default-boundp symbol) | ||
| 316 | (funcall quoter (default-value symbol)))) | ||
| 312 | ;; Don't complain about missing variables which are | 317 | ;; Don't complain about missing variables which are |
| 313 | ;; irrelevant to this platform. | 318 | ;; irrelevant to this platform. |
| 314 | native-p (save-match-data | 319 | native-p (save-match-data |
| @@ -326,8 +331,7 @@ since it could result in memory overflow and make Emacs crash." | |||
| 326 | (message "Note, built-in variable `%S' not bound" symbol)) | 331 | (message "Note, built-in variable `%S' not bound" symbol)) |
| 327 | ;; Save the standard value, unless we already did. | 332 | ;; Save the standard value, unless we already did. |
| 328 | (or (get symbol 'standard-value) | 333 | (or (get symbol 'standard-value) |
| 329 | (put symbol 'standard-value | 334 | (put symbol 'standard-value (list standard))) |
| 330 | (list (funcall quoter (default-value symbol))))) | ||
| 331 | ;; If this is NOT while dumping Emacs, | 335 | ;; If this is NOT while dumping Emacs, |
| 332 | ;; set up the rest of the customization info. | 336 | ;; set up the rest of the customization info. |
| 333 | (unless purify-flag | 337 | (unless purify-flag |
diff --git a/lisp/dired.el b/lisp/dired.el index f64c2472067..f9eb97f549e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -2128,6 +2128,7 @@ instead of `dired-actual-switches'." | |||
| 2128 | (save-excursion | 2128 | (save-excursion |
| 2129 | (let* ((count 0) | 2129 | (let* ((count 0) |
| 2130 | (buffer-read-only nil) | 2130 | (buffer-read-only nil) |
| 2131 | (buffer-undo-list t) | ||
| 2131 | (switches (or switches dired-actual-switches)) | 2132 | (switches (or switches dired-actual-switches)) |
| 2132 | new-dir-name | 2133 | new-dir-name |
| 2133 | (R-ftp-base-dir-regex | 2134 | (R-ftp-base-dir-regex |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 6b5c0b1c0f1..1a7da113c12 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -182,7 +182,7 @@ | |||
| 182 | (make-local-variable 'parse-sexp-ignore-comments) | 182 | (make-local-variable 'parse-sexp-ignore-comments) |
| 183 | (setq parse-sexp-ignore-comments t) | 183 | (setq parse-sexp-ignore-comments t) |
| 184 | (make-local-variable 'outline-regexp) | 184 | (make-local-variable 'outline-regexp) |
| 185 | (setq outline-regexp ";;;;* [^ \t\n]\\|(") | 185 | (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(") |
| 186 | (make-local-variable 'outline-level) | 186 | (make-local-variable 'outline-level) |
| 187 | (setq outline-level 'lisp-outline-level) | 187 | (setq outline-level 'lisp-outline-level) |
| 188 | (make-local-variable 'comment-start) | 188 | (make-local-variable 'comment-start) |
| @@ -212,11 +212,10 @@ | |||
| 212 | 212 | ||
| 213 | (defun lisp-outline-level () | 213 | (defun lisp-outline-level () |
| 214 | "Lisp mode `outline-level' function." | 214 | "Lisp mode `outline-level' function." |
| 215 | (if (looking-at "(\\|;;;###autoload") | 215 | (let ((len (- (match-end 0) (match-beginning 0)))) |
| 216 | 1000 | 216 | (if (looking-at "(\\|;;;###autoload") |
| 217 | (looking-at outline-regexp) | 217 | 1000 |
| 218 | (- (match-end 0) (match-beginning 0)))) | 218 | len))) |
| 219 | |||
| 220 | 219 | ||
| 221 | (defvar lisp-mode-shared-map | 220 | (defvar lisp-mode-shared-map |
| 222 | (let ((map (make-sparse-keymap))) | 221 | (let ((map (make-sparse-keymap))) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7a4b1e68e58..bc8b89a2519 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2005-02-13 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus.el (gnus-group-startup-message): Search for gnus images in | ||
| 4 | etc/images/gnus. | ||
| 5 | * mm-util.el (mm-find-charset-region): Likewise. | ||
| 6 | * smiley.el (smiley-data-directory): Search for smilies in | ||
| 7 | etc/images/smilies. | ||
| 8 | |||
| 9 | 2005-02-09 Kim F. Storm <storm@cua.dk> | ||
| 10 | |||
| 11 | Change Emacs release version from 21.4 to 22.1 throughout. | ||
| 12 | Change Emacs development version from 21.3.50 to 22.0.50. | ||
| 13 | |||
| 14 | 2005-02-08 Simon Josefsson <jas@extundo.com> | ||
| 15 | |||
| 16 | * imap.el (imap-log): Doc fix. | ||
| 17 | |||
| 1 | 2005-02-03 Katsumi Yamaoka <yamaoka@jpl.org> | 18 | 2005-02-03 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 19 | ||
| 3 | * gnus-art.el (gnus-mime-inline-part): Show the raw contents if a | 20 | * gnus-art.el (gnus-mime-inline-part): Show the raw contents if a |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 674c8d2c0ad..f5dcd296d2b 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -326,7 +326,8 @@ be set in `.emacs' instead." | |||
| 326 | (defvar gnus-mode-line-image-cache t) | 326 | (defvar gnus-mode-line-image-cache t) |
| 327 | (if (fboundp 'find-image) | 327 | (if (fboundp 'find-image) |
| 328 | (defun gnus-mode-line-buffer-identification (line) | 328 | (defun gnus-mode-line-buffer-identification (line) |
| 329 | (let ((str (car-safe line))) | 329 | (let ((str (car-safe line)) |
| 330 | (load-path (mm-image-load-path))) | ||
| 330 | (if (and (stringp str) | 331 | (if (and (stringp str) |
| 331 | (string-match "^Gnus:" str)) | 332 | (string-match "^Gnus:" str)) |
| 332 | (progn (add-text-properties | 333 | (progn (add-text-properties |
| @@ -875,7 +876,7 @@ be set in `.emacs' instead." | |||
| 875 | ((and | 876 | ((and |
| 876 | (fboundp 'find-image) | 877 | (fboundp 'find-image) |
| 877 | (display-graphic-p) | 878 | (display-graphic-p) |
| 878 | (let* ((data-directory (nnheader-find-etc-directory "gnus")) | 879 | (let* ((data-directory (nnheader-find-etc-directory "images/gnus")) |
| 879 | (image (find-image | 880 | (image (find-image |
| 880 | `((:type xpm :file "gnus.xpm" | 881 | `((:type xpm :file "gnus.xpm" |
| 881 | :color-symbols | 882 | :color-symbols |
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index 18a7cdd090d..aba0e88b92f 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el | |||
| @@ -241,7 +241,11 @@ encoded mailboxes which doesn't translate into ISO-8859-1." | |||
| 241 | :type 'boolean) | 241 | :type 'boolean) |
| 242 | 242 | ||
| 243 | (defcustom imap-log nil | 243 | (defcustom imap-log nil |
| 244 | "If non-nil, a imap session trace is placed in *imap-log* buffer." | 244 | "If non-nil, a imap session trace is placed in *imap-log* buffer. |
| 245 | Note that username, passwords and other privacy sensitive | ||
| 246 | information (such as e-mail) may be stored in the *imap-log* | ||
| 247 | buffer. It is not written to disk, however. Do not enable this | ||
| 248 | variable unless you are comfortable with that." | ||
| 245 | :group 'imap | 249 | :group 'imap |
| 246 | :type 'boolean) | 250 | :type 'boolean) |
| 247 | 251 | ||
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index c0ccaa316ba..5b4200d6d52 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; mm-util.el --- Utility functions for Mule and low level things | 1 | ;;; mm-util.el --- Utility functions for Mule and low level things |
| 2 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 | 2 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
| 3 | ;; Free Software Foundation, Inc. | 3 | ;; Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | 5 | ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
| @@ -901,7 +901,7 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'." | |||
| 901 | (file-directory-p | 901 | (file-directory-p |
| 902 | (setq dir (concat (file-name-directory | 902 | (setq dir (concat (file-name-directory |
| 903 | (directory-file-name path)) | 903 | (directory-file-name path)) |
| 904 | "etc/" (or package "gnus/"))))) | 904 | "etc/images/" (or package "gnus/"))))) |
| 905 | (push dir result)) | 905 | (push dir result)) |
| 906 | (push path result)))) | 906 | (push path result)))) |
| 907 | 907 | ||
diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el index 74a4d9cf596..27a54829aaf 100644 --- a/lisp/gnus/smiley.el +++ b/lisp/gnus/smiley.el | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | :group 'gnus-visual) | 44 | :group 'gnus-visual) |
| 45 | 45 | ||
| 46 | ;; Maybe this should go. | 46 | ;; Maybe this should go. |
| 47 | (defcustom smiley-data-directory (nnheader-find-etc-directory "smilies") | 47 | (defcustom smiley-data-directory (nnheader-find-etc-directory "images/smilies") |
| 48 | "*Location of the smiley faces files." | 48 | "*Location of the smiley faces files." |
| 49 | :type 'directory | 49 | :type 'directory |
| 50 | :group 'smiley) | 50 | :group 'smiley) |
diff --git a/lisp/ido.el b/lisp/ido.el index 389ddb0b9a1..86a88d0d491 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -2280,6 +2280,9 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one. | |||
| 2280 | (defun ido-fallback-command () | 2280 | (defun ido-fallback-command () |
| 2281 | "Fallback to non-ido version of current command." | 2281 | "Fallback to non-ido version of current command." |
| 2282 | (interactive) | 2282 | (interactive) |
| 2283 | (let ((i (length ido-text))) | ||
| 2284 | (while (> i 0) | ||
| 2285 | (push (aref ido-text (setq i (1- i))) unread-command-events))) | ||
| 2283 | (setq ido-exit 'fallback) | 2286 | (setq ido-exit 'fallback) |
| 2284 | (exit-minibuffer)) | 2287 | (exit-minibuffer)) |
| 2285 | 2288 | ||
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 338a6025e18..24992b3c10b 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -2482,13 +2482,13 @@ See also `locale-charset-language-names', `locale-language-names', | |||
| 2482 | (prefer-coding-system coding-system) | 2482 | (prefer-coding-system coding-system) |
| 2483 | (setq locale-coding-system coding-system)))) | 2483 | (setq locale-coding-system coding-system)))) |
| 2484 | 2484 | ||
| 2485 | ;; On Windows, override locale-coding-system, keyboard-coding-system, | 2485 | ;; On Windows, override locale-coding-system, |
| 2486 | ;; selection-coding-system with system codepage. | 2486 | ;; keyboard-coding-system with system codepage. Note: |
| 2487 | ;; selection-coding-system is already set in w32select.c. | ||
| 2487 | (when (boundp 'w32-ansi-code-page) | 2488 | (when (boundp 'w32-ansi-code-page) |
| 2488 | (let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page)))) | 2489 | (let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page)))) |
| 2489 | (when (coding-system-p code-page-coding) | 2490 | (when (coding-system-p code-page-coding) |
| 2490 | (setq locale-coding-system code-page-coding) | 2491 | (setq locale-coding-system code-page-coding) |
| 2491 | (set-selection-coding-system code-page-coding) | ||
| 2492 | (set-keyboard-coding-system code-page-coding) | 2492 | (set-keyboard-coding-system code-page-coding) |
| 2493 | (set-terminal-coding-system code-page-coding)))) | 2493 | (set-terminal-coding-system code-page-coding)))) |
| 2494 | 2494 | ||
diff --git a/lisp/isearch.el b/lisp/isearch.el index 6aae4b32533..bc8e1533351 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -740,7 +740,8 @@ is treated as a regexp. See \\[isearch-forward] for more info." | |||
| 740 | (setq ;; quit-flag nil not for isearch-mode | 740 | (setq ;; quit-flag nil not for isearch-mode |
| 741 | isearch-adjusted nil | 741 | isearch-adjusted nil |
| 742 | isearch-yank-flag nil) | 742 | isearch-yank-flag nil) |
| 743 | (if isearch-lazy-highlight (isearch-lazy-highlight-new-loop)) | 743 | (when isearch-lazy-highlight |
| 744 | (isearch-lazy-highlight-new-loop nil nil)) | ||
| 744 | ;; We must prevent the point moving to the end of composition when a | 745 | ;; We must prevent the point moving to the end of composition when a |
| 745 | ;; part of the composition has just been searched. | 746 | ;; part of the composition has just been searched. |
| 746 | (setq disable-point-adjustment t)) | 747 | (setq disable-point-adjustment t)) |
| @@ -2314,6 +2315,8 @@ since they have special meaning in a regexp." | |||
| 2314 | 2315 | ||
| 2315 | (defvar isearch-lazy-highlight-overlays nil) | 2316 | (defvar isearch-lazy-highlight-overlays nil) |
| 2316 | (defvar isearch-lazy-highlight-wrapped nil) | 2317 | (defvar isearch-lazy-highlight-wrapped nil) |
| 2318 | (defvar isearch-lazy-highlight-start-limit nil) | ||
| 2319 | (defvar isearch-lazy-highlight-end-limit nil) | ||
| 2317 | (defvar isearch-lazy-highlight-start nil) | 2320 | (defvar isearch-lazy-highlight-start nil) |
| 2318 | (defvar isearch-lazy-highlight-end nil) | 2321 | (defvar isearch-lazy-highlight-end nil) |
| 2319 | (defvar isearch-lazy-highlight-timer nil) | 2322 | (defvar isearch-lazy-highlight-timer nil) |
| @@ -2339,10 +2342,12 @@ is nil. This function is called when exiting an incremental search if | |||
| 2339 | (cancel-timer isearch-lazy-highlight-timer) | 2342 | (cancel-timer isearch-lazy-highlight-timer) |
| 2340 | (setq isearch-lazy-highlight-timer nil))) | 2343 | (setq isearch-lazy-highlight-timer nil))) |
| 2341 | 2344 | ||
| 2342 | (defun isearch-lazy-highlight-new-loop () | 2345 | (defun isearch-lazy-highlight-new-loop (beg end) |
| 2343 | "Cleanup any previous `lazy-highlight' loop and begin a new one. | 2346 | "Cleanup any previous `lazy-highlight' loop and begin a new one. |
| 2344 | This happens when `isearch-update' is invoked (which can cause the | 2347 | BEG and END specify the bounds within which highlighting should occur. |
| 2345 | search string to change or the window to scroll)." | 2348 | This is called when `isearch-update' is invoked (which can cause the |
| 2349 | search string to change or the window to scroll). It is also used | ||
| 2350 | by other Emacs features." | ||
| 2346 | (when (and (null executing-kbd-macro) | 2351 | (when (and (null executing-kbd-macro) |
| 2347 | (sit-for 0) ;make sure (window-start) is credible | 2352 | (sit-for 0) ;make sure (window-start) is credible |
| 2348 | (or (not (equal isearch-string | 2353 | (or (not (equal isearch-string |
| @@ -2360,6 +2365,8 @@ search string to change or the window to scroll)." | |||
| 2360 | ;; something important did indeed change | 2365 | ;; something important did indeed change |
| 2361 | (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays | 2366 | (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays |
| 2362 | (when (not isearch-invalid-regexp) | 2367 | (when (not isearch-invalid-regexp) |
| 2368 | (setq isearch-lazy-highlight-start-limit beg | ||
| 2369 | isearch-lazy-highlight-end-limit end) | ||
| 2363 | (setq isearch-lazy-highlight-window (selected-window) | 2370 | (setq isearch-lazy-highlight-window (selected-window) |
| 2364 | isearch-lazy-highlight-window-start (window-start) | 2371 | isearch-lazy-highlight-window-start (window-start) |
| 2365 | isearch-lazy-highlight-window-end (window-end) | 2372 | isearch-lazy-highlight-window-end (window-end) |
| @@ -2382,12 +2389,14 @@ Attempt to do the search exactly the way the pending isearch would." | |||
| 2382 | (funcall (isearch-search-fun) | 2389 | (funcall (isearch-search-fun) |
| 2383 | isearch-string | 2390 | isearch-string |
| 2384 | (if isearch-forward | 2391 | (if isearch-forward |
| 2385 | (if isearch-lazy-highlight-wrapped | 2392 | (min (or isearch-lazy-highlight-end-limit (point-max)) |
| 2386 | isearch-lazy-highlight-start | 2393 | (if isearch-lazy-highlight-wrapped |
| 2387 | (window-end)) | 2394 | isearch-lazy-highlight-start |
| 2388 | (if isearch-lazy-highlight-wrapped | 2395 | (window-end))) |
| 2389 | isearch-lazy-highlight-end | 2396 | (max (or isearch-lazy-highlight-start-limit (point-min)) |
| 2390 | (window-start))) | 2397 | (if isearch-lazy-highlight-wrapped |
| 2398 | isearch-lazy-highlight-end | ||
| 2399 | (window-start)))) | ||
| 2391 | t))) | 2400 | t))) |
| 2392 | 2401 | ||
| 2393 | (defun isearch-lazy-highlight-update () | 2402 | (defun isearch-lazy-highlight-update () |
| @@ -2446,9 +2455,11 @@ Attempt to do the search exactly the way the pending isearch would." | |||
| 2446 | (if isearch-forward | 2455 | (if isearch-forward |
| 2447 | (progn | 2456 | (progn |
| 2448 | (setq isearch-lazy-highlight-end (window-start)) | 2457 | (setq isearch-lazy-highlight-end (window-start)) |
| 2449 | (goto-char (window-start))) | 2458 | (goto-char (max (or isearch-lazy-highlight-start-limit (point-min)) |
| 2459 | (window-start)))) | ||
| 2450 | (setq isearch-lazy-highlight-start (window-end)) | 2460 | (setq isearch-lazy-highlight-start (window-end)) |
| 2451 | (goto-char (window-end))))))) | 2461 | (goto-char (min (or isearch-lazy-highlight-end-limit (point-max)) |
| 2462 | (window-end)))))))) | ||
| 2452 | (unless nomore | 2463 | (unless nomore |
| 2453 | (setq isearch-lazy-highlight-timer | 2464 | (setq isearch-lazy-highlight-timer |
| 2454 | (run-at-time lazy-highlight-interval nil | 2465 | (run-at-time lazy-highlight-interval nil |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 3fbc728f487..1c95e54dc5c 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1515,9 +1515,11 @@ Buffers menu is regenerated." | |||
| 1515 | (dolist (f (frame-list)) | 1515 | (dolist (f (frame-list)) |
| 1516 | (when (equal last-command-event (frame-parameter f 'name)) | 1516 | (when (equal last-command-event (frame-parameter f 'name)) |
| 1517 | (setq frame f))) | 1517 | (setq frame f))) |
| 1518 | (make-frame-visible frame) | 1518 | ;; FRAME can be nil when user specifies the selected frame. |
| 1519 | (raise-frame frame) | 1519 | (setq frame (or frame (selected-frame))) |
| 1520 | (select-frame frame))) | 1520 | (make-frame-visible frame) |
| 1521 | (raise-frame frame) | ||
| 1522 | (select-frame frame))) | ||
| 1521 | 1523 | ||
| 1522 | (defun menu-bar-update-buffers-1 (elt) | 1524 | (defun menu-bar-update-buffers-1 (elt) |
| 1523 | (let* ((buf (car elt)) | 1525 | (let* ((buf (car elt)) |
diff --git a/lisp/novice.el b/lisp/novice.el index e9db95bd619..de92857980b 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -41,10 +41,9 @@ | |||
| 41 | "Function to call to handle disabled commands. | 41 | "Function to call to handle disabled commands. |
| 42 | If nil, the feature is disabled, i.e., all commands work normally.") | 42 | If nil, the feature is disabled, i.e., all commands work normally.") |
| 43 | 43 | ||
| 44 | ;;;###autoload | ||
| 44 | (defvaralias 'disabled-command-hook 'disabled-command-function) | 45 | (defvaralias 'disabled-command-hook 'disabled-command-function) |
| 45 | (make-obsolete-variable | 46 | ;;;###autoload (make-obsolete-variable 'disabled-command-hook 'disabled-command-function "22.1") |
| 46 | 'disabled-command-hook | ||
| 47 | 'disabled-command-function "22.1") | ||
| 48 | 47 | ||
| 49 | ;;;###autoload | 48 | ;;;###autoload |
| 50 | (defun disabled-command-function (&rest ignore) | 49 | (defun disabled-command-function (&rest ignore) |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 84385a5521c..f49b25fcf9e 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -79,6 +79,8 @@ | |||
| 79 | (defvar gdb-overlay-arrow-position nil) | 79 | (defvar gdb-overlay-arrow-position nil) |
| 80 | (defvar gdb-server-prefix nil) | 80 | (defvar gdb-server-prefix nil) |
| 81 | (defvar gdb-flush-pending-output nil) | 81 | (defvar gdb-flush-pending-output nil) |
| 82 | (defvar gdb-location-list nil "List of directories for source files.") | ||
| 83 | (defvar gdb-find-file-unhook nil) | ||
| 82 | 84 | ||
| 83 | (defvar gdb-buffer-type nil | 85 | (defvar gdb-buffer-type nil |
| 84 | "One of the symbols bound in `gdb-buffer-rules'.") | 86 | "One of the symbols bound in `gdb-buffer-rules'.") |
| @@ -191,6 +193,36 @@ detailed description of this mode. | |||
| 191 | :group 'gud | 193 | :group 'gud |
| 192 | :version "22.1") | 194 | :version "22.1") |
| 193 | 195 | ||
| 196 | (defun gdb-set-gud-minor-mode (buffer) | ||
| 197 | "Set gud-minor-mode from find-file if appropriate." | ||
| 198 | (goto-char (point-min)) | ||
| 199 | (unless (search-forward "No source file named " nil t) | ||
| 200 | (condition-case nil | ||
| 201 | (gdb-enqueue-input | ||
| 202 | (list (concat gdb-server-prefix "info source\n") | ||
| 203 | `(lambda () (gdb-set-gud-minor-mode-1 ,buffer)))) | ||
| 204 | (error (setq gdb-find-file-unhook t))))) | ||
| 205 | |||
| 206 | (defun gdb-set-gud-minor-mode-1 (buffer) | ||
| 207 | (goto-char (point-min)) | ||
| 208 | (if (and (search-forward "Located in " nil t) | ||
| 209 | (looking-at "\\S-*") | ||
| 210 | (string-equal (buffer-file-name buffer) | ||
| 211 | (match-string 0))) | ||
| 212 | (with-current-buffer buffer | ||
| 213 | (set (make-local-variable 'gud-minor-mode) 'gdba) | ||
| 214 | (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)))) | ||
| 215 | |||
| 216 | (defun gdb-set-gud-minor-mode-existing-buffers () | ||
| 217 | (dolist (buffer (buffer-list)) | ||
| 218 | (let ((file (buffer-file-name buffer))) | ||
| 219 | (if file | ||
| 220 | (progn | ||
| 221 | (gdb-enqueue-input | ||
| 222 | (list (concat gdb-server-prefix "list " | ||
| 223 | (file-name-nondirectory file) ":1\n") | ||
| 224 | `(lambda () (gdb-set-gud-minor-mode ,buffer))))))))) | ||
| 225 | |||
| 194 | (defun gdb-ann3 () | 226 | (defun gdb-ann3 () |
| 195 | (setq gdb-debug-log nil) | 227 | (setq gdb-debug-log nil) |
| 196 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 228 | (set (make-local-variable 'gud-minor-mode) 'gdba) |
| @@ -249,6 +281,7 @@ detailed description of this mode. | |||
| 249 | (setq gdb-server-prefix "server ") | 281 | (setq gdb-server-prefix "server ") |
| 250 | (setq gdb-flush-pending-output nil) | 282 | (setq gdb-flush-pending-output nil) |
| 251 | (setq gdb-location-list nil) | 283 | (setq gdb-location-list nil) |
| 284 | (setq gdb-find-file-unhook nil) | ||
| 252 | ;; | 285 | ;; |
| 253 | (setq gdb-buffer-type 'gdba) | 286 | (setq gdb-buffer-type 'gdba) |
| 254 | ;; | 287 | ;; |
| @@ -263,6 +296,7 @@ detailed description of this mode. | |||
| 263 | (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program | 296 | (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program |
| 264 | (gdb-enqueue-input (list "server info source\n" 'gdb-source-info)) | 297 | (gdb-enqueue-input (list "server info source\n" 'gdb-source-info)) |
| 265 | ;; | 298 | ;; |
| 299 | (gdb-set-gud-minor-mode-existing-buffers) | ||
| 266 | (run-hooks 'gdba-mode-hook)) | 300 | (run-hooks 'gdba-mode-hook)) |
| 267 | 301 | ||
| 268 | (defcustom gdb-use-colon-colon-notation nil | 302 | (defcustom gdb-use-colon-colon-notation nil |
| @@ -1048,8 +1082,6 @@ happens to be appropriate." | |||
| 1048 | ;; buffer specific functions | 1082 | ;; buffer specific functions |
| 1049 | gdb-info-breakpoints-custom) | 1083 | gdb-info-breakpoints-custom) |
| 1050 | 1084 | ||
| 1051 | (defvar gdb-location-list nil "List of directories for source files.") | ||
| 1052 | |||
| 1053 | (defconst breakpoint-xpm-data | 1085 | (defconst breakpoint-xpm-data |
| 1054 | "/* XPM */ | 1086 | "/* XPM */ |
| 1055 | static char *magick[] = { | 1087 | static char *magick[] = { |
| @@ -1159,13 +1191,11 @@ static char *magick[] = { | |||
| 1159 | (setq file (cdr (assoc bptno gdb-location-list)))) | 1191 | (setq file (cdr (assoc bptno gdb-location-list)))) |
| 1160 | (unless (string-equal file "File not found") | 1192 | (unless (string-equal file "File not found") |
| 1161 | (if file | 1193 | (if file |
| 1162 | (with-current-buffer | 1194 | (with-current-buffer (find-file-noselect file) |
| 1163 | (find-file-noselect file) | 1195 | (set (make-local-variable 'gud-minor-mode) |
| 1164 | (save-current-buffer | ||
| 1165 | (set (make-local-variable 'gud-minor-mode) | ||
| 1166 | 'gdba) | 1196 | 'gdba) |
| 1167 | (set (make-local-variable 'tool-bar-map) | 1197 | (set (make-local-variable 'tool-bar-map) |
| 1168 | gud-tool-bar-map)) | 1198 | gud-tool-bar-map) |
| 1169 | ;; only want one breakpoint icon at each location | 1199 | ;; only want one breakpoint icon at each location |
| 1170 | (save-excursion | 1200 | (save-excursion |
| 1171 | (goto-line (string-to-number line)) | 1201 | (goto-line (string-to-number line)) |
| @@ -2054,15 +2084,15 @@ Kills the gdb buffers and resets the source buffers." | |||
| 2054 | "Find the source file where the program starts and displays it with related | 2084 | "Find the source file where the program starts and displays it with related |
| 2055 | buffers." | 2085 | buffers." |
| 2056 | (goto-char (point-min)) | 2086 | (goto-char (point-min)) |
| 2057 | (if (search-forward "Located in " nil t) | 2087 | (if (and (search-forward "Located in " nil t) |
| 2058 | (if (looking-at "\\S-*") | 2088 | (looking-at "\\S-*")) |
| 2059 | (setq gdb-main-file (match-string 0)))) | 2089 | (setq gdb-main-file (match-string 0))) |
| 2060 | (if gdb-many-windows | 2090 | (if gdb-many-windows |
| 2061 | (gdb-setup-windows) | 2091 | (gdb-setup-windows) |
| 2062 | (gdb-get-create-buffer 'gdb-breakpoints-buffer) | 2092 | (gdb-get-create-buffer 'gdb-breakpoints-buffer) |
| 2063 | (if gdb-show-main | 2093 | (if gdb-show-main |
| 2064 | (let ((pop-up-windows t)) | 2094 | (let ((pop-up-windows t)) |
| 2065 | (display-buffer (gud-find-file gdb-main-file)))))) | 2095 | (display-buffer (gud-find-file gdb-main-file)))))) |
| 2066 | 2096 | ||
| 2067 | (defun gdb-get-location (bptno line flag) | 2097 | (defun gdb-get-location (bptno line flag) |
| 2068 | "Find the directory containing the relevant source file. | 2098 | "Find the directory containing the relevant source file. |
| @@ -2085,6 +2115,23 @@ Add directory to search path for source files using the GDB command, dir.")) | |||
| 2085 | (goto-line (string-to-number line)) | 2115 | (goto-line (string-to-number line)) |
| 2086 | (gdb-put-breakpoint-icon (eq flag ?y) bptno)))) | 2116 | (gdb-put-breakpoint-icon (eq flag ?y) bptno)))) |
| 2087 | 2117 | ||
| 2118 | (add-hook 'find-file-hook 'gdb-find-file-hook) | ||
| 2119 | |||
| 2120 | (defun gdb-find-file-hook () | ||
| 2121 | (if (and (not gdb-find-file-unhook) | ||
| 2122 | ;; in case gud or gdb-ui is just loaded | ||
| 2123 | gud-comint-buffer | ||
| 2124 | (buffer-name gud-comint-buffer) | ||
| 2125 | (with-current-buffer gud-comint-buffer | ||
| 2126 | (eq gud-minor-mode 'gdba))) | ||
| 2127 | (condition-case nil | ||
| 2128 | (gdb-enqueue-input | ||
| 2129 | (list (concat gdb-server-prefix "list " | ||
| 2130 | (file-name-nondirectory buffer-file-name) | ||
| 2131 | ":1\n") | ||
| 2132 | `(lambda () (gdb-set-gud-minor-mode ,(current-buffer))))) | ||
| 2133 | (error (setq gdb-find-file-unhook t))))) | ||
| 2134 | |||
| 2088 | ;;from put-image | 2135 | ;;from put-image |
| 2089 | (defun gdb-put-string (putstring pos &optional dprop) | 2136 | (defun gdb-put-string (putstring pos &optional dprop) |
| 2090 | "Put string PUTSTRING in front of POS in the current buffer. | 2137 | "Put string PUTSTRING in front of POS in the current buffer. |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index c37f21224fc..214a19560a4 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -986,7 +986,7 @@ Please send all bug fixes and enhancements to | |||
| 986 | ;; (my-mixed-family | 986 | ;; (my-mixed-family |
| 987 | ;; (fonts (normal . "Courier-Bold") | 987 | ;; (fonts (normal . "Courier-Bold") |
| 988 | ;; (bold . "Helvetica") | 988 | ;; (bold . "Helvetica") |
| 989 | ;; (italic . "Zapf-Chancery-MediumItalic") | 989 | ;; (italic . "ZapfChancery-MediumItalic") |
| 990 | ;; (bold-italic . "NewCenturySchlbk-BoldItalic") | 990 | ;; (bold-italic . "NewCenturySchlbk-BoldItalic") |
| 991 | ;; (w3-table-hack-x-face . "LineDrawNormal")) | 991 | ;; (w3-table-hack-x-face . "LineDrawNormal")) |
| 992 | ;; (size . 10.0) | 992 | ;; (size . 10.0) |
| @@ -1010,7 +1010,7 @@ Please send all bug fixes and enhancements to | |||
| 1010 | ;; (fonts (w3-table-hack-x-face . "LineDrawNormal") | 1010 | ;; (fonts (w3-table-hack-x-face . "LineDrawNormal") |
| 1011 | ;; (bold . "Helvetica") | 1011 | ;; (bold . "Helvetica") |
| 1012 | ;; (bold-italic . "NewCenturySchlbk-BoldItalic") | 1012 | ;; (bold-italic . "NewCenturySchlbk-BoldItalic") |
| 1013 | ;; (italic . "Zapf-Chancery-MediumItalic") | 1013 | ;; (italic . "ZapfChancery-MediumItalic") |
| 1014 | ;; (normal . "Courier-Bold")) | 1014 | ;; (normal . "Courier-Bold")) |
| 1015 | ;; (avg-char-width . 6.0) | 1015 | ;; (avg-char-width . 6.0) |
| 1016 | ;; (space-width . 6.0) | 1016 | ;; (space-width . 6.0) |
| @@ -2820,8 +2820,16 @@ It has effect only when `ps-spool-duplex' is non-nil." | |||
| 2820 | (line-height . 9.63) | 2820 | (line-height . 9.63) |
| 2821 | (space-width . 2.78) | 2821 | (space-width . 2.78) |
| 2822 | (avg-char-width . 2.78)) | 2822 | (avg-char-width . 2.78)) |
| 2823 | (ZapfChancery-MediumItalic | ||
| 2824 | (fonts (normal . "ZapfChancery-MediumItalic")) | ||
| 2825 | (size . 10.0) | ||
| 2826 | (line-height . 11.45) | ||
| 2827 | (space-width . 2.2) | ||
| 2828 | (avg-char-width . 4.10811)) | ||
| 2829 | ;; We keep this wrong entry name (but with correct font name) for | ||
| 2830 | ;; backward compatibility. | ||
| 2823 | (Zapf-Chancery-MediumItalic | 2831 | (Zapf-Chancery-MediumItalic |
| 2824 | (fonts (normal . "Zapf-Chancery-MediumItalic")) | 2832 | (fonts (normal . "ZapfChancery-MediumItalic")) |
| 2825 | (size . 10.0) | 2833 | (size . 10.0) |
| 2826 | (line-height . 11.45) | 2834 | (line-height . 11.45) |
| 2827 | (space-width . 2.2) | 2835 | (space-width . 2.2) |
diff --git a/lisp/replace.el b/lisp/replace.el index 42480b656d6..de3577913c1 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1435,7 +1435,8 @@ make, or the user didn't cancel the call." | |||
| 1435 | query-replace-skip-read-only)) | 1435 | query-replace-skip-read-only)) |
| 1436 | (unless (or literal noedit) | 1436 | (unless (or literal noedit) |
| 1437 | (replace-highlight (nth 0 real-match-data) | 1437 | (replace-highlight (nth 0 real-match-data) |
| 1438 | (nth 1 real-match-data))) | 1438 | (nth 1 real-match-data) |
| 1439 | start end)) | ||
| 1439 | (setq noedit | 1440 | (setq noedit |
| 1440 | (replace-match-maybe-edit | 1441 | (replace-match-maybe-edit |
| 1441 | next-replacement nocasify literal | 1442 | next-replacement nocasify literal |
| @@ -1451,7 +1452,8 @@ make, or the user didn't cancel the call." | |||
| 1451 | ;; `real-match-data'. | 1452 | ;; `real-match-data'. |
| 1452 | (while (not done) | 1453 | (while (not done) |
| 1453 | (set-match-data real-match-data) | 1454 | (set-match-data real-match-data) |
| 1454 | (replace-highlight (match-beginning 0) (match-end 0)) | 1455 | (replace-highlight (match-beginning 0) (match-end 0) |
| 1456 | start end) | ||
| 1455 | ;; Bind message-log-max so we don't fill up the message log | 1457 | ;; Bind message-log-max so we don't fill up the message log |
| 1456 | ;; with a bunch of identical messages. | 1458 | ;; with a bunch of identical messages. |
| 1457 | (let ((message-log-max nil)) | 1459 | (let ((message-log-max nil)) |
| @@ -1627,15 +1629,15 @@ make, or the user didn't cancel the call." | |||
| 1627 | 1629 | ||
| 1628 | (defvar replace-overlay nil) | 1630 | (defvar replace-overlay nil) |
| 1629 | 1631 | ||
| 1630 | (defun replace-highlight (beg end) | 1632 | (defun replace-highlight (match-beg match-end range-beg range-end) |
| 1631 | (if query-replace-highlight | 1633 | (if query-replace-highlight |
| 1632 | (if replace-overlay | 1634 | (if replace-overlay |
| 1633 | (move-overlay replace-overlay beg end (current-buffer)) | 1635 | (move-overlay replace-overlay match-beg match-end (current-buffer)) |
| 1634 | (setq replace-overlay (make-overlay beg end)) | 1636 | (setq replace-overlay (make-overlay match-beg match-end)) |
| 1635 | (overlay-put replace-overlay 'priority 1) ;higher than lazy overlays | 1637 | (overlay-put replace-overlay 'priority 1) ;higher than lazy overlays |
| 1636 | (overlay-put replace-overlay 'face 'query-replace))) | 1638 | (overlay-put replace-overlay 'face 'query-replace))) |
| 1637 | (if query-replace-lazy-highlight | 1639 | (when query-replace-lazy-highlight |
| 1638 | (isearch-lazy-highlight-new-loop))) | 1640 | (isearch-lazy-highlight-new-loop range-beg range-end))) |
| 1639 | 1641 | ||
| 1640 | (defun replace-dehighlight () | 1642 | (defun replace-dehighlight () |
| 1641 | (when replace-overlay | 1643 | (when replace-overlay |
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 6369f9637db..bfe2cd8282b 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el | |||
| @@ -679,9 +679,12 @@ While entering the regexp, completion on knows citation keys is possible. | |||
| 679 | (setq start (1+ start))))) | 679 | (setq start (1+ start))))) |
| 680 | ;; Should we cleanup empty optional arguments? | 680 | ;; Should we cleanup empty optional arguments? |
| 681 | ;; if the first is empty, it can be removed. If the second is empty, | 681 | ;; if the first is empty, it can be removed. If the second is empty, |
| 682 | ;; it has to go. | 682 | ;; it has to go. If there is only a single arg and empty, it can go |
| 683 | ;; as well. | ||
| 683 | (when reftex-cite-cleanup-optional-args | 684 | (when reftex-cite-cleanup-optional-args |
| 684 | (cond | 685 | (cond |
| 686 | ((string-match "\\([a-zA-Z0-9]\\)\\[\\]{" string) | ||
| 687 | (setq string (replace-match "\\1{" nil nil string))) | ||
| 685 | ((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string) | 688 | ((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string) |
| 686 | (setq string (replace-match "\\1" nil nil string))) | 689 | (setq string (replace-match "\\1" nil nil string))) |
| 687 | ((string-match "\\[\\]\\[\\]" string) | 690 | ((string-match "\\[\\]\\[\\]" string) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 6dac2389e71..8bc7209749f 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2005-02-14 Michael Welsh Duggan <md5i@cs.cmu.edu> | ||
| 2 | |||
| 3 | * url-http.el (url-http-parse-headers): Test url-automatic-caching. | ||
| 4 | |||
| 1 | 2005-01-22 Klaus Straubinger <KSNetz@Arcor.DE> (tiny change) | 5 | 2005-01-22 Klaus Straubinger <KSNetz@Arcor.DE> (tiny change) |
| 2 | 6 | ||
| 3 | * url-http.el (url-http-parse-headers) <302>: Reset url-http-data | 7 | * url-http.el (url-http-parse-headers) <302>: Reset url-http-data |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 3a0fbf6ecd6..872ea22ce05 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -413,7 +413,7 @@ should be shown to the user." | |||
| 413 | ;; Generic success for all others. Store in the cache, and | 413 | ;; Generic success for all others. Store in the cache, and |
| 414 | ;; mark it as successful. | 414 | ;; mark it as successful. |
| 415 | (widen) | 415 | (widen) |
| 416 | (if (equal url-http-method "GET") | 416 | (if (and url-automatic-caching (equal url-http-method "GET")) |
| 417 | (url-store-in-cache (current-buffer))) | 417 | (url-store-in-cache (current-buffer))) |
| 418 | (setq success t)))) | 418 | (setq success t)))) |
| 419 | (3 ; Redirection | 419 | (3 ; Redirection |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index ec5129e0b91..7da20942eaf 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,72 @@ | |||
| 1 | 2005-02-14 Lute Kamstra <lute@gnu.org> | ||
| 2 | |||
| 3 | * elisp.texi (Top): Remove reference to deleted node. | ||
| 4 | |||
| 5 | * lists.texi (Lists): Remove reference to deleted node. | ||
| 6 | (Cons Cells): Fix typo. | ||
| 7 | |||
| 8 | * loading.texi (Where Defined): Fix typo. | ||
| 9 | |||
| 10 | 2005-02-14 Richard M. Stallman <rms@gnu.org> | ||
| 11 | |||
| 12 | * variables.texi (Creating Buffer-Local): change-major-mode-hook | ||
| 13 | is useful for discarding some minor modes. | ||
| 14 | |||
| 15 | * symbols.texi (Symbol Components): Reorder examples. | ||
| 16 | |||
| 17 | * streams.texi (Input Functions): State standard-input default. | ||
| 18 | (Output Variables): State standard-output default. | ||
| 19 | |||
| 20 | * objects.texi (Printed Representation): Clarify read syntax vs print. | ||
| 21 | (Floating Point Type): Explain meaning better. | ||
| 22 | (Symbol Type): Explain uniqueness better. | ||
| 23 | (Cons Cell Type): Explain empty list sooner. CAR and CDR later. | ||
| 24 | List examples sooner. | ||
| 25 | (Box Diagrams): New subnode broken out. | ||
| 26 | Some examples moved from old Lists as Boxes node. | ||
| 27 | (Dotted Pair Notation): Clarify intro. | ||
| 28 | (Array Type): Clarify. | ||
| 29 | (Type Predicates): Add hash-table-p. | ||
| 30 | |||
| 31 | * numbers.texi (Integer Basics): Clarify radix explanation. | ||
| 32 | (Predicates on Numbers): Minor clarification. | ||
| 33 | (Comparison of Numbers): Minor clarification. Clarify eql. | ||
| 34 | Typos in min, max. | ||
| 35 | (Math Functions): Clarify overflow in expt. | ||
| 36 | |||
| 37 | * minibuf.texi (Text from Minibuffer): Minor clarification. | ||
| 38 | Mention arrow keys. | ||
| 39 | |||
| 40 | * loading.texi (Autoload): defun's doc string overrides autoload's | ||
| 41 | doc string. | ||
| 42 | (Repeated Loading): Modernize "add to list" examples. | ||
| 43 | (Where Defined): Finish updating table of load-history elts. | ||
| 44 | |||
| 45 | * lists.texi (List-related Predicates): Minor wording improvement. | ||
| 46 | (Lists as Boxes): Node deleted. | ||
| 47 | (Building Lists): Explain trivial cases of number-sequence. | ||
| 48 | |||
| 49 | * hash.texi (Hash Tables): Add desc to menu items. | ||
| 50 | (Creating Hash): Expain "full" means "make larger", | ||
| 51 | (Hash Access): Any object can be a key. | ||
| 52 | State value of maphash. | ||
| 53 | |||
| 54 | * functions.texi (What Is a Function): Wording cleanup. | ||
| 55 | (Function Documentation): Minor cleanup. | ||
| 56 | Explain purpose of calling convention at end of doc string. | ||
| 57 | (Function Names): Wording cleanup. | ||
| 58 | (Calling Functions): Wording cleanup. | ||
| 59 | Explain better how funcall calls the function. | ||
| 60 | (Function Cells): Delete example of saving and redefining function. | ||
| 61 | |||
| 62 | * control.texi (Combining Conditions): Wording cleanup. | ||
| 63 | (Iteration): dolist and dotimes bind VAR locally. | ||
| 64 | (Cleanups): Xref to Atomic Changes. | ||
| 65 | |||
| 66 | * compile.texi (Byte Compilation): Delete 19.29 info. | ||
| 67 | (Compilation Functions): Macros' difficulties don't affect defsubst. | ||
| 68 | (Docs and Compilation): Delete 19.29 info. | ||
| 69 | |||
| 1 | 2005-02-10 Richard M. Stallman <rms@gnu.org> | 70 | 2005-02-10 Richard M. Stallman <rms@gnu.org> |
| 2 | 71 | ||
| 3 | * objects.texi (Symbol Type): Minor correction. | 72 | * objects.texi (Symbol Type): Minor correction. |
diff --git a/lispref/compile.texi b/lispref/compile.texi index 6c28708bdf1..91c0661a99e 100644 --- a/lispref/compile.texi +++ b/lispref/compile.texi | |||
| @@ -27,17 +27,7 @@ results compatible with running the same file without compilation. | |||
| 27 | @xref{Loading Non-ASCII}. | 27 | @xref{Loading Non-ASCII}. |
| 28 | 28 | ||
| 29 | In general, any version of Emacs can run byte-compiled code produced | 29 | In general, any version of Emacs can run byte-compiled code produced |
| 30 | by recent earlier versions of Emacs, but the reverse is not true. A | 30 | by recent earlier versions of Emacs, but the reverse is not true. |
| 31 | major incompatible change was introduced in Emacs version 19.29, and | ||
| 32 | files compiled with versions since that one will definitely not run | ||
| 33 | in earlier versions unless you specify a special option. | ||
| 34 | @iftex | ||
| 35 | @xref{Docs and Compilation}. | ||
| 36 | @end iftex | ||
| 37 | In addition, the modifier bits in keyboard characters were renumbered in | ||
| 38 | Emacs 19.29; as a result, files compiled in versions before 19.29 will | ||
| 39 | not work in subsequent versions if they contain character constants with | ||
| 40 | modifier bits. | ||
| 41 | 31 | ||
| 42 | @vindex no-byte-compile | 32 | @vindex no-byte-compile |
| 43 | If you do not want a Lisp file to be compiled, ever, put a file-local | 33 | If you do not want a Lisp file to be compiled, ever, put a file-local |
| @@ -122,6 +112,9 @@ macros must already be defined for proper compilation. For more | |||
| 122 | details, see @ref{Compiling Macros}. If a program does not work the | 112 | details, see @ref{Compiling Macros}. If a program does not work the |
| 123 | same way when compiled as it does when interpreted, erroneous macro | 113 | same way when compiled as it does when interpreted, erroneous macro |
| 124 | definitions are one likely cause (@pxref{Problems with Macros}). | 114 | definitions are one likely cause (@pxref{Problems with Macros}). |
| 115 | Inline (@code{defsubst}) functions are less troublesome; if you | ||
| 116 | compile a call to such a function before its definition is known, the | ||
| 117 | call will still work right, it will just run slower. | ||
| 125 | 118 | ||
| 126 | Normally, compiling a file does not evaluate the file's contents or | 119 | Normally, compiling a file does not evaluate the file's contents or |
| 127 | load the file. But it does execute any @code{require} calls at top | 120 | load the file. But it does execute any @code{require} calls at top |
| @@ -313,14 +306,13 @@ directory where you built it, you will experience this problem | |||
| 313 | occasionally if you edit and recompile Lisp files. When it happens, you | 306 | occasionally if you edit and recompile Lisp files. When it happens, you |
| 314 | can cure the problem by reloading the file after recompiling it. | 307 | can cure the problem by reloading the file after recompiling it. |
| 315 | 308 | ||
| 316 | Byte-compiled files made with recent versions of Emacs (since 19.29) | 309 | You can turn off this feature at compile time by setting |
| 317 | will not load into older versions because the older versions don't | 310 | @code{byte-compile-dynamic-docstrings} to @code{nil}; this is useful |
| 318 | support this feature. You can turn off this feature at compile time by | 311 | mainly if you expect to change the file, and you want Emacs processes |
| 319 | setting @code{byte-compile-dynamic-docstrings} to @code{nil}; then you | 312 | that have already loaded it to keep working when the file changes. |
| 320 | can compile files that will load into older Emacs versions. You can do | 313 | You can do this globally, or for one source file by specifying a |
| 321 | this globally, or for one source file by specifying a file-local binding | 314 | file-local binding for the variable. One way to do that is by adding |
| 322 | for the variable. One way to do that is by adding this string to the | 315 | this string to the file's first line: |
| 323 | file's first line: | ||
| 324 | 316 | ||
| 325 | @example | 317 | @example |
| 326 | -*-byte-compile-dynamic-docstrings: nil;-*- | 318 | -*-byte-compile-dynamic-docstrings: nil;-*- |
diff --git a/lispref/control.texi b/lispref/control.texi index e2a1e26b170..760e7bb82de 100644 --- a/lispref/control.texi +++ b/lispref/control.texi | |||
| @@ -346,8 +346,8 @@ Here is a more realistic example of using @code{and}: | |||
| 346 | Note that @code{(car foo)} is not executed if @code{(consp foo)} returns | 346 | Note that @code{(car foo)} is not executed if @code{(consp foo)} returns |
| 347 | @code{nil}, thus avoiding an error. | 347 | @code{nil}, thus avoiding an error. |
| 348 | 348 | ||
| 349 | @code{and} can be expressed in terms of either @code{if} or @code{cond}. | 349 | @code{and} expressions can also be written using either @code{if} or |
| 350 | For example: | 350 | @code{cond}. Here's how: |
| 351 | 351 | ||
| 352 | @example | 352 | @example |
| 353 | @group | 353 | @group |
| @@ -476,11 +476,11 @@ write two common kinds of loops. | |||
| 476 | 476 | ||
| 477 | @defmac dolist (var list [result]) body@dots{} | 477 | @defmac dolist (var list [result]) body@dots{} |
| 478 | @tindex dolist | 478 | @tindex dolist |
| 479 | This construct executes @var{body} once for each element of @var{list}, | 479 | This construct executes @var{body} once for each element of |
| 480 | using the variable @var{var} to hold the current element. Then it | 480 | @var{list}, binding the variable @var{var} locally to hold the current |
| 481 | returns the value of evaluating @var{result}, or @code{nil} if | 481 | element. Then it returns the value of evaluating @var{result}, or |
| 482 | @var{result} is omitted. For example, here is how you could use | 482 | @code{nil} if @var{result} is omitted. For example, here is how you |
| 483 | @code{dolist} to define the @code{reverse} function: | 483 | could use @code{dolist} to define the @code{reverse} function: |
| 484 | 484 | ||
| 485 | @example | 485 | @example |
| 486 | (defun reverse (list) | 486 | (defun reverse (list) |
| @@ -493,8 +493,8 @@ returns the value of evaluating @var{result}, or @code{nil} if | |||
| 493 | @defmac dotimes (var count [result]) body@dots{} | 493 | @defmac dotimes (var count [result]) body@dots{} |
| 494 | @tindex dotimes | 494 | @tindex dotimes |
| 495 | This construct executes @var{body} once for each integer from 0 | 495 | This construct executes @var{body} once for each integer from 0 |
| 496 | (inclusive) to @var{count} (exclusive), using the variable @var{var} to | 496 | (inclusive) to @var{count} (exclusive), binding the variable @var{var} |
| 497 | hold the integer for the current iteration. Then it returns the value | 497 | to the integer for the current iteration. Then it returns the value |
| 498 | of evaluating @var{result}, or @code{nil} if @var{result} is omitted. | 498 | of evaluating @var{result}, or @code{nil} if @var{result} is omitted. |
| 499 | Here is an example of using @code{dotimes} to do something 100 times: | 499 | Here is an example of using @code{dotimes} to do something 100 times: |
| 500 | 500 | ||
| @@ -1167,7 +1167,10 @@ and their conditions. | |||
| 1167 | 1167 | ||
| 1168 | The @code{unwind-protect} construct is essential whenever you | 1168 | The @code{unwind-protect} construct is essential whenever you |
| 1169 | temporarily put a data structure in an inconsistent state; it permits | 1169 | temporarily put a data structure in an inconsistent state; it permits |
| 1170 | you to make the data consistent again in the event of an error or throw. | 1170 | you to make the data consistent again in the event of an error or |
| 1171 | throw. (Another more specific cleanup construct that is used only for | ||
| 1172 | changes in buffer contents is the atomic change group; @ref{Atomic | ||
| 1173 | Changes}.) | ||
| 1171 | 1174 | ||
| 1172 | @defspec unwind-protect body-form cleanup-forms@dots{} | 1175 | @defspec unwind-protect body-form cleanup-forms@dots{} |
| 1173 | @cindex cleanup forms | 1176 | @cindex cleanup forms |
diff --git a/lispref/elisp.texi b/lispref/elisp.texi index fa84a0a93fb..64e956afdf3 100644 --- a/lispref/elisp.texi +++ b/lispref/elisp.texi | |||
| @@ -34,7 +34,7 @@ Published by the Free Software Foundation | |||
| 34 | 59 Temple Place, Suite 330 | 34 | 59 Temple Place, Suite 330 |
| 35 | Boston, MA 02111-1307 USA | 35 | Boston, MA 02111-1307 USA |
| 36 | 36 | ||
| 37 | Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,@* | 37 | Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2005,@* |
| 38 | 2000, 2002 Free Software Foundation, Inc. | 38 | 2000, 2002 Free Software Foundation, Inc. |
| 39 | 39 | ||
| 40 | Permission is granted to copy, distribute and/or modify this document | 40 | Permission is granted to copy, distribute and/or modify this document |
| @@ -281,7 +281,6 @@ Strings and Characters | |||
| 281 | Lists | 281 | Lists |
| 282 | 282 | ||
| 283 | * Cons Cells:: How lists are made out of cons cells. | 283 | * Cons Cells:: How lists are made out of cons cells. |
| 284 | * Lists as Boxes:: Graphical notation to explain lists. | ||
| 285 | * List-related Predicates:: Is this object a list? Comparing two lists. | 284 | * List-related Predicates:: Is this object a list? Comparing two lists. |
| 286 | * List Elements:: Extracting the pieces of a list. | 285 | * List Elements:: Extracting the pieces of a list. |
| 287 | * Building Lists:: Creating list structure. | 286 | * Building Lists:: Creating list structure. |
diff --git a/lispref/functions.texi b/lispref/functions.texi index 5c7433507b0..26c2449fee6 100644 --- a/lispref/functions.texi +++ b/lispref/functions.texi | |||
| @@ -53,7 +53,7 @@ macros are not functions. | |||
| 53 | @cindex built-in function | 53 | @cindex built-in function |
| 54 | A @dfn{primitive} is a function callable from Lisp that is written in C, | 54 | A @dfn{primitive} is a function callable from Lisp that is written in C, |
| 55 | such as @code{car} or @code{append}. These functions are also called | 55 | such as @code{car} or @code{append}. These functions are also called |
| 56 | @dfn{built-in} functions or @dfn{subrs}. (Special forms are also | 56 | @dfn{built-in functions}, or @dfn{subrs}. (Special forms are also |
| 57 | considered primitives.) | 57 | considered primitives.) |
| 58 | 58 | ||
| 59 | Usually the reason we implement a function as a primitive is either | 59 | Usually the reason we implement a function as a primitive is either |
| @@ -412,13 +412,14 @@ are easier to access. | |||
| 412 | because @code{apropos} displays just this first line. It should consist | 412 | because @code{apropos} displays just this first line. It should consist |
| 413 | of one or two complete sentences that summarize the function's purpose. | 413 | of one or two complete sentences that summarize the function's purpose. |
| 414 | 414 | ||
| 415 | The start of the documentation string is usually indented in the source file, | 415 | The start of the documentation string is usually indented in the |
| 416 | but since these spaces come before the starting double-quote, they are not part of | 416 | source file, but since these spaces come before the starting |
| 417 | the string. Some people make a practice of indenting any additional | 417 | double-quote, they are not part of the string. Some people make a |
| 418 | lines of the string so that the text lines up in the program source. | 418 | practice of indenting any additional lines of the string so that the |
| 419 | @emph{That is a mistake.} The indentation of the following lines is | 419 | text lines up in the program source. @emph{That is a mistake.} The |
| 420 | inside the string; what looks nice in the source code will look ugly | 420 | indentation of the following lines is inside the string; what looks |
| 421 | when displayed by the help commands. | 421 | nice in the source code will look ugly when displayed by the help |
| 422 | commands. | ||
| 422 | 423 | ||
| 423 | You may wonder how the documentation string could be optional, since | 424 | You may wonder how the documentation string could be optional, since |
| 424 | there are required components of the function that follow it (the body). | 425 | there are required components of the function that follow it (the body). |
| @@ -438,9 +439,14 @@ text like this: | |||
| 438 | 439 | ||
| 439 | @noindent | 440 | @noindent |
| 440 | following a blank line, at the beginning of the line, with no newline | 441 | following a blank line, at the beginning of the line, with no newline |
| 441 | following it inside the documentation string. This feature is | 442 | following it inside the documentation string. (The @samp{\} is used |
| 442 | particularly useful for macro definitions. The @samp{\} is used to | 443 | to avoid confusing the Emacs motion commands.) The calling convention |
| 443 | avoid confusing the Emacs motion commands. | 444 | specified in this way appears in help messages in place of the one |
| 445 | derived from the actual arguments of the function. | ||
| 446 | |||
| 447 | This feature is particularly useful for macro definitions, since the | ||
| 448 | arguments written in a macro definition often do not correspond to the | ||
| 449 | way users think of the parts of the macro call. | ||
| 444 | 450 | ||
| 445 | @node Function Names | 451 | @node Function Names |
| 446 | @section Naming a Function | 452 | @section Naming a Function |
| @@ -481,8 +487,8 @@ practice). | |||
| 481 | We often identify functions with the symbols used to name them. For | 487 | We often identify functions with the symbols used to name them. For |
| 482 | example, we often speak of ``the function @code{car}'', not | 488 | example, we often speak of ``the function @code{car}'', not |
| 483 | distinguishing between the symbol @code{car} and the primitive | 489 | distinguishing between the symbol @code{car} and the primitive |
| 484 | subr-object that is its function definition. For most purposes, there | 490 | subr-object that is its function definition. For most purposes, the |
| 485 | is no need to distinguish. | 491 | distinction is not important. |
| 486 | 492 | ||
| 487 | Even so, keep in mind that a function need not have a unique name. While | 493 | Even so, keep in mind that a function need not have a unique name. While |
| 488 | a given function object @emph{usually} appears in the function cell of only | 494 | a given function object @emph{usually} appears in the function cell of only |
| @@ -626,13 +632,12 @@ For example, evaluating the list @code{(concat "a" "b")} calls the | |||
| 626 | function @code{concat} with arguments @code{"a"} and @code{"b"}. | 632 | function @code{concat} with arguments @code{"a"} and @code{"b"}. |
| 627 | @xref{Evaluation}, for a description of evaluation. | 633 | @xref{Evaluation}, for a description of evaluation. |
| 628 | 634 | ||
| 629 | When you write a list as an expression in your program, the function | 635 | When you write a list as an expression in your program, you specify |
| 630 | name it calls is written in your program. This means that you choose | 636 | which function to call, and how many arguments to give it, in the text |
| 631 | which function to call, and how many arguments to give it, when you | 637 | of the program. Usually that's just what you want. Occasionally you |
| 632 | write the program. Usually that's just what you want. Occasionally you | 638 | need to compute at run time which function to call. To do that, use |
| 633 | need to compute at run time which function to call. To do that, use the | 639 | the function @code{funcall}. When you also need to determine at run |
| 634 | function @code{funcall}. When you also need to determine at run time | 640 | time how many arguments to pass, use @code{apply}. |
| 635 | how many arguments to pass, use @code{apply}. | ||
| 636 | 641 | ||
| 637 | @defun funcall function &rest arguments | 642 | @defun funcall function &rest arguments |
| 638 | @code{funcall} calls @var{function} with @var{arguments}, and returns | 643 | @code{funcall} calls @var{function} with @var{arguments}, and returns |
| @@ -641,11 +646,12 @@ whatever @var{function} returns. | |||
| 641 | Since @code{funcall} is a function, all of its arguments, including | 646 | Since @code{funcall} is a function, all of its arguments, including |
| 642 | @var{function}, are evaluated before @code{funcall} is called. This | 647 | @var{function}, are evaluated before @code{funcall} is called. This |
| 643 | means that you can use any expression to obtain the function to be | 648 | means that you can use any expression to obtain the function to be |
| 644 | called. It also means that @code{funcall} does not see the expressions | 649 | called. It also means that @code{funcall} does not see the |
| 645 | you write for the @var{arguments}, only their values. These values are | 650 | expressions you write for the @var{arguments}, only their values. |
| 646 | @emph{not} evaluated a second time in the act of calling @var{function}; | 651 | These values are @emph{not} evaluated a second time in the act of |
| 647 | @code{funcall} enters the normal procedure for calling a function at the | 652 | calling @var{function}; the operation of @code{funcall} is like the |
| 648 | place where the arguments have already been evaluated. | 653 | normal procedure for calling a function, once its arguments have |
| 654 | already been evaluated. | ||
| 649 | 655 | ||
| 650 | The argument @var{function} must be either a Lisp function or a | 656 | The argument @var{function} must be either a Lisp function or a |
| 651 | primitive function. Special forms and macros are not allowed, because | 657 | primitive function. Special forms and macros are not allowed, because |
| @@ -1137,30 +1143,12 @@ Here are examples of these uses: | |||
| 1137 | @end example | 1143 | @end example |
| 1138 | @end defun | 1144 | @end defun |
| 1139 | 1145 | ||
| 1140 | When writing a function that extends a previously defined function, | 1146 | @code{fset} is sometimes used to save the old definition of a |
| 1141 | the following idiom is sometimes used: | 1147 | function before redefining it. That permits the new definition to |
| 1142 | 1148 | invoke the old definition. But it is unmodular and unclean for a Lisp | |
| 1143 | @example | 1149 | file to redefine a function defined elsewhere. If you want to modify |
| 1144 | (fset 'old-foo (symbol-function 'foo)) | 1150 | a function defined by another package, it is cleaner to use |
| 1145 | (defun foo () | 1151 | @code{defadvice} (@pxref{Advising Functions}). |
| 1146 | "Just like old-foo, except more so." | ||
| 1147 | @group | ||
| 1148 | (old-foo) | ||
| 1149 | (more-so)) | ||
| 1150 | @end group | ||
| 1151 | @end example | ||
| 1152 | |||
| 1153 | @noindent | ||
| 1154 | This does not work properly if @code{foo} has been defined to autoload. | ||
| 1155 | In such a case, when @code{foo} calls @code{old-foo}, Lisp attempts | ||
| 1156 | to define @code{old-foo} by loading a file. Since this presumably | ||
| 1157 | defines @code{foo} rather than @code{old-foo}, it does not produce the | ||
| 1158 | proper results. The only way to avoid this problem is to make sure the | ||
| 1159 | file is loaded before moving aside the old definition of @code{foo}. | ||
| 1160 | |||
| 1161 | But it is unmodular and unclean, in any case, for a Lisp file to | ||
| 1162 | redefine a function defined elsewhere. It is cleaner to use the advice | ||
| 1163 | facility (@pxref{Advising Functions}). | ||
| 1164 | 1152 | ||
| 1165 | @node Inline Functions | 1153 | @node Inline Functions |
| 1166 | @section Inline Functions | 1154 | @section Inline Functions |
diff --git a/lispref/hash.texi b/lispref/hash.texi index 107935f1ba0..9343196a238 100644 --- a/lispref/hash.texi +++ b/lispref/hash.texi | |||
| @@ -46,10 +46,10 @@ of object and are used only for recording interned symbols | |||
| 46 | (@pxref{Creating Symbols}). | 46 | (@pxref{Creating Symbols}). |
| 47 | 47 | ||
| 48 | @menu | 48 | @menu |
| 49 | * Creating Hash:: | 49 | * Creating Hash:: Functions to create hash tables. |
| 50 | * Hash Access:: | 50 | * Hash Access:: Reading and writing the hash table contents. |
| 51 | * Defining Hash:: | 51 | * Defining Hash:: Defining new comparison methods |
| 52 | * Other Hash:: | 52 | * Other Hash:: Miscellaneous. |
| 53 | @end menu | 53 | @end menu |
| 54 | 54 | ||
| 55 | @node Creating Hash | 55 | @node Creating Hash |
| @@ -146,11 +146,11 @@ number. | |||
| 146 | The default value is 1.5. | 146 | The default value is 1.5. |
| 147 | 147 | ||
| 148 | @item :rehash-threshold @var{threshold} | 148 | @item :rehash-threshold @var{threshold} |
| 149 | This specifies the criterion for when the hash table is ``full.'' The | 149 | This specifies the criterion for when the hash table is ``full'' (so |
| 150 | value, @var{threshold}, should be a positive floating point number, no | 150 | it should be made larger). The value, @var{threshold}, should be a |
| 151 | greater than 1. The hash table is ``full'' whenever the actual number of | 151 | positive floating point number, no greater than 1. The hash table is |
| 152 | entries exceeds this fraction of the nominal size. The default for | 152 | ``full'' whenever the actual number of entries exceeds this fraction |
| 153 | @var{threshold} is 0.8. | 153 | of the nominal size. The default for @var{threshold} is 0.8. |
| 154 | @end table | 154 | @end table |
| 155 | @end defun | 155 | @end defun |
| 156 | 156 | ||
| @@ -167,7 +167,9 @@ This function is obsolete. Use @code{make-hash-table} instead. | |||
| 167 | @section Hash Table Access | 167 | @section Hash Table Access |
| 168 | 168 | ||
| 169 | This section describes the functions for accessing and storing | 169 | This section describes the functions for accessing and storing |
| 170 | associations in a hash table. | 170 | associations in a hash table. In general, any Lisp object can be used |
| 171 | as a hash key, unless the comparison method imposes limits. Any Lisp | ||
| 172 | object can also be used as the value. | ||
| 171 | 173 | ||
| 172 | @tindex gethash | 174 | @tindex gethash |
| 173 | @defun gethash key table &optional default | 175 | @defun gethash key table &optional default |
| @@ -210,7 +212,7 @@ table. | |||
| 210 | This function calls @var{function} once for each of the associations in | 212 | This function calls @var{function} once for each of the associations in |
| 211 | @var{table}. The function @var{function} should accept two | 213 | @var{table}. The function @var{function} should accept two |
| 212 | arguments---a @var{key} listed in @var{table}, and its associated | 214 | arguments---a @var{key} listed in @var{table}, and its associated |
| 213 | @var{value}. | 215 | @var{value}. @code{maphash} returns @code{nil}. |
| 214 | @end defun | 216 | @end defun |
| 215 | 217 | ||
| 216 | @node Defining Hash | 218 | @node Defining Hash |
diff --git a/lispref/lists.texi b/lispref/lists.texi index d30dcb0c270..dbcddd741b3 100644 --- a/lispref/lists.texi +++ b/lispref/lists.texi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, | 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, |
| 4 | @c 2003, 2004 | 4 | @c 2003, 2004, 2005 |
| 5 | @c Free Software Foundation, Inc. | 5 | @c Free Software Foundation, Inc. |
| 6 | @c See the file elisp.texi for copying conditions. | 6 | @c See the file elisp.texi for copying conditions. |
| 7 | @setfilename ../info/lists | 7 | @setfilename ../info/lists |
| @@ -18,7 +18,6 @@ the whole list. | |||
| 18 | 18 | ||
| 19 | @menu | 19 | @menu |
| 20 | * Cons Cells:: How lists are made out of cons cells. | 20 | * Cons Cells:: How lists are made out of cons cells. |
| 21 | * Lists as Boxes:: Graphical notation to explain lists. | ||
| 22 | * List-related Predicates:: Is this object a list? Comparing two lists. | 21 | * List-related Predicates:: Is this object a list? Comparing two lists. |
| 23 | * List Elements:: Extracting the pieces of a list. | 22 | * List Elements:: Extracting the pieces of a list. |
| 24 | * Building Lists:: Creating list structure. | 23 | * Building Lists:: Creating list structure. |
| @@ -86,100 +85,17 @@ cells. | |||
| 86 | The @sc{cdr} of any nonempty list @var{l} is a list containing all the | 85 | The @sc{cdr} of any nonempty list @var{l} is a list containing all the |
| 87 | elements of @var{l} except the first. | 86 | elements of @var{l} except the first. |
| 88 | 87 | ||
| 89 | @node Lists as Boxes | ||
| 90 | @comment node-name, next, previous, up | ||
| 91 | @section Lists as Linked Pairs of Boxes | ||
| 92 | @cindex box representation for lists | ||
| 93 | @cindex lists represented as boxes | ||
| 94 | @cindex cons cell as box | ||
| 95 | |||
| 96 | A cons cell can be illustrated as a pair of boxes. The first box | ||
| 97 | represents the @sc{car} and the second box represents the @sc{cdr}. | ||
| 98 | Here is an illustration of the two-element list, @code{(tulip lily)}, | ||
| 99 | made from two cons cells: | ||
| 100 | |||
| 101 | @example | ||
| 102 | @group | ||
| 103 | --------------- --------------- | ||
| 104 | | car | cdr | | car | cdr | | ||
| 105 | | tulip | o---------->| lily | nil | | ||
| 106 | | | | | | | | ||
| 107 | --------------- --------------- | ||
| 108 | @end group | ||
| 109 | @end example | ||
| 110 | |||
| 111 | Each pair of boxes represents a cons cell. Each box ``refers to'', | ||
| 112 | ``points to'' or ``holds'' a Lisp object. (These terms are | ||
| 113 | synonymous.) The first box, which describes the @sc{car} of the first | ||
| 114 | cons cell, contains the symbol @code{tulip}. The arrow from the | ||
| 115 | @sc{cdr} box of the first cons cell to the second cons cell indicates | ||
| 116 | that the @sc{cdr} of the first cons cell is the second cons cell. | ||
| 117 | |||
| 118 | The same list can be illustrated in a different sort of box notation | ||
| 119 | like this: | ||
| 120 | |||
| 121 | @example | ||
| 122 | @group | ||
| 123 | --- --- --- --- | ||
| 124 | | | |--> | | |--> nil | ||
| 125 | --- --- --- --- | ||
| 126 | | | | ||
| 127 | | | | ||
| 128 | --> tulip --> lily | ||
| 129 | @end group | ||
| 130 | @end example | ||
| 131 | |||
| 132 | Here is a more complex illustration, showing the three-element list, | ||
| 133 | @code{((pine needles) oak maple)}, the first element of which is a | ||
| 134 | two-element list: | ||
| 135 | |||
| 136 | @example | ||
| 137 | @group | ||
| 138 | --- --- --- --- --- --- | ||
| 139 | | | |--> | | |--> | | |--> nil | ||
| 140 | --- --- --- --- --- --- | ||
| 141 | | | | | ||
| 142 | | | | | ||
| 143 | | --> oak --> maple | ||
| 144 | | | ||
| 145 | | --- --- --- --- | ||
| 146 | --> | | |--> | | |--> nil | ||
| 147 | --- --- --- --- | ||
| 148 | | | | ||
| 149 | | | | ||
| 150 | --> pine --> needles | ||
| 151 | @end group | ||
| 152 | @end example | ||
| 153 | |||
| 154 | The same list represented in the first box notation looks like this: | ||
| 155 | |||
| 156 | @example | ||
| 157 | @group | ||
| 158 | -------------- -------------- -------------- | ||
| 159 | | car | cdr | | car | cdr | | car | cdr | | ||
| 160 | | o | o------->| oak | o------->| maple | nil | | ||
| 161 | | | | | | | | | | | | ||
| 162 | -- | --------- -------------- -------------- | ||
| 163 | | | ||
| 164 | | | ||
| 165 | | -------------- ---------------- | ||
| 166 | | | car | cdr | | car | cdr | | ||
| 167 | ------>| pine | o------->| needles | nil | | ||
| 168 | | | | | | | | ||
| 169 | -------------- ---------------- | ||
| 170 | @end group | ||
| 171 | @end example | ||
| 172 | |||
| 173 | @xref{Cons Cell Type}, for the read and print syntax of cons cells and | 88 | @xref{Cons Cell Type}, for the read and print syntax of cons cells and |
| 174 | lists, and for more ``box and arrow'' illustrations of lists. | 89 | lists, and for ``box and arrow'' illustrations of lists. |
| 175 | 90 | ||
| 176 | @node List-related Predicates | 91 | @node List-related Predicates |
| 177 | @section Predicates on Lists | 92 | @section Predicates on Lists |
| 178 | 93 | ||
| 179 | The following predicates test whether a Lisp object is an atom, is a | 94 | The following predicates test whether a Lisp object is an atom, |
| 180 | cons cell or is a list, or whether it is the distinguished object | 95 | whether it is a cons cell or is a list, or whether it is the |
| 181 | @code{nil}. (Many of these predicates can be defined in terms of the | 96 | distinguished object @code{nil}. (Many of these predicates can be |
| 182 | others, but they are used so often that it is worth having all of them.) | 97 | defined in terms of the others, but they are used so often that it is |
| 98 | worth having all of them.) | ||
| 183 | 99 | ||
| 184 | @defun consp object | 100 | @defun consp object |
| 185 | This function returns @code{t} if @var{object} is a cons cell, @code{nil} | 101 | This function returns @code{t} if @var{object} is a cons cell, @code{nil} |
| @@ -749,9 +665,14 @@ This returns a list of numbers starting with @var{from} and | |||
| 749 | incrementing by @var{separation}, and ending at or just before | 665 | incrementing by @var{separation}, and ending at or just before |
| 750 | @var{to}. @var{separation} can be positive or negative and defaults | 666 | @var{to}. @var{separation} can be positive or negative and defaults |
| 751 | to 1. If @var{to} is @code{nil} or numerically equal to @var{from}, | 667 | to 1. If @var{to} is @code{nil} or numerically equal to @var{from}, |
| 752 | the one element list @code{(from)} is returned. If @var{separation} | 668 | the value is the one-element list @code{(@var{from})}. If @var{to} is |
| 753 | is 0 and @var{to} is neither @code{nil} nor numerically equal to | 669 | less than @var{from} with a positive @var{separation}, or greater than |
| 754 | @var{from}, an error is signaled. | 670 | @var{from} with a negative @var{separation}, the value is @code{nil} |
| 671 | because those arguments specify an empty sequence. | ||
| 672 | |||
| 673 | If @var{separation} is 0 and @var{to} is neither @code{nil} nor | ||
| 674 | numerically equal to @var{from}, @code{number-sequence} signals an | ||
| 675 | error, since those arguments specify an infinite sequence. | ||
| 755 | 676 | ||
| 756 | All arguments can be integers or floating point numbers. However, | 677 | All arguments can be integers or floating point numbers. However, |
| 757 | floating point arguments can be tricky, because floating point | 678 | floating point arguments can be tricky, because floating point |
diff --git a/lispref/loading.texi b/lispref/loading.texi index 61c5b13ca6f..e12826af2f8 100644 --- a/lispref/loading.texi +++ b/lispref/loading.texi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, | 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, |
| 4 | @c 2003, 2004 | 4 | @c 2003, 2004, 2005 |
| 5 | @c Free Software Foundation, Inc. | 5 | @c Free Software Foundation, Inc. |
| 6 | @c See the file elisp.texi for copying conditions. | 6 | @c See the file elisp.texi for copying conditions. |
| 7 | @setfilename ../info/loading | 7 | @setfilename ../info/loading |
| @@ -365,10 +365,12 @@ one of these suffixes, and it will not load from a file whose name is | |||
| 365 | just @var{filename} with no added suffix. | 365 | just @var{filename} with no added suffix. |
| 366 | 366 | ||
| 367 | The argument @var{docstring} is the documentation string for the | 367 | The argument @var{docstring} is the documentation string for the |
| 368 | function. Normally, this should be identical to the documentation string | 368 | function. Specifying the documentation string in the call to |
| 369 | in the function definition itself. Specifying the documentation string | 369 | @code{autoload} makes it possible to look at the documentation without |
| 370 | in the call to @code{autoload} makes it possible to look at the | 370 | loading the function's real definition. Normally, this should be |
| 371 | documentation without loading the function's real definition. | 371 | identical to the documentation string in the function definition |
| 372 | itself. If it isn't, the function definition's documentation string | ||
| 373 | takes effect when it is loaded. | ||
| 372 | 374 | ||
| 373 | If @var{interactive} is non-@code{nil}, that says @var{function} can be | 375 | If @var{interactive} is non-@code{nil}, that says @var{function} can be |
| 374 | called interactively. This lets completion in @kbd{M-x} work without | 376 | called interactively. This lets completion in @kbd{M-x} work without |
| @@ -526,8 +528,7 @@ initialized. (@xref{Defining Variables}.) | |||
| 526 | The simplest way to add an element to an alist is like this: | 528 | The simplest way to add an element to an alist is like this: |
| 527 | 529 | ||
| 528 | @example | 530 | @example |
| 529 | (setq minor-mode-alist | 531 | (push '(leif-mode " Leif") minor-mode-alist) |
| 530 | (cons '(leif-mode " Leif") minor-mode-alist)) | ||
| 531 | @end example | 532 | @end example |
| 532 | 533 | ||
| 533 | @noindent | 534 | @noindent |
| @@ -536,12 +537,15 @@ To avoid the problem, write this: | |||
| 536 | 537 | ||
| 537 | @example | 538 | @example |
| 538 | (or (assq 'leif-mode minor-mode-alist) | 539 | (or (assq 'leif-mode minor-mode-alist) |
| 539 | (setq minor-mode-alist | 540 | (push '(leif-mode " Leif") minor-mode-alist)) |
| 540 | (cons '(leif-mode " Leif") minor-mode-alist))) | ||
| 541 | @end example | 541 | @end example |
| 542 | 542 | ||
| 543 | To add an element to a list just once, you can also use @code{add-to-list} | 543 | @noindent |
| 544 | (@pxref{Setting Variables}). | 544 | or this: |
| 545 | |||
| 546 | @example | ||
| 547 | (add-to-list '(leif-mode " Leif") minor-mode-alist) | ||
| 548 | @end example | ||
| 545 | 549 | ||
| 546 | Occasionally you will want to test explicitly whether a library has | 550 | Occasionally you will want to test explicitly whether a library has |
| 547 | already been loaded. Here's one way to test, in a library, whether it | 551 | already been loaded. Here's one way to test, in a library, whether it |
| @@ -746,12 +750,12 @@ elements have these forms: | |||
| 746 | @item @var{var} | 750 | @item @var{var} |
| 747 | The symbol @var{var} was defined as a variable. | 751 | The symbol @var{var} was defined as a variable. |
| 748 | @item (defun . @var{fun}) | 752 | @item (defun . @var{fun}) |
| 749 | The @var{fun} was defined by this library. | 753 | The function @var{fun} was defined. |
| 750 | @item (t . @var{fun}) | 754 | @item (t . @var{fun}) |
| 751 | The function @var{fun} was previously an autoload before this library | 755 | The function @var{fun} was previously an autoload before this library |
| 752 | redefined it as a function. The following element is always the | 756 | redefined it as a function. The following element is always |
| 753 | symbol @var{fun}, which signifies that the library defined @var{fun} | 757 | @code{(defun . @var{fun})}, which represents defining @var{fun} as a |
| 754 | as a function. | 758 | function. |
| 755 | @item (autoload . @var{fun}) | 759 | @item (autoload . @var{fun}) |
| 756 | The function @var{fun} was defined as an autoload. | 760 | The function @var{fun} was defined as an autoload. |
| 757 | @item (require . @var{feature}) | 761 | @item (require . @var{feature}) |
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index 1455c63fe34..0e855b499ae 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi | |||
| @@ -111,7 +111,8 @@ was supplied when Emacs was started. | |||
| 111 | Most often, the minibuffer is used to read text as a string. It can | 111 | Most often, the minibuffer is used to read text as a string. It can |
| 112 | also be used to read a Lisp object in textual form. The most basic | 112 | also be used to read a Lisp object in textual form. The most basic |
| 113 | primitive for minibuffer input is @code{read-from-minibuffer}; it can do | 113 | primitive for minibuffer input is @code{read-from-minibuffer}; it can do |
| 114 | either one. | 114 | either one. There are also specialized commands for reading |
| 115 | commands, variables, file names, etc. (@pxref{Completion}). | ||
| 115 | 116 | ||
| 116 | In most cases, you should not call minibuffer input functions in the | 117 | In most cases, you should not call minibuffer input functions in the |
| 117 | middle of a Lisp function. Instead, do all minibuffer input as part of | 118 | middle of a Lisp function. Instead, do all minibuffer input as part of |
| @@ -234,9 +235,11 @@ default, it makes the following bindings: | |||
| 234 | @code{abort-recursive-edit} | 235 | @code{abort-recursive-edit} |
| 235 | 236 | ||
| 236 | @item @kbd{M-n} | 237 | @item @kbd{M-n} |
| 238 | @itemx @key{DOWN} | ||
| 237 | @code{next-history-element} | 239 | @code{next-history-element} |
| 238 | 240 | ||
| 239 | @item @kbd{M-p} | 241 | @item @kbd{M-p} |
| 242 | @itemx @key{UP} | ||
| 240 | @code{previous-history-element} | 243 | @code{previous-history-element} |
| 241 | 244 | ||
| 242 | @item @kbd{M-s} | 245 | @item @kbd{M-s} |
diff --git a/lispref/numbers.texi b/lispref/numbers.texi index 53435da081b..776251e4933 100644 --- a/lispref/numbers.texi +++ b/lispref/numbers.texi | |||
| @@ -73,14 +73,21 @@ initial sign and optional final period. | |||
| 73 | @cindex hex numbers | 73 | @cindex hex numbers |
| 74 | @cindex octal numbers | 74 | @cindex octal numbers |
| 75 | @cindex reading numbers in hex, octal, and binary | 75 | @cindex reading numbers in hex, octal, and binary |
| 76 | In addition, the Lisp reader recognizes a syntax for integers in | 76 | The syntax for integers in bases other than 10 uses @samp{#} |
| 77 | bases other than 10: @samp{#B@var{integer}} reads @var{integer} in | 77 | followed by a letter that specifies the radix: @samp{b} for binary, |
| 78 | binary (radix 2), @samp{#O@var{integer}} reads @var{integer} in octal | 78 | @samp{o} for octal, @samp{x} for hex, or @samp{@var{radix}r} to |
| 79 | (radix 8), @samp{#X@var{integer}} reads @var{integer} in hexadecimal | 79 | specify radix @var{radix}. Case is not significant for the letter |
| 80 | (radix 16), and @samp{#@var{radix}r@var{integer}} reads @var{integer} | 80 | that specifies the radix. Thus, @samp{#b@var{integer}} reads |
| 81 | in radix @var{radix} (where @var{radix} is between 2 and 36, | 81 | @var{integer} in binary, and @samp{#@var{radix}r@var{integer}} reads |
| 82 | inclusively). Case is not significant for the letter after @samp{#} | 82 | @var{integer} in radix @var{radix}. Allowed values of @var{radix} run |
| 83 | (@samp{B}, @samp{O}, etc.) that denotes the radix. | 83 | from 2 to 36. For example: |
| 84 | |||
| 85 | @example | ||
| 86 | #b101100 @result{} 44 | ||
| 87 | #o54 @result{} 44 | ||
| 88 | #x2c @result{} 44 | ||
| 89 | #24r1k @result{} 44 | ||
| 90 | @end example | ||
| 84 | 91 | ||
| 85 | To understand how various functions work on integers, especially the | 92 | To understand how various functions work on integers, especially the |
| 86 | bitwise operators (@pxref{Bitwise Operations}), it is often helpful to | 93 | bitwise operators (@pxref{Bitwise Operations}), it is often helpful to |
| @@ -211,13 +218,12 @@ down to an integer. | |||
| 211 | @node Predicates on Numbers | 218 | @node Predicates on Numbers |
| 212 | @section Type Predicates for Numbers | 219 | @section Type Predicates for Numbers |
| 213 | 220 | ||
| 214 | The functions in this section test whether the argument is a number or | 221 | The functions in this section test for numbers, or for a specific |
| 215 | whether it is a certain sort of number. The functions @code{integerp} | 222 | type of number. The functions @code{integerp} and @code{floatp} can |
| 216 | and @code{floatp} can take any type of Lisp object as argument (the | 223 | take any type of Lisp object as argument (they would not be of much |
| 217 | predicates would not be of much use otherwise); but the @code{zerop} | 224 | use otherwise), but the @code{zerop} predicate requires a number as |
| 218 | predicate requires a number as its argument. See also | 225 | its argument. See also @code{integer-or-marker-p} and |
| 219 | @code{integer-or-marker-p} and @code{number-or-marker-p}, in | 226 | @code{number-or-marker-p}, in @ref{Predicates on Markers}. |
| 220 | @ref{Predicates on Markers}. | ||
| 221 | 227 | ||
| 222 | @defun floatp object | 228 | @defun floatp object |
| 223 | This predicate tests whether its argument is a floating point | 229 | This predicate tests whether its argument is a floating point |
| @@ -251,7 +257,7 @@ considered non-negative. | |||
| 251 | This predicate tests whether its argument is zero, and returns @code{t} | 257 | This predicate tests whether its argument is zero, and returns @code{t} |
| 252 | if so, @code{nil} otherwise. The argument must be a number. | 258 | if so, @code{nil} otherwise. The argument must be a number. |
| 253 | 259 | ||
| 254 | These two forms are equivalent: @code{(zerop x)} @equiv{} @code{(= x 0)}. | 260 | @code{(zerop x)} is equivalent to @code{(= x 0)}. |
| 255 | @end defun | 261 | @end defun |
| 256 | 262 | ||
| 257 | @node Comparison of Numbers | 263 | @node Comparison of Numbers |
| @@ -275,10 +281,11 @@ numbers or markers. However, it is a good idea to use @code{=} if you | |||
| 275 | can, even for comparing integers, just in case we change the | 281 | can, even for comparing integers, just in case we change the |
| 276 | representation of integers in a future Emacs version. | 282 | representation of integers in a future Emacs version. |
| 277 | 283 | ||
| 278 | Sometimes it is useful to compare numbers with @code{equal}; it treats | 284 | Sometimes it is useful to compare numbers with @code{equal}; it |
| 279 | two numbers as equal if they have the same data type (both integers, or | 285 | treats two numbers as equal if they have the same data type (both |
| 280 | both floating point) and the same value. By contrast, @code{=} can | 286 | integers, or both floating point) and the same value. By contrast, |
| 281 | treat an integer and a floating point number as equal. | 287 | @code{=} can treat an integer and a floating point number as equal. |
| 288 | @xref{Equality Predicates}. | ||
| 282 | 289 | ||
| 283 | There is another wrinkle: because floating point arithmetic is not | 290 | There is another wrinkle: because floating point arithmetic is not |
| 284 | exact, it is often a bad idea to check for equality of two floating | 291 | exact, it is often a bad idea to check for equality of two floating |
| @@ -309,10 +316,10 @@ returns @code{t} if so, @code{nil} otherwise. | |||
| 309 | @end defun | 316 | @end defun |
| 310 | 317 | ||
| 311 | @defun eql value1 value2 | 318 | @defun eql value1 value2 |
| 312 | This function compares two floating point numbers like @code{=}, and | 319 | This function acts like @code{eq} except when both arguments are |
| 313 | compares two integers like @code{=}, and acts like @code{eq} in all | 320 | numbers. It compares numbers by type and numberic value, so that |
| 314 | other cases. Thus, @code{(eql 1.0 1)} returns @code{nil}, but | 321 | @code{(eql 1.0 1)} returns @code{nil}, but @code{(eql 1.0 1.0)} and |
| 315 | @code{(eql 1.0 1.0)} and @code{(eql 1 1)} both return @code{t}. | 322 | @code{(eql 1 1)} both return @code{t}. |
| 316 | @end defun | 323 | @end defun |
| 317 | 324 | ||
| 318 | @defun /= number-or-marker1 number-or-marker2 | 325 | @defun /= number-or-marker1 number-or-marker2 |
| @@ -345,7 +352,7 @@ otherwise. | |||
| 345 | 352 | ||
| 346 | @defun max number-or-marker &rest numbers-or-markers | 353 | @defun max number-or-marker &rest numbers-or-markers |
| 347 | This function returns the largest of its arguments. | 354 | This function returns the largest of its arguments. |
| 348 | If any of the argument is floating-point, the value is returned | 355 | If any of the arguments is floating-point, the value is returned |
| 349 | as floating point, even if it was given as an integer. | 356 | as floating point, even if it was given as an integer. |
| 350 | 357 | ||
| 351 | @example | 358 | @example |
| @@ -360,7 +367,7 @@ as floating point, even if it was given as an integer. | |||
| 360 | 367 | ||
| 361 | @defun min number-or-marker &rest numbers-or-markers | 368 | @defun min number-or-marker &rest numbers-or-markers |
| 362 | This function returns the smallest of its arguments. | 369 | This function returns the smallest of its arguments. |
| 363 | If any of the argument is floating-point, the value is returned | 370 | If any of the arguments is floating-point, the value is returned |
| 364 | as floating point, even if it was given as an integer. | 371 | as floating point, even if it was given as an integer. |
| 365 | 372 | ||
| 366 | @example | 373 | @example |
| @@ -1147,8 +1154,7 @@ approximately. | |||
| 1147 | @defun expt x y | 1154 | @defun expt x y |
| 1148 | This function returns @var{x} raised to power @var{y}. If both | 1155 | This function returns @var{x} raised to power @var{y}. If both |
| 1149 | arguments are integers and @var{y} is positive, the result is an | 1156 | arguments are integers and @var{y} is positive, the result is an |
| 1150 | integer; in this case, it is truncated to fit the range of possible | 1157 | integer; in this case, overflow causes truncation, so watch out. |
| 1151 | integer values. | ||
| 1152 | @end defun | 1158 | @end defun |
| 1153 | 1159 | ||
| 1154 | @defun sqrt arg | 1160 | @defun sqrt arg |
diff --git a/lispref/objects.texi b/lispref/objects.texi index 43ecb02f09e..f0bef593f29 100644 --- a/lispref/objects.texi +++ b/lispref/objects.texi | |||
| @@ -68,36 +68,37 @@ to use these types can be found in later chapters. | |||
| 68 | 68 | ||
| 69 | The @dfn{printed representation} of an object is the format of the | 69 | The @dfn{printed representation} of an object is the format of the |
| 70 | output generated by the Lisp printer (the function @code{prin1}) for | 70 | output generated by the Lisp printer (the function @code{prin1}) for |
| 71 | that object. The @dfn{read syntax} of an object is the format of the | 71 | that object. Every data type has a unique printed representation. |
| 72 | input accepted by the Lisp reader (the function @code{read}) for that | 72 | The @dfn{read syntax} of an object is the format of the input accepted |
| 73 | object. @xref{Read and Print}. | 73 | by the Lisp reader (the function @code{read}) for that object. This |
| 74 | 74 | is not necessarily unique; many kinds of object have more than one | |
| 75 | Most objects have more than one possible read syntax. Some types of | 75 | syntax. @xref{Read and Print}. |
| 76 | object have no read syntax, since it may not make sense to enter objects | ||
| 77 | of these types directly in a Lisp program. Except for these cases, the | ||
| 78 | printed representation of an object is also a read syntax for it. | ||
| 79 | |||
| 80 | In other languages, an expression is text; it has no other form. In | ||
| 81 | Lisp, an expression is primarily a Lisp object and only secondarily the | ||
| 82 | text that is the object's read syntax. Often there is no need to | ||
| 83 | emphasize this distinction, but you must keep it in the back of your | ||
| 84 | mind, or you will occasionally be very confused. | ||
| 85 | 76 | ||
| 86 | @cindex hash notation | 77 | @cindex hash notation |
| 87 | Every type has a printed representation. Some types have no read | 78 | In most cases, an object's printed representation is also a read |
| 88 | syntax---for example, the buffer type has none. Objects of these types | 79 | syntax for the object. However, some types have no read syntax, since |
| 89 | are printed in @dfn{hash notation}: the characters @samp{#<} followed by | 80 | it does not make sense to enter objects of these types as constants in |
| 90 | a descriptive string (typically the type name followed by the name of | 81 | a Lisp program. These objects are printed in @dfn{hash notation}: the |
| 91 | the object), and closed with a matching @samp{>}. Hash notation cannot | 82 | characters @samp{#<} followed by a descriptive string (typically the |
| 92 | be read at all, so the Lisp reader signals the error | 83 | type name followed by the name of the object), and closed with a |
| 93 | @code{invalid-read-syntax} whenever it encounters @samp{#<}. | 84 | matching @samp{>}. For example: |
| 94 | @kindex invalid-read-syntax | ||
| 95 | 85 | ||
| 96 | @example | 86 | @example |
| 97 | (current-buffer) | 87 | (current-buffer) |
| 98 | @result{} #<buffer objects.texi> | 88 | @result{} #<buffer objects.texi> |
| 99 | @end example | 89 | @end example |
| 100 | 90 | ||
| 91 | @noindent | ||
| 92 | Hash notation cannot be read at all, so the Lisp reader signals the | ||
| 93 | error @code{invalid-read-syntax} whenever it encounters @samp{#<}. | ||
| 94 | @kindex invalid-read-syntax | ||
| 95 | |||
| 96 | In other languages, an expression is text; it has no other form. In | ||
| 97 | Lisp, an expression is primarily a Lisp object and only secondarily the | ||
| 98 | text that is the object's read syntax. Often there is no need to | ||
| 99 | emphasize this distinction, but you must keep it in the back of your | ||
| 100 | mind, or you will occasionally be very confused. | ||
| 101 | |||
| 101 | When you evaluate an expression interactively, the Lisp interpreter | 102 | When you evaluate an expression interactively, the Lisp interpreter |
| 102 | first reads the textual representation of it, producing a Lisp object, | 103 | first reads the textual representation of it, producing a Lisp object, |
| 103 | and then evaluates that object (@pxref{Evaluation}). However, | 104 | and then evaluates that object (@pxref{Evaluation}). However, |
| @@ -204,9 +205,11 @@ leading @samp{+} or a final @samp{.}. | |||
| 204 | @subsection Floating Point Type | 205 | @subsection Floating Point Type |
| 205 | 206 | ||
| 206 | Floating point numbers are the computer equivalent of scientific | 207 | Floating point numbers are the computer equivalent of scientific |
| 207 | notation. The precise number of significant figures and the range of | 208 | notation; you can think of a floating point number as a fraction |
| 208 | possible exponents is machine-specific; Emacs always uses the C data | 209 | together with a power of ten. The precise number of significant |
| 209 | type @code{double} to store the value. | 210 | figures and the range of possible exponents is machine-specific; Emacs |
| 211 | uses the C data type @code{double} to store the value, and internally | ||
| 212 | this records a power of 2 rather than a power of 10. | ||
| 210 | 213 | ||
| 211 | The printed representation for floating point numbers requires either | 214 | The printed representation for floating point numbers requires either |
| 212 | a decimal point (with at least one digit following), an exponent, or | 215 | a decimal point (with at least one digit following), an exponent, or |
| @@ -474,9 +477,10 @@ following text.) | |||
| 474 | @node Symbol Type | 477 | @node Symbol Type |
| 475 | @subsection Symbol Type | 478 | @subsection Symbol Type |
| 476 | 479 | ||
| 477 | A @dfn{symbol} in GNU Emacs Lisp is an object with a name. The symbol | 480 | A @dfn{symbol} in GNU Emacs Lisp is an object with a name. The |
| 478 | name serves as the printed representation of the symbol. In ordinary | 481 | symbol name serves as the printed representation of the symbol. In |
| 479 | use, the name is unique---no two symbols have the same name. | 482 | ordinary Lisp use, with one single obarray (@pxref{Creating Symbols}, |
| 483 | a symbol's name is unique---no two symbols have the same name. | ||
| 480 | 484 | ||
| 481 | A symbol can serve as a variable, as a function name, or to hold a | 485 | A symbol can serve as a variable, as a function name, or to hold a |
| 482 | property list. Or it may serve only to be distinct from all other Lisp | 486 | property list. Or it may serve only to be distinct from all other Lisp |
| @@ -606,18 +610,10 @@ Lisp are implicit. | |||
| 606 | 610 | ||
| 607 | A @dfn{list} is a series of cons cells, linked together so that the | 611 | A @dfn{list} is a series of cons cells, linked together so that the |
| 608 | @sc{cdr} slot of each cons cell holds either the next cons cell or the | 612 | @sc{cdr} slot of each cons cell holds either the next cons cell or the |
| 609 | empty list. @xref{Lists}, for functions that work on lists. Because | 613 | empty list. The empty list is actually the symbol @code{nil}. |
| 610 | most cons cells are used as part of lists, the phrase @dfn{list | 614 | @xref{Lists}, for functions that work on lists. Because most cons |
| 611 | structure} has come to refer to any structure made out of cons cells. | 615 | cells are used as part of lists, the phrase @dfn{list structure} has |
| 612 | 616 | come to refer to any structure made out of cons cells. | |
| 613 | The names @sc{car} and @sc{cdr} derive from the history of Lisp. The | ||
| 614 | original Lisp implementation ran on an @w{IBM 704} computer which | ||
| 615 | divided words into two parts, called the ``address'' part and the | ||
| 616 | ``decrement''; @sc{car} was an instruction to extract the contents of | ||
| 617 | the address part of a register, and @sc{cdr} an instruction to extract | ||
| 618 | the contents of the decrement. By contrast, ``cons cells'' are named | ||
| 619 | for the function @code{cons} that creates them, which in turn was named | ||
| 620 | for its purpose, the construction of cells. | ||
| 621 | 617 | ||
| 622 | @cindex atom | 618 | @cindex atom |
| 623 | Because cons cells are so central to Lisp, we also have a word for | 619 | Because cons cells are so central to Lisp, we also have a word for |
| @@ -627,7 +623,18 @@ for its purpose, the construction of cells. | |||
| 627 | @cindex parenthesis | 623 | @cindex parenthesis |
| 628 | The read syntax and printed representation for lists are identical, and | 624 | The read syntax and printed representation for lists are identical, and |
| 629 | consist of a left parenthesis, an arbitrary number of elements, and a | 625 | consist of a left parenthesis, an arbitrary number of elements, and a |
| 630 | right parenthesis. | 626 | right parenthesis. Here are examples of lists: |
| 627 | |||
| 628 | @example | ||
| 629 | (A 2 "A") ; @r{A list of three elements.} | ||
| 630 | () ; @r{A list of no elements (the empty list).} | ||
| 631 | nil ; @r{A list of no elements (the empty list).} | ||
| 632 | ("A ()") ; @r{A list of one element: the string @code{"A ()"}.} | ||
| 633 | (A ()) ; @r{A list of two elements: @code{A} and the empty list.} | ||
| 634 | (A nil) ; @r{Equivalent to the previous.} | ||
| 635 | ((A B C)) ; @r{A list of one element} | ||
| 636 | ; @r{(which is a list of three elements).} | ||
| 637 | @end example | ||
| 631 | 638 | ||
| 632 | Upon reading, each object inside the parentheses becomes an element | 639 | Upon reading, each object inside the parentheses becomes an element |
| 633 | of the list. That is, a cons cell is made for each element. The | 640 | of the list. That is, a cons cell is made for each element. The |
| @@ -636,8 +643,26 @@ slot refers to the next cons cell of the list, which holds the next | |||
| 636 | element in the list. The @sc{cdr} slot of the last cons cell is set to | 643 | element in the list. The @sc{cdr} slot of the last cons cell is set to |
| 637 | hold @code{nil}. | 644 | hold @code{nil}. |
| 638 | 645 | ||
| 646 | The names @sc{car} and @sc{cdr} derive from the history of Lisp. The | ||
| 647 | original Lisp implementation ran on an @w{IBM 704} computer which | ||
| 648 | divided words into two parts, called the ``address'' part and the | ||
| 649 | ``decrement''; @sc{car} was an instruction to extract the contents of | ||
| 650 | the address part of a register, and @sc{cdr} an instruction to extract | ||
| 651 | the contents of the decrement. By contrast, ``cons cells'' are named | ||
| 652 | for the function @code{cons} that creates them, which in turn was named | ||
| 653 | for its purpose, the construction of cells. | ||
| 654 | |||
| 655 | @menu | ||
| 656 | * Box Diagrams:: Drawing pictures of lists. | ||
| 657 | * Dotted Pair Notation:: A general syntax for cons cells. | ||
| 658 | * Association List Type:: A specially constructed list. | ||
| 659 | @end menu | ||
| 660 | |||
| 661 | @node Box Diagrams | ||
| 662 | @subsubsection Drawing Lists as Box Diagrams | ||
| 639 | @cindex box diagrams, for lists | 663 | @cindex box diagrams, for lists |
| 640 | @cindex diagrams, boxed, for lists | 664 | @cindex diagrams, boxed, for lists |
| 665 | |||
| 641 | A list can be illustrated by a diagram in which the cons cells are | 666 | A list can be illustrated by a diagram in which the cons cells are |
| 642 | shown as pairs of boxes, like dominoes. (The Lisp reader cannot read | 667 | shown as pairs of boxes, like dominoes. (The Lisp reader cannot read |
| 643 | such an illustration; unlike the textual notation, which can be | 668 | such an illustration; unlike the textual notation, which can be |
| @@ -688,19 +713,6 @@ buttercup)}, sketched in a different manner: | |||
| 688 | to the symbol @code{nil}. In other words, @code{nil} is both a symbol | 713 | to the symbol @code{nil}. In other words, @code{nil} is both a symbol |
| 689 | and a list. | 714 | and a list. |
| 690 | 715 | ||
| 691 | Here are examples of lists written in Lisp syntax: | ||
| 692 | |||
| 693 | @example | ||
| 694 | (A 2 "A") ; @r{A list of three elements.} | ||
| 695 | () ; @r{A list of no elements (the empty list).} | ||
| 696 | nil ; @r{A list of no elements (the empty list).} | ||
| 697 | ("A ()") ; @r{A list of one element: the string @code{"A ()"}.} | ||
| 698 | (A ()) ; @r{A list of two elements: @code{A} and the empty list.} | ||
| 699 | (A nil) ; @r{Equivalent to the previous.} | ||
| 700 | ((A B C)) ; @r{A list of one element} | ||
| 701 | ; @r{(which is a list of three elements).} | ||
| 702 | @end example | ||
| 703 | |||
| 704 | Here is the list @code{(A ())}, or equivalently @code{(A nil)}, | 716 | Here is the list @code{(A ())}, or equivalently @code{(A nil)}, |
| 705 | depicted with boxes and arrows: | 717 | depicted with boxes and arrows: |
| 706 | 718 | ||
| @@ -715,27 +727,64 @@ depicted with boxes and arrows: | |||
| 715 | @end group | 727 | @end group |
| 716 | @end example | 728 | @end example |
| 717 | 729 | ||
| 718 | @menu | 730 | Here is a more complex illustration, showing the three-element list, |
| 719 | * Dotted Pair Notation:: An alternative syntax for lists. | 731 | @code{((pine needles) oak maple)}, the first element of which is a |
| 720 | * Association List Type:: A specially constructed list. | 732 | two-element list: |
| 721 | @end menu | 733 | |
| 734 | @example | ||
| 735 | @group | ||
| 736 | --- --- --- --- --- --- | ||
| 737 | | | |--> | | |--> | | |--> nil | ||
| 738 | --- --- --- --- --- --- | ||
| 739 | | | | | ||
| 740 | | | | | ||
| 741 | | --> oak --> maple | ||
| 742 | | | ||
| 743 | | --- --- --- --- | ||
| 744 | --> | | |--> | | |--> nil | ||
| 745 | --- --- --- --- | ||
| 746 | | | | ||
| 747 | | | | ||
| 748 | --> pine --> needles | ||
| 749 | @end group | ||
| 750 | @end example | ||
| 751 | |||
| 752 | The same list represented in the first box notation looks like this: | ||
| 753 | |||
| 754 | @example | ||
| 755 | @group | ||
| 756 | -------------- -------------- -------------- | ||
| 757 | | car | cdr | | car | cdr | | car | cdr | | ||
| 758 | | o | o------->| oak | o------->| maple | nil | | ||
| 759 | | | | | | | | | | | | ||
| 760 | -- | --------- -------------- -------------- | ||
| 761 | | | ||
| 762 | | | ||
| 763 | | -------------- ---------------- | ||
| 764 | | | car | cdr | | car | cdr | | ||
| 765 | ------>| pine | o------->| needles | nil | | ||
| 766 | | | | | | | | ||
| 767 | -------------- ---------------- | ||
| 768 | @end group | ||
| 769 | @end example | ||
| 722 | 770 | ||
| 723 | @node Dotted Pair Notation | 771 | @node Dotted Pair Notation |
| 724 | @comment node-name, next, previous, up | ||
| 725 | @subsubsection Dotted Pair Notation | 772 | @subsubsection Dotted Pair Notation |
| 726 | @cindex dotted pair notation | 773 | @cindex dotted pair notation |
| 727 | @cindex @samp{.} in lists | 774 | @cindex @samp{.} in lists |
| 728 | 775 | ||
| 729 | @dfn{Dotted pair notation} is an alternative syntax for cons cells | 776 | @dfn{Dotted pair notation} is a general syntax for cons cells that |
| 730 | that represents the @sc{car} and @sc{cdr} explicitly. In this syntax, | 777 | represents the @sc{car} and @sc{cdr} explicitly. In this syntax, |
| 731 | @code{(@var{a} .@: @var{b})} stands for a cons cell whose @sc{car} is | 778 | @code{(@var{a} .@: @var{b})} stands for a cons cell whose @sc{car} is |
| 732 | the object @var{a}, and whose @sc{cdr} is the object @var{b}. Dotted | 779 | the object @var{a}, and whose @sc{cdr} is the object @var{b}. Dotted |
| 733 | pair notation is therefore more general than list syntax. In the dotted | 780 | pair notation is more general than list syntax because the @sc{cdr} |
| 734 | pair notation, the list @samp{(1 2 3)} is written as @samp{(1 . (2 . (3 | 781 | does not have to be a list. However, it is more cumbersome in cases |
| 735 | . nil)))}. For @code{nil}-terminated lists, you can use either | 782 | where list syntax would work. In dotted pair notation, the list |
| 736 | notation, but list notation is usually clearer and more convenient. | 783 | @samp{(1 2 3)} is written as @samp{(1 . (2 . (3 . nil)))}. For |
| 737 | When printing a list, the dotted pair notation is only used if the | 784 | @code{nil}-terminated lists, you can use either notation, but list |
| 738 | @sc{cdr} of a cons cell is not a list. | 785 | notation is usually clearer and more convenient. When printing a |
| 786 | list, the dotted pair notation is only used if the @sc{cdr} of a cons | ||
| 787 | cell is not a list. | ||
| 739 | 788 | ||
| 740 | Here's an example using boxes to illustrate dotted pair notation. | 789 | Here's an example using boxes to illustrate dotted pair notation. |
| 741 | This example shows the pair @code{(rose . violet)}: | 790 | This example shows the pair @code{(rose . violet)}: |
| @@ -860,8 +909,9 @@ Once an array is created, its length is fixed. | |||
| 860 | 909 | ||
| 861 | All Emacs Lisp arrays are one-dimensional. (Most other programming | 910 | All Emacs Lisp arrays are one-dimensional. (Most other programming |
| 862 | languages support multidimensional arrays, but they are not essential; | 911 | languages support multidimensional arrays, but they are not essential; |
| 863 | you can get the same effect with an array of arrays.) Each type of | 912 | you can get the same effect with nested one-dimensional arrays.) Each |
| 864 | array has its own read syntax; see the following sections for details. | 913 | type of array has its own read syntax; see the following sections for |
| 914 | details. | ||
| 865 | 915 | ||
| 866 | The array type is contained in the sequence type and | 916 | The array type is contained in the sequence type and |
| 867 | contains the string type, the vector type, the bool-vector type, and the | 917 | contains the string type, the vector type, the bool-vector type, and the |
| @@ -1661,6 +1711,9 @@ with references to further information. | |||
| 1661 | @item functionp | 1711 | @item functionp |
| 1662 | @xref{Functions, functionp}. | 1712 | @xref{Functions, functionp}. |
| 1663 | 1713 | ||
| 1714 | @item hash-table-p | ||
| 1715 | @xref{Other Hash, hash-table-p}. | ||
| 1716 | |||
| 1664 | @item integer-or-marker-p | 1717 | @item integer-or-marker-p |
| 1665 | @xref{Predicates on Markers, integer-or-marker-p}. | 1718 | @xref{Predicates on Markers, integer-or-marker-p}. |
| 1666 | 1719 | ||
diff --git a/lispref/streams.texi b/lispref/streams.texi index 599416fe679..2f27fe193dc 100644 --- a/lispref/streams.texi +++ b/lispref/streams.texi | |||
| @@ -338,6 +338,7 @@ For example: | |||
| 338 | @defvar standard-input | 338 | @defvar standard-input |
| 339 | This variable holds the default input stream---the stream that | 339 | This variable holds the default input stream---the stream that |
| 340 | @code{read} uses when the @var{stream} argument is @code{nil}. | 340 | @code{read} uses when the @var{stream} argument is @code{nil}. |
| 341 | The default is @code{t}, meaning use the minibuffer. | ||
| 341 | @end defvar | 342 | @end defvar |
| 342 | 343 | ||
| 343 | @node Output Streams | 344 | @node Output Streams |
| @@ -684,6 +685,7 @@ returns @code{"The buffer is foo"}. | |||
| 684 | @defvar standard-output | 685 | @defvar standard-output |
| 685 | The value of this variable is the default output stream---the stream | 686 | The value of this variable is the default output stream---the stream |
| 686 | that print functions use when the @var{stream} argument is @code{nil}. | 687 | that print functions use when the @var{stream} argument is @code{nil}. |
| 688 | The default is @code{t}, meaning display in the echo area. | ||
| 687 | @end defvar | 689 | @end defvar |
| 688 | 690 | ||
| 689 | @defvar print-quoted | 691 | @defvar print-quoted |
diff --git a/lispref/symbols.texi b/lispref/symbols.texi index 858918445ff..92c8b0f1e82 100644 --- a/lispref/symbols.texi +++ b/lispref/symbols.texi | |||
| @@ -115,10 +115,10 @@ the four cells of the symbol @code{buffer-file-name}: | |||
| 115 | @result{} "buffer-file-name" | 115 | @result{} "buffer-file-name" |
| 116 | (symbol-value 'buffer-file-name) | 116 | (symbol-value 'buffer-file-name) |
| 117 | @result{} "/gnu/elisp/symbols.texi" | 117 | @result{} "/gnu/elisp/symbols.texi" |
| 118 | (symbol-plist 'buffer-file-name) | ||
| 119 | @result{} (variable-documentation 29529) | ||
| 120 | (symbol-function 'buffer-file-name) | 118 | (symbol-function 'buffer-file-name) |
| 121 | @result{} #<subr buffer-file-name> | 119 | @result{} #<subr buffer-file-name> |
| 120 | (symbol-plist 'buffer-file-name) | ||
| 121 | @result{} (variable-documentation 29529) | ||
| 122 | @end example | 122 | @end example |
| 123 | 123 | ||
| 124 | @noindent | 124 | @noindent |
diff --git a/lispref/variables.texi b/lispref/variables.texi index 1f793b8f03f..de5fb40618f 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1429,8 +1429,11 @@ variables that major modes set should not be marked permanent. | |||
| 1429 | The function @code{kill-all-local-variables} runs this normal hook | 1429 | The function @code{kill-all-local-variables} runs this normal hook |
| 1430 | before it does anything else. This gives major modes a way to arrange | 1430 | before it does anything else. This gives major modes a way to arrange |
| 1431 | for something special to be done if the user switches to a different | 1431 | for something special to be done if the user switches to a different |
| 1432 | major mode. For best results, make this variable buffer-local, so that | 1432 | major mode. It is also useful for buffer-specific minor modes |
| 1433 | it will disappear after doing its job and will not interfere with the | 1433 | that should be forgotten if the user changes the major mode. |
| 1434 | |||
| 1435 | For best results, make this variable buffer-local, so that it will | ||
| 1436 | disappear after doing its job and will not interfere with the | ||
| 1434 | subsequent major mode. @xref{Hooks}. | 1437 | subsequent major mode. @xref{Hooks}. |
| 1435 | @end defvar | 1438 | @end defvar |
| 1436 | 1439 | ||
diff --git a/man/ChangeLog b/man/ChangeLog index c2dc393be1d..bcba521884c 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,76 @@ | |||
| 1 | 2005-02-16 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * emacs.texi (Top): Update menu for splitting of node in | ||
| 4 | msdog.texi. | ||
| 5 | * frames.texi (Frames): Update xref for splitting of node in | ||
| 6 | msdog.texi. | ||
| 7 | * trouble.texi (Quitting): Ditto. | ||
| 8 | |||
| 9 | 2005-02-16 Richard M. Stallman <rms@gnu.org> | ||
| 10 | |||
| 11 | * windows.texi (Split Window): Simplify line truncation info | ||
| 12 | and xref to Display Custom. | ||
| 13 | |||
| 14 | * trouble.texi (Quitting): Emergency escape only for text terminal. | ||
| 15 | (Screen Garbled): C-l for ungarbling is only for text terminal. | ||
| 16 | |||
| 17 | * text.texi (Text Mode): ESC TAB alternative for M-TAB. | ||
| 18 | |||
| 19 | * sending.texi (Header Editing): ESC TAB alternative for M-TAB. | ||
| 20 | |||
| 21 | * programs.texi (Program Modes): Mention Python mode. | ||
| 22 | (Moving by Defuns): Repeating C-M-h extends region. | ||
| 23 | (Basic Indent): Clarify. | ||
| 24 | (Custom C Indent): Clarify. | ||
| 25 | (Expressions): Repeating C-M-@ extends region. | ||
| 26 | (Info Lookup): Clarify for C-h S. | ||
| 27 | (Symbol Completion): ESC TAB alternative for M-TAB. | ||
| 28 | (Electric C): Clarify. | ||
| 29 | |||
| 30 | * emacs.texi (Top): Update display.texi and frames.texi submenu data. | ||
| 31 | |||
| 32 | * msdog.texi (MS-DOS Keyboard, MS-DOS Mouse): Split from | ||
| 33 | MS-DOS Input node. | ||
| 34 | (MS-DOS Keyboard): Start with explaining DEL and BREAK. | ||
| 35 | (MS-DOS and MULE): Clarify. | ||
| 36 | (MS-DOS Processes, Windows Processes): Fix typos. | ||
| 37 | |||
| 38 | * major.texi (Choosing Modes): Clarify. | ||
| 39 | |||
| 40 | * kmacro.texi (Basic Keyboard Macro): Doc F3, F4. | ||
| 41 | (Keyboard Macro Step-Edit): Clarify. | ||
| 42 | |||
| 43 | * indent.texi (Indentation): Clarifications. | ||
| 44 | |||
| 45 | * help.texi (Help): Correct error about C-h in query-replace. | ||
| 46 | Clarify apropos vs C-h a. Fix how to search in FAQ. | ||
| 47 | (Key Help): Describe C-h w here. | ||
| 48 | (Name Help): Minor cleanup. C-h w moved to Key Help. | ||
| 49 | Clarify the "object" joke. | ||
| 50 | (Apropos): Clarify. Mouse-1 like Mouse-2. | ||
| 51 | (Help Mode): Mouse-1 like Mouse-2. | ||
| 52 | |||
| 53 | * fixit.texi (Spelling): Mention ESC TAB as alt. for M-TAB. | ||
| 54 | |||
| 55 | * display.texi (Display): Reorder menu. | ||
| 56 | (Faces): Cleanup. | ||
| 57 | (Font Lock): Cleanup. Mention Options menu. | ||
| 58 | Delete obsolete text. | ||
| 59 | (Scrolling): For C-l, don't presume text terminal. | ||
| 60 | (Horizontal Scrolling): Simplify intro. | ||
| 61 | (Follow Mode): Clarify. | ||
| 62 | (Cursor Display): Moved before Display Custom. | ||
| 63 | (Display Custom): Explain no-redraw-on-reenter is for text terminals. | ||
| 64 | Doc default-tab-width. Doc line truncation more thoroughly. | ||
| 65 | |||
| 66 | * dired.texi (Dired Enter): C-x C-f can run Dired. | ||
| 67 | (Dired Visiting): Comment out `a' command. | ||
| 68 | Mouse-1 is like Mouse-2. | ||
| 69 | (Shell Commands in Dired): ? can be used more than once. | ||
| 70 | |||
| 71 | * basic.texi (Continuation Lines): Simplify description of truncation, | ||
| 72 | and refer to Display Custom for the rest of it. | ||
| 73 | |||
| 1 | 2005-02-10 Jay Belanger <belanger@truman.edu> | 74 | 2005-02-10 Jay Belanger <belanger@truman.edu> |
| 2 | 75 | ||
| 3 | * calc.texi: Change @LaTeX to La@TeX throughout. | 76 | * calc.texi: Change @LaTeX to La@TeX throughout. |
diff --git a/man/basic.texi b/man/basic.texi index 6a8ffc0000f..487e9579ece 100644 --- a/man/basic.texi +++ b/man/basic.texi | |||
| @@ -544,25 +544,16 @@ character that indicates continuation. | |||
| 544 | a line gets too long. Continuation on the screen does not do that. Use | 544 | a line gets too long. Continuation on the screen does not do that. Use |
| 545 | Auto Fill mode (@pxref{Filling}) if that's what you want. | 545 | Auto Fill mode (@pxref{Filling}) if that's what you want. |
| 546 | 546 | ||
| 547 | @vindex truncate-lines | ||
| 548 | @cindex truncation | 547 | @cindex truncation |
| 549 | @cindex line truncation, and fringes | 548 | @cindex line truncation, and fringes |
| 550 | As an alternative to continuation, Emacs can display long lines by | 549 | As an alternative to continuation, Emacs can display long lines by |
| 551 | @dfn{truncation}. This means that all the characters that do not fit | 550 | @dfn{truncation}. This means that all the characters that do not fit |
| 552 | in the width of the screen or window do not appear at all. They | 551 | in the width of the screen or window do not appear at all. @samp{$} |
| 553 | remain in the buffer, temporarily invisible. On terminals, @samp{$} | 552 | in the last column or a small straight arrow in the fringe to the |
| 554 | in the last column informs you that the line has been truncated on the | 553 | right of the window indicates a truncated line. |
| 555 | display. On window systems, a small straight arrow in the fringe to | 554 | |
| 556 | the right of the window indicates a truncated line. | 555 | @xref{Display Custom}, for more information about line truncation, |
| 557 | 556 | and other variables that affect how text is displayed. | |
| 558 | @findex toggle-truncate-lines | ||
| 559 | Truncation instead of continuation happens whenever horizontal | ||
| 560 | scrolling is in use, and optionally in all side-by-side windows | ||
| 561 | (@pxref{Windows}). You can enable or disable truncation for a | ||
| 562 | particular buffer with the command @kbd{M-x toggle-truncate-lines}. | ||
| 563 | |||
| 564 | @xref{Display Custom}, for additional variables that affect how text is | ||
| 565 | displayed. | ||
| 566 | 557 | ||
| 567 | @node Position Info | 558 | @node Position Info |
| 568 | @section Cursor Position Information | 559 | @section Cursor Position Information |
diff --git a/man/dired.texi b/man/dired.texi index 0390848faf6..3ce58f2b460 100644 --- a/man/dired.texi +++ b/man/dired.texi | |||
| @@ -48,14 +48,15 @@ files. | |||
| 48 | @findex dired | 48 | @findex dired |
| 49 | @kindex C-x d | 49 | @kindex C-x d |
| 50 | @vindex dired-listing-switches | 50 | @vindex dired-listing-switches |
| 51 | To invoke Dired, do @kbd{C-x d} or @kbd{M-x dired}. The command reads | 51 | To invoke Dired, do @kbd{C-x d} or @kbd{M-x dired}. The command |
| 52 | a directory name or wildcard file name pattern as a minibuffer argument | 52 | reads a directory name or wildcard file name pattern as a minibuffer |
| 53 | to specify which files to list. Where @code{dired} differs from | 53 | argument to specify which files to list. @kbd{C-x C-f} given a |
| 54 | @code{list-directory} is in putting the buffer into Dired mode so that | 54 | directory name also invokes Dired. Where @code{dired} differs from |
| 55 | the special commands of Dired are available. | 55 | @code{list-directory} is that it puts the buffer into Dired mode, so |
| 56 | that the special commands of Dired are available. | ||
| 56 | 57 | ||
| 57 | The variable @code{dired-listing-switches} specifies the options to | 58 | The variable @code{dired-listing-switches} specifies the options to |
| 58 | give to @code{ls} for listing directory; this string @emph{must} contain | 59 | give to @code{ls} for listing the directory; this string @emph{must} contain |
| 59 | @samp{-l}. If you use a numeric prefix argument with the @code{dired} | 60 | @samp{-l}. If you use a numeric prefix argument with the @code{dired} |
| 60 | command, you can specify the @code{ls} switches with the minibuffer | 61 | command, you can specify the @code{ls} switches with the minibuffer |
| 61 | before you enter the directory specification. No matter how they are | 62 | before you enter the directory specification. No matter how they are |
| @@ -255,11 +256,13 @@ and supplying that file name (@code{dired-find-file}). @xref{Visiting}. | |||
| 255 | @kindex e @r{(Dired)} | 256 | @kindex e @r{(Dired)} |
| 256 | Equivalent to @kbd{f}. | 257 | Equivalent to @kbd{f}. |
| 257 | 258 | ||
| 259 | @ignore @c This command seems too risky to document at all. | ||
| 258 | @item a | 260 | @item a |
| 259 | @kindex a @r{(Dired)} | 261 | @kindex a @r{(Dired)} |
| 260 | @findex dired-find-alternate-file | 262 | @findex dired-find-alternate-file |
| 261 | Like @kbd{f}, but replaces the contents of the Dired buffer with | 263 | Like @kbd{f}, but replaces the contents of the Dired buffer with |
| 262 | that of an alternate file or directory (@code{dired-find-alternate-file}). | 264 | that of an alternate file or directory (@code{dired-find-alternate-file}). |
| 265 | @end ignore | ||
| 263 | 266 | ||
| 264 | @item o | 267 | @item o |
| 265 | @kindex o @r{(Dired)} | 268 | @kindex o @r{(Dired)} |
| @@ -275,7 +278,8 @@ file. @xref{Windows}. | |||
| 275 | Visit the file described on the current line, and display the buffer in | 278 | Visit the file described on the current line, and display the buffer in |
| 276 | another window, but do not select that window (@code{dired-display-file}). | 279 | another window, but do not select that window (@code{dired-display-file}). |
| 277 | 280 | ||
| 278 | @item Mouse-2 | 281 | @item Mouse-1 |
| 282 | @itemx Mouse-2 | ||
| 279 | @findex dired-mouse-find-file-other-window | 283 | @findex dired-mouse-find-file-other-window |
| 280 | Visit the file named by the line you click on | 284 | Visit the file named by the line you click on |
| 281 | (@code{dired-mouse-find-file-other-window}). This uses another window | 285 | (@code{dired-mouse-find-file-other-window}). This uses another window |
| @@ -697,10 +701,10 @@ For example, @kbd{! uudecode @key{RET}} runs @code{uudecode} on each | |||
| 697 | file. | 701 | file. |
| 698 | 702 | ||
| 699 | @item | 703 | @item |
| 700 | If the command string contains @samp{?} surrounded by whitespace, the | 704 | However, if the command string contains @samp{?} surrounded by |
| 701 | current file name is substituted for @samp{?}. You can use @samp{?} | 705 | whitespace, the current file name is substituted for @samp{?} (rather |
| 702 | this way more than once in the command, and each occurrence is | 706 | than added at the end). You can use @samp{?} this way more than once |
| 703 | replaced. | 707 | in the command, and the same file name replaces each occurrence. |
| 704 | @end itemize | 708 | @end itemize |
| 705 | 709 | ||
| 706 | To iterate over the file names in a more complicated fashion, use an | 710 | To iterate over the file names in a more complicated fashion, use an |
diff --git a/man/display.texi b/man/display.texi index 23b79d1703e..c652b47787a 100644 --- a/man/display.texi +++ b/man/display.texi | |||
| @@ -23,20 +23,20 @@ display it. | |||
| 23 | * Selective Display:: Hiding lines with lots of indentation. | 23 | * Selective Display:: Hiding lines with lots of indentation. |
| 24 | * Optional Mode Line:: Optional mode line display features. | 24 | * Optional Mode Line:: Optional mode line display features. |
| 25 | * Text Display:: How text characters are normally displayed. | 25 | * Text Display:: How text characters are normally displayed. |
| 26 | * Display Custom:: Information on variables for customizing display. | ||
| 27 | * Cursor Display:: Features for displaying the cursor. | 26 | * Cursor Display:: Features for displaying the cursor. |
| 27 | * Display Custom:: Information on variables for customizing display. | ||
| 28 | @end menu | 28 | @end menu |
| 29 | 29 | ||
| 30 | @node Faces | 30 | @node Faces |
| 31 | @section Using Multiple Typefaces | 31 | @section Using Multiple Typefaces |
| 32 | @cindex faces | 32 | @cindex faces |
| 33 | 33 | ||
| 34 | Emacs supports using multiple styles of displaying characters. Each | 34 | You can specify various styles for displaying text using |
| 35 | style is called a @dfn{face}. Each face can specify various @dfn{face | 35 | @dfn{faces}. Each face can specify various @dfn{face attributes}, |
| 36 | attributes}, such as the font family, the height, weight and slant of | 36 | such as the font family, the height, weight and slant of the |
| 37 | the characters, the foreground and background color, and underlining | 37 | characters, the foreground and background color, and underlining or |
| 38 | or overlining. A face does not have to specify all of these | 38 | overlining. A face does not have to specify all of these attributes; |
| 39 | attributes; often it inherits many of them from another face. | 39 | often it inherits most of them from another face. |
| 40 | 40 | ||
| 41 | On a window system, all the Emacs face attributes are meaningful. | 41 | On a window system, all the Emacs face attributes are meaningful. |
| 42 | On a character terminal, only some of them work. Some character | 42 | On a character terminal, only some of them work. Some character |
| @@ -196,7 +196,7 @@ on your screen using the command @code{ps-print-buffer-with-faces}. | |||
| 196 | @cindex syntax highlighting and coloring | 196 | @cindex syntax highlighting and coloring |
| 197 | 197 | ||
| 198 | Font Lock mode is a minor mode, always local to a particular buffer, | 198 | Font Lock mode is a minor mode, always local to a particular buffer, |
| 199 | which highlights (or ``fontifies'') using various faces according to | 199 | which highlights (or ``fontifies'') the buffer contents according to |
| 200 | the syntax of the text you are editing. It can recognize comments and | 200 | the syntax of the text you are editing. It can recognize comments and |
| 201 | strings in most languages; in several languages, it can also recognize | 201 | strings in most languages; in several languages, it can also recognize |
| 202 | and properly highlight various other important constructs---for | 202 | and properly highlight various other important constructs---for |
| @@ -227,6 +227,10 @@ this: | |||
| 227 | (global-font-lock-mode 1) | 227 | (global-font-lock-mode 1) |
| 228 | @end example | 228 | @end example |
| 229 | 229 | ||
| 230 | @noindent | ||
| 231 | You can also specify this using the menu bar Options menu, specifying | ||
| 232 | first Syntax Highlighting and then Save Options. | ||
| 233 | |||
| 230 | Font Lock mode uses several specifically named faces to do its job, | 234 | Font Lock mode uses several specifically named faces to do its job, |
| 231 | including @code{font-lock-string-face}, @code{font-lock-comment-face}, | 235 | including @code{font-lock-string-face}, @code{font-lock-comment-face}, |
| 232 | and others. The easiest way to find them all is to use completion | 236 | and others. The easiest way to find them all is to use completion |
| @@ -248,10 +252,6 @@ Customize the faces interactively with @kbd{M-x customize-face}, as | |||
| 248 | described in @ref{Face Customization}. | 252 | described in @ref{Face Customization}. |
| 249 | @end itemize | 253 | @end itemize |
| 250 | 254 | ||
| 251 | To get the full benefit of Font Lock mode, you need to choose a | ||
| 252 | default font which has bold, italic, and bold-italic variants; or else | ||
| 253 | you need to have a color or gray-scale screen. | ||
| 254 | |||
| 255 | @vindex font-lock-maximum-decoration | 255 | @vindex font-lock-maximum-decoration |
| 256 | The variable @code{font-lock-maximum-decoration} specifies the | 256 | The variable @code{font-lock-maximum-decoration} specifies the |
| 257 | preferred level of fontification, for modes that provide multiple | 257 | preferred level of fontification, for modes that provide multiple |
| @@ -447,9 +447,10 @@ Scroll heuristically to bring useful information onto the screen | |||
| 447 | @kindex C-l | 447 | @kindex C-l |
| 448 | @findex recenter | 448 | @findex recenter |
| 449 | The most basic scrolling command is @kbd{C-l} (@code{recenter}) with | 449 | The most basic scrolling command is @kbd{C-l} (@code{recenter}) with |
| 450 | no argument. It clears the entire screen and redisplays all windows. | 450 | no argument. It scrolls the selected window so that point is halfway |
| 451 | In addition, it scrolls the selected window so that point is halfway | 451 | down from the top of the window. On a text terminal, it also clears |
| 452 | down from the top of the window. | 452 | the screen and redisplays all windows. That is useful in case the |
| 453 | screen is garbled (@pxref{Screen Garbled}). | ||
| 453 | 454 | ||
| 454 | @kindex C-v | 455 | @kindex C-v |
| 455 | @kindex M-v | 456 | @kindex M-v |
| @@ -566,17 +567,12 @@ window, Emacs recenters the window. By default, @code{scroll-margin} is | |||
| 566 | 567 | ||
| 567 | @dfn{Horizontal scrolling} means shifting all the lines sideways | 568 | @dfn{Horizontal scrolling} means shifting all the lines sideways |
| 568 | within a window---so that some of the text near the left margin is not | 569 | within a window---so that some of the text near the left margin is not |
| 569 | displayed at all. Emacs does this automatically in any window that | 570 | displayed at all. When the text in a window is scrolled horizontally, |
| 570 | uses line truncation rather than continuation: whenever point moves | 571 | text lines are truncated rather than continued (@pxref{Display |
| 571 | off the left or right edge of the screen, Emacs scrolls the buffer | 572 | Custom}). Whenever a window shows truncated lines, Emacs |
| 572 | horizontally to make point visible. | 573 | automatically updates its horizontal scrolling whenever point moves |
| 573 | 574 | off the left or right edge of the screen. You can also use these | |
| 574 | When a window has been scrolled horizontally, text lines are truncated | 575 | commands to do explicit horizontal scrolling. |
| 575 | rather than continued (@pxref{Continuation Lines}), with a @samp{$} | ||
| 576 | appearing in the first column when there is text truncated to the left, | ||
| 577 | and in the last column when there is text truncated to the right. | ||
| 578 | |||
| 579 | You can use these commands to do explicit horizontal scrolling. | ||
| 580 | 576 | ||
| 581 | @table @kbd | 577 | @table @kbd |
| 582 | @item C-x < | 578 | @item C-x < |
| @@ -602,10 +598,10 @@ attempting to do so has no effect. This means that you don't have to | |||
| 602 | calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large | 598 | calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large |
| 603 | argument will restore the normal display. | 599 | argument will restore the normal display. |
| 604 | 600 | ||
| 605 | If you scroll a window horizontally by hand, that sets a lower bound | 601 | If you use those commands to scroll a window horizontally, that sets |
| 606 | for automatic horizontal scrolling. Automatic scrolling will continue | 602 | a lower bound for automatic horizontal scrolling. Automatic scrolling |
| 607 | to scroll the window, but never farther to the right than the amount | 603 | will continue to scroll the window, but never farther to the right |
| 608 | you previously set by @code{scroll-left}. | 604 | than the amount you previously set by @code{scroll-left}. |
| 609 | 605 | ||
| 610 | @vindex hscroll-margin | 606 | @vindex hscroll-margin |
| 611 | The value of the variable @code{hscroll-margin} controls how close | 607 | The value of the variable @code{hscroll-margin} controls how close |
| @@ -708,12 +704,12 @@ currently doesn't work on character terminals.) | |||
| 708 | @cindex windows, synchronizing | 704 | @cindex windows, synchronizing |
| 709 | @cindex synchronizing windows | 705 | @cindex synchronizing windows |
| 710 | 706 | ||
| 711 | @dfn{Follow mode} is a minor mode that makes two windows showing the | 707 | @dfn{Follow mode} is a minor mode that makes two windows, both |
| 712 | same buffer scroll as one tall ``virtual window.'' To use Follow mode, | 708 | showing the same buffer, scroll as a single tall ``virtual window.'' |
| 713 | go to a frame with just one window, split it into two side-by-side | 709 | To use Follow mode, go to a frame with just one window, split it into |
| 714 | windows using @kbd{C-x 3}, and then type @kbd{M-x follow-mode}. From | 710 | two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x |
| 715 | then on, you can edit the buffer in either of the two windows, or scroll | 711 | follow-mode}. From then on, you can edit the buffer in either of the |
| 716 | either one; the other window follows it. | 712 | two windows, or scroll either one; the other window follows it. |
| 717 | 713 | ||
| 718 | In Follow mode, if you move point outside the portion visible in one | 714 | In Follow mode, if you move point outside the portion visible in one |
| 719 | window and into the portion visible in the other window, that selects | 715 | window and into the portion visible in the other window, that selects |
| @@ -756,6 +752,9 @@ the three dots. | |||
| 756 | precedes hidden lines. Then there is no visible indication of the | 752 | precedes hidden lines. Then there is no visible indication of the |
| 757 | hidden lines. This variable becomes local automatically when set. | 753 | hidden lines. This variable becomes local automatically when set. |
| 758 | 754 | ||
| 755 | See also @ref{Outline Mode} for another way to hide part of | ||
| 756 | the text in a buffer. | ||
| 757 | |||
| 759 | @node Optional Mode Line | 758 | @node Optional Mode Line |
| 760 | @section Optional Mode Line Features | 759 | @section Optional Mode Line Features |
| 761 | 760 | ||
| @@ -914,6 +913,46 @@ they are displayed using their graphics (assuming your terminal supports | |||
| 914 | them), otherwise as escape sequences. @xref{Single-Byte Character | 913 | them), otherwise as escape sequences. @xref{Single-Byte Character |
| 915 | Support}. | 914 | Support}. |
| 916 | 915 | ||
| 916 | @node Cursor Display | ||
| 917 | @section Displaying the Cursor | ||
| 918 | |||
| 919 | @findex blink-cursor-mode | ||
| 920 | @vindex blink-cursor-alist | ||
| 921 | @cindex cursor, locating visually | ||
| 922 | @cindex cursor, blinking | ||
| 923 | You can customize the cursor's color, and whether it blinks, using | ||
| 924 | the @code{cursor} Custom group (@pxref{Easy Customization}). On | ||
| 925 | graphical terminals, the command @kbd{M-x blink-cursor-mode} enables | ||
| 926 | or disables the blinking of the cursor. (On text terminals, the | ||
| 927 | terminal itself blinks the cursor, and Emacs has no control over it.) | ||
| 928 | You can control how the cursor appears when it blinks off by setting | ||
| 929 | the variable @code{blink-cursor-alist}. | ||
| 930 | |||
| 931 | @cindex cursor in non-selected windows | ||
| 932 | @vindex cursor-in-non-selected-windows | ||
| 933 | Normally, the cursor appears in non-selected windows in the ``off'' | ||
| 934 | state, with the same appearance as when the blinking cursor blinks | ||
| 935 | ``off''. For a box cursor, this is a hollow box; for a bar cursor, | ||
| 936 | this is a thinner bar. To turn off cursors in non-selected windows, | ||
| 937 | customize the variable @code{cursor-in-non-selected-windows} and assign | ||
| 938 | it a @code{nil} value. | ||
| 939 | |||
| 940 | @vindex x-stretch-cursor | ||
| 941 | @cindex wide block cursor | ||
| 942 | On graphical terminals, Emacs can optionally draw the block cursor | ||
| 943 | as wide as the character under the cursor---for example, if the cursor | ||
| 944 | is on a tab character, it would cover the full width occupied by that | ||
| 945 | tab character. To enable this feature, set the variable | ||
| 946 | @code{x-stretch-cursor} to a non-@code{nil} value. | ||
| 947 | |||
| 948 | @findex hl-line-mode | ||
| 949 | @findex global-hl-line-mode | ||
| 950 | @cindex highlight current line | ||
| 951 | If you find it hard to see the cursor, you might like HL Line mode, | ||
| 952 | a minor mode that highlights the line containing point. Use @kbd{M-x | ||
| 953 | hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x | ||
| 954 | global-hl-line-mode} enables or disables the same mode globally. | ||
| 955 | |||
| 917 | @node Display Custom | 956 | @node Display Custom |
| 918 | @section Customization of Display | 957 | @section Customization of Display |
| 919 | 958 | ||
| @@ -937,18 +976,19 @@ to invert all the lines of the display from what they normally are. | |||
| 937 | If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts | 976 | If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts |
| 938 | to make the whole screen blink when it would normally make an audible bell | 977 | to make the whole screen blink when it would normally make an audible bell |
| 939 | sound. This variable has no effect if your terminal does not have a way | 978 | sound. This variable has no effect if your terminal does not have a way |
| 940 | to make the screen blink.@refill | 979 | to make the screen blink. |
| 941 | 980 | ||
| 942 | @vindex no-redraw-on-reenter | 981 | @vindex no-redraw-on-reenter |
| 943 | When you reenter Emacs after suspending, Emacs normally clears the | 982 | On a text terminal, when you reenter Emacs after suspending, Emacs |
| 944 | screen and redraws the entire display. On some terminals with more than | 983 | normally clears the screen and redraws the entire display. On some |
| 945 | one page of memory, it is possible to arrange the termcap entry so that | 984 | terminals with more than one page of memory, it is possible to arrange |
| 946 | the @samp{ti} and @samp{te} strings (output to the terminal when Emacs | 985 | the termcap entry so that the @samp{ti} and @samp{te} strings (output |
| 947 | is entered and exited, respectively) switch between pages of memory so | 986 | to the terminal when Emacs is entered and exited, respectively) switch |
| 948 | as to use one page for Emacs and another page for other output. Then | 987 | between pages of memory so as to use one page for Emacs and another |
| 949 | you might want to set the variable @code{no-redraw-on-reenter} | 988 | page for other output. Then you might want to set the variable |
| 950 | non-@code{nil}; this tells Emacs to assume, when resumed, that the | 989 | @code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to |
| 951 | screen page it is using still contains what Emacs last wrote there. | 990 | assume, when resumed, that the screen page it is using still contains |
| 991 | what Emacs last wrote there. | ||
| 952 | 992 | ||
| 953 | @vindex echo-keystrokes | 993 | @vindex echo-keystrokes |
| 954 | The variable @code{echo-keystrokes} controls the echoing of multi-character | 994 | The variable @code{echo-keystrokes} controls the echoing of multi-character |
| @@ -964,6 +1004,7 @@ default is initially @code{t}. @xref{Display Tables,, Display Tables, | |||
| 964 | elisp, The Emacs Lisp Reference Manual}. | 1004 | elisp, The Emacs Lisp Reference Manual}. |
| 965 | 1005 | ||
| 966 | @vindex tab-width | 1006 | @vindex tab-width |
| 1007 | @vindex default-tab-width | ||
| 967 | Normally, a tab character in the buffer is displayed as whitespace which | 1008 | Normally, a tab character in the buffer is displayed as whitespace which |
| 968 | extends to the next display tab stop position, and display tab stops come | 1009 | extends to the next display tab stop position, and display tab stops come |
| 969 | at intervals equal to eight spaces. The number of spaces per tab is | 1010 | at intervals equal to eight spaces. The number of spaces per tab is |
| @@ -971,18 +1012,31 @@ controlled by the variable @code{tab-width}, which is made local by | |||
| 971 | changing it, just like @code{ctl-arrow}. Note that how the tab character | 1012 | changing it, just like @code{ctl-arrow}. Note that how the tab character |
| 972 | in the buffer is displayed has nothing to do with the definition of | 1013 | in the buffer is displayed has nothing to do with the definition of |
| 973 | @key{TAB} as a command. The variable @code{tab-width} must have an | 1014 | @key{TAB} as a command. The variable @code{tab-width} must have an |
| 974 | integer value between 1 and 1000, inclusive. | 1015 | integer value between 1 and 1000, inclusive. The variable |
| 975 | 1016 | @code{default-tab-width} controls the default value of this variable | |
| 976 | @c @vindex truncate-lines @c No index entry here, because we have one | 1017 | for buffers where you have not set it locally. |
| 977 | @c in the continuation section. | 1018 | |
| 978 | If the variable @code{truncate-lines} is non-@code{nil}, then each | 1019 | @cindex truncation |
| 979 | line of text gets just one screen line for display; if the text line is | 1020 | @cindex line truncation, and fringes |
| 980 | too long, display shows only the part that fits. If | 1021 | As an alternative to continuation, Emacs can display long lines by |
| 981 | @code{truncate-lines} is @code{nil}, then long text lines display as | 1022 | @dfn{truncation}. This means that all the characters that do not fit |
| 982 | more than one screen line, enough to show the whole text of the line. | 1023 | in the width of the screen or window do not appear at all. On |
| 983 | @xref{Continuation Lines}. Altering the value of @code{truncate-lines} | 1024 | graphical terminals, a small straight arrow in the fringe indicates |
| 984 | makes it local to the current buffer; until that time, the default value | 1025 | truncation at either end of the line. On text terminals, @samp{$} |
| 985 | is in effect. The default is initially @code{nil}. | 1026 | appears in the first column when there is text truncated to the left, |
| 1027 | and in the last column when there is text truncated to the right. | ||
| 1028 | |||
| 1029 | @vindex truncate-lines | ||
| 1030 | @findex toggle-truncate-lines | ||
| 1031 | Horizontal scrolling automatically causes line truncation | ||
| 1032 | (@pxref{Horizontal Scrolling}). You can explicitly enable line | ||
| 1033 | truncation for a particular buffer with the command @kbd{M-x | ||
| 1034 | toggle-truncate-lines}. This works by locally changing the variable | ||
| 1035 | @code{truncate-lines}. If that variable is non-@code{nil}, long lines | ||
| 1036 | are truncated; if it is @code{nil}, they are continued onto multiple | ||
| 1037 | screen lines. Setting the variable @code{truncate-lines} in any way | ||
| 1038 | makes it local to the current buffer; until that time, the default | ||
| 1039 | value is in effect. The default value is normally @code{nil}. | ||
| 986 | 1040 | ||
| 987 | @c @vindex truncate-partial-width-windows @c Idx entry is in Split Windows. | 1041 | @c @vindex truncate-partial-width-windows @c Idx entry is in Split Windows. |
| 988 | If the variable @code{truncate-partial-width-windows} is | 1042 | If the variable @code{truncate-partial-width-windows} is |
| @@ -1066,46 +1120,6 @@ result in text that is hard to read. Call the function | |||
| 1066 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} | 1120 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} |
| 1067 | argument to suppress the effect of bold-face in this case. | 1121 | argument to suppress the effect of bold-face in this case. |
| 1068 | 1122 | ||
| 1069 | @node Cursor Display | ||
| 1070 | @section Displaying the Cursor | ||
| 1071 | |||
| 1072 | @findex blink-cursor-mode | ||
| 1073 | @vindex blink-cursor-alist | ||
| 1074 | @cindex cursor, locating visually | ||
| 1075 | @cindex cursor, blinking | ||
| 1076 | You can customize the cursor's color, and whether it blinks, using | ||
| 1077 | the @code{cursor} Custom group (@pxref{Easy Customization}). On | ||
| 1078 | graphical terminals, the command @kbd{M-x blink-cursor-mode} enables | ||
| 1079 | or disables the blinking of the cursor. (On text terminals, the | ||
| 1080 | terminal itself blinks the cursor, and Emacs has no control over it.) | ||
| 1081 | You can control how the cursor appears when it blinks off by setting | ||
| 1082 | the variable @code{blink-cursor-alist}. | ||
| 1083 | |||
| 1084 | @cindex cursor in non-selected windows | ||
| 1085 | @vindex cursor-in-non-selected-windows | ||
| 1086 | Normally, the cursor appears in non-selected windows in the ``off'' | ||
| 1087 | state, with the same appearance as when the blinking cursor blinks | ||
| 1088 | ``off''. For a box cursor, this is a hollow box; for a bar cursor, | ||
| 1089 | this is a thinner bar. To turn off cursors in non-selected windows, | ||
| 1090 | customize the variable @code{cursor-in-non-selected-windows} and assign | ||
| 1091 | it a @code{nil} value. | ||
| 1092 | |||
| 1093 | @vindex x-stretch-cursor | ||
| 1094 | @cindex wide block cursor | ||
| 1095 | On graphical terminals, Emacs can optionally draw the block cursor | ||
| 1096 | as wide as the character under the cursor---for example, if the cursor | ||
| 1097 | is on a tab character, it would cover the full width occupied by that | ||
| 1098 | tab character. To enable this feature, set the variable | ||
| 1099 | @code{x-stretch-cursor} to a non-@code{nil} value. | ||
| 1100 | |||
| 1101 | @findex hl-line-mode | ||
| 1102 | @findex global-hl-line-mode | ||
| 1103 | @cindex highlight current line | ||
| 1104 | If you find it hard to see the cursor, you might like HL Line mode, | ||
| 1105 | a minor mode that highlights the line containing point. Use @kbd{M-x | ||
| 1106 | hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x | ||
| 1107 | global-hl-line-mode} enables or disables the same mode globally. | ||
| 1108 | |||
| 1109 | @ignore | 1123 | @ignore |
| 1110 | arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 | 1124 | arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 |
| 1111 | @end ignore | 1125 | @end ignore |
diff --git a/man/emacs.texi b/man/emacs.texi index 3bfc95aac5a..dea25cdaa29 100644 --- a/man/emacs.texi +++ b/man/emacs.texi | |||
| @@ -305,12 +305,19 @@ Registers | |||
| 305 | 305 | ||
| 306 | Controlling the Display | 306 | Controlling the Display |
| 307 | 307 | ||
| 308 | * Faces:: How to change the display style using faces. | ||
| 309 | * Font Lock:: Minor mode for syntactic highlighting using faces. | ||
| 310 | * Highlight Changes:: Using colors to show where you changed the buffer. | ||
| 311 | * Highlight Interactively:: Tell Emacs what text to highlight. | ||
| 308 | * Scrolling:: Moving text up and down in a window. | 312 | * Scrolling:: Moving text up and down in a window. |
| 309 | * Horizontal Scrolling:: Moving text left and right in a window. | 313 | * Horizontal Scrolling:: Moving text left and right in a window. |
| 314 | * Fringes:: Enabling or disabling window fringes. | ||
| 315 | * Useless Whitespace:: Showing possibly-spurious trailing whitespace. | ||
| 310 | * Follow Mode:: Follow mode lets two windows scroll as one. | 316 | * Follow Mode:: Follow mode lets two windows scroll as one. |
| 311 | * Selective Display:: Hiding lines with lots of indentation. | 317 | * Selective Display:: Hiding lines with lots of indentation. |
| 312 | * Optional Mode Line:: Optional mode line display features. | 318 | * Optional Mode Line:: Optional mode line display features. |
| 313 | * Text Display:: How text is normally displayed. | 319 | * Text Display:: How text characters are normally displayed. |
| 320 | * Cursor Display:: Features for displaying the cursor. | ||
| 314 | * Display Custom:: Information on variables for customizing display. | 321 | * Display Custom:: Information on variables for customizing display. |
| 315 | 322 | ||
| 316 | Searching and Replacement | 323 | Searching and Replacement |
| @@ -418,15 +425,11 @@ Frames and X Windows | |||
| 418 | * Frame Parameters:: Changing the colors and other modes of frames. | 425 | * Frame Parameters:: Changing the colors and other modes of frames. |
| 419 | * Scroll Bars:: How to enable and disable scroll bars; how to use them. | 426 | * Scroll Bars:: How to enable and disable scroll bars; how to use them. |
| 420 | * Wheeled Mice:: Using mouse wheels for scrolling. | 427 | * Wheeled Mice:: Using mouse wheels for scrolling. |
| 428 | * Drag and Drop:: Using drag and drop to open files and insert text. | ||
| 421 | * Menu Bars:: Enabling and disabling the menu bar. | 429 | * Menu Bars:: Enabling and disabling the menu bar. |
| 422 | * Tool Bars:: Enabling and disabling the tool bar. | 430 | * Tool Bars:: Enabling and disabling the tool bar. |
| 423 | * Dialog Boxes:: Controlling use of dialog boxes. | 431 | * Dialog Boxes:: Controlling use of dialog boxes. |
| 424 | * Faces:: How to change the display style using faces. | 432 | * Tooltips:: Showing "tooltips", AKA "balloon help" for active text. |
| 425 | * Font Lock:: Minor mode for syntactic highlighting using faces. | ||
| 426 | * Highlight Changes:: Using colors to show where you changed the buffer. | ||
| 427 | * Highlight Interactively:: Tell Emacs what text to highlight. | ||
| 428 | * Useless Whitespace:: Showing possibly-spurious trailing whitespace. | ||
| 429 | * Tooltips:: Showing "tooltips", AKA "ballon help" for active text. | ||
| 430 | * Mouse Avoidance:: Moving the mouse pointer out of the way. | 433 | * Mouse Avoidance:: Moving the mouse pointer out of the way. |
| 431 | * Non-Window Terminals:: Multiple frames on terminals that show only one. | 434 | * Non-Window Terminals:: Multiple frames on terminals that show only one. |
| 432 | * XTerm Mouse:: Using the mouse in an XTerm terminal emulator. | 435 | * XTerm Mouse:: Using the mouse in an XTerm terminal emulator. |
| @@ -828,7 +831,8 @@ Environment Variables | |||
| 828 | 831 | ||
| 829 | MS-DOS and Windows 95/98/NT | 832 | MS-DOS and Windows 95/98/NT |
| 830 | 833 | ||
| 831 | * MS-DOS Input:: Keyboard and mouse usage on MS-DOS. | 834 | * MS-DOS Keyboard:: Keyboard usage on MS-DOS. |
| 835 | * MS-DOS Mouse:: Mouse usage on MS-DOS. | ||
| 832 | * MS-DOS Display:: Fonts, frames and display size on MS-DOS. | 836 | * MS-DOS Display:: Fonts, frames and display size on MS-DOS. |
| 833 | * MS-DOS File Names:: File-name conventions on MS-DOS. | 837 | * MS-DOS File Names:: File-name conventions on MS-DOS. |
| 834 | * Text and Binary:: Text files on MS-DOS use CRLF to separate lines. | 838 | * Text and Binary:: Text files on MS-DOS use CRLF to separate lines. |
diff --git a/man/fixit.texi b/man/fixit.texi index 04fa823e76e..0982b0856ef 100644 --- a/man/fixit.texi +++ b/man/fixit.texi | |||
| @@ -302,10 +302,11 @@ frame). | |||
| 302 | The command @code{ispell-complete-word}, which is bound to the key | 302 | The command @code{ispell-complete-word}, which is bound to the key |
| 303 | @kbd{M-@key{TAB}} in Text mode and related modes, shows a list of | 303 | @kbd{M-@key{TAB}} in Text mode and related modes, shows a list of |
| 304 | completions based on spelling correction. Insert the beginning of a | 304 | completions based on spelling correction. Insert the beginning of a |
| 305 | word, and then type @kbd{M-@key{TAB}}; the command displays a completion | 305 | word, and then type @kbd{M-@key{TAB}}; the command displays a |
| 306 | list window. To choose one of the completions listed, click | 306 | completion list window. (If your window manager intercepts |
| 307 | @kbd{Mouse-2} on it, or move the cursor there in the completions window | 307 | @kbd{M-@key{TAB}}, type @kbd{@key{ESC} @key{TAB}}.) To choose one of |
| 308 | and type @key{RET}. @xref{Text Mode}. | 308 | the completions listed, click @kbd{Mouse-2} on it, or move the cursor |
| 309 | there in the completions window and type @key{RET}. @xref{Text Mode}. | ||
| 309 | 310 | ||
| 310 | @ignore | 311 | @ignore |
| 311 | @findex reload-ispell | 312 | @findex reload-ispell |
diff --git a/man/frames.texi b/man/frames.texi index 5c0c42b3d8b..a3f71e64bab 100644 --- a/man/frames.texi +++ b/man/frames.texi | |||
| @@ -27,7 +27,7 @@ frame. | |||
| 27 | 27 | ||
| 28 | Emacs compiled for MS-DOS emulates some aspects of the window system | 28 | Emacs compiled for MS-DOS emulates some aspects of the window system |
| 29 | so that you can use many of the features described in this chapter. | 29 | so that you can use many of the features described in this chapter. |
| 30 | @xref{MS-DOS Input}, for more information. | 30 | @xref{MS-DOS Mouse}, for more information. |
| 31 | 31 | ||
| 32 | @menu | 32 | @menu |
| 33 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. | 33 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. |
diff --git a/man/help.texi b/man/help.texi index fb14eb150a2..d546440e114 100644 --- a/man/help.texi +++ b/man/help.texi | |||
| @@ -25,11 +25,10 @@ help options, each with a brief description. Before you type a help | |||
| 25 | option, you can use @key{SPC} or @key{DEL} to scroll through the list. | 25 | option, you can use @key{SPC} or @key{DEL} to scroll through the list. |
| 26 | 26 | ||
| 27 | @kbd{C-h} or @key{F1} means ``help'' in various other contexts as | 27 | @kbd{C-h} or @key{F1} means ``help'' in various other contexts as |
| 28 | well. For example, in the middle of @code{query-replace}, it describes | 28 | well. After a prefix key, it displays a list of the alternatives that |
| 29 | the options available for how to operate on the current match. After a | 29 | can follow the prefix key. (A few prefix keys don't support |
| 30 | prefix key, it displays a list of the alternatives that can follow the | 30 | @kbd{C-h}, because they define other meanings for it, but they all |
| 31 | prefix key. (A few prefix keys don't support @kbd{C-h}, because they | 31 | support @key{F1}.) |
| 32 | define other meanings for it, but they all support @key{F1}.) | ||
| 33 | 32 | ||
| 34 | Most help buffers use a special major mode, Help mode, which lets you | 33 | Most help buffers use a special major mode, Help mode, which lets you |
| 35 | scroll conveniently with @key{SPC} and @key{DEL}. It also offers | 34 | scroll conveniently with @key{SPC} and @key{DEL}. It also offers |
| @@ -51,9 +50,8 @@ be a regular expression (@pxref{Regexps}). Browse the buffer that this | |||
| 51 | command displays to find what you are looking for. @xref{Apropos}. | 50 | command displays to find what you are looking for. @xref{Apropos}. |
| 52 | 51 | ||
| 53 | @item M-x apropos @key{RET} @var{topic} @key{RET} | 52 | @item M-x apropos @key{RET} @var{topic} @key{RET} |
| 54 | This works like @kbd{C-h a}, but it also searches for variables, | 53 | This works like @kbd{C-h a}, but it also searches for noninteractive |
| 55 | in case the feature you are looking for is controlled by a variable | 54 | functions and for variables. @xref{Apropos}. |
| 56 | rather than a command. @xref{Apropos}. | ||
| 57 | 55 | ||
| 58 | @item M-x apropos-documentation @key{RET} @var{topic} @key{RET} | 56 | @item M-x apropos-documentation @key{RET} @var{topic} @key{RET} |
| 59 | This searches the @emph{documentation strings} (the built-in short | 57 | This searches the @emph{documentation strings} (the built-in short |
| @@ -72,8 +70,8 @@ expression) in the @emph{text} of the manual rather than in its | |||
| 72 | indices. | 70 | indices. |
| 73 | 71 | ||
| 74 | @item C-h C-f | 72 | @item C-h C-f |
| 75 | This brings up the Emacs FAQ, where you can use the usual search | 73 | This brings up the Emacs FAQ. You can use the Info commands |
| 76 | commands (@pxref{Search}) to find the information. | 74 | to browse it. |
| 77 | 75 | ||
| 78 | @item C-h p | 76 | @item C-h p |
| 79 | Finally, you can try looking up a suitable package using keywords | 77 | Finally, you can try looking up a suitable package using keywords |
| @@ -198,6 +196,13 @@ This is too big for the echo area, so a window is used for the display. | |||
| 198 | @kbd{C-h c} and @kbd{C-h k} work for any sort of key sequences, | 196 | @kbd{C-h c} and @kbd{C-h k} work for any sort of key sequences, |
| 199 | including function keys and mouse events. | 197 | including function keys and mouse events. |
| 200 | 198 | ||
| 199 | @kindex C-h w | ||
| 200 | @findex where-is | ||
| 201 | @kbd{C-h w @var{command} @key{RET}} tells you what keys are bound to | ||
| 202 | @var{command}. It displays a list of the keys in the echo area. If it | ||
| 203 | says the command is not on any key, you must use @kbd{M-x} to run it. | ||
| 204 | @kbd{C-h w} runs the command @code{where-is}. | ||
| 205 | |||
| 201 | @node Name Help | 206 | @node Name Help |
| 202 | @section Help by Command or Variable Name | 207 | @section Help by Command or Variable Name |
| 203 | 208 | ||
| @@ -217,15 +222,15 @@ displays the documentation of @code{auto-fill-mode}. This is the only | |||
| 217 | way to get the documentation of a command that is not bound to any key | 222 | way to get the documentation of a command that is not bound to any key |
| 218 | (one which you would normally run using @kbd{M-x}). | 223 | (one which you would normally run using @kbd{M-x}). |
| 219 | 224 | ||
| 220 | @kbd{C-h f} is also useful for Lisp functions that you are planning to | 225 | @kbd{C-h f} is also useful for Lisp functions that you are planning |
| 221 | use in a Lisp program. For example, if you have just written the | 226 | to use in a Lisp program. For example, if you have just written the |
| 222 | expression @code{(make-vector len)} and want to check that you are using | 227 | expression @code{(make-vector len)} and want to check that you are |
| 223 | @code{make-vector} properly, type @kbd{C-h f make-vector @key{RET}}. | 228 | using @code{make-vector} properly, type @kbd{C-h f make-vector |
| 224 | Because @kbd{C-h f} allows all function names, not just command names, | 229 | @key{RET}}. Because @kbd{C-h f} allows all function names, not just |
| 225 | you may find that some of your favorite abbreviations that work in | 230 | command names, you may find that some of your favorite completion |
| 226 | @kbd{M-x} don't work in @kbd{C-h f}. An abbreviation may be unique | 231 | abbreviations that work in @kbd{M-x} don't work in @kbd{C-h f}. An |
| 227 | among command names yet fail to be unique when other function names are | 232 | abbreviation may be unique among command names, yet fail to be unique |
| 228 | allowed. | 233 | when other function names are allowed. |
| 229 | 234 | ||
| 230 | The default function name for @kbd{C-h f} to describe, if you type | 235 | The default function name for @kbd{C-h f} to describe, if you type |
| 231 | just @key{RET}, is the name of the function called by the innermost Lisp | 236 | just @key{RET}, is the name of the function called by the innermost Lisp |
| @@ -241,13 +246,6 @@ buffer as the default, that name must be defined as a Lisp function. If | |||
| 241 | that is all you want to know, just type @kbd{C-g} to cancel the @kbd{C-h | 246 | that is all you want to know, just type @kbd{C-g} to cancel the @kbd{C-h |
| 242 | f} command, then go on editing. | 247 | f} command, then go on editing. |
| 243 | 248 | ||
| 244 | @kindex C-h w | ||
| 245 | @findex where-is | ||
| 246 | @kbd{C-h w @var{command} @key{RET}} tells you what keys are bound to | ||
| 247 | @var{command}. It displays a list of the keys in the echo area. If it | ||
| 248 | says the command is not on any key, you must use @kbd{M-x} to run it. | ||
| 249 | @kbd{C-h w} runs the command @code{where-is}. | ||
| 250 | |||
| 251 | @kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but describes | 249 | @kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but describes |
| 252 | Lisp variables instead of Lisp functions. Its default is the Lisp symbol | 250 | Lisp variables instead of Lisp functions. Its default is the Lisp symbol |
| 253 | around or before point, but only if that is the name of a known Lisp | 251 | around or before point, but only if that is the name of a known Lisp |
| @@ -257,8 +255,9 @@ variable. @xref{Variables}.@refill | |||
| 257 | normally have hyperlinks to the Lisp definition, if you have the Lisp | 255 | normally have hyperlinks to the Lisp definition, if you have the Lisp |
| 258 | source files installed. If you know Lisp, this provides the ultimate | 256 | source files installed. If you know Lisp, this provides the ultimate |
| 259 | documentation. If you don't know Lisp, you should learn it. If you | 257 | documentation. If you don't know Lisp, you should learn it. If you |
| 260 | are treating Emacs as an object file, then you are just @emph{using} | 258 | are just @emph{using} Emacs, treating Emacs as an object (file), then |
| 261 | Emacs. For real intimacy with Emacs, you must read the source code. | 259 | you don't really love it. For true intimacy with your editor, you |
| 260 | need to read the source code. | ||
| 262 | 261 | ||
| 263 | @node Apropos | 262 | @node Apropos |
| 264 | @section Apropos | 263 | @section Apropos |
| @@ -278,11 +277,11 @@ example, it would say that you can invoke @code{find-file} by typing | |||
| 278 | normally checks only commands (interactive functions); if you specify a | 277 | normally checks only commands (interactive functions); if you specify a |
| 279 | prefix argument, it checks noninteractive functions as well. | 278 | prefix argument, it checks noninteractive functions as well. |
| 280 | 279 | ||
| 281 | Because @kbd{C-h a} looks only for functions whose names contain the | 280 | Because @kbd{C-h a} looks only for commands whose names contain the |
| 282 | string you specify, you must use ingenuity in choosing the | 281 | string you specify, you must use ingenuity in choosing the string. If |
| 283 | string. If you are looking for commands for killing backwards and | 282 | you are looking for commands for killing backwards and @kbd{C-h a |
| 284 | @kbd{C-h a kill-backwards @key{RET}} doesn't reveal any, don't give up. | 283 | kill-backwards @key{RET}} doesn't reveal any, don't give up. Try just |
| 285 | Try just @kbd{kill}, or just @kbd{backwards}, or just @kbd{back}. Be | 284 | @kbd{kill}, or just @kbd{backwards}, or just @kbd{back}. Be |
| 286 | persistent. Also note that you can use a regular expression as the | 285 | persistent. Also note that you can use a regular expression as the |
| 287 | argument, for more flexibility (@pxref{Regexps}). | 286 | argument, for more flexibility (@pxref{Regexps}). |
| 288 | 287 | ||
| @@ -330,7 +329,7 @@ above all behave as if they had been given a prefix argument. | |||
| 330 | 329 | ||
| 331 | If you want more information about a function definition, variable or | 330 | If you want more information about a function definition, variable or |
| 332 | symbol property listed in the Apropos buffer, you can click on it with | 331 | symbol property listed in the Apropos buffer, you can click on it with |
| 333 | @kbd{Mouse-2} or move there and type @key{RET}. | 332 | @kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}. |
| 334 | 333 | ||
| 335 | @node Library Keywords | 334 | @node Library Keywords |
| 336 | @section Keyword Search for Lisp Libraries | 335 | @section Keyword Search for Lisp Libraries |
| @@ -421,16 +420,17 @@ Follow a cross reference at point. | |||
| 421 | Move point forward to the next cross reference. | 420 | Move point forward to the next cross reference. |
| 422 | @item S-@key{TAB} | 421 | @item S-@key{TAB} |
| 423 | Move point back to the previous cross reference. | 422 | Move point back to the previous cross reference. |
| 424 | @item Mouse-2 | 423 | @item Mouse-1 |
| 424 | @itemx Mouse-2 | ||
| 425 | Follow a cross reference that you click on. | 425 | Follow a cross reference that you click on. |
| 426 | @end table | 426 | @end table |
| 427 | 427 | ||
| 428 | When a command name (@pxref{M-x,, Running Commands by Name}) or | 428 | When a function name (@pxref{M-x,, Running Commands by Name}) or |
| 429 | variable name (@pxref{Variables}) appears in the documentation, it | 429 | variable name (@pxref{Variables}) appears in the documentation, it |
| 430 | normally appears inside paired single-quotes. You can click on the name | 430 | normally appears inside paired single-quotes. You can click on the |
| 431 | with @kbd{Mouse-2}, or move point there and type @key{RET}, to view the | 431 | name with @kbd{Mouse-1} or @kbd{Mouse-2}, or move point there and type |
| 432 | documentation of that command or variable. Use @kbd{C-c C-b} to retrace | 432 | @key{RET}, to view the documentation of that command or variable. Use |
| 433 | your steps. | 433 | @kbd{C-c C-b} to retrace your steps. |
| 434 | 434 | ||
| 435 | @kindex @key{TAB} @r{(Help mode)} | 435 | @kindex @key{TAB} @r{(Help mode)} |
| 436 | @findex help-next-ref | 436 | @findex help-next-ref |
diff --git a/man/indent.texi b/man/indent.texi index ab640e76462..48a54747714 100644 --- a/man/indent.texi +++ b/man/indent.texi | |||
| @@ -16,7 +16,7 @@ Indent the current line ``appropriately'' in a mode-dependent fashion. | |||
| 16 | Perform @key{RET} followed by @key{TAB} (@code{newline-and-indent}). | 16 | Perform @key{RET} followed by @key{TAB} (@code{newline-and-indent}). |
| 17 | @item M-^ | 17 | @item M-^ |
| 18 | Merge the previous and the current line (@code{delete-indentation}). | 18 | Merge the previous and the current line (@code{delete-indentation}). |
| 19 | This would cancel out the effect of @kbd{C-j}. | 19 | This would cancel the effect of a preceding @kbd{C-j}. |
| 20 | @item C-M-o | 20 | @item C-M-o |
| 21 | Split the current line at point; text on the line after point becomes a | 21 | Split the current line at point; text on the line after point becomes a |
| 22 | new line indented to the same column where point is located | 22 | new line indented to the same column where point is located |
| @@ -25,9 +25,9 @@ new line indented to the same column where point is located | |||
| 25 | Move (forward or back) to the first nonblank character on the current | 25 | Move (forward or back) to the first nonblank character on the current |
| 26 | line (@code{back-to-indentation}). | 26 | line (@code{back-to-indentation}). |
| 27 | @item C-M-\ | 27 | @item C-M-\ |
| 28 | Indent several lines to the same column (@code{indent-region}). | 28 | Indent lines in the region to the same column (@code{indent-region}). |
| 29 | @item C-x @key{TAB} | 29 | @item C-x @key{TAB} |
| 30 | Shift a block of lines rigidly right or left (@code{indent-rigidly}). | 30 | Shift lines in the region rigidly right or left (@code{indent-rigidly}). |
| 31 | @item M-i | 31 | @item M-i |
| 32 | Indent from point to the next prespecified tab stop column | 32 | Indent from point to the next prespecified tab stop column |
| 33 | (@code{tab-to-tab-stop}). | 33 | (@code{tab-to-tab-stop}). |
| @@ -47,11 +47,11 @@ to the next display tab stop position, and the default width of a tab | |||
| 47 | stop is eight. @xref{Display Custom}, for more details. | 47 | stop is eight. @xref{Display Custom}, for more details. |
| 48 | 48 | ||
| 49 | @item | 49 | @item |
| 50 | Advance to the next tab stop. You can set tab stops at your choice of | 50 | Insert whitespace up to the next tab stop. You can set tab stops at |
| 51 | column positions, then type @kbd{M-i} to advance to the next tab stop. | 51 | your choice of column positions, then type @kbd{M-i} to advance to the |
| 52 | The default is to have tab stops every eight columns, which means by | 52 | next tab stop. The default tab stop settings have a tab stop every |
| 53 | default @kbd{M-i} inserts a tab character. To set the tab stops, use | 53 | eight columns, which means by default @kbd{M-i} inserts a tab |
| 54 | @kbd{M-x edit-tab-stops}. | 54 | character. To set the tab stops, use @kbd{M-x edit-tab-stops}. |
| 55 | 55 | ||
| 56 | @item | 56 | @item |
| 57 | Align a line with the previous line. More precisely, the command | 57 | Align a line with the previous line. More precisely, the command |
| @@ -72,15 +72,11 @@ of the preceding lines. No matter where in the line you are when you | |||
| 72 | type @key{TAB}, it aligns the line as a whole. | 72 | type @key{TAB}, it aligns the line as a whole. |
| 73 | @end enumerate | 73 | @end enumerate |
| 74 | 74 | ||
| 75 | Normally, all of the above methods insert an optimal mix of tabs and | 75 | Normally, most of the above methods insert an optimal mix of tabs and |
| 76 | spaces to align to the desired column. @xref{Just Spaces}, for how to | 76 | spaces to align to the desired column. @xref{Just Spaces}, for how to |
| 77 | disable use of tabs. However, @kbd{C-q @key{TAB}} always inserts a | 77 | disable use of tabs. However, @kbd{C-q @key{TAB}} always inserts a |
| 78 | tab, even when tabs are disabled for the indentation commands. | 78 | tab, even when tabs are disabled for the indentation commands. |
| 79 | 79 | ||
| 80 | @c In Text mode, @key{TAB} runs the command @code{tab-to-tab-stop}, which | ||
| 81 | @c indents to the next tab stop column. You can set the tab stops with | ||
| 82 | @c @kbd{M-x edit-tab-stops}. | ||
| 83 | |||
| 84 | @menu | 80 | @menu |
| 85 | * Indentation Commands:: Various commands and techniques for indentation. | 81 | * Indentation Commands:: Various commands and techniques for indentation. |
| 86 | * Tab Stops:: You can set arbitrary "tab stops" and then | 82 | * Tab Stops:: You can set arbitrary "tab stops" and then |
diff --git a/man/kmacro.texi b/man/kmacro.texi index 459752d3c4b..5ef34f6c929 100644 --- a/man/kmacro.texi +++ b/man/kmacro.texi | |||
| @@ -46,6 +46,7 @@ intelligent or general. For such things, Lisp must be used. | |||
| 46 | 46 | ||
| 47 | @table @kbd | 47 | @table @kbd |
| 48 | @item C-x ( | 48 | @item C-x ( |
| 49 | @itemx @key{F3} | ||
| 49 | Start defining a keyboard macro (@code{kmacro-start-macro}). | 50 | Start defining a keyboard macro (@code{kmacro-start-macro}). |
| 50 | @item C-x ) | 51 | @item C-x ) |
| 51 | End the definition of a keyboard macro (@code{kmacro-end-macro}). | 52 | End the definition of a keyboard macro (@code{kmacro-end-macro}). |
| @@ -53,6 +54,10 @@ End the definition of a keyboard macro (@code{kmacro-end-macro}). | |||
| 53 | Execute the most recent keyboard macro (@code{kmacro-end-and-call-macro}). | 54 | Execute the most recent keyboard macro (@code{kmacro-end-and-call-macro}). |
| 54 | First end the definition of the keyboard macro, if currently defining it. | 55 | First end the definition of the keyboard macro, if currently defining it. |
| 55 | To immediately execute the keyboard macro again, just repeat the @kbd{e}. | 56 | To immediately execute the keyboard macro again, just repeat the @kbd{e}. |
| 57 | @item @key{F4} | ||
| 58 | If a keyboard macro is being defined, end the definition; otherwise, | ||
| 59 | execute the most recent keyboard macro | ||
| 60 | (@code{kmacro-end-or-call-macro}). | ||
| 56 | @item C-u C-x ( | 61 | @item C-u C-x ( |
| 57 | Re-execute last keyboard macro, then add more keys to its definition. | 62 | Re-execute last keyboard macro, then add more keys to its definition. |
| 58 | @item C-u C-u C-x ( | 63 | @item C-u C-u C-x ( |
| @@ -120,6 +125,10 @@ of zero to @kbd{C-x e} or @kbd{C-x )} means repeat the macro | |||
| 120 | indefinitely (until it gets an error or you type @kbd{C-g} or, on | 125 | indefinitely (until it gets an error or you type @kbd{C-g} or, on |
| 121 | MS-DOS, @kbd{C-@key{BREAK}}). | 126 | MS-DOS, @kbd{C-@key{BREAK}}). |
| 122 | 127 | ||
| 128 | The key @key{F4} is like a combination of @kbd{C-x )} and @kbd{C-x | ||
| 129 | e}. If you're defining a macro, @key{F4} ends the definition. | ||
| 130 | Otherwise it executes the last macro. | ||
| 131 | |||
| 123 | If you wish to repeat an operation at regularly spaced places in the | 132 | If you wish to repeat an operation at regularly spaced places in the |
| 124 | text, define a macro and include as part of the macro the commands to move | 133 | text, define a macro and include as part of the macro the commands to move |
| 125 | to the next place you want to use it. For example, if you want to change | 134 | to the next place you want to use it. For example, if you want to change |
| @@ -490,18 +499,16 @@ keyboard input that you would use to invoke the macro---@kbd{C-x e} or | |||
| 490 | 499 | ||
| 491 | @findex kmacro-step-edit-macro | 500 | @findex kmacro-step-edit-macro |
| 492 | @kindex C-x C-k SPC | 501 | @kindex C-x C-k SPC |
| 493 | You can interactively and stepwise replay and edit the last keyboard | 502 | You can interactively replay and edit the last keyboard |
| 494 | macro one command at a time by typing @kbd{C-x C-k SPC} | 503 | macro, one command at a time, by typing @kbd{C-x C-k SPC} |
| 495 | (@code{kmacro-step-edit-macro}). Unless you quit the macro using | 504 | (@code{kmacro-step-edit-macro}). Unless you quit the macro using |
| 496 | @kbd{q} or @kbd{C-g}, the edited macro replaces the last macro on the | 505 | @kbd{q} or @kbd{C-g}, the edited macro replaces the last macro on the |
| 497 | macro ring. | 506 | macro ring. |
| 498 | 507 | ||
| 499 | This shows the last macro in the minibuffer together with the first | 508 | This macro editing feature shows the last macro in the minibuffer |
| 500 | (or next) command to be executed, and prompts you for an action. | 509 | together with the first (or next) command to be executed, and prompts |
| 501 | You can enter @kbd{?} to get a command summary. | 510 | you for an action. You can enter @kbd{?} to get a summary of your |
| 502 | 511 | options. These actions are available: | |
| 503 | The following commands are available in the step-edit mode and relate | ||
| 504 | to the first (or current) command in the keyboard macro: | ||
| 505 | 512 | ||
| 506 | @itemize @bullet{} | 513 | @itemize @bullet{} |
| 507 | @item | 514 | @item |
diff --git a/man/major.texi b/man/major.texi index a7c3a9062cf..fa44b873031 100644 --- a/man/major.texi +++ b/man/major.texi | |||
| @@ -92,14 +92,14 @@ For example, one element normally found in the list has the form | |||
| 92 | @code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C | 92 | @code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C |
| 93 | mode for files whose names end in @file{.c}. (Note that @samp{\\} is | 93 | mode for files whose names end in @file{.c}. (Note that @samp{\\} is |
| 94 | needed in Lisp syntax to include a @samp{\} in the string, which must | 94 | needed in Lisp syntax to include a @samp{\} in the string, which must |
| 95 | be used to suppress the special meaning of @samp{.} in regexps.) If the | 95 | be used to suppress the special meaning of @samp{.} in regexps.) If |
| 96 | element has the form @code{(@var{regexp} @var{mode-function} | 96 | the element has the form @code{(@var{regexp} @var{mode-function} |
| 97 | @var{flag})} and @var{flag} is non-@code{nil}, then after calling | 97 | @var{flag})} and @var{flag} is non-@code{nil}, then after calling |
| 98 | @var{mode-function}, the suffix that matched @var{regexp} is discarded | 98 | @var{mode-function}, Emacs discards the suffix that matched |
| 99 | and the list is searched again for another match. | 99 | @var{regexp} and searches the list again for another match. |
| 100 | 100 | ||
| 101 | You can specify which major mode should be used for editing a certain | 101 | You can specify the major mode to use for editing a certain file by |
| 102 | file by a special sort of text in the first nonblank line of the file. The | 102 | special text in the first nonblank line of the file. The |
| 103 | mode name should appear in this line both preceded and followed by | 103 | mode name should appear in this line both preceded and followed by |
| 104 | @samp{-*-}. Other text may appear on the line as well. For example, | 104 | @samp{-*-}. Other text may appear on the line as well. For example, |
| 105 | 105 | ||
| @@ -166,6 +166,7 @@ the file's local variables list (if any). | |||
| 166 | @vindex change-major-mode-with-file-name | 166 | @vindex change-major-mode-with-file-name |
| 167 | The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to | 167 | The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to |
| 168 | a new major mode if the new file name implies a mode (@pxref{Saving}). | 168 | a new major mode if the new file name implies a mode (@pxref{Saving}). |
| 169 | (@kbd{C-x C-s} does this too, if the buffer wasn't visiting a file.) | ||
| 169 | However, this does not happen if the buffer contents specify a major | 170 | However, this does not happen if the buffer contents specify a major |
| 170 | mode, and certain ``special'' major modes do not allow the mode to | 171 | mode, and certain ``special'' major modes do not allow the mode to |
| 171 | change. You can turn off this mode-changing feature by setting | 172 | change. You can turn off this mode-changing feature by setting |
diff --git a/man/msdog.texi b/man/msdog.texi index dec258ec672..a1d7647a95d 100644 --- a/man/msdog.texi +++ b/man/msdog.texi | |||
| @@ -24,7 +24,8 @@ sections at the end of this chapter which apply specifically for the | |||
| 24 | Windows version. | 24 | Windows version. |
| 25 | 25 | ||
| 26 | @menu | 26 | @menu |
| 27 | * Input: MS-DOS Input. Keyboard and mouse usage on MS-DOS. | 27 | * Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS. |
| 28 | * Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS. | ||
| 28 | * Display: MS-DOS Display. Fonts, frames and display size on MS-DOS. | 29 | * Display: MS-DOS Display. Fonts, frames and display size on MS-DOS. |
| 29 | * Files: MS-DOS File Names. File name conventions on MS-DOS. | 30 | * Files: MS-DOS File Names. File name conventions on MS-DOS. |
| 30 | * Text and Binary:: Text files on MS-DOS use CRLF to separate lines. | 31 | * Text and Binary:: Text files on MS-DOS use CRLF to separate lines. |
| @@ -35,8 +36,28 @@ Windows version. | |||
| 35 | * Windows System Menu:: Controlling what the ALT key does. | 36 | * Windows System Menu:: Controlling what the ALT key does. |
| 36 | @end menu | 37 | @end menu |
| 37 | 38 | ||
| 38 | @node MS-DOS Input | 39 | @node MS-DOS Keyboard |
| 39 | @section Keyboard and Mouse on MS-DOS | 40 | @section Keyboard Usage on MS-DOS |
| 41 | |||
| 42 | @kindex DEL @r{(MS-DOS)} | ||
| 43 | @kindex BS @r{(MS-DOS)} | ||
| 44 | The key that is called @key{DEL} in Emacs (because that's how it is | ||
| 45 | designated on most workstations) is known as @key{BS} (backspace) on a | ||
| 46 | PC. That is why the PC-specific terminal initialization remaps the | ||
| 47 | @key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act | ||
| 48 | as @kbd{C-d} for the same reasons. | ||
| 49 | |||
| 50 | @kindex C-g @r{(MS-DOS)} | ||
| 51 | @kindex C-BREAK @r{(MS-DOS)} | ||
| 52 | @cindex quitting on MS-DOS | ||
| 53 | Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit | ||
| 54 | character, just like @kbd{C-g}. This is because Emacs cannot detect | ||
| 55 | that you have typed @kbd{C-g} until it is ready for more input. As a | ||
| 56 | consequence, you cannot use @kbd{C-g} to stop a running command | ||
| 57 | (@pxref{Quitting}). By contrast, @kbd{C-@key{BREAK}} @emph{is} detected | ||
| 58 | as soon as you type it (as @kbd{C-g} is on other systems), so it can be | ||
| 59 | used to stop a running command and for emergency escape | ||
| 60 | (@pxref{Emergency Escape}). | ||
| 40 | 61 | ||
| 41 | @cindex Meta (under MS-DOS) | 62 | @cindex Meta (under MS-DOS) |
| 42 | @cindex Hyper (under MS-DOS) | 63 | @cindex Hyper (under MS-DOS) |
| @@ -68,25 +89,8 @@ following line into your @file{_emacs} file: | |||
| 68 | (define-key function-key-map [kp-enter] [?\C-j]) | 89 | (define-key function-key-map [kp-enter] [?\C-j]) |
| 69 | @end smallexample | 90 | @end smallexample |
| 70 | 91 | ||
| 71 | @kindex DEL @r{(MS-DOS)} | 92 | @node MS-DOS Mouse |
| 72 | @kindex BS @r{(MS-DOS)} | 93 | @section Mouse Usage on MS-DOS |
| 73 | The key that is called @key{DEL} in Emacs (because that's how it is | ||
| 74 | designated on most workstations) is known as @key{BS} (backspace) on a | ||
| 75 | PC. That is why the PC-specific terminal initialization remaps the | ||
| 76 | @key{BS} key to act as @key{DEL}; the @key{DEL} key is remapped to act | ||
| 77 | as @kbd{C-d} for the same reasons. | ||
| 78 | |||
| 79 | @kindex C-g @r{(MS-DOS)} | ||
| 80 | @kindex C-BREAK @r{(MS-DOS)} | ||
| 81 | @cindex quitting on MS-DOS | ||
| 82 | Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit | ||
| 83 | character, just like @kbd{C-g}. This is because Emacs cannot detect | ||
| 84 | that you have typed @kbd{C-g} until it is ready for more input. As a | ||
| 85 | consequence, you cannot use @kbd{C-g} to stop a running command | ||
| 86 | (@pxref{Quitting}). By contrast, @kbd{C-@key{BREAK}} @emph{is} detected | ||
| 87 | as soon as you type it (as @kbd{C-g} is on other systems), so it can be | ||
| 88 | used to stop a running command and for emergency escape | ||
| 89 | (@pxref{Emergency Escape}). | ||
| 90 | 94 | ||
| 91 | @cindex mouse support under MS-DOS | 95 | @cindex mouse support under MS-DOS |
| 92 | Emacs on MS-DOS supports a mouse (on the default terminal only). | 96 | Emacs on MS-DOS supports a mouse (on the default terminal only). |
| @@ -281,7 +285,7 @@ only see their short 8+3 aliases. | |||
| 281 | 285 | ||
| 282 | @cindex @env{HOME} directory under MS-DOS | 286 | @cindex @env{HOME} directory under MS-DOS |
| 283 | MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends | 287 | MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends |
| 284 | that the directory where it is installed is the value of @env{HOME} | 288 | that the directory where it is installed is the value of the @env{HOME} |
| 285 | environment variable. That is, if your Emacs binary, | 289 | environment variable. That is, if your Emacs binary, |
| 286 | @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then | 290 | @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then |
| 287 | Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In | 291 | Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In |
| @@ -603,11 +607,11 @@ etc. | |||
| 603 | MS-DOS normally doesn't allow use of several codepages in a single | 607 | MS-DOS normally doesn't allow use of several codepages in a single |
| 604 | session. MS-DOS was designed to load a single codepage at system | 608 | session. MS-DOS was designed to load a single codepage at system |
| 605 | startup, and require you to reboot in order to change | 609 | startup, and require you to reboot in order to change |
| 606 | it@footnote{Normally, one particular codepage is burnt into the display | 610 | it@footnote{Normally, one particular codepage is burnt into the |
| 607 | memory, while other codepages can be installed by modifying system | 611 | display memory, while other codepages can be installed by modifying |
| 608 | configuration files, such as @file{CONFIG.SYS}, and rebooting. While | 612 | system configuration files, such as @file{CONFIG.SYS}, and rebooting. |
| 609 | third-party software is known to exist that allows to change the | 613 | While there is third-party software that allows changing the codepage |
| 610 | codepage without rebooting, we describe here how a stock MS-DOS system | 614 | without rebooting, we describe here how a stock MS-DOS system |
| 611 | behaves.}. Much the same limitation applies when you run DOS | 615 | behaves.}. Much the same limitation applies when you run DOS |
| 612 | executables on other systems such as MS-Windows. | 616 | executables on other systems such as MS-Windows. |
| 613 | 617 | ||
| @@ -749,7 +753,7 @@ asynchronous invocation on other platforms | |||
| 749 | the @kbd{M-x eshell} command. This invokes the Eshell package that | 753 | the @kbd{M-x eshell} command. This invokes the Eshell package that |
| 750 | implements a Posix-like shell entirely in Emacs Lisp. | 754 | implements a Posix-like shell entirely in Emacs Lisp. |
| 751 | 755 | ||
| 752 | By contrast, Emacs compiled as native Windows application | 756 | By contrast, Emacs compiled as a native Windows application |
| 753 | @strong{does} support asynchronous subprocesses. @xref{Windows | 757 | @strong{does} support asynchronous subprocesses. @xref{Windows |
| 754 | Processes}. | 758 | Processes}. |
| 755 | 759 | ||
| @@ -782,7 +786,7 @@ the @code{dired-listing-switches} variable. The options that work are | |||
| 782 | @node Windows Processes | 786 | @node Windows Processes |
| 783 | @section Subprocesses on Windows 9X/ME and Windows NT/2K | 787 | @section Subprocesses on Windows 9X/ME and Windows NT/2K |
| 784 | 788 | ||
| 785 | Emacs compiled as a native Windows application (as opposed to the DOS | 789 | Emacs compiled as a native Windows application (as opposed to the DOS |
| 786 | version) includes full support for asynchronous subprocesses. | 790 | version) includes full support for asynchronous subprocesses. |
| 787 | In the Windows version, synchronous and asynchronous subprocesses work | 791 | In the Windows version, synchronous and asynchronous subprocesses work |
| 788 | fine on both | 792 | fine on both |
diff --git a/man/programs.texi b/man/programs.texi index 67b19c2e5e4..f884e019d22 100644 --- a/man/programs.texi +++ b/man/programs.texi | |||
| @@ -73,6 +73,7 @@ and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}. | |||
| 73 | @cindex Metafont mode | 73 | @cindex Metafont mode |
| 74 | @cindex Modula2 mode | 74 | @cindex Modula2 mode |
| 75 | @cindex Prolog mode | 75 | @cindex Prolog mode |
| 76 | @cindex Python mode | ||
| 76 | @cindex Simula mode | 77 | @cindex Simula mode |
| 77 | @cindex VHDL mode | 78 | @cindex VHDL mode |
| 78 | @cindex M4 mode | 79 | @cindex M4 mode |
| @@ -84,7 +85,7 @@ variant of Lisp) and the Scheme-based DSSSL expression language, Ada, | |||
| 84 | ASM, AWK, C, C++, Delphi (Object Pascal), Fortran (free format and fixed | 85 | ASM, AWK, C, C++, Delphi (Object Pascal), Fortran (free format and fixed |
| 85 | format), Icon, IDL (CORBA), IDLWAVE, Java, Metafont (@TeX{}'s | 86 | format), Icon, IDL (CORBA), IDLWAVE, Java, Metafont (@TeX{}'s |
| 86 | companion for font creation), Modula2, Objective-C, Octave, Pascal, | 87 | companion for font creation), Modula2, Objective-C, Octave, Pascal, |
| 87 | Perl, Pike, PostScript, Prolog, Simula, Tcl, and VHDL. There is | 88 | Perl, Pike, PostScript, Prolog, Python, Simula, Tcl, and VHDL. There is |
| 88 | also a major mode for makefiles, called Makefile mode. An alternative | 89 | also a major mode for makefiles, called Makefile mode. An alternative |
| 89 | mode for Perl is called CPerl mode. Modes are available for the | 90 | mode for Perl is called CPerl mode. Modes are available for the |
| 90 | scripting languages of the common GNU and Unix shells, VMS DCL, and | 91 | scripting languages of the common GNU and Unix shells, VMS DCL, and |
| @@ -241,6 +242,9 @@ which puts point at the beginning and mark at the end of the current | |||
| 241 | defun. This is the easiest way to get ready to kill the defun in | 242 | defun. This is the easiest way to get ready to kill the defun in |
| 242 | order to move it to a different place in the file. If you use the | 243 | order to move it to a different place in the file. If you use the |
| 243 | command while point is between defuns, it uses the following defun. | 244 | command while point is between defuns, it uses the following defun. |
| 245 | Successive uses of @kbd{C-M-h}, or using it in Transient Mark mode | ||
| 246 | when the mark is active, includes an additional defun in the region | ||
| 247 | each time. | ||
| 244 | 248 | ||
| 245 | In C mode, @kbd{C-M-h} runs the function @code{c-mark-function}, | 249 | In C mode, @kbd{C-M-h} runs the function @code{c-mark-function}, |
| 246 | which is almost the same as @code{mark-defun}; the difference is that | 250 | which is almost the same as @code{mark-defun}; the difference is that |
| @@ -375,7 +379,7 @@ whitespace at the beginning of the line, @key{TAB} puts it at the end of | |||
| 375 | that whitespace; otherwise, @key{TAB} keeps point fixed with respect to | 379 | that whitespace; otherwise, @key{TAB} keeps point fixed with respect to |
| 376 | the characters around it. | 380 | the characters around it. |
| 377 | 381 | ||
| 378 | Use @kbd{C-q @key{TAB}} to insert a tab at point. | 382 | Use @kbd{C-q @key{TAB}} to insert a tab character at point. |
| 379 | 383 | ||
| 380 | @kindex C-j | 384 | @kindex C-j |
| 381 | @findex newline-and-indent | 385 | @findex newline-and-indent |
| @@ -384,12 +388,13 @@ the characters around it. | |||
| 384 | followed by a @key{TAB}. @kbd{C-j} at the end of a line creates a | 388 | followed by a @key{TAB}. @kbd{C-j} at the end of a line creates a |
| 385 | blank line and then gives it the appropriate indentation. | 389 | blank line and then gives it the appropriate indentation. |
| 386 | 390 | ||
| 387 | @key{TAB} indents lines that start within a parenthetical grouping | 391 | @key{TAB} indents a line that starts within a parenthetical grouping |
| 388 | each under the preceding line (or the text after the parenthesis). | 392 | under the preceding line within the grouping, or the text after the |
| 389 | Therefore, if you manually give one of these lines a nonstandard | 393 | parenthesis. Therefore, if you manually give one of these lines a |
| 390 | indentation, the lines below will tend to follow it. This behavior is | 394 | nonstandard indentation, the lines below will tend to follow it. This |
| 391 | convenient in cases where you have overridden the standard result of | 395 | behavior is convenient in cases where you have overridden the standard |
| 392 | @key{TAB} because you find it unaesthetic for a particular line. | 396 | result of @key{TAB} because you find it unaesthetic for a particular |
| 397 | line. | ||
| 393 | 398 | ||
| 394 | Remember that an open-parenthesis, open-brace or other opening delimiter | 399 | Remember that an open-parenthesis, open-brace or other opening delimiter |
| 395 | at the left margin is assumed by Emacs (including the indentation routines) | 400 | at the left margin is assumed by Emacs (including the indentation routines) |
| @@ -586,10 +591,11 @@ example, | |||
| 586 | 591 | ||
| 587 | @noindent | 592 | @noindent |
| 588 | specifies an explicit choice for Java mode, and the default @samp{gnu} | 593 | specifies an explicit choice for Java mode, and the default @samp{gnu} |
| 589 | style for the other C-like modes. This variable takes effect when you | 594 | style for the other C-like modes. (These settings are actually the |
| 590 | select one of the C-like major modes; thus, if you specify a new | 595 | defaults.) This variable takes effect when you select one of the |
| 591 | default style for Java mode, you can make it take effect in an | 596 | C-like major modes; thus, if you specify a new default style for Java |
| 592 | existing Java mode buffer by typing @kbd{M-x java-mode} there. | 597 | mode, you can make it take effect in an existing Java mode buffer by |
| 598 | typing @kbd{M-x java-mode} there. | ||
| 593 | 599 | ||
| 594 | The @code{gnu} style specifies the formatting recommended by the GNU | 600 | The @code{gnu} style specifies the formatting recommended by the GNU |
| 595 | Project for C; it is the default, so as to encourage use of our | 601 | Project for C; it is the default, so as to encourage use of our |
| @@ -712,8 +718,10 @@ at or after point and the mark. | |||
| 712 | use @kbd{C-M-@@} (@code{mark-sexp}), which sets mark at the same place | 718 | use @kbd{C-M-@@} (@code{mark-sexp}), which sets mark at the same place |
| 713 | that @kbd{C-M-f} would move to. @kbd{C-M-@@} takes arguments like | 719 | that @kbd{C-M-f} would move to. @kbd{C-M-@@} takes arguments like |
| 714 | @kbd{C-M-f}. In particular, a negative argument is useful for putting | 720 | @kbd{C-M-f}. In particular, a negative argument is useful for putting |
| 715 | the mark at the beginning of the previous balanced expression. | 721 | the mark at the beginning of the previous balanced expression. The |
| 716 | The alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. | 722 | alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. If you use |
| 723 | this command repeatedly, or in Transient Mark mode whenever the mark | ||
| 724 | is active, it extends the region by one sexp each time. | ||
| 717 | 725 | ||
| 718 | In languages that use infix operators, such as C, it is not possible | 726 | In languages that use infix operators, such as C, it is not possible |
| 719 | to recognize all balanced expressions as such because there can be | 727 | to recognize all balanced expressions as such because there can be |
| @@ -1066,9 +1074,10 @@ use in your program. | |||
| 1066 | @kindex C-h S | 1074 | @kindex C-h S |
| 1067 | For C, Lisp, and other languages that have documentation in Info, | 1075 | For C, Lisp, and other languages that have documentation in Info, |
| 1068 | you can use @kbd{C-h S} (@code{info-lookup-symbol}) to view the Info | 1076 | you can use @kbd{C-h S} (@code{info-lookup-symbol}) to view the Info |
| 1069 | documentation for a symbol. You specify the symbol with the | 1077 | documentation for a symbol used in the program. You specify the |
| 1070 | minibuffer; the default is the symbol appearing in the buffer at | 1078 | symbol with the minibuffer; the default is the symbol appearing in the |
| 1071 | point. | 1079 | buffer at point. For example, in C mode this looks for the symbol in |
| 1080 | the C Library Manual. | ||
| 1072 | 1081 | ||
| 1073 | The major mode determines where to look for documentation for the | 1082 | The major mode determines where to look for documentation for the |
| 1074 | symbol---which Info files to look in, and which indices to search. | 1083 | symbol---which Info files to look in, and which indices to search. |
| @@ -1316,7 +1325,9 @@ symbol names. | |||
| 1316 | The character @kbd{M-@key{TAB}} runs a command to complete the | 1325 | The character @kbd{M-@key{TAB}} runs a command to complete the |
| 1317 | partial symbol before point against the set of meaningful symbol | 1326 | partial symbol before point against the set of meaningful symbol |
| 1318 | names. This command inserts at point any additional characters that | 1327 | names. This command inserts at point any additional characters that |
| 1319 | it can determine from the partial name. | 1328 | it can determine from the partial name. (If your window manager |
| 1329 | defines @kbd{M-@key{TAB}} to switch windows, you can type this Emacs | ||
| 1330 | command as @kbd{@key{ESC} @key{TAB}}.) | ||
| 1320 | 1331 | ||
| 1321 | If the partial name in the buffer has multiple possible completions | 1332 | If the partial name in the buffer has multiple possible completions |
| 1322 | that differ in the very next character, so that it is impossible to | 1333 | that differ in the very next character, so that it is impossible to |
| @@ -1513,10 +1524,10 @@ With prefix argument @var{n}, move @var{n} times. | |||
| 1513 | 1524 | ||
| 1514 | In C mode and related modes, certain printing characters are | 1525 | In C mode and related modes, certain printing characters are |
| 1515 | ``electric''---in addition to inserting themselves, they also reindent | 1526 | ``electric''---in addition to inserting themselves, they also reindent |
| 1516 | the current line and may insert newlines. This feature is controlled by | 1527 | the current line, and optionally also insert newlines. The |
| 1517 | the variable @code{c-auto-newline}. The ``electric'' characters are | 1528 | ``electric'' characters are @kbd{@{}, @kbd{@}}, @kbd{:}, @kbd{#}, |
| 1518 | @kbd{@{}, @kbd{@}}, @kbd{:}, @kbd{#}, @kbd{;}, @kbd{,}, @kbd{<}, | 1529 | @kbd{;}, @kbd{,}, @kbd{<}, @kbd{>}, @kbd{/}, @kbd{*}, @kbd{(}, and |
| 1519 | @kbd{>}, @kbd{/}, @kbd{*}, @kbd{(}, and @kbd{)}. | 1530 | @kbd{)}. |
| 1520 | 1531 | ||
| 1521 | Electric characters insert newlines only when the @dfn{auto-newline} | 1532 | Electric characters insert newlines only when the @dfn{auto-newline} |
| 1522 | feature is enabled (indicated by @samp{/a} in the mode line after the | 1533 | feature is enabled (indicated by @samp{/a} in the mode line after the |
diff --git a/man/sending.texi b/man/sending.texi index a1564d4fc01..bb1ac2864ac 100644 --- a/man/sending.texi +++ b/man/sending.texi | |||
| @@ -496,13 +496,15 @@ edit. | |||
| 496 | 496 | ||
| 497 | @findex mail-complete | 497 | @findex mail-complete |
| 498 | @kindex M-TAB @r{(Mail mode)} | 498 | @kindex M-TAB @r{(Mail mode)} |
| 499 | While editing a header field that contains mailing addresses, such as | 499 | While editing a header field that contains mailing addresses, such |
| 500 | @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing | 500 | as @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing |
| 501 | address by typing @kbd{M-@key{TAB}} (@code{mail-complete}). It inserts | 501 | address by typing @kbd{M-@key{TAB}} (@code{mail-complete}). It |
| 502 | the full name corresponding to the address, if it can determine the full | 502 | inserts the full name corresponding to the address, if it can |
| 503 | name. The variable @code{mail-complete-style} controls whether to insert | 503 | determine the full name. The variable @code{mail-complete-style} |
| 504 | the full name, and what style to use, as in @code{mail-from-style} | 504 | controls whether to insert the full name, and what style to use, as in |
| 505 | (@pxref{Mail Headers}). | 505 | @code{mail-from-style} (@pxref{Mail Headers}). (If your window |
| 506 | manager defines @kbd{M-@key{TAB}} to switch windows, you can type this | ||
| 507 | Emacs command as @kbd{@key{ESC} @key{TAB}}.) | ||
| 506 | 508 | ||
| 507 | For completion purposes, the valid mailing addresses are taken to be | 509 | For completion purposes, the valid mailing addresses are taken to be |
| 508 | the local users' names plus your personal mail aliases. You can | 510 | the local users' names plus your personal mail aliases. You can |
diff --git a/man/text.texi b/man/text.texi index 8eaa6178a8d..7b262e11abe 100644 --- a/man/text.texi +++ b/man/text.texi | |||
| @@ -852,10 +852,12 @@ paragraph-indent-minor-mode} to enter an equivalent minor mode, for | |||
| 852 | instance during mail composition. | 852 | instance during mail composition. |
| 853 | 853 | ||
| 854 | @kindex M-TAB @r{(Text mode)} | 854 | @kindex M-TAB @r{(Text mode)} |
| 855 | Text mode, and all the modes based on it, define @kbd{M-@key{TAB}} as | 855 | Text mode, and all the modes based on it, define @kbd{M-@key{TAB}} |
| 856 | the command @code{ispell-complete-word}, which performs completion of | 856 | as the command @code{ispell-complete-word}, which performs completion |
| 857 | the partial word in the buffer before point, using the spelling | 857 | of the partial word in the buffer before point, using the spelling |
| 858 | dictionary as the space of possible words. @xref{Spelling}. | 858 | dictionary as the space of possible words. @xref{Spelling}. If your |
| 859 | window manager defines @kbd{M-@key{TAB}} to switch windows, you can | ||
| 860 | type this Emacs command as @kbd{@key{ESC} @key{TAB}}. | ||
| 859 | 861 | ||
| 860 | @vindex text-mode-hook | 862 | @vindex text-mode-hook |
| 861 | Entering Text mode runs the hook @code{text-mode-hook}. Other major | 863 | Entering Text mode runs the hook @code{text-mode-hook}. Other major |
diff --git a/man/trouble.texi b/man/trouble.texi index 142560c1fe8..ac9697eeeb5 100644 --- a/man/trouble.texi +++ b/man/trouble.texi | |||
| @@ -57,7 +57,7 @@ successive @kbd{C-g} characters to get out of a search | |||
| 57 | like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to | 57 | like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to |
| 58 | recognize @kbd{C-g} while a command is running, between interactions | 58 | recognize @kbd{C-g} while a command is running, between interactions |
| 59 | with the user. By contrast, it @emph{is} feasible to recognize | 59 | with the user. By contrast, it @emph{is} feasible to recognize |
| 60 | @kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Input}. | 60 | @kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard}. |
| 61 | 61 | ||
| 62 | @findex keyboard-quit | 62 | @findex keyboard-quit |
| 63 | @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} | 63 | @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} |
| @@ -66,9 +66,9 @@ frequently and quits if it is non-@code{nil}. @kbd{C-g} is only | |||
| 66 | actually executed as a command if you type it while Emacs is waiting for | 66 | actually executed as a command if you type it while Emacs is waiting for |
| 67 | input. In that case, the command it runs is @code{keyboard-quit}. | 67 | input. In that case, the command it runs is @code{keyboard-quit}. |
| 68 | 68 | ||
| 69 | If you quit with @kbd{C-g} a second time before the first @kbd{C-g} is | 69 | On a text terminal, if you quit with @kbd{C-g} a second time before |
| 70 | recognized, you activate the ``emergency escape'' feature and return to | 70 | the first @kbd{C-g} is recognized, you activate the ``emergency |
| 71 | the shell. @xref{Emergency Escape}. | 71 | escape'' feature and return to the shell. @xref{Emergency Escape}. |
| 72 | 72 | ||
| 73 | @cindex NFS and quitting | 73 | @cindex NFS and quitting |
| 74 | There may be times when you cannot quit. When Emacs is waiting for | 74 | There may be times when you cannot quit. When Emacs is waiting for |
| @@ -237,11 +237,11 @@ back to top level. @xref{Recursive Edit}. | |||
| 237 | @node Screen Garbled | 237 | @node Screen Garbled |
| 238 | @subsection Garbage on the Screen | 238 | @subsection Garbage on the Screen |
| 239 | 239 | ||
| 240 | If the data on the screen looks wrong, the first thing to do is see | 240 | If the text on a text terminal looks wrong, the first thing to do is |
| 241 | whether the text is really wrong. Type @kbd{C-l} to redisplay the | 241 | see whether it is wrong in the buffer. Type @kbd{C-l} to redisplay |
| 242 | entire screen. If the screen appears correct after this, the problem | 242 | the entire screen. If the screen appears correct after this, the |
| 243 | was entirely in the previous screen update. (Otherwise, see the following | 243 | problem was entirely in the previous screen update. (Otherwise, see |
| 244 | section.) | 244 | the following section.) |
| 245 | 245 | ||
| 246 | Display updating problems often result from an incorrect termcap entry | 246 | Display updating problems often result from an incorrect termcap entry |
| 247 | for the terminal you are using. The file @file{etc/TERMS} in the Emacs | 247 | for the terminal you are using. The file @file{etc/TERMS} in the Emacs |
diff --git a/man/windows.texi b/man/windows.texi index 0d90a3b2e0c..092a678901b 100644 --- a/man/windows.texi +++ b/man/windows.texi | |||
| @@ -109,15 +109,15 @@ scroll bar, the mode line of the split window is side by side with | |||
| 109 | your click. | 109 | your click. |
| 110 | 110 | ||
| 111 | @vindex truncate-partial-width-windows | 111 | @vindex truncate-partial-width-windows |
| 112 | When a window is less than the full width, text lines too long to fit are | 112 | When a window is less than the full width, text lines too long to |
| 113 | frequent. Continuing all those lines might be confusing. The variable | 113 | fit are frequent. Continuing all those lines might be confusing, so |
| 114 | @code{truncate-partial-width-windows} can be set non-@code{nil} to force | 114 | if the variable @code{truncate-partial-width-windows} is |
| 115 | truncation in all windows less than the full width of the screen, | 115 | non-@code{nil}, that forces truncation in all windows less than the |
| 116 | independent of the buffer being displayed and its value for | 116 | full width of the screen, independent of the buffer being displayed |
| 117 | @code{truncate-lines}. @xref{Continuation Lines}.@refill | 117 | and its value for @code{truncate-lines}. @xref{Display Custom}. |
| 118 | 118 | ||
| 119 | Horizontal scrolling is often used in side-by-side windows. | 119 | Horizontal scrolling is often used in side-by-side windows. |
| 120 | @xref{Display}. | 120 | @xref{Horizontal Scrolling}. |
| 121 | 121 | ||
| 122 | @vindex split-window-keep-point | 122 | @vindex split-window-keep-point |
| 123 | If @code{split-window-keep-point} is non-@code{nil}, the default, | 123 | If @code{split-window-keep-point} is non-@code{nil}, the default, |
diff --git a/src/ChangeLog b/src/ChangeLog index c6ab6985ed0..400946fb4d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,116 @@ | |||
| 1 | 2005-02-17 Andreas Schwab <schwab@suse.de> | ||
| 2 | |||
| 3 | * xfns.c (hack_wm_protocols): Use correct type for last parameter | ||
| 4 | of XGetWindowProperty to avoid aliasing issues. | ||
| 5 | (Fx_window_property): Likewise. | ||
| 6 | |||
| 7 | * xselect.c (Fx_disown_selection_internal): Use union of struct | ||
| 8 | input_event and struct selection_input_event to avoid aliasing | ||
| 9 | issues. | ||
| 10 | |||
| 11 | * xterm.c (handle_one_xevent): Use union of struct input_event and | ||
| 12 | struct selection_input_event to avoid aliasing issues. | ||
| 13 | (SET_SAVED_MENU_EVENT): Adapt reference to inev. | ||
| 14 | |||
| 15 | 2005-02-17 Kim F. Storm <storm@cua.dk> | ||
| 16 | |||
| 17 | * dispextern.h (enum it_method): New enum. | ||
| 18 | (GET_FROM_*): Its members. | ||
| 19 | (struct it): Change member method from function pointer to enum. | ||
| 20 | |||
| 21 | * xdisp.c (check_it, init_from_display_pos, handle_stop) | ||
| 22 | (setup_for_ellipsis, handle_single_display_spec) | ||
| 23 | (handle_composition_prop, next_overlay_string) | ||
| 24 | (get_overlay_strings, reseat_1, reseat_to_string) | ||
| 25 | (next_element_from_ellipsis, BUFFER_POS_REACHED_P) | ||
| 26 | (in_display_vector_p, display_line, get_next_display_element): | ||
| 27 | Change it->method from function pointer to enum. | ||
| 28 | (get_next_element): New array to map it->method to function. | ||
| 29 | (get_next_display_element): Use it. | ||
| 30 | (set_iterator_to_next): Use switch instead of if/else chain. | ||
| 31 | |||
| 32 | 2005-02-15 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> | ||
| 33 | |||
| 34 | * w32select.c: Summary: Thorough rework to implement Unicode | ||
| 35 | clipboard operations and delayed rendering. | ||
| 36 | |||
| 37 | Drop last_clipboard_text and related code, keep track of | ||
| 38 | ownership via clipboard_owner instead. Drop old #if0 | ||
| 39 | sections. | ||
| 40 | |||
| 41 | (DEFAULT_LCID, ANSICP, OEMCP, QUNICODE, QANSICP, QOEMCP) | ||
| 42 | (clipboard_owner, modifying_clipboard, cfg_coding_system) | ||
| 43 | (cfg_codepage, cfg_lcid, cfg_clipboard_type, current_text) | ||
| 44 | (current_coding_system, current_requires_encoding) | ||
| 45 | (current_num_nls, current_clipboard_type, current_lcid): New | ||
| 46 | static variables. | ||
| 47 | |||
| 48 | (convert_to_handle_as_ascii, convert_to_handle_as_coded) | ||
| 49 | (render, render_all, run_protected, lisp_error_handler) | ||
| 50 | (owner_callback, create_owner, setup_config) | ||
| 51 | (enum_locale_callback, cp_from_locale, coding_from_cp): New | ||
| 52 | local functions. | ||
| 53 | |||
| 54 | (term_w32select, globals_of_w32select): New global functions. | ||
| 55 | |||
| 56 | (Fw32_set_clipboard_data): Ignore parameter FRAME, use | ||
| 57 | clipboard_owner instead. Use delayed rendering and provide | ||
| 58 | all text formats. Provide CF_LOCALE if necessary. | ||
| 59 | |||
| 60 | (Fw32_get_clipboard_data): Handle CF_UNICODETEXT and | ||
| 61 | CF_LOCALE. Fall back to CF_TEXT, if CF_UNICODETEXT is not | ||
| 62 | available. Force DOS line-ends for decoding. | ||
| 63 | |||
| 64 | (Fx_selection_exists_p): Handle CF_UNICODETEXT. | ||
| 65 | |||
| 66 | (syms_of_w32select): Init and register new variables. | ||
| 67 | |||
| 68 | * w32.h: Add prototypes for globals_of_w32select and | ||
| 69 | term_w32select. Make the neighboring K&R declarations into | ||
| 70 | prototypes, too. | ||
| 71 | |||
| 72 | * emacs.c: Include w32.h to get function prototypes. | ||
| 73 | (main): Call globals_of_w32select. | ||
| 74 | |||
| 75 | * w32.c (term_ntproc): Call term_w32select. | ||
| 76 | |||
| 77 | * s/ms-w32.h: Guard MSC-specific #pragmas with an #ifdef. | ||
| 78 | |||
| 79 | 2005-02-16 Kim F. Storm <storm@cua.dk> | ||
| 80 | |||
| 81 | * xdisp.c (BUFFER_POS_REACHED_P): Return true if pos reached and | ||
| 82 | at end of display vector. | ||
| 83 | |||
| 84 | 2005-02-15 Richard M. Stallman <rms@gnu.org> | ||
| 85 | |||
| 86 | * xdisp.c (get_next_display_element): Fix escape-glyph criterion | ||
| 87 | for mode and header lines. | ||
| 88 | |||
| 89 | * lread.c (syms_of_lread) <user-init-file>: Doc fix. | ||
| 90 | |||
| 91 | * keymap.h (describe_map_tree): Change decl. | ||
| 92 | |||
| 93 | * keyboard.c (command_loop_1): Always use safe_run_hooks | ||
| 94 | to run Qdeferred_action_function. | ||
| 95 | |||
| 96 | * keymap.c (describe_map_tree): New arg MENTION_SHADOW. Calls changed. | ||
| 97 | (describe_map, describe_vector): Likewise. When it's 1, | ||
| 98 | don't omit shadowed bindings, instead mark them as shadowed. | ||
| 99 | |||
| 100 | * doc.c (Fsubstitute_command_keys): Compute list of shadowing maps | ||
| 101 | for describe_map_tree. Pass 1 for MENTION_SHADOW. | ||
| 102 | |||
| 103 | * data.c (Fsetq_default): Allow no arg case. | ||
| 104 | |||
| 105 | 2005-02-14 Kenichi Handa <handa@m17n.org> | ||
| 106 | |||
| 107 | * coding.c (encode_coding_string): Always return a unibyte string. | ||
| 108 | If NOCOPY is nonzero and there's no need of encoding, make STR | ||
| 109 | unibyte directly. | ||
| 110 | |||
| 111 | * xselect.c (lisp_data_to_selection_data): If OBJ is a non-ASCII | ||
| 112 | multibyte string, signal an error instead of aborting. | ||
| 113 | |||
| 1 | 2005-02-12 Dan Nicolaescu <dann@ics.uci.edu> | 114 | 2005-02-12 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 115 | ||
| 3 | * keyboard.c: If HAVE_FCNTL_H include fcntl.h. | 116 | * keyboard.c: If HAVE_FCNTL_H include fcntl.h. |
diff --git a/src/coding.c b/src/coding.c index 11a7061c837..9cd493ab062 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -6357,7 +6357,12 @@ encode_coding_string (str, coding, nocopy) | |||
| 6357 | 6357 | ||
| 6358 | if (SYMBOLP (coding->pre_write_conversion) | 6358 | if (SYMBOLP (coding->pre_write_conversion) |
| 6359 | && !NILP (Ffboundp (coding->pre_write_conversion))) | 6359 | && !NILP (Ffboundp (coding->pre_write_conversion))) |
| 6360 | str = run_pre_post_conversion_on_str (str, coding, 1); | 6360 | { |
| 6361 | str = run_pre_post_conversion_on_str (str, coding, 1); | ||
| 6362 | /* As STR is just newly generated, we don't have to copy it | ||
| 6363 | anymore. */ | ||
| 6364 | nocopy = 1; | ||
| 6365 | } | ||
| 6361 | 6366 | ||
| 6362 | from = 0; | 6367 | from = 0; |
| 6363 | to = SCHARS (str); | 6368 | to = SCHARS (str); |
| @@ -6365,21 +6370,10 @@ encode_coding_string (str, coding, nocopy) | |||
| 6365 | 6370 | ||
| 6366 | /* Encoding routines determine the multibyteness of the source text | 6371 | /* Encoding routines determine the multibyteness of the source text |
| 6367 | by coding->src_multibyte. */ | 6372 | by coding->src_multibyte. */ |
| 6368 | coding->src_multibyte = STRING_MULTIBYTE (str); | 6373 | coding->src_multibyte = SCHARS (str) < SBYTES (str); |
| 6369 | coding->dst_multibyte = 0; | 6374 | coding->dst_multibyte = 0; |
| 6370 | if (! CODING_REQUIRE_ENCODING (coding)) | 6375 | if (! CODING_REQUIRE_ENCODING (coding)) |
| 6371 | { | 6376 | goto no_need_of_encoding; |
| 6372 | coding->consumed = SBYTES (str); | ||
| 6373 | coding->consumed_char = SCHARS (str); | ||
| 6374 | if (STRING_MULTIBYTE (str)) | ||
| 6375 | { | ||
| 6376 | str = Fstring_as_unibyte (str); | ||
| 6377 | nocopy = 1; | ||
| 6378 | } | ||
| 6379 | coding->produced = SBYTES (str); | ||
| 6380 | coding->produced_char = SCHARS (str); | ||
| 6381 | return (nocopy ? str : Fcopy_sequence (str)); | ||
| 6382 | } | ||
| 6383 | 6377 | ||
| 6384 | if (coding->composing != COMPOSITION_DISABLED) | 6378 | if (coding->composing != COMPOSITION_DISABLED) |
| 6385 | coding_save_composition (coding, from, to, str); | 6379 | coding_save_composition (coding, from, to, str); |
| @@ -6395,7 +6389,7 @@ encode_coding_string (str, coding, nocopy) | |||
| 6395 | if (from == to_byte) | 6389 | if (from == to_byte) |
| 6396 | { | 6390 | { |
| 6397 | coding_free_composition_data (coding); | 6391 | coding_free_composition_data (coding); |
| 6398 | return (nocopy ? str : Fcopy_sequence (str)); | 6392 | goto no_need_of_encoding; |
| 6399 | } | 6393 | } |
| 6400 | shrinked_bytes = from + (SBYTES (str) - to_byte); | 6394 | shrinked_bytes = from + (SBYTES (str) - to_byte); |
| 6401 | } | 6395 | } |
| @@ -6440,6 +6434,25 @@ encode_coding_string (str, coding, nocopy) | |||
| 6440 | coding_free_composition_data (coding); | 6434 | coding_free_composition_data (coding); |
| 6441 | 6435 | ||
| 6442 | return newstr; | 6436 | return newstr; |
| 6437 | |||
| 6438 | no_need_of_encoding: | ||
| 6439 | coding->consumed = SBYTES (str); | ||
| 6440 | coding->consumed_char = SCHARS (str); | ||
| 6441 | if (STRING_MULTIBYTE (str)) | ||
| 6442 | { | ||
| 6443 | if (nocopy) | ||
| 6444 | /* We are sure that STR doesn't contain a multibyte | ||
| 6445 | character. */ | ||
| 6446 | STRING_SET_UNIBYTE (str); | ||
| 6447 | else | ||
| 6448 | { | ||
| 6449 | str = Fstring_as_unibyte (str); | ||
| 6450 | nocopy = 1; | ||
| 6451 | } | ||
| 6452 | } | ||
| 6453 | coding->produced = SBYTES (str); | ||
| 6454 | coding->produced_char = SCHARS (str); | ||
| 6455 | return (nocopy ? str : Fcopy_sequence (str)); | ||
| 6443 | } | 6456 | } |
| 6444 | 6457 | ||
| 6445 | 6458 | ||
diff --git a/src/data.c b/src/data.c index be1e4d33bbb..25691a4678b 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1458,7 +1458,7 @@ for this variable. */) | |||
| 1458 | return value; | 1458 | return value; |
| 1459 | } | 1459 | } |
| 1460 | 1460 | ||
| 1461 | DEFUN ("setq-default", Fsetq_default, Ssetq_default, 2, UNEVALLED, 0, | 1461 | DEFUN ("setq-default", Fsetq_default, Ssetq_default, 0, UNEVALLED, 0, |
| 1462 | doc: /* Set the default value of variable VAR to VALUE. | 1462 | doc: /* Set the default value of variable VAR to VALUE. |
| 1463 | VAR, the variable name, is literal (not evaluated); | 1463 | VAR, the variable name, is literal (not evaluated); |
| 1464 | VALUE is an expression: it is evaluated and its value returned. | 1464 | VALUE is an expression: it is evaluated and its value returned. |
| @@ -1470,7 +1470,7 @@ More generally, you can use multiple variables and values, as in | |||
| 1470 | This sets each VAR's default value to the corresponding VALUE. | 1470 | This sets each VAR's default value to the corresponding VALUE. |
| 1471 | The VALUE for the Nth VAR can refer to the new default values | 1471 | The VALUE for the Nth VAR can refer to the new default values |
| 1472 | of previous VARs. | 1472 | of previous VARs. |
| 1473 | usage: (setq-default VAR VALUE [VAR VALUE...]) */) | 1473 | usage: (setq-default [VAR VALUE...]) */) |
| 1474 | (args) | 1474 | (args) |
| 1475 | Lisp_Object args; | 1475 | Lisp_Object args; |
| 1476 | { | 1476 | { |
diff --git a/src/dispextern.h b/src/dispextern.h index 84fff3f0b09..77dba7bb09e 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1781,6 +1781,16 @@ struct it_slice | |||
| 1781 | Lisp_Object height; | 1781 | Lisp_Object height; |
| 1782 | }; | 1782 | }; |
| 1783 | 1783 | ||
| 1784 | enum it_method { | ||
| 1785 | GET_FROM_BUFFER = 0, | ||
| 1786 | GET_FROM_DISPLAY_VECTOR, | ||
| 1787 | GET_FROM_COMPOSITION, | ||
| 1788 | GET_FROM_STRING, | ||
| 1789 | GET_FROM_C_STRING, | ||
| 1790 | GET_FROM_IMAGE, | ||
| 1791 | GET_FROM_STRETCH, | ||
| 1792 | NUM_IT_METHODS | ||
| 1793 | }; | ||
| 1784 | 1794 | ||
| 1785 | struct it | 1795 | struct it |
| 1786 | { | 1796 | { |
| @@ -1791,9 +1801,8 @@ struct it | |||
| 1791 | /* The window's frame. */ | 1801 | /* The window's frame. */ |
| 1792 | struct frame *f; | 1802 | struct frame *f; |
| 1793 | 1803 | ||
| 1794 | /* Function to call to load this structure with the next display | 1804 | /* Method to use to load this structure with the next display element. */ |
| 1795 | element. */ | 1805 | enum it_method method; |
| 1796 | int (* method) P_ ((struct it *it)); | ||
| 1797 | 1806 | ||
| 1798 | /* The next position at which to check for face changes, invisible | 1807 | /* The next position at which to check for face changes, invisible |
| 1799 | text, overlay strings, end of text etc., which see. */ | 1808 | text, overlay strings, end of text etc., which see. */ |
| @@ -882,6 +882,9 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 882 | { | 882 | { |
| 883 | struct buffer *oldbuf; | 883 | struct buffer *oldbuf; |
| 884 | int start_idx; | 884 | int start_idx; |
| 885 | /* This is for computing the SHADOWS arg for describe_map_tree. */ | ||
| 886 | Lisp_Object active_maps = Fcurrent_active_maps (Qnil); | ||
| 887 | Lisp_Object earlier_maps; | ||
| 885 | 888 | ||
| 886 | changed = 1; | 889 | changed = 1; |
| 887 | strp += 2; /* skip \{ or \< */ | 890 | strp += 2; /* skip \{ or \< */ |
| @@ -932,7 +935,13 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 932 | else if (start[-1] == '<') | 935 | else if (start[-1] == '<') |
| 933 | keymap = tem; | 936 | keymap = tem; |
| 934 | else | 937 | else |
| 935 | describe_map_tree (tem, 1, Qnil, Qnil, (char *)0, 1, 0, 0); | 938 | { |
| 939 | /* Get the list of active keymaps that precede this one. | ||
| 940 | If this one's not active, get nil. */ | ||
| 941 | earlier_maps = Fcdr (Fmemq (tem, Freverse (active_maps))); | ||
| 942 | describe_map_tree (tem, 1, Fnreverse (earlier_maps), | ||
| 943 | Qnil, (char *)0, 1, 0, 0, 1); | ||
| 944 | } | ||
| 936 | tem = Fbuffer_string (); | 945 | tem = Fbuffer_string (); |
| 937 | Ferase_buffer (); | 946 | Ferase_buffer (); |
| 938 | set_buffer_internal (oldbuf); | 947 | set_buffer_internal (oldbuf); |
diff --git a/src/emacs.c b/src/emacs.c index d5ae652d6ee..159a162d649 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -42,6 +42,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 42 | 42 | ||
| 43 | #ifdef WINDOWSNT | 43 | #ifdef WINDOWSNT |
| 44 | #include <fcntl.h> | 44 | #include <fcntl.h> |
| 45 | #include <windows.h> /* just for w32.h */ | ||
| 46 | #include "w32.h" | ||
| 45 | #endif | 47 | #endif |
| 46 | 48 | ||
| 47 | #include "lisp.h" | 49 | #include "lisp.h" |
| @@ -1655,6 +1657,7 @@ main (argc, argv | |||
| 1655 | #ifdef HAVE_NTGUI | 1657 | #ifdef HAVE_NTGUI |
| 1656 | globals_of_w32fns (); | 1658 | globals_of_w32fns (); |
| 1657 | globals_of_w32menu (); | 1659 | globals_of_w32menu (); |
| 1660 | globals_of_w32select (); | ||
| 1658 | #endif /* HAVE_NTGUI */ | 1661 | #endif /* HAVE_NTGUI */ |
| 1659 | } | 1662 | } |
| 1660 | 1663 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index f3245a59669..42255dfbd91 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1427,7 +1427,7 @@ command_loop_1 () | |||
| 1427 | resize_echo_area_exactly (); | 1427 | resize_echo_area_exactly (); |
| 1428 | 1428 | ||
| 1429 | if (!NILP (Vdeferred_action_list)) | 1429 | if (!NILP (Vdeferred_action_list)) |
| 1430 | call0 (Vdeferred_action_function); | 1430 | safe_run_hooks (Qdeferred_action_function); |
| 1431 | 1431 | ||
| 1432 | if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) | 1432 | if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) |
| 1433 | { | 1433 | { |
diff --git a/src/keymap.c b/src/keymap.c index f28032d0f82..a55563a4e92 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -121,10 +121,11 @@ static void describe_command P_ ((Lisp_Object, Lisp_Object)); | |||
| 121 | static void describe_translation P_ ((Lisp_Object, Lisp_Object)); | 121 | static void describe_translation P_ ((Lisp_Object, Lisp_Object)); |
| 122 | static void describe_map P_ ((Lisp_Object, Lisp_Object, | 122 | static void describe_map P_ ((Lisp_Object, Lisp_Object, |
| 123 | void (*) P_ ((Lisp_Object, Lisp_Object)), | 123 | void (*) P_ ((Lisp_Object, Lisp_Object)), |
| 124 | int, Lisp_Object, Lisp_Object*, int)); | 124 | int, Lisp_Object, Lisp_Object*, int, int)); |
| 125 | static void describe_vector P_ ((Lisp_Object, Lisp_Object, Lisp_Object, | 125 | static void describe_vector P_ ((Lisp_Object, Lisp_Object, Lisp_Object, |
| 126 | void (*) (Lisp_Object, Lisp_Object), int, | 126 | void (*) (Lisp_Object, Lisp_Object), int, |
| 127 | Lisp_Object, Lisp_Object, int *, int, int)); | 127 | Lisp_Object, Lisp_Object, int *, |
| 128 | int, int, int)); | ||
| 128 | static void silly_event_symbol_error P_ ((Lisp_Object)); | 129 | static void silly_event_symbol_error P_ ((Lisp_Object)); |
| 129 | 130 | ||
| 130 | /* Keymap object support - constructors and predicates. */ | 131 | /* Keymap object support - constructors and predicates. */ |
| @@ -2835,7 +2836,7 @@ You type Translation\n\ | |||
| 2835 | 2836 | ||
| 2836 | if (!NILP (Vkey_translation_map)) | 2837 | if (!NILP (Vkey_translation_map)) |
| 2837 | describe_map_tree (Vkey_translation_map, 0, Qnil, prefix, | 2838 | describe_map_tree (Vkey_translation_map, 0, Qnil, prefix, |
| 2838 | "Key translations", nomenu, 1, 0); | 2839 | "Key translations", nomenu, 1, 0, 0); |
| 2839 | 2840 | ||
| 2840 | 2841 | ||
| 2841 | /* Print the (major mode) local map. */ | 2842 | /* Print the (major mode) local map. */ |
| @@ -2848,7 +2849,7 @@ You type Translation\n\ | |||
| 2848 | if (!NILP (start1)) | 2849 | if (!NILP (start1)) |
| 2849 | { | 2850 | { |
| 2850 | describe_map_tree (start1, 1, shadow, prefix, | 2851 | describe_map_tree (start1, 1, shadow, prefix, |
| 2851 | "\f\nOverriding Bindings", nomenu, 0, 0); | 2852 | "\f\nOverriding Bindings", nomenu, 0, 0, 0); |
| 2852 | shadow = Fcons (start1, shadow); | 2853 | shadow = Fcons (start1, shadow); |
| 2853 | } | 2854 | } |
| 2854 | else | 2855 | else |
| @@ -2869,7 +2870,8 @@ You type Translation\n\ | |||
| 2869 | if (!NILP (start1)) | 2870 | if (!NILP (start1)) |
| 2870 | { | 2871 | { |
| 2871 | describe_map_tree (start1, 1, shadow, prefix, | 2872 | describe_map_tree (start1, 1, shadow, prefix, |
| 2872 | "\f\n`keymap' Property Bindings", nomenu, 0, 0); | 2873 | "\f\n`keymap' Property Bindings", nomenu, |
| 2874 | 0, 0, 0); | ||
| 2873 | shadow = Fcons (start1, shadow); | 2875 | shadow = Fcons (start1, shadow); |
| 2874 | } | 2876 | } |
| 2875 | 2877 | ||
| @@ -2897,7 +2899,8 @@ You type Translation\n\ | |||
| 2897 | p += sizeof (" Minor Mode Bindings") - 1; | 2899 | p += sizeof (" Minor Mode Bindings") - 1; |
| 2898 | *p = 0; | 2900 | *p = 0; |
| 2899 | 2901 | ||
| 2900 | describe_map_tree (maps[i], 1, shadow, prefix, title, nomenu, 0, 0); | 2902 | describe_map_tree (maps[i], 1, shadow, prefix, |
| 2903 | title, nomenu, 0, 0, 0); | ||
| 2901 | shadow = Fcons (maps[i], shadow); | 2904 | shadow = Fcons (maps[i], shadow); |
| 2902 | } | 2905 | } |
| 2903 | 2906 | ||
| @@ -2907,23 +2910,23 @@ You type Translation\n\ | |||
| 2907 | { | 2910 | { |
| 2908 | if (EQ (start1, XBUFFER (buffer)->keymap)) | 2911 | if (EQ (start1, XBUFFER (buffer)->keymap)) |
| 2909 | describe_map_tree (start1, 1, shadow, prefix, | 2912 | describe_map_tree (start1, 1, shadow, prefix, |
| 2910 | "\f\nMajor Mode Bindings", nomenu, 0, 0); | 2913 | "\f\nMajor Mode Bindings", nomenu, 0, 0, 0); |
| 2911 | else | 2914 | else |
| 2912 | describe_map_tree (start1, 1, shadow, prefix, | 2915 | describe_map_tree (start1, 1, shadow, prefix, |
| 2913 | "\f\n`local-map' Property Bindings", | 2916 | "\f\n`local-map' Property Bindings", |
| 2914 | nomenu, 0, 0); | 2917 | nomenu, 0, 0, 0); |
| 2915 | 2918 | ||
| 2916 | shadow = Fcons (start1, shadow); | 2919 | shadow = Fcons (start1, shadow); |
| 2917 | } | 2920 | } |
| 2918 | } | 2921 | } |
| 2919 | 2922 | ||
| 2920 | describe_map_tree (current_global_map, 1, shadow, prefix, | 2923 | describe_map_tree (current_global_map, 1, shadow, prefix, |
| 2921 | "\f\nGlobal Bindings", nomenu, 0, 1); | 2924 | "\f\nGlobal Bindings", nomenu, 0, 1, 0); |
| 2922 | 2925 | ||
| 2923 | /* Print the function-key-map translations under this prefix. */ | 2926 | /* Print the function-key-map translations under this prefix. */ |
| 2924 | if (!NILP (Vfunction_key_map)) | 2927 | if (!NILP (Vfunction_key_map)) |
| 2925 | describe_map_tree (Vfunction_key_map, 0, Qnil, prefix, | 2928 | describe_map_tree (Vfunction_key_map, 0, Qnil, prefix, |
| 2926 | "\f\nFunction key map translations", nomenu, 1, 0); | 2929 | "\f\nFunction key map translations", nomenu, 1, 0, 0); |
| 2927 | 2930 | ||
| 2928 | UNGCPRO; | 2931 | UNGCPRO; |
| 2929 | return Qnil; | 2932 | return Qnil; |
| @@ -2944,17 +2947,21 @@ You type Translation\n\ | |||
| 2944 | so print strings and vectors differently. | 2947 | so print strings and vectors differently. |
| 2945 | 2948 | ||
| 2946 | If ALWAYS_TITLE is nonzero, print the title even if there are no maps | 2949 | If ALWAYS_TITLE is nonzero, print the title even if there are no maps |
| 2947 | to look through. */ | 2950 | to look through. |
| 2951 | |||
| 2952 | If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW, | ||
| 2953 | don't omit it; instead, mention it but say it is shadowed. */ | ||
| 2948 | 2954 | ||
| 2949 | void | 2955 | void |
| 2950 | describe_map_tree (startmap, partial, shadow, prefix, title, nomenu, transl, | 2956 | describe_map_tree (startmap, partial, shadow, prefix, title, nomenu, transl, |
| 2951 | always_title) | 2957 | always_title, mention_shadow) |
| 2952 | Lisp_Object startmap, shadow, prefix; | 2958 | Lisp_Object startmap, shadow, prefix; |
| 2953 | int partial; | 2959 | int partial; |
| 2954 | char *title; | 2960 | char *title; |
| 2955 | int nomenu; | 2961 | int nomenu; |
| 2956 | int transl; | 2962 | int transl; |
| 2957 | int always_title; | 2963 | int always_title; |
| 2964 | int mention_shadow; | ||
| 2958 | { | 2965 | { |
| 2959 | Lisp_Object maps, orig_maps, seen, sub_shadows; | 2966 | Lisp_Object maps, orig_maps, seen, sub_shadows; |
| 2960 | struct gcpro gcpro1, gcpro2, gcpro3; | 2967 | struct gcpro gcpro1, gcpro2, gcpro3; |
| @@ -3056,7 +3063,7 @@ key binding\n\ | |||
| 3056 | 3063 | ||
| 3057 | describe_map (Fcdr (elt), prefix, | 3064 | describe_map (Fcdr (elt), prefix, |
| 3058 | transl ? describe_translation : describe_command, | 3065 | transl ? describe_translation : describe_command, |
| 3059 | partial, sub_shadows, &seen, nomenu); | 3066 | partial, sub_shadows, &seen, nomenu, mention_shadow); |
| 3060 | 3067 | ||
| 3061 | skip: ; | 3068 | skip: ; |
| 3062 | } | 3069 | } |
| @@ -3136,7 +3143,8 @@ describe_translation (definition, args) | |||
| 3136 | PARTIAL, SHADOW, NOMENU are as in `describe_map_tree' above. */ | 3143 | PARTIAL, SHADOW, NOMENU are as in `describe_map_tree' above. */ |
| 3137 | 3144 | ||
| 3138 | static void | 3145 | static void |
| 3139 | describe_map (map, prefix, elt_describer, partial, shadow, seen, nomenu) | 3146 | describe_map (map, prefix, elt_describer, partial, shadow, |
| 3147 | seen, nomenu, mention_shadow) | ||
| 3140 | register Lisp_Object map; | 3148 | register Lisp_Object map; |
| 3141 | Lisp_Object prefix; | 3149 | Lisp_Object prefix; |
| 3142 | void (*elt_describer) P_ ((Lisp_Object, Lisp_Object)); | 3150 | void (*elt_describer) P_ ((Lisp_Object, Lisp_Object)); |
| @@ -3144,6 +3152,7 @@ describe_map (map, prefix, elt_describer, partial, shadow, seen, nomenu) | |||
| 3144 | Lisp_Object shadow; | 3152 | Lisp_Object shadow; |
| 3145 | Lisp_Object *seen; | 3153 | Lisp_Object *seen; |
| 3146 | int nomenu; | 3154 | int nomenu; |
| 3155 | int mention_shadow; | ||
| 3147 | { | 3156 | { |
| 3148 | Lisp_Object tail, definition, event; | 3157 | Lisp_Object tail, definition, event; |
| 3149 | Lisp_Object tem; | 3158 | Lisp_Object tem; |
| @@ -3173,9 +3182,10 @@ describe_map (map, prefix, elt_describer, partial, shadow, seen, nomenu) | |||
| 3173 | || CHAR_TABLE_P (XCAR (tail))) | 3182 | || CHAR_TABLE_P (XCAR (tail))) |
| 3174 | describe_vector (XCAR (tail), | 3183 | describe_vector (XCAR (tail), |
| 3175 | prefix, Qnil, elt_describer, partial, shadow, map, | 3184 | prefix, Qnil, elt_describer, partial, shadow, map, |
| 3176 | (int *)0, 0, 1); | 3185 | (int *)0, 0, 1, mention_shadow); |
| 3177 | else if (CONSP (XCAR (tail))) | 3186 | else if (CONSP (XCAR (tail))) |
| 3178 | { | 3187 | { |
| 3188 | int this_shadowed = 0; | ||
| 3179 | event = XCAR (XCAR (tail)); | 3189 | event = XCAR (XCAR (tail)); |
| 3180 | 3190 | ||
| 3181 | /* Ignore bindings whose "prefix" are not really valid events. | 3191 | /* Ignore bindings whose "prefix" are not really valid events. |
| @@ -3204,7 +3214,13 @@ describe_map (map, prefix, elt_describer, partial, shadow, seen, nomenu) | |||
| 3204 | if (!NILP (shadow)) | 3214 | if (!NILP (shadow)) |
| 3205 | { | 3215 | { |
| 3206 | tem = shadow_lookup (shadow, kludge, Qt); | 3216 | tem = shadow_lookup (shadow, kludge, Qt); |
| 3207 | if (!NILP (tem)) continue; | 3217 | if (!NILP (tem)) |
| 3218 | { | ||
| 3219 | if (mention_shadow) | ||
| 3220 | this_shadowed = 1; | ||
| 3221 | else | ||
| 3222 | continue; | ||
| 3223 | } | ||
| 3208 | } | 3224 | } |
| 3209 | 3225 | ||
| 3210 | tem = Flookup_key (map, kludge, Qt); | 3226 | tem = Flookup_key (map, kludge, Qt); |
| @@ -3224,6 +3240,13 @@ describe_map (map, prefix, elt_describer, partial, shadow, seen, nomenu) | |||
| 3224 | elt_describer will take care of spacing out far enough | 3240 | elt_describer will take care of spacing out far enough |
| 3225 | for alignment purposes. */ | 3241 | for alignment purposes. */ |
| 3226 | (*elt_describer) (definition, Qnil); | 3242 | (*elt_describer) (definition, Qnil); |
| 3243 | |||
| 3244 | if (this_shadowed) | ||
| 3245 | { | ||
| 3246 | SET_PT (PT - 1); | ||
| 3247 | insert_string (" (binding currently shadowed)"); | ||
| 3248 | SET_PT (PT + 1); | ||
| 3249 | } | ||
| 3227 | } | 3250 | } |
| 3228 | else if (EQ (XCAR (tail), Qkeymap)) | 3251 | else if (EQ (XCAR (tail), Qkeymap)) |
| 3229 | { | 3252 | { |
| @@ -3262,7 +3285,7 @@ DESCRIBER is the output function used; nil means use `princ'. */) | |||
| 3262 | specbind (Qstandard_output, Fcurrent_buffer ()); | 3285 | specbind (Qstandard_output, Fcurrent_buffer ()); |
| 3263 | CHECK_VECTOR_OR_CHAR_TABLE (vector); | 3286 | CHECK_VECTOR_OR_CHAR_TABLE (vector); |
| 3264 | describe_vector (vector, Qnil, describer, describe_vector_princ, 0, | 3287 | describe_vector (vector, Qnil, describer, describe_vector_princ, 0, |
| 3265 | Qnil, Qnil, (int *)0, 0, 0); | 3288 | Qnil, Qnil, (int *)0, 0, 0, 0); |
| 3266 | 3289 | ||
| 3267 | return unbind_to (count, Qnil); | 3290 | return unbind_to (count, Qnil); |
| 3268 | } | 3291 | } |
| @@ -3304,7 +3327,8 @@ DESCRIBER is the output function used; nil means use `princ'. */) | |||
| 3304 | static void | 3327 | static void |
| 3305 | describe_vector (vector, prefix, args, elt_describer, | 3328 | describe_vector (vector, prefix, args, elt_describer, |
| 3306 | partial, shadow, entire_map, | 3329 | partial, shadow, entire_map, |
| 3307 | indices, char_table_depth, keymap_p) | 3330 | indices, char_table_depth, keymap_p, |
| 3331 | mention_shadow) | ||
| 3308 | register Lisp_Object vector; | 3332 | register Lisp_Object vector; |
| 3309 | Lisp_Object prefix, args; | 3333 | Lisp_Object prefix, args; |
| 3310 | void (*elt_describer) P_ ((Lisp_Object, Lisp_Object)); | 3334 | void (*elt_describer) P_ ((Lisp_Object, Lisp_Object)); |
| @@ -3314,6 +3338,7 @@ describe_vector (vector, prefix, args, elt_describer, | |||
| 3314 | int *indices; | 3338 | int *indices; |
| 3315 | int char_table_depth; | 3339 | int char_table_depth; |
| 3316 | int keymap_p; | 3340 | int keymap_p; |
| 3341 | int mention_shadow; | ||
| 3317 | { | 3342 | { |
| 3318 | Lisp_Object definition; | 3343 | Lisp_Object definition; |
| 3319 | Lisp_Object tem2; | 3344 | Lisp_Object tem2; |
| @@ -3397,6 +3422,7 @@ describe_vector (vector, prefix, args, elt_describer, | |||
| 3397 | 3422 | ||
| 3398 | for (i = from; i < to; i++) | 3423 | for (i = from; i < to; i++) |
| 3399 | { | 3424 | { |
| 3425 | int this_shadowed = 0; | ||
| 3400 | QUIT; | 3426 | QUIT; |
| 3401 | 3427 | ||
| 3402 | if (CHAR_TABLE_P (vector)) | 3428 | if (CHAR_TABLE_P (vector)) |
| @@ -3456,7 +3482,13 @@ describe_vector (vector, prefix, args, elt_describer, | |||
| 3456 | 3482 | ||
| 3457 | tem = shadow_lookup (shadow, kludge, Qt); | 3483 | tem = shadow_lookup (shadow, kludge, Qt); |
| 3458 | 3484 | ||
| 3459 | if (!NILP (tem)) continue; | 3485 | if (!NILP (tem)) |
| 3486 | { | ||
| 3487 | if (mention_shadow) | ||
| 3488 | this_shadowed = 1; | ||
| 3489 | else | ||
| 3490 | continue; | ||
| 3491 | } | ||
| 3460 | } | 3492 | } |
| 3461 | 3493 | ||
| 3462 | /* Ignore this definition if it is shadowed by an earlier | 3494 | /* Ignore this definition if it is shadowed by an earlier |
| @@ -3532,7 +3564,8 @@ describe_vector (vector, prefix, args, elt_describer, | |||
| 3532 | insert ("\n", 1); | 3564 | insert ("\n", 1); |
| 3533 | describe_vector (definition, prefix, args, elt_describer, | 3565 | describe_vector (definition, prefix, args, elt_describer, |
| 3534 | partial, shadow, entire_map, | 3566 | partial, shadow, entire_map, |
| 3535 | indices, char_table_depth + 1, keymap_p); | 3567 | indices, char_table_depth + 1, keymap_p, |
| 3568 | mention_shadow); | ||
| 3536 | continue; | 3569 | continue; |
| 3537 | } | 3570 | } |
| 3538 | 3571 | ||
| @@ -3606,6 +3639,13 @@ describe_vector (vector, prefix, args, elt_describer, | |||
| 3606 | elt_describer will take care of spacing out far enough | 3639 | elt_describer will take care of spacing out far enough |
| 3607 | for alignment purposes. */ | 3640 | for alignment purposes. */ |
| 3608 | (*elt_describer) (definition, args); | 3641 | (*elt_describer) (definition, args); |
| 3642 | |||
| 3643 | if (this_shadowed) | ||
| 3644 | { | ||
| 3645 | SET_PT (PT - 1); | ||
| 3646 | insert_string (" (binding currently shadowed)"); | ||
| 3647 | SET_PT (PT + 1); | ||
| 3648 | } | ||
| 3609 | } | 3649 | } |
| 3610 | 3650 | ||
| 3611 | /* For (sub) char-table, print `defalt' slot at last. */ | 3651 | /* For (sub) char-table, print `defalt' slot at last. */ |
diff --git a/src/keymap.h b/src/keymap.h index 214ba605c76..e50a62c8aa5 100644 --- a/src/keymap.h +++ b/src/keymap.h | |||
| @@ -37,7 +37,7 @@ extern Lisp_Object access_keymap P_ ((Lisp_Object, Lisp_Object, int, int, int)); | |||
| 37 | extern Lisp_Object get_keyelt P_ ((Lisp_Object, int)); | 37 | extern Lisp_Object get_keyelt P_ ((Lisp_Object, int)); |
| 38 | extern Lisp_Object get_keymap P_ ((Lisp_Object, int, int)); | 38 | extern Lisp_Object get_keymap P_ ((Lisp_Object, int, int)); |
| 39 | extern void describe_map_tree P_ ((Lisp_Object, int, Lisp_Object, Lisp_Object, | 39 | extern void describe_map_tree P_ ((Lisp_Object, int, Lisp_Object, Lisp_Object, |
| 40 | char *, int, int, int)); | 40 | char *, int, int, int, int)); |
| 41 | extern int current_minor_maps P_ ((Lisp_Object **, Lisp_Object **)); | 41 | extern int current_minor_maps P_ ((Lisp_Object **, Lisp_Object **)); |
| 42 | extern void initial_define_key P_ ((Lisp_Object, int, char *)); | 42 | extern void initial_define_key P_ ((Lisp_Object, int, char *)); |
| 43 | extern void initial_define_lispy_key P_ ((Lisp_Object, char *, char *)); | 43 | extern void initial_define_lispy_key P_ ((Lisp_Object, char *, char *)); |
diff --git a/src/lread.c b/src/lread.c index 42531149286..5b5ea478a16 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -3861,8 +3861,8 @@ as a function. */); | |||
| 3861 | 3861 | ||
| 3862 | DEFVAR_LISP ("user-init-file", &Vuser_init_file, | 3862 | DEFVAR_LISP ("user-init-file", &Vuser_init_file, |
| 3863 | doc: /* File name, including directory, of user's initialization file. | 3863 | doc: /* File name, including directory, of user's initialization file. |
| 3864 | If the file loaded had extension `.elc' and there was a corresponding `.el' | 3864 | If the file loaded had extension `.elc', and the corresponding source file |
| 3865 | file, this variable contains the name of the .el file, suitable for use | 3865 | exists, this variable contains the name of source file, suitable for use |
| 3866 | by functions like `custom-save-all' which edit the init file. */); | 3866 | by functions like `custom-save-all' which edit the init file. */); |
| 3867 | Vuser_init_file = Qnil; | 3867 | Vuser_init_file = Qnil; |
| 3868 | 3868 | ||
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 09d31ed2e04..503c8547c69 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -477,8 +477,10 @@ extern char *get_emacs_configuration_options (void); | |||
| 477 | must include config.h to pick up this pragma. */ | 477 | must include config.h to pick up this pragma. */ |
| 478 | 478 | ||
| 479 | /* Names must be < 8 bytes */ | 479 | /* Names must be < 8 bytes */ |
| 480 | #ifdef _MSC_VER | ||
| 480 | #pragma data_seg("EMDATA") | 481 | #pragma data_seg("EMDATA") |
| 481 | #pragma bss_seg("EMBSS") | 482 | #pragma bss_seg("EMBSS") |
| 483 | #endif | ||
| 482 | 484 | ||
| 483 | /* #define FULL_DEBUG */ | 485 | /* #define FULL_DEBUG */ |
| 484 | /* #define EMACSDEBUG */ | 486 | /* #define EMACSDEBUG */ |
| @@ -3884,6 +3884,8 @@ term_ntproc () | |||
| 3884 | /* shutdown the socket interface if necessary */ | 3884 | /* shutdown the socket interface if necessary */ |
| 3885 | term_winsock (); | 3885 | term_winsock (); |
| 3886 | #endif | 3886 | #endif |
| 3887 | |||
| 3888 | term_w32select (); | ||
| 3887 | } | 3889 | } |
| 3888 | 3890 | ||
| 3889 | void | 3891 | void |
| @@ -122,16 +122,18 @@ extern void reset_standard_handles (int in, int out, | |||
| 122 | /* Return the string resource associated with KEY of type TYPE. */ | 122 | /* Return the string resource associated with KEY of type TYPE. */ |
| 123 | extern LPBYTE w32_get_resource (char * key, LPDWORD type); | 123 | extern LPBYTE w32_get_resource (char * key, LPDWORD type); |
| 124 | 124 | ||
| 125 | extern void init_ntproc (); | 125 | extern void init_ntproc (void); |
| 126 | extern void term_ntproc (); | 126 | extern void term_ntproc (void); |
| 127 | extern void globals_of_w32 (); | 127 | extern void globals_of_w32 (void); |
| 128 | extern void syms_of_w32term (); | 128 | extern void syms_of_w32term (void); |
| 129 | extern void syms_of_w32fns (); | 129 | extern void syms_of_w32fns (void); |
| 130 | extern void globals_of_w32fns (); | 130 | extern void globals_of_w32fns (void); |
| 131 | extern void syms_of_w32select (); | 131 | extern void syms_of_w32select (void); |
| 132 | extern void syms_of_w32menu (); | 132 | extern void globals_of_w32select (void); |
| 133 | extern void globals_of_w32menu (); | 133 | extern void term_w32select (void); |
| 134 | extern void syms_of_fontset (); | 134 | extern void syms_of_w32menu (void); |
| 135 | extern void globals_of_w32menu (void); | ||
| 136 | extern void syms_of_fontset (void); | ||
| 135 | 137 | ||
| 136 | #endif /* EMACS_W32_H */ | 138 | #endif /* EMACS_W32_H */ |
| 137 | 139 | ||
diff --git a/src/w32select.c b/src/w32select.c index 20f7cfc457f..e562dc7efbb 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Selection processing for Emacs on the Microsoft W32 API. | 1 | /* Selection processing for Emacs on the Microsoft W32 API. |
| 2 | Copyright (C) 1993, 1994 Free Software Foundation. | 2 | Copyright (C) 1993, 1994, 2004 Free Software Foundation. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -18,273 +18,744 @@ along with GNU Emacs; see the file COPYING. If not, write to | |||
| 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 | Boston, MA 02111-1307, USA. */ | 19 | Boston, MA 02111-1307, USA. */ |
| 20 | 20 | ||
| 21 | /* Written by Kevin Gallo */ | 21 | /* Written by Kevin Gallo, Benjamin Riefenstahl */ |
| 22 | 22 | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Notes on usage of selection-coding-system and | ||
| 26 | * next-selection-coding-system on MS Windows: | ||
| 27 | * | ||
| 28 | * The selection coding system variables apply only to the version of | ||
| 29 | * the clipboard data that is closest in type, i.e. when a 16-bit | ||
| 30 | * Unicode coding system is given, they apply to he Unicode clipboard | ||
| 31 | * (CF_UNICODETEXT), when a well-known console codepage is given, they | ||
| 32 | * apply to the console version of the clipboard data (CF_OEMTEXT), | ||
| 33 | * else they apply to the normal 8-bit text clipboard (CF_TEXT). | ||
| 34 | * | ||
| 35 | * When pasting (getting data from the OS), the clipboard format that | ||
| 36 | * matches the {next-}selection-coding-system is retrieved. If | ||
| 37 | * Unicode is requested, but not available, 8-bit text (CF_TEXT) is | ||
| 38 | * used. In all other cases the OS will transparently convert | ||
| 39 | * formats, so no other fallback is needed. | ||
| 40 | * | ||
| 41 | * When copying or cutting (sending data to the OS), the data is | ||
| 42 | * announced and stored internally, but only actually rendered on | ||
| 43 | * request. The requester determines the format provided. The | ||
| 44 | * {next-}selection-coding-system is only used, when its corresponding | ||
| 45 | * clipboard type matches the type requested. | ||
| 46 | * | ||
| 47 | * Scenarios to use the facilities for customizing the selection | ||
| 48 | * coding system are: | ||
| 49 | * | ||
| 50 | * ;; Generally use KOI8-R instead of the russian MS codepage for | ||
| 51 | * ;; the 8-bit clipboard. | ||
| 52 | * (set-selection-coding-system 'koi8-r-dos) | ||
| 53 | * | ||
| 54 | * Or | ||
| 55 | * | ||
| 56 | * ;; Create a special clipboard copy function that uses codepage | ||
| 57 | * ;; 1253 (Greek) to copy Greek text to a specific non-Unicode | ||
| 58 | * ;; application. | ||
| 59 | * (defun greek-copy (beg end) | ||
| 60 | * (interactive "r") | ||
| 61 | * (set-next-selection-coding-system 'cp1253-dos) | ||
| 62 | * (copy-region-as-kill beg end)) | ||
| 63 | * (global-set-key "\C-c\C-c" 'greek-copy) | ||
| 64 | */ | ||
| 65 | |||
| 66 | /* | ||
| 67 | * Ideas for further directions: | ||
| 68 | * | ||
| 69 | * The encoding and decoding routines could be moved to Lisp code | ||
| 70 | * similar to how xselect.c does it (using well-known routine names | ||
| 71 | * for the delayed rendering). If the definition of which clipboard | ||
| 72 | * types should be supported is also moved to Lisp, functionality | ||
| 73 | * could be expanded to CF_HTML, CF_RTF and maybe other types. | ||
| 74 | */ | ||
| 75 | |||
| 23 | #include <config.h> | 76 | #include <config.h> |
| 24 | #include "lisp.h" | 77 | #include "lisp.h" |
| 25 | #include "w32term.h" /* for all of the w32 includes */ | 78 | #include "w32term.h" /* for all of the w32 includes */ |
| 26 | #include "dispextern.h" /* frame.h seems to want this */ | 79 | #include "w32heap.h" /* os_subtype */ |
| 27 | #include "keyboard.h" | ||
| 28 | #include "frame.h" /* Need this to get the X window of selected_frame */ | ||
| 29 | #include "blockinput.h" | 80 | #include "blockinput.h" |
| 30 | #include "buffer.h" | 81 | #include "keyboard.h" /* cmd_error_internal() */ |
| 31 | #include "charset.h" | 82 | #include "charset.h" |
| 32 | #include "coding.h" | 83 | #include "coding.h" |
| 33 | #include "composite.h" | 84 | #include "composite.h" |
| 34 | 85 | ||
| 86 | |||
| 87 | static HGLOBAL convert_to_handle_as_ascii (void); | ||
| 88 | static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system); | ||
| 89 | static Lisp_Object render (Lisp_Object oformat); | ||
| 90 | static Lisp_Object render_locale (void); | ||
| 91 | static Lisp_Object render_all (void); | ||
| 92 | static void run_protected (Lisp_Object (*code) (), Lisp_Object arg); | ||
| 93 | static Lisp_Object lisp_error_handler (Lisp_Object error); | ||
| 94 | static LRESULT CALLBACK owner_callback (HWND win, UINT msg, | ||
| 95 | WPARAM wp, LPARAM lp); | ||
| 96 | static HWND create_owner (void); | ||
| 97 | |||
| 98 | static void setup_config (void); | ||
| 99 | static BOOL WINAPI enum_locale_callback (/*const*/ char* loc_string); | ||
| 100 | static UINT cp_from_locale (LCID lcid, UINT format); | ||
| 101 | static Lisp_Object coding_from_cp (UINT codepage); | ||
| 102 | |||
| 103 | |||
| 104 | /* A remnant from X11: Symbol for the CLIPBORD selection type. Other | ||
| 105 | selections are not used on Windows, so we don't need symbols for | ||
| 106 | PRIMARY and SECONDARY. */ | ||
| 35 | Lisp_Object QCLIPBOARD; | 107 | Lisp_Object QCLIPBOARD; |
| 36 | 108 | ||
| 37 | /* Coding system for communicating with other Windows programs via the | 109 | /* Coding system for communicating with other programs via the |
| 38 | clipboard. */ | 110 | clipboard. */ |
| 39 | static Lisp_Object Vselection_coding_system; | 111 | static Lisp_Object Vselection_coding_system; |
| 40 | 112 | ||
| 41 | /* Coding system for the next communicating with other Windows programs. */ | 113 | /* Coding system for the next communication with other programs. */ |
| 42 | static Lisp_Object Vnext_selection_coding_system; | 114 | static Lisp_Object Vnext_selection_coding_system; |
| 43 | 115 | ||
| 44 | /* Sequence number, used where possible to detect when we are pasting | 116 | /* Internal pseudo-constants, initialized in globals_of_w32select() |
| 45 | our own text. */ | 117 | based on current system parameters. */ |
| 46 | static DWORD last_clipboard_sequence_number; | 118 | static LCID DEFAULT_LCID; |
| 47 | extern ClipboardSequence_Proc clipboard_sequence_fn; | 119 | static UINT ANSICP, OEMCP; |
| 48 | 120 | static Lisp_Object QUNICODE, QANSICP, QOEMCP; | |
| 49 | /* The last text we put into the clipboard. This is used when the OS | 121 | |
| 50 | does not support sequence numbers (NT4, 95). It is undesirable to | 122 | /* A hidden window just for the clipboard management. */ |
| 51 | use data put on the clipboard by Emacs because the clipboard data | 123 | static HWND clipboard_owner; |
| 52 | could be MULEtilated by inappropriately chosen | 124 | /* A flag to tell WM_DESTROYCLIPBOARD who is to blame this time (just |
| 53 | (next-)selection-coding-system. For this reason, we must store the | 125 | checking GetClipboardOwner() doesn't work, sadly). */ |
| 54 | text *after* it was encoded/Unix-to-DOS-converted. */ | 126 | static int modifying_clipboard = 0; |
| 55 | static unsigned char *last_clipboard_text = NULL; | 127 | |
| 56 | static size_t clipboard_storage_size = 0; | 128 | /* Configured transfer parameters, based on the last inspection of |
| 57 | 129 | selection-coding-system. */ | |
| 58 | #if 0 | 130 | static Lisp_Object cfg_coding_system; |
| 59 | DEFUN ("w32-open-clipboard", Fw32_open_clipboard, Sw32_open_clipboard, 0, 1, 0, | 131 | static UINT cfg_codepage; |
| 60 | doc: /* This opens the clipboard with the given frame pointer. */) | 132 | static LCID cfg_lcid; |
| 61 | (frame) | 133 | static UINT cfg_clipboard_type; |
| 62 | Lisp_Object frame; | 134 | |
| 135 | /* The current state for delayed rendering. */ | ||
| 136 | static Lisp_Object current_text; | ||
| 137 | static Lisp_Object current_coding_system; | ||
| 138 | static int current_requires_encoding, current_num_nls; | ||
| 139 | static UINT current_clipboard_type; | ||
| 140 | static LCID current_lcid; | ||
| 141 | |||
| 142 | #if TRACE | ||
| 143 | #define ONTRACE(stmt) stmt | ||
| 144 | #else | ||
| 145 | #define ONTRACE(stmt) /*stmt*/ | ||
| 146 | #endif | ||
| 147 | |||
| 148 | |||
| 149 | /* This function assumes that there is no multibyte character in | ||
| 150 | current_text, so we can short-cut encoding. */ | ||
| 151 | |||
| 152 | static HGLOBAL | ||
| 153 | convert_to_handle_as_ascii (void) | ||
| 63 | { | 154 | { |
| 64 | BOOL ok = FALSE; | 155 | HGLOBAL htext = NULL; |
| 156 | int nbytes; | ||
| 157 | int truelen; | ||
| 158 | unsigned char *src; | ||
| 159 | unsigned char *dst; | ||
| 65 | 160 | ||
| 66 | if (!NILP (frame)) | 161 | ONTRACE (fprintf (stderr, "convert_to_handle_as_ascii\n")); |
| 67 | CHECK_LIVE_FRAME (frame); | ||
| 68 | 162 | ||
| 69 | BLOCK_INPUT; | 163 | nbytes = SBYTES (current_text) + 1; |
| 164 | src = SDATA (current_text); | ||
| 70 | 165 | ||
| 71 | ok = OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL); | 166 | /* We need to add to the size the number of LF chars where we have |
| 167 | to insert CR chars (the standard CF_TEXT clipboard format uses | ||
| 168 | CRLF line endings, while Emacs uses just LF internally). */ | ||
| 72 | 169 | ||
| 73 | UNBLOCK_INPUT; | 170 | truelen = nbytes + current_num_nls; |
| 171 | |||
| 172 | if ((htext = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, truelen)) == NULL) | ||
| 173 | return NULL; | ||
| 74 | 174 | ||
| 75 | return (ok ? frame : Qnil); | 175 | if ((dst = (unsigned char *) GlobalLock (htext)) == NULL) |
| 176 | { | ||
| 177 | GlobalFree (htext); | ||
| 178 | return NULL; | ||
| 179 | } | ||
| 180 | |||
| 181 | /* convert to CRLF line endings expected by clipboard */ | ||
| 182 | while (1) | ||
| 183 | { | ||
| 184 | unsigned char *next; | ||
| 185 | /* copy next line or remaining bytes including '\0' */ | ||
| 186 | next = _memccpy (dst, src, '\n', nbytes); | ||
| 187 | if (next) | ||
| 188 | { | ||
| 189 | /* copied one line ending with '\n' */ | ||
| 190 | int copied = next - dst; | ||
| 191 | nbytes -= copied; | ||
| 192 | src += copied; | ||
| 193 | /* insert '\r' before '\n' */ | ||
| 194 | next[-1] = '\r'; | ||
| 195 | next[0] = '\n'; | ||
| 196 | dst = next + 1; | ||
| 197 | } | ||
| 198 | else | ||
| 199 | /* copied remaining partial line -> now finished */ | ||
| 200 | break; | ||
| 201 | } | ||
| 202 | |||
| 203 | GlobalUnlock (htext); | ||
| 204 | |||
| 205 | return htext; | ||
| 76 | } | 206 | } |
| 77 | 207 | ||
| 78 | DEFUN ("w32-empty-clipboard", Fw32_empty_clipboard, | 208 | /* This function assumes that there are multibyte or NUL characters in |
| 79 | Sw32_empty_clipboard, 0, 0, 0, | 209 | current_text, or that we need to construct Unicode. It runs the |
| 80 | doc: /* Empty the clipboard. | 210 | text through the encoding machinery. */ |
| 81 | Assigns ownership of the clipboard to the window which opened it. */) | 211 | |
| 82 | () | 212 | static HGLOBAL |
| 213 | convert_to_handle_as_coded (Lisp_Object coding_system) | ||
| 83 | { | 214 | { |
| 84 | BOOL ok = FALSE; | 215 | HGLOBAL htext = NULL, htext2; |
| 216 | int nbytes; | ||
| 217 | unsigned char *src; | ||
| 218 | unsigned char *dst = NULL; | ||
| 219 | int bufsize; | ||
| 220 | struct coding_system coding; | ||
| 221 | Lisp_Object string = Qnil; | ||
| 222 | |||
| 223 | ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n", | ||
| 224 | SDATA (SYMBOL_NAME (coding_system)))); | ||
| 225 | |||
| 226 | setup_coding_system (Fcheck_coding_system (coding_system), &coding); | ||
| 227 | coding.src_multibyte = 1; | ||
| 228 | coding.dst_multibyte = 0; | ||
| 229 | /* Need to set COMPOSITION_DISABLED, otherwise Emacs crashes in | ||
| 230 | encode_coding_iso2022 trying to dereference a null pointer. */ | ||
| 231 | coding.composing = COMPOSITION_DISABLED; | ||
| 232 | if (coding.type == coding_type_iso2022) | ||
| 233 | coding.flags |= CODING_FLAG_ISO_SAFE; | ||
| 234 | coding.mode |= CODING_MODE_LAST_BLOCK; | ||
| 235 | /* Force DOS line-ends. */ | ||
| 236 | coding.eol_type = CODING_EOL_CRLF; | ||
| 237 | |||
| 238 | if (SYMBOLP (coding.pre_write_conversion) | ||
| 239 | && !NILP (Ffboundp (coding.pre_write_conversion))) | ||
| 240 | string = run_pre_post_conversion_on_str (current_text, &coding, 1); | ||
| 241 | else | ||
| 242 | string = current_text; | ||
| 243 | |||
| 244 | nbytes = SBYTES (string); | ||
| 245 | src = SDATA (string); | ||
| 85 | 246 | ||
| 86 | BLOCK_INPUT; | 247 | bufsize = encoding_buffer_size (&coding, nbytes) +2; |
| 248 | htext = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, bufsize); | ||
| 87 | 249 | ||
| 88 | ok = EmptyClipboard (); | 250 | if (htext != NULL) |
| 251 | dst = (unsigned char *) GlobalLock (htext); | ||
| 89 | 252 | ||
| 90 | UNBLOCK_INPUT; | 253 | if (dst != NULL) |
| 254 | { | ||
| 255 | encode_coding (&coding, src, dst, nbytes, bufsize-2); | ||
| 256 | /* Add the string terminator. Add two NULs in case we are | ||
| 257 | producing Unicode here. */ | ||
| 258 | dst[coding.produced] = dst[coding.produced+1] = '\0'; | ||
| 259 | } | ||
| 91 | 260 | ||
| 92 | return (ok ? Qt : Qnil); | 261 | if (dst != NULL) |
| 262 | GlobalUnlock (htext); | ||
| 263 | |||
| 264 | if (htext != NULL) | ||
| 265 | { | ||
| 266 | /* Shrink data block to actual size. */ | ||
| 267 | htext2 = GlobalReAlloc (htext, coding.produced+2, | ||
| 268 | GMEM_MOVEABLE | GMEM_DDESHARE); | ||
| 269 | if (htext2 != NULL) htext = htext2; | ||
| 270 | } | ||
| 271 | |||
| 272 | return htext; | ||
| 93 | } | 273 | } |
| 94 | 274 | ||
| 95 | DEFUN ("w32-close-clipboard", Fw32_close_clipboard, | 275 | static Lisp_Object |
| 96 | Sw32_close_clipboard, 0, 0, 0, | 276 | render (Lisp_Object oformat) |
| 97 | doc: /* Close the clipboard. */) | ||
| 98 | () | ||
| 99 | { | 277 | { |
| 100 | BOOL ok = FALSE; | 278 | HGLOBAL htext = NULL; |
| 279 | UINT format = XFASTINT (oformat); | ||
| 280 | |||
| 281 | ONTRACE (fprintf (stderr, "render\n")); | ||
| 282 | |||
| 283 | if (NILP (current_text)) | ||
| 284 | return Qnil; | ||
| 285 | |||
| 286 | if (current_requires_encoding || format == CF_UNICODETEXT) | ||
| 287 | { | ||
| 288 | if (format == current_clipboard_type) | ||
| 289 | htext = convert_to_handle_as_coded (current_coding_system); | ||
| 290 | else | ||
| 291 | switch (format) | ||
| 292 | { | ||
| 293 | case CF_UNICODETEXT: | ||
| 294 | htext = convert_to_handle_as_coded (QUNICODE); | ||
| 295 | break; | ||
| 296 | case CF_TEXT: | ||
| 297 | case CF_OEMTEXT: | ||
| 298 | { | ||
| 299 | Lisp_Object cs; | ||
| 300 | cs = coding_from_cp (cp_from_locale (current_lcid, format)); | ||
| 301 | htext = convert_to_handle_as_coded (cs); | ||
| 302 | break; | ||
| 303 | } | ||
| 304 | } | ||
| 305 | } | ||
| 306 | else | ||
| 307 | htext = convert_to_handle_as_ascii (); | ||
| 308 | |||
| 309 | ONTRACE (fprintf (stderr, "render: htext = 0x%08X\n", (unsigned) htext)); | ||
| 310 | |||
| 311 | if (htext == NULL) | ||
| 312 | return Qnil; | ||
| 313 | |||
| 314 | if (SetClipboardData (format, htext) == NULL) | ||
| 315 | { | ||
| 316 | GlobalFree(htext); | ||
| 317 | return Qnil; | ||
| 318 | } | ||
| 319 | |||
| 320 | return Qt; | ||
| 321 | } | ||
| 322 | |||
| 323 | static Lisp_Object | ||
| 324 | render_locale (void) | ||
| 325 | { | ||
| 326 | HANDLE hlocale = NULL; | ||
| 327 | LCID * lcid_ptr; | ||
| 328 | |||
| 329 | ONTRACE (fprintf (stderr, "render_locale\n")); | ||
| 330 | |||
| 331 | if (current_lcid == LOCALE_NEUTRAL || current_lcid == DEFAULT_LCID) | ||
| 332 | return Qt; | ||
| 333 | |||
| 334 | hlocale = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, sizeof (current_lcid)); | ||
| 335 | if (hlocale == NULL) | ||
| 336 | return Qnil; | ||
| 337 | |||
| 338 | if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL) | ||
| 339 | { | ||
| 340 | GlobalFree(hlocale); | ||
| 341 | return Qnil; | ||
| 342 | } | ||
| 343 | |||
| 344 | *lcid_ptr = current_lcid; | ||
| 345 | GlobalUnlock (hlocale); | ||
| 346 | |||
| 347 | if (SetClipboardData (CF_LOCALE, hlocale) == NULL) | ||
| 348 | { | ||
| 349 | GlobalFree(hlocale); | ||
| 350 | return Qnil; | ||
| 351 | } | ||
| 352 | |||
| 353 | return Qt; | ||
| 354 | } | ||
| 355 | |||
| 356 | /* At the end of the program, we want to ensure that our clipboard | ||
| 357 | data survives us. This code will do that. */ | ||
| 358 | |||
| 359 | static Lisp_Object | ||
| 360 | render_all (void) | ||
| 361 | { | ||
| 362 | ONTRACE (fprintf (stderr, "render_all\n")); | ||
| 363 | |||
| 364 | /* According to the docs we should not call OpenClipboard() here, | ||
| 365 | but testing on W2K and working code in other projects shows that | ||
| 366 | it is actually necessary. */ | ||
| 367 | |||
| 368 | OpenClipboard (NULL); | ||
| 369 | |||
| 370 | /* There is no usefull means to report errors here, there are none | ||
| 371 | expected anyway, and even if there were errors, they wouldn't do | ||
| 372 | any harm. So we just go ahead and do what has to be done without | ||
| 373 | bothering with error handling. */ | ||
| 374 | |||
| 375 | ++modifying_clipboard; | ||
| 376 | EmptyClipboard (); | ||
| 377 | --modifying_clipboard; | ||
| 378 | |||
| 379 | /* For text formats that we don't render here, the OS can use its | ||
| 380 | own translation rules instead, so we don't really need to offer | ||
| 381 | everything. To minimize memory consumption we cover three | ||
| 382 | possible situations based on our primary format as detected from | ||
| 383 | selection-coding-system (see setup_config()): | ||
| 384 | |||
| 385 | - Post CF_TEXT only. Let the OS convert to CF_OEMTEXT and the OS | ||
| 386 | (on NT) or the application (on 9x/Me) convert to | ||
| 387 | CF_UNICODETEXT. | ||
| 388 | |||
| 389 | - Post CF_OEMTEXT only. Similar automatic conversions happen as | ||
| 390 | for CF_TEXT. | ||
| 391 | |||
| 392 | - Post CF_UNICODETEXT + CF_TEXT. 9x itself ignores | ||
| 393 | CF_UNICODETEXT, even though some applications can still handle | ||
| 394 | it. | ||
| 395 | |||
| 396 | Note 1: We render the less capable CF_TEXT *before* the more | ||
| 397 | capable CF_UNICODETEXT, to prevent clobbering through automatic | ||
| 398 | conversions, just in case. | ||
| 399 | |||
| 400 | Note 2: We could check os_subtype here and only render the | ||
| 401 | additional CF_TEXT on 9x/Me. But OTOH with | ||
| 402 | current_clipboard_type == CF_UNICODETEXT we don't involve the | ||
| 403 | automatic conversions anywhere else, so to get consistent | ||
| 404 | results, we probably don't want to rely on it here either. */ | ||
| 405 | |||
| 406 | render_locale(); | ||
| 407 | |||
| 408 | if (current_clipboard_type == CF_UNICODETEXT) | ||
| 409 | render (make_number (CF_TEXT)); | ||
| 410 | render (make_number (current_clipboard_type)); | ||
| 411 | |||
| 412 | CloseClipboard (); | ||
| 413 | |||
| 414 | return Qnil; | ||
| 415 | } | ||
| 416 | |||
| 417 | static void | ||
| 418 | run_protected (Lisp_Object (*code) (), Lisp_Object arg) | ||
| 419 | { | ||
| 420 | /* FIXME: This works but it doesn't feel right. Too much fiddling | ||
| 421 | with global variables and calling strange looking functions. Is | ||
| 422 | this really the right way to run Lisp callbacks? */ | ||
| 423 | |||
| 424 | extern int waiting_for_input; | ||
| 425 | int owfi; | ||
| 101 | 426 | ||
| 102 | BLOCK_INPUT; | 427 | BLOCK_INPUT; |
| 103 | 428 | ||
| 104 | ok = CloseClipboard (); | 429 | /* Fsignal calls abort() if it sees that waiting_for_input is |
| 430 | set. */ | ||
| 431 | owfi = waiting_for_input; | ||
| 432 | waiting_for_input = 0; | ||
| 433 | |||
| 434 | internal_condition_case_1 (code, arg, Qt, lisp_error_handler); | ||
| 435 | |||
| 436 | waiting_for_input = owfi; | ||
| 105 | 437 | ||
| 106 | UNBLOCK_INPUT; | 438 | UNBLOCK_INPUT; |
| 439 | } | ||
| 107 | 440 | ||
| 108 | return (ok ? Qt : Qnil); | 441 | static Lisp_Object |
| 442 | lisp_error_handler (Lisp_Object error) | ||
| 443 | { | ||
| 444 | Vsignaling_function = Qnil; | ||
| 445 | cmd_error_internal (error, "Error in delayed clipboard rendering: "); | ||
| 446 | Vinhibit_quit = Qt; | ||
| 447 | return Qt; | ||
| 448 | } | ||
| 449 | |||
| 450 | |||
| 451 | static LRESULT CALLBACK | ||
| 452 | owner_callback (HWND win, UINT msg, WPARAM wp, LPARAM lp) | ||
| 453 | { | ||
| 454 | switch (msg) | ||
| 455 | { | ||
| 456 | case WM_RENDERFORMAT: | ||
| 457 | ONTRACE (fprintf (stderr, "WM_RENDERFORMAT\n")); | ||
| 458 | run_protected (render, make_number (wp)); | ||
| 459 | return 0; | ||
| 460 | |||
| 461 | case WM_RENDERALLFORMATS: | ||
| 462 | ONTRACE (fprintf (stderr, "WM_RENDERALLFORMATS\n")); | ||
| 463 | run_protected (render_all, Qnil); | ||
| 464 | return 0; | ||
| 465 | |||
| 466 | case WM_DESTROYCLIPBOARD: | ||
| 467 | if (!modifying_clipboard) | ||
| 468 | { | ||
| 469 | ONTRACE (fprintf (stderr, "WM_DESTROYCLIPBOARD (other)\n")); | ||
| 470 | current_text = Qnil; | ||
| 471 | current_coding_system = Qnil; | ||
| 472 | } | ||
| 473 | else | ||
| 474 | { | ||
| 475 | ONTRACE (fprintf (stderr, "WM_DESTROYCLIPBOARD (self)\n")); | ||
| 476 | } | ||
| 477 | return 0; | ||
| 478 | |||
| 479 | case WM_DESTROY: | ||
| 480 | if (win == clipboard_owner) | ||
| 481 | clipboard_owner = NULL; | ||
| 482 | break; | ||
| 483 | } | ||
| 484 | |||
| 485 | return DefWindowProc (win, msg, wp, lp); | ||
| 486 | } | ||
| 487 | |||
| 488 | static HWND | ||
| 489 | create_owner (void) | ||
| 490 | { | ||
| 491 | static const char CLASSNAME[] = "Emacs Clipboard"; | ||
| 492 | WNDCLASS wc; | ||
| 493 | |||
| 494 | memset (&wc, 0, sizeof (wc)); | ||
| 495 | wc.lpszClassName = CLASSNAME; | ||
| 496 | wc.lpfnWndProc = owner_callback; | ||
| 497 | RegisterClass (&wc); | ||
| 498 | |||
| 499 | return CreateWindow (CLASSNAME, CLASSNAME, 0, 0, 0, 0, 0, NULL, NULL, | ||
| 500 | NULL, NULL); | ||
| 501 | } | ||
| 502 | |||
| 503 | /* Called on exit by term_ntproc() in w32.c */ | ||
| 504 | |||
| 505 | void | ||
| 506 | term_w32select (void) | ||
| 507 | { | ||
| 508 | /* This is needed to trigger WM_RENDERALLFORMATS. */ | ||
| 509 | if (clipboard_owner != NULL) | ||
| 510 | DestroyWindow (clipboard_owner); | ||
| 511 | } | ||
| 512 | |||
| 513 | static void | ||
| 514 | setup_config (void) | ||
| 515 | { | ||
| 516 | const char *coding_name; | ||
| 517 | const char *cp; | ||
| 518 | char *end; | ||
| 519 | int slen; | ||
| 520 | Lisp_Object new_coding_system; | ||
| 521 | |||
| 522 | CHECK_SYMBOL (Vselection_coding_system); | ||
| 523 | |||
| 524 | /* Check if we have it cached */ | ||
| 525 | new_coding_system = NILP (Vnext_selection_coding_system) ? | ||
| 526 | Vselection_coding_system : Vnext_selection_coding_system; | ||
| 527 | if (!NILP (cfg_coding_system) | ||
| 528 | && EQ (cfg_coding_system, new_coding_system)) | ||
| 529 | return; | ||
| 530 | cfg_coding_system = new_coding_system; | ||
| 531 | |||
| 532 | /* Set some sensible fallbacks */ | ||
| 533 | cfg_codepage = ANSICP; | ||
| 534 | cfg_lcid = LOCALE_NEUTRAL; | ||
| 535 | cfg_clipboard_type = CF_TEXT; | ||
| 536 | |||
| 537 | /* Interpret the coding system symbol name */ | ||
| 538 | coding_name = SDATA (SYMBOL_NAME (cfg_coding_system)); | ||
| 539 | |||
| 540 | /* "(.*-)?utf-16.*" -> CF_UNICODETEXT */ | ||
| 541 | cp = strstr (coding_name, "utf-16"); | ||
| 542 | if (cp != NULL && (cp == coding_name || cp[-1] == '-')) | ||
| 543 | { | ||
| 544 | cfg_clipboard_type = CF_UNICODETEXT; | ||
| 545 | return; | ||
| 546 | } | ||
| 547 | |||
| 548 | /* "cp[0-9]+.*" or "windows-[0-9]+.*" -> CF_TEXT or CF_OEMTEXT */ | ||
| 549 | slen = strlen (coding_name); | ||
| 550 | if (slen >= 4 && coding_name[0] == 'c' && coding_name[1] == 'p') | ||
| 551 | cp = coding_name + 2; | ||
| 552 | else if (slen >= 10 && memcmp (coding_name, "windows-", 8) == 0) | ||
| 553 | cp = coding_name + 8; | ||
| 554 | else | ||
| 555 | return; | ||
| 556 | |||
| 557 | end = (char*)cp; | ||
| 558 | cfg_codepage = strtol (cp, &end, 10); | ||
| 559 | |||
| 560 | /* Error return from strtol() or number of digits < 2 -> Restore the | ||
| 561 | default and drop it. */ | ||
| 562 | if (cfg_codepage == 0 || (end-cp) < 2 ) | ||
| 563 | { | ||
| 564 | cfg_codepage = ANSICP; | ||
| 565 | return; | ||
| 566 | } | ||
| 567 | |||
| 568 | /* Is it the currently active system default? */ | ||
| 569 | if (cfg_codepage == ANSICP) | ||
| 570 | { | ||
| 571 | /* cfg_clipboard_type = CF_TEXT; */ | ||
| 572 | return; | ||
| 573 | } | ||
| 574 | if (cfg_codepage == OEMCP) | ||
| 575 | { | ||
| 576 | cfg_clipboard_type = CF_OEMTEXT; | ||
| 577 | return; | ||
| 578 | } | ||
| 579 | |||
| 580 | /* Else determine a suitable locale the hard way. */ | ||
| 581 | EnumSystemLocales (enum_locale_callback, LCID_INSTALLED); | ||
| 582 | } | ||
| 583 | |||
| 584 | static BOOL WINAPI | ||
| 585 | enum_locale_callback (/*const*/ char* loc_string) | ||
| 586 | { | ||
| 587 | LCID lcid; | ||
| 588 | UINT codepage; | ||
| 589 | |||
| 590 | lcid = strtoul (loc_string, NULL, 16); | ||
| 591 | |||
| 592 | /* Is the wanted codepage the "ANSI" codepage for this locale? */ | ||
| 593 | codepage = cp_from_locale (lcid, CF_TEXT); | ||
| 594 | if (codepage == cfg_codepage) | ||
| 595 | { | ||
| 596 | cfg_lcid = lcid; | ||
| 597 | cfg_clipboard_type = CF_TEXT; | ||
| 598 | return FALSE; /* Stop enumeration */ | ||
| 599 | } | ||
| 600 | |||
| 601 | /* Is the wanted codepage the OEM codepage for this locale? */ | ||
| 602 | codepage = cp_from_locale (lcid, CF_OEMTEXT); | ||
| 603 | if (codepage == cfg_codepage) | ||
| 604 | { | ||
| 605 | cfg_lcid = lcid; | ||
| 606 | cfg_clipboard_type = CF_OEMTEXT; | ||
| 607 | return FALSE; /* Stop enumeration */ | ||
| 608 | } | ||
| 609 | |||
| 610 | return TRUE; /* Continue enumeration */ | ||
| 611 | } | ||
| 612 | |||
| 613 | static UINT | ||
| 614 | cp_from_locale (LCID lcid, UINT format) | ||
| 615 | { | ||
| 616 | char buffer[20] = ""; | ||
| 617 | UINT variant, cp; | ||
| 618 | |||
| 619 | variant = | ||
| 620 | format == CF_TEXT ? LOCALE_IDEFAULTANSICODEPAGE : LOCALE_IDEFAULTCODEPAGE; | ||
| 621 | |||
| 622 | GetLocaleInfo (lcid, variant, buffer, sizeof (buffer)); | ||
| 623 | cp = strtoul (buffer, NULL, 10); | ||
| 624 | |||
| 625 | if (cp == CP_ACP) | ||
| 626 | return ANSICP; | ||
| 627 | else if (cp == CP_OEMCP) | ||
| 628 | return OEMCP; | ||
| 629 | else | ||
| 630 | return cp; | ||
| 631 | } | ||
| 632 | |||
| 633 | static Lisp_Object | ||
| 634 | coding_from_cp (UINT codepage) | ||
| 635 | { | ||
| 636 | char buffer[30]; | ||
| 637 | sprintf (buffer, "cp%d-dos", (int) codepage); | ||
| 638 | return intern (buffer); | ||
| 639 | /* We don't need to check that this coding system exists right here, | ||
| 640 | because that is done when the coding system is actually | ||
| 641 | instantiated, i.e. it is passed through Fcheck_coding_system() | ||
| 642 | there. */ | ||
| 109 | } | 643 | } |
| 110 | 644 | ||
| 111 | #endif | ||
| 112 | 645 | ||
| 113 | DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | 646 | DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, |
| 114 | Sw32_set_clipboard_data, 1, 2, 0, | 647 | Sw32_set_clipboard_data, 1, 2, 0, |
| 115 | doc: /* This sets the clipboard data to the given text. */) | 648 | doc: /* This sets the clipboard data to the given text. */) |
| 116 | (string, frame) | 649 | (string, ignored) |
| 117 | Lisp_Object string, frame; | 650 | Lisp_Object string, ignored; |
| 118 | { | 651 | { |
| 119 | BOOL ok = TRUE; | 652 | BOOL ok = TRUE; |
| 120 | HANDLE htext; | ||
| 121 | int nbytes; | 653 | int nbytes; |
| 122 | int truelen, nlines = 0; | ||
| 123 | unsigned char *src; | 654 | unsigned char *src; |
| 124 | unsigned char *dst; | 655 | unsigned char *dst; |
| 656 | unsigned char *end; | ||
| 657 | |||
| 658 | /* This parameter used to be the current frame, but we don't use | ||
| 659 | that any more. */ | ||
| 660 | (void) ignored; | ||
| 125 | 661 | ||
| 126 | CHECK_STRING (string); | 662 | CHECK_STRING (string); |
| 127 | 663 | ||
| 128 | if (!NILP (frame)) | 664 | setup_config (); |
| 129 | CHECK_LIVE_FRAME (frame); | ||
| 130 | 665 | ||
| 666 | current_text = string; | ||
| 667 | current_coding_system = cfg_coding_system; | ||
| 668 | current_clipboard_type = cfg_clipboard_type; | ||
| 669 | current_lcid = cfg_lcid; | ||
| 670 | current_num_nls = 0; | ||
| 671 | current_requires_encoding = 0; | ||
| 672 | |||
| 131 | BLOCK_INPUT; | 673 | BLOCK_INPUT; |
| 132 | 674 | ||
| 133 | /* Include the terminating NULL character in the source of | 675 | /* Check for non-ASCII characters. While we are at it, count the |
| 134 | conversion. */ | 676 | number of LFs, so we know how many CRs we will have to add later |
| 135 | nbytes = SBYTES (string) + 1; | 677 | (just in the case where we can use our internal ASCII rendering, |
| 678 | see code and comment in convert_to_handle_as_ascii() above). */ | ||
| 679 | nbytes = SBYTES (string); | ||
| 136 | src = SDATA (string); | 680 | src = SDATA (string); |
| 137 | dst = src; | ||
| 138 | 681 | ||
| 139 | /* We need to know how many lines there are, since we need CRLF line | 682 | for (dst = src, end = src+nbytes; dst < end; dst++) |
| 140 | termination for compatibility with other Windows Programs. | ||
| 141 | avoid using strchr because it recomputes the length every time */ | ||
| 142 | while ((dst = memchr (dst, '\n', nbytes - (dst - src))) != NULL) | ||
| 143 | { | 683 | { |
| 144 | nlines++; | 684 | if (*dst == '\n') |
| 145 | dst++; | 685 | current_num_nls++; |
| 686 | else if (*dst >= 0x80 || *dst == 0) | ||
| 687 | { | ||
| 688 | current_requires_encoding = 1; | ||
| 689 | break; | ||
| 690 | } | ||
| 146 | } | 691 | } |
| 147 | 692 | ||
| 148 | { | 693 | if (!current_requires_encoding) |
| 149 | /* Since we are now handling multilingual text, we must consider | 694 | { |
| 150 | encoding text for the clipboard. */ | 695 | /* If all we have is ASCII we don't need to pretend we offer |
| 151 | int charset_info = find_charset_in_text (src, SCHARS (string), | 696 | anything fancy. */ |
| 152 | nbytes, NULL, Qnil); | 697 | current_coding_system = Qraw_text; |
| 153 | 698 | current_clipboard_type = CF_TEXT; | |
| 154 | if (charset_info == 0) | 699 | current_lcid = LOCALE_NEUTRAL; |
| 155 | { | 700 | } |
| 156 | /* No multibyte character in OBJ. We need not encode it. */ | ||
| 157 | |||
| 158 | /* Need to know final size after CR chars are inserted (the | ||
| 159 | standard CF_TEXT clipboard format uses CRLF line endings, | ||
| 160 | while Emacs uses just LF internally). */ | ||
| 161 | |||
| 162 | truelen = nbytes + nlines; | ||
| 163 | |||
| 164 | if ((htext = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, truelen)) == NULL) | ||
| 165 | goto error; | ||
| 166 | |||
| 167 | if ((dst = (unsigned char *) GlobalLock (htext)) == NULL) | ||
| 168 | goto error; | ||
| 169 | |||
| 170 | /* convert to CRLF line endings expected by clipboard */ | ||
| 171 | while (1) | ||
| 172 | { | ||
| 173 | unsigned char *next; | ||
| 174 | /* copy next line or remaining bytes including '\0' */ | ||
| 175 | next = _memccpy (dst, src, '\n', nbytes); | ||
| 176 | if (next) | ||
| 177 | { | ||
| 178 | /* copied one line ending with '\n' */ | ||
| 179 | int copied = next - dst; | ||
| 180 | nbytes -= copied; | ||
| 181 | src += copied; | ||
| 182 | /* insert '\r' before '\n' */ | ||
| 183 | next[-1] = '\r'; | ||
| 184 | next[0] = '\n'; | ||
| 185 | dst = next + 1; | ||
| 186 | } | ||
| 187 | else | ||
| 188 | /* copied remaining partial line -> now finished */ | ||
| 189 | break; | ||
| 190 | } | ||
| 191 | |||
| 192 | GlobalUnlock (htext); | ||
| 193 | 701 | ||
| 194 | Vlast_coding_system_used = Qraw_text; | 702 | if (!OpenClipboard (clipboard_owner)) |
| 195 | } | 703 | goto error; |
| 196 | else | ||
| 197 | { | ||
| 198 | /* We must encode contents of OBJ to the selection coding | ||
| 199 | system. */ | ||
| 200 | int bufsize; | ||
| 201 | struct coding_system coding; | ||
| 202 | HANDLE htext2; | ||
| 203 | |||
| 204 | if (NILP (Vnext_selection_coding_system)) | ||
| 205 | Vnext_selection_coding_system = Vselection_coding_system; | ||
| 206 | setup_coding_system | ||
| 207 | (Fcheck_coding_system (Vnext_selection_coding_system), &coding); | ||
| 208 | if (SYMBOLP (coding.pre_write_conversion) | ||
| 209 | && !NILP (Ffboundp (coding.pre_write_conversion))) | ||
| 210 | { | ||
| 211 | string = run_pre_post_conversion_on_str (string, &coding, 1); | ||
| 212 | src = SDATA (string); | ||
| 213 | /* Include the terminating NULL character in the source of | ||
| 214 | conversion. */ | ||
| 215 | nbytes = SBYTES (string) + 1; | ||
| 216 | } | ||
| 217 | coding.src_multibyte = 1; | ||
| 218 | coding.dst_multibyte = 0; | ||
| 219 | /* Need to set COMPOSITION_DISABLED, otherwise Emacs crashes in | ||
| 220 | encode_coding_iso2022 trying to dereference a null pointer. */ | ||
| 221 | coding.composing = COMPOSITION_DISABLED; | ||
| 222 | if (coding.type == coding_type_iso2022) | ||
| 223 | coding.flags |= CODING_FLAG_ISO_SAFE; | ||
| 224 | Vnext_selection_coding_system = Qnil; | ||
| 225 | coding.mode |= CODING_MODE_LAST_BLOCK; | ||
| 226 | bufsize = encoding_buffer_size (&coding, nbytes); | ||
| 227 | if ((htext = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, bufsize)) == NULL) | ||
| 228 | goto error; | ||
| 229 | if ((dst = (unsigned char *) GlobalLock (htext)) == NULL) | ||
| 230 | goto error; | ||
| 231 | encode_coding (&coding, src, dst, nbytes, bufsize); | ||
| 232 | Vlast_coding_system_used = coding.symbol; | ||
| 233 | 704 | ||
| 234 | /* If clipboard sequence numbers are not supported, keep a copy for | 705 | ++modifying_clipboard; |
| 235 | later comparison. */ | 706 | ok = EmptyClipboard (); |
| 236 | if (!clipboard_sequence_fn) | 707 | --modifying_clipboard; |
| 237 | { | ||
| 238 | /* Stash away the data we are about to put into the | ||
| 239 | clipboard, so we could later check inside | ||
| 240 | Fw32_get_clipboard_data whether the clipboard still | ||
| 241 | holds our data. */ | ||
| 242 | if (clipboard_storage_size < coding.produced) | ||
| 243 | { | ||
| 244 | clipboard_storage_size = coding.produced + 100; | ||
| 245 | last_clipboard_text = (char *) xrealloc (last_clipboard_text, | ||
| 246 | clipboard_storage_size); | ||
| 247 | } | ||
| 248 | if (last_clipboard_text) | ||
| 249 | memcpy (last_clipboard_text, dst, coding.produced); | ||
| 250 | } | ||
| 251 | 708 | ||
| 252 | GlobalUnlock (htext); | 709 | /* If we have something non-ASCII we may want to set a locale. We |
| 710 | do that directly (non-delayed), as it's just a small bit. */ | ||
| 711 | if (ok) | ||
| 712 | ok = !NILP(render_locale()); | ||
| 253 | 713 | ||
| 254 | /* Shrink data block to actual size. */ | 714 | if (ok) |
| 255 | htext2 = GlobalReAlloc (htext, coding.produced, | 715 | { |
| 256 | GMEM_MOVEABLE | GMEM_DDESHARE); | 716 | if (clipboard_owner == NULL) |
| 257 | if (htext2 != NULL) htext = htext2; | 717 | { |
| 258 | } | 718 | /* If for some reason we don't have a clipboard_owner, we |
| 259 | } | 719 | just set the text format as chosen by the configuration |
| 720 | and than forget about the whole thing. */ | ||
| 721 | ok = !NILP(render (make_number (current_clipboard_type))); | ||
| 722 | current_text = Qnil; | ||
| 723 | current_coding_system = Qnil; | ||
| 724 | } | ||
| 725 | else | ||
| 726 | { | ||
| 727 | /* Advertise all supported formats so that whatever the | ||
| 728 | requester chooses, only one encoding step needs to be | ||
| 729 | made. This is intentionally different from what we do in | ||
| 730 | the handler for WM_RENDERALLFORMATS. */ | ||
| 731 | SetClipboardData (CF_UNICODETEXT, NULL); | ||
| 732 | SetClipboardData (CF_TEXT, NULL); | ||
| 733 | SetClipboardData (CF_OEMTEXT, NULL); | ||
| 734 | } | ||
| 735 | } | ||
| 260 | 736 | ||
| 261 | if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL)) | 737 | CloseClipboard (); |
| 262 | goto error; | ||
| 263 | 738 | ||
| 264 | ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext); | 739 | /* With delayed rendering we haven't really "used" this coding |
| 740 | system yet, and it's even unclear if we ever will. But this is a | ||
| 741 | way to tell the upper level what we *would* use under ideal | ||
| 742 | circumstances. | ||
| 265 | 743 | ||
| 266 | CloseClipboard (); | 744 | We don't signal the actually used coding-system later when we |
| 745 | finally render, because that can happen at any time and we don't | ||
| 746 | want to disturb the "foreground" action. */ | ||
| 747 | if (ok) | ||
| 748 | Vlast_coding_system_used = current_coding_system; | ||
| 267 | 749 | ||
| 268 | /* Common sense says to read the sequence number inside the | 750 | Vnext_selection_coding_system = Qnil; |
| 269 | OpenClipboard/ CloseClipboard block to avoid race conditions | ||
| 270 | where another app puts something on the clipboard straight after | ||
| 271 | us. But experience suggests that the sequence number from the | ||
| 272 | SetClipboardData is not allocated until we close the clipboard! | ||
| 273 | Since clipboard operations are normally user-driven, the race | ||
| 274 | condition is probably not going to really happen. */ | ||
| 275 | if (clipboard_sequence_fn) | ||
| 276 | last_clipboard_sequence_number = clipboard_sequence_fn (); | ||
| 277 | 751 | ||
| 278 | if (ok) goto done; | 752 | if (ok) goto done; |
| 279 | 753 | ||
| 280 | error: | 754 | error: |
| 281 | 755 | ||
| 282 | ok = FALSE; | 756 | ok = FALSE; |
| 283 | if (htext) GlobalFree (htext); | 757 | current_text = Qnil; |
| 284 | if (last_clipboard_text) | 758 | current_coding_system = Qnil; |
| 285 | *last_clipboard_text = '\0'; | ||
| 286 | |||
| 287 | last_clipboard_sequence_number = 0; | ||
| 288 | 759 | ||
| 289 | done: | 760 | done: |
| 290 | UNBLOCK_INPUT; | 761 | UNBLOCK_INPUT; |
| @@ -292,24 +763,52 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 292 | return (ok ? string : Qnil); | 763 | return (ok ? string : Qnil); |
| 293 | } | 764 | } |
| 294 | 765 | ||
| 766 | |||
| 295 | DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, | 767 | DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, |
| 296 | Sw32_get_clipboard_data, 0, 1, 0, | 768 | Sw32_get_clipboard_data, 0, 1, 0, |
| 297 | doc: /* This gets the clipboard data in text format. */) | 769 | doc: /* This gets the clipboard data in text format. */) |
| 298 | (frame) | 770 | (ignored) |
| 299 | Lisp_Object frame; | 771 | Lisp_Object ignored; |
| 300 | { | 772 | { |
| 301 | HANDLE htext; | 773 | HGLOBAL htext; |
| 302 | Lisp_Object ret = Qnil; | 774 | Lisp_Object ret = Qnil; |
| 775 | UINT actual_clipboard_type; | ||
| 776 | int use_configured_coding_system = 1; | ||
| 777 | |||
| 778 | /* This parameter used to be the current frame, but we don't use | ||
| 779 | that any more. */ | ||
| 780 | (void) ignored; | ||
| 303 | 781 | ||
| 304 | if (!NILP (frame)) | 782 | /* Don't pass our own text from the clipboard (which might be |
| 305 | CHECK_LIVE_FRAME (frame); | 783 | troublesome if the killed text includes null characters). */ |
| 784 | if (!NILP (current_text)) | ||
| 785 | return ret; | ||
| 786 | |||
| 787 | setup_config (); | ||
| 788 | actual_clipboard_type = cfg_clipboard_type; | ||
| 306 | 789 | ||
| 307 | BLOCK_INPUT; | 790 | BLOCK_INPUT; |
| 308 | 791 | ||
| 309 | if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL)) | 792 | if (!OpenClipboard (clipboard_owner)) |
| 310 | goto done; | 793 | goto done; |
| 311 | 794 | ||
| 312 | if ((htext = GetClipboardData (CF_TEXT)) == NULL) | 795 | if ((htext = GetClipboardData (actual_clipboard_type)) == NULL) |
| 796 | { | ||
| 797 | /* If we want CF_UNICODETEXT but can't get it, the current | ||
| 798 | coding system is useless. OTOH we can still try and decode | ||
| 799 | CF_TEXT based on the locale that the system gives us and that | ||
| 800 | we get down below. */ | ||
| 801 | if (actual_clipboard_type == CF_UNICODETEXT) | ||
| 802 | { | ||
| 803 | htext = GetClipboardData (CF_TEXT); | ||
| 804 | if (htext != NULL) | ||
| 805 | { | ||
| 806 | actual_clipboard_type = CF_TEXT; | ||
| 807 | use_configured_coding_system = 0; | ||
| 808 | } | ||
| 809 | } | ||
| 810 | } | ||
| 811 | if (htext == NULL) | ||
| 313 | goto closeclip; | 812 | goto closeclip; |
| 314 | 813 | ||
| 315 | { | 814 | { |
| @@ -322,53 +821,107 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, | |||
| 322 | if ((src = (unsigned char *) GlobalLock (htext)) == NULL) | 821 | if ((src = (unsigned char *) GlobalLock (htext)) == NULL) |
| 323 | goto closeclip; | 822 | goto closeclip; |
| 324 | 823 | ||
| 325 | nbytes = strlen (src); | 824 | /* If the clipboard data contains any non-ascii code, we need to |
| 326 | 825 | decode it with a coding system. */ | |
| 327 | /* If the text in clipboard is identical to what we put there | 826 | if (actual_clipboard_type == CF_UNICODETEXT) |
| 328 | last time w32_set_clipboard_data was called, pretend there's no | 827 | { |
| 329 | data in the clipboard. This is so we don't pass our own text | 828 | nbytes = lstrlenW ((WCHAR *)src) * 2; |
| 330 | from the clipboard (which might be troublesome if the killed | 829 | require_decoding = 1; |
| 331 | text includes null characters). */ | 830 | } |
| 332 | if ((clipboard_sequence_fn | 831 | else |
| 333 | && clipboard_sequence_fn () == last_clipboard_sequence_number) | 832 | { |
| 334 | || (last_clipboard_text | 833 | int i; |
| 335 | && clipboard_storage_size >= nbytes | ||
| 336 | && memcmp(last_clipboard_text, src, nbytes) == 0)) | ||
| 337 | goto closeclip; | ||
| 338 | 834 | ||
| 339 | { | 835 | nbytes = strlen (src); |
| 340 | /* If the clipboard data contains any non-ascii code, we | ||
| 341 | need to decode it. */ | ||
| 342 | int i; | ||
| 343 | 836 | ||
| 344 | for (i = 0; i < nbytes; i++) | 837 | for (i = 0; i < nbytes; i++) |
| 345 | { | 838 | { |
| 346 | if (src[i] >= 0x80) | 839 | if (src[i] >= 0x80) |
| 347 | { | 840 | { |
| 348 | require_decoding = 1; | 841 | require_decoding = 1; |
| 349 | break; | 842 | break; |
| 350 | } | 843 | } |
| 351 | } | 844 | } |
| 352 | } | 845 | } |
| 353 | 846 | ||
| 354 | if (require_decoding) | 847 | if (require_decoding) |
| 355 | { | 848 | { |
| 356 | int bufsize; | 849 | int bufsize; |
| 357 | unsigned char *buf; | 850 | unsigned char *buf; |
| 358 | struct coding_system coding; | 851 | struct coding_system coding; |
| 852 | Lisp_Object coding_system = Qnil; | ||
| 853 | |||
| 854 | /* `next-selection-coding-system' should override everything, | ||
| 855 | even when the locale passed by the system disagrees. The | ||
| 856 | only exception is when `next-selection-coding-system' | ||
| 857 | requested CF_UNICODETEXT and we couldn't get that. */ | ||
| 858 | if (use_configured_coding_system | ||
| 859 | && !NILP (Vnext_selection_coding_system)) | ||
| 860 | coding_system = Vnext_selection_coding_system; | ||
| 861 | |||
| 862 | /* If we have CF_TEXT or CF_OEMTEXT, we want to check out | ||
| 863 | CF_LOCALE, too. */ | ||
| 864 | else if (actual_clipboard_type != CF_UNICODETEXT) | ||
| 865 | { | ||
| 866 | HGLOBAL hlocale; | ||
| 867 | LCID lcid = DEFAULT_LCID; | ||
| 868 | UINT cp; | ||
| 869 | |||
| 870 | /* Documentation says that the OS always generates | ||
| 871 | CF_LOCALE info automatically, so the locale handle | ||
| 872 | should always be present. Fact is that this is not | ||
| 873 | always true on 9x ;-(. */ | ||
| 874 | hlocale = GetClipboardData (CF_LOCALE); | ||
| 875 | if (hlocale != NULL) | ||
| 876 | { | ||
| 877 | const LCID * lcid_ptr; | ||
| 878 | lcid_ptr = (const LCID *) GlobalLock (hlocale); | ||
| 879 | if (lcid_ptr != NULL) | ||
| 880 | { | ||
| 881 | lcid = *lcid_ptr; | ||
| 882 | GlobalUnlock (hlocale); | ||
| 883 | } | ||
| 884 | |||
| 885 | /* 9x has garbage as the sort order (to be exact there | ||
| 886 | is another instance of the language id in the upper | ||
| 887 | word). We don't care about sort order anyway, so | ||
| 888 | we just filter out the unneeded mis-information to | ||
| 889 | avoid irritations. */ | ||
| 890 | lcid = MAKELCID (LANGIDFROMLCID (lcid), SORT_DEFAULT); | ||
| 891 | } | ||
| 892 | |||
| 893 | /* If we are using fallback from CF_UNICODETEXT, we can't | ||
| 894 | use the configured coding system. Also we don't want | ||
| 895 | to use it, if the system has supplied us with a locale | ||
| 896 | and it is not just the system default. */ | ||
| 897 | if (!use_configured_coding_system || lcid != DEFAULT_LCID) | ||
| 898 | { | ||
| 899 | cp = cp_from_locale (lcid, actual_clipboard_type); | ||
| 900 | /* If it's just our current standard setting anyway, | ||
| 901 | use the coding system that the user has selected. | ||
| 902 | Otherwise create a new spec to match the locale | ||
| 903 | that was specified by the other side or the | ||
| 904 | system. */ | ||
| 905 | if (!use_configured_coding_system || cp != cfg_codepage) | ||
| 906 | coding_system = coding_from_cp (cp); | ||
| 907 | } | ||
| 908 | } | ||
| 909 | |||
| 910 | if (NILP (coding_system)) | ||
| 911 | coding_system = Vselection_coding_system; | ||
| 912 | Vnext_selection_coding_system = Qnil; | ||
| 359 | 913 | ||
| 360 | if (NILP (Vnext_selection_coding_system)) | 914 | setup_coding_system (Fcheck_coding_system (coding_system), &coding); |
| 361 | Vnext_selection_coding_system = Vselection_coding_system; | ||
| 362 | setup_coding_system | ||
| 363 | (Fcheck_coding_system (Vnext_selection_coding_system), &coding); | ||
| 364 | coding.src_multibyte = 0; | 915 | coding.src_multibyte = 0; |
| 365 | coding.dst_multibyte = 1; | 916 | coding.dst_multibyte = 1; |
| 366 | Vnext_selection_coding_system = Qnil; | ||
| 367 | coding.mode |= CODING_MODE_LAST_BLOCK; | 917 | coding.mode |= CODING_MODE_LAST_BLOCK; |
| 368 | /* We explicitely disable composition handling because | 918 | /* We explicitely disable composition handling because |
| 369 | selection data should not contain any composition | 919 | selection data should not contain any composition |
| 370 | sequence. */ | 920 | sequence. */ |
| 371 | coding.composing = COMPOSITION_DISABLED; | 921 | coding.composing = COMPOSITION_DISABLED; |
| 922 | /* Force DOS line-ends. */ | ||
| 923 | coding.eol_type = CODING_EOL_CRLF; | ||
| 924 | |||
| 372 | bufsize = decoding_buffer_size (&coding, nbytes); | 925 | bufsize = decoding_buffer_size (&coding, nbytes); |
| 373 | buf = (unsigned char *) xmalloc (bufsize); | 926 | buf = (unsigned char *) xmalloc (bufsize); |
| 374 | decode_coding (&coding, src, buf, nbytes, bufsize); | 927 | decode_coding (&coding, src, buf, nbytes, bufsize); |
| @@ -382,10 +935,13 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, | |||
| 382 | } | 935 | } |
| 383 | else | 936 | else |
| 384 | { | 937 | { |
| 385 | /* Need to know final size after CR chars are removed because we | 938 | /* FIXME: We may want to repeat the code in this branch for |
| 386 | can't change the string size manually, and doing an extra | 939 | the Unicode case. */ |
| 387 | copy is silly. Note that we only remove CR when it appears | 940 | |
| 388 | as part of CRLF. */ | 941 | /* Need to know final size after CR chars are removed because |
| 942 | we can't change the string size manually, and doing an | ||
| 943 | extra copy is silly. We only remove CR when it appears as | ||
| 944 | part of CRLF. */ | ||
| 389 | 945 | ||
| 390 | truelen = nbytes; | 946 | truelen = nbytes; |
| 391 | dst = src; | 947 | dst = src; |
| @@ -462,9 +1018,14 @@ and t is the same as `SECONDARY'. */) | |||
| 462 | 1018 | ||
| 463 | if (OpenClipboard (NULL)) | 1019 | if (OpenClipboard (NULL)) |
| 464 | { | 1020 | { |
| 465 | int format = 0; | 1021 | UINT format = 0; |
| 466 | while (format = EnumClipboardFormats (format)) | 1022 | setup_config (); |
| 467 | if (format == CF_TEXT) | 1023 | while ((format = EnumClipboardFormats (format))) |
| 1024 | /* Check CF_TEXT in addition to cfg_clipboard_type, | ||
| 1025 | because we can fall back on that if CF_UNICODETEXT is | ||
| 1026 | not available. Actually a check for CF_TEXT only | ||
| 1027 | should be enough. */ | ||
| 1028 | if (format == cfg_clipboard_type || format == CF_TEXT) | ||
| 468 | { | 1029 | { |
| 469 | val = Qt; | 1030 | val = Qt; |
| 470 | break; | 1031 | break; |
| @@ -476,24 +1037,25 @@ and t is the same as `SECONDARY'. */) | |||
| 476 | return Qnil; | 1037 | return Qnil; |
| 477 | } | 1038 | } |
| 478 | 1039 | ||
| 1040 | /* One-time init. Called in the un-dumped Emacs, but not in the | ||
| 1041 | dumped version. */ | ||
| 1042 | |||
| 479 | void | 1043 | void |
| 480 | syms_of_w32select () | 1044 | syms_of_w32select () |
| 481 | { | 1045 | { |
| 482 | #if 0 | ||
| 483 | defsubr (&Sw32_open_clipboard); | ||
| 484 | defsubr (&Sw32_empty_clipboard); | ||
| 485 | defsubr (&Sw32_close_clipboard); | ||
| 486 | #endif | ||
| 487 | defsubr (&Sw32_set_clipboard_data); | 1046 | defsubr (&Sw32_set_clipboard_data); |
| 488 | defsubr (&Sw32_get_clipboard_data); | 1047 | defsubr (&Sw32_get_clipboard_data); |
| 489 | defsubr (&Sx_selection_exists_p); | 1048 | defsubr (&Sx_selection_exists_p); |
| 490 | 1049 | ||
| 491 | DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, | 1050 | DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, |
| 492 | doc: /* Coding system for communicating with other programs. | 1051 | doc: /* Coding system for communicating with other programs. |
| 493 | When sending or receiving text via cut_buffer, selection, and clipboard, | 1052 | When sending or receiving text via cut_buffer, selection, and |
| 494 | the text is encoded or decoded by this coding system. | 1053 | clipboard, the text is encoded or decoded by this coding system. |
| 495 | The default value is `iso-latin-1-dos'. */); | 1054 | The default value is the current system default encoding on 9x/Me and |
| 496 | Vselection_coding_system = intern ("iso-latin-1-dos"); | 1055 | `utf-16le-dos' (Unicode) on NT/W2K/XP. */); |
| 1056 | /* The actual value is set dynamically in the dumped Emacs, see | ||
| 1057 | below. */ | ||
| 1058 | Vselection_coding_system = Qnil; | ||
| 497 | 1059 | ||
| 498 | DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, | 1060 | DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, |
| 499 | doc: /* Coding system for the next communication with other programs. | 1061 | doc: /* Coding system for the next communication with other programs. |
| @@ -504,6 +1066,41 @@ set to nil. */); | |||
| 504 | Vnext_selection_coding_system = Qnil; | 1066 | Vnext_selection_coding_system = Qnil; |
| 505 | 1067 | ||
| 506 | QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); | 1068 | QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); |
| 1069 | |||
| 1070 | cfg_coding_system = Qnil; staticpro (&cfg_coding_system); | ||
| 1071 | current_text = Qnil; staticpro (¤t_text); | ||
| 1072 | current_coding_system = Qnil; staticpro (¤t_coding_system); | ||
| 1073 | |||
| 1074 | QUNICODE = intern ("utf-16le-dos"); staticpro (&QUNICODE); | ||
| 1075 | QANSICP = Qnil; staticpro (&QANSICP); | ||
| 1076 | QOEMCP = Qnil; staticpro (&QOEMCP); | ||
| 1077 | } | ||
| 1078 | |||
| 1079 | /* One-time init. Called in the dumped Emacs, but not in the | ||
| 1080 | un-dumped version. */ | ||
| 1081 | |||
| 1082 | void | ||
| 1083 | globals_of_w32select () | ||
| 1084 | { | ||
| 1085 | DEFAULT_LCID = GetUserDefaultLCID (); | ||
| 1086 | /* Drop the sort order from the LCID, so we can compare this with | ||
| 1087 | CF_LOCALE objects that have the same fix on 9x. */ | ||
| 1088 | DEFAULT_LCID = MAKELCID (LANGIDFROMLCID (DEFAULT_LCID), SORT_DEFAULT); | ||
| 1089 | |||
| 1090 | ANSICP = GetACP (); | ||
| 1091 | OEMCP = GetOEMCP (); | ||
| 1092 | |||
| 1093 | QANSICP = coding_from_cp (ANSICP); | ||
| 1094 | QOEMCP = coding_from_cp (OEMCP); | ||
| 1095 | |||
| 1096 | if (os_subtype == OS_NT) | ||
| 1097 | Vselection_coding_system = QUNICODE; | ||
| 1098 | else if (inhibit_window_system) | ||
| 1099 | Vselection_coding_system = QOEMCP; | ||
| 1100 | else | ||
| 1101 | Vselection_coding_system = QANSICP; | ||
| 1102 | |||
| 1103 | clipboard_owner = create_owner (); | ||
| 507 | } | 1104 | } |
| 508 | 1105 | ||
| 509 | /* arch-tag: c96e9724-5eb1-4dad-be07-289f092fd2af | 1106 | /* arch-tag: c96e9724-5eb1-4dad-be07-289f092fd2af |
diff --git a/src/xdisp.c b/src/xdisp.c index 992c277c898..142b1fb1398 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -823,7 +823,6 @@ static char *decode_mode_spec_coding P_ ((Lisp_Object, char *, int)); | |||
| 823 | static int invisible_text_between_p P_ ((struct it *, int, int)); | 823 | static int invisible_text_between_p P_ ((struct it *, int, int)); |
| 824 | #endif | 824 | #endif |
| 825 | 825 | ||
| 826 | static int next_element_from_ellipsis P_ ((struct it *)); | ||
| 827 | static void pint2str P_ ((char *, int, int)); | 826 | static void pint2str P_ ((char *, int, int)); |
| 828 | static void pint2hrstr P_ ((char *, int, int)); | 827 | static void pint2hrstr P_ ((char *, int, int)); |
| 829 | static struct text_pos run_window_scroll_functions P_ ((Lisp_Object, | 828 | static struct text_pos run_window_scroll_functions P_ ((Lisp_Object, |
| @@ -898,6 +897,7 @@ static void reseat_1 P_ ((struct it *, struct text_pos, int)); | |||
| 898 | static void back_to_previous_visible_line_start P_ ((struct it *)); | 897 | static void back_to_previous_visible_line_start P_ ((struct it *)); |
| 899 | void reseat_at_previous_visible_line_start P_ ((struct it *)); | 898 | void reseat_at_previous_visible_line_start P_ ((struct it *)); |
| 900 | static void reseat_at_next_visible_line_start P_ ((struct it *, int)); | 899 | static void reseat_at_next_visible_line_start P_ ((struct it *, int)); |
| 900 | static int next_element_from_ellipsis P_ ((struct it *)); | ||
| 901 | static int next_element_from_display_vector P_ ((struct it *)); | 901 | static int next_element_from_display_vector P_ ((struct it *)); |
| 902 | static int next_element_from_string P_ ((struct it *)); | 902 | static int next_element_from_string P_ ((struct it *)); |
| 903 | static int next_element_from_c_string P_ ((struct it *)); | 903 | static int next_element_from_c_string P_ ((struct it *)); |
| @@ -2039,7 +2039,7 @@ static void | |||
| 2039 | check_it (it) | 2039 | check_it (it) |
| 2040 | struct it *it; | 2040 | struct it *it; |
| 2041 | { | 2041 | { |
| 2042 | if (it->method == next_element_from_string) | 2042 | if (it->method == GET_FROM_STRING) |
| 2043 | { | 2043 | { |
| 2044 | xassert (STRINGP (it->string)); | 2044 | xassert (STRINGP (it->string)); |
| 2045 | xassert (IT_STRING_CHARPOS (*it) >= 0); | 2045 | xassert (IT_STRING_CHARPOS (*it) >= 0); |
| @@ -2047,7 +2047,7 @@ check_it (it) | |||
| 2047 | else | 2047 | else |
| 2048 | { | 2048 | { |
| 2049 | xassert (IT_STRING_CHARPOS (*it) < 0); | 2049 | xassert (IT_STRING_CHARPOS (*it) < 0); |
| 2050 | if (it->method == next_element_from_buffer) | 2050 | if (it->method == GET_FROM_BUFFER) |
| 2051 | { | 2051 | { |
| 2052 | /* Check that character and byte positions agree. */ | 2052 | /* Check that character and byte positions agree. */ |
| 2053 | xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); | 2053 | xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); |
| @@ -2557,7 +2557,7 @@ init_from_display_pos (it, w, pos) | |||
| 2557 | property for an image, the iterator will be set up for that | 2557 | property for an image, the iterator will be set up for that |
| 2558 | image, and we have to undo that setup first before we can | 2558 | image, and we have to undo that setup first before we can |
| 2559 | correct the overlay string index. */ | 2559 | correct the overlay string index. */ |
| 2560 | if (it->method == next_element_from_image) | 2560 | if (it->method == GET_FROM_IMAGE) |
| 2561 | pop_it (it); | 2561 | pop_it (it); |
| 2562 | 2562 | ||
| 2563 | /* We already have the first chunk of overlay strings in | 2563 | /* We already have the first chunk of overlay strings in |
| @@ -2580,7 +2580,7 @@ init_from_display_pos (it, w, pos) | |||
| 2580 | it->string = it->overlay_strings[relative_index]; | 2580 | it->string = it->overlay_strings[relative_index]; |
| 2581 | xassert (STRINGP (it->string)); | 2581 | xassert (STRINGP (it->string)); |
| 2582 | it->current.string_pos = pos->string_pos; | 2582 | it->current.string_pos = pos->string_pos; |
| 2583 | it->method = next_element_from_string; | 2583 | it->method = GET_FROM_STRING; |
| 2584 | } | 2584 | } |
| 2585 | 2585 | ||
| 2586 | #if 0 /* This is bogus because POS not having an overlay string | 2586 | #if 0 /* This is bogus because POS not having an overlay string |
| @@ -2596,7 +2596,7 @@ init_from_display_pos (it, w, pos) | |||
| 2596 | while (it->sp) | 2596 | while (it->sp) |
| 2597 | pop_it (it); | 2597 | pop_it (it); |
| 2598 | it->current.overlay_string_index = -1; | 2598 | it->current.overlay_string_index = -1; |
| 2599 | it->method = next_element_from_buffer; | 2599 | it->method = GET_FROM_BUFFER; |
| 2600 | if (CHARPOS (pos->pos) == ZV) | 2600 | if (CHARPOS (pos->pos) == ZV) |
| 2601 | it->overlay_strings_at_end_processed_p = 1; | 2601 | it->overlay_strings_at_end_processed_p = 1; |
| 2602 | } | 2602 | } |
| @@ -2710,7 +2710,7 @@ handle_stop (it) | |||
| 2710 | { | 2710 | { |
| 2711 | /* Don't check for overlay strings below when set to deliver | 2711 | /* Don't check for overlay strings below when set to deliver |
| 2712 | characters from a display vector. */ | 2712 | characters from a display vector. */ |
| 2713 | if (it->method == next_element_from_display_vector) | 2713 | if (it->method == GET_FROM_DISPLAY_VECTOR) |
| 2714 | handle_overlay_change_p = 0; | 2714 | handle_overlay_change_p = 0; |
| 2715 | 2715 | ||
| 2716 | /* Handle overlay changes. */ | 2716 | /* Handle overlay changes. */ |
| @@ -3368,7 +3368,7 @@ setup_for_ellipsis (it, len) | |||
| 3368 | /* Remember the current face id in case glyphs specify faces. | 3368 | /* Remember the current face id in case glyphs specify faces. |
| 3369 | IT's face is restored in set_iterator_to_next. */ | 3369 | IT's face is restored in set_iterator_to_next. */ |
| 3370 | it->saved_face_id = it->face_id; | 3370 | it->saved_face_id = it->face_id; |
| 3371 | it->method = next_element_from_display_vector; | 3371 | it->method = GET_FROM_DISPLAY_VECTOR; |
| 3372 | it->ellipsis_p = 1; | 3372 | it->ellipsis_p = 1; |
| 3373 | } | 3373 | } |
| 3374 | 3374 | ||
| @@ -3733,7 +3733,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 3733 | it->image_id = -1; /* no image */ | 3733 | it->image_id = -1; /* no image */ |
| 3734 | it->position = start_pos; | 3734 | it->position = start_pos; |
| 3735 | it->object = NILP (object) ? it->w->buffer : object; | 3735 | it->object = NILP (object) ? it->w->buffer : object; |
| 3736 | it->method = next_element_from_image; | 3736 | it->method = GET_FROM_IMAGE; |
| 3737 | it->face_id = face_id; | 3737 | it->face_id = face_id; |
| 3738 | 3738 | ||
| 3739 | /* Say that we haven't consumed the characters with | 3739 | /* Say that we haven't consumed the characters with |
| @@ -3815,7 +3815,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 3815 | it->current.overlay_string_index = -1; | 3815 | it->current.overlay_string_index = -1; |
| 3816 | IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; | 3816 | IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; |
| 3817 | it->end_charpos = it->string_nchars = SCHARS (it->string); | 3817 | it->end_charpos = it->string_nchars = SCHARS (it->string); |
| 3818 | it->method = next_element_from_string; | 3818 | it->method = GET_FROM_STRING; |
| 3819 | it->stop_charpos = 0; | 3819 | it->stop_charpos = 0; |
| 3820 | it->string_from_display_prop_p = 1; | 3820 | it->string_from_display_prop_p = 1; |
| 3821 | /* Say that we haven't consumed the characters with | 3821 | /* Say that we haven't consumed the characters with |
| @@ -3825,7 +3825,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 3825 | } | 3825 | } |
| 3826 | else if (CONSP (value) && EQ (XCAR (value), Qspace)) | 3826 | else if (CONSP (value) && EQ (XCAR (value), Qspace)) |
| 3827 | { | 3827 | { |
| 3828 | it->method = next_element_from_stretch; | 3828 | it->method = GET_FROM_STRETCH; |
| 3829 | it->object = value; | 3829 | it->object = value; |
| 3830 | it->current.pos = it->position = start_pos; | 3830 | it->current.pos = it->position = start_pos; |
| 3831 | 3831 | ||
| @@ -3837,7 +3837,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 3837 | it->image_id = lookup_image (it->f, value); | 3837 | it->image_id = lookup_image (it->f, value); |
| 3838 | it->position = start_pos; | 3838 | it->position = start_pos; |
| 3839 | it->object = NILP (object) ? it->w->buffer : object; | 3839 | it->object = NILP (object) ? it->w->buffer : object; |
| 3840 | it->method = next_element_from_image; | 3840 | it->method = GET_FROM_IMAGE; |
| 3841 | 3841 | ||
| 3842 | /* Say that we haven't consumed the characters with | 3842 | /* Say that we haven't consumed the characters with |
| 3843 | `display' property yet. The call to pop_it in | 3843 | `display' property yet. The call to pop_it in |
| @@ -4093,7 +4093,7 @@ handle_composition_prop (it) | |||
| 4093 | 4093 | ||
| 4094 | if (id >= 0) | 4094 | if (id >= 0) |
| 4095 | { | 4095 | { |
| 4096 | it->method = next_element_from_composition; | 4096 | it->method = GET_FROM_COMPOSITION; |
| 4097 | it->cmp_id = id; | 4097 | it->cmp_id = id; |
| 4098 | it->cmp_len = COMPOSITION_LENGTH (prop); | 4098 | it->cmp_len = COMPOSITION_LENGTH (prop); |
| 4099 | /* For a terminal, draw only the first character of the | 4099 | /* For a terminal, draw only the first character of the |
| @@ -4168,7 +4168,7 @@ next_overlay_string (it) | |||
| 4168 | it->current.overlay_string_index = -1; | 4168 | it->current.overlay_string_index = -1; |
| 4169 | SET_TEXT_POS (it->current.string_pos, -1, -1); | 4169 | SET_TEXT_POS (it->current.string_pos, -1, -1); |
| 4170 | it->n_overlay_strings = 0; | 4170 | it->n_overlay_strings = 0; |
| 4171 | it->method = next_element_from_buffer; | 4171 | it->method = GET_FROM_BUFFER; |
| 4172 | 4172 | ||
| 4173 | /* If we're at the end of the buffer, record that we have | 4173 | /* If we're at the end of the buffer, record that we have |
| 4174 | processed the overlay strings there already, so that | 4174 | processed the overlay strings there already, so that |
| @@ -4197,7 +4197,7 @@ next_overlay_string (it) | |||
| 4197 | it->string = it->overlay_strings[i]; | 4197 | it->string = it->overlay_strings[i]; |
| 4198 | it->multibyte_p = STRING_MULTIBYTE (it->string); | 4198 | it->multibyte_p = STRING_MULTIBYTE (it->string); |
| 4199 | SET_TEXT_POS (it->current.string_pos, 0, 0); | 4199 | SET_TEXT_POS (it->current.string_pos, 0, 0); |
| 4200 | it->method = next_element_from_string; | 4200 | it->method = GET_FROM_STRING; |
| 4201 | it->stop_charpos = 0; | 4201 | it->stop_charpos = 0; |
| 4202 | } | 4202 | } |
| 4203 | 4203 | ||
| @@ -4462,13 +4462,13 @@ get_overlay_strings (it, charpos) | |||
| 4462 | xassert (STRINGP (it->string)); | 4462 | xassert (STRINGP (it->string)); |
| 4463 | it->end_charpos = SCHARS (it->string); | 4463 | it->end_charpos = SCHARS (it->string); |
| 4464 | it->multibyte_p = STRING_MULTIBYTE (it->string); | 4464 | it->multibyte_p = STRING_MULTIBYTE (it->string); |
| 4465 | it->method = next_element_from_string; | 4465 | it->method = GET_FROM_STRING; |
| 4466 | } | 4466 | } |
| 4467 | else | 4467 | else |
| 4468 | { | 4468 | { |
| 4469 | it->string = Qnil; | 4469 | it->string = Qnil; |
| 4470 | it->current.overlay_string_index = -1; | 4470 | it->current.overlay_string_index = -1; |
| 4471 | it->method = next_element_from_buffer; | 4471 | it->method = GET_FROM_BUFFER; |
| 4472 | } | 4472 | } |
| 4473 | 4473 | ||
| 4474 | CHECK_IT (it); | 4474 | CHECK_IT (it); |
| @@ -4846,7 +4846,7 @@ reseat_1 (it, pos, set_stop_p) | |||
| 4846 | IT_STRING_CHARPOS (*it) = -1; | 4846 | IT_STRING_CHARPOS (*it) = -1; |
| 4847 | IT_STRING_BYTEPOS (*it) = -1; | 4847 | IT_STRING_BYTEPOS (*it) = -1; |
| 4848 | it->string = Qnil; | 4848 | it->string = Qnil; |
| 4849 | it->method = next_element_from_buffer; | 4849 | it->method = GET_FROM_BUFFER; |
| 4850 | /* RMS: I added this to fix a bug in move_it_vertically_backward | 4850 | /* RMS: I added this to fix a bug in move_it_vertically_backward |
| 4851 | where it->area continued to relate to the starting point | 4851 | where it->area continued to relate to the starting point |
| 4852 | for the backward motion. Bug report from | 4852 | for the backward motion. Bug report from |
| @@ -4912,7 +4912,7 @@ reseat_to_string (it, s, string, charpos, precision, field_width, multibyte) | |||
| 4912 | it->string = string; | 4912 | it->string = string; |
| 4913 | it->s = NULL; | 4913 | it->s = NULL; |
| 4914 | it->end_charpos = it->string_nchars = SCHARS (string); | 4914 | it->end_charpos = it->string_nchars = SCHARS (string); |
| 4915 | it->method = next_element_from_string; | 4915 | it->method = GET_FROM_STRING; |
| 4916 | it->current.string_pos = string_pos (charpos, string); | 4916 | it->current.string_pos = string_pos (charpos, string); |
| 4917 | } | 4917 | } |
| 4918 | else | 4918 | else |
| @@ -4934,7 +4934,7 @@ reseat_to_string (it, s, string, charpos, precision, field_width, multibyte) | |||
| 4934 | it->end_charpos = it->string_nchars = strlen (s); | 4934 | it->end_charpos = it->string_nchars = strlen (s); |
| 4935 | } | 4935 | } |
| 4936 | 4936 | ||
| 4937 | it->method = next_element_from_c_string; | 4937 | it->method = GET_FROM_C_STRING; |
| 4938 | } | 4938 | } |
| 4939 | 4939 | ||
| 4940 | /* PRECISION > 0 means don't return more than PRECISION characters | 4940 | /* PRECISION > 0 means don't return more than PRECISION characters |
| @@ -4965,6 +4965,20 @@ reseat_to_string (it, s, string, charpos, precision, field_width, multibyte) | |||
| 4965 | Iteration | 4965 | Iteration |
| 4966 | ***********************************************************************/ | 4966 | ***********************************************************************/ |
| 4967 | 4967 | ||
| 4968 | /* Map enum it_method value to corresponding next_element_from_* function. */ | ||
| 4969 | |||
| 4970 | static int (* get_next_element[NUM_IT_METHODS]) P_ ((struct it *it)) = | ||
| 4971 | { | ||
| 4972 | next_element_from_buffer, | ||
| 4973 | next_element_from_display_vector, | ||
| 4974 | next_element_from_composition, | ||
| 4975 | next_element_from_string, | ||
| 4976 | next_element_from_c_string, | ||
| 4977 | next_element_from_image, | ||
| 4978 | next_element_from_stretch | ||
| 4979 | }; | ||
| 4980 | |||
| 4981 | |||
| 4968 | /* Load IT's display element fields with information about the next | 4982 | /* Load IT's display element fields with information about the next |
| 4969 | display element from the current position of IT. Value is zero if | 4983 | display element from the current position of IT. Value is zero if |
| 4970 | end of buffer (or C string) is reached. */ | 4984 | end of buffer (or C string) is reached. */ |
| @@ -4980,7 +4994,7 @@ get_next_display_element (it) | |||
| 4980 | int success_p; | 4994 | int success_p; |
| 4981 | 4995 | ||
| 4982 | get_next: | 4996 | get_next: |
| 4983 | success_p = (*it->method) (it); | 4997 | success_p = (*get_next_element[it->method]) (it); |
| 4984 | 4998 | ||
| 4985 | if (it->what == IT_CHARACTER) | 4999 | if (it->what == IT_CHARACTER) |
| 4986 | { | 5000 | { |
| @@ -5014,7 +5028,7 @@ get_next_display_element (it) | |||
| 5014 | it->current.dpvec_index = 0; | 5028 | it->current.dpvec_index = 0; |
| 5015 | it->dpvec_face_id = -1; | 5029 | it->dpvec_face_id = -1; |
| 5016 | it->saved_face_id = it->face_id; | 5030 | it->saved_face_id = it->face_id; |
| 5017 | it->method = next_element_from_display_vector; | 5031 | it->method = GET_FROM_DISPLAY_VECTOR; |
| 5018 | it->ellipsis_p = 0; | 5032 | it->ellipsis_p = 0; |
| 5019 | } | 5033 | } |
| 5020 | else | 5034 | else |
| @@ -5040,7 +5054,7 @@ get_next_display_element (it) | |||
| 5040 | else if ((it->c < ' ' | 5054 | else if ((it->c < ' ' |
| 5041 | && (it->area != TEXT_AREA | 5055 | && (it->area != TEXT_AREA |
| 5042 | /* In mode line, treat \n like other crl chars. */ | 5056 | /* In mode line, treat \n like other crl chars. */ |
| 5043 | || (it->c != '\n' | 5057 | || (it->c != '\t' |
| 5044 | && it->glyph_row && it->glyph_row->mode_line_p) | 5058 | && it->glyph_row && it->glyph_row->mode_line_p) |
| 5045 | || (it->c != '\n' && it->c != '\t'))) | 5059 | || (it->c != '\n' && it->c != '\t'))) |
| 5046 | || (it->multibyte_p | 5060 | || (it->multibyte_p |
| @@ -5172,7 +5186,7 @@ get_next_display_element (it) | |||
| 5172 | it->current.dpvec_index = 0; | 5186 | it->current.dpvec_index = 0; |
| 5173 | it->dpvec_face_id = face_id; | 5187 | it->dpvec_face_id = face_id; |
| 5174 | it->saved_face_id = it->face_id; | 5188 | it->saved_face_id = it->face_id; |
| 5175 | it->method = next_element_from_display_vector; | 5189 | it->method = GET_FROM_DISPLAY_VECTOR; |
| 5176 | it->ellipsis_p = 0; | 5190 | it->ellipsis_p = 0; |
| 5177 | goto get_next; | 5191 | goto get_next; |
| 5178 | } | 5192 | } |
| @@ -5234,8 +5248,9 @@ set_iterator_to_next (it, reseat_p) | |||
| 5234 | moving the iterator to a new position might set them. */ | 5248 | moving the iterator to a new position might set them. */ |
| 5235 | it->start_of_box_run_p = it->end_of_box_run_p = 0; | 5249 | it->start_of_box_run_p = it->end_of_box_run_p = 0; |
| 5236 | 5250 | ||
| 5237 | if (it->method == next_element_from_buffer) | 5251 | switch (it->method) |
| 5238 | { | 5252 | { |
| 5253 | case GET_FROM_BUFFER: | ||
| 5239 | /* The current display element of IT is a character from | 5254 | /* The current display element of IT is a character from |
| 5240 | current_buffer. Advance in the buffer, and maybe skip over | 5255 | current_buffer. Advance in the buffer, and maybe skip over |
| 5241 | invisible lines that are so because of selective display. */ | 5256 | invisible lines that are so because of selective display. */ |
| @@ -5248,32 +5263,32 @@ set_iterator_to_next (it, reseat_p) | |||
| 5248 | IT_CHARPOS (*it) += 1; | 5263 | IT_CHARPOS (*it) += 1; |
| 5249 | xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it))); | 5264 | xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it))); |
| 5250 | } | 5265 | } |
| 5251 | } | 5266 | break; |
| 5252 | else if (it->method == next_element_from_composition) | 5267 | |
| 5253 | { | 5268 | case GET_FROM_COMPOSITION: |
| 5254 | xassert (it->cmp_id >= 0 && it ->cmp_id < n_compositions); | 5269 | xassert (it->cmp_id >= 0 && it->cmp_id < n_compositions); |
| 5255 | if (STRINGP (it->string)) | 5270 | if (STRINGP (it->string)) |
| 5256 | { | 5271 | { |
| 5257 | IT_STRING_BYTEPOS (*it) += it->len; | 5272 | IT_STRING_BYTEPOS (*it) += it->len; |
| 5258 | IT_STRING_CHARPOS (*it) += it->cmp_len; | 5273 | IT_STRING_CHARPOS (*it) += it->cmp_len; |
| 5259 | it->method = next_element_from_string; | 5274 | it->method = GET_FROM_STRING; |
| 5260 | goto consider_string_end; | 5275 | goto consider_string_end; |
| 5261 | } | 5276 | } |
| 5262 | else | 5277 | else |
| 5263 | { | 5278 | { |
| 5264 | IT_BYTEPOS (*it) += it->len; | 5279 | IT_BYTEPOS (*it) += it->len; |
| 5265 | IT_CHARPOS (*it) += it->cmp_len; | 5280 | IT_CHARPOS (*it) += it->cmp_len; |
| 5266 | it->method = next_element_from_buffer; | 5281 | it->method = GET_FROM_BUFFER; |
| 5267 | } | 5282 | } |
| 5268 | } | 5283 | break; |
| 5269 | else if (it->method == next_element_from_c_string) | 5284 | |
| 5270 | { | 5285 | case GET_FROM_C_STRING: |
| 5271 | /* Current display element of IT is from a C string. */ | 5286 | /* Current display element of IT is from a C string. */ |
| 5272 | IT_BYTEPOS (*it) += it->len; | 5287 | IT_BYTEPOS (*it) += it->len; |
| 5273 | IT_CHARPOS (*it) += 1; | 5288 | IT_CHARPOS (*it) += 1; |
| 5274 | } | 5289 | break; |
| 5275 | else if (it->method == next_element_from_display_vector) | 5290 | |
| 5276 | { | 5291 | case GET_FROM_DISPLAY_VECTOR: |
| 5277 | /* Current display element of IT is from a display table entry. | 5292 | /* Current display element of IT is from a display table entry. |
| 5278 | Advance in the display table definition. Reset it to null if | 5293 | Advance in the display table definition. Reset it to null if |
| 5279 | end reached, and continue with characters from buffers/ | 5294 | end reached, and continue with characters from buffers/ |
| @@ -5287,11 +5302,11 @@ set_iterator_to_next (it, reseat_p) | |||
| 5287 | if (it->dpvec + it->current.dpvec_index == it->dpend) | 5302 | if (it->dpvec + it->current.dpvec_index == it->dpend) |
| 5288 | { | 5303 | { |
| 5289 | if (it->s) | 5304 | if (it->s) |
| 5290 | it->method = next_element_from_c_string; | 5305 | it->method = GET_FROM_C_STRING; |
| 5291 | else if (STRINGP (it->string)) | 5306 | else if (STRINGP (it->string)) |
| 5292 | it->method = next_element_from_string; | 5307 | it->method = GET_FROM_STRING; |
| 5293 | else | 5308 | else |
| 5294 | it->method = next_element_from_buffer; | 5309 | it->method = GET_FROM_BUFFER; |
| 5295 | 5310 | ||
| 5296 | it->dpvec = NULL; | 5311 | it->dpvec = NULL; |
| 5297 | it->current.dpvec_index = -1; | 5312 | it->current.dpvec_index = -1; |
| @@ -5308,9 +5323,9 @@ set_iterator_to_next (it, reseat_p) | |||
| 5308 | /* Recheck faces after display vector */ | 5323 | /* Recheck faces after display vector */ |
| 5309 | it->stop_charpos = IT_CHARPOS (*it); | 5324 | it->stop_charpos = IT_CHARPOS (*it); |
| 5310 | } | 5325 | } |
| 5311 | } | 5326 | break; |
| 5312 | else if (it->method == next_element_from_string) | 5327 | |
| 5313 | { | 5328 | case GET_FROM_STRING: |
| 5314 | /* Current display element is a character from a Lisp string. */ | 5329 | /* Current display element is a character from a Lisp string. */ |
| 5315 | xassert (it->s == NULL && STRINGP (it->string)); | 5330 | xassert (it->s == NULL && STRINGP (it->string)); |
| 5316 | IT_STRING_BYTEPOS (*it) += it->len; | 5331 | IT_STRING_BYTEPOS (*it) += it->len; |
| @@ -5335,34 +5350,35 @@ set_iterator_to_next (it, reseat_p) | |||
| 5335 | && it->sp > 0) | 5350 | && it->sp > 0) |
| 5336 | { | 5351 | { |
| 5337 | pop_it (it); | 5352 | pop_it (it); |
| 5338 | if (!STRINGP (it->string)) | 5353 | if (STRINGP (it->string)) |
| 5339 | it->method = next_element_from_buffer; | ||
| 5340 | else | ||
| 5341 | goto consider_string_end; | 5354 | goto consider_string_end; |
| 5355 | it->method = GET_FROM_BUFFER; | ||
| 5342 | } | 5356 | } |
| 5343 | } | 5357 | } |
| 5344 | } | 5358 | break; |
| 5345 | else if (it->method == next_element_from_image | 5359 | |
| 5346 | || it->method == next_element_from_stretch) | 5360 | case GET_FROM_IMAGE: |
| 5347 | { | 5361 | case GET_FROM_STRETCH: |
| 5348 | /* The position etc with which we have to proceed are on | 5362 | /* The position etc with which we have to proceed are on |
| 5349 | the stack. The position may be at the end of a string, | 5363 | the stack. The position may be at the end of a string, |
| 5350 | if the `display' property takes up the whole string. */ | 5364 | if the `display' property takes up the whole string. */ |
| 5365 | xassert (it->sp > 0); | ||
| 5351 | pop_it (it); | 5366 | pop_it (it); |
| 5352 | it->image_id = 0; | 5367 | it->image_id = 0; |
| 5353 | if (STRINGP (it->string)) | 5368 | if (STRINGP (it->string)) |
| 5354 | { | 5369 | { |
| 5355 | it->method = next_element_from_string; | 5370 | it->method = GET_FROM_STRING; |
| 5356 | goto consider_string_end; | 5371 | goto consider_string_end; |
| 5357 | } | 5372 | } |
| 5358 | else | 5373 | it->method = GET_FROM_BUFFER; |
| 5359 | it->method = next_element_from_buffer; | 5374 | break; |
| 5375 | |||
| 5376 | default: | ||
| 5377 | /* There are no other methods defined, so this should be a bug. */ | ||
| 5378 | abort (); | ||
| 5360 | } | 5379 | } |
| 5361 | else | ||
| 5362 | /* There are no other methods defined, so this should be a bug. */ | ||
| 5363 | abort (); | ||
| 5364 | 5380 | ||
| 5365 | xassert (it->method != next_element_from_string | 5381 | xassert (it->method != GET_FROM_STRING |
| 5366 | || (STRINGP (it->string) | 5382 | || (STRINGP (it->string) |
| 5367 | && IT_STRING_CHARPOS (*it) >= 0)); | 5383 | && IT_STRING_CHARPOS (*it) >= 0)); |
| 5368 | } | 5384 | } |
| @@ -5574,7 +5590,7 @@ next_element_from_ellipsis (it) | |||
| 5574 | was in IT->saved_face_id, and signal that it's there by | 5590 | was in IT->saved_face_id, and signal that it's there by |
| 5575 | setting face_before_selective_p. */ | 5591 | setting face_before_selective_p. */ |
| 5576 | it->saved_face_id = it->face_id; | 5592 | it->saved_face_id = it->face_id; |
| 5577 | it->method = next_element_from_buffer; | 5593 | it->method = GET_FROM_BUFFER; |
| 5578 | reseat_at_next_visible_line_start (it, 1); | 5594 | reseat_at_next_visible_line_start (it, 1); |
| 5579 | it->face_before_selective_p = 1; | 5595 | it->face_before_selective_p = 1; |
| 5580 | } | 5596 | } |
| @@ -5815,11 +5831,14 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5815 | saved_glyph_row = it->glyph_row; | 5831 | saved_glyph_row = it->glyph_row; |
| 5816 | it->glyph_row = NULL; | 5832 | it->glyph_row = NULL; |
| 5817 | 5833 | ||
| 5818 | #define BUFFER_POS_REACHED_P() \ | 5834 | #define BUFFER_POS_REACHED_P() \ |
| 5819 | ((op & MOVE_TO_POS) != 0 \ | 5835 | ((op & MOVE_TO_POS) != 0 \ |
| 5820 | && BUFFERP (it->object) \ | 5836 | && BUFFERP (it->object) \ |
| 5821 | && IT_CHARPOS (*it) >= to_charpos \ | 5837 | && IT_CHARPOS (*it) >= to_charpos \ |
| 5822 | && it->method == next_element_from_buffer) | 5838 | && (it->method == GET_FROM_BUFFER || \ |
| 5839 | (it->method == GET_FROM_DISPLAY_VECTOR && \ | ||
| 5840 | it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) | ||
| 5841 | |||
| 5823 | 5842 | ||
| 5824 | while (1) | 5843 | while (1) |
| 5825 | { | 5844 | { |
| @@ -6500,7 +6519,7 @@ int | |||
| 6500 | in_display_vector_p (it) | 6519 | in_display_vector_p (it) |
| 6501 | struct it *it; | 6520 | struct it *it; |
| 6502 | { | 6521 | { |
| 6503 | return (it->method == next_element_from_display_vector | 6522 | return (it->method == GET_FROM_DISPLAY_VECTOR |
| 6504 | && it->current.dpvec_index > 0 | 6523 | && it->current.dpvec_index > 0 |
| 6505 | && it->dpvec + it->current.dpvec_index != it->dpend); | 6524 | && it->dpvec + it->current.dpvec_index != it->dpend); |
| 6506 | } | 6525 | } |
| @@ -15246,7 +15265,7 @@ display_line (it) | |||
| 15246 | 15265 | ||
| 15247 | /* Record whether this row ends inside an ellipsis. */ | 15266 | /* Record whether this row ends inside an ellipsis. */ |
| 15248 | row->ends_in_ellipsis_p | 15267 | row->ends_in_ellipsis_p |
| 15249 | = (it->method == next_element_from_display_vector | 15268 | = (it->method == GET_FROM_DISPLAY_VECTOR |
| 15250 | && it->ellipsis_p); | 15269 | && it->ellipsis_p); |
| 15251 | 15270 | ||
| 15252 | /* Save fringe bitmaps in this row. */ | 15271 | /* Save fringe bitmaps in this row. */ |
diff --git a/src/xfns.c b/src/xfns.c index 8c5039d0cf6..db2e3f74045 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1890,7 +1890,8 @@ hack_wm_protocols (f, widget) | |||
| 1890 | 1890 | ||
| 1891 | BLOCK_INPUT; | 1891 | BLOCK_INPUT; |
| 1892 | { | 1892 | { |
| 1893 | Atom type, *atoms = 0; | 1893 | Atom type; |
| 1894 | unsigned char *catoms; | ||
| 1894 | int format = 0; | 1895 | int format = 0; |
| 1895 | unsigned long nitems = 0; | 1896 | unsigned long nitems = 0; |
| 1896 | unsigned long bytes_after; | 1897 | unsigned long bytes_after; |
| @@ -1899,20 +1900,27 @@ hack_wm_protocols (f, widget) | |||
| 1899 | FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols, | 1900 | FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols, |
| 1900 | (long)0, (long)100, False, XA_ATOM, | 1901 | (long)0, (long)100, False, XA_ATOM, |
| 1901 | &type, &format, &nitems, &bytes_after, | 1902 | &type, &format, &nitems, &bytes_after, |
| 1902 | (unsigned char **) &atoms) | 1903 | &catoms) |
| 1903 | == Success) | 1904 | == Success) |
| 1904 | && format == 32 && type == XA_ATOM) | 1905 | && format == 32 && type == XA_ATOM) |
| 1905 | while (nitems > 0) | 1906 | { |
| 1906 | { | 1907 | Atom *atoms = (Atom *) catoms; |
| 1907 | nitems--; | 1908 | while (nitems > 0) |
| 1908 | if (atoms[nitems] == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window) | 1909 | { |
| 1909 | need_delete = 0; | 1910 | nitems--; |
| 1910 | else if (atoms[nitems] == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus) | 1911 | if (atoms[nitems] |
| 1911 | need_focus = 0; | 1912 | == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window) |
| 1912 | else if (atoms[nitems] == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself) | 1913 | need_delete = 0; |
| 1913 | need_save = 0; | 1914 | else if (atoms[nitems] |
| 1914 | } | 1915 | == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus) |
| 1915 | if (atoms) XFree ((char *) atoms); | 1916 | need_focus = 0; |
| 1917 | else if (atoms[nitems] | ||
| 1918 | == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself) | ||
| 1919 | need_save = 0; | ||
| 1920 | } | ||
| 1921 | } | ||
| 1922 | if (catoms) | ||
| 1923 | XFree (catoms); | ||
| 1916 | } | 1924 | } |
| 1917 | { | 1925 | { |
| 1918 | Atom props [10]; | 1926 | Atom props [10]; |
| @@ -4175,7 +4183,7 @@ no value of TYPE. */) | |||
| 4175 | Atom prop_atom; | 4183 | Atom prop_atom; |
| 4176 | int rc; | 4184 | int rc; |
| 4177 | Lisp_Object prop_value = Qnil; | 4185 | Lisp_Object prop_value = Qnil; |
| 4178 | char *tmp_data = NULL; | 4186 | unsigned char *tmp_data = NULL; |
| 4179 | Atom actual_type; | 4187 | Atom actual_type; |
| 4180 | Atom target_type = XA_STRING; | 4188 | Atom target_type = XA_STRING; |
| 4181 | int actual_format; | 4189 | int actual_format; |
| @@ -4215,7 +4223,7 @@ no value of TYPE. */) | |||
| 4215 | rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window, | 4223 | rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window, |
| 4216 | prop_atom, 0, 0, False, target_type, | 4224 | prop_atom, 0, 0, False, target_type, |
| 4217 | &actual_type, &actual_format, &actual_size, | 4225 | &actual_type, &actual_format, &actual_size, |
| 4218 | &bytes_remaining, (unsigned char **) &tmp_data); | 4226 | &bytes_remaining, &tmp_data); |
| 4219 | if (rc == Success) | 4227 | if (rc == Success) |
| 4220 | { | 4228 | { |
| 4221 | int size = bytes_remaining; | 4229 | int size = bytes_remaining; |
| @@ -4228,7 +4236,7 @@ no value of TYPE. */) | |||
| 4228 | ! NILP (delete_p), target_type, | 4236 | ! NILP (delete_p), target_type, |
| 4229 | &actual_type, &actual_format, | 4237 | &actual_type, &actual_format, |
| 4230 | &actual_size, &bytes_remaining, | 4238 | &actual_size, &bytes_remaining, |
| 4231 | (unsigned char **) &tmp_data); | 4239 | &tmp_data); |
| 4232 | if (rc == Success && tmp_data) | 4240 | if (rc == Success && tmp_data) |
| 4233 | { | 4241 | { |
| 4234 | /* The man page for XGetWindowProperty says: | 4242 | /* The man page for XGetWindowProperty says: |
| @@ -4252,14 +4260,14 @@ no value of TYPE. */) | |||
| 4252 | long *ldata = (long *) tmp_data; | 4260 | long *ldata = (long *) tmp_data; |
| 4253 | 4261 | ||
| 4254 | for (i = 0; i < actual_size; ++i) | 4262 | for (i = 0; i < actual_size; ++i) |
| 4255 | idata[i]= (int) ldata[i]; | 4263 | idata[i] = (int) ldata[i]; |
| 4256 | } | 4264 | } |
| 4257 | 4265 | ||
| 4258 | if (NILP (vector_ret_p)) | 4266 | if (NILP (vector_ret_p)) |
| 4259 | prop_value = make_string (tmp_data, size); | 4267 | prop_value = make_string (tmp_data, size); |
| 4260 | else | 4268 | else |
| 4261 | prop_value = x_property_data_to_lisp (f, | 4269 | prop_value = x_property_data_to_lisp (f, |
| 4262 | (unsigned char *) tmp_data, | 4270 | tmp_data, |
| 4263 | actual_type, | 4271 | actual_type, |
| 4264 | actual_format, | 4272 | actual_format, |
| 4265 | actual_size); | 4273 | actual_size); |
diff --git a/src/xselect.c b/src/xselect.c index adea1f3c2d6..5a899cfa389 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1925,7 +1925,12 @@ lisp_data_to_selection_data (display, obj, | |||
| 1925 | } | 1925 | } |
| 1926 | else if (STRINGP (obj)) | 1926 | else if (STRINGP (obj)) |
| 1927 | { | 1927 | { |
| 1928 | xassert (! STRING_MULTIBYTE (obj)); | 1928 | if (SCHARS (obj) < SBYTES (obj)) |
| 1929 | /* OBJ is a multibyte string containing a non-ASCII char. */ | ||
| 1930 | Fsignal (Qerror, /* Qselection_error */ | ||
| 1931 | Fcons (build_string | ||
| 1932 | ("Non-ASCII string must be encoded in advance"), | ||
| 1933 | Fcons (obj, Qnil))); | ||
| 1929 | if (NILP (type)) | 1934 | if (NILP (type)) |
| 1930 | type = QSTRING; | 1935 | type = QSTRING; |
| 1931 | *format_ret = 8; | 1936 | *format_ret = 8; |
| @@ -2201,7 +2206,10 @@ Disowning it means there is no such selection. */) | |||
| 2201 | { | 2206 | { |
| 2202 | Time timestamp; | 2207 | Time timestamp; |
| 2203 | Atom selection_atom; | 2208 | Atom selection_atom; |
| 2204 | struct selection_input_event event; | 2209 | union { |
| 2210 | struct selection_input_event sie; | ||
| 2211 | struct input_event ie; | ||
| 2212 | } event; | ||
| 2205 | Display *display; | 2213 | Display *display; |
| 2206 | struct x_display_info *dpyinfo; | 2214 | struct x_display_info *dpyinfo; |
| 2207 | struct frame *sf = SELECTED_FRAME (); | 2215 | struct frame *sf = SELECTED_FRAME (); |
| @@ -2232,10 +2240,10 @@ Disowning it means there is no such selection. */) | |||
| 2232 | the selection owner to None. The NCD server does, the MIT Sun4 server | 2240 | the selection owner to None. The NCD server does, the MIT Sun4 server |
| 2233 | doesn't. So we synthesize one; this means we might get two, but | 2241 | doesn't. So we synthesize one; this means we might get two, but |
| 2234 | that's ok, because the second one won't have any effect. */ | 2242 | that's ok, because the second one won't have any effect. */ |
| 2235 | SELECTION_EVENT_DISPLAY (&event) = display; | 2243 | SELECTION_EVENT_DISPLAY (&event.sie) = display; |
| 2236 | SELECTION_EVENT_SELECTION (&event) = selection_atom; | 2244 | SELECTION_EVENT_SELECTION (&event.sie) = selection_atom; |
| 2237 | SELECTION_EVENT_TIME (&event) = timestamp; | 2245 | SELECTION_EVENT_TIME (&event.sie) = timestamp; |
| 2238 | x_handle_selection_clear ((struct input_event *) &event); | 2246 | x_handle_selection_clear (&event.ie); |
| 2239 | 2247 | ||
| 2240 | return Qt; | 2248 | return Qt; |
| 2241 | } | 2249 | } |
diff --git a/src/xterm.c b/src/xterm.c index 367b7741fa6..aa3f8b1a8b5 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -5622,8 +5622,8 @@ static struct x_display_info *next_noop_dpyinfo; | |||
| 5622 | f->output_data.x->saved_menu_event \ | 5622 | f->output_data.x->saved_menu_event \ |
| 5623 | = (XEvent *) xmalloc (sizeof (XEvent)); \ | 5623 | = (XEvent *) xmalloc (sizeof (XEvent)); \ |
| 5624 | bcopy (&event, f->output_data.x->saved_menu_event, size); \ | 5624 | bcopy (&event, f->output_data.x->saved_menu_event, size); \ |
| 5625 | inev.kind = MENU_BAR_ACTIVATE_EVENT; \ | 5625 | inev.ie.kind = MENU_BAR_ACTIVATE_EVENT; \ |
| 5626 | XSETFRAME (inev.frame_or_window, f); \ | 5626 | XSETFRAME (inev.ie.frame_or_window, f); \ |
| 5627 | } \ | 5627 | } \ |
| 5628 | while (0) | 5628 | while (0) |
| 5629 | 5629 | ||
| @@ -5730,7 +5730,10 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 5730 | int *finish; | 5730 | int *finish; |
| 5731 | struct input_event *hold_quit; | 5731 | struct input_event *hold_quit; |
| 5732 | { | 5732 | { |
| 5733 | struct input_event inev; | 5733 | union { |
| 5734 | struct input_event ie; | ||
| 5735 | struct selection_input_event sie; | ||
| 5736 | } inev; | ||
| 5734 | int count = 0; | 5737 | int count = 0; |
| 5735 | int do_help = 0; | 5738 | int do_help = 0; |
| 5736 | int nbytes = 0; | 5739 | int nbytes = 0; |
| @@ -5740,9 +5743,9 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 5740 | 5743 | ||
| 5741 | *finish = X_EVENT_NORMAL; | 5744 | *finish = X_EVENT_NORMAL; |
| 5742 | 5745 | ||
| 5743 | EVENT_INIT (inev); | 5746 | EVENT_INIT (inev.ie); |
| 5744 | inev.kind = NO_EVENT; | 5747 | inev.ie.kind = NO_EVENT; |
| 5745 | inev.arg = Qnil; | 5748 | inev.ie.arg = Qnil; |
| 5746 | 5749 | ||
| 5747 | switch (event.type) | 5750 | switch (event.type) |
| 5748 | { | 5751 | { |
| @@ -5840,8 +5843,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 5840 | if (!f) | 5843 | if (!f) |
| 5841 | goto OTHER; /* May be a dialog that is to be removed */ | 5844 | goto OTHER; /* May be a dialog that is to be removed */ |
| 5842 | 5845 | ||
| 5843 | inev.kind = DELETE_WINDOW_EVENT; | 5846 | inev.ie.kind = DELETE_WINDOW_EVENT; |
| 5844 | XSETFRAME (inev.frame_or_window, f); | 5847 | XSETFRAME (inev.ie.frame_or_window, f); |
| 5845 | goto done; | 5848 | goto done; |
| 5846 | } | 5849 | } |
| 5847 | 5850 | ||
| @@ -5904,7 +5907,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 5904 | if (event.xclient.message_type | 5907 | if (event.xclient.message_type |
| 5905 | == dpyinfo->Xatom_Scrollbar) | 5908 | == dpyinfo->Xatom_Scrollbar) |
| 5906 | { | 5909 | { |
| 5907 | x_scroll_bar_to_input_event (&event, &inev); | 5910 | x_scroll_bar_to_input_event (&event, &inev.ie); |
| 5908 | *finish = X_EVENT_GOTO_OUT; | 5911 | *finish = X_EVENT_GOTO_OUT; |
| 5909 | goto done; | 5912 | goto done; |
| 5910 | } | 5913 | } |
| @@ -5915,7 +5918,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 5915 | if (!f) | 5918 | if (!f) |
| 5916 | goto OTHER; | 5919 | goto OTHER; |
| 5917 | 5920 | ||
| 5918 | if (x_handle_dnd_message (f, &event.xclient, dpyinfo, &inev)) | 5921 | if (x_handle_dnd_message (f, &event.xclient, dpyinfo, &inev.ie)) |
| 5919 | *finish = X_EVENT_DROP; | 5922 | *finish = X_EVENT_DROP; |
| 5920 | } | 5923 | } |
| 5921 | break; | 5924 | break; |
| @@ -5936,11 +5939,11 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 5936 | { | 5939 | { |
| 5937 | XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event; | 5940 | XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event; |
| 5938 | 5941 | ||
| 5939 | inev.kind = SELECTION_CLEAR_EVENT; | 5942 | inev.ie.kind = SELECTION_CLEAR_EVENT; |
| 5940 | SELECTION_EVENT_DISPLAY (&inev) = eventp->display; | 5943 | SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display; |
| 5941 | SELECTION_EVENT_SELECTION (&inev) = eventp->selection; | 5944 | SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection; |
| 5942 | SELECTION_EVENT_TIME (&inev) = eventp->time; | 5945 | SELECTION_EVENT_TIME (&inev.sie) = eventp->time; |
| 5943 | inev.frame_or_window = Qnil; | 5946 | inev.ie.frame_or_window = Qnil; |
| 5944 | } | 5947 | } |
| 5945 | break; | 5948 | break; |
| 5946 | 5949 | ||
| @@ -5953,14 +5956,14 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 5953 | XSelectionRequestEvent *eventp | 5956 | XSelectionRequestEvent *eventp |
| 5954 | = (XSelectionRequestEvent *) &event; | 5957 | = (XSelectionRequestEvent *) &event; |
| 5955 | 5958 | ||
| 5956 | inev.kind = SELECTION_REQUEST_EVENT; | 5959 | inev.ie.kind = SELECTION_REQUEST_EVENT; |
| 5957 | SELECTION_EVENT_DISPLAY (&inev) = eventp->display; | 5960 | SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display; |
| 5958 | SELECTION_EVENT_REQUESTOR (&inev) = eventp->requestor; | 5961 | SELECTION_EVENT_REQUESTOR (&inev.sie) = eventp->requestor; |
| 5959 | SELECTION_EVENT_SELECTION (&inev) = eventp->selection; | 5962 | SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection; |
| 5960 | SELECTION_EVENT_TARGET (&inev) = eventp->target; | 5963 | SELECTION_EVENT_TARGET (&inev.sie) = eventp->target; |
| 5961 | SELECTION_EVENT_PROPERTY (&inev) = eventp->property; | 5964 | SELECTION_EVENT_PROPERTY (&inev.sie) = eventp->property; |
| 5962 | SELECTION_EVENT_TIME (&inev) = eventp->time; | 5965 | SELECTION_EVENT_TIME (&inev.sie) = eventp->time; |
| 5963 | inev.frame_or_window = Qnil; | 5966 | inev.ie.frame_or_window = Qnil; |
| 5964 | } | 5967 | } |
| 5965 | break; | 5968 | break; |
| 5966 | 5969 | ||
| @@ -6099,8 +6102,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6099 | { | 6102 | { |
| 6100 | f->async_iconified = 1; | 6103 | f->async_iconified = 1; |
| 6101 | 6104 | ||
| 6102 | inev.kind = ICONIFY_EVENT; | 6105 | inev.ie.kind = ICONIFY_EVENT; |
| 6103 | XSETFRAME (inev.frame_or_window, f); | 6106 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6104 | } | 6107 | } |
| 6105 | } | 6108 | } |
| 6106 | goto OTHER; | 6109 | goto OTHER; |
| @@ -6132,8 +6135,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6132 | 6135 | ||
| 6133 | if (f->iconified) | 6136 | if (f->iconified) |
| 6134 | { | 6137 | { |
| 6135 | inev.kind = DEICONIFY_EVENT; | 6138 | inev.ie.kind = DEICONIFY_EVENT; |
| 6136 | XSETFRAME (inev.frame_or_window, f); | 6139 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6137 | } | 6140 | } |
| 6138 | else if (! NILP (Vframe_list) | 6141 | else if (! NILP (Vframe_list) |
| 6139 | && ! NILP (XCDR (Vframe_list))) | 6142 | && ! NILP (XCDR (Vframe_list))) |
| @@ -6299,18 +6302,18 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6299 | orig_keysym = keysym; | 6302 | orig_keysym = keysym; |
| 6300 | 6303 | ||
| 6301 | /* Common for all keysym input events. */ | 6304 | /* Common for all keysym input events. */ |
| 6302 | XSETFRAME (inev.frame_or_window, f); | 6305 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6303 | inev.modifiers | 6306 | inev.ie.modifiers |
| 6304 | = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers); | 6307 | = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers); |
| 6305 | inev.timestamp = event.xkey.time; | 6308 | inev.ie.timestamp = event.xkey.time; |
| 6306 | 6309 | ||
| 6307 | /* First deal with keysyms which have defined | 6310 | /* First deal with keysyms which have defined |
| 6308 | translations to characters. */ | 6311 | translations to characters. */ |
| 6309 | if (keysym >= 32 && keysym < 128) | 6312 | if (keysym >= 32 && keysym < 128) |
| 6310 | /* Avoid explicitly decoding each ASCII character. */ | 6313 | /* Avoid explicitly decoding each ASCII character. */ |
| 6311 | { | 6314 | { |
| 6312 | inev.kind = ASCII_KEYSTROKE_EVENT; | 6315 | inev.ie.kind = ASCII_KEYSTROKE_EVENT; |
| 6313 | inev.code = keysym; | 6316 | inev.ie.code = keysym; |
| 6314 | goto done_keysym; | 6317 | goto done_keysym; |
| 6315 | } | 6318 | } |
| 6316 | 6319 | ||
| @@ -6320,10 +6323,10 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6320 | Vx_keysym_table, | 6323 | Vx_keysym_table, |
| 6321 | Qnil)))) | 6324 | Qnil)))) |
| 6322 | { | 6325 | { |
| 6323 | inev.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c)) | 6326 | inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c)) |
| 6324 | ? ASCII_KEYSTROKE_EVENT | 6327 | ? ASCII_KEYSTROKE_EVENT |
| 6325 | : MULTIBYTE_CHAR_KEYSTROKE_EVENT); | 6328 | : MULTIBYTE_CHAR_KEYSTROKE_EVENT); |
| 6326 | inev.code = XFASTINT (c); | 6329 | inev.ie.code = XFASTINT (c); |
| 6327 | goto done_keysym; | 6330 | goto done_keysym; |
| 6328 | } | 6331 | } |
| 6329 | 6332 | ||
| @@ -6413,8 +6416,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6413 | STORE_KEYSYM_FOR_DEBUG (keysym); | 6416 | STORE_KEYSYM_FOR_DEBUG (keysym); |
| 6414 | /* make_lispy_event will convert this to a symbolic | 6417 | /* make_lispy_event will convert this to a symbolic |
| 6415 | key. */ | 6418 | key. */ |
| 6416 | inev.kind = NON_ASCII_KEYSTROKE_EVENT; | 6419 | inev.ie.kind = NON_ASCII_KEYSTROKE_EVENT; |
| 6417 | inev.code = keysym; | 6420 | inev.ie.code = keysym; |
| 6418 | goto done_keysym; | 6421 | goto done_keysym; |
| 6419 | } | 6422 | } |
| 6420 | 6423 | ||
| @@ -6465,18 +6468,18 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6465 | else | 6468 | else |
| 6466 | c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, | 6469 | c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, |
| 6467 | nbytes - i, len); | 6470 | nbytes - i, len); |
| 6468 | inev.kind = (SINGLE_BYTE_CHAR_P (c) | 6471 | inev.ie.kind = (SINGLE_BYTE_CHAR_P (c) |
| 6469 | ? ASCII_KEYSTROKE_EVENT | 6472 | ? ASCII_KEYSTROKE_EVENT |
| 6470 | : MULTIBYTE_CHAR_KEYSTROKE_EVENT); | 6473 | : MULTIBYTE_CHAR_KEYSTROKE_EVENT); |
| 6471 | inev.code = c; | 6474 | inev.ie.code = c; |
| 6472 | kbd_buffer_store_event_hold (&inev, hold_quit); | 6475 | kbd_buffer_store_event_hold (&inev.ie, hold_quit); |
| 6473 | } | 6476 | } |
| 6474 | 6477 | ||
| 6475 | /* Previous code updated count by nchars rather than nbytes, | 6478 | /* Previous code updated count by nchars rather than nbytes, |
| 6476 | but that seems bogus to me. ++kfs */ | 6479 | but that seems bogus to me. ++kfs */ |
| 6477 | count += nbytes; | 6480 | count += nbytes; |
| 6478 | 6481 | ||
| 6479 | inev.kind = NO_EVENT; /* Already stored above. */ | 6482 | inev.ie.kind = NO_EVENT; /* Already stored above. */ |
| 6480 | 6483 | ||
| 6481 | if (keysym == NoSymbol) | 6484 | if (keysym == NoSymbol) |
| 6482 | break; | 6485 | break; |
| @@ -6503,7 +6506,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6503 | #endif | 6506 | #endif |
| 6504 | 6507 | ||
| 6505 | case EnterNotify: | 6508 | case EnterNotify: |
| 6506 | x_detect_focus_change (dpyinfo, &event, &inev); | 6509 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6507 | 6510 | ||
| 6508 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); | 6511 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); |
| 6509 | 6512 | ||
| @@ -6533,11 +6536,11 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6533 | goto OTHER; | 6536 | goto OTHER; |
| 6534 | 6537 | ||
| 6535 | case FocusIn: | 6538 | case FocusIn: |
| 6536 | x_detect_focus_change (dpyinfo, &event, &inev); | 6539 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6537 | goto OTHER; | 6540 | goto OTHER; |
| 6538 | 6541 | ||
| 6539 | case LeaveNotify: | 6542 | case LeaveNotify: |
| 6540 | x_detect_focus_change (dpyinfo, &event, &inev); | 6543 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6541 | 6544 | ||
| 6542 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); | 6545 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); |
| 6543 | if (f) | 6546 | if (f) |
| @@ -6560,7 +6563,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6560 | goto OTHER; | 6563 | goto OTHER; |
| 6561 | 6564 | ||
| 6562 | case FocusOut: | 6565 | case FocusOut: |
| 6563 | x_detect_focus_change (dpyinfo, &event, &inev); | 6566 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6564 | goto OTHER; | 6567 | goto OTHER; |
| 6565 | 6568 | ||
| 6566 | case MotionNotify: | 6569 | case MotionNotify: |
| @@ -6600,8 +6603,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6600 | && !EQ (window, last_window) | 6603 | && !EQ (window, last_window) |
| 6601 | && !EQ (window, selected_window)) | 6604 | && !EQ (window, selected_window)) |
| 6602 | { | 6605 | { |
| 6603 | inev.kind = SELECT_WINDOW_EVENT; | 6606 | inev.ie.kind = SELECT_WINDOW_EVENT; |
| 6604 | inev.frame_or_window = window; | 6607 | inev.ie.frame_or_window = window; |
| 6605 | } | 6608 | } |
| 6606 | 6609 | ||
| 6607 | last_window=window; | 6610 | last_window=window; |
| @@ -6760,13 +6763,13 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6760 | && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0) | 6763 | && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0) |
| 6761 | { | 6764 | { |
| 6762 | ignore_next_mouse_click_timeout = 0; | 6765 | ignore_next_mouse_click_timeout = 0; |
| 6763 | construct_mouse_click (&inev, &event, f); | 6766 | construct_mouse_click (&inev.ie, &event, f); |
| 6764 | } | 6767 | } |
| 6765 | if (event.type == ButtonRelease) | 6768 | if (event.type == ButtonRelease) |
| 6766 | ignore_next_mouse_click_timeout = 0; | 6769 | ignore_next_mouse_click_timeout = 0; |
| 6767 | } | 6770 | } |
| 6768 | else | 6771 | else |
| 6769 | construct_mouse_click (&inev, &event, f); | 6772 | construct_mouse_click (&inev.ie, &event, f); |
| 6770 | } | 6773 | } |
| 6771 | } | 6774 | } |
| 6772 | } | 6775 | } |
| @@ -6781,12 +6784,12 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6781 | scroll bars. */ | 6784 | scroll bars. */ |
| 6782 | if (bar && event.xbutton.state & ControlMask) | 6785 | if (bar && event.xbutton.state & ControlMask) |
| 6783 | { | 6786 | { |
| 6784 | x_scroll_bar_handle_click (bar, &event, &inev); | 6787 | x_scroll_bar_handle_click (bar, &event, &inev.ie); |
| 6785 | *finish = X_EVENT_DROP; | 6788 | *finish = X_EVENT_DROP; |
| 6786 | } | 6789 | } |
| 6787 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 6790 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| 6788 | if (bar) | 6791 | if (bar) |
| 6789 | x_scroll_bar_handle_click (bar, &event, &inev); | 6792 | x_scroll_bar_handle_click (bar, &event, &inev.ie); |
| 6790 | #endif /* not USE_TOOLKIT_SCROLL_BARS */ | 6793 | #endif /* not USE_TOOLKIT_SCROLL_BARS */ |
| 6791 | } | 6794 | } |
| 6792 | 6795 | ||
| @@ -6894,9 +6897,9 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6894 | } | 6897 | } |
| 6895 | 6898 | ||
| 6896 | done: | 6899 | done: |
| 6897 | if (inev.kind != NO_EVENT) | 6900 | if (inev.ie.kind != NO_EVENT) |
| 6898 | { | 6901 | { |
| 6899 | kbd_buffer_store_event_hold (&inev, hold_quit); | 6902 | kbd_buffer_store_event_hold (&inev.ie, hold_quit); |
| 6900 | count++; | 6903 | count++; |
| 6901 | } | 6904 | } |
| 6902 | 6905 | ||