aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2006-05-05 10:30:28 +0000
committerKaroly Lorentey2006-05-05 10:30:28 +0000
commitf6cf85ac95e469835a2643024f995b471a4c5d52 (patch)
treec6b094a9b60e6234ad97323789283f431fe02e26
parentc044516d384ff70e820686d4e995dcc23ee22e6f (diff)
parent54e573e6f6f76c59e958cc20840dc3b57e72ee0a (diff)
downloademacs-f6cf85ac95e469835a2643024f995b471a4c5d52.tar.gz
emacs-f6cf85ac95e469835a2643024f995b471a4c5d52.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-263 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-264 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-265 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/gnus--rel--5.10--patch-99 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-100 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-555
-rw-r--r--admin/FOR-RELEASE102
-rw-r--r--lisp/ChangeLog58
-rw-r--r--lisp/gnus/ChangeLog21
-rw-r--r--lisp/gnus/gnus-art.el61
-rw-r--r--lisp/gnus/mm-decode.el22
-rw-r--r--lisp/ibuffer.el9
-rw-r--r--lisp/isearch.el29
-rw-r--r--lisp/progmodes/gdb-ui.el8
-rw-r--r--lisp/progmodes/gud.el114
-rw-r--r--lisp/progmodes/perl-mode.el5
-rw-r--r--lisp/simple.el6
-rw-r--r--lisp/term.el2
-rw-r--r--man/ChangeLog28
-rw-r--r--man/cmdargs.texi2
-rw-r--r--man/commands.texi175
-rw-r--r--man/display.texi4
-rw-r--r--man/emacs.texi4
-rw-r--r--man/entering.texi115
-rw-r--r--man/files.texi97
-rw-r--r--man/killing.texi2
-rw-r--r--man/misc.texi83
-rw-r--r--man/screen.texi196
-rw-r--r--man/trouble.texi6
-rw-r--r--src/ChangeLog9
-rw-r--r--src/minibuf.c2
-rw-r--r--src/sound.c71
26 files changed, 606 insertions, 625 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index c641fbe106c..9fcdb57f250 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -23,8 +23,6 @@ face name prefixes should be in it for good results.
23 23
24** Ask maintainers of refcard translations to update them. 24** Ask maintainers of refcard translations to update them.
25 25
26** Check what should be deleted or updated in MORE.STUFF.
27
28** Send an email to the various distributions, including the GNOME 26** Send an email to the various distributions, including the GNOME
29and KDE projects, to use the new Emacs icons in etc/images/icons. 27and KDE projects, to use the new Emacs icons in etc/images/icons.
30 28
@@ -33,12 +31,15 @@ Assigned to Bill Wohler <wohler@newt.com>.
33 31
34* BUGS 32* BUGS
35 33
36** Stefan Monnier's March 20 bug report about 3d boxes in header line. 34** JD Smith's 17 Apr 2006 bug report that CVS operations
35get mysterious unreproducible failures.
36
37** David Hansen's bug report on 16 Apr 2006 about point-entered and
38point-left text properties.
37 39
38** Is there a basic problem with cl-byte-compile-compiler-macro? 40** Is there a basic problem with cl-byte-compile-compiler-macro?
39 41
40** Recalculate the tool bar height after changing the default font. 42** Cursor position display bug from Yamamoto Mistuharu, 11 Apr 2006.
41(Bug report by Yamamoto Mistuharu, 31 Mar 2006)
42 43
43** Markus Gritsch's report about Emacs looping on Windoze with the following 44** Markus Gritsch's report about Emacs looping on Windoze with the following
44.emacs file, and then reduce Emacs frame width to "something quite narrow": 45.emacs file, and then reduce Emacs frame width to "something quite narrow":
@@ -71,97 +72,6 @@ Lisp point of view.
71 72
72** Check man/info.texi. 73** Check man/info.texi.
73 74
74** Add missing years in copyright notices of all files.
75
76Please record your name here and say which part of the distribution
77you're going to handle.
78
79DIRECTORY STATUS IN CHARGE
80--------- ------ ---------
81etc (and subdirs) done Thien-Thi Nguyen (ttn(@gnu.org))
82leim done Kenichi Handa
83lib-src done ttn
84lisp done ttn
85lisp/calc done Jay Belanger
86lisp/calendar done Glenn Morris
87lisp/emacs-lisp done ttn
88lisp/emulation done ttn
89lisp/eshell done ttn
90lisp/gnus done Romain Francoise
91lisp/international done Kenichi Handa
92lisp/language done Kenichi Handa
93lisp/mail done ttn
94lisp/mh-e done Bill Wohler
95lisp/net done ttn
96lisp/obsolete done ttn
97lisp/play done Romain Francoise
98lisp/progmodes done Nick Roberts
99lisp/term done ttn
100lisp/textmodes done ttn
101lisp/url done ttn
102lispintro done ttn
103lispref done ttn
104lwlib done ttn
105m4 done ttn
106mac (and subdirs) done ttn
107man done ttn
108msdos done ttn
109nt (and subdirs) done ttn
110oldXMenu done ttn
111src (and subdirs) done ttn
112vms done ttn
113
114** Check the Emacs manual.
115
116Each manual section should be checked for factual correctness
117regarding recent changes by at least two people. After each file
118name, on the same line or the following line, come the names of the
119people who have checked it.
120
121SECTION READERS
122-----------------------------
123man/abbrevs.texi Chong Yidong Joakim Verona
124man/anti.texi Chong Yidong
125man/basic.texi "Luc Teirlinck" Chong Yidong
126man/buffers.texi "Luc Teirlinck" Chong Yidong
127man/building.texi "Ted Zlatanov" <tzz@lifelogs.com>
128man/calendar.texi joakim@verona.se Chong Yidong
129man/cmdargs.texi Chong Yidong "Luc Teirlinck"
130man/commands.texi "Luc Teirlinck" Chong Yidong
131man/custom.texi Chong Yidong "Luc Teirlinck"
132man/dired.texi Chong Yidong joakim@verona.se
133man/display.texi "Luc Teirlinck" Chong Yidong
134man/emacs.texi "Luc Teirlinck" Lute Kamstra
135man/entering.texi "Luc Teirlinck" Chong Yidong
136man/files.texi "Luc Teirlinck" Chong Yidong
137man/fixit.texi "Luc Teirlinck" Chong Yidong
138man/frames.texi "Luc Teirlinck" Chong Yidong
139man/glossary.texi Chong Yidong
140man/help.texi "Luc Teirlinck" Chong Yidong
141man/indent.texi "Luc Teirlinck" Chong Yidong
142man/killing.texi "Luc Teirlinck" Chong Yidong
143man/kmacro.texi "Luc Teirlinck" Chong Yidong
144man/macos.texi Chong Yidong
145man/maintaining.texi Chong Yidong
146man/major.texi "Luc Teirlinck" Chong Yidong
147man/mark.texi "Luc Teirlinck" Chong Yidong
148man/mini.texi "Luc Teirlinck" Chong Yidong
149man/misc.texi Chong Yidong
150man/msdog.texi Chong Yidong
151man/mule.texi "Luc Teirlinck" Kenichi Handa
152man/m-x.texi "Luc Teirlinck" Chong Yidong
153man/picture.texi Joakim Verona <joakim@verona.se> Chong Yidong
154man/programs.texi "Stephen Eglen" Chong Yidong
155man/regs.texi "Luc Teirlinck" Chong Yidong
156man/rmail.texi Chong Yidong "Luc Teirlinck"
157man/screen.texi "Luc Teirlinck" Chong Yidong
158man/search.texi "Luc Teirlinck" Chong Yidong
159man/sending.texi Chong Yidong "Luc Teirlinck"
160man/text.texi "Luc Teirlinck" Chong Yidong
161man/trouble.texi Chong Yidong
162man/windows.texi "Luc Teirlinck" Chong Yidong
163man/xresources.texi
164
165** Check the Emacs Lisp manual. 75** Check the Emacs Lisp manual.
166 76
167Each manual section should be checked for factual correctness 77Each manual section should be checked for factual correctness
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2a402f88c01..5c3c58767f7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,36 @@
12006-05-04 Karl Chen <quarl@NOSPAM.quarl.org>
2
3 * progmodes/perl-mode.el (perl-beginning-of-function):
4 Skip anonymous subs.
5
62006-05-04 Dan Nicolaescu <dann@ics.uci.edu>
7
8 * ibuffer.el (ibuffer-compressed-file-name-regexp): Avoid loading
9 regexp-opt at run time.
10
11 * term.el (term-handle-ansi-escape): Fix off by one error.
12
132006-05-04 Nick Roberts <nickrob@snap.net.nz>
14
15 * progmodes/gdb-ui.el (gdb-force-update): Delete variable...
16 (gdb-init-1, gdb-post-prompt): ...and references to it.
17 (gdb-frame-handler): Strip directory name from filename if present.
18
19 * progmodes/gud.el (gdb-force-update): Delete defvar
20 (gud-speedbar-buttons): ...and references to it. Use window-start
21 to try to keep positon in watch expression.
22
232006-05-03 Richard Stallman <rms@gnu.org>
24
25 * simple.el (next-history-element, previous-history-element): Doc fix.
26
27 * isearch.el (isearch-update-ring): Doc fix.
28
292006-05-03 Dan Nicolaescu <dann@ics.uci.edu>
30
31 * isearch.el (isearch-update-ring): Take history-delete-duplicates
32 into consideration. Replace one arm ifs with whens.
33
12006-05-03 Nick Roberts <nickrob@snap.net.nz> 342006-05-03 Nick Roberts <nickrob@snap.net.nz>
2 35
3 * progmodes/gdb-ui.el (gud-watch): Let user select an expression. 36 * progmodes/gdb-ui.el (gud-watch): Let user select an expression.
@@ -16,20 +49,17 @@
16 49
172006-05-02 Chong Yidong <cyd@mit.edu> 502006-05-02 Chong Yidong <cyd@mit.edu>
18 51
19 * msb.el (msb): If EVENT is a down event, read and discard the up 52 * msb.el (msb): If EVENT is a down event, read and discard the up event.
20 event.
21 53
222006-05-02 Reiner Steib <Reiner.Steib@gmx.de> 542006-05-02 Reiner Steib <Reiner.Steib@gmx.de>
23 55
24 * startup.el (command-line-1): Refer to Lisp manual when 56 * startup.el (command-line-1): Refer to Lisp manual when
25 pure-space-overflow occurs. 57 pure-space-overflow occurs.
26 58
27 * files.el (byte-compile-dynamic) 59 * files.el (byte-compile-dynamic, byte-compile-dynamic-docstrings)
28 (byte-compile-dynamic-docstrings, byte-compile-warnings) 60 (byte-compile-warnings, find-file-visit-truename, indent-tabs-mode)
29 (find-file-visit-truename, indent-tabs-mode, left-margin) 61 (left-margin, no-byte-compile, no-update-autoloads, truncate-lines)
30 (no-byte-compile no-update-autoloads, truncate-lines) 62 (version-control): Don't use `t' for safe-local-variable declarations.
31 (version-control): Don't use `t' for safe-local-variable
32 declarations.
33 63
342006-05-01 Richard Stallman <rms@gnu.org> 642006-05-01 Richard Stallman <rms@gnu.org>
35 65
@@ -63,10 +93,10 @@
63 Returning "/" only doesn't need to be necessary any longer. 93 Returning "/" only doesn't need to be necessary any longer.
64 (tramp-file-name-handler): Make special attention when in hostname 94 (tramp-file-name-handler): Make special attention when in hostname
65 completion mode. 95 completion mode.
66 (tramp-completion-file-name-handler): Revert patch from 2006-04-28. 96 (tramp-completion-file-name-handler): Revert patch from 2006-04-28.
67 (tramp-register-file-name-handlers): Register 97 (tramp-register-file-name-handlers):
68 `tramp-completion-file-name-handler' only when 98 Register `tramp-completion-file-name-handler' only when
69 `partial-completion-mode is enabled. 99 `partial-completion-mode' is enabled.
70 (tramp-completion-handle-file-name-all-completions): 100 (tramp-completion-handle-file-name-all-completions):
71 Delete directory part from results. 101 Delete directory part from results.
72 (tramp-get-completion-methods, tramp-get-completion-user-host): 102 (tramp-get-completion-methods, tramp-get-completion-user-host):
@@ -80,8 +110,8 @@
80 110
812006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 1112006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
82 112
83 * term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop): Use 113 * term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop):
84 select-frame-set-input-focus instead of raise-frame. 114 Use select-frame-set-input-focus instead of raise-frame.
85 (global-map): Bind M-drag-n-drop to mac-drag-n-drop. 115 (global-map): Bind M-drag-n-drop to mac-drag-n-drop.
86 116
872006-05-01 Nick Roberts <nickrob@snap.net.nz> 1172006-05-01 Nick Roberts <nickrob@snap.net.nz>
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index cecc180f522..7f0f248c7cf 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,24 @@
12006-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * mm-decode.el (mm-dissect-buffer): Remove spurious double assignment.
4 (mm-copy-to-buffer): Use with-current-buffer.
5 (mm-display-part): Simplify.
6 (mm-inlinable-p): Add optional arg `type'.
7
8 * gnus-art.el (gnus-mime-view-part-as-type): Add optional PRED
9 argument.
10 (gnus-mime-view-part-externally, gnus-mime-view-part-internally):
11 Try harder to show the attachment internally or externally using
12 gnus-mime-view-part-as-type.
13
142006-05-04 Reiner Steib <Reiner.Steib@gmx.de>
15
16 * gnus-art.el (gnus-mime-view-part-as-type-internal): Try to fetch
17 `filename' from Content-Disposition if Content-Type doesn't
18 provide `name'.
19 (gnus-mime-view-part-as-type): Set default instead of
20 initial-input.
21
12006-04-28 Katsumi Yamaoka <yamaoka@jpl.org> 222006-04-28 Katsumi Yamaoka <yamaoka@jpl.org>
2 23
3 * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made 24 * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 7e3b843d500..208103f805d 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -4317,21 +4317,29 @@ Deleting parts may malfunction or destroy the article; continue? ")
4317 4317
4318(defun gnus-mime-view-part-as-type-internal () 4318(defun gnus-mime-view-part-as-type-internal ()
4319 (gnus-article-check-buffer) 4319 (gnus-article-check-buffer)
4320 (let* ((name (mail-content-type-get 4320 (let* ((handle (get-text-property (point) 'gnus-data))
4321 (mm-handle-type (get-text-property (point) 'gnus-data)) 4321 (name (or
4322 'name)) 4322 ;; Content-Type: foo/bar; name=...
4323 (mail-content-type-get (mm-handle-type handle) 'name)
4324 ;; Content-Disposition: attachment; filename=...
4325 (cdr (assq 'filename (cdr (mm-handle-disposition handle))))))
4323 (def-type (and name (mm-default-file-encoding name)))) 4326 (def-type (and name (mm-default-file-encoding name))))
4324 (and def-type (cons def-type 0)))) 4327 (and def-type (cons def-type 0))))
4325 4328
4326(defun gnus-mime-view-part-as-type (&optional mime-type) 4329(defun gnus-mime-view-part-as-type (&optional mime-type pred)
4327 "Choose a MIME media type, and view the part as such." 4330 "Choose a MIME media type, and view the part as such.
4331If non-nil, PRED is a predicate to use during completion to limit the
4332available media-types."
4328 (interactive) 4333 (interactive)
4329 (unless mime-type 4334 (unless mime-type
4330 (setq mime-type (completing-read 4335 (setq mime-type
4331 "View as MIME type: " 4336 (let ((default (gnus-mime-view-part-as-type-internal)))
4332 (mapcar #'list (mailcap-mime-types)) 4337 (completing-read
4333 nil nil 4338 (format "View as MIME type (default %s): "
4334 (gnus-mime-view-part-as-type-internal)))) 4339 (car default))
4340 (mapcar #'list (mailcap-mime-types))
4341 pred nil nil nil
4342 (car default)))))
4335 (gnus-article-check-buffer) 4343 (gnus-article-check-buffer)
4336 (let ((handle (get-text-property (point) 'gnus-data))) 4344 (let ((handle (get-text-property (point) 'gnus-data)))
4337 (when handle 4345 (when handle
@@ -4511,12 +4519,18 @@ specified charset."
4511 (mm-inlined-types nil) 4519 (mm-inlined-types nil)
4512 (mail-parse-charset gnus-newsgroup-charset) 4520 (mail-parse-charset gnus-newsgroup-charset)
4513 (mail-parse-ignored-charsets 4521 (mail-parse-ignored-charsets
4514 (save-excursion (set-buffer gnus-summary-buffer) 4522 (with-current-buffer gnus-summary-buffer
4515 gnus-newsgroup-ignored-charsets))) 4523 gnus-newsgroup-ignored-charsets))
4516 (when handle 4524 (type (mm-handle-media-type handle))
4517 (if (mm-handle-undisplayer handle) 4525 (method (mailcap-mime-info type))
4518 (mm-remove-part handle) 4526 (mm-enable-external t))
4519 (mm-display-part handle))))) 4527 (if (not (stringp method))
4528 (gnus-mime-view-part-as-type
4529 nil (lambda (type) (stringp (mailcap-mime-info type))))
4530 (when handle
4531 (if (mm-handle-undisplayer handle)
4532 (mm-remove-part handle)
4533 (mm-display-part handle))))))
4520 4534
4521(defun gnus-mime-view-part-internally (&optional handle) 4535(defun gnus-mime-view-part-internally (&optional handle)
4522 "View the MIME part under point with an internal viewer. 4536 "View the MIME part under point with an internal viewer.
@@ -4528,13 +4542,16 @@ If no internal viewer is available, use an external viewer."
4528 (mm-inline-large-images t) 4542 (mm-inline-large-images t)
4529 (mail-parse-charset gnus-newsgroup-charset) 4543 (mail-parse-charset gnus-newsgroup-charset)
4530 (mail-parse-ignored-charsets 4544 (mail-parse-ignored-charsets
4531 (save-excursion (set-buffer gnus-summary-buffer) 4545 (with-current-buffer gnus-summary-buffer
4532 gnus-newsgroup-ignored-charsets)) 4546 gnus-newsgroup-ignored-charsets))
4533 (inhibit-read-only t)) 4547 (inhibit-read-only t))
4534 (when handle 4548 (if (not (mm-inlinable-p handle))
4535 (if (mm-handle-undisplayer handle) 4549 (gnus-mime-view-part-as-type
4536 (mm-remove-part handle) 4550 nil (lambda (type) (mm-inlinable-p handle type)))
4537 (mm-display-part handle))))) 4551 (when handle
4552 (if (mm-handle-undisplayer handle)
4553 (mm-remove-part handle)
4554 (mm-display-part handle))))))
4538 4555
4539(defun gnus-mime-action-on-part (&optional action) 4556(defun gnus-mime-action-on-part (&optional action)
4540 "Do something with the MIME attachment at \(point\)." 4557 "Do something with the MIME attachment at \(point\)."
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index b79e081f0e1..c5fd5d3c258 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -562,7 +562,7 @@ Postpone undisplaying of viewers for types in
562 description) 562 description)
563 (setq type (split-string (car ctl) "/")) 563 (setq type (split-string (car ctl) "/"))
564 (setq subtype (cadr type) 564 (setq subtype (cadr type)
565 type (pop type)) 565 type (car type))
566 (setq 566 (setq
567 result 567 result
568 (cond 568 (cond
@@ -641,16 +641,15 @@ Postpone undisplaying of viewers for types in
641 641
642(defun mm-copy-to-buffer () 642(defun mm-copy-to-buffer ()
643 "Copy the contents of the current buffer to a fresh buffer." 643 "Copy the contents of the current buffer to a fresh buffer."
644 (save-excursion
645 (let ((obuf (current-buffer)) 644 (let ((obuf (current-buffer))
646 beg) 645 beg)
647 (goto-char (point-min)) 646 (goto-char (point-min))
648 (search-forward-regexp "^\n" nil t) 647 (search-forward-regexp "^\n" nil t)
649 (setq beg (point)) 648 (setq beg (point))
650 (set-buffer 649 (with-current-buffer
651 ;; Preserve the data's unibyteness (for url-insert-file-contents). 650 ;; Preserve the data's unibyteness (for url-insert-file-contents).
652 (let ((default-enable-multibyte-characters (mm-multibyte-p))) 651 (let ((default-enable-multibyte-characters (mm-multibyte-p)))
653 (generate-new-buffer " *mm*"))) 652 (generate-new-buffer " *mm*"))
654 (insert-buffer-substring obuf beg) 653 (insert-buffer-substring obuf beg)
655 (current-buffer)))) 654 (current-buffer))))
656 655
@@ -701,7 +700,8 @@ external if displayed external."
701 (forward-line 1) 700 (forward-line 1)
702 (mm-insert-inline handle (mm-get-part handle)) 701 (mm-insert-inline handle (mm-get-part handle))
703 'inline) 702 'inline)
704 (if (and method ;; If nil, we always use "save". 703 (setq external
704 (and method ;; If nil, we always use "save".
705 (stringp method) ;; 'mailcap-save-binary-file 705 (stringp method) ;; 'mailcap-save-binary-file
706 (or (eq mm-enable-external t) 706 (or (eq mm-enable-external t)
707 (and (eq mm-enable-external 'ask) 707 (and (eq mm-enable-external 'ask)
@@ -714,9 +714,7 @@ external if displayed external."
714 (concat 714 (concat
715 " \"" (format method filename) "\"") 715 " \"" (format method filename) "\"")
716 "") 716 "")
717 "? "))))) 717 "? "))))))
718 (setq external t)
719 (setq external nil))
720 (if external 718 (if external
721 (mm-display-external 719 (mm-display-external
722 handle (or method 'mailcap-save-binary-file)) 720 handle (or method 'mailcap-save-binary-file))
@@ -1019,10 +1017,12 @@ external if displayed external."
1019 methods nil))) 1017 methods nil)))
1020 result)) 1018 result))
1021 1019
1022(defun mm-inlinable-p (handle) 1020(defun mm-inlinable-p (handle &optional type)
1023 "Say whether HANDLE can be displayed inline." 1021 "Say whether HANDLE can be displayed inline.
1022TYPE is the mime-type of the object; it defaults to the one given
1023in HANDLE."
1024 (unless type (setq type (mm-handle-media-type handle)))
1024 (let ((alist mm-inline-media-tests) 1025 (let ((alist mm-inline-media-tests)
1025 (type (mm-handle-media-type handle))
1026 test) 1026 test)
1027 (while alist 1027 (while alist
1028 (when (string-match (caar alist) type) 1028 (when (string-match (caar alist) type)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 0a84f9b0c82..4b1069b26c1 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -324,13 +324,14 @@ directory, like `default-directory'."
324 :type '(repeat function) 324 :type '(repeat function)
325 :group 'ibuffer) 325 :group 'ibuffer)
326 326
327(eval-when-compile
327(defcustom ibuffer-compressed-file-name-regexp 328(defcustom ibuffer-compressed-file-name-regexp
328 (concat "\\.\\(" 329 (concat "\\.\\("
329 (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z")) 330 (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z"))
330 "\\)$") 331 "\\)$")
331 "Regexp to match compressed file names." 332 "Regexp to match compressed file names."
332 :type 'regexp 333 :type 'regexp
333 :group 'ibuffer) 334 :group 'ibuffer))
334 335
335(defcustom ibuffer-hook nil 336(defcustom ibuffer-hook nil
336 "Hook run when `ibuffer' is called." 337 "Hook run when `ibuffer' is called."
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 13b54a02467..78b523f3845 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -830,21 +830,22 @@ NOPUSH is t and EDIT is t."
830 830
831(defun isearch-update-ring (string &optional regexp) 831(defun isearch-update-ring (string &optional regexp)
832 "Add STRING to the beginning of the search ring. 832 "Add STRING to the beginning of the search ring.
833REGEXP says which ring to use." 833REGEXP if non-nil says use the regexp search ring."
834 (if regexp 834 (if regexp
835 (if (or (null regexp-search-ring) 835 (when (or (null regexp-search-ring)
836 (not (string= string (car regexp-search-ring)))) 836 (not (string= string (car regexp-search-ring))))
837 (progn 837 (when history-delete-duplicates
838 (push string regexp-search-ring) 838 (setq regexp-search-ring (delete string regexp-search-ring)))
839 (if (> (length regexp-search-ring) regexp-search-ring-max) 839 (push string regexp-search-ring)
840 (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) 840 (when (> (length regexp-search-ring) regexp-search-ring-max)
841 nil)))) 841 (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) nil)))
842 (if (or (null search-ring) 842 (when (or (null search-ring)
843 (not (string= string (car search-ring)))) 843 (not (string= string (car search-ring))))
844 (progn 844 (when history-delete-duplicates
845 (push string search-ring) 845 (setq search-ring (delete string search-ring)))
846 (if (> (length search-ring) search-ring-max) 846 (push string search-ring)
847 (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))) 847 (when (> (length search-ring) search-ring-max)
848 (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))
848 849
849;; Switching buffers should first terminate isearch-mode. 850;; Switching buffers should first terminate isearch-mode.
850;; ;; For Emacs 19, the frame switch event is handled. 851;; ;; For Emacs 19, the frame switch event is handled.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 4b3202c6e41..28fcb70bb8b 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -114,8 +114,6 @@ Set to \"main\" at start if gdb-show-main is t.")
114Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP) 114Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP)
115where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame 115where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame
116address for root variables.") 116address for root variables.")
117(defvar gdb-force-update t
118 "Non-nil means that view of watch expressions will be updated in the speedbar.")
119(defvar gdb-main-file nil "Source file from which program execution begins.") 117(defvar gdb-main-file nil "Source file from which program execution begins.")
120(defvar gdb-overlay-arrow-position nil) 118(defvar gdb-overlay-arrow-position nil)
121(defvar gdb-server-prefix nil) 119(defvar gdb-server-prefix nil)
@@ -527,7 +525,6 @@ With arg, use separate IO iff arg is positive."
527 gdb-current-language nil 525 gdb-current-language nil
528 gdb-frame-number nil 526 gdb-frame-number nil
529 gdb-var-list nil 527 gdb-var-list nil
530 gdb-force-update t
531 gdb-main-file nil 528 gdb-main-file nil
532 gdb-first-post-prompt t 529 gdb-first-post-prompt t
533 gdb-prompting nil 530 gdb-prompting nil
@@ -1381,7 +1378,6 @@ happens to be appropriate."
1381 ;; FIXME: with GDB-6 on Darwin, this might very well work. 1378 ;; FIXME: with GDB-6 on Darwin, this might very well work.
1382 ;; Only needed/used with speedbar/watch expressions. 1379 ;; Only needed/used with speedbar/watch expressions.
1383 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 1380 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
1384 (setq gdb-force-update t)
1385 (if (string-equal gdb-version "pre-6.4") 1381 (if (string-equal gdb-version "pre-6.4")
1386 (gdb-var-update) 1382 (gdb-var-update)
1387 (gdb-var-update-1))))) 1383 (gdb-var-update-1)))))
@@ -3166,7 +3162,9 @@ BUFFER nil or omitted means use the current buffer."
3166 (if (and (match-string 3) gud-overlay-arrow-position) 3162 (if (and (match-string 3) gud-overlay-arrow-position)
3167 (let ((buffer (marker-buffer gud-overlay-arrow-position)) 3163 (let ((buffer (marker-buffer gud-overlay-arrow-position))
3168 (position (marker-position gud-overlay-arrow-position))) 3164 (position (marker-position gud-overlay-arrow-position)))
3169 (when (and buffer (string-equal (buffer-name buffer) (match-string 3))) 3165 (when (and buffer
3166 (string-equal (buffer-name buffer)
3167 (file-name-nondirectory (match-string 3))))
3170 (with-current-buffer buffer 3168 (with-current-buffer buffer
3171 (setq fringe-indicator-alist 3169 (setq fringe-indicator-alist
3172 (if (string-equal gdb-frame-number "0") 3170 (if (string-equal gdb-frame-number "0")
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 11259aa3965..5be88668353 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -49,7 +49,6 @@
49(defvar gdb-macro-info) 49(defvar gdb-macro-info)
50(defvar gdb-server-prefix) 50(defvar gdb-server-prefix)
51(defvar gdb-show-changed-values) 51(defvar gdb-show-changed-values)
52(defvar gdb-force-update)
53(defvar gdb-var-list) 52(defvar gdb-var-list)
54(defvar gdb-speedbar-auto-raise) 53(defvar gdb-speedbar-auto-raise)
55(defvar tool-bar-map) 54(defvar tool-bar-map)
@@ -442,37 +441,55 @@ required by the caller."
442 (buffer-name gud-comint-buffer)) 441 (buffer-name gud-comint-buffer))
443 (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) 442 (let* ((minor-mode (with-current-buffer buffer gud-minor-mode))
444 (window (get-buffer-window (current-buffer) 0)) 443 (window (get-buffer-window (current-buffer) 0))
444 (start (window-start window))
445 (p (window-point window))) 445 (p (window-point window)))
446 (cond 446 (cond
447 ((memq minor-mode '(gdbmi gdba)) 447 ((memq minor-mode '(gdbmi gdba))
448 (when (or gdb-force-update 448 (erase-buffer)
449 (not (save-excursion 449 (insert "Watch Expressions:\n")
450 (goto-char (point-min)) 450 (if gdb-speedbar-auto-raise
451 (looking-at "Watch Expressions:")))) 451 (raise-frame speedbar-frame))
452 (erase-buffer) 452 (let ((var-list gdb-var-list) parent)
453 (insert "Watch Expressions:\n") 453 (while var-list
454 (if gdb-speedbar-auto-raise 454 (let* (char (depth 0) (start 0) (var (car var-list))
455 (raise-frame speedbar-frame)) 455 (varnum (car var)) (expr (nth 1 var))
456 (let ((var-list gdb-var-list) parent) 456 (type (nth 3 var)) (value (nth 4 var))
457 (while var-list 457 (status (nth 5 var)))
458 (let* (char (depth 0) (start 0) (var (car var-list)) 458 (put-text-property
459 (varnum (car var)) (expr (nth 1 var)) 459 0 (length expr) 'face font-lock-variable-name-face expr)
460 (type (nth 3 var)) (value (nth 4 var)) 460 (put-text-property
461 (status (nth 5 var))) 461 0 (length type) 'face font-lock-type-face type)
462 (put-text-property 462 (while (string-match "\\." varnum start)
463 0 (length expr) 'face font-lock-variable-name-face expr) 463 (setq depth (1+ depth)
464 (put-text-property 464 start (1+ (match-beginning 0))))
465 0 (length type) 'face font-lock-type-face type) 465 (if (eq depth 0) (setq parent nil))
466 (while (string-match "\\." varnum start) 466 (if (or (equal (nth 2 var) "0")
467 (setq depth (1+ depth) 467 (and (equal (nth 2 var) "1")
468 start (1+ (match-beginning 0)))) 468 (string-match "char \\*$" type)))
469 (if (eq depth 0) (setq parent nil)) 469 (speedbar-make-tag-line
470 (if (or (equal (nth 2 var) "0") 470 'bracket ?? nil nil
471 (and (equal (nth 2 var) "1") 471 (concat expr "\t" value)
472 (string-match "char \\*$" type))) 472 (if (or parent (eq status 'out-of-scope))
473 nil 'gdb-edit-value)
474 nil
475 (if gdb-show-changed-values
476 (or parent (case status
477 (changed 'font-lock-warning-face)
478 (out-of-scope 'shadow)
479 (t t)))
480 t)
481 depth)
482 (if (eq status 'out-of-scope) (setq parent 'shadow))
483 (if (and (nth 1 var-list)
484 (string-match (concat varnum "\\.")
485 (car (nth 1 var-list))))
486 (setq char ?-)
487 (setq char ?+))
488 (if (string-match "\\*$" type)
473 (speedbar-make-tag-line 489 (speedbar-make-tag-line
474 'bracket ?? nil nil 490 'bracket char
475 (concat expr "\t" value) 491 'gdb-speedbar-expand-node varnum
492 (concat expr "\t" type "\t" value)
476 (if (or parent (eq status 'out-of-scope)) 493 (if (or parent (eq status 'out-of-scope))
477 nil 'gdb-edit-value) 494 nil 'gdb-edit-value)
478 nil 495 nil
@@ -483,37 +500,15 @@ required by the caller."
483 (t t))) 500 (t t)))
484 t) 501 t)
485 depth) 502 depth)
486 (if (eq status 'out-of-scope) (setq parent 'shadow)) 503 (speedbar-make-tag-line
487 (if (and (nth 1 var-list) 504 'bracket char
488 (string-match (concat varnum "\\.") 505 'gdb-speedbar-expand-node varnum
489 (car (nth 1 var-list)))) 506 (concat expr "\t" type)
490 (setq char ?-) 507 nil nil
491 (setq char ?+)) 508 (if (and (or parent status) gdb-show-changed-values)
492 (if (string-match "\\*$" type) 509 'shadow t)
493 (speedbar-make-tag-line 510 depth))))
494 'bracket char 511 (setq var-list (cdr var-list)))))
495 'gdb-speedbar-expand-node varnum
496 (concat expr "\t" type "\t" value)
497 (if (or parent (eq status 'out-of-scope))
498 nil 'gdb-edit-value)
499 nil
500 (if gdb-show-changed-values
501 (or parent (case status
502 (changed 'font-lock-warning-face)
503 (out-of-scope 'shadow)
504 (t t)))
505 t)
506 depth)
507 (speedbar-make-tag-line
508 'bracket char
509 'gdb-speedbar-expand-node varnum
510 (concat expr "\t" type)
511 nil nil
512 (if (and (or parent status) gdb-show-changed-values)
513 'shadow t)
514 depth))))
515 (setq var-list (cdr var-list))))
516 (setq gdb-force-update nil)))
517 (t (unless (and (save-excursion 512 (t (unless (and (save-excursion
518 (goto-char (point-min)) 513 (goto-char (point-min))
519 (looking-at "Current Stack:")) 514 (looking-at "Current Stack:"))
@@ -544,6 +539,7 @@ required by the caller."
544 (t (error "Should never be here"))) 539 (t (error "Should never be here")))
545 frame t)))) 540 frame t))))
546 (setq gud-last-speedbar-stackframe gud-last-last-frame)))) 541 (setq gud-last-speedbar-stackframe gud-last-last-frame))))
542 (set-window-start window start)
547 (set-window-point window p)))) 543 (set-window-point window p))))
548 544
549 545
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index e92bb1053a6..950e0cba06f 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -923,8 +923,9 @@ Returns new value of point in all cases."
923 (or arg (setq arg 1)) 923 (or arg (setq arg 1))
924 (if (< arg 0) (forward-char 1)) 924 (if (< arg 0) (forward-char 1))
925 (and (/= arg 0) 925 (and (/= arg 0)
926 (re-search-backward "^\\s(\\|^\\s-*sub\\b[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\." 926 (re-search-backward
927 nil 'move arg) 927 "^\\s(\\|^\\s-*sub\\b[ \t\n]*\\_<[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\."
928 nil 'move arg)
928 (goto-char (1- (match-end 0)))) 929 (goto-char (1- (match-end 0))))
929 (point)) 930 (point))
930 931
diff --git a/lisp/simple.el b/lisp/simple.el
index bf620c2533d..bd8a9d1a284 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1269,7 +1269,8 @@ makes the search case-sensitive."
1269(defvar minibuffer-temporary-goal-position nil) 1269(defvar minibuffer-temporary-goal-position nil)
1270 1270
1271(defun next-history-element (n) 1271(defun next-history-element (n)
1272 "Insert the next element of the minibuffer history into the minibuffer." 1272 "Puts next element of the minibuffer history in the minibuffer.
1273With argument N, it uses the Nth following element."
1273 (interactive "p") 1274 (interactive "p")
1274 (or (zerop n) 1275 (or (zerop n)
1275 (let ((narg (- minibuffer-history-position n)) 1276 (let ((narg (- minibuffer-history-position n))
@@ -1312,7 +1313,8 @@ makes the search case-sensitive."
1312 (goto-char (or minibuffer-temporary-goal-position (point-max)))))) 1313 (goto-char (or minibuffer-temporary-goal-position (point-max))))))
1313 1314
1314(defun previous-history-element (n) 1315(defun previous-history-element (n)
1315 "Inserts the previous element of the minibuffer history into the minibuffer." 1316 "Puts previous element of the minibuffer history in the minibuffer.
1317With argument N, it uses the Nth previous element."
1316 (interactive "p") 1318 (interactive "p")
1317 (next-history-element (- n))) 1319 (next-history-element (- n)))
1318 1320
diff --git a/lisp/term.el b/lisp/term.el
index be4aefaba72..a03970a368b 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3320,7 +3320,7 @@ See `term-prompt-regexp'."
3320 ((eq char ?r) 3320 ((eq char ?r)
3321 (term-set-scroll-region 3321 (term-set-scroll-region
3322 (1- term-terminal-previous-parameter) 3322 (1- term-terminal-previous-parameter)
3323 term-terminal-parameter)) 3323 (1- term-terminal-parameter)))
3324 (t))) 3324 (t)))
3325 3325
3326(defun term-set-scroll-region (top bottom) 3326(defun term-set-scroll-region (top bottom)
diff --git a/man/ChangeLog b/man/ChangeLog
index bd48e3f4f20..3e220fa5f4c 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,31 @@
12006-05-03 Richard Stallman <rms@gnu.org>
2
3 * files.texi (Diff Mode): Node moved here.
4 (Comparing Files): Delete what duplicates new node.
5 (Files): Put Diff Mode in menu.
6
7 * misc.texi (Diff Mode): Moved to files.texi.
8
9 * emacs.texi (Top): Update menu for Diff Mode.
10
11 * trouble.texi (Emergency Escape): Simplify.
12
13 * emacs.texi (Top): Minor clarification.
14
152006-05-03 Teodor Zlatanov <tzz@lifelogs.com>
16
17 * commands.texi, entering.texi, screen.texi: Many simplifications.
18
192006-05-03 Richard Stallman <rms@gnu.org>
20
21 * commands.texi (Text Characters): Delete paragraph about unibyte
22 non-ASCII printing chars.
23
24 * killing.texi (Killing): Say "graphical displays".
25 * display.texi: Say "graphical displays".
26
27 * cmdargs.texi (Misc X): Say "graphical displays".
28
12006-05-01 Richard Stallman <rms@gnu.org> 292006-05-01 Richard Stallman <rms@gnu.org>
2 30
3 * emacs.texi (Top): Add Diff Mode to menu. 31 * emacs.texi (Top): Add Diff Mode to menu.
diff --git a/man/cmdargs.texi b/man/cmdargs.texi
index f1e7c539f76..a674473c91e 100644
--- a/man/cmdargs.texi
+++ b/man/cmdargs.texi
@@ -1227,7 +1227,7 @@ Specify @var{pixels} as additional space to put between lines, in pixels.
1227@itemx --no-blinking-cursor 1227@itemx --no-blinking-cursor
1228@opindex --no-blinking-cursor 1228@opindex --no-blinking-cursor
1229@cindex blinking cursor disable, command-line argument 1229@cindex blinking cursor disable, command-line argument
1230Disable the blinking cursor on graphical terminals. 1230Disable the blinking cursor on graphical displays.
1231 1231
1232@item -D 1232@item -D
1233@opindex -D 1233@opindex -D
diff --git a/man/commands.texi b/man/commands.texi
index eba539c15b7..f798b92f829 100644
--- a/man/commands.texi
+++ b/man/commands.texi
@@ -6,9 +6,9 @@
6@chapter Characters, Keys and Commands 6@chapter Characters, Keys and Commands
7 7
8 This chapter explains the character sets used by Emacs for input 8 This chapter explains the character sets used by Emacs for input
9commands and for the contents of files, and also explains the concepts 9commands and for the contents of files, and the fundamental concepts of
10of @dfn{keys} and @dfn{commands}, which are fundamental for understanding 10@dfn{keys} and @dfn{commands}, whereby Emacs interprets your keyboard
11how Emacs interprets your keyboard and mouse input. 11and mouse input.
12@end iftex 12@end iftex
13 13
14@ifnottex 14@ifnottex
@@ -35,11 +35,11 @@ control characters, such as @kbd{Control-a} (usually written @kbd{C-a}
35for short). @kbd{C-a} gets its name from the fact that you type it by 35for short). @kbd{C-a} gets its name from the fact that you type it by
36holding down the @key{CTRL} key while pressing @kbd{a}. 36holding down the @key{CTRL} key while pressing @kbd{a}.
37 37
38 Some @acronym{ASCII} control characters have special names, and most terminals 38 Some @acronym{ASCII} control characters have special names, and most
39have special keys you can type them with: for example, @key{RET}, 39terminals have special keys you can type them with: for example,
40@key{TAB}, @key{DEL} and @key{ESC}. The space character is usually 40@key{RET}, @key{TAB}, @key{DEL} and @key{ESC}. The space character is
41referred to below as @key{SPC}, even though strictly speaking it is a 41usually known as @key{SPC}, even though strictly speaking it is a
42graphic character whose graphic happens to be blank. 42graphic character that is blank.
43 43
44 Emacs extends the @acronym{ASCII} character set with thousands more printing 44 Emacs extends the @acronym{ASCII} character set with thousands more printing
45characters (@pxref{International}), additional control characters, and a 45characters (@pxref{International}), additional control characters, and a
@@ -51,11 +51,11 @@ addition, the shift key is meaningless with control characters:
51@kbd{C-a} and @kbd{C-A} are the same character, and Emacs cannot 51@kbd{C-a} and @kbd{C-A} are the same character, and Emacs cannot
52distinguish them. 52distinguish them.
53 53
54 But the Emacs character set has room for control variants of all 54 The Emacs character set has room for control variants of all
55printing characters, and for distinguishing between @kbd{C-a} and 55printing characters, and distinguishes @kbd{C-A} from @kbd{C-a}.
56@kbd{C-A}. Graphical terminals make it possible to enter all these 56Graphical terminals make it possible to enter all these characters.
57characters. For example, @kbd{C--} (that's Control-Minus) and 57For example, @kbd{C--} (that's Control-Minus) and @kbd{C-5} are
58@kbd{C-5} are meaningful Emacs commands on a graphical terminal. 58meaningful Emacs commands on a graphical terminal.
59 59
60 Another Emacs character-set extension is additional modifier bits. 60 Another Emacs character-set extension is additional modifier bits.
61Only one modifier bit is commonly used; it is called Meta. Every 61Only one modifier bit is commonly used; it is called Meta. Every
@@ -106,10 +106,10 @@ two modifiers by using @kbd{C-x @@} twice for the same character,
106because the first one goes to work on the @kbd{C-x}.) 106because the first one goes to work on the @kbd{C-x}.)
107 107
108 Keyboard input includes keyboard keys that are not characters at 108 Keyboard input includes keyboard keys that are not characters at
109all: for example function keys and arrow keys. Mouse buttons are also 109all, such as function keys and arrow keys. Mouse buttons are also not
110outside the gamut of characters. However, you can modify these events 110characters. However, you can modify these events with the modifier
111with the modifier keys @key{CTRL}, @key{META}, @key{SUPER}, 111keys @key{CTRL}, @key{META}, @key{SUPER}, @key{HYPER} and @key{ALT},
112@key{HYPER} and @key{ALT}, just as you can modify keyboard characters. 112just like keyboard characters.
113 113
114@cindex input event 114@cindex input event
115 Input characters and non-character inputs are collectively called 115 Input characters and non-character inputs are collectively called
@@ -121,7 +121,7 @@ some characters or non-character events, see @ref{Customization}.
121 @acronym{ASCII} terminals cannot really send anything to the computer except 121 @acronym{ASCII} terminals cannot really send anything to the computer except
122@acronym{ASCII} characters. These terminals use a sequence of characters to 122@acronym{ASCII} characters. These terminals use a sequence of characters to
123represent each function key. But that is invisible to the Emacs user, 123represent each function key. But that is invisible to the Emacs user,
124because the keyboard input routines recognize these special sequences 124because the keyboard input routines catch these special sequences
125and convert them to function key events before any other part of Emacs 125and convert them to function key events before any other part of Emacs
126gets to see them. 126gets to see them.
127 127
@@ -131,9 +131,9 @@ gets to see them.
131@cindex key sequence 131@cindex key sequence
132@cindex key 132@cindex key
133 A @dfn{key sequence} (@dfn{key}, for short) is a sequence of input 133 A @dfn{key sequence} (@dfn{key}, for short) is a sequence of input
134events that are meaningful as a unit---as ``a single command.'' Some 134events that is meaningful as a unit---a ``single command.'' Some
135Emacs command sequences are just one character or one event; for 135Emacs command sequences are invoked by just one character or one
136example, just @kbd{C-f} is enough to move forward one character in the 136event; for example, just @kbd{C-f} moves forward one character in the
137buffer. But Emacs also has commands that take two or more events to 137buffer. But Emacs also has commands that take two or more events to
138invoke. 138invoke.
139 139
@@ -158,33 +158,33 @@ r}, are themselves prefix keys that lead to three-event key
158sequences. There's no limit to the length of a key sequence, but in 158sequences. There's no limit to the length of a key sequence, but in
159practice people rarely use sequences longer than four events. 159practice people rarely use sequences longer than four events.
160 160
161 By contrast, you can't add more events onto a complete key. For 161 You can't add input events onto a complete key. For example, the
162example, the two-event sequence @kbd{C-f C-k} is not a key, because 162two-event sequence @kbd{C-f C-k} is not a key, because the @kbd{C-f}
163the @kbd{C-f} is a complete key in itself. It's impossible to give 163is a complete key in itself. It's impossible to give @kbd{C-f C-k} an
164@kbd{C-f C-k} an independent meaning as a command. @kbd{C-f C-k} is two 164independent meaning as a command. @kbd{C-f C-k} is two key sequences,
165key sequences, not one.@refill 165not one.@refill
166 166
167 All told, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h}, 167 All told, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h},
168@kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x 168@kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x
169n}, @w{@kbd{C-x r}}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x 169n}, @w{@kbd{C-x r}}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x
1706}, @key{ESC}, @kbd{M-g}, and @kbd{M-o}. (@key{F1} and @key{F2} are 1706}, @key{ESC}, @kbd{M-g}, and @kbd{M-o}. (@key{F1} and @key{F2} are
171aliases for @kbd{C-h} and @kbd{C-x 6}.) But this list is not cast in 171aliases for @kbd{C-h} and @kbd{C-x 6}.) This list is not cast in stone;
172concrete; it is just a matter of Emacs's standard key bindings. If 172it describes the standard key bindings. If you customize Emacs, you can make
173you customize Emacs, you can make new prefix keys, or eliminate some 173new prefix keys, or eliminate some of the standard ones (not
174of the standard ones. @xref{Key Bindings}. 174recommended for most users). @xref{Key Bindings}.
175 175
176 If you do make or eliminate prefix keys, that changes the set of 176 If you make or eliminate prefix keys, that changes the set of
177possible key sequences. For example, if you redefine @kbd{C-f} as a 177possible key sequences. For example, if you redefine @kbd{C-f} as a
178prefix, @kbd{C-f C-k} automatically becomes a key (complete, unless you 178prefix, @kbd{C-f C-k} automatically becomes a key (complete, unless
179define that too as a prefix). Conversely, if you remove the prefix 179you define that too as a prefix). Conversely, if you remove the
180definition of @kbd{C-x 4}, then @kbd{C-x 4 f} (or @kbd{C-x 4 180prefix definition of @kbd{C-x 4}, then @kbd{C-x 4 f} and @kbd{C-x 4
181@var{anything}}) is no longer a key. 181@var{anything}} are no longer keys.
182 182
183 Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key 183 Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key
184displays a list of the commands starting with that prefix. There are 184displays a list of the commands starting with that prefix. There are
185a few prefix keys for which @kbd{C-h} does not work---for historical 185a few prefix keys after which @kbd{C-h} does not work---for historical
186reasons, they define other meanings for @kbd{C-h} which are painful to 186reasons, they define other meanings for @kbd{C-h} which are painful to
187change. But @key{F1} should work for all prefix keys. 187change. @key{F1} works after all prefix keys.
188 188
189@node Commands, Text Characters, Keys, Top 189@node Commands, Text Characters, Keys, Top
190@section Keys and Commands 190@section Keys and Commands
@@ -197,61 +197,65 @@ do. But Emacs does not assign meanings to keys directly. Instead,
197Emacs assigns meanings to named @dfn{commands}, and then gives keys 197Emacs assigns meanings to named @dfn{commands}, and then gives keys
198their meanings by @dfn{binding} them to commands. 198their meanings by @dfn{binding} them to commands.
199 199
200 Every command has a name chosen by a programmer. The name is usually 200 Every command has a name chosen by a programmer. The name is
201made of a few English words separated by dashes; for example, 201usually made of a few English words separated by dashes; for example,
202@code{next-line} or @code{forward-word}. A command also has a 202@code{next-line} or @code{forward-word}. A command also has a
203@dfn{function definition} which is a Lisp program; this is what makes 203@dfn{function definition} which is a Lisp program; this is how the
204the command do what it does. In Emacs Lisp, a command is actually a 204command does its work. In Emacs Lisp, a command is a Lisp function with
205special kind of Lisp function; one which specifies how to read arguments 205special options to read arguments and for interactive use. For more
206for it and call it interactively. For more information on commands and 206information on commands and functions, see @ref{What Is a Function,,
207functions, see @ref{What Is a Function,, What Is a Function, elisp, The 207What Is a Function, elisp, The Emacs Lisp Reference Manual}. (The
208Emacs Lisp Reference Manual}. (The definition we use in this manual is 208definition here is simplified slightly.)
209simplified slightly.)
210 209
211 The bindings between keys and commands are recorded in various tables 210 The bindings between keys and commands are recorded in tables called
212called @dfn{keymaps}. @xref{Keymaps}. 211@dfn{keymaps}. @xref{Keymaps}.
213 212
214 When we say that ``@kbd{C-n} moves down vertically one line'' we are 213 When we say that ``@kbd{C-n} moves down vertically one line'' we are
215glossing over a distinction that is irrelevant in ordinary use but is vital 214glossing over a subtle distinction that is irrelevant in ordinary use,
216in understanding how to customize Emacs. It is the command 215but vital for Emacs customization. The command @code{next-line} does
217@code{next-line} that is programmed to move down vertically. @kbd{C-n} has 216a vertical move downward. @kbd{C-n} has this effect @emph{because} it
218this effect @emph{because} it is bound to that command. If you rebind 217is bound to @code{next-line}. If you rebind @kbd{C-n} to the command
219@kbd{C-n} to the command @code{forward-word} then @kbd{C-n} will move 218@code{forward-word}, @kbd{C-n} will move forward one word instead.
220forward by words instead. Rebinding keys is a common method of 219Rebinding keys is an important method of customization.
221customization.@refill
222 220
223 In the rest of this manual, we usually ignore this distinction to 221 In the rest of this manual, we usually ignore this distinction to
224keep things simple. We will often speak of keys like @kbd{C-n} as 222keep things simple. We will often speak of keys like @kbd{C-n} as
225commands, even though strictly speaking a key is bound to some 223commands, even though strictly speaking the key is bound to a command.
226command. To give the information needed for customization, we state 224Usually we state the name of the command which really does the work in
227the name of the command which really does the work in parentheses 225parentheses after mentioning the key that runs it. For example, we
228after mentioning the key that runs it. For example, we will say that 226will say that ``The command @kbd{C-n} (@code{next-line}) moves point
229``The command @kbd{C-n} (@code{next-line}) moves point vertically 227vertically down,'' meaning that the command @code{next-line} moves
230down,'' meaning that @code{next-line} is a command that moves 228vertically down, and the key @kbd{C-n} is normally bound to it.
231vertically down, and @kbd{C-n} is a key that is normally bound to it. 229
232 230 Since we are discussing customization, we should tell you about
233 While we are on the subject of information for customization only, 231@dfn{variables}. Often the description of a command will say, ``To
234it's a good time to tell you about @dfn{variables}. Often the 232change this, set the variable @code{mumble-foo}.'' A variable is a
235description of a command will say, ``To change this, set the variable 233name used to store a value. Most of the variables documented in this
236@code{mumble-foo}.'' A variable is a name used to remember a value. 234manual are meant for customization: some command or other part of
237Most of the variables documented in this manual exist just to facilitate 235Emacs examines the variable and behaves differently according to the
238customization: some command or other part of Emacs examines the variable 236value that you set. You can ignore the information about variables
239and behaves differently according to the value that you set. Until you 237until you are interested in customizing them. Then read the basic
240are interested in customizing, you can ignore the information about 238information on variables (@pxref{Variables}) and the information about
241variables. When you are ready to be interested, read the basic 239specific variables will make sense.
242information on variables, and then the information on individual
243variables will make sense. @xref{Variables}.
244 240
245@node Text Characters, Entering Emacs, Commands, Top 241@node Text Characters, Entering Emacs, Commands, Top
246@section Character Set for Text 242@section Character Set for Text
247@cindex characters (in text) 243@cindex characters (in text)
248 244
249 Text in Emacs buffers is a sequence of 8-bit bytes. Each byte can 245 Text in Emacs buffers is a sequence of characters. In the simplest
250hold a single @acronym{ASCII} character. Both @acronym{ASCII} control characters (octal 246case, these are @acronym{ASCII} characters, each stored in one 8-bit
251codes 000 through 037, and 0177) and @acronym{ASCII} printing characters (codes 247byte. Both @acronym{ASCII} control characters (octal codes 000
252040 through 0176) are allowed; however, non-@acronym{ASCII} control characters 248through 037, and 0177) and @acronym{ASCII} printing characters (codes
253cannot appear in a buffer. The other modifier flags used in keyboard 249040 through 0176) are allowed. The other modifier flags used in
254input, such as Meta, are not allowed in buffers either. 250keyboard input, such as Meta, are not allowed in buffers.
251
252 Non-@acronym{ASCII} printing characters can also appear in buffers,
253when multibyte characters are enabled. They have character codes
254starting at 256, octal 0400, and each one is represented as a sequence
255of two or more bytes. @xref{International}. Single-byte characters
256with codes 128 through 255 can also appear in multibyte buffers.
257However, non-@acronym{ASCII} control characters cannot appear in a
258buffer.
255 259
256 Some @acronym{ASCII} control characters serve special purposes in text, and have 260 Some @acronym{ASCII} control characters serve special purposes in text, and have
257special names. For example, the newline character (octal code 012) is 261special names. For example, the newline character (octal code 012) is
@@ -259,16 +263,9 @@ used in the buffer to end a line, and the tab character (octal code 011)
259is used for indenting to the next tab stop column (normally every 8 263is used for indenting to the next tab stop column (normally every 8
260columns). @xref{Text Display}. 264columns). @xref{Text Display}.
261 265
262 Non-@acronym{ASCII} printing characters can also appear in buffers. When
263multibyte characters are enabled, you can use any of the non-@acronym{ASCII}
264printing characters that Emacs supports. They have character codes
265starting at 256, octal 0400, and each one is represented as a sequence
266of two or more bytes. @xref{International}. Single-byte characters
267with codes 128 through 255 can also appear in multibyte buffers.
268
269 If you disable multibyte characters, then you can use only one 266 If you disable multibyte characters, then you can use only one
270alphabet of non-@acronym{ASCII} characters, but they all fit in one byte. They 267alphabet of non-@acronym{ASCII} characters, which all fit in one byte.
271use codes 0200 through 0377. @xref{Unibyte Mode}. 268They use octal codes 0200 through 0377. @xref{Unibyte Mode}.
272 269
273@ifnottex 270@ifnottex
274@lowersections 271@lowersections
diff --git a/man/display.texi b/man/display.texi
index 83b5ae48554..3f6fd58b125 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -1026,7 +1026,7 @@ elisp, The Emacs Lisp Reference Manual}.
1026@cindex cursor, blinking 1026@cindex cursor, blinking
1027 You can customize the cursor's color, and whether it blinks, using 1027 You can customize the cursor's color, and whether it blinks, using
1028the @code{cursor} Custom group (@pxref{Easy Customization}). On 1028the @code{cursor} Custom group (@pxref{Easy Customization}). On
1029graphical terminals, the command @kbd{M-x blink-cursor-mode} enables 1029a graphical display, the command @kbd{M-x blink-cursor-mode} enables
1030or disables the blinking of the cursor. (On text terminals, the 1030or disables the blinking of the cursor. (On text terminals, the
1031terminal itself blinks the cursor, and Emacs has no control over it.) 1031terminal itself blinks the cursor, and Emacs has no control over it.)
1032You can control how the cursor appears when it blinks off by setting 1032You can control how the cursor appears when it blinks off by setting
@@ -1050,7 +1050,7 @@ it a @code{nil} value.
1050 1050
1051@vindex x-stretch-cursor 1051@vindex x-stretch-cursor
1052@cindex wide block cursor 1052@cindex wide block cursor
1053 On graphical terminals, Emacs can optionally draw the block cursor 1053 On graphical displays, Emacs can optionally draw the block cursor
1054as wide as the character under the cursor---for example, if the cursor 1054as wide as the character under the cursor---for example, if the cursor
1055is on a tab character, it would cover the full width occupied by that 1055is on a tab character, it would cover the full width occupied by that
1056tab character. To enable this feature, set the variable 1056tab character. To enable this feature, set the variable
diff --git a/man/emacs.texi b/man/emacs.texi
index c30bcb93954..95f7d5ad9ed 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -197,7 +197,6 @@ Advanced Features
197* Sorting:: Sorting lines, paragraphs or pages within Emacs. 197* Sorting:: Sorting lines, paragraphs or pages within Emacs.
198* Narrowing:: Restricting display and editing to a portion 198* Narrowing:: Restricting display and editing to a portion
199 of the buffer. 199 of the buffer.
200* Diff Mode:: Editing diff output.
201* Two-Column:: Splitting apart columns to edit them 200* Two-Column:: Splitting apart columns to edit them
202 in side-by-side windows. 201 in side-by-side windows.
203* Editing Binary Files::Using Hexl mode to edit binary files. 202* Editing Binary Files::Using Hexl mode to edit binary files.
@@ -373,6 +372,7 @@ File Handling
373* Version Control:: Version control systems (RCS, CVS and SCCS). 372* Version Control:: Version control systems (RCS, CVS and SCCS).
374* Directories:: Creating, deleting, and listing file directories. 373* Directories:: Creating, deleting, and listing file directories.
375* Comparing Files:: Finding where two files differ. 374* Comparing Files:: Finding where two files differ.
375* Diff Mode:: Editing diff output.
376* Misc File Ops:: Other things you can do on files. 376* Misc File Ops:: Other things you can do on files.
377* Compressed Files:: Accessing compressed files. 377* Compressed Files:: Accessing compressed files.
378* File Archives:: Operating on tar, zip, jar etc. archive files. 378* File Archives:: Operating on tar, zip, jar etc. archive files.
@@ -873,7 +873,7 @@ programmer, but if you are not interested in customizing, you can
873ignore the customization hints. 873ignore the customization hints.
874 874
875 This is primarily a reference manual, but can also be used as a 875 This is primarily a reference manual, but can also be used as a
876primer. If you are a complete beginner, we recommend you start with 876primer. If you are new to Emacs, we recommend you start with
877the on-line, learn-by-doing tutorial, before reading the manual. To 877the on-line, learn-by-doing tutorial, before reading the manual. To
878run the tutorial, start Emacs and type @kbd{C-h t}. The tutorial 878run the tutorial, start Emacs and type @kbd{C-h t}. The tutorial
879describes commands, tells you when to try them, and explains the 879describes commands, tells you when to try them, and explains the
diff --git a/man/entering.texi b/man/entering.texi
index 6a9ac0e8347..bef6a5a4db0 100644
--- a/man/entering.texi
+++ b/man/entering.texi
@@ -8,58 +8,54 @@
8@cindex starting Emacs 8@cindex starting Emacs
9 9
10 The usual way to invoke Emacs is with the shell command 10 The usual way to invoke Emacs is with the shell command
11@command{emacs}. Emacs clears the screen and then displays an initial 11@command{emacs}. Emacs clears the screen, then displays an initial
12help message and copyright notice. Some operating systems discard all 12help message and copyright notice. Some operating systems discard
13type-ahead when Emacs starts up; they give Emacs no way to prevent 13your type-ahead when Emacs starts up; they give Emacs no way to
14this. If you ever use those systems, learn the habit of waiting for 14prevent this. On those systems, wait for Emacs to clear the screen
15Emacs to clear the screen before typing your first editing command. 15before you start typing.
16 16
17 If you run Emacs from a shell window under the X Window System, run it 17 From a shell window under the X Window System, run Emacs in the
18in the background with @command{emacs&}. This way, Emacs does not tie up 18background with @command{emacs&}. This way, Emacs won't tie up the
19the shell window, so you can use that to run other shell commands while 19shell window, so you can use it to run other shell commands while
20Emacs operates its own X windows. You can begin typing Emacs commands 20Emacs is running. You can type Emacs commands as soon as you direct
21as soon as you direct your keyboard input to the Emacs frame. 21your keyboard input to an Emacs frame.
22 22
23@vindex initial-major-mode 23@vindex initial-major-mode
24 When Emacs starts up, it creates a buffer named @samp{*scratch*}. 24 When Emacs starts up, it creates a buffer named @samp{*scratch*}.
25That's the buffer you start out in. The @samp{*scratch*} buffer uses 25That's the buffer you start out in. The @samp{*scratch*} buffer uses
26Lisp Interaction mode; you can use it to type Lisp expressions and 26Lisp Interaction mode; you can use it to type Lisp expressions and
27evaluate them, or you can ignore that capability and just write notes 27evaluate them. You can also ignore that capability and just write notes
28in it. (You can specify a different major mode for this buffer by 28there. You can specify a different major mode for this buffer by
29setting the variable @code{initial-major-mode} in your init file. 29setting the variable @code{initial-major-mode} in your init file.
30@xref{Init File}.) 30@xref{Init File}.
31 31
32 It is possible to specify files to be visited, Lisp files to be 32 It is possible to specify files to be visited, Lisp files to be
33loaded, and functions to be called, by giving Emacs arguments in the 33loaded, and functions to be called through Emacs command-line
34shell command line. @xref{Emacs Invocation}. But we don't recommend 34arguments. @xref{Emacs Invocation}. The feature exists mainly for
35doing this. The feature exists mainly for compatibility with other 35compatibility with other editors, and for scripts.
36editors. 36
37 37 Many editors are designed to edit one file. When done with that
38 Many other editors are designed to be started afresh each time you 38file, you exit the editor. The next time you want to edit a file, you
39want to edit. You edit one file and then exit the editor. The next 39must start the editor again. Working this way, it is convenient to
40time you want to edit either another file or the same one, you must run 40use a command-line argument to say which file to edit.
41the editor again. With these editors, it makes sense to use a 41
42command-line argument to say which file to edit. 42 It's not smart to start Emacs afresh for every file you edit. Emacs
43 43can visit more than one file in a single editing session, and upon
44 But starting a new Emacs each time you want to edit a different file 44exit Emacs loses valuable accumulated context, such as the kill ring,
45does not make sense. This would fail to take advantage of Emacs's 45registers, undo history, and mark ring. These features are useful for
46ability to visit more than one file in a single editing session, and 46operating on multiple files, or even one. If you kill Emacs after
47it would lose the other accumulated context, such as the kill ring, 47each file, you don't take advantage of them.
48registers, undo history, and mark ring, that are useful for operating
49on multiple files or even one.
50 48
51 The recommended way to use GNU Emacs is to start it only once, just 49 The recommended way to use GNU Emacs is to start it only once, just
52after you log in, and do all your editing in the same Emacs session. 50after you log in, and do all your editing in the same Emacs session.
53Each time you want to edit a different file, you visit it with the 51Each time you edit a file, you visit it with the existing Emacs, which
54existing Emacs, which eventually comes to have many files in it ready 52eventually has many files in it ready for editing. Usually you do not
55for editing. Usually you do not kill the Emacs until you are about to 53kill Emacs until you are about to log out. @xref{Files}, for more
56log out. @xref{Files}, for more information on visiting more than one 54information on visiting more than one file.
57file.
58 55
59 If you want to edit a file from another program and already have 56 To edit a file from another program while Emacs is running, you can
60Emacs running, you can use the @command{emacsclient} program to open a 57use the @command{emacsclient} helper program to open a file in the
61file in the already running Emacs. @xref{Emacs Server}, for more 58already running Emacs. @xref{Emacs Server}.
62information on editing files with Emacs from other programs.
63 59
64@ifnottex 60@ifnottex
65@raisesections 61@raisesections
@@ -73,9 +69,9 @@ information on editing files with Emacs from other programs.
73@cindex leaving Emacs 69@cindex leaving Emacs
74@cindex quitting Emacs 70@cindex quitting Emacs
75 71
76 There are two commands for exiting Emacs because there are three 72 There are two commands for exiting Emacs, and three kinds of exiting:
77kinds of exiting: @dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and 73@dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and @dfn{killing}
78@dfn{killing} Emacs. 74Emacs.
79 75
80 @dfn{Suspending} means stopping Emacs temporarily and returning 76 @dfn{Suspending} means stopping Emacs temporarily and returning
81control to its parent process (usually a shell), allowing you to resume 77control to its parent process (usually a shell), allowing you to resume
@@ -110,11 +106,11 @@ it iconifies the Emacs frame.
110Emacs. You can resume Emacs with the shell command @command{%emacs} 106Emacs. You can resume Emacs with the shell command @command{%emacs}
111in most common shells. On systems that don't support suspending 107in most common shells. On systems that don't support suspending
112programs, @kbd{C-z} starts an inferior shell that communicates 108programs, @kbd{C-z} starts an inferior shell that communicates
113directly with the terminal, and Emacs waits until you exit the subshell. 109directly with the terminal, and Emacs waits until you exit the
114(The way to do that is probably with @kbd{C-d} or @command{exit}, but 110subshell. (The way to do that is probably with @kbd{C-d} or
115it depends on which shell you use.) The only way on these systems to 111@command{exit}, but it depends on which shell you use.) On these
116get back to the shell from which Emacs was run (to log out, for 112systems, you can only get back to the shell from which Emacs was run
117example) is to kill Emacs. 113(to log out, for example) when you kill Emacs.
118 114
119 Suspending can fail if you run Emacs under a shell that doesn't 115 Suspending can fail if you run Emacs under a shell that doesn't
120support suspending programs, even if the system itself does support 116support suspending programs, even if the system itself does support
@@ -133,13 +129,13 @@ a shell window.
133@kindex C-x C-c 129@kindex C-x C-c
134@findex save-buffers-kill-emacs 130@findex save-buffers-kill-emacs
135 To exit and kill Emacs, type @kbd{C-x C-c} 131 To exit and kill Emacs, type @kbd{C-x C-c}
136(@code{save-buffers-kill-emacs}). A two-character key is used for 132(@code{save-buffers-kill-emacs}). A two-character key is used to make
137this to make it harder to type by accident. This command first offers 133it harder to type by accident. This command first offers to save any
138to save any modified file-visiting buffers. If you do not save them 134modified file-visiting buffers. If you do not save them all, it asks
139all, it asks for reconfirmation with @kbd{yes} before killing Emacs, 135for confirmation with @kbd{yes} before killing Emacs, since any
140since any changes not saved will be lost forever. Also, if any 136changes not saved now will be lost forever. Also, if any subprocesses are
141subprocesses are still running, @kbd{C-x C-c} asks for confirmation 137still running, @kbd{C-x C-c} asks for confirmation about them, since
142about them, since killing Emacs will also kill the subprocesses. 138killing Emacs will also kill the subprocesses.
143 139
144@vindex confirm-kill-emacs 140@vindex confirm-kill-emacs
145 If the value of the variable @code{confirm-kill-emacs} is 141 If the value of the variable @code{confirm-kill-emacs} is
@@ -150,11 +146,10 @@ function to use as the value of @code{confirm-kill-emacs} is the
150function @code{yes-or-no-p}. The default value of 146function @code{yes-or-no-p}. The default value of
151@code{confirm-kill-emacs} is @code{nil}. 147@code{confirm-kill-emacs} is @code{nil}.
152 148
153 There is no way to resume an Emacs session once you have killed it. 149 You can't resume an Emacs session after killing it. Emacs can,
154You can, however, arrange for Emacs to record certain session 150however, record certain session information when you kill it, such as
155information when you kill it, such as which files are visited, so that 151which files you visited, so the next time you start Emacs it will try
156the next time you start Emacs it will try to visit the same files and 152to visit the same files. @xref{Saving Emacs Sessions}.
157so on. @xref{Saving Emacs Sessions}.
158 153
159 The operating system usually listens for certain special characters 154 The operating system usually listens for certain special characters
160whose meaning is to kill or suspend the program you are running. 155whose meaning is to kill or suspend the program you are running.
diff --git a/man/files.texi b/man/files.texi
index ab3fe7bb583..be9f4443418 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -30,6 +30,7 @@ on file directories.
30* Version Control:: Version control systems (RCS, CVS and SCCS). 30* Version Control:: Version control systems (RCS, CVS and SCCS).
31* Directories:: Creating, deleting, and listing file directories. 31* Directories:: Creating, deleting, and listing file directories.
32* Comparing Files:: Finding where two files differ. 32* Comparing Files:: Finding where two files differ.
33* Diff Mode:: Mode for editing file differences.
33* Misc File Ops:: Other things you can do on files. 34* Misc File Ops:: Other things you can do on files.
34* Compressed Files:: Accessing compressed files. 35* Compressed Files:: Accessing compressed files.
35* File Archives:: Operating on tar, zip, jar etc. archive files. 36* File Archives:: Operating on tar, zip, jar etc. archive files.
@@ -2159,6 +2160,8 @@ differences in an Emacs buffer named @samp{*diff*}. It works by
2159running the @code{diff} program, using options taken from the variable 2160running the @code{diff} program, using options taken from the variable
2160@code{diff-switches}. The value of @code{diff-switches} should be a 2161@code{diff-switches}. The value of @code{diff-switches} should be a
2161string; the default is @code{"-c"} to specify a context diff. 2162string; the default is @code{"-c"} to specify a context diff.
2163@xref{Top,, Diff, diff, Comparing and Merging Files}, for more
2164information about @command{diff} output formats.
2162 2165
2163@findex diff-backup 2166@findex diff-backup
2164 The command @kbd{M-x diff-backup} compares a specified file with its most 2167 The command @kbd{M-x diff-backup} compares a specified file with its most
@@ -2166,20 +2169,6 @@ recent backup. If you specify the name of a backup file,
2166@code{diff-backup} compares it with the source file that it is a backup 2169@code{diff-backup} compares it with the source file that it is a backup
2167of. 2170of.
2168 2171
2169@findex diff-goto-source
2170@findex diff-mode
2171@cindex Diff mode
2172 The @samp{*diff*} buffer uses Diff mode, which enables you to use
2173@kbd{C-x `} to visit successive changed locations in the two source
2174files, as in Compilation mode (@pxref{Compilation Mode}.) You can
2175also move to a particular hunk of changes and type @kbd{C-c C-c}
2176(@code{diff-goto-source}) to visit the corresponding source location.
2177
2178@cindex patches
2179 Differences between versions of files are often distributed as
2180patches, which are the output from the @command{diff} program. You
2181can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}.
2182
2183@findex compare-windows 2172@findex compare-windows
2184 The command @kbd{M-x compare-windows} compares the text in the 2173 The command @kbd{M-x compare-windows} compares the text in the
2185current window with that in the next window. (For more information 2174current window with that in the next window. (For more information
@@ -2219,6 +2208,86 @@ changes.
2219 @inforef{Emerge,, emacs-xtra} for the Emerge facility, which 2208 @inforef{Emerge,, emacs-xtra} for the Emerge facility, which
2220provides a powerful interface for merging files. 2209provides a powerful interface for merging files.
2221 2210
2211@node Diff Mode
2212@section Diff Mode
2213@cindex Diff mode
2214@findex diff-mode
2215@cindex patches, editing
2216
2217 The @samp{*diff*} buffer uses Diff mode (@pxref{Diff Mode}). Diff
2218mode is also useful for editing patches and comparisons produced by
2219the @command{diff} program. To select Diff mode manually, type
2220@kbd{M-x diff-mode}.
2221
2222 One general feature of Diff mode is that manual edits to the patch
2223automatically correct line numbers, including those in the hunk
2224header, so that you can actually apply the edited patch. Diff mode
2225also provides the following commands to navigate, manipulate and apply
2226parts of patches:
2227
2228@table @kbd
2229@item M-n
2230Move to the next hunk-start (@code{diff-hunk-next}).
2231
2232@item M-p
2233Move to the previous hunk-start (@code{diff-hunk-prev}).
2234
2235@item M-@}
2236Move to the next file-start, in a multi-file patch
2237(@code{diff-file-next}).
2238
2239@item M-@{
2240Move to the previous file-start, in a multi-file patch
2241(@code{diff-file-prev}).
2242
2243@item M-k
2244Kill the hunk at point (@code{diff-hunk-kill}).
2245
2246@item M-K
2247In a multi-file patch, kill the current file part.
2248(@code{diff-file-kill}).
2249
2250@item C-c C-a
2251Apply this hunk to its target file (@code{diff-apply-hunk}). With a
2252prefix argument of @kbd{C-u}, revert this hunk.
2253
2254@item C-c C-c
2255Go to the source corresponding to this hunk (@code{diff-goto-source}).
2256
2257@item C-c C-e
2258Start an Ediff session with the patch (@code{diff-ediff-patch}).
2259@xref{Top, Ediff, Ediff, ediff, The Ediff Manual}.
2260
2261@item C-c C-n
2262Restrict the view to the current hunk (@code{diff-restrict-view}).
2263@xref{Narrowing}. With a prefix argument of @kbd{C-u}, restrict the
2264view to the current patch of a multiple file patch. To widen again,
2265use @kbd{C-x n w}.
2266
2267@item C-c C-r
2268Reverse the direction of comparison for the entire buffer
2269(@code{diff-reverse-direction}).
2270
2271@item C-c C-s
2272Split the hunk at point (@code{diff-split-hunk}). This is for
2273manually editing patches, and only works with the unified diff format.
2274
2275@item C-c C-u
2276Convert the entire buffer to unified format
2277(@code{diff-context->unified}). With a prefix argument, convert
2278unified format to context format. In Transient Mark mode, when the
2279mark is active, this command operates only on the region.
2280
2281@item C-c C-w
2282Refine the current hunk so that it disregards changes in whitespace
2283(@code{diff-refine-hunk}).
2284@end table
2285
2286 @kbd{C-x 4 a} in Diff mode operates on behalf of the target file,
2287but gets the function name from the patch itself. @xref{Change Log}.
2288This is useful for making log entries for functions that are deleted
2289by the patch.
2290
2222@node Misc File Ops 2291@node Misc File Ops
2223@section Miscellaneous File Operations 2292@section Miscellaneous File Operations
2224 2293
diff --git a/man/killing.texi b/man/killing.texi
index c69f6ca2805..ad79e5595ca 100644
--- a/man/killing.texi
+++ b/man/killing.texi
@@ -62,7 +62,7 @@ message in the echo area to explain why the text has not been erased.
62* Killing by Lines:: How to kill entire lines of text at one time. 62* Killing by Lines:: How to kill entire lines of text at one time.
63* Other Kill Commands:: Commands to kill large regions of text and 63* Other Kill Commands:: Commands to kill large regions of text and
64 syntactic units such as words and sentences. 64 syntactic units such as words and sentences.
65* Graphical Kill:: The kill ring on graphical terminals: 65* Graphical Kill:: The kill ring on graphical displays:
66 yanking between applications. 66 yanking between applications.
67@end menu 67@end menu
68 68
diff --git a/man/misc.texi b/man/misc.texi
index 71f4aba2b49..0b07e04ed68 100644
--- a/man/misc.texi
+++ b/man/misc.texi
@@ -1761,7 +1761,7 @@ rectangle moves along with the text inside the rectangle.
1761 Many of the sort commands ignore case differences when comparing, if 1761 Many of the sort commands ignore case differences when comparing, if
1762@code{sort-fold-case} is non-@code{nil}. 1762@code{sort-fold-case} is non-@code{nil}.
1763 1763
1764@node Narrowing, Diff Mode, Sorting, Top 1764@node Narrowing, Two-Column, Sorting, Top
1765@section Narrowing 1765@section Narrowing
1766@cindex widening 1766@cindex widening
1767@cindex restriction 1767@cindex restriction
@@ -1827,86 +1827,7 @@ this command asks for confirmation and gives you the option of enabling it;
1827if you enable the command, confirmation will no longer be required for 1827if you enable the command, confirmation will no longer be required for
1828it. @xref{Disabling}. 1828it. @xref{Disabling}.
1829 1829
1830@node Diff Mode, Two-Column, Narrowing, Top 1830@node Two-Column, Editing Binary Files, Narrowing, Top
1831@section Diff Mode
1832@cindex Diff mode
1833
1834 Diff mode is useful for editing patches and comparisons produced by
1835the @command{diff} program. You can select Diff mode by typing
1836@kbd{M-x diff-mode}; Emacs commands that compare files automatically
1837select Diff mode. @xref{Top,, Diff, diff, Comparing and Merging Files},
1838for more information about @command{diff} output formats.
1839
1840 One general feature of Diff mode is that manual edits to the patch
1841automatically correct line numbers, including those in the hunk
1842header, so that you can actually apply the edited patch. Diff mode
1843also provides the following commands to navigate, manipulate and apply
1844parts of patches:
1845
1846@table @kbd
1847@item M-n
1848Move to the next hunk-start (@code{diff-hunk-next}).
1849
1850@item M-p
1851Move to the previous hunk-start (@code{diff-hunk-prev}).
1852
1853@item M-@}
1854Move to the next file-start, in a multi-file patch
1855(@code{diff-file-next}).
1856
1857@item M-@{
1858Move to the previous file-start, in a multi-file patch
1859(@code{diff-file-prev}).
1860
1861@item M-k
1862Kill the hunk at point (@code{diff-hunk-kill}).
1863
1864@item M-K
1865In a multi-file patch, kill the current file part.
1866(@code{diff-file-kill}).
1867
1868@item C-c C-a
1869Apply this hunk to its target file (@code{diff-apply-hunk}). With a
1870prefix argument of @kbd{C-u}, revert this hunk.
1871
1872@item C-c C-c
1873Go to the source corresponding to this hunk (@code{diff-goto-source}).
1874
1875@item C-c C-e
1876Start an Ediff session with the patch (@code{diff-ediff-patch}).
1877@xref{Top, Ediff, Ediff, ediff, The Ediff Manual}.
1878
1879@item C-c C-n
1880Restrict the view to the current hunk (@code{diff-restrict-view}).
1881@xref{Narrowing}. With a prefix argument of @kbd{C-u}, restrict the
1882view to the current patch of a multiple file patch. To widen again,
1883use @kbd{C-x n w}.
1884
1885@item C-c C-r
1886Reverse the direction of comparison for the entire buffer
1887(@code{diff-reverse-direction}).
1888
1889@item C-c C-s
1890Split the hunk at point (@code{diff-split-hunk}). This is for
1891manually editing patches, and only works with the unified diff format.
1892
1893@item C-c C-u
1894Convert the entire buffer to unified format
1895(@code{diff-context->unified}). With a prefix argument, convert
1896unified format to context format. In Transient Mark mode, when the
1897mark is active, this command operates only on the region.
1898
1899@item C-c C-w
1900Refine the current hunk so that it disregards changes in whitespace
1901(@code{diff-refine-hunk}).
1902@end table
1903
1904 @kbd{C-x 4 a} in Diff mode operates on behalf of the target file,
1905but gets the function name from the patch itself. @xref{Change Log}.
1906This is useful for making log entries for functions that are deleted
1907by the patch.
1908
1909@node Two-Column, Editing Binary Files, Diff Mode, Top
1910@section Two-Column Editing 1831@section Two-Column Editing
1911@cindex two-column editing 1832@cindex two-column editing
1912@cindex splitting columns 1833@cindex splitting columns
diff --git a/man/screen.texi b/man/screen.texi
index 72ed3261f01..b1b37be6239 100644
--- a/man/screen.texi
+++ b/man/screen.texi
@@ -24,8 +24,8 @@ be a @dfn{tool bar}, a row of icons that perform editing commands if
24you click on them. Below this, the window begins, often with a 24you click on them. Below this, the window begins, often with a
25@dfn{scroll bar} on one side. Below the window comes the last line of 25@dfn{scroll bar} on one side. Below the window comes the last line of
26the frame, a special @dfn{echo area} or @dfn{minibuffer window}, where 26the frame, a special @dfn{echo area} or @dfn{minibuffer window}, where
27prompts appear and where you enter information when Emacs asks for it. 27prompts appear and you enter information when Emacs asks for it. See
28See following sections for more information about these special lines. 28following sections for more information about these special lines.
29 29
30 You can subdivide the window horizontally or vertically to make 30 You can subdivide the window horizontally or vertically to make
31multiple text windows, each of which can independently display some 31multiple text windows, each of which can independently display some
@@ -34,22 +34,22 @@ refers to the initial large window if not subdivided, or any one of
34the multiple windows you have subdivided it into. 34the multiple windows you have subdivided it into.
35 35
36 At any time, one window is the @dfn{selected window}. On graphical 36 At any time, one window is the @dfn{selected window}. On graphical
37terminals, the selected window normally shows a more prominent cursor 37displays, the selected window normally shows a more prominent cursor
38(usually solid and blinking) while other windows show a weaker cursor 38(usually solid and blinking) while other windows show a weaker cursor
39(such as a hollow box). On text terminals, which have just one 39(such as a hollow box). Text terminals have just one cursor, so it
40cursor, that cursor always appears in the selected window. 40always appears in the selected window.
41 41
42 Most Emacs commands implicitly apply to the text in the selected 42 Most Emacs commands implicitly apply to the text in the selected
43window (though mouse commands generally operate on whatever window you 43window; the text in unselected windows is mostly visible for
44click them in, whether selected or not). The text in other windows is 44reference. However, mouse commands generally operate on whatever
45mostly visible for reference, unless/until you select them. If you 45window you click them in, whether selected or not. If you use
46use multiple frames on a graphical display, then giving the input 46multiple frames on a graphical display, then giving the input focus to
47focus to a particular frame selects a window in that frame. 47a particular frame selects a window in that frame.
48 48
49 Each window's last line is a @dfn{mode line}, which describes what 49 Each window's last line is a @dfn{mode line}, which describes what
50is going on in that window. It appears in different color and/or a 50is going on in that window. It appears in different color and/or a ``3D''
51``3D'' box, if the terminal supports that; its contents normally begin 51box if the terminal supports them; its contents normally begin with
52with @w{@samp{--:-- @ *scratch*}} when Emacs starts. The mode line 52@w{@samp{--:-- @ *scratch*}} when Emacs starts. The mode line
53displays status information such as what buffer is being displayed 53displays status information such as what buffer is being displayed
54above it in the window, what major and minor modes are in use, and 54above it in the window, what major and minor modes are in use, and
55whether the buffer contains unsaved changes. 55whether the buffer contains unsaved changes.
@@ -89,18 +89,17 @@ each buffer has its own point location. A buffer that is not
89currently displayed remembers its point location in case you display 89currently displayed remembers its point location in case you display
90it again later. When Emacs displays multiple windows, each window has 90it again later. When Emacs displays multiple windows, each window has
91its own point location. If the same buffer appears in more than one 91its own point location. If the same buffer appears in more than one
92window, each window has its own position for point in that buffer, and 92window, each window has its own point position in that buffer, and (when
93(when possible) its own cursor. 93possible) its own cursor.
94 94
95 A text-only terminal has just one cursor, so Emacs puts it 95 A text-only terminal has just one cursor, in the selected window.
96in the selected window. The other windows do not show a cursor, even 96The other windows do not show a cursor, even though they do have their
97though they do have a location of point. When Emacs updates the 97own position of point. When Emacs updates the screen on a text-only
98screen on a text-only terminal, it has to put the cursor temporarily 98terminal, it has to put the cursor temporarily at the place the output
99at the place the output goes. This doesn't mean point is there, 99goes. This doesn't mean point is there, though. Once display
100though. Once display updating finishes, Emacs puts the cursor where 100updating finishes, Emacs puts the cursor where point is.
101point is. 101
102 102 On graphical displays, Emacs shows a cursor in each window; the
103 On graphical terminals, Emacs shows a cursor in each window; the
104selected window's cursor is solid and blinking, and the other cursors 103selected window's cursor is solid and blinking, and the other cursors
105are just hollow. Thus, the most prominent cursor always shows you the 104are just hollow. Thus, the most prominent cursor always shows you the
106selected window, on all kinds of terminals. 105selected window, on all kinds of terminals.
@@ -165,18 +164,19 @@ that appears briefly on the screen, you can switch to the
165are often collapsed into one in that buffer.) 164are often collapsed into one in that buffer.)
166 165
167@vindex message-log-max 166@vindex message-log-max
168 The size of @samp{*Messages*} is limited to a certain number of lines. 167 The size of @samp{*Messages*} is limited to a certain number of
169The variable @code{message-log-max} specifies how many lines. Once the 168lines. The variable @code{message-log-max} specifies how many lines.
170buffer has that many lines, each line added at the end deletes one line 169Once the buffer has that many lines, adding lines at the end deletes lines
171from the beginning. @xref{Variables}, for how to set variables such as 170from the beginning, to keep the size constant. @xref{Variables}, for
172@code{message-log-max}. 171how to set variables such as @code{message-log-max}.
173 172
174 The echo area is also used to display the @dfn{minibuffer}, a window that 173 The echo area is also used to display the @dfn{minibuffer}, a window
175is used for reading arguments to commands, such as the name of a file to be 174where you can input arguments to commands, such as the name of a file
176edited. When the minibuffer is in use, the echo area begins with a prompt 175to be edited. When the minibuffer is in use, the echo area begins
177string that usually ends with a colon; also, the cursor appears in that line 176with a prompt string that usually ends with a colon; also, the cursor
178because it is the selected window. You can always get out of the 177appears in that line because it is the selected window. You can
179minibuffer by typing @kbd{C-g}. @xref{Minibuffer}. 178always get out of the minibuffer by typing @kbd{C-g}.
179@xref{Minibuffer}.
180 180
181@node Mode Line 181@node Mode Line
182@section The Mode Line 182@section The Mode Line
@@ -188,11 +188,11 @@ minibuffer by typing @kbd{C-g}. @xref{Minibuffer}.
188what is going on in that window. The mode line starts and ends with 188what is going on in that window. The mode line starts and ends with
189dashes. When there is only one text window, the mode line appears 189dashes. When there is only one text window, the mode line appears
190right above the echo area; it is the next-to-last line in the frame. 190right above the echo area; it is the next-to-last line in the frame.
191On a text-mode display, the mode line is in inverse video if the 191On a text-only terminal, the mode line is in inverse video if the
192terminal supports that; on a graphics display, the mode line has a 3D 192terminal supports that; on a graphics display, the mode line has a 3D
193box appearance to help it stand out. The mode line of the selected 193box appearance to help it stand out. The mode line of the selected
194window has a slightly different appearance than those of other 194window is highlighted if possible; see @ref{Optional Mode Line}, for
195windows; see @ref{Optional Mode Line}, for more about this. 195more information.
196 196
197 Normally, the mode line looks like this: 197 Normally, the mode line looks like this:
198 198
@@ -201,26 +201,26 @@ windows; see @ref{Optional Mode Line}, for more about this.
201@end example 201@end example
202 202
203@noindent 203@noindent
204This gives information about the buffer being displayed in the window: the 204This gives information about the window and the buffer it displays: the
205buffer's name, what major and minor modes are in use, whether the buffer's 205buffer's name, what major and minor modes are in use, whether the
206text has been changed, and how far down the buffer you are currently 206buffer's text has been changed, and how far down the buffer you are
207looking. 207currently looking.
208 208
209 @var{ch} contains two stars @samp{**} if the text in the buffer has 209 @var{ch} contains two stars @samp{**} if the text in the buffer has
210been edited (the buffer is ``modified''), or @samp{--} if the buffer has 210been edited (the buffer is ``modified''), or @samp{--} if the buffer has
211not been edited. For a read-only buffer, it is @samp{%*} if the buffer 211not been edited. For a read-only buffer, it is @samp{%*} if the buffer
212is modified, and @samp{%%} otherwise. 212is modified, and @samp{%%} otherwise.
213 213
214 @var{fr} appears only on text-only terminals, to show the selected 214 @var{fr} gives the selected frame name (@pxref{Frames}). It appears
215frame name. @xref{Frames}. The initial frame's name is @samp{F1}. 215only on text-only terminals. The initial frame's name is @samp{F1}.
216 216
217 @var{buf} is the name of the window's @dfn{buffer}. In most cases 217 @var{buf} is the name of the window's @dfn{buffer}. Usually this is
218this is the same as the name of a file you are editing. @xref{Buffers}. 218the same as the name of a file you are editing. @xref{Buffers}.
219 219
220 The buffer displayed in the selected window (the window that the 220 The buffer displayed in the selected window (the window with the
221cursor is in) is the @dfn{current buffer}--the one that editing takes 221cursor) is the @dfn{current buffer}, where editing happens. When a
222place in. When we speak of what some command does to ``the buffer,'' 222command's effect applies to ``the buffer,'' we mean it does those
223we mean it does those things to the current buffer. 223things to the current buffer.
224 224
225 @var{pos} tells you whether there is additional text above the top of 225 @var{pos} tells you whether there is additional text above the top of
226the window, or below the bottom. If your buffer is small and it is all 226the window, or below the bottom. If your buffer is small and it is all
@@ -232,17 +232,17 @@ With Size Indication mode, you can display the size of the buffer as
232well. @xref{Optional Mode Line}. 232well. @xref{Optional Mode Line}.
233 233
234 @var{line} is @samp{L} followed by the current line number of point. 234 @var{line} is @samp{L} followed by the current line number of point.
235This is present when Line Number mode is enabled (which it normally is). 235This is present when Line Number mode is enabled (it normally is).
236You can optionally display the current column number too, by turning on 236You can display the current column number too, by turning on Column
237Column Number mode (which is not enabled by default because it is 237Number mode. It is not enabled by default because it is somewhat
238somewhat slower). @xref{Optional Mode Line}. 238slower. @xref{Optional Mode Line}.
239 239
240 @var{major} is the name of the @dfn{major mode} in effect in the 240 @var{major} is the name of the @dfn{major mode} in effect in the
241buffer. At any time, each buffer is in one and only one of the possible 241buffer. A buffer can only be in one major mode at a time. The major
242major modes. The major modes available include Fundamental mode (the 242modes available include Fundamental mode (the least specialized), Text
243least specialized), Text mode, Lisp mode, C mode, Texinfo mode, and many 243mode, Lisp mode, C mode, Texinfo mode, and many others. @xref{Major
244others. @xref{Major Modes}, for details of how the modes differ and how 244Modes}, for details of how the modes differ and how to select
245to select one.@refill 245them.
246 246
247 Some major modes display additional information after the major mode 247 Some major modes display additional information after the major mode
248name. For example, Rmail buffers display the current message number and 248name. For example, Rmail buffers display the current message number and
@@ -253,14 +253,15 @@ display the status of the subprocess.
253turned on at the moment in the window's chosen buffer. For example, 253turned on at the moment in the window's chosen buffer. For example,
254@samp{Fill} means that Auto Fill mode is on. @samp{Abbrev} means that 254@samp{Fill} means that Auto Fill mode is on. @samp{Abbrev} means that
255Word Abbrev mode is on. @samp{Ovwrt} means that Overwrite mode is on. 255Word Abbrev mode is on. @samp{Ovwrt} means that Overwrite mode is on.
256@xref{Minor Modes}, for more information. @samp{Narrow} means that 256@xref{Minor Modes}, for more information.
257the buffer being displayed has editing restricted to only a portion of 257
258its text. (This is not really a minor mode, but is like one.) 258 @samp{Narrow} means that the buffer being displayed has editing
259@xref{Narrowing}. @samp{Def} means that a keyboard macro is being 259restricted to only a portion of its text. (This is not really a minor
260defined. @xref{Keyboard Macros}. 260mode, but is like one.) @xref{Narrowing}. @samp{Def} means that a
261 261keyboard macro is being defined. @xref{Keyboard Macros}.
262 In addition, if Emacs is currently inside a recursive editing level, 262
263square brackets (@samp{[@dots{}]}) appear around the parentheses that 263 In addition, if Emacs is inside a recursive editing level, square
264brackets (@samp{[@dots{}]}) appear around the parentheses that
264surround the modes. If Emacs is in one recursive editing level within 265surround the modes. If Emacs is in one recursive editing level within
265another, double square brackets appear, and so on. Since recursive 266another, double square brackets appear, and so on. Since recursive
266editing levels affect Emacs globally, not just one buffer, the square 267editing levels affect Emacs globally, not just one buffer, the square
@@ -288,22 +289,21 @@ identifies the input method. (Some input methods show @samp{+} or
288all. @xref{Enabling Multibyte}. 289all. @xref{Enabling Multibyte}.
289 290
290@cindex end-of-line conversion, mode-line indication 291@cindex end-of-line conversion, mode-line indication
291 The colon after @var{cs} can change to another string in certain 292 The colon after @var{cs} changes to another string in some cases.
292circumstances. Emacs uses newline characters to separate lines in the buffer. 293Emacs uses newline characters to separate lines in the buffer. Some
293Some files use different conventions for separating lines: either 294files use different conventions for separating lines: either
294carriage-return linefeed (the MS-DOS convention) or just carriage-return 295carriage-return linefeed (the MS-DOS convention) or just
295(the Macintosh convention). If the buffer's file uses carriage-return 296carriage-return (the Macintosh convention). If the buffer's file uses
296linefeed, the colon changes to either a backslash (@samp{\}) or 297carriage-return linefeed, the colon changes to either a backslash
297@samp{(DOS)}, depending on the operating system. If the file uses just 298(@samp{\}) or @samp{(DOS)}, depending on the operating system. If the
298carriage-return, the colon indicator changes to either a forward slash 299file uses just carriage-return, the colon indicator changes to either
299(@samp{/}) or @samp{(Mac)}. On some systems, Emacs displays 300a forward slash (@samp{/}) or @samp{(Mac)}. On some systems, Emacs
300@samp{(Unix)} instead of the colon even for files that use newline to 301displays @samp{(Unix)} instead of the colon for files that use newline
301separate lines. 302as the line separator.
302 303
303 @xref{Optional Mode Line}, for features that add other handy 304 @xref{Optional Mode Line}, to add other handy information to the
304information to the mode line, such as the size of the buffer, the 305mode line, such as the size of the buffer, the current column number
305current column number of point, and whether new mail for you has 306of point, and whether new mail for you has arrived.
306arrived.
307 307
308 The mode line is mouse-sensitive; when you move the mouse across 308 The mode line is mouse-sensitive; when you move the mouse across
309various parts of it, Emacs displays help text to say what a click in 309various parts of it, Emacs displays help text to say what a click in
@@ -314,17 +314,17 @@ that place will do. @xref{Mode Line Mouse}.
314@cindex menu bar 314@cindex menu bar
315 315
316 Each Emacs frame normally has a @dfn{menu bar} at the top which you 316 Each Emacs frame normally has a @dfn{menu bar} at the top which you
317can use to perform certain common operations. There's no need to list 317can use to perform common operations. There's no need to list them
318them here, as you can more easily see for yourself. 318here, as you can more easily see them yourself.
319 319
320@kindex M-` 320@kindex M-`
321@kindex F10 321@kindex F10
322@findex tmm-menubar 322@findex tmm-menubar
323 On a graphical terminal, you can use the mouse to choose a command 323 On a graphical display, you can use the mouse to choose a command
324from the menu bar. An arrow pointing right, after the menu item, 324from the menu bar. A right-arrow at the end of the menu item means it
325indicates that the item leads to a subsidiary menu; @samp{...} at the 325leads to a subsidiary menu; @samp{...} at the end means that the
326end means that the command will read arguments (further input from 326command invoked will read arguments (further input from you) before it
327you) before it actually does anything. 327actually does anything.
328 328
329 To view the full command name and documentation for a menu item, type 329 To view the full command name and documentation for a menu item, type
330@kbd{C-h k}, and then select the menu bar with the mouse in the usual 330@kbd{C-h k}, and then select the menu bar with the mouse in the usual
@@ -332,11 +332,10 @@ way (@pxref{Key Help}).
332 332
333 On text-only terminals with no mouse, you can use the menu bar by 333 On text-only terminals with no mouse, you can use the menu bar by
334typing @kbd{M-`} or @key{F10} (these run the command 334typing @kbd{M-`} or @key{F10} (these run the command
335@code{tmm-menubar}). This command enters a mode in which you can select 335@code{tmm-menubar}). This lets you select a menu item with the
336a menu item from the keyboard. A provisional choice appears in the echo 336keyboard. A provisional choice appears in the echo area. You can use
337area. You can use the up and down arrow keys to move through the 337the up and down arrow keys to move through the menu to different
338menu to different choices. When you have found the choice you want, 338items, and then you can type @key{RET} to select the item.
339type @key{RET} to select it.
340 339
341 Each menu item also has an assigned letter or digit which designates 340 Each menu item also has an assigned letter or digit which designates
342that item; it is usually the initial of some word in the item's name. 341that item; it is usually the initial of some word in the item's name.
@@ -344,8 +343,7 @@ This letter or digit is separated from the item name by @samp{=>}. You
344can type the item's letter or digit to select the item. 343can type the item's letter or digit to select the item.
345 344
346 Some of the commands in the menu bar have ordinary key bindings as 345 Some of the commands in the menu bar have ordinary key bindings as
347well; if so, the menu lists one equivalent key binding in parentheses 346well; one such binding is shown in parentheses after the item itself.
348after the item itself.
349 347
350@ignore 348@ignore
351 arch-tag: 104ba40e-d972-4866-a542-a98be94bdf2f 349 arch-tag: 104ba40e-d972-4866-a542-a98be94bdf2f
diff --git a/man/trouble.texi b/man/trouble.texi
index f44862598c4..90e99a0ea59 100644
--- a/man/trouble.texi
+++ b/man/trouble.texi
@@ -381,9 +381,9 @@ subsequent @kbd{C-g} invokes emergency escape again.
381answer @kbd{n} to both questions, and you will get back to the former 381answer @kbd{n} to both questions, and you will get back to the former
382state. The quit you requested will happen by and by. 382state. The quit you requested will happen by and by.
383 383
384 Emergency escape is active only for text terminals. On a graphical 384 Emergency escape is active only for text terminals. On graphical
385display that supports multiple windows, you can use the window manager 385displays, you can use the mouse to kill Emacs or switch to another
386to kill Emacs, or to switch to some other program. 386program.
387 387
388 On MS-DOS, you must type @kbd{C-@key{BREAK}} (twice) to cause 388 On MS-DOS, you must type @kbd{C-@key{BREAK}} (twice) to cause
389emergency escape---but there are cases where it won't work, when 389emergency escape---but there are cases where it won't work, when
diff --git a/src/ChangeLog b/src/ChangeLog
index bf52364ee66..c0e8f035a17 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12006-05-03 Richard Stallman <rms@gnu.org>
2
3 * sound.c (Fplay_sound_internal): Dynamically allocate
4 current_sound_device and current_sound.
5 (sound_cleanup): Free them.
6
7 * minibuf.c (read_minibuf): Don't use read_minibuf_noninteractive
8 when inside a keyboard macro.
9
12006-05-02 Andreas Schwab <schwab@suse.de> 102006-05-02 Andreas Schwab <schwab@suse.de>
2 11
3 * xmenu.c (restore_menu_items): Return a value. 12 * xmenu.c (restore_menu_items): Return a value.
diff --git a/src/minibuf.c b/src/minibuf.c
index 300e2e2ccb5..5f3f7454a0c 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -523,7 +523,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
523 build_string ("Command attempted to use minibuffer while in minibuffer")); 523 build_string ("Command attempted to use minibuffer while in minibuffer"));
524 } 524 }
525 525
526 if (noninteractive) 526 if (noninteractive && NILP (Vexecuting_kbd_macro))
527 { 527 {
528 val = read_minibuf_noninteractive (map, initial, prompt, 528 val = read_minibuf_noninteractive (map, initial, prompt,
529 make_number (pos), 529 make_number (pos),
diff --git a/src/sound.c b/src/sound.c
index c1d5c40e9bb..0fbeceb4b9e 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -452,13 +452,12 @@ static Lisp_Object
452sound_cleanup (arg) 452sound_cleanup (arg)
453 Lisp_Object arg; 453 Lisp_Object arg;
454{ 454{
455 if (current_sound_device) 455 if (current_sound_device->close)
456 { 456 current_sound_device->close (current_sound_device);
457 if (current_sound_device->close) 457 if (current_sound->fd > 0)
458 current_sound_device->close (current_sound_device); 458 emacs_close (current_sound->fd);
459 if (current_sound->fd > 0) 459 free (current_sound_device);
460 emacs_close (current_sound->fd); 460 free (current_sound);
461 }
462 461
463 return Qnil; 462 return Qnil;
464} 463}
@@ -991,8 +990,6 @@ Internal use only, use `play-sound' instead.\n */)
991#ifndef WINDOWSNT 990#ifndef WINDOWSNT
992 Lisp_Object file; 991 Lisp_Object file;
993 struct gcpro gcpro1, gcpro2; 992 struct gcpro gcpro1, gcpro2;
994 struct sound_device sd;
995 struct sound s;
996 Lisp_Object args[2]; 993 Lisp_Object args[2];
997#else /* WINDOWSNT */ 994#else /* WINDOWSNT */
998 int len = 0; 995 int len = 0;
@@ -1010,48 +1007,50 @@ Internal use only, use `play-sound' instead.\n */)
1010#ifndef WINDOWSNT 1007#ifndef WINDOWSNT
1011 file = Qnil; 1008 file = Qnil;
1012 GCPRO2 (sound, file); 1009 GCPRO2 (sound, file);
1013 bzero (&sd, sizeof sd); 1010 current_sound_device = (struct sound_device *) xmalloc (sizeof (struct sound_device));
1014 bzero (&s, sizeof s); 1011 bzero (current_sound_device, sizeof (struct sound_device));
1015 current_sound_device = &sd; 1012 current_sound = (struct sound *) xmalloc (sizeof (struct sound));
1016 current_sound = &s; 1013 bzero (current_sound, sizeof (struct sound));
1017 record_unwind_protect (sound_cleanup, Qnil); 1014 record_unwind_protect (sound_cleanup, Qnil);
1018 s.header = (char *) alloca (MAX_SOUND_HEADER_BYTES); 1015 current_sound->header = (char *) alloca (MAX_SOUND_HEADER_BYTES);
1019 1016
1020 if (STRINGP (attrs[SOUND_FILE])) 1017 if (STRINGP (attrs[SOUND_FILE]))
1021 { 1018 {
1022 /* Open the sound file. */ 1019 /* Open the sound file. */
1023 s.fd = openp (Fcons (Vdata_directory, Qnil), 1020 current_sound->fd = openp (Fcons (Vdata_directory, Qnil),
1024 attrs[SOUND_FILE], Qnil, &file, Qnil); 1021 attrs[SOUND_FILE], Qnil, &file, Qnil);
1025 if (s.fd < 0) 1022 if (current_sound->fd < 0)
1026 sound_perror ("Could not open sound file"); 1023 sound_perror ("Could not open sound file");
1027 1024
1028 /* Read the first bytes from the file. */ 1025 /* Read the first bytes from the file. */
1029 s.header_size = emacs_read (s.fd, s.header, MAX_SOUND_HEADER_BYTES); 1026 current_sound->header_size
1030 if (s.header_size < 0) 1027 = emacs_read (current_sound->fd, current_sound->header,
1028 MAX_SOUND_HEADER_BYTES);
1029 if (current_sound->header_size < 0)
1031 sound_perror ("Invalid sound file header"); 1030 sound_perror ("Invalid sound file header");
1032 } 1031 }
1033 else 1032 else
1034 { 1033 {
1035 s.data = attrs[SOUND_DATA]; 1034 current_sound->data = attrs[SOUND_DATA];
1036 s.header_size = min (MAX_SOUND_HEADER_BYTES, SBYTES (s.data)); 1035 current_sound->header_size = min (MAX_SOUND_HEADER_BYTES, SBYTES (current_sound->data));
1037 bcopy (SDATA (s.data), s.header, s.header_size); 1036 bcopy (SDATA (current_sound->data), current_sound->header, current_sound->header_size);
1038 } 1037 }
1039 1038
1040 /* Find out the type of sound. Give up if we can't tell. */ 1039 /* Find out the type of sound. Give up if we can't tell. */
1041 find_sound_type (&s); 1040 find_sound_type (current_sound);
1042 1041
1043 /* Set up a device. */ 1042 /* Set up a device. */
1044 if (STRINGP (attrs[SOUND_DEVICE])) 1043 if (STRINGP (attrs[SOUND_DEVICE]))
1045 { 1044 {
1046 int len = SCHARS (attrs[SOUND_DEVICE]); 1045 int len = SCHARS (attrs[SOUND_DEVICE]);
1047 sd.file = (char *) alloca (len + 1); 1046 current_sound_device->file = (char *) alloca (len + 1);
1048 strcpy (sd.file, SDATA (attrs[SOUND_DEVICE])); 1047 strcpy (current_sound_device->file, SDATA (attrs[SOUND_DEVICE]));
1049 } 1048 }
1050 1049
1051 if (INTEGERP (attrs[SOUND_VOLUME])) 1050 if (INTEGERP (attrs[SOUND_VOLUME]))
1052 sd.volume = XFASTINT (attrs[SOUND_VOLUME]); 1051 current_sound_device->volume = XFASTINT (attrs[SOUND_VOLUME]);
1053 else if (FLOATP (attrs[SOUND_VOLUME])) 1052 else if (FLOATP (attrs[SOUND_VOLUME]))
1054 sd.volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; 1053 current_sound_device->volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
1055 1054
1056 args[0] = Qplay_sound_functions; 1055 args[0] = Qplay_sound_functions;
1057 args[1] = sound; 1056 args[1] = sound;
@@ -1060,27 +1059,15 @@ Internal use only, use `play-sound' instead.\n */)
1060 /* There is only one type of device we currently support, the VOX 1059 /* There is only one type of device we currently support, the VOX
1061 sound driver. Set up the device interface functions for that 1060 sound driver. Set up the device interface functions for that
1062 device. */ 1061 device. */
1063 vox_init (&sd); 1062 vox_init (current_sound_device);
1064 1063
1065 /* Open the device. */ 1064 /* Open the device. */
1066 sd.open (&sd); 1065 current_sound_device->open (current_sound_device);
1067 1066
1068 /* Play the sound. */ 1067 /* Play the sound. */
1069 s.play (&s, &sd); 1068 current_sound->play (current_sound, current_sound_device);
1070
1071 /* Close the input file, if any. */
1072 if (!STRINGP (s.data))
1073 {
1074 emacs_close (s.fd);
1075 s.fd = -1;
1076 }
1077
1078 /* Close the device. */
1079 sd.close (&sd);
1080 1069
1081 /* Clean up. */ 1070 /* Clean up. */
1082 current_sound_device = NULL;
1083 current_sound = NULL;
1084 UNGCPRO; 1071 UNGCPRO;
1085 1072
1086#else /* WINDOWSNT */ 1073#else /* WINDOWSNT */