aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-02-28 15:15:44 +0000
committerKaroly Lorentey2005-02-28 15:15:44 +0000
commitab455350da7728b0f8e1daf92c084092d8a04c29 (patch)
treea954961cc3edbabe78e45503a82645ebd5210d7f
parent047ba4c2fb052fb5187226fe5589a1be9d36b687 (diff)
parentdbaba2d2955aee0f475ad92fab2755314aa3f48a (diff)
downloademacs-ab455350da7728b0f8e1daf92c084092d8a04c29.tar.gz
emacs-ab455350da7728b0f8e1daf92c084092d8a04c29.zip
Merged from miles@gnu.org--gnu-2005 (patch 31-33, 129-141)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-129 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-130 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-131 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-132 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-133 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-134 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-135 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-136 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-137 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-138 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-139 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-140 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-141 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-31 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-32 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-33 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-302
-rw-r--r--admin/FOR-RELEASE18
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/ChangeLog139
-rw-r--r--lisp/calendar/calendar.el59
-rw-r--r--lisp/calendar/diary-lib.el6
-rw-r--r--lisp/cus-edit.el165
-rw-r--r--lisp/emacs-lisp/debug.el94
-rw-r--r--lisp/emacs-lisp/re-builder.el8
-rw-r--r--lisp/emacs-lisp/trace.el86
-rw-r--r--lisp/gnus/ChangeLog25
-rw-r--r--lisp/gnus/gnus-sum.el8
-rw-r--r--lisp/gnus/mm-decode.el15
-rw-r--r--lisp/international/utf-16.el8
-rw-r--r--lisp/mouse.el49
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/progmodes/perl-mode.el28
-rw-r--r--lisp/register.el6
-rw-r--r--lisp/replace.el8
-rw-r--r--lisp/reveal.el34
-rw-r--r--lisp/speedbar.el10
-rw-r--r--lisp/textmodes/flyspell.el5
-rw-r--r--lisp/textmodes/ispell.el5
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-history.el3
-rw-r--r--lisp/vc.el3
-rw-r--r--lispref/ChangeLog63
-rw-r--r--lispref/abbrevs.texi10
-rw-r--r--lispref/advice.texi33
-rw-r--r--lispref/backups.texi7
-rw-r--r--lispref/commands.texi52
-rw-r--r--lispref/elisp.texi1
-rw-r--r--lispref/help.texi10
-rw-r--r--lispref/keymaps.texi146
-rw-r--r--lispref/macros.texi9
-rw-r--r--lispref/markers.texi22
-rw-r--r--lispref/os.texi184
-rw-r--r--lispref/processes.texi123
-rw-r--r--lispref/sequences.texi21
-rw-r--r--lispref/syntax.texi42
-rw-r--r--lispref/tips.texi44
-rw-r--r--man/ChangeLog42
-rw-r--r--man/building.texi27
-rw-r--r--man/calendar.texi33
-rw-r--r--man/fixit.texi27
-rw-r--r--man/frames.texi6
-rw-r--r--man/m-x.texi12
-rw-r--r--man/mark.texi80
-rw-r--r--man/mini.texi54
-rw-r--r--man/screen.texi44
-rw-r--r--src/ChangeLog16
-rw-r--r--src/buffer.c2
-rw-r--r--src/dispextern.h2
-rw-r--r--src/gtkutil.c6
-rw-r--r--src/xdisp.c31
54 files changed, 1118 insertions, 827 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 72269d5533b..e4d0795cc67 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -232,13 +232,13 @@ people who have checked it.
232 232
233SECTION READERS 233SECTION READERS
234---------------------------------- 234----------------------------------
235lispref/abbrevs.texi "Luc Teirlinck" 235lispref/abbrevs.texi "Luc Teirlinck" Chong Yidong
236lispref/advice.texi Joakim Verona <joakim@verona.se> 236lispref/advice.texi joakim@verona.se Chong Yidong
237lispref/anti.texi 237lispref/anti.texi
238lispref/backups.texi "Luc Teirlinck" Chong Yidong 238lispref/backups.texi "Luc Teirlinck" Chong Yidong
239lispref/buffers.texi "Luc Teirlinck" Chong Yidong 239lispref/buffers.texi "Luc Teirlinck" Chong Yidong
240lispref/calendar.texi Joakim Verona <joakim@verona.se> 240lispref/calendar.texi Joakim Verona <joakim@verona.se>
241lispref/commands.texi "Luc Teirlinck" 241lispref/commands.texi "Luc Teirlinck" Chong Yidong
242lispref/compile.texi "Luc Teirlinck" Chong Yidong 242lispref/compile.texi "Luc Teirlinck" Chong Yidong
243lispref/control.texi "Luc Teirlinck" Chong Yidong 243lispref/control.texi "Luc Teirlinck" Chong Yidong
244lispref/customize.texi 244lispref/customize.texi
@@ -252,17 +252,17 @@ lispref/files.texi "Luc Teirlinck" Chong Yidong
252lispref/frames.texi "Luc Teirlinck" Chong Yidong 252lispref/frames.texi "Luc Teirlinck" Chong Yidong
253lispref/functions.texi "Luc Teirlinck" Chong Yidong 253lispref/functions.texi "Luc Teirlinck" Chong Yidong
254lispref/hash.texi "Luc Teirlinck" Chong Yidong 254lispref/hash.texi "Luc Teirlinck" Chong Yidong
255lispref/help.texi "Luc Teirlinck" 255lispref/help.texi "Luc Teirlinck" Chong Yidong
256lispref/hooks.texi 256lispref/hooks.texi
257lispref/internals.texi "Luc Teirlinck" 257lispref/internals.texi "Luc Teirlinck"
258lispref/intro.texi "Luc Teirlinck" 258lispref/intro.texi "Luc Teirlinck"
259lispref/keymaps.texi "Luc Teirlinck" 259lispref/keymaps.texi "Luc Teirlinck" Chong Yidong
260lispref/lists.texi "Luc Teirlinck" Chong Yidong 260lispref/lists.texi "Luc Teirlinck" Chong Yidong
261lispref/loading.texi "Luc Teirlinck" Chong Yidong 261lispref/loading.texi "Luc Teirlinck" Chong Yidong
262lispref/locals.texi 262lispref/locals.texi
263lispref/macros.texi "Luc Teirlinck" 263lispref/macros.texi "Luc Teirlinck" Chong Yidong
264lispref/maps.texi 264lispref/maps.texi
265lispref/markers.texi "Luc Teirlinck" 265lispref/markers.texi "Luc Teirlinck" Chong Yidong
266lispref/minibuf.texi "Luc Teirlinck" Chong Yidong 266lispref/minibuf.texi "Luc Teirlinck" Chong Yidong
267lispref/modes.texi Chong Yidong 267lispref/modes.texi Chong Yidong
268lispref/nonascii.texi "Luc Teirlinck" 268lispref/nonascii.texi "Luc Teirlinck"
@@ -270,7 +270,7 @@ lispref/numbers.texi "Luc Teirlinck" Chong Yidong
270lispref/objects.texi "Luc Teirlinck" Chong Yidong 270lispref/objects.texi "Luc Teirlinck" Chong Yidong
271lispref/os.texi "Luc Teirlinck" Chong Yidong 271lispref/os.texi "Luc Teirlinck" Chong Yidong
272lispref/positions.texi "Luc Teirlinck" Chong Yidong 272lispref/positions.texi "Luc Teirlinck" Chong Yidong
273lispref/processes.texi 273lispref/processes.texi Chong Yidong
274lispref/searching.texi "Luc Teirlinck" 274lispref/searching.texi "Luc Teirlinck"
275lispref/sequences.texi "Luc Teirlinck" Chong Yidong 275lispref/sequences.texi "Luc Teirlinck" Chong Yidong
276lispref/streams.texi "Luc Teirlinck" Chong Yidong 276lispref/streams.texi "Luc Teirlinck" Chong Yidong
diff --git a/etc/NEWS b/etc/NEWS
index 3e71209d05c..f1d17ef58bf 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -153,8 +153,8 @@ you release it).
153Dragging the Mouse-1 inside a link still performs the original 153Dragging the Mouse-1 inside a link still performs the original
154drag-mouse-1 action, typically copy the text. 154drag-mouse-1 action, typically copy the text.
155 155
156You can customize the new Mouse-1 behavior via the new user option 156You can customize the new Mouse-1 behavior via the new user options
157`mouse-1-click-follows-link'. 157`mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'.
158 158
159+++ 159+++
160** require-final-newline now has two new possible values: 160** require-final-newline now has two new possible values:
@@ -1599,6 +1599,9 @@ count backward from the end of the year.
1599prompts for a year and a week number, and moves to the first 1599prompts for a year and a week number, and moves to the first
1600day of that ISO week. 1600day of that ISO week.
1601 1601
1602** The new variable `calendar-minimum-window-height' affects the
1603window generated by the function `generate-calendar-window'.
1604
1602--- 1605---
1603** The functions `holiday-easter-etc' and `holiday-advent' now take 1606** The functions `holiday-easter-etc' and `holiday-advent' now take
1604optional arguments, in order to only report on the specified holiday 1607optional arguments, in order to only report on the specified holiday
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7d48d8704eb..7c3842ea3a5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,11 +1,109 @@
12005-02-28 Chong Yidong" <cyd@stupidchicken.com> (tiny change)
2
3 * international/utf-16.el (ccl-encode-mule-utf-16le): Fix
4 BUFFER_MAGNIFICATION to 2.
5 (ccl-encode-mule-utf-16be): Likewise.
6
72005-02-28 Kenichi Handa <handa@m17n.org>
8
9 * international/utf-16.el (ccl-encode-mule-utf-16le-with-signature):
10 Fix BUFFER_MAGNIFICATION to 4.
11 (ccl-encode-mule-utf-16be-with-signature): Likewise.
12
132005-02-28 Nick Roberts <nickrob@snap.net.nz>
14
15 * speedbar.el (speedbar-update-flag): Doc fix.
16 (speedbar-show-info-under-mouse): Give set-mouse-position the right
17 argument.
18
192005-02-27 Stefan Monnier <monnier@iro.umontreal.ca>
20
21 * reveal.el (reveal-post-command): Don't try to reveal overlays which
22 have a non-nil `invisible' property but are actually visible.
23
24 * progmodes/perl-mode.el (perl-imenu-generic-expression): Add entries
25 for perldoc sections.
26 (perl-outline-regexp, perl-outline-level): New var and function.
27 (perl-mode): Use them.
28
292005-02-27 Glenn Morris <gmorris@ast.cam.ac.uk>
30
31 * calendar/diary-lib.el (diary-remind): Discard any mark portion
32 from diary-entry. Reported by Andrew Kemp <ajwk@pell.uklinux.net>.
33
342005-02-27 Luc Teirlinck <teirllm@auburn.edu>
35
36 * cus-edit.el: Comment change.
37 (custom-buffer-create-internal): Slightly reword text at top of
38 Custom buffers. Mention there that saving an option edits the
39 init file. Add link to Emacs manual node on `custom-file'.
40 (custom-magic-alist): Rewrite individual State messages to use
41 capitalized keywords. Doc fix.
42
432005-02-27 Matt Hodges <MPHodges@member.fsf.org>
44
45 * calendar/calendar.el (calendar-buffer): Move above
46 calendar-week-start-day.
47 (calendar-week-start-day): Doc fix. Add :set function.
48 (calendar-minimum-window-height): New variable.
49 (generate-calendar-window): Only resize window if selected-window
50 is displaying the calendar buffer. Use new variable
51 calendar-minimum-window-height.
52 (generate-calendar): Reword error message.
53 (calendar-mode-map): Bind DEL to scroll-other-window-down.
54
552005-02-27 Andreas Schwab <schwab@suse.de>
56
57 * vc.el (vc-do-command): Don't run command asynchronously when
58 operating in a remote directory.
59
60 * net/tramp.el (tramp-file-name-for-operation): Fix misapplied
61 change from sync with Tramp 2.0.47.
62
632005-02-27 Richard M. Stallman <rms@gnu.org>
64
65 * textmodes/ispell.el (ispell-change-dictionary): Doc fix.
66
67 * textmodes/flyspell.el (flyspell-mode-on):
68 Call ispell-change-dictionary only if necessary.
69
70 * emacs-lisp/re-builder.el (regexp-builder): New function.
71
72 * register.el (describe-register-1): Explicitly handle
73 yank-excluded-properties = t.
74
75 * cus-edit.el (custom-buffer-create-internal): Improve progress msgs.
76 (custom-magic-alist): Change the status descriptions again.
77 (face widget-type): Total rewrite based on `restricted-sexp'
78 to eliminate the confusing double hiding levels.
79
80 * emacs-lisp/debug.el (debug-on-entry-1):
81 If function body is empty, add nil as body form.
82
832005-02-26 Stefan Monnier <monnier@iro.umontreal.ca>
84
85 * emacs-lisp/trace.el (inhibit-trace): New var.
86 (trace-make-advice): Use it.
87
88 * emacs-lisp/debug.el (debug): Put back the inhibit-trace.
89
902005-02-26 Kim F. Storm <storm@cua.dk>
91
92 * mouse.el (mouse-1-click-in-non-selected-windows): New defcustom.
93 (mouse-on-link-p, mouse-drag-region-1): Use it.
94
952005-02-25 Lute Kamstra <lute@gnu.org>
96
97 * replace.el (query-replace-read-from): Fix 2005-02-19 change.
98
12005-02-24 Luc Teirlinck <teirllm@auburn.edu> 992005-02-24 Luc Teirlinck <teirllm@auburn.edu>
2 100
3 * frame.el (blink-cursor-mode): Add :group keyword. 101 * frame.el (blink-cursor-mode): Add :group keyword.
4 102
52005-02-24 Ulf Jasper <ulf.jasper@web.de> 1032005-02-24 Ulf Jasper <ulf.jasper@web.de>
6 104
7 * calendar/icalendar.el (icalendar--decode-isodatetime): New 105 * calendar/icalendar.el (icalendar--decode-isodatetime):
8 optional argument DAY-SHIFT. 106 New optional argument DAY-SHIFT.
9 (icalendar-export-region): Fix coding-system-for-write. 107 (icalendar-export-region): Fix coding-system-for-write.
10 (icalendar--convert-ical-to-diary): Shift end-day of all-day 108 (icalendar--convert-ical-to-diary): Shift end-day of all-day
11 events by one. 109 events by one.
@@ -20,6 +118,13 @@
20 during redisplay. Call force-window-update after read-event 118 during redisplay. Call force-window-update after read-event
21 and delete-region to signal that window is not accurate. 119 and delete-region to signal that window is not accurate.
22 120
1212005-02-23 Stefan Monnier <monnier@iro.umontreal.ca>
122
123 * emacs-lisp/debug.el (debug): Hide the buffer if it's not killed.
124 Remove unused and inexistent var `inhibit-trace'.
125 (debugger-mode): Use run-mode-hooks.
126 (debugger-list-functions): Add buttons; setup xref stack.
127
232005-02-23 Richard M. Stallman <rms@gnu.org> 1282005-02-23 Richard M. Stallman <rms@gnu.org>
24 129
25 * calendar/appt.el (appt-time-msg-list): 3rd elt of each 130 * calendar/appt.el (appt-time-msg-list): 3rd elt of each
@@ -152,8 +257,8 @@
152 * viper-util.el (viper-glob-unix-files): Fix shell status check. 257 * viper-util.el (viper-glob-unix-files): Fix shell status check.
153 (viper-file-remote-p): Make equivalent to file-remote-p. 258 (viper-file-remote-p): Make equivalent to file-remote-p.
154 259
155 * viper.el (viper-major-mode-modifier-list): Use 260 * viper.el (viper-major-mode-modifier-list):
156 viper-gnus-modifier-map. 261 Use viper-gnus-modifier-map.
157 262
1582005-02-19 David Kastrup <dak@gnu.org> 2632005-02-19 David Kastrup <dak@gnu.org>
159 264
@@ -163,7 +268,7 @@
1632005-02-19 Jay Belanger <belanger@truman.edu> 2682005-02-19 Jay Belanger <belanger@truman.edu>
164 269
165 * calc/calc-math.el (calc-arctan, calc-tanh, calc-arctanh): 270 * calc/calc-math.el (calc-arctan, calc-tanh, calc-arctanh):
166 Removed extra definitions. 271 Remove extra definitions.
167 (calc-coth): New function. 272 (calc-coth): New function.
168 (calcFunc-cot): Fix `let'. 273 (calcFunc-cot): Fix `let'.
169 274
@@ -180,8 +285,8 @@
180 query-replace-from-history-variable to handle the case of an empty 285 query-replace-from-history-variable to handle the case of an empty
181 string entered to accept the suggested default. 286 string entered to accept the suggested default.
182 287
183 * net/tramp.el (tramp-file-name-for-operation): Use 288 * net/tramp.el (tramp-file-name-for-operation):
184 dired-call-process instead of dired-call-process-command. 289 Use dired-call-process instead of dired-call-process-command.
185 290
1862005-02-19 Jay Belanger <belanger@truman.edu> 2912005-02-19 Jay Belanger <belanger@truman.edu>
187 292
@@ -202,22 +307,22 @@
202 307
2032005-02-19 Michael Kifer <kifer@cs.stonybrook.edu> 3082005-02-19 Michael Kifer <kifer@cs.stonybrook.edu>
204 309
205 * ediff.el (ediff-set-diff-overlays-in-one-buffer, 310 * ediff.el (ediff-set-diff-overlays-in-one-buffer)
206 ediff-set-fine-overlays-in-one-buffer,ediff-goto-word) make sure 311 (ediff-set-fine-overlays-in-one-buffer,ediff-goto-word): Make sure
207 we use the syntax table of the correct buffer. 312 we use the syntax table of the correct buffer.
208 (ediff-same-file-contents,ediff-same-contents): enhancements thanks to 313 (ediff-same-file-contents,ediff-same-contents): Enhancements thanks to
209 Felix Gatzemeier. 314 Felix Gatzemeier.
210 315
211 * ediff-init.el (ediff-hide-face): checks for definedness of functions. 316 * ediff-init.el (ediff-hide-face): Check for definedness of functions.
212 (ediff-file-remote-p): make synonymous with file-remote-p. 317 (ediff-file-remote-p): Make synonymous with file-remote-p.
213 In all deffaces ediff-*-face-*, use min-colors. 318 In all deffaces ediff-*-face-*, use min-colors.
214 319
215 * ediff-mult.el (ediff-meta-mark-equal-files): make use of 320 * ediff-mult.el (ediff-meta-mark-equal-files): Make use of
216 ediff-recurse-to-subdirectories. 321 ediff-recurse-to-subdirectories.
217 (ediff-mark-if-equal): check that the arguments are strings, use 322 (ediff-mark-if-equal): Check that the arguments are strings, use
218 ediff-same-contents (after to Felix Gatzemeier). 323 ediff-same-contents (after to Felix Gatzemeier).
219 324
220 * ediff.el (ediff-merge-on-startup): don't set buffer-modified-p to 325 * ediff.el (ediff-merge-on-startup): Don't set buffer-modified-p to
221 nil. 326 nil.
222 327
2232005-02-18 Stefan Monnier <monnier@iro.umontreal.ca> 3282005-02-18 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -287,7 +392,7 @@
2872005-02-15 Jay Belanger <belanger@truman.edu> 3922005-02-15 Jay Belanger <belanger@truman.edu>
288 393
289 * calc/calc-alg.el: Add simplification rules for calcFunc-sec, 394 * calc/calc-alg.el: Add simplification rules for calcFunc-sec,
290 calcFunc-csc, calcFunc-cot, calcFunc-sech, calcFunc-csch and 395 calcFunc-csc, calcFunc-cot, calcFunc-sech, calcFunc-csch, and
291 calcFunc-coth. 396 calcFunc-coth.
292 (math-simplify-sqrt): Add simplifications. 397 (math-simplify-sqrt): Add simplifications.
293 398
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 88d6aee513f..291452db080 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1,7 +1,7 @@
1;;; calendar.el --- calendar functions 1;;; calendar.el --- calendar functions
2 2
3;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 3;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997,
4;; 2000, 2001, 2003, 2004 Free Software Foundation, Inc. 4;; 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 6;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> 7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
@@ -141,11 +141,25 @@
141 :group 'calendar) 141 :group 'calendar)
142 142
143 143
144(defconst calendar-buffer "*Calendar*"
145 "Name of the buffer used for the calendar.")
146
144;;;###autoload 147;;;###autoload
145(defcustom calendar-week-start-day 0 148(defcustom calendar-week-start-day 0
146 "*The day of the week on which a week in the calendar begins. 149 "*The day of the week on which a week in the calendar begins.
1470 means Sunday (default), 1 means Monday, and so on." 1500 means Sunday (default), 1 means Monday, and so on.
151
152If you change this variable directly (without using customize)
153after starting `calendar', you should call `redraw-calendar' to
154update the calendar display to reflect the change, otherwise
155movement commands will not work correctly."
148 :type 'integer 156 :type 'integer
157 :set (lambda (sym val)
158 (set sym val)
159 (let ((buffer (get-buffer calendar-buffer)))
160 (when (buffer-live-p buffer)
161 (with-current-buffer buffer
162 (redraw-calendar)))))
149 :group 'calendar) 163 :group 'calendar)
150 164
151;;;###autoload 165;;;###autoload
@@ -1303,9 +1317,6 @@ with descriptive strings such as
1303 :type 'sexp 1317 :type 'sexp
1304 :group 'holidays) 1318 :group 'holidays)
1305 1319
1306(defconst calendar-buffer "*Calendar*"
1307 "Name of the buffer used for the calendar.")
1308
1309(defconst holiday-buffer "*Holidays*" 1320(defconst holiday-buffer "*Holidays*"
1310 "Name of the buffer used for the displaying the holidays.") 1321 "Name of the buffer used for the displaying the holidays.")
1311 1322
@@ -1563,7 +1574,7 @@ return negative results."
1563The choices are: `one-frame' (calendar and diary together in one separate, 1574The choices are: `one-frame' (calendar and diary together in one separate,
1564dedicated frame); `two-frames' (calendar and diary in separate, dedicated 1575dedicated frame); `two-frames' (calendar and diary in separate, dedicated
1565frames); `calendar-only' (calendar in a separate, dedicated frame); with 1576frames); `calendar-only' (calendar in a separate, dedicated frame); with
1566any other value the current frame is used. Using any of the first 1577any other value the current frame is used. Using any of the first
1567three options overrides the value of `view-diary-entries-initially'." 1578three options overrides the value of `view-diary-entries-initially'."
1568 :type '(choice 1579 :type '(choice
1569 (const :tag "calendar and diary in separate frame" one-frame) 1580 (const :tag "calendar and diary in separate frame" one-frame)
@@ -1572,6 +1583,12 @@ three options overrides the value of `view-diary-entries-initially'."
1572 (const :tag "use current frame" nil)) 1583 (const :tag "use current frame" nil))
1573 :group 'calendar) 1584 :group 'calendar)
1574 1585
1586(defcustom calendar-minimum-window-height 8
1587 "Minimum height `generate-calendar-window' should use for calendar window."
1588 :type 'integer
1589 :version "22.1"
1590 :group 'calendar)
1591
1575;;;###autoload 1592;;;###autoload
1576(defun calendar (&optional arg) 1593(defun calendar (&optional arg)
1577 "Choose between the one frame, two frame, or basic calendar displays. 1594 "Choose between the one frame, two frame, or basic calendar displays.
@@ -2039,28 +2056,33 @@ Or, for optional MON, YR."
2039 (or (not mon) 2056 (or (not mon)
2040 (let ((offset (calendar-interval mon yr month year))) 2057 (let ((offset (calendar-interval mon yr month year)))
2041 (and (<= offset 1) (>= offset -1))))) 2058 (and (<= offset 1) (>= offset -1)))))
2042 (day-in-week (calendar-day-of-week today))) 2059 (day-in-week (calendar-day-of-week today))
2060 (in-calendar-window (eq (window-buffer (selected-window))
2061 (get-buffer calendar-buffer))))
2043 (update-calendar-mode-line) 2062 (update-calendar-mode-line)
2044 (if mon 2063 (if mon
2045 (generate-calendar mon yr) 2064 (generate-calendar mon yr)
2046 (generate-calendar month year)) 2065 (generate-calendar month year))
2047 (calendar-cursor-to-visible-date 2066 (calendar-cursor-to-visible-date
2048 (if today-visible today (list displayed-month 1 displayed-year))) 2067 (if today-visible today (list displayed-month 1 displayed-year)))
2049 (set-buffer-modified-p nil) 2068 (set-buffer-modified-p nil)
2050 (if (or (one-window-p t) (/= (frame-width) (window-width))) 2069 ;; Don't do any window-related stuff if we weren't called from a
2051 ;; Don't mess with the window size, but ensure that the first 2070 ;; window displaying the calendar
2052 ;; line is fully visible 2071 (when in-calendar-window
2053 (set-window-vscroll nil 0) 2072 (if (or (one-window-p t) (/= (frame-width) (window-width)))
2054 ;; Adjust the window to exactly fit the displayed calendar 2073 ;; Don't mess with the window size, but ensure that the first
2055 (fit-window-to-buffer)) 2074 ;; line is fully visible
2056 (sit-for 0) 2075 (set-window-vscroll nil 0)
2076 ;; Adjust the window to exactly fit the displayed calendar
2077 (fit-window-to-buffer nil nil calendar-minimum-window-height))
2078 (sit-for 0))
2057 (if (and (boundp 'font-lock-mode) 2079 (if (and (boundp 'font-lock-mode)
2058 font-lock-mode) 2080 font-lock-mode)
2059 (font-lock-fontify-buffer)) 2081 (font-lock-fontify-buffer))
2060 (and mark-holidays-in-calendar 2082 (and mark-holidays-in-calendar
2061;;; (calendar-date-is-legal-p today) ; useful for BC dates 2083;;; (calendar-date-is-legal-p today) ; useful for BC dates
2062 (mark-calendar-holidays) 2084 (mark-calendar-holidays)
2063 (sit-for 0)) 2085 (and in-calendar-window (sit-for 0)))
2064 (unwind-protect 2086 (unwind-protect
2065 (if mark-diary-entries-in-calendar (mark-diary-entries)) 2087 (if mark-diary-entries-in-calendar (mark-diary-entries))
2066 (if today-visible 2088 (if today-visible
@@ -2071,10 +2093,10 @@ Or, for optional MON, YR."
2071 "Generate a three-month Gregorian calendar centered around MONTH, YEAR." 2093 "Generate a three-month Gregorian calendar centered around MONTH, YEAR."
2072;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. 2094;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on.
2073;;; Note that while calendars for years BC could be displayed as it 2095;;; Note that while calendars for years BC could be displayed as it
2074;;; stands, almost all other calendar functions (eg holidays) would 2096;;; stands, almost all other calendar functions (eg holidays) would
2075;;; at best have unpredictable results for such dates. 2097;;; at best have unpredictable results for such dates.
2076 (if (< (+ month (* 12 (1- year))) 2) 2098 (if (< (+ month (* 12 (1- year))) 2)
2077 (error "Months before February, 1 AD are not available")) 2099 (error "Months before January, 1 AD cannot be displayed"))
2078 (setq displayed-month month 2100 (setq displayed-month month
2079 displayed-year year) 2101 displayed-year year)
2080 (erase-buffer) 2102 (erase-buffer)
@@ -2229,6 +2251,7 @@ the inserted text. Value is always t."
2229 (define-key calendar-mode-map "S" 'calendar-sunrise-sunset) 2251 (define-key calendar-mode-map "S" 'calendar-sunrise-sunset)
2230 (define-key calendar-mode-map "M" 'calendar-phases-of-moon) 2252 (define-key calendar-mode-map "M" 'calendar-phases-of-moon)
2231 (define-key calendar-mode-map " " 'scroll-other-window) 2253 (define-key calendar-mode-map " " 'scroll-other-window)
2254 (define-key calendar-mode-map (kbd "DEL") 'scroll-other-window-down)
2232 (define-key calendar-mode-map "\C-c\C-l" 'redraw-calendar) 2255 (define-key calendar-mode-map "\C-c\C-l" 'redraw-calendar)
2233 (define-key calendar-mode-map "." 'calendar-goto-today) 2256 (define-key calendar-mode-map "." 'calendar-goto-today)
2234 (define-key calendar-mode-map "o" 'calendar-other-month) 2257 (define-key calendar-mode-map "o" 'calendar-other-month)
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index ecbafd24430..5fbae2500d7 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1625,8 +1625,10 @@ marked on the calendar."
1625 (or (not marking-diary-entries) marking)) 1625 (or (not marking-diary-entries) marking))
1626 (let ((date (calendar-gregorian-from-absolute 1626 (let ((date (calendar-gregorian-from-absolute
1627 (+ (calendar-absolute-from-gregorian date) days)))) 1627 (+ (calendar-absolute-from-gregorian date) days))))
1628 (if (setq diary-entry (eval sexp)) 1628 (when (setq diary-entry (eval sexp)) ; re-evaluate with adjusted date
1629 (mapconcat 'eval diary-remind-message "")))) 1629 ;; Discard any mark portion from diary-anniversary, etc.
1630 (if (consp diary-entry) (setq diary-entry (cdr diary-entry)))
1631 (mapconcat 'eval diary-remind-message ""))))
1630 ;; Diary entry may apply to one of a list of days before date 1632 ;; Diary entry may apply to one of a list of days before date
1631 ((and (listp days) days) 1633 ((and (listp days) days)
1632 (or (diary-remind sexp (car days) marking) 1634 (or (diary-remind sexp (car days) marking)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 85772094c9a..fb76aa6c3d8 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -121,10 +121,11 @@
121;; 6. rogue 121;; 6. rogue
122 122
123;; There is no standard value. This means that the variable was 123;; There is no standard value. This means that the variable was
124;; not defined with defcustom. You can not create a Custom buffer 124;; not defined with defcustom, nor handled in cus-start.el. You
125;; for such variables using the normal interactive Custom commands. 125;; can not create a Custom buffer for such variables using the
126;; However, such Custom buffers can be created in other ways, for 126;; normal interactive Custom commands. However, such Custom
127;; instance, by calling `customize-option' non-interactively. 127;; buffers can be created in other ways, for instance, by calling
128;; `customize-option' non-interactively.
128 129
129;; 7. hidden 130;; 7. hidden
130 131
@@ -1367,7 +1368,6 @@ Otherwise use brackets."
1367 :group 'custom-buffer) 1368 :group 'custom-buffer)
1368 1369
1369(defun custom-buffer-create-internal (options &optional description) 1370(defun custom-buffer-create-internal (options &optional description)
1370 (message "Creating customization buffer...")
1371 (custom-mode) 1371 (custom-mode)
1372 (if custom-buffer-verbose-help 1372 (if custom-buffer-verbose-help
1373 (progn 1373 (progn
@@ -1377,17 +1377,23 @@ Otherwise use brackets."
1377 (widget-insert (format ". 1377 (widget-insert (format ".
1378%s show active fields; type RET or click mouse-1 1378%s show active fields; type RET or click mouse-1
1379on an active field to invoke its action. Editing an option value 1379on an active field to invoke its action. Editing an option value
1380changes the text in the buffer; invoke the State button and 1380changes only the text in the buffer. Invoke the State button to set or
1381choose the Set operation to set the option value. 1381save the option value. Saving an option normally edits your init file.
1382Invoke " (if custom-raised-buttons 1382Invoke "
1383 "`Raised' buttons" 1383 (if custom-raised-buttons
1384 "Square brackets"))) 1384 "`Raised' buttons"
1385 "Square brackets")))
1386 (widget-create 'info-link
1387 :tag "Custom file"
1388 "(emacs)Saving Customizations")
1389 (widget-insert
1390 " for information on how to save in a different file.
1391Invoke ")
1385 (widget-create 'info-link 1392 (widget-create 'info-link
1386 :tag "Help" 1393 :tag "Help"
1387 :help-echo "Read the online help." 1394 :help-echo "Read the online help."
1388 "(emacs)Easy Customization") 1395 "(emacs)Easy Customization")
1389 (widget-insert " for more information.\n\n") 1396 (widget-insert " for general information.\n\n")
1390 (message "Creating customization buttons...")
1391 (widget-insert "Operate on everything in this buffer:\n ")) 1397 (widget-insert "Operate on everything in this buffer:\n "))
1392 (widget-insert " ")) 1398 (widget-insert " "))
1393 (widget-create 'push-button 1399 (widget-create 'push-button
@@ -1478,13 +1484,15 @@ Un-customize all values in this buffer. They get their standard settings."
1478 (unless (eq (preceding-char) ?\n) 1484 (unless (eq (preceding-char) ?\n)
1479 (widget-insert "\n")) 1485 (widget-insert "\n"))
1480 (message "Creating customization items ...done") 1486 (message "Creating customization items ...done")
1487 (message "Resetting customization items...")
1481 (unless (eq custom-buffer-style 'tree) 1488 (unless (eq custom-buffer-style 'tree)
1482 (mapc 'custom-magic-reset custom-options)) 1489 (mapc 'custom-magic-reset custom-options))
1490 (message "Resetting customization items...done")
1483 (message "Creating customization setup...") 1491 (message "Creating customization setup...")
1484 (widget-setup) 1492 (widget-setup)
1485 (buffer-enable-undo) 1493 (buffer-enable-undo)
1486 (goto-char (point-min)) 1494 (goto-char (point-min))
1487 (message "Creating customization buffer...done")) 1495 (message "Creating customization setup...done"))
1488 1496
1489;;; The Tree Browser. 1497;;; The Tree Browser.
1490 1498
@@ -1665,31 +1673,31 @@ item in another window.\n\n"))
1665 1673
1666(defconst custom-magic-alist 1674(defconst custom-magic-alist
1667 '((nil "#" underline "\ 1675 '((nil "#" underline "\
1668uninitialized, you should not see this.") 1676UNINITIALIZED, you should not see this.")
1669 (unknown "?" italic "\ 1677 (unknown "?" italic "\
1670unknown, you should not see this.") 1678UNKNOWN, you should not see this.")
1671 (hidden "-" default "\ 1679 (hidden "-" default "\
1672hidden, invoke \"Show\" in the previous line to show." "\ 1680HIDDEN, invoke \"Show\" in the previous line to show." "\
1673group now hidden, invoke \"Show\", above, to show contents.") 1681group now hidden, invoke \"Show\", above, to show contents.")
1674 (invalid "x" custom-invalid-face "\ 1682 (invalid "x" custom-invalid-face "\
1675the value displayed for this %c is invalid and cannot be set.") 1683INVALID, the displayed value cannot be set.")
1676 (modified "*" custom-modified-face "\ 1684 (modified "*" custom-modified-face "\
1677you have edited the value as text, but you have not set the %c." "\ 1685EDITED, shown value does not take effect until you set or save it." "\
1678you have edited something in this group, but not set anything yet.") 1686something in this group has been edited but not set.")
1679 (set "+" custom-set-face "\ 1687 (set "+" custom-set-face "\
1680you have set this %c, but not saved it for future sessions." "\ 1688SET for current session only." "\
1681you have set something in this group, but not saved anything yet.") 1689something in this group has been set but not saved.")
1682 (changed ":" custom-changed-face "\ 1690 (changed ":" custom-changed-face "\
1683this %c has been changed outside the customize buffer." "\ 1691CHANGED outside Customize; operating on it here may be unreliable." "\
1684something in this group has been changed outside customize.") 1692something in this group has been changed outside customize.")
1685 (saved "!" custom-saved-face "\ 1693 (saved "!" custom-saved-face "\
1686You have set this %c and saved it through Customize in your init file." "\ 1694SAVED and set." "\
1687something in this group has been set and saved.") 1695something in this group has been set and saved.")
1688 (rogue "@" custom-rogue-face "\ 1696 (rogue "@" custom-rogue-face "\
1689this %c has not been changed with customize." "\ 1697NO CUSTOMIZATION DATA; you should not see this." "\
1690something in this group is not prepared for customization.") 1698something in this group is not prepared for customization.")
1691 (standard " " nil "\ 1699 (standard " " nil "\
1692this %c is unchanged from its standard setting." "\ 1700STANDARD." "\
1693visible group members are all at standard settings.")) 1701visible group members are all at standard settings."))
1694 "Alist of customize option states. 1702 "Alist of customize option states.
1695Each entry is of the form (STATE MAGIC FACE ITEM-DESC [ GROUP-DESC ]), where 1703Each entry is of the form (STATE MAGIC FACE ITEM-DESC [ GROUP-DESC ]), where
@@ -1709,7 +1717,7 @@ STATE is one of the following symbols:
1709`set' 1717`set'
1710 This item has been set but not saved. 1718 This item has been set but not saved.
1711`changed' 1719`changed'
1712 The current value of this item has been changed temporarily. 1720 The current value of this item has been changed outside Customize.
1713`saved' 1721`saved'
1714 This item is marked for saving. 1722 This item is marked for saving.
1715`rogue' 1723`rogue'
@@ -3285,54 +3293,69 @@ restoring it to the state of a face that has never been customized."
3285 3293
3286;;; The `face' Widget. 3294;;; The `face' Widget.
3287 3295
3288(define-widget 'face 'default 3296(defvar widget-face-prompt-value-history nil
3289 "Select and customize a face." 3297 "History of input to `widget-face-prompt-value'.")
3290 :convert-widget 'widget-value-convert-widget 3298
3291 :button-prefix 'widget-push-button-prefix 3299(define-widget 'face 'restricted-sexp
3292 :button-suffix 'widget-push-button-suffix 3300 "A Lisp face name."
3293 :format "%{%t%}: %[select face%] %v" 3301 :complete-function (lambda ()
3294 :tag "Face" 3302 (interactive)
3295 :value 'default 3303 (lisp-complete-symbol 'facep))
3304 :prompt-value 'widget-field-prompt-value
3305 :prompt-internal 'widget-symbol-prompt-internal
3306 :prompt-match 'facep
3307 :prompt-history 'widget-face-prompt-value-history
3296 :value-create 'widget-face-value-create 3308 :value-create 'widget-face-value-create
3297 :value-delete 'widget-face-value-delete 3309 :action 'widget-field-action
3298 :value-get 'widget-value-value-get 3310 :match-alternatives '(facep)
3299 :validate 'widget-children-validate 3311 :validate (lambda (widget)
3300 :action 'widget-face-action 3312 (unless (facep (widget-value widget))
3301 :match (lambda (widget value) (symbolp value))) 3313 (widget-put widget :error (format "Invalid face: %S"
3314 (widget-value widget)))
3315 widget))
3316 :value 'ignore
3317 :tag "Function")
3318
3319
3320;;; There is a bug here: the sample doesn't get redisplayed
3321;;; in the new font when you specify one. Does anyone know how to
3322;;; make that work? -- rms.
3302 3323
3303(defun widget-face-value-create (widget) 3324(defun widget-face-value-create (widget)
3304 "Create a `custom-face' child." 3325 "Create an editable face name field."
3305 (let* ((symbol (widget-value widget)) 3326 (let ((buttons (widget-get widget :buttons))
3306 (custom-buffer-style 'face) 3327 (symbol (widget-get widget :value)))
3307 (child (widget-create-child-and-convert 3328 ;; Sample.
3308 widget 'custom-face 3329 (push (widget-create-child-and-convert widget 'item
3309 :custom-level nil 3330 :format "(%{%t%})"
3310 :value symbol))) 3331 :sample-face symbol
3311 (custom-magic-reset child) 3332 :tag "sample")
3312 (setq custom-options (cons child custom-options)) 3333 buttons)
3313 (widget-put widget :children (list child)))) 3334 (insert " ")
3314 3335 ;; Update buttons.
3315(defun widget-face-value-delete (widget) 3336 (widget-put widget :buttons buttons))
3316 "Remove the child from the options." 3337
3317 (let ((child (car (widget-get widget :children)))) 3338 (let ((size (widget-get widget :size))
3318 (setq custom-options (delq child custom-options)) 3339 (value (widget-get widget :value))
3319 (widget-children-value-delete widget))) 3340 (from (point))
3320 3341 ;; This is changed to a real overlay in `widget-setup'. We
3321(defvar face-history nil 3342 ;; need the end points to behave differently until
3322 "History of entered face names.") 3343 ;; `widget-setup' is called.
3323 3344 (overlay (cons (make-marker) (make-marker))))
3324(defun widget-face-action (widget &optional event) 3345 (widget-put widget :field-overlay overlay)
3325 "Prompt for a face." 3346 (insert value)
3326 (let ((answer (completing-read "Face: " 3347 (and size
3327 (mapcar (lambda (face) 3348 (< (length value) size)
3328 (list (symbol-name face))) 3349 (insert-char ?\ (- size (length value))))
3329 (face-list)) 3350 (unless (memq widget widget-field-list)
3330 nil nil nil 3351 (setq widget-field-new (cons widget widget-field-new)))
3331 'face-history))) 3352 (move-marker (cdr overlay) (point))
3332 (unless (zerop (length answer)) 3353 (set-marker-insertion-type (cdr overlay) nil)
3333 (widget-value-set widget (intern answer)) 3354 (when (null size)
3334 (widget-apply widget :notify widget event) 3355 (insert ?\n))
3335 (widget-setup)))) 3356 (move-marker (car overlay) from)
3357 (set-marker-insertion-type (car overlay) t)))
3358
3336 3359
3337;;; The `hook' Widget. 3360;;; The `hook' Widget.
3338 3361
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index a84a7aca52c..58fb3b4a1b8 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -1,6 +1,7 @@
1;;; debug.el --- debuggers and related commands for Emacs 1;;; debug.el --- debuggers and related commands for Emacs
2 2
3;; Copyright (C) 1985, 1986, 1994, 2001, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 1986, 1994, 2001, 2003, 2005
4;; Free Software Foundation, Inc.
4 5
5;; Maintainer: FSF 6;; Maintainer: FSF
6;; Keywords: lisp, tools, maint 7;; Keywords: lisp, tools, maint
@@ -197,15 +198,16 @@ first will be printed into the backtrace buffer."
197 (recursive-edit))))) 198 (recursive-edit)))))
198 ;; Kill or at least neuter the backtrace buffer, so that users 199 ;; Kill or at least neuter the backtrace buffer, so that users
199 ;; don't try to execute debugger commands in an invalid context. 200 ;; don't try to execute debugger commands in an invalid context.
200 (if (get-buffer-window debugger-buffer 'visible) 201 (if (get-buffer-window debugger-buffer 0)
201 ;; Still visible despite the save-window-excursion? Maybe it 202 ;; Still visible despite the save-window-excursion? Maybe it
202 ;; it's in a pop-up frame. It would be annoying to delete and 203 ;; it's in a pop-up frame. It would be annoying to delete and
203 ;; recreate it every time the debugger stops, so instead we'll 204 ;; recreate it every time the debugger stops, so instead we'll
204 ;; erase it but leave it visible. 205 ;; erase it and hide it but keep it alive.
205 (save-excursion 206 (with-current-buffer debugger-buffer
206 (set-buffer debugger-buffer)
207 (erase-buffer) 207 (erase-buffer)
208 (fundamental-mode)) 208 (fundamental-mode)
209 (with-selected-window (get-buffer-window debugger-buffer 0)
210 (bury-buffer)))
209 (kill-buffer debugger-buffer)) 211 (kill-buffer debugger-buffer))
210 (set-match-data debugger-outer-match-data))) 212 (set-match-data debugger-outer-match-data)))
211 ;; Put into effect the modified values of these variables 213 ;; Put into effect the modified values of these variables
@@ -543,29 +545,26 @@ Applies to the frame whose line point is on in the backtrace."
543 'read-expression-history))) 545 'read-expression-history)))
544 (debugger-env-macro (eval-expression exp))) 546 (debugger-env-macro (eval-expression exp)))
545 547
546(defvar debugger-mode-map nil) 548(defvar debugger-mode-map
547(unless debugger-mode-map 549 (let ((map (make-keymap)))
548 (let ((loop ? )) 550 (set-keymap-parent map button-buffer-map)
549 (setq debugger-mode-map (make-keymap)) 551 (suppress-keymap map)
550 (set-keymap-parent debugger-mode-map button-buffer-map) 552 (define-key map "-" 'negative-argument)
551 (suppress-keymap debugger-mode-map) 553 (define-key map "b" 'debugger-frame)
552 (define-key debugger-mode-map "-" 'negative-argument) 554 (define-key map "c" 'debugger-continue)
553 (define-key debugger-mode-map "b" 'debugger-frame) 555 (define-key map "j" 'debugger-jump)
554 (define-key debugger-mode-map "c" 'debugger-continue) 556 (define-key map "r" 'debugger-return-value)
555 (define-key debugger-mode-map "j" 'debugger-jump) 557 (define-key map "u" 'debugger-frame-clear)
556 (define-key debugger-mode-map "r" 'debugger-return-value) 558 (define-key map "d" 'debugger-step-through)
557 (define-key debugger-mode-map "u" 'debugger-frame-clear) 559 (define-key map "l" 'debugger-list-functions)
558 (define-key debugger-mode-map "d" 'debugger-step-through) 560 (define-key map "h" 'describe-mode)
559 (define-key debugger-mode-map "l" 'debugger-list-functions) 561 (define-key map "q" 'top-level)
560 (define-key debugger-mode-map "h" 'describe-mode) 562 (define-key map "e" 'debugger-eval-expression)
561 (define-key debugger-mode-map "q" 'top-level) 563 (define-key map " " 'next-line)
562 (define-key debugger-mode-map "e" 'debugger-eval-expression) 564 (define-key map "R" 'debugger-record-expression)
563 (define-key debugger-mode-map " " 'next-line) 565 (define-key map "\C-m" 'help-follow)
564 (define-key debugger-mode-map "R" 'debugger-record-expression) 566 (define-key map [mouse-2] 'push-button)
565 (define-key debugger-mode-map "\C-m" 'help-follow) 567 map))
566 (define-key debugger-mode-map [mouse-2] 'push-button)
567 ))
568
569 568
570(defcustom debugger-record-buffer "*Debugger-record*" 569(defcustom debugger-record-buffer "*Debugger-record*"
571 "*Buffer name for expression values, for \\[debugger-record-expression]." 570 "*Buffer name for expression values, for \\[debugger-record-expression]."
@@ -616,7 +615,7 @@ Complete list of commands:
616 (setq truncate-lines t) 615 (setq truncate-lines t)
617 (set-syntax-table emacs-lisp-mode-syntax-table) 616 (set-syntax-table emacs-lisp-mode-syntax-table)
618 (use-local-map debugger-mode-map) 617 (use-local-map debugger-mode-map)
619 (run-hooks 'debugger-mode-hook)) 618 (run-mode-hooks 'debugger-mode-hook))
620 619
621;;;###autoload 620;;;###autoload
622(defun debug-on-entry (function) 621(defun debug-on-entry (function)
@@ -705,6 +704,10 @@ If argument is nil or an empty string, cancel for all functions."
705 ;; Skip the interactive form. 704 ;; Skip the interactive form.
706 (if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail))) 705 (if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail)))
707 (unless (eq flag (equal (car tail) '(debug 'debug))) 706 (unless (eq flag (equal (car tail) '(debug 'debug)))
707 ;; If the function has no body, add nil as a body element.
708 (when (null tail)
709 (setq tail (list nil))
710 (nconc defn tail))
708 ;; Add/remove debug statement as needed. 711 ;; Add/remove debug statement as needed.
709 (if (not flag) 712 (if (not flag)
710 (progn (setcar tail (cadr tail)) 713 (progn (setcar tail (cadr tail))
@@ -716,22 +719,23 @@ If argument is nil or an empty string, cancel for all functions."
716(defun debugger-list-functions () 719(defun debugger-list-functions ()
717 "Display a list of all the functions now set to debug on entry." 720 "Display a list of all the functions now set to debug on entry."
718 (interactive) 721 (interactive)
719 (with-output-to-temp-buffer "*Help*" 722 (require 'help-mode)
720 (if (null debug-function-list) 723 (help-setup-xref '(debugger-list-functions) (interactive-p))
721 (princ "No debug-on-entry functions now\n") 724 (with-output-to-temp-buffer (help-buffer)
722 (princ "Functions set to debug on entry:\n\n") 725 (with-current-buffer standard-output
723 (let ((list debug-function-list)) 726 (if (null debug-function-list)
724 (while list 727 (princ "No debug-on-entry functions now\n")
725 (prin1 (car list)) 728 (princ "Functions set to debug on entry:\n\n")
726 (terpri) 729 (dolist (fun debug-function-list)
727 (setq list (cdr list)))) 730 (make-text-button (point) (progn (prin1 fun) (point))
728 (princ "Note: if you have redefined a function, then it may no longer\n") 731 'type 'help-function
729 (princ "be set to debug on entry, even if it is in the list.")) 732 'help-args (list fun))
730 (save-excursion 733 (terpri))
731 (set-buffer standard-output) 734 (terpri)
732 (help-mode)))) 735 (princ "Note: if you have redefined a function, then it may no longer\n")
736 (princ "be set to debug on entry, even if it is in the list.")))))
733 737
734(provide 'debug) 738(provide 'debug)
735 739
736;;; arch-tag: b6ec7047-f801-4103-9c63-d69322db9d3b 740;; arch-tag: b6ec7047-f801-4103-9c63-d69322db9d3b
737;;; debug.el ends here 741;;; debug.el ends here
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 019a45213c8..d26a0ae5f38 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -327,10 +327,16 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
327 "Return binding for SYMBOL in the RE Builder target buffer." 327 "Return binding for SYMBOL in the RE Builder target buffer."
328 `(with-current-buffer reb-target-buffer ,symbol)) 328 `(with-current-buffer reb-target-buffer ,symbol))
329 329
330;;; This is to help people find this in Apropos.
331;;;###autoload
332(defun regexp-builder ()
333 "Alias for `re-builder': Construct a regexp interactively."
334 (interactive)
335 (re-builder))
330 336
331;;;###autoload 337;;;###autoload
332(defun re-builder () 338(defun re-builder ()
333 "Call up the RE Builder for the current window." 339 "Construct a regexp interactively."
334 (interactive) 340 (interactive)
335 341
336 (if (and (string= (buffer-name) reb-buffer) 342 (if (and (string= (buffer-name) reb-buffer)
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index a6ff9b15286..e3d3e9e645e 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -1,6 +1,6 @@
1;;; trace.el --- tracing facility for Emacs Lisp functions 1;;; trace.el --- tracing facility for Emacs Lisp functions
2 2
3;; Copyright (C) 1993 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1998, 2000, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Hans Chalupsky <hans@cs.buffalo.edu> 5;; Author: Hans Chalupsky <hans@cs.buffalo.edu>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -175,6 +175,9 @@
175;; Used to separate new trace output from previous traced runs: 175;; Used to separate new trace output from previous traced runs:
176(defvar trace-separator (format "%s\n" (make-string 70 ?=))) 176(defvar trace-separator (format "%s\n" (make-string 70 ?=)))
177 177
178(defvar inhibit-trace nil
179 "If non-nil, all tracing is temporarily inhibited.")
180
178(defun trace-entry-message (function level argument-bindings) 181(defun trace-entry-message (function level argument-bindings)
179 ;; Generates a string that describes that FUNCTION has been entered at 182 ;; Generates a string that describes that FUNCTION has been entered at
180 ;; trace LEVEL with ARGUMENT-BINDINGS. 183 ;; trace LEVEL with ARGUMENT-BINDINGS.
@@ -183,14 +186,13 @@
183 (if (> level 1) " " "") 186 (if (> level 1) " " "")
184 level 187 level
185 function 188 function
186 (mapconcat (function 189 (mapconcat (lambda (binding)
187 (lambda (binding) 190 (concat
188 (concat 191 (symbol-name (ad-arg-binding-field binding 'name))
189 (symbol-name (ad-arg-binding-field binding 'name)) 192 "="
190 "=" 193 ;; do this so we'll see strings:
191 ;; do this so we'll see strings: 194 (prin1-to-string
192 (prin1-to-string 195 (ad-arg-binding-field binding 'value))))
193 (ad-arg-binding-field binding 'value)))))
194 argument-bindings 196 argument-bindings
195 " "))) 197 " ")))
196 198
@@ -211,43 +213,27 @@
211 ;; (quietly if BACKGROUND is t). 213 ;; (quietly if BACKGROUND is t).
212 (ad-make-advice 214 (ad-make-advice
213 trace-advice-name nil t 215 trace-advice-name nil t
214 (cond (background 216 `(advice
215 `(advice 217 lambda ()
216 lambda () 218 (let ((trace-level (1+ trace-level))
217 (let ((trace-level (1+ trace-level)) 219 (trace-buffer (get-buffer-create ,buffer)))
218 (trace-buffer (get-buffer-create ,buffer))) 220 (unless inhibit-trace
219 (save-excursion 221 (with-current-buffer trace-buffer
220 (set-buffer trace-buffer) 222 ,(unless background '(pop-to-buffer trace-buffer))
221 (goto-char (point-max)) 223 (goto-char (point-max))
222 ;; Insert a separator from previous trace output: 224 ;; Insert a separator from previous trace output:
223 (if (= trace-level 1) (insert trace-separator)) 225 (if (= trace-level 1) (insert trace-separator))
224 (insert 226 (insert
225 (trace-entry-message 227 (trace-entry-message
226 ',function trace-level ad-arg-bindings))) 228 ',function trace-level ad-arg-bindings))))
227 ad-do-it 229 ad-do-it
228 (save-excursion 230 (unless inhibit-trace
229 (set-buffer trace-buffer) 231 (with-current-buffer trace-buffer
230 (goto-char (point-max)) 232 ,(unless background '(pop-to-buffer trace-buffer))
231 (insert 233 (goto-char (point-max))
232 (trace-exit-message 234 (insert
233 ',function trace-level ad-return-value)))))) 235 (trace-exit-message
234 (t `(advice 236 ',function trace-level ad-return-value))))))))
235 lambda ()
236 (let ((trace-level (1+ trace-level))
237 (trace-buffer (get-buffer-create ,buffer)))
238 (pop-to-buffer trace-buffer)
239 (goto-char (point-max))
240 ;; Insert a separator from previous trace output:
241 (if (= trace-level 1) (insert trace-separator))
242 (insert
243 (trace-entry-message
244 ',function trace-level ad-arg-bindings))
245 ad-do-it
246 (pop-to-buffer trace-buffer)
247 (goto-char (point-max))
248 (insert
249 (trace-exit-message
250 ',function trace-level ad-return-value))))))))
251 237
252(defun trace-function-internal (function buffer background) 238(defun trace-function-internal (function buffer background)
253 ;; Adds trace advice for FUNCTION and activates it. 239 ;; Adds trace advice for FUNCTION and activates it.
@@ -297,9 +283,9 @@ activated only if the advice of FUNCTION is currently active. If FUNCTION
297was not traced this is a noop." 283was not traced this is a noop."
298 (interactive 284 (interactive
299 (list (ad-read-advised-function "Untrace function: " 'trace-is-traced))) 285 (list (ad-read-advised-function "Untrace function: " 'trace-is-traced)))
300 (cond ((trace-is-traced function) 286 (when (trace-is-traced function)
301 (ad-remove-advice function 'around trace-advice-name) 287 (ad-remove-advice function 'around trace-advice-name)
302 (ad-update function)))) 288 (ad-update function)))
303 289
304(defun untrace-all () 290(defun untrace-all ()
305 "Untraces all currently traced functions." 291 "Untraces all currently traced functions."
@@ -309,5 +295,5 @@ was not traced this is a noop."
309 295
310(provide 'trace) 296(provide 'trace)
311 297
312;;; arch-tag: cfd170a7-4932-4331-8c8b-b7151942e5a1 298;; arch-tag: cfd170a7-4932-4331-8c8b-b7151942e5a1
313;;; trace.el ends here 299;;; trace.el ends here
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index b994e6520db..7ade8548764 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,13 +1,26 @@
12005-02-27 Arne J,Ax(Brgensen <arne@arnested.dk>
2
3 * mm-decode.el (mm-dissect-buffer): Pass the from field on to
4 `mm-dissect-multipart' and receive the from field as an (optional)
5 argument from `mm-dissect-multipart'.
6 (mm-dissect-multipart): Receive the from field as an argument and
7 pass it on when we call `mm-dissect-buffer' on MIME parts. Fixes
8 verification/decryption of signed/encrypted MIME parts.
9
102005-02-26 Stefan Monnier <monnier@iro.umontreal.ca>
11
12 * gnus-sum.el (gnus-summary-exit): Move point after displaying the
13 buffer, so it moves the window's cursor.
14
12005-02-24 Reiner Steib <Reiner.Steib@gmx.de> 152005-02-24 Reiner Steib <Reiner.Steib@gmx.de>
2 16
3 * nnheader.el (nnheader-find-file-noselect): Added doc string. 17 * nnheader.el (nnheader-find-file-noselect): Add doc string.
4 18
5 * nnfolder.el (nnfolder-read-folder): Use RAWFILE for 19 * nnfolder.el (nnfolder-read-folder): Use RAWFILE for
6 `nnheader-find-file-noselect' to avoid 20 `nnheader-find-file-noselect' to avoid `large-file-warning-threshold'.
7 `large-file-warning-threshold'.
8 21
9 * gnus-sum.el (gnus-summary-caesar-message): Apply 22 * gnus-sum.el (gnus-summary-caesar-message):
10 `gnus-treat-article' after rotation. 23 Apply `gnus-treat-article' after rotation.
11 24
12 * gnus-group.el (gnus-group-clear-data): Mention process/prefix in 25 * gnus-group.el (gnus-group-clear-data): Mention process/prefix in
13 doc string. 26 doc string.
@@ -41,7 +54,7 @@
41 54
422005-02-16 Teodor Zlatanov <tzz@lifelogs.com> 552005-02-16 Teodor Zlatanov <tzz@lifelogs.com>
43 56
44 * gnus-registry.el (gnus-registry-delete-group): minor bug fix 57 * gnus-registry.el (gnus-registry-delete-group): Minor bug fix.
45 58
46 * gnus.el (gnus-install-group-spam-parameters): Doc fix. 59 * gnus.el (gnus-install-group-spam-parameters): Doc fix.
47 60
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 7748a3529fa..73ac963bd3b 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1,5 +1,5 @@
1;;; gnus-sum.el --- summary mode commands for Gnus 1;;; gnus-sum.el --- summary mode commands for Gnus
2;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 2;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -6680,9 +6680,11 @@ If FORCE (the prefix), also save the .newsrc file(s)."
6680 (set-buffer gnus-group-buffer) 6680 (set-buffer gnus-group-buffer)
6681 (if quit-config 6681 (if quit-config
6682 (gnus-handle-ephemeral-exit quit-config) 6682 (gnus-handle-ephemeral-exit quit-config)
6683 (goto-char group-point)
6684 (unless leave-hidden 6683 (unless leave-hidden
6685 (gnus-configure-windows 'group 'force))) 6684 (gnus-configure-windows 'group 'force))
6685 ;; Move point after calling gnus-configure-windows to make sure it
6686 ;; moves the window's point as well.
6687 (goto-char group-point))
6686 ;; Clear the current group name. 6688 ;; Clear the current group name.
6687 (unless quit-config 6689 (unless quit-config
6688 (setq gnus-newsgroup-name nil))))) 6690 (setq gnus-newsgroup-name nil)))))
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 579571e16aa..10c7ea16db4 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -509,10 +509,10 @@ Postpone undisplaying of viewers for types in
509 (message "Destroying external MIME viewers") 509 (message "Destroying external MIME viewers")
510 (mm-destroy-parts mm-postponed-undisplay-list))) 510 (mm-destroy-parts mm-postponed-undisplay-list)))
511 511
512(defun mm-dissect-buffer (&optional no-strict-mime loose-mime) 512(defun mm-dissect-buffer (&optional no-strict-mime loose-mime from)
513 "Dissect the current buffer and return a list of MIME handles." 513 "Dissect the current buffer and return a list of MIME handles."
514 (save-excursion 514 (save-excursion
515 (let (ct ctl type subtype cte cd description id result from) 515 (let (ct ctl type subtype cte cd description id result)
516 (save-restriction 516 (save-restriction
517 (mail-narrow-to-head) 517 (mail-narrow-to-head)
518 (when (or no-strict-mime 518 (when (or no-strict-mime
@@ -523,8 +523,9 @@ Postpone undisplaying of viewers for types in
523 cte (mail-fetch-field "content-transfer-encoding") 523 cte (mail-fetch-field "content-transfer-encoding")
524 cd (mail-fetch-field "content-disposition") 524 cd (mail-fetch-field "content-disposition")
525 description (mail-fetch-field "content-description") 525 description (mail-fetch-field "content-description")
526 from (mail-fetch-field "from")
527 id (mail-fetch-field "content-id")) 526 id (mail-fetch-field "content-id"))
527 (unless from
528 (setq from (mail-fetch-field "from")))
528 ;; FIXME: In some circumstances, this code is running within 529 ;; FIXME: In some circumstances, this code is running within
529 ;; an unibyte macro. mail-extract-address-components 530 ;; an unibyte macro. mail-extract-address-components
530 ;; creates unibyte buffers. This `if', though not a perfect 531 ;; creates unibyte buffers. This `if', though not a perfect
@@ -567,7 +568,7 @@ Postpone undisplaying of viewers for types in
567 'from from 568 'from from
568 'start start) 569 'start start)
569 (car ctl)) 570 (car ctl))
570 (cons (car ctl) (mm-dissect-multipart ctl)))) 571 (cons (car ctl) (mm-dissect-multipart ctl from))))
571 (t 572 (t
572 (mm-possibly-verify-or-decrypt 573 (mm-possibly-verify-or-decrypt
573 (mm-dissect-singlepart 574 (mm-dissect-singlepart
@@ -594,7 +595,7 @@ Postpone undisplaying of viewers for types in
594 (mm-make-handle 595 (mm-make-handle
595 (mm-copy-to-buffer) ctl cte nil cdl description nil id))) 596 (mm-copy-to-buffer) ctl cte nil cdl description nil id)))
596 597
597(defun mm-dissect-multipart (ctl) 598(defun mm-dissect-multipart (ctl from)
598 (goto-char (point-min)) 599 (goto-char (point-min))
599 (let* ((boundary (concat "\n--" (mail-content-type-get ctl 'boundary))) 600 (let* ((boundary (concat "\n--" (mail-content-type-get ctl 'boundary)))
600 (close-delimiter (concat (regexp-quote boundary) "--[ \t]*$")) 601 (close-delimiter (concat (regexp-quote boundary) "--[ \t]*$"))
@@ -611,7 +612,7 @@ Postpone undisplaying of viewers for types in
611 (save-excursion 612 (save-excursion
612 (save-restriction 613 (save-restriction
613 (narrow-to-region start (point)) 614 (narrow-to-region start (point))
614 (setq parts (nconc (list (mm-dissect-buffer t)) parts))))) 615 (setq parts (nconc (list (mm-dissect-buffer t nil from)) parts)))))
615 (end-of-line 2) 616 (end-of-line 2)
616 (or (looking-at boundary) 617 (or (looking-at boundary)
617 (forward-line 1)) 618 (forward-line 1))
@@ -620,7 +621,7 @@ Postpone undisplaying of viewers for types in
620 (save-excursion 621 (save-excursion
621 (save-restriction 622 (save-restriction
622 (narrow-to-region start end) 623 (narrow-to-region start end)
623 (setq parts (nconc (list (mm-dissect-buffer t)) parts))))) 624 (setq parts (nconc (list (mm-dissect-buffer t nil from)) parts)))))
624 (mm-possibly-verify-or-decrypt (nreverse parts) ctl))) 625 (mm-possibly-verify-or-decrypt (nreverse parts) ctl)))
625 626
626(defun mm-copy-to-buffer () 627(defun mm-copy-to-buffer ()
diff --git a/lisp/international/utf-16.el b/lisp/international/utf-16.el
index 477cccc2bf9..04c9f682139 100644
--- a/lisp/international/utf-16.el
+++ b/lisp/international/utf-16.el
@@ -391,7 +391,7 @@ name `utf-translation-table-for-decode'.")
391 391
392 392
393(define-ccl-program ccl-encode-mule-utf-16le 393(define-ccl-program ccl-encode-mule-utf-16le
394 `(1 394 `(2
395 ,utf-16le-encode-loop) 395 ,utf-16le-encode-loop)
396 "Encode to UTF-16LE (little endian without signature). 396 "Encode to UTF-16LE (little endian without signature).
397Characters from the charsets ascii, eight-bit-control, 397Characters from the charsets ascii, eight-bit-control,
@@ -401,7 +401,7 @@ after translation through the translation-table of name
401Others are encoded as U+FFFD.") 401Others are encoded as U+FFFD.")
402 402
403(define-ccl-program ccl-encode-mule-utf-16be 403(define-ccl-program ccl-encode-mule-utf-16be
404 `(1 404 `(2
405 ,utf-16be-encode-loop) 405 ,utf-16be-encode-loop)
406 "Encode to UTF-16BE (big endian without signature). 406 "Encode to UTF-16BE (big endian without signature).
407Characters from the charsets ascii, eight-bit-control, 407Characters from the charsets ascii, eight-bit-control,
@@ -411,7 +411,7 @@ after translation through the translation-table named
411Others are encoded as U+FFFD.") 411Others are encoded as U+FFFD.")
412 412
413(define-ccl-program ccl-encode-mule-utf-16le-with-signature 413(define-ccl-program ccl-encode-mule-utf-16le-with-signature
414 `(1 414 `(4
415 ((write #xFF) 415 ((write #xFF)
416 (write #xFE) 416 (write #xFE)
417 ,@utf-16le-encode-loop)) 417 ,@utf-16le-encode-loop))
@@ -423,7 +423,7 @@ after translation through the translation-table of name
423Others are encoded as U+FFFD.") 423Others are encoded as U+FFFD.")
424 424
425(define-ccl-program ccl-encode-mule-utf-16be-with-signature 425(define-ccl-program ccl-encode-mule-utf-16be-with-signature
426 `(1 426 `(4
427 ((write #xFE) 427 ((write #xFE)
428 (write #xFF) 428 (write #xFF)
429 ,@utf-16be-encode-loop)) 429 ,@utf-16be-encode-loop))
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5efcca1bd5e..fdc99205780 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -82,6 +82,17 @@ packages. See `mouse-on-link-p' for details."
82 (other :tag "Single click" t)) 82 (other :tag "Single click" t))
83 :group 'mouse) 83 :group 'mouse)
84 84
85(defcustom mouse-1-click-in-non-selected-windows t
86 "*If non-nil, a Mouse-1 click also follows links in non-selected windows.
87
88If nil, a Mouse-1 click on a link in a non-selected window performs
89the normal mouse-1 binding, typically selects the window and sets
90point at the click position."
91 :type 'boolean
92 :version "22.1"
93 :group 'mouse)
94
95
85 96
86;; Provide a mode-specific menu on a mouse button. 97;; Provide a mode-specific menu on a mouse button.
87 98
@@ -771,6 +782,8 @@ If the click is in the echo area, display the `*Messages*' buffer."
771 "Return non-nil if POS is on a link in the current buffer. 782 "Return non-nil if POS is on a link in the current buffer.
772POS must be a buffer position in the current buffer or an mouse 783POS must be a buffer position in the current buffer or an mouse
773event location in the selected window, see `event-start'. 784event location in the selected window, see `event-start'.
785However, if `mouse-1-click-in-non-selected-windows' is non-nil,
786POS may be a mouse event location in any window.
774 787
775A clickable link is identified by one of the following methods: 788A clickable link is identified by one of the following methods:
776 789
@@ -805,21 +818,24 @@ click is the local or global binding of that event.
805 818
806- Otherwise, the mouse-1 event is translated into a mouse-2 event 819- Otherwise, the mouse-1 event is translated into a mouse-2 event
807at the same position." 820at the same position."
808 (if (consp pos) 821 (let ((w (and (consp pos) (posn-window pos))))
809 (setq pos (and (eq (selected-window) (posn-window pos)) 822 (if (consp pos)
810 (posn-point pos)))) 823 (setq pos (and (or mouse-1-click-in-non-selected-windows
811 (when pos 824 (eq (selected-window) w))
812 (let ((action 825 (posn-point pos))))
813 (or (get-char-property pos 'follow-link) 826 (when pos
814 (save-excursion 827 (with-current-buffer (window-buffer w)
815 (goto-char pos) 828 (let ((action
816 (key-binding [follow-link] nil t))))) 829 (or (get-char-property pos 'follow-link)
817 (cond 830 (save-excursion
818 ((eq action 'mouse-face) 831 (goto-char pos)
819 (and (get-char-property pos 'mouse-face) t)) 832 (key-binding [follow-link] nil t)))))
820 ((functionp action) 833 (cond
821 (funcall action pos)) 834 ((eq action 'mouse-face)
822 (t action))))) 835 (and (get-char-property pos 'mouse-face) t))
836 ((functionp action)
837 (funcall action pos))
838 (t action)))))))
823 839
824 840
825(defun mouse-drag-region-1 (start-event) 841(defun mouse-drag-region-1 (start-event)
@@ -839,7 +855,8 @@ at the same position."
839 ;; Don't count the mode line. 855 ;; Don't count the mode line.
840 (1- (nth 3 bounds)))) 856 (1- (nth 3 bounds))))
841 (on-link (and mouse-1-click-follows-link 857 (on-link (and mouse-1-click-follows-link
842 (eq start-window (selected-window)))) 858 (or mouse-1-click-in-non-selected-windows
859 (eq start-window (selected-window)))))
843 remap-double-click 860 remap-double-click
844 (click-count (1- (event-click-count start-event)))) 861 (click-count (1- (event-click-count start-event))))
845 (setq mouse-selection-click-count click-count) 862 (setq mouse-selection-click-count click-count)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 0fee809789e..14682975fe9 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4107,7 +4107,7 @@ ARGS are the arguments OPERATION has been called with."
4107 ((member operation 4107 ((member operation
4108 (list 'dired-call-process 4108 (list 'dired-call-process
4109 ; Emacs only 4109 ; Emacs only
4110 'shell 4110 'shell-command
4111 ; Post Emacs 21.3 only 4111 ; Post Emacs 21.3 only
4112 'process-file 4112 'process-file
4113 ; XEmacs only 4113 ; XEmacs only
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index eb630c2ed54..ad4633e20eb 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -161,10 +161,11 @@ The expansion is entirely correct because it uses the C preprocessor."
161 161
162(defvar perl-imenu-generic-expression 162(defvar perl-imenu-generic-expression
163 '(;; Functions 163 '(;; Functions
164 (nil "^sub\\s-+\\([-A-Za-z0-9+_:]+\\)\\(\\s-\\|\n\\)*{" 1 ) 164 (nil "^sub\\s-+\\([-A-Za-z0-9+_:]+\\)" 1)
165 ;;Variables 165 ;;Variables
166 ("Variables" "^\\([$@%][-A-Za-z0-9+_:]+\\)\\s-*=" 1 ) 166 ("Variables" "^\\([$@%][-A-Za-z0-9+_:]+\\)\\s-*=" 1)
167 ("Packages" "^package\\s-+\\([-A-Za-z0-9+_:]+\\);" 1 )) 167 ("Packages" "^package\\s-+\\([-A-Za-z0-9+_:]+\\);" 1)
168 ("Doc sections" "^=head[0-9][ \t]+\\(.*\\)" 1))
168 "Imenu generic expression for Perl mode. See `imenu-generic-expression'.") 169 "Imenu generic expression for Perl mode. See `imenu-generic-expression'.")
169 170
170;; Regexps updated with help from Tom Tromey <tromey@cambric.colorado.edu> and 171;; Regexps updated with help from Tom Tromey <tromey@cambric.colorado.edu> and
@@ -411,6 +412,20 @@ create a new comment."
411(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:[^:]" 412(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:[^:]"
412 "*Lines starting with this regular expression are not auto-indented." 413 "*Lines starting with this regular expression are not auto-indented."
413 :type 'regexp) 414 :type 'regexp)
415
416;; Outline support
417
418(defvar perl-outline-regexp
419 (concat (mapconcat 'cadr perl-imenu-generic-expression "\\|")
420 "\\|^=cut\\>"))
421
422(defun perl-outline-level ()
423 (cond
424 ((looking-at "package\\s-") 0)
425 ((looking-at "sub\\s-") 1)
426 ((looking-at "=head[0-9]") (- (char-before (match-end 0)) ?0))
427 ((looking-at "=cut") 1)
428 (t 3)))
414 429
415;;;###autoload 430;;;###autoload
416(defun perl-mode () 431(defun perl-mode ()
@@ -498,9 +513,12 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'."
498 . perl-font-lock-syntactic-face-function) 513 . perl-font-lock-syntactic-face-function)
499 (parse-sexp-lookup-properties . t))) 514 (parse-sexp-lookup-properties . t)))
500 ;; Tell imenu how to handle Perl. 515 ;; Tell imenu how to handle Perl.
501 (make-local-variable 'imenu-generic-expression) 516 (set (make-local-variable 'imenu-generic-expression)
502 (setq imenu-generic-expression perl-imenu-generic-expression) 517 perl-imenu-generic-expression)
503 (setq imenu-case-fold-search nil) 518 (setq imenu-case-fold-search nil)
519 ;; Setup outline-minor-mode.
520 (set (make-local-variable 'outline-regexp) perl-outline-regexp)
521 (set (make-local-variable 'outline-level) 'perl-outline-level)
504 (run-hooks 'perl-mode-hook)) 522 (run-hooks 'perl-mode-hook))
505 523
506;; This is used by indent-for-comment 524;; This is used by indent-for-comment
diff --git a/lisp/register.el b/lisp/register.el
index bab9d01edf2..253207c3140 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -227,8 +227,10 @@ The Lisp value REGISTER is a character."
227 (princ (car val)))) 227 (princ (car val))))
228 228
229 ((stringp val) 229 ((stringp val)
230 (remove-list-of-text-properties 0 (length val) 230 (if (eq yank-excluded-properties t)
231 yank-excluded-properties val) 231 (set-text-properties 0 (length val) nil val)
232 (remove-list-of-text-properties 0 (length val)
233 yank-excluded-properties val))
232 (if verbose 234 (if verbose
233 (progn 235 (progn
234 (princ "the text:\n") 236 (princ "the text:\n")
diff --git a/lisp/replace.el b/lisp/replace.el
index 2c60cd006f1..d2a0370f93e 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1,7 +1,7 @@
1;;; replace.el --- replace commands for Emacs 1;;; replace.el --- replace commands for Emacs
2 2
3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1996, 1997, 2000, 2001, 2002, 3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1996, 1997, 2000, 2001, 2002,
4;; 2003, 2004 Free Software Foundation, Inc. 4;; 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
7 7
@@ -116,10 +116,10 @@ wants to replace FROM with TO."
116 nil t t)))) 116 nil t t))))
117 (if (and (zerop (length from)) lastto lastfrom) 117 (if (and (zerop (length from)) lastto lastfrom)
118 (progn 118 (progn
119 (cons lastfrom
120 (query-replace-compile-replacement lastto regexp-flag))
121 (set query-replace-from-history-variable 119 (set query-replace-from-history-variable
122 (cdr (symbol-value query-replace-from-history-variable)))) 120 (cdr (symbol-value query-replace-from-history-variable)))
121 (cons lastfrom
122 (query-replace-compile-replacement lastto regexp-flag)))
123 ;; Warn if user types \n or \t, but don't reject the input. 123 ;; Warn if user types \n or \t, but don't reject the input.
124 (and regexp-flag 124 (and regexp-flag
125 (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) 125 (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from)
diff --git a/lisp/reveal.el b/lisp/reveal.el
index 04cc58893c9..4d2742a4810 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -1,6 +1,6 @@
1;;; reveal.el --- Automatically reveal hidden text at point 1;;; reveal.el --- Automatically reveal hidden text at point
2 2
3;; Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Stefan Monnier <monnier@cs.yale.edu> 5;; Author: Stefan Monnier <monnier@cs.yale.edu>
6;; Keywords: outlines 6;; Keywords: outlines
@@ -93,16 +93,22 @@
93 (overlays-at (point)))) 93 (overlays-at (point))))
94 (push (cons (selected-window) ol) reveal-open-spots) 94 (push (cons (selected-window) ol) reveal-open-spots)
95 (setq old-ols (delq ol old-ols)) 95 (setq old-ols (delq ol old-ols))
96 (let ((open (overlay-get ol 'reveal-toggle-invisible)) inv) 96 (let ((inv (overlay-get ol 'invisible)) open)
97 (when (or open 97 (when (and inv
98 (and (setq inv (overlay-get ol 'invisible)) 98 ;; There's an `invisible' property. Make sure it's
99 (symbolp inv) 99 ;; actually invisible.
100 (or (setq open (or (get inv 'reveal-toggle-invisible) 100 (or (not (listp buffer-invisibility-spec))
101 (overlay-get ol 'isearch-open-invisible-temporary))) 101 (memq inv buffer-invisibility-spec)
102 (overlay-get ol 'isearch-open-invisible) 102 (assq inv buffer-invisibility-spec))
103 (and (consp buffer-invisibility-spec) 103 (or (setq open
104 (assq inv buffer-invisibility-spec))) 104 (or (overlay-get ol 'reveal-toggle-invisible)
105 (overlay-put ol 'reveal-invisible inv))) 105 (and (symbolp inv)
106 (get inv 'reveal-toggle-invisible))
107 (overlay-get ol 'isearch-open-invisible-temporary)))
108 (overlay-get ol 'isearch-open-invisible)
109 (and (consp buffer-invisibility-spec)
110 (cdr (assq inv buffer-invisibility-spec))))
111 (overlay-put ol 'reveal-invisible inv))
106 (if (null open) 112 (if (null open)
107 (overlay-put ol 'invisible nil) 113 (overlay-put ol 'invisible nil)
108 ;; Use the provided opening function and repeat (since the 114 ;; Use the provided opening function and repeat (since the
@@ -110,7 +116,8 @@
110 (setq repeat t) 116 (setq repeat t)
111 (condition-case err 117 (condition-case err
112 (funcall open ol nil) 118 (funcall open ol nil)
113 (error (message "!!Reveal-show: %s !!" err) 119 (error (message "!!Reveal-show (funcall %s %s nil): %s !!"
120 open ol err)
114 ;; Let's default to a meaningful behavior to avoid 121 ;; Let's default to a meaningful behavior to avoid
115 ;; getting stuck in an infinite loop. 122 ;; getting stuck in an infinite loop.
116 (setq repeat nil) 123 (setq repeat nil)
@@ -147,7 +154,8 @@
147 (overlay-get ol 'isearch-open-invisible-temporary))))) 154 (overlay-get ol 'isearch-open-invisible-temporary)))))
148 (condition-case err 155 (condition-case err
149 (funcall open ol t) 156 (funcall open ol t)
150 (error (message "!!Reveal-hide: %s !!" err))) 157 (error (message "!!Reveal-hide (funcall %s %s t): %s !!"
158 open ol err)))
151 (overlay-put ol 'invisible inv)))))))) 159 (overlay-put ol 'invisible inv))))))))
152 (error (message "Reveal: %s" err))))) 160 (error (message "Reveal: %s" err)))))
153 161
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index ecb213d52fd..7a6e01f2859 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -761,11 +761,9 @@ PATH-EXPRESSION to `speedbar-ignored-path-expressions'."
761 (display-graphic-p) 761 (display-graphic-p)
762 window-system)) 762 window-system))
763 "*Non-nil means to automatically update the display. 763 "*Non-nil means to automatically update the display.
764When this is nil then speedbar will not follow the attached frame's path. 764When this is nil then speedbar will not follow the attached
765When speedbar is active, use: 765frame's path. Type \
766 766\\<speedbar-key-map>\\[speedbar-toggle-updates] in the speedbar \
767\\<speedbar-key-map> `\\[speedbar-toggle-updates]'
768
769to toggle this value.") 767to toggle this value.")
770 768
771(defvar speedbar-syntax-table nil 769(defvar speedbar-syntax-table nil
@@ -1344,7 +1342,7 @@ Optional EVENT is currently not used."
1344 (if (equal (car pos) speedbar-frame) 1342 (if (equal (car pos) speedbar-frame)
1345 (save-excursion 1343 (save-excursion
1346 (save-window-excursion 1344 (save-window-excursion
1347 (apply 'set-mouse-position pos) 1345 (apply 'set-mouse-position (list (car pos) (cadr pos) (cddr pos)))
1348 (speedbar-item-info)))))) 1346 (speedbar-item-info))))))
1349 1347
1350(defun speedbar-set-mode-line-format () 1348(defun speedbar-set-mode-line-format ()
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 01db2d64b27..c224a970e01 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -543,8 +543,9 @@ in your .emacs file.
543 "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead." 543 "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead."
544 (setq ispell-highlight-face 'flyspell-incorrect-face) 544 (setq ispell-highlight-face 'flyspell-incorrect-face)
545 ;; local dictionaries setup 545 ;; local dictionaries setup
546 (ispell-change-dictionary 546 (or ispell-local-dictionary ispell-dictionary
547 (or ispell-local-dictionary ispell-dictionary flyspell-default-dictionary)) 547 (if flyspell-default-dictionary
548 (ispell-change-dictionary flyspell-default-dictionary)))
548 ;; we have to force ispell to accept the local definition or 549 ;; we have to force ispell to accept the local definition or
549 ;; otherwise it could be too late, the local dictionary may 550 ;; otherwise it could be too late, the local dictionary may
550 ;; be forgotten! 551 ;; be forgotten!
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index a28764b54a1..2a84d584634 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2417,9 +2417,10 @@ With NO-ERROR, just return non-nil if there was no Ispell running."
2417;;;###autoload 2417;;;###autoload
2418(defun ispell-change-dictionary (dict &optional arg) 2418(defun ispell-change-dictionary (dict &optional arg)
2419 "Change to dictionary DICT for Ispell. 2419 "Change to dictionary DICT for Ispell.
2420By just answering RET you can find out what the current dictionary is. 2420With a prefix arg, set it \"globally\", for all buffers.
2421Without a prefix arg, set it \"locally\", just for this buffer.
2421 2422
2422With prefix argument, set the default dictionary." 2423By just answering RET you can find out what the current dictionary is."
2423 (interactive 2424 (interactive
2424 (list (completing-read 2425 (list (completing-read
2425 "Use new dictionary (RET for current, SPC to complete): " 2426 "Use new dictionary (RET for current, SPC to complete): "
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 8bc7209749f..5a3bf23529c 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12005-02-26 James Cloos <cloos@jhcloos.com> (tiny change)
2
3 * url-history.el (url-have-visited-url): Don't barf if
4 url-history-hash-table is nil.
5
12005-02-14 Michael Welsh Duggan <md5i@cs.cmu.edu> 62005-02-14 Michael Welsh Duggan <md5i@cs.cmu.edu>
2 7
3 * url-http.el (url-http-parse-headers): Test url-automatic-caching. 8 * url-http.el (url-http-parse-headers): Test url-automatic-caching.
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index 6a2d87cfbc1..e2bc9b17f69 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -164,7 +164,8 @@ user for what type to save as."
164 164
165(defun url-have-visited-url (url) 165(defun url-have-visited-url (url)
166 (url-do-setup) 166 (url-do-setup)
167 (gethash url url-history-hash-table nil)) 167 (and url-history-hash-table
168 (gethash url url-history-hash-table nil)))
168 169
169(defun url-completion-function (string predicate function) 170(defun url-completion-function (string predicate function)
170 (url-do-setup) 171 (url-do-setup)
diff --git a/lisp/vc.el b/lisp/vc.el
index 2daf100ff57..2e241e67f48 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -958,6 +958,9 @@ that is inserted into the command line before the filename."
958 (mapconcat 'identity vc-path path-separator)) 958 (mapconcat 'identity vc-path path-separator))
959 process-environment)) 959 process-environment))
960 (w32-quote-process-args t)) 960 (w32-quote-process-args t))
961 (if (and (eq okstatus 'async) (file-remote-p default-directory))
962 ;; start-process does not support remote execution
963 (setq okstatus nil))
961 (if (eq okstatus 'async) 964 (if (eq okstatus 'async)
962 (let ((proc (apply 'start-process command (current-buffer) command 965 (let ((proc (apply 'start-process command (current-buffer) command
963 squeezed))) 966 squeezed)))
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index e7f05587e71..de0294cffa9 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,66 @@
12005-02-26 Richard M. Stallman <rms@gnu.org>
2
3 * tips.texi (Coding Conventions): Clarify.
4 Put all the major mode key reservations together.
5 Mention the Mouse-1 => Mouse-2 conventions.
6
7 * syntax.texi (Syntax Class Table): Clarify.
8 (Syntax Table Functions): syntax-after moved from here.
9 (Syntax Table Internals): syntax-after moved to here.
10 (Parsing Expressions): Update info on number of values
11 and what's meaningful in the STATE argument.
12 (Categories): Fix typo.
13
14 * sequences.texi (Arrays): Cleanup.
15 (Char-Tables): Clarify.
16
17 * processes.texi (Deleting Processes): Cleanups, add xref.
18 (Subprocess Creation): Explain nil in exec-path. Cleanup.
19 (Process Information): set-process-coding-system, some args optional.
20 (Input to Processes): Explain various types for PROCESS args.
21 Rename them from PROCESS-NAME to PROCESS.
22 (Signals to Processes): Likewise.
23 (Decoding Output): Cleanup.
24 (Query Before Exit): Clarify.
25
26 * os.texi (Startup Summary): Correct the options; add missing ones.
27 (Terminal Output, Batch Mode): Clarify.
28 (Flow Control): Node deleted.
29
30 * markers.texi (The Mark): Clarify.
31
32 * macros.texi (Expansion): Cleanup.
33 (Indenting Macros): indent-spec allows ints, not floats.
34
35 * keymaps.texi (Keymaps): Clarify.
36 (Format of Keymaps): Update lisp-mode-map example.
37 (Active Keymaps, Key Lookup): Clarify.
38 (Changing Key Bindings): Add xref to `kbd'.
39 (Key Binding Commands, Simple Menu Items): Clarify.
40 (Mouse Menus, Menu Bar): Clarify.
41 (Menu Example): Replace print example with menu-bar-replace-menu.
42
43 * help.texi (Documentation Basics): Add function-documentation prop.
44
45 * elisp.texi (Top): Don't refer to Flow Control node.
46
47 * commands.texi (Command Overview): Improve xrefs.
48 (Adjusting Point): Adjusting point applies to intangible and invis.
49 (Key Sequence Input): Doc extra read-key-sequence args.
50 Likewise for read-key-sequence-vector.
51
52 * backups.texi (Rename or Copy): Minor fix.
53 (Numbered Backups): For version-control, say the default.
54 (Auto-Saving): make-auto-save-file-name example is simplified.
55
56 * advice.texi (Advising Functions): Don't imply one part of Emacs
57 should advise another part. Markup changes.
58 (Defining Advice): Move transitional para.
59 (Activation of Advice): Cleanup.
60 Explain if COMPILE is nil or negative.
61
62 * abbrevs.texi (Abbrev Expansion): Clarify, fix typo.
63
12005-02-24 Lute Kamstra <lute@gnu.org> 642005-02-24 Lute Kamstra <lute@gnu.org>
2 65
3 * modes.texi (Defining Minor Modes): Explain that INIT-VALUE, 66 * modes.texi (Defining Minor Modes): Explain that INIT-VALUE,
diff --git a/lispref/abbrevs.texi b/lispref/abbrevs.texi
index 1f873312222..a58064ab387 100644
--- a/lispref/abbrevs.texi
+++ b/lispref/abbrevs.texi
@@ -269,10 +269,10 @@ returns @code{nil} even though expansion did occur.
269@end deffn 269@end deffn
270 270
271@deffn Command abbrev-prefix-mark &optional arg 271@deffn Command abbrev-prefix-mark &optional arg
272This command marks current point as the beginning of an abbrev. The 272This command marks the current location of point as the beginning of
273next call to @code{expand-abbrev} will use the text from here to point 273an abbrev. The next call to @code{expand-abbrev} will use the text
274(where it is then) as the abbrev to expand, rather than using the 274from here to point (where it is then) as the abbrev to expand, rather
275previous word as usual. 275than using the previous word as usual.
276 276
277First, this command expands any abbrev before point, unless @var{arg} 277First, this command expands any abbrev before point, unless @var{arg}
278is non-@code{nil}. (Interactively, @var{arg} is the prefix argument.) 278is non-@code{nil}. (Interactively, @var{arg} is the prefix argument.)
@@ -363,7 +363,7 @@ definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}.
363 nil t))) 363 nil t)))
364@end smallexample 364@end smallexample
365 365
366Note that @code{foo-mode-pre-abbrex-expand} just returns @code{nil} 366Note that @code{foo-mode-pre-abbrev-expand} just returns @code{nil}
367without doing anything for lines not starting with @samp{#}. Hence 367without doing anything for lines not starting with @samp{#}. Hence
368abbrevs expand normally using @code{foo-mode-abbrev-table} as local 368abbrevs expand normally using @code{foo-mode-abbrev-table} as local
369abbrev table for such lines. 369abbrev table for such lines.
diff --git a/lispref/advice.texi b/lispref/advice.texi
index ae22fecc1fb..2006474fc61 100644
--- a/lispref/advice.texi
+++ b/lispref/advice.texi
@@ -7,15 +7,15 @@
7@chapter Advising Emacs Lisp Functions 7@chapter Advising Emacs Lisp Functions
8@cindex advising functions 8@cindex advising functions
9 9
10 The @dfn{advice} feature lets you add to the existing definition of a 10 The @dfn{advice} feature lets you add to the existing definition of
11function, by @dfn{advising the function}. This is a clean method for a 11a function, by @dfn{advising the function}. This is a clean method
12library to customize functions defined by other parts of Emacs---cleaner 12for a library to customize functions defined within Emacs---cleaner
13than redefining the whole function. 13than redefining the whole function.
14 14
15@cindex piece of advice 15@cindex piece of advice
16 Each function can have multiple @dfn{pieces of advice}, separately 16 Each function can have multiple @dfn{pieces of advice}, separately
17defined. Each defined piece of advice can be @dfn{enabled} or 17defined. Each defined piece of advice can be @dfn{enabled} or
18disabled explicitly. All the enabled pieces of advice for any given 18@dfn{disabled} explicitly. All the enabled pieces of advice for any given
19function actually take effect when you @dfn{activate} advice for that 19function actually take effect when you @dfn{activate} advice for that
20function, or when you define or redefine the function. Note that 20function, or when you define or redefine the function. Note that
21enabling a piece of advice and activating advice for a function 21enabling a piece of advice and activating advice for a function
@@ -129,6 +129,9 @@ form) to be advised. From now on, we will write just ``function'' when
129describing the entity being advised, but this always includes macros and 129describing the entity being advised, but this always includes macros and
130special forms. 130special forms.
131 131
132 In place of the argument list in an ordinary definition, an advice
133definition calls for several different pieces of information.
134
132@cindex class of advice 135@cindex class of advice
133@cindex before-advice 136@cindex before-advice
134@cindex after-advice 137@cindex after-advice
@@ -154,9 +157,6 @@ the pieces of advice in a particular class for a particular
154@var{function}. The name allows you to refer to the piece of 157@var{function}. The name allows you to refer to the piece of
155advice---to redefine it, or to enable or disable it. 158advice---to redefine it, or to enable or disable it.
156 159
157In place of the argument list in an ordinary definition, an advice
158definition calls for several different pieces of information.
159
160The optional @var{position} specifies where, in the current list of 160The optional @var{position} specifies where, in the current list of
161advice of the specified @var{class}, this new advice should be placed. 161advice of the specified @var{class}, this new advice should be placed.
162It should be either @code{first}, @code{last} or a number that specifies 162It should be either @code{first}, @code{last} or a number that specifies
@@ -332,9 +332,9 @@ replaced with the new one.
332@cindex advice, activating 332@cindex advice, activating
333 333
334By default, advice does not take effect when you define it---only when 334By default, advice does not take effect when you define it---only when
335you @dfn{activate} advice for the function that was advised. However 335you @dfn{activate} advice for the function that was advised. However,
336the advice will be automatically activated if the function is defined 336the advice will be activated automatically if you define or redefine
337or redefined later. You can request the activation of advice for a 337the function later. You can request the activation of advice for a
338function when you define the advice, by specifying the @code{activate} 338function when you define the advice, by specifying the @code{activate}
339flag in the @code{defadvice}. But normally you activate the advice 339flag in the @code{defadvice}. But normally you activate the advice
340for a function by calling the function @code{ad-activate} or one of 340for a function by calling the function @code{ad-activate} or one of
@@ -353,9 +353,11 @@ are combined with the original definition to make a new definition.
353@ref{Enabling Advice}.) This definition is installed, and optionally 353@ref{Enabling Advice}.) This definition is installed, and optionally
354byte-compiled as well, depending on conditions described below. 354byte-compiled as well, depending on conditions described below.
355 355
356In all of the commands to activate advice, if @var{compile} is @code{t}, 356In all of the commands to activate advice, if @var{compile} is
357the command also compiles the combined definition which implements the 357@code{t} (or anything but @code{nil} or a negative number), the
358advice. 358command also compiles the combined definition which implements the
359advice. If it is @code{nil} or a negative number, what happens
360depends on @code{ad-default-compilation-action} as described below.
359 361
360@deffn Command ad-activate function &optional compile 362@deffn Command ad-activate function &optional compile
361This command activates all the advice defined for @var{function}. 363This command activates all the advice defined for @var{function}.
@@ -438,9 +440,8 @@ the advice if the original definition of the advised function is
438compiled or a built-in function. 440compiled or a built-in function.
439 441
440This variable takes effect only if the @var{compile} argument of 442This variable takes effect only if the @var{compile} argument of
441@code{ad-activate} (or any of the above functions) was supplied as 443@code{ad-activate} (or any of the above functions) did not force
442@code{nil}. If that argument is non-@code{nil}, that means 444compilation.
443to compile the advice regardless.
444@end defopt 445@end defopt
445 446
446 If the advised definition was constructed during ``preactivation'' 447 If the advised definition was constructed during ``preactivation''
diff --git a/lispref/backups.texi b/lispref/backups.texi
index 52cb86dea88..8db24665a54 100644
--- a/lispref/backups.texi
+++ b/lispref/backups.texi
@@ -198,7 +198,7 @@ If this variable is non-@code{nil}, Emacs always makes backup files by
198copying. 198copying.
199@end defopt 199@end defopt
200 200
201 The following two variables, when non-@code{nil}, cause the second 201 The following three variables, when non-@code{nil}, cause the second
202method to be used in certain special cases. They have no effect on the 202method to be used in certain special cases. They have no effect on the
203treatment of files that don't fall into the special cases. 203treatment of files that don't fall into the special cases.
204 204
@@ -253,7 +253,7 @@ file or multiple numbered backups.
253@table @asis 253@table @asis
254@item @code{nil} 254@item @code{nil}
255Make numbered backups if the visited file already has numbered backups; 255Make numbered backups if the visited file already has numbered backups;
256otherwise, do not. 256otherwise, do not. This is the default.
257 257
258@item @code{never} 258@item @code{never}
259Do not make numbered backups. 259Do not make numbered backups.
@@ -503,7 +503,8 @@ function should check that variable first.
503@end group 503@end group
504@end example 504@end example
505 505
506The standard definition of this function is as follows: 506Here is a simplified version of the standard definition of this
507function:
507 508
508@example 509@example
509@group 510@group
diff --git a/lispref/commands.texi b/lispref/commands.texi
index ec3c972e28a..803a7c51efa 100644
--- a/lispref/commands.texi
+++ b/lispref/commands.texi
@@ -74,15 +74,15 @@ character causes @dfn{quitting} (@pxref{Quitting}).
74The editor command loop runs this normal hook before each command. At 74The editor command loop runs this normal hook before each command. At
75that time, @code{this-command} contains the command that is about to 75that time, @code{this-command} contains the command that is about to
76run, and @code{last-command} describes the previous command. 76run, and @code{last-command} describes the previous command.
77@xref{Hooks}. 77@xref{Command Loop Info}.
78@end defvar 78@end defvar
79 79
80@defvar post-command-hook 80@defvar post-command-hook
81The editor command loop runs this normal hook after each command 81The editor command loop runs this normal hook after each command
82(including commands terminated prematurely by quitting or by errors), 82(including commands terminated prematurely by quitting or by errors),
83and also when the command loop is first entered. At that time, 83and also when the command loop is first entered. At that time,
84@code{this-command} describes the command that just ran, and 84@code{this-command} refers to the command that just ran, and
85@code{last-command} describes the command before that. @xref{Hooks}. 85@code{last-command} refers to the command before that.
86@end defvar 86@end defvar
87 87
88 Quitting is suppressed while running @code{pre-command-hook} and 88 Quitting is suppressed while running @code{pre-command-hook} and
@@ -840,21 +840,21 @@ If the last event came from a keyboard macro, the value is @code{macro}.
840@node Adjusting Point 840@node Adjusting Point
841@section Adjusting Point After Commands 841@section Adjusting Point After Commands
842 842
843 It is not easy to display a value of point in the middle of a sequence 843 It is not easy to display a value of point in the middle of a
844of text that has the @code{display} or @code{composition} property. So 844sequence of text that has the @code{display}, @code{composition} or
845after a command finishes and returns to the command loop, if point is 845@code{intangible} property, or is invisible. Therefore, after a
846within such a sequence, the command loop normally moves point to the 846command finishes and returns to the command loop, if point is within
847edge of the sequence. 847such a sequence, the command loop normally moves point to the edge of
848the sequence.
848 849
849 A command can inhibit this feature by setting the variable 850 A command can inhibit this feature by setting the variable
850@code{disable-point-adjustment}: 851@code{disable-point-adjustment}:
851 852
852@defvar disable-point-adjustment 853@defvar disable-point-adjustment
853@tindex disable-point-adjustment 854@tindex disable-point-adjustment
854If this variable is non-@code{nil} when a command returns to the command 855If this variable is non-@code{nil} when a command returns to the
855loop, then the command loop does not check for text properties such as 856command loop, then the command loop does not check for those text
856@code{display} and @code{composition}, and does not move point out of 857properties, and does not move point out of sequences that have them.
857sequences that have these properties.
858 858
859The command loop sets this variable to @code{nil} before each command, 859The command loop sets this variable to @code{nil} before each command,
860so if a command sets it, the effect applies only to that command. 860so if a command sets it, the effect applies only to that command.
@@ -2051,7 +2051,7 @@ can use for translating or modifying input events while reading them.
2051@code{read-key-sequence}. Lisp programs can also call this function; 2051@code{read-key-sequence}. Lisp programs can also call this function;
2052for example, @code{describe-key} uses it to read the key to describe. 2052for example, @code{describe-key} uses it to read the key to describe.
2053 2053
2054@defun read-key-sequence prompt 2054@defun read-key-sequence prompt &optional continue-echo dont-downcase-last switch-frame-ok command-loop
2055@cindex key sequence 2055@cindex key sequence
2056This function reads a key sequence and returns it as a string or 2056This function reads a key sequence and returns it as a string or
2057vector. It keeps reading events until it has accumulated a complete key 2057vector. It keeps reading events until it has accumulated a complete key
@@ -2066,8 +2066,28 @@ Otherwise, it returns a vector, since a vector can hold all kinds of
2066events---characters, symbols, and lists. The elements of the string or 2066events---characters, symbols, and lists. The elements of the string or
2067vector are the events in the key sequence. 2067vector are the events in the key sequence.
2068 2068
2069The argument @var{prompt} is either a string to be displayed in the echo 2069The argument @var{prompt} is either a string to be displayed in the
2070area as a prompt, or @code{nil}, meaning not to display a prompt. 2070echo area as a prompt, or @code{nil}, meaning not to display a prompt.
2071The argument @var{continue-echo}, if non-@code{nil}, means to echo
2072this key as a continuation of the previous key.
2073
2074Normally any upper case event is converted to lower case if the
2075original event is undefined and the lower case equivalent is defined.
2076The argument @var{dont-downcase-last}, if non-@code{nil}, means do not
2077convert the last event to lower case. This is appropriate for reading
2078a key sequence to be defined.
2079
2080The argument @var{switch-frame-ok}, if non-@code{nil}, means that this
2081function should process a @code{switch-frame} event if the user
2082switches frames before typing anything. If the user switches frames
2083in the middle of a key sequence, or at the start of the sequence but
2084@var{switch-frame-ok} is @code{nil}, then the event will be put off
2085until after the current key sequence.
2086
2087The argument @var{command-loop}, if non-@code{nil}, means that this
2088key sequence is being read by something that will read commands one
2089after another. It should be @code{nil} if the caller will read just
2090one key sequence.
2071 2091
2072In the example below, the prompt @samp{?} is displayed in the echo area, 2092In the example below, the prompt @samp{?} is displayed in the echo area,
2073and the user types @kbd{C-x C-f}. 2093and the user types @kbd{C-x C-f}.
@@ -2089,7 +2109,7 @@ typed while reading with this function works like any other character,
2089and does not set @code{quit-flag}. @xref{Quitting}. 2109and does not set @code{quit-flag}. @xref{Quitting}.
2090@end defun 2110@end defun
2091 2111
2092@defun read-key-sequence-vector prompt 2112@defun read-key-sequence-vector prompt &optional continue-echo dont-downcase-last switch-frame-ok command-loop
2093This is like @code{read-key-sequence} except that it always 2113This is like @code{read-key-sequence} except that it always
2094returns the key sequence as a vector, never as a string. 2114returns the key sequence as a vector, never as a string.
2095@xref{Strings of Events}. 2115@xref{Strings of Events}.
diff --git a/lispref/elisp.texi b/lispref/elisp.texi
index 64e956afdf3..19b87e765db 100644
--- a/lispref/elisp.texi
+++ b/lispref/elisp.texi
@@ -873,7 +873,6 @@ Operating System Interface
873* System Environment:: Distinguish the name and kind of system. 873* System Environment:: Distinguish the name and kind of system.
874* Terminal Input:: Recording terminal input for debugging. 874* Terminal Input:: Recording terminal input for debugging.
875* Terminal Output:: Recording terminal output for debugging. 875* Terminal Output:: Recording terminal output for debugging.
876* Flow Control:: How to turn output flow control on or off.
877* Batch Mode:: Running Emacs without terminal interaction. 876* Batch Mode:: Running Emacs without terminal interaction.
878 877
879Starting Up Emacs 878Starting Up Emacs
diff --git a/lispref/help.texi b/lispref/help.texi
index ddc52253a80..dfbc6c220f3 100644
--- a/lispref/help.texi
+++ b/lispref/help.texi
@@ -66,9 +66,13 @@ function or variable that it describes:
66 66
67@itemize @bullet 67@itemize @bullet
68@item 68@item
69The documentation for a function is stored in the function definition 69@kindex function-documentation
70itself (@pxref{Lambda Expressions}). The function @code{documentation} 70The documentation for a function is usually stored in the function
71knows how to extract it. 71definition itself (@pxref{Lambda Expressions}). The function
72@code{documentation} knows how to extract it. You can also put
73function documentation in the @code{function-documentation} property
74of the function name. That is useful with definitions such as
75keyboard macros that can't hold a documentation string.
72 76
73@item 77@item
74@kindex variable-documentation 78@kindex variable-documentation
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi
index 8b2644c4fbb..9cf73053291 100644
--- a/lispref/keymaps.texi
+++ b/lispref/keymaps.texi
@@ -10,7 +10,7 @@
10 10
11 The bindings between input events and commands are recorded in data 11 The bindings between input events and commands are recorded in data
12structures called @dfn{keymaps}. Each binding in a keymap associates 12structures called @dfn{keymaps}. Each binding in a keymap associates
13(or @dfn{binds}) an individual event type either to another keymap or to 13(or @dfn{binds}) an individual event type, either to another keymap or to
14a command. When an event type is bound to a keymap, that keymap is used 14a command. When an event type is bound to a keymap, that keymap is used
15to look up the next input event; this continues until a command is 15to look up the next input event; this continues until a command is
16found. The whole process is called @dfn{key lookup}. 16found. The whole process is called @dfn{key lookup}.
@@ -202,24 +202,29 @@ lisp-mode-map
202@end group 202@end group
203@group 203@group
204(keymap 204(keymap
205 ;; @key{TAB} 205 (3 keymap
206 (9 . lisp-indent-line) 206 ;; @kbd{C-c C-z}
207 (26 . run-lisp))
207@end group 208@end group
208@group 209@group
209 ;; @key{DEL} 210 (27 keymap
210 (127 . backward-delete-char-untabify) 211 ;; @r{@kbd{M-C-x}, treated as @kbd{@key{ESC} C-x}}
212 (24 . lisp-send-defun)
213 keymap
214 ;; @r{@kbd{M-C-q}, treated as @kbd{@key{ESC} C-q}}
215 (17 . indent-sexp)))
211@end group 216@end group
212@group 217@group
213 (3 keymap 218 ;; @r{This part is inherited from @code{lisp-mode-shared-map}.}
214 ;; @kbd{C-c C-l} 219 keymap
215 (12 . run-lisp)) 220 ;; @key{DEL}
221 (127 . backward-delete-char-untabify)
216@end group 222@end group
217@group 223@group
218 (27 keymap 224 (27 keymap
219 ;; @r{@kbd{M-C-q}, treated as @kbd{@key{ESC} C-q}} 225 ;; @r{@kbd{M-C-q}, treated as @kbd{@key{ESC} C-q}}
220 (17 . indent-sexp) 226 (17 . indent-sexp))
221 ;; @r{@kbd{M-C-x}, treated as @kbd{@key{ESC} C-x}} 227 (9 . lisp-indent-line))
222 (24 . lisp-send-defun)))
223@end group 228@end group
224@end example 229@end example
225 230
@@ -565,8 +570,8 @@ additional active keymaps through the variable
565text or overlay property. If that is non-@code{nil}, it is the first 570text or overlay property. If that is non-@code{nil}, it is the first
566keymap to be processed, in normal circumstances. 571keymap to be processed, in normal circumstances.
567 572
568 However, there are also special circumstances, ways programs can 573 However, there are also special ways for program can to substitute
569substitute other keymaps for some of those. The variable 574other keymaps for some of those. The variable
570@code{overriding-local-map}, if non-@code{nil}, specifies a keymap 575@code{overriding-local-map}, if non-@code{nil}, specifies a keymap
571that replaces all the usual active keymaps except the global keymap. 576that replaces all the usual active keymaps except the global keymap.
572Another way to do this is with @code{overriding-terminal-local-map}; 577Another way to do this is with @code{overriding-terminal-local-map};
@@ -679,8 +684,8 @@ structure as elements of @code{minor-mode-alist}. The map must be the
679not do. The @sc{cdr} can be either a keymap (a list) or a symbol whose 684not do. The @sc{cdr} can be either a keymap (a list) or a symbol whose
680function definition is a keymap. 685function definition is a keymap.
681 686
682When more than one minor mode keymap is active, their order of priority 687When more than one minor mode keymap is active, the earlier one in
683is the order of @code{minor-mode-map-alist}. But you should design 688@code{minor-mode-map-alist} takes priority. But you should design
684minor modes so that they don't interfere with each other. If you do 689minor modes so that they don't interfere with each other. If you do
685this properly, the order will not matter. 690this properly, the order will not matter.
686 691
@@ -763,8 +768,8 @@ part of key lookup.
763 768
764 Key lookup uses just the event type of each event in the key sequence; 769 Key lookup uses just the event type of each event in the key sequence;
765the rest of the event is ignored. In fact, a key sequence used for key 770the rest of the event is ignored. In fact, a key sequence used for key
766lookup may designate mouse events with just their types (symbols) 771lookup may designate a mouse event with just its types (a symbol)
767instead of with entire mouse events (lists). @xref{Input Events}. Such 772instead of the entire event (a list). @xref{Input Events}. Such
768a ``key-sequence'' is insufficient for @code{command-execute} to run, 773a ``key-sequence'' is insufficient for @code{command-execute} to run,
769but it is sufficient for looking up or rebinding a key. 774but it is sufficient for looking up or rebinding a key.
770 775
@@ -1113,10 +1118,11 @@ key name). For example, @code{(control ?a)} is equivalent to
1113@code{C-H-left}. One advantage of such lists is that the precise 1118@code{C-H-left}. One advantage of such lists is that the precise
1114numeric codes for the modifier bits don't appear in compiled files. 1119numeric codes for the modifier bits don't appear in compiled files.
1115 1120
1116 For the functions below, an error is signaled if @var{keymap} is not a 1121 For the functions below, an error is signaled if @var{keymap} is not
1117keymap or if @var{key} is not a string or vector representing a key 1122a keymap or if @var{key} is not a string or vector representing a key
1118sequence. You can use event types (symbols) as shorthand for events 1123sequence. You can use event types (symbols) as shorthand for events
1119that are lists. 1124that are lists. The @code{kbd} macro (@pxref{Keymap Terminology}) is
1125a convenient way to specify the key sequence.
1120 1126
1121@defun define-key keymap key binding 1127@defun define-key keymap key binding
1122This function sets the binding for @var{key} in @var{keymap}. (If 1128This function sets the binding for @var{key} in @var{keymap}. (If
@@ -1396,7 +1402,7 @@ redefines @kbd{C-x C-\} to move down a line.
1396@end smallexample 1402@end smallexample
1397 1403
1398@noindent 1404@noindent
1399redefines the first (leftmost) mouse button, typed with the Meta key, to 1405redefines the first (leftmost) mouse button, entered with the Meta key, to
1400set point where you click. 1406set point where you click.
1401 1407
1402@cindex non-@acronym{ASCII} text in keybindings 1408@cindex non-@acronym{ASCII} text in keybindings
@@ -1743,7 +1749,7 @@ menu. It should be short---preferably one to three words. It should
1743describe the action of the command it corresponds to. Note that it is 1749describe the action of the command it corresponds to. Note that it is
1744not generally possible to display non-@acronym{ASCII} text in menus. It will 1750not generally possible to display non-@acronym{ASCII} text in menus. It will
1745work for keyboard menus and will work to a large extent when Emacs is 1751work for keyboard menus and will work to a large extent when Emacs is
1746built with Gtk+ support.@footnote{In this case, the text is first 1752built with the Gtk+ toolkit.@footnote{In this case, the text is first
1747encoded using the @code{utf-8} coding system and then rendered by the 1753encoded using the @code{utf-8} coding system and then rendered by the
1748toolkit as it sees fit.} 1754toolkit as it sees fit.}
1749 1755
@@ -2044,13 +2050,8 @@ with @samp{@@} or not. In a toolkit version of Emacs, the only thing
2044special about @samp{@@} at the beginning of an item string is that the 2050special about @samp{@@} at the beginning of an item string is that the
2045@samp{@@} doesn't appear in the menu item. 2051@samp{@@} doesn't appear in the menu item.
2046 2052
2047 You can also produce multiple panes or submenus from separate keymaps. 2053 Multiple keymaps that define the same menu prefix key produce
2048The full definition of a prefix key always comes from merging the 2054separate panes or separate submenus.
2049definitions supplied by the various active keymaps (minor mode, local,
2050and global). When more than one of these keymaps is a menu, each of
2051them makes a separate pane or panes (when Emacs does not use an
2052X-toolkit) or a separate submenu (when using an X-toolkit).
2053@xref{Active Keymaps}.
2054 2055
2055@node Keyboard Menus 2056@node Keyboard Menus
2056@subsection Menus and the Keyboard 2057@subsection Menus and the Keyboard
@@ -2094,29 +2095,29 @@ for @key{SPC}.
2094@cindex menu definition example 2095@cindex menu definition example
2095 2096
2096 Here is a complete example of defining a menu keymap. It is the 2097 Here is a complete example of defining a menu keymap. It is the
2097definition of the @samp{Print} submenu in the @samp{Tools} menu in the 2098definition of the @samp{Replace} submenu in the @samp{Edit} menu in
2098menu bar, and it uses the simple menu item format (@pxref{Simple Menu 2099the menu bar, and it uses the extended menu item format
2099Items}). First we create the keymap, and give it a name: 2100(@pxref{Extended Menu Items}). First we create the keymap, and give
2101it a name:
2100 2102
2101@example 2103@smallexample
2102(defvar menu-bar-print-menu (make-sparse-keymap "Print")) 2104(defvar menu-bar-replace-menu (make-sparse-keymap "Replace"))
2103@end example 2105@end smallexample
2104 2106
2105@noindent 2107@noindent
2106Next we define the menu items: 2108Next we define the menu items:
2107 2109
2108@example 2110@smallexample
2109(define-key menu-bar-print-menu [ps-print-region] 2111(define-key menu-bar-replace-menu [tags-repl-continue]
2110 '("Postscript Print Region" . ps-print-region-with-faces)) 2112 '(menu-item "Continue Replace" tags-loop-continue
2111(define-key menu-bar-print-menu [ps-print-buffer] 2113 :help "Continue last tags replace operation"))
2112 '("Postscript Print Buffer" . ps-print-buffer-with-faces)) 2114(define-key menu-bar-replace-menu [tags-repl]
2113(define-key menu-bar-print-menu [separator-ps-print] 2115 '(menu-item "Replace in tagged files" tags-query-replace
2114 '("--")) 2116 :help "Interactively replace a regexp in all tagged files"))
2115(define-key menu-bar-print-menu [print-region] 2117(define-key menu-bar-replace-menu [separator-replace-tags]
2116 '("Print Region" . print-region)) 2118 '(menu-item "--"))
2117(define-key menu-bar-print-menu [print-buffer] 2119;; @r{@dots{}}
2118 '("Print Buffer" . print-buffer)) 2120@end smallexample
2119@end example
2120 2121
2121@noindent 2122@noindent
2122Note the symbols which the bindings are ``made for''; these appear 2123Note the symbols which the bindings are ``made for''; these appear
@@ -2136,58 +2137,29 @@ typed with the keyboard.
2136 2137
2137 The binding whose definition is @code{("--")} is a separator line. 2138 The binding whose definition is @code{("--")} is a separator line.
2138Like a real menu item, the separator has a key symbol, in this case 2139Like a real menu item, the separator has a key symbol, in this case
2139@code{separator-ps-print}. If one menu has two separators, they must 2140@code{separator-replace-tags}. If one menu has two separators, they
2140have two different key symbols. 2141must have two different key symbols.
2141
2142 Here is code to define enable conditions for two of the commands in
2143the menu:
2144
2145@example
2146(put 'print-region 'menu-enable 'mark-active)
2147(put 'ps-print-region-with-faces 'menu-enable 'mark-active)
2148@end example
2149 2142
2150 Here is how we make this menu appear as an item in the parent menu: 2143 Here is how we make this menu appear as an item in the parent menu:
2151 2144
2152@example 2145@example
2153(define-key menu-bar-tools-menu [print] 2146(define-key menu-bar-edit-menu [replace]
2154 (cons "Print" menu-bar-print-menu)) 2147 (list 'menu-item "Replace" menu-bar-replace-menu))
2155@end example 2148@end example
2156 2149
2157@noindent 2150@noindent
2158Note that this incorporates the submenu keymap, which is the value of 2151Note that this incorporates the submenu keymap, which is the value of
2159the variable @code{menu-bar-print-menu}, rather than the symbol 2152the variable @code{menu-bar-replace-menu}, rather than the symbol
2160@code{menu-bar-print-menu} itself. Using that symbol in the parent menu 2153@code{menu-bar-replace-menu} itself. Using that symbol in the parent
2161item would be meaningless because @code{menu-bar-print-menu} is not a 2154menu item would be meaningless because @code{menu-bar-replace-menu} is
2162command. 2155not a command.
2163 2156
2164 If you wanted to attach the same print menu to a mouse click, you 2157 If you wanted to attach the same replace menu to a mouse click, you
2165can do it this way: 2158can do it this way:
2166 2159
2167@example 2160@example
2168(define-key global-map [C-S-down-mouse-1] 2161(define-key global-map [C-S-down-mouse-1]
2169 menu-bar-print-menu) 2162 menu-bar-replace-menu)
2170@end example
2171
2172 We could equally well use an extended menu item (@pxref{Extended Menu
2173Items}) for @code{print-region}, like this:
2174
2175@example
2176(define-key menu-bar-print-menu [print-region]
2177 '(menu-item "Print Region" print-region
2178 :enable mark-active))
2179@end example
2180
2181@noindent
2182With the extended menu item, the enable condition is specified
2183inside the menu item itself. If we wanted to make this
2184item disappear from the menu entirely when the mark is inactive,
2185we could do it this way:
2186
2187@example
2188(define-key menu-bar-print-menu [print-region]
2189 '(menu-item "Print Region" print-region
2190 :visible mark-active))
2191@end example 2163@end example
2192 2164
2193@node Menu Bar 2165@node Menu Bar
@@ -2197,7 +2169,7 @@ we could do it this way:
2197 Most window systems allow each frame to have a @dfn{menu bar}---a 2169 Most window systems allow each frame to have a @dfn{menu bar}---a
2198permanently displayed menu stretching horizontally across the top of the 2170permanently displayed menu stretching horizontally across the top of the
2199frame. The items of the menu bar are the subcommands of the fake 2171frame. The items of the menu bar are the subcommands of the fake
2200``function key'' @code{menu-bar}, as defined by all the active keymaps. 2172``function key'' @code{menu-bar}, as defined in the active keymaps.
2201 2173
2202 To add an item to the menu bar, invent a fake ``function key'' of your 2174 To add an item to the menu bar, invent a fake ``function key'' of your
2203own (let's call it @var{key}), and make a binding for the key sequence 2175own (let's call it @var{key}), and make a binding for the key sequence
diff --git a/lispref/macros.texi b/lispref/macros.texi
index 9a0ef696662..0a1bf942c29 100644
--- a/lispref/macros.texi
+++ b/lispref/macros.texi
@@ -140,13 +140,10 @@ uses this feature.
140 140
141@defun macroexpand-all form &optional environment 141@defun macroexpand-all form &optional environment
142@cindex macro expansion in entire form 142@cindex macro expansion in entire form
143
144@code{macroexpand-all} expands macros like @code{macroexpand}, but 143@code{macroexpand-all} expands macros like @code{macroexpand}, but
145will look for and expand all macros in @var{form}, not just at the 144will look for and expand all macros in @var{form}, not just at the
146top-level. 145top-level. If no macros are expanded, the return value is @code{eq}
147 146to @var{form}.
148In emacs-lisp, @code{macroexpand-all} guarantees that if no macros
149are expanded, the return value will be @code{eq} to @var{form}.
150 147
151Repeating the example used for @code{macroexpand} above with 148Repeating the example used for @code{macroexpand} above with
152@code{macroexpand-all}, we see that @code{macroexpand-all} @emph{does} 149@code{macroexpand-all}, we see that @code{macroexpand-all} @emph{does}
@@ -715,7 +712,7 @@ This is the same as no property---use the standard indentation pattern.
715@item @code{defun} 712@item @code{defun}
716Handle this function like a @samp{def} construct: treat the second 713Handle this function like a @samp{def} construct: treat the second
717line as the start of a @dfn{body}. 714line as the start of a @dfn{body}.
718@item a number, @var{number} 715@item an integer, @var{number}
719The first @var{number} arguments of the function are 716The first @var{number} arguments of the function are
720@dfn{distinguished} arguments; the rest are considered the body 717@dfn{distinguished} arguments; the rest are considered the body
721of the expression. A line in the expression is indented according to 718of the expression. A line in the expression is indented according to
diff --git a/lispref/markers.texi b/lispref/markers.texi
index 859edb0b6b8..31d6796af58 100644
--- a/lispref/markers.texi
+++ b/lispref/markers.texi
@@ -394,17 +394,17 @@ This is another name for @code{set-marker}.
394@cindex mark ring 394@cindex mark ring
395 395
396 One special marker in each buffer is designated @dfn{the mark}. It 396 One special marker in each buffer is designated @dfn{the mark}. It
397records a position for the user for the sake of commands such as 397specifies a position to bound a range of text for commands such as
398@code{kill-region} and @code{indent-rigidly}. Lisp programs should set 398@code{kill-region} and @code{indent-rigidly}. Lisp programs should
399the mark only to values that have a potential use to the user, and never 399set the mark only to values that have a potential use to the user, and
400for their own internal purposes. For example, the @code{replace-regexp} 400never for their own internal purposes. For example, the
401command sets the mark to the value of point before doing any 401@code{replace-regexp} command sets the mark to the value of point
402replacements, because this enables the user to move back there 402before doing any replacements, because this enables the user to move
403conveniently after the replace is finished. 403back there conveniently after the replace is finished.
404 404
405 Many commands are designed so that when called interactively they 405 Many commands are designed to operate on the text between point and
406operate on the text between point and the mark. If you are writing such 406the mark when called interactively. If you are writing such a
407a command, don't examine the mark directly; instead, use 407command, don't examine the mark directly; instead, use
408@code{interactive} with the @samp{r} specification. This provides the 408@code{interactive} with the @samp{r} specification. This provides the
409values of point and the mark as arguments to the command in an 409values of point and the mark as arguments to the command in an
410interactive call, but permits other Lisp programs to specify arguments 410interactive call, but permits other Lisp programs to specify arguments
diff --git a/lispref/os.texi b/lispref/os.texi
index 0a6e0aa3642..58bab17e139 100644
--- a/lispref/os.texi
+++ b/lispref/os.texi
@@ -30,7 +30,6 @@ pertaining to the terminal and the screen.
30* Terminal Output:: Recording terminal output for debugging. 30* Terminal Output:: Recording terminal output for debugging.
31* Sound Output:: Playing sounds on the computer's speaker. 31* Sound Output:: Playing sounds on the computer's speaker.
32* X11 Keysyms:: Operating on key symbols for X Windows 32* X11 Keysyms:: Operating on key symbols for X Windows
33* Flow Control:: How to turn output flow control on or off.
34* Batch Mode:: Running Emacs without terminal interaction. 33* Batch Mode:: Running Emacs without terminal interaction.
35* Session Management:: Saving and restoring state with X Session Management. 34* Session Management:: Saving and restoring state with X Session Management.
36@end menu 35@end menu
@@ -86,22 +85,22 @@ It initializes the window frame and faces, if appropriate.
86It runs the normal hook @code{before-init-hook}. 85It runs the normal hook @code{before-init-hook}.
87 86
88@item 87@item
89It loads the library @file{site-start}, unless the option 88It loads the library @file{site-start} (if any), unless the option
90@samp{-no-site-file} was specified. The library's file name is usually 89@samp{-Q} (or @samp{--no-site-file}) was specified. The library's file
91@file{site-start.el}. 90name is usually @file{site-start.el}.
92@cindex @file{site-start.el} 91@cindex @file{site-start.el}
93 92
94@item 93@item
95It loads your init file (usually @file{~/.emacs}), unless @samp{-q}, 94It loads your init file (usually @file{~/.emacs}), unless @samp{-q}
96@samp{-no-init-file}, or @samp{-batch} was specified on the command line. 95(or @samp{--no-init-file}), @samp{-Q}, or @samp{--batch} was specified
97The @samp{-u} option can specify another user whose home directory 96on the command line. The @samp{-u} option can specify another user
98should be used instead of @file{~}. 97whose home directory should be used instead of @file{~}.
99 98
100@item 99@item
101It loads the library @file{default}, unless @code{inhibit-default-init} 100It loads the library @file{default} (if any), unless
102is non-@code{nil}. (This is not done in @samp{-batch} mode or if 101@code{inhibit-default-init} is non-@code{nil}. (This is not done in
103@samp{-q} was specified on the command line.) The library's file name 102@samp{-batch} mode, or if @samp{-Q} or @samp{-q} was specified on the
104is usually @file{default.el}. 103command line.) The library's file name is usually @file{default.el}.
105@cindex @file{default.el} 104@cindex @file{default.el}
106 105
107@item 106@item
@@ -118,7 +117,7 @@ mode or using a window system.
118 117
119@item 118@item
120It displays the initial echo area message, unless you have suppressed 119It displays the initial echo area message, unless you have suppressed
121that with @code{inhibit-startup-echo-area-message}. 120that with @code{inhibit-startup-echo-area-message} or @samp{-Q}.
122 121
123@item 122@item
124It processes the action arguments from the command line. 123It processes the action arguments from the command line.
@@ -136,9 +135,8 @@ It runs @code{window-setup-hook}. @xref{Window Systems}.
136 135
137@item 136@item
138It displays copyleft, nonwarranty, and basic use information, provided 137It displays copyleft, nonwarranty, and basic use information, provided
139there were no remaining command-line arguments (a few steps above), 138the value of @code{inhibit-startup-message} is @code{nil}, you didn't
140the value of @code{inhibit-startup-message} is @code{nil}, and the 139specify @samp{--no-splash} or @samp{-Q}, and the buffer is still empty.
141buffer is still empty.
142@end enumerate 140@end enumerate
143 141
144@defopt inhibit-startup-message 142@defopt inhibit-startup-message
@@ -179,36 +177,39 @@ for someone else.
179@cindex @file{.emacs} 177@cindex @file{.emacs}
180 178
181 When you start Emacs, it normally attempts to load your @dfn{init 179 When you start Emacs, it normally attempts to load your @dfn{init
182file}, a file in your home directory. Its normal name is @file{.emacs}, 180file}, a file in your home directory. Its normal name is
183but you can alternatively call it @file{.emacs.el}, which enables you to 181@file{.emacs}, but you can alternatively call it @file{.emacs.el}.
184byte-compile it (@pxref{Byte Compilation}); then the actual file loaded 182You can also store it inside a subdirectory @file{.emacs.d}.
185will be @file{.emacs.elc}. 183Whichever place you use, you can also compile the file (@pxref{Byte
186 184Compilation}); then the actual file loaded will be @file{.emacs.elc}.
187 The command-line switches @samp{-q} and @samp{-u} control whether and 185
188where to find the init file; @samp{-q} says not to load an init file, 186 The command-line switches @samp{-q}, @samp{-Q}, and @samp{-u}
189and @samp{-u @var{user}} says to load @var{user}'s init file instead of 187control whether and where to find the init file; @samp{-q} (and the
190yours. @xref{Entering Emacs,,, emacs, The GNU Emacs Manual}. If 188stronger @samp{-Q}) says not to load an init file, while @samp{-u
191neither option is specified, Emacs uses the @code{LOGNAME} environment 189@var{user}} says to load @var{user}'s init file instead of yours.
190@xref{Entering Emacs,,, emacs, The GNU Emacs Manual}. If neither
191option is specified, Emacs uses the @code{LOGNAME} environment
192variable, or the @code{USER} (most systems) or @code{USERNAME} (MS 192variable, or the @code{USER} (most systems) or @code{USERNAME} (MS
193systems) variable, to find your home directory and thus your init file; 193systems) variable, to find your home directory and thus your init
194this way, even if you have su'd, Emacs still loads your own init file. 194file; this way, even if you have su'd, Emacs still loads your own init
195If those environment variables are absent, though, Emacs uses your 195file. If those environment variables are absent, though, Emacs uses
196user-id to find your home directory. 196your user-id to find your home directory.
197 197
198@cindex default init file 198@cindex default init file
199 A site may have a @dfn{default init file}, which is the library named 199 A site may have a @dfn{default init file}, which is the library
200@file{default.el}. Emacs finds the @file{default.el} file through the 200named @file{default.el}. Emacs finds the @file{default.el} file
201standard search path for libraries (@pxref{How Programs Do Loading}). 201through the standard search path for libraries (@pxref{How Programs Do
202The Emacs distribution does not come with this file; sites may provide 202Loading}). The Emacs distribution does not come with this file; sites
203one for local customizations. If the default init file exists, it is 203may provide one for local customizations. If the default init file
204loaded whenever you start Emacs, except in batch mode or if @samp{-q} is 204exists, it is loaded whenever you start Emacs, except in batch mode or
205specified. But your own personal init file, if any, is loaded first; if 205if @samp{-q} (or @samp{-Q}) is specified. But your own personal init
206it sets @code{inhibit-default-init} to a non-@code{nil} value, then 206file, if any, is loaded first; if it sets @code{inhibit-default-init}
207Emacs does not subsequently load the @file{default.el} file. 207to a non-@code{nil} value, then Emacs does not subsequently load the
208@file{default.el} file.
208 209
209 Another file for site-customization is @file{site-start.el}. Emacs 210 Another file for site-customization is @file{site-start.el}. Emacs
210loads this @emph{before} the user's init file. You can inhibit the 211loads this @emph{before} the user's init file. You can inhibit the
211loading of this file with the option @samp{-no-site-file}. 212loading of this file with the option @samp{--no-site-file}.
212 213
213@defvar site-run-file 214@defvar site-run-file
214This variable specifies the site-customization file to load before the 215This variable specifies the site-customization file to load before the
@@ -1526,7 +1527,7 @@ uses interrupts if that is the way it knows how to communicate.
1526 1527
1527If @var{flow} is non-@code{nil}, then Emacs uses @sc{xon/xoff} 1528If @var{flow} is non-@code{nil}, then Emacs uses @sc{xon/xoff}
1528(@kbd{C-q}, @kbd{C-s}) flow control for output to the terminal. This 1529(@kbd{C-q}, @kbd{C-s}) flow control for output to the terminal. This
1529has no effect except in @sc{cbreak} mode. @xref{Flow Control}. 1530has no effect except in @sc{cbreak} mode.
1530 1531
1531@c Emacs 19 feature 1532@c Emacs 19 feature
1532The argument @var{meta} controls support for input character codes 1533The argument @var{meta} controls support for input character codes
@@ -1621,7 +1622,7 @@ In the example below, we set @code{keyboard-translate-table} to a
1621char-table. Then we fill it in to swap the characters @kbd{C-s} and 1622char-table. Then we fill it in to swap the characters @kbd{C-s} and
1622@kbd{C-\} and the characters @kbd{C-q} and @kbd{C-^}. Subsequently, 1623@kbd{C-\} and the characters @kbd{C-q} and @kbd{C-^}. Subsequently,
1623typing @kbd{C-\} has all the usual effects of typing @kbd{C-s}, and vice 1624typing @kbd{C-\} has all the usual effects of typing @kbd{C-s}, and vice
1624versa. (@xref{Flow Control}, for more information on this subject.) 1625versa.
1625 1626
1626@cindex flow control example 1627@cindex flow control example
1627@example 1628@example
@@ -1820,7 +1821,7 @@ trigger an Emacs bug, for the sake of a bug report.
1820@section Terminal Output 1821@section Terminal Output
1821@cindex terminal output 1822@cindex terminal output
1822 1823
1823 The terminal output functions send output to the terminal, or keep 1824 The terminal output functions send output to a text terminal, or keep
1824track of output sent to the terminal. The variable @code{baud-rate} 1825track of output sent to the terminal. The variable @code{baud-rate}
1825tells you what Emacs thinks is the output speed of the terminal. 1826tells you what Emacs thinks is the output speed of the terminal.
1826 1827
@@ -1852,6 +1853,7 @@ This obsolete function returns the value of the variable
1852@defun send-string-to-terminal string 1853@defun send-string-to-terminal string
1853This function sends @var{string} to the terminal without alteration. 1854This function sends @var{string} to the terminal without alteration.
1854Control characters in @var{string} have terminal-dependent effects. 1855Control characters in @var{string} have terminal-dependent effects.
1856This function operates only on text terminals.
1855 1857
1856One use of this function is to define function keys on terminals that 1858One use of this function is to define function keys on terminals that
1857have downloadable function key definitions. For example, this is how (on 1859have downloadable function key definitions. For example, this is how (on
@@ -2003,98 +2005,6 @@ how to swap the Meta and Alt modifiers within Emacs:
2003@end lisp 2005@end lisp
2004@end defvar 2006@end defvar
2005 2007
2006@node Flow Control
2007@section Flow Control
2008@cindex flow control characters
2009
2010 This section attempts to answer the question ``Why does Emacs use
2011flow-control characters in its command character set?'' For a second
2012view on this issue, read the comments on flow control in the
2013@file{emacs/INSTALL} file from the distribution; for help with Termcap
2014entries and DEC terminal concentrators, see @file{emacs/etc/TERMS}.
2015
2016@cindex @kbd{C-s}
2017@cindex @kbd{C-q}
2018 At one time, most terminals did not need flow control, and none used
2019@code{C-s} and @kbd{C-q} for flow control. Therefore, the choice of
2020@kbd{C-s} and @kbd{C-q} as command characters for searching and quoting
2021was natural and uncontroversial. With so many commands needing key
2022assignments, of course we assigned meanings to nearly all @acronym{ASCII}
2023control characters.
2024
2025 Later, some terminals were introduced which required these characters
2026for flow control. They were not very good terminals for full-screen
2027editing, so Emacs maintainers ignored them. In later years, flow
2028control with @kbd{C-s} and @kbd{C-q} became widespread among terminals,
2029but by this time it was usually an option. And the majority of Emacs
2030users, who can turn flow control off, did not want to switch to less
2031mnemonic key bindings for the sake of flow control.
2032
2033 So which usage is ``right''---Emacs's or that of some terminal and
2034concentrator manufacturers? This question has no simple answer.
2035
2036 One reason why we are reluctant to cater to the problems caused by
2037@kbd{C-s} and @kbd{C-q} is that they are gratuitous. There are other
2038techniques (albeit less common in practice) for flow control that
2039preserve transparency of the character stream. Note also that their use
2040for flow control is not an official standard. Interestingly, on the
2041model 33 teletype with a paper tape punch (around 1970), @kbd{C-s} and
2042@kbd{C-q} were sent by the computer to turn the punch on and off!
2043
2044 As window systems and PC terminal emulators replace character-only
2045terminals, the flow control problem is gradually disappearing. For the
2046mean time, Emacs provides a convenient way of enabling flow control if
2047you want it: call the function @code{enable-flow-control}.
2048
2049@deffn Command enable-flow-control &optional arg
2050When @var{arg} is a positive integer, this function enables use of
2051@kbd{C-s} and @kbd{C-q} for output flow control, and provides the
2052characters @kbd{C-\} and @kbd{C-^} as aliases for them using
2053@code{keyboard-translate-table} (@pxref{Translating Input}).
2054
2055When @var{arg} is a negative integer or zero, it disables these
2056features. When @var{arg} is @code{nil} or omitted, it toggles.
2057Interactively, @var{arg} is the prefix argument. If non-@code{nil},
2058its numeric value is used.
2059@end deffn
2060
2061You can use the function @code{enable-flow-control-on} in your
2062init file to enable flow control automatically on certain
2063terminal types.
2064
2065@defun enable-flow-control-on &rest termtypes
2066This function enables flow control, and the aliases @kbd{C-\} and @kbd{C-^},
2067if the terminal type is one of @var{termtypes}. For example:
2068
2069@smallexample
2070(enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
2071@end smallexample
2072@end defun
2073
2074 Here is how @code{enable-flow-control} does its job:
2075
2076@enumerate
2077@item
2078@cindex @sc{cbreak}
2079It sets @sc{cbreak} mode for terminal input, and tells the operating
2080system to handle flow control. This is done using @code{set-input-mode}.
2081
2082@item
2083It sets up @code{keyboard-translate-table} to translate @kbd{C-\} and
2084@kbd{C-^} into @kbd{C-s} and @kbd{C-q}. Except at its very
2085lowest level, Emacs never knows that the characters typed were anything
2086but @kbd{C-s} and @kbd{C-q}, so you can in effect type them as @kbd{C-\}
2087and @kbd{C-^} even when they are input for other commands.
2088@xref{Translating Input}.
2089@end enumerate
2090
2091If the terminal is the source of the flow control characters, then once
2092you enable kernel flow control handling, you probably can make do with
2093less padding than normal for that terminal. You can reduce the amount
2094of padding by customizing the Termcap entry. You can also reduce it by
2095setting @code{baud-rate} to a smaller value so that Emacs uses a smaller
2096speed when calculating the padding needed. @xref{Terminal Output}.
2097
2098@node Batch Mode 2008@node Batch Mode
2099@section Batch Mode 2009@section Batch Mode
2100@cindex batch mode 2010@cindex batch mode
@@ -2106,8 +2016,8 @@ terminal, it does not alter the terminal modes, and it does not expect
2106to be outputting to an erasable screen. The idea is that you specify 2016to be outputting to an erasable screen. The idea is that you specify
2107Lisp programs to run; when they are finished, Emacs should exit. The 2017Lisp programs to run; when they are finished, Emacs should exit. The
2108way to specify the programs to run is with @samp{-l @var{file}}, which 2018way to specify the programs to run is with @samp{-l @var{file}}, which
2109loads the library named @var{file}, and @samp{-f @var{function}}, which 2019loads the library named @var{file}, or @samp{-f @var{function}}, which
2110calls @var{function} with no arguments. 2020calls @var{function} with no arguments, or @samp{--eval @var{form}}.
2111 2021
2112 Any Lisp program output that would normally go to the echo area, 2022 Any Lisp program output that would normally go to the echo area,
2113either using @code{message}, or using @code{prin1}, etc., with @code{t} 2023either using @code{message}, or using @code{prin1}, etc., with @code{t}
diff --git a/lispref/processes.texi b/lispref/processes.texi
index d0d65fbfc2d..2db9cd05b95 100644
--- a/lispref/processes.texi
+++ b/lispref/processes.texi
@@ -77,11 +77,12 @@ cannot be executed. If the file name is relative, the variable
77@code{exec-path} contains a list of directories to search. Emacs 77@code{exec-path} contains a list of directories to search. Emacs
78initializes @code{exec-path} when it starts up, based on the value of 78initializes @code{exec-path} when it starts up, based on the value of
79the environment variable @code{PATH}. The standard file name 79the environment variable @code{PATH}. The standard file name
80constructs, @samp{~}, @samp{.}, and @samp{..}, are interpreted as usual 80constructs, @samp{~}, @samp{.}, and @samp{..}, are interpreted as
81in @code{exec-path}, but environment variable substitutions 81usual in @code{exec-path}, but environment variable substitutions
82(@samp{$HOME}, etc.) are not recognized; use 82(@samp{$HOME}, etc.) are not recognized; use
83@code{substitute-in-file-name} to perform them (@pxref{File Name 83@code{substitute-in-file-name} to perform them (@pxref{File Name
84Expansion}). 84Expansion}). @code{nil} in this list refers to
85@code{default-directory}.
85 86
86 Executing a program can also try adding suffixes to the specified 87 Executing a program can also try adding suffixes to the specified
87name: 88name:
@@ -93,6 +94,10 @@ want the name to be tried exactly as specified. The default value is
93system-dependent. 94system-dependent.
94@end defvar 95@end defvar
95 96
97 @strong{Please note:} The argument @var{program} contains only the
98name of the program; it may not contain any command-line arguments. You
99must use @var{args} to provide those.
100
96 Each of the subprocess-creating functions has a @var{buffer-or-name} 101 Each of the subprocess-creating functions has a @var{buffer-or-name}
97argument which specifies where the standard output from the program will 102argument which specifies where the standard output from the program will
98go. It should be a buffer or a buffer name; if it is a buffer name, 103go. It should be a buffer or a buffer name; if it is a buffer name,
@@ -107,12 +112,7 @@ same buffer because their output would be intermixed randomly.
107argument, @var{args}. The @var{args} must all be strings, and they are 112argument, @var{args}. The @var{args} must all be strings, and they are
108supplied to @var{program} as separate command line arguments. Wildcard 113supplied to @var{program} as separate command line arguments. Wildcard
109characters and other shell constructs have no special meanings in these 114characters and other shell constructs have no special meanings in these
110strings, since the whole strings are passed directly to the specified 115strings, since the strings are passed directly to the specified program.
111program.
112
113 @strong{Please note:} The argument @var{program} contains only the
114name of the program; it may not contain any command-line arguments. You
115must use @var{args} to provide those.
116 116
117 The subprocess gets its current directory from the value of 117 The subprocess gets its current directory from the value of
118@code{default-directory} (@pxref{File Name Expansion}). 118@code{default-directory} (@pxref{File Name Expansion}).
@@ -547,17 +547,16 @@ Information}).
547subprocess. Processes are deleted automatically after they terminate, 547subprocess. Processes are deleted automatically after they terminate,
548but not necessarily right away. You can delete a process explicitly 548but not necessarily right away. You can delete a process explicitly
549at any time. If you delete a terminated process explicitly before it 549at any time. If you delete a terminated process explicitly before it
550is deleted automatically, no harm results. Deletion of a running 550is deleted automatically, no harm results. Deleting a running
551process sends a signal to terminate it (and its child processes if 551process sends a signal to terminate it (and its child processes if
552any), and calls the process sentinel if it has one. 552any), and calls the process sentinel if it has one. @xref{Sentinels}.
553 553
554 @code{get-buffer-process} and @code{process-list} do not remember a 554 When a process is deleted, the process object itself continues to
555deleted process, but the process object itself continues to exist as 555exist as long as other Lisp objects point to it. All the Lisp
556long as other Lisp objects point to it. All the Lisp primitives that 556primitives that work on process objects accept deleted processes, but
557work on process objects accept deleted processes, but those that do 557those that do I/O or send signals will report an error. The process
558I/O or send signals will report an error. The process mark continues 558mark continues to point to the same place as before, usually into a
559to point to the same place as before, usually into a buffer where 559buffer where output from the process was being inserted.
560output from the process was being inserted.
561 560
562@defopt delete-exited-processes 561@defopt delete-exited-processes
563This variable controls automatic deletion of processes that have 562This variable controls automatic deletion of processes that have
@@ -567,15 +566,16 @@ terminated (due to calling @code{exit} or to a signal). If it is
567they exit. 566they exit.
568@end defopt 567@end defopt
569 568
570@defun delete-process name 569@defun delete-process process
571This function deletes the process associated with @var{name}, killing 570This function deletes a process, killing it with a @code{SIGKILL}
572it with a @code{SIGKILL} signal. The argument @var{name} may be a 571signal. The argument may be a process, the name of a process, a
573process, the name of a process, a buffer, or the name of a buffer. 572buffer, or the name of a buffer. (A buffer or buffer-name stands for
574Calling @code{delete-process} on a running process terminates it, 573the process that @code{get-buffer-process} returns.) Calling
575updates the process status, and runs the sentinel (if any) immediately. 574@code{delete-process} on a running process terminates it, updates the
576If the process has already terminated, calling @code{delete-process} 575process status, and runs the sentinel (if any) immediately. If the
577has no effect on its status, or on the running of its sentinel (which 576process has already terminated, calling @code{delete-process} has no
578will happen sooner or later). 577effect on its status, or on the running of its sentinel (which will
578happen sooner or later).
579 579
580@smallexample 580@smallexample
581@group 581@group
@@ -728,7 +728,7 @@ for decoding output from @var{process} and for encoding input to
728@end example 728@end example
729@end defun 729@end defun
730 730
731@defun set-process-coding-system process decoding-system encoding-system 731@defun set-process-coding-system process &optional decoding-system encoding-system
732This function specifies the coding systems to use for subsequent output 732This function specifies the coding systems to use for subsequent output
733from and input to @var{process}. It will use @var{decoding-system} to 733from and input to @var{process}. It will use @var{decoding-system} to
734decode subprocess output, and @var{encoding-system} to encode subprocess 734decode subprocess output, and @var{encoding-system} to encode subprocess
@@ -784,11 +784,14 @@ again. This gives the subprocess a chance to read more of its pending
784input and make space in the buffer. It also allows filters, sentinels 784input and make space in the buffer. It also allows filters, sentinels
785and timers to run---so take account of that in writing your code. 785and timers to run---so take account of that in writing your code.
786 786
787@defun process-send-string process-name string 787 In these functions, the @var{process} argument can be a process or
788This function sends @var{process-name} the contents of @var{string} as 788the name of a process, or a buffer or buffer name (which stands
789standard input. The argument @var{process-name} must be a process or 789for a process via @code{get-buffer-process}). @code{nil} means
790the name of a process. If it is @code{nil}, the current buffer's 790the current buffer's process.
791process is used. 791
792@defun process-send-string process string
793This function sends @var{process} the contents of @var{string} as
794standard input. If it is @code{nil}, the current buffer's process is used.
792 795
793 The function returns @code{nil}. 796 The function returns @code{nil}.
794 797
@@ -811,26 +814,20 @@ introduction.txt text.texi~
811@end smallexample 814@end smallexample
812@end defun 815@end defun
813 816
814@defun process-send-region process-name start end 817@defun process-send-region process start end
815This function sends the text in the region defined by @var{start} and 818This function sends the text in the region defined by @var{start} and
816@var{end} as standard input to @var{process-name}, which is a process or 819@var{end} as standard input to @var{process}.
817a process name. (If it is @code{nil}, the current buffer's process is
818used.)
819 820
820An error is signaled unless both @var{start} and @var{end} are 821An error is signaled unless both @var{start} and @var{end} are
821integers or markers that indicate positions in the current buffer. (It 822integers or markers that indicate positions in the current buffer. (It
822is unimportant which number is larger.) 823is unimportant which number is larger.)
823@end defun 824@end defun
824 825
825@defun process-send-eof &optional process-name 826@defun process-send-eof &optional process
826 This function makes @var{process-name} see an end-of-file in its 827This function makes @var{process} see an end-of-file in its
827input. The @acronym{EOF} comes after any text already sent to it. 828input. The @acronym{EOF} comes after any text already sent to it.
828 829
829 If @var{process-name} is not supplied, or if it is @code{nil}, then 830The function returns @var{process}.
830this function sends the @acronym{EOF} to the current buffer's process. An
831error is signaled if the current buffer has no process.
832
833 The function returns @var{process-name}.
834 831
835@smallexample 832@smallexample
836@group 833@group
@@ -875,10 +872,11 @@ user hung up the phone.)
875 Each of the signal-sending functions takes two optional arguments: 872 Each of the signal-sending functions takes two optional arguments:
876@var{process-name} and @var{current-group}. 873@var{process-name} and @var{current-group}.
877 874
878 The argument @var{process-name} must be either a process, the name of 875 The argument @var{process} must be either a process, a process
879one, or @code{nil}. If it is @code{nil}, the process defaults to the 876name, a buffer, a buffer name, or @code{nil}. A buffer or buffer name
880process associated with the current buffer. An error is signaled if 877stands for a process through @code{get-buffer-process}. @code{nil}
881@var{process-name} does not identify a process. 878stands for the process associated with the current buffer. An error
879is signaled if @var{process} does not identify a process.
882 880
883 The argument @var{current-group} is a flag that makes a difference 881 The argument @var{current-group} is a flag that makes a difference
884when you are running a job-control shell as an Emacs subprocess. If it 882when you are running a job-control shell as an Emacs subprocess. If it
@@ -895,8 +893,8 @@ support the distinction in the case of pipes. For the same reason,
895job-control shells won't work when a pipe is used. See 893job-control shells won't work when a pipe is used. See
896@code{process-connection-type} in @ref{Asynchronous Processes}. 894@code{process-connection-type} in @ref{Asynchronous Processes}.
897 895
898@defun interrupt-process &optional process-name current-group 896@defun interrupt-process &optional process current-group
899This function interrupts the process @var{process-name} by sending the 897This function interrupts the process @var{process} by sending the
900signal @code{SIGINT}. Outside of Emacs, typing the ``interrupt 898signal @code{SIGINT}. Outside of Emacs, typing the ``interrupt
901character'' (normally @kbd{C-c} on some systems, and @code{DEL} on 899character'' (normally @kbd{C-c} on some systems, and @code{DEL} on
902others) sends this signal. When the argument @var{current-group} is 900others) sends this signal. When the argument @var{current-group} is
@@ -904,21 +902,21 @@ non-@code{nil}, you can think of this function as ``typing @kbd{C-c}''
904on the terminal by which Emacs talks to the subprocess. 902on the terminal by which Emacs talks to the subprocess.
905@end defun 903@end defun
906 904
907@defun kill-process &optional process-name current-group 905@defun kill-process &optional process current-group
908This function kills the process @var{process-name} by sending the 906This function kills the process @var{process} by sending the
909signal @code{SIGKILL}. This signal kills the subprocess immediately, 907signal @code{SIGKILL}. This signal kills the subprocess immediately,
910and cannot be handled by the subprocess. 908and cannot be handled by the subprocess.
911@end defun 909@end defun
912 910
913@defun quit-process &optional process-name current-group 911@defun quit-process &optional process current-group
914This function sends the signal @code{SIGQUIT} to the process 912This function sends the signal @code{SIGQUIT} to the process
915@var{process-name}. This signal is the one sent by the ``quit 913@var{process}. This signal is the one sent by the ``quit
916character'' (usually @kbd{C-b} or @kbd{C-\}) when you are not inside 914character'' (usually @kbd{C-b} or @kbd{C-\}) when you are not inside
917Emacs. 915Emacs.
918@end defun 916@end defun
919 917
920@defun stop-process &optional process-name current-group 918@defun stop-process &optional process current-group
921This function stops the process @var{process-name} by sending the 919This function stops the process @var{process} by sending the
922signal @code{SIGTSTP}. Use @code{continue-process} to resume its 920signal @code{SIGTSTP}. Use @code{continue-process} to resume its
923execution. 921execution.
924 922
@@ -929,9 +927,9 @@ Outside of Emacs, on systems with job control, the ``stop character''
929subprocess. 927subprocess.
930@end defun 928@end defun
931 929
932@defun continue-process &optional process-name current-group 930@defun continue-process &optional process current-group
933This function resumes execution of the process @var{process} by sending 931This function resumes execution of the process @var{process} by sending
934it the signal @code{SIGCONT}. This presumes that @var{process-name} was 932it the signal @code{SIGCONT}. This presumes that @var{process} was
935stopped previously. 933stopped previously.
936@end defun 934@end defun
937 935
@@ -940,8 +938,9 @@ stopped previously.
940This function sends a signal to process @var{process}. The argument 938This function sends a signal to process @var{process}. The argument
941@var{signal} specifies which signal to send; it should be an integer. 939@var{signal} specifies which signal to send; it should be an integer.
942 940
943You can specify the target process by its process @acronym{ID}; that allows 941The @var{process} argument can be a system process @acronym{ID}; that
944you to send signals to processes that are not children of Emacs. 942allows you to send signals to processes that are not children of
943Emacs.
945@end defun 944@end defun
946 945
947@node Output from Processes 946@node Output from Processes
@@ -1240,7 +1239,7 @@ there is no filter function:
1240it decodes the output according to the process output coding system. 1239it decodes the output according to the process output coding system.
1241If the coding system is @code{raw-text} or @code{no-conversion}, Emacs 1240If the coding system is @code{raw-text} or @code{no-conversion}, Emacs
1242converts the unibyte output to multibyte using 1241converts the unibyte output to multibyte using
1243@code{string-to-multibyte}, inserts the resulting multibyte text. 1242@code{string-to-multibyte}, and inserts the resulting multibyte text.
1244 1243
1245 You can use @code{set-process-coding-system} to specify which coding 1244 You can use @code{set-process-coding-system} to specify which coding
1246system to use (@pxref{Process Information}). Otherwise, the coding 1245system to use (@pxref{Process Information}). Otherwise, the coding
@@ -1443,7 +1442,7 @@ was not.
1443@section Querying Before Exit 1442@section Querying Before Exit
1444 1443
1445 When Emacs exits, it terminates all its subprocesses by sending them 1444 When Emacs exits, it terminates all its subprocesses by sending them
1446the @code{SIGHUP} signal. Because some subprocesses are doing 1445the @code{SIGHUP} signal. Because subprocesses may be doing
1447valuable work, Emacs normally asks the user to confirm that it is ok 1446valuable work, Emacs normally asks the user to confirm that it is ok
1448to terminate them. Each process has a query flag which, if 1447to terminate them. Each process has a query flag which, if
1449non-@code{nil}, says that Emacs should ask for confirmation before 1448non-@code{nil}, says that Emacs should ask for confirmation before
diff --git a/lispref/sequences.texi b/lispref/sequences.texi
index a9f997a5b2c..982c9ffeadd 100644
--- a/lispref/sequences.texi
+++ b/lispref/sequences.texi
@@ -252,8 +252,8 @@ The length of the array is fixed once you create it; you cannot
252change the length of an existing array. 252change the length of an existing array.
253 253
254@item 254@item
255The array is a constant, for evaluation---in other words, it evaluates 255for purposes of evaluation, the array is a constant---in other words,
256to itself. 256it evaluates to itself.
257 257
258@item 258@item
259The elements of an array may be referenced or changed with the functions 259The elements of an array may be referenced or changed with the functions
@@ -580,12 +580,12 @@ otherwise @code{nil}.
580This function returns the subtype symbol of @var{char-table}. 580This function returns the subtype symbol of @var{char-table}.
581@end defun 581@end defun
582 582
583@defun set-char-table-default char-table new-default 583@defun set-char-table-default char-table char new-default
584This function sets the default value of @var{char-table} to 584This function sets the default value of generic character @var{char}
585@var{new-default}. 585in @var{char-table} to @var{new-default}.
586 586
587There is no special function to access the default value of a char-table. 587There is no special function to access default values in a char-table.
588To do that, use @code{(char-table-range @var{char-table} nil)}. 588To do that, use @code{char-table-range} (see below).
589@end defun 589@end defun
590 590
591@defun char-table-parent char-table 591@defun char-table-parent char-table
@@ -628,9 +628,10 @@ Refers to the value specified for the whole character set
628@var{charset} (@pxref{Character Sets}). 628@var{charset} (@pxref{Character Sets}).
629 629
630@item @var{generic-char} 630@item @var{generic-char}
631A generic character stands for a character set; specifying the generic 631A generic character stands for a character set, or a row of a
632character as argument is equivalent to specifying the character set 632character set; specifying the generic character as argument is
633name. @xref{Splitting Characters}, for a description of generic characters. 633equivalent to specifying the character set name. @xref{Splitting
634Characters}, for a description of generic characters.
634@end table 635@end table
635@end defun 636@end defun
636 637
diff --git a/lispref/syntax.texi b/lispref/syntax.texi
index 1dc1a2587e5..438c1815fe4 100644
--- a/lispref/syntax.texi
+++ b/lispref/syntax.texi
@@ -155,9 +155,10 @@ character that is valid in symbols is underscore (@samp{_}).
155@dfn{Punctuation characters} (designated by @samp{.}) are those 155@dfn{Punctuation characters} (designated by @samp{.}) are those
156characters that are used as punctuation in English, or are used in some 156characters that are used as punctuation in English, or are used in some
157way in a programming language to separate symbols from one another. 157way in a programming language to separate symbols from one another.
158Most programming language modes, including Emacs Lisp mode, have no 158Some programming language modes, such as Emacs Lisp mode, have no
159characters in this class since the few characters that are not symbol or 159characters in this class since the few characters that are not symbol or
160word constituents all have other uses. 160word constituents all have other uses. Other programming language modes,
161such as C mode, use punctuation syntax for operators.
161@end deffn 162@end deffn
162 163
163@deffn {Syntax class} @w{open parenthesis character} 164@deffn {Syntax class} @w{open parenthesis character}
@@ -501,12 +502,6 @@ We use @code{string} to make it easier to see the character returned by
501@code{char-syntax}. 502@code{char-syntax}.
502@end defun 503@end defun
503 504
504@defun syntax-after pos
505This function returns a description of the syntax of the character in
506the buffer after position @var{pos}, taking account of syntax
507properties as well as the syntax table.
508@end defun
509
510@defun set-syntax-table table 505@defun set-syntax-table table
511This function makes @var{table} the syntax table for the current buffer. 506This function makes @var{table} the syntax table for the current buffer.
512It returns @var{table}. 507It returns @var{table}.
@@ -664,13 +659,13 @@ start of a comment. If @var{stop-comment} is the symbol
664string, or the end of a comment or a string, whichever comes first. 659string, or the end of a comment or a string, whichever comes first.
665 660
666@cindex parse state 661@cindex parse state
667The fifth argument @var{state} is a nine-element list of the same form 662The fifth argument @var{state} is a ten-element list of the same form
668as the value of this function, described below. (It is OK to omit the 663as the value of this function, described below. (It is OK to omit the
669last element of the nine.) The return value of one call may be used to 664last two elements of this list.) The return value of one call may be
670initialize the state of the parse on another call to 665used to initialize the state of the parse on another call to
671@code{parse-partial-sexp}. 666@code{parse-partial-sexp}.
672 667
673The result is a list of nine elements describing the final state of 668The result is a list of ten elements describing the final state of
674the parse: 669the parse:
675 670
676@enumerate 0 671@enumerate 0
@@ -717,15 +712,16 @@ The string or comment start position. While inside a comment, this is
717the position where the comment began; while inside a string, this is the 712the position where the comment began; while inside a string, this is the
718position where the string began. When outside of strings and comments, 713position where the string began. When outside of strings and comments,
719this element is @code{nil}. 714this element is @code{nil}.
720@end enumerate
721 715
722Elements 0, 3, 4, 5 and 7 are significant in the argument @var{state}. 716@item
717Internal data for continuing the parsing. The meaning of this
718data is subject to change; it is used if you pass this list
719as the @var{state} argument to another call.
720
721@end enumerate
723 722
724Actually, the return value is currently a list of ten, rather than 723Elements 0, 3, 4, 5, 7 and 9 are significant in the argument
725nine, elements and @var{state} is allowed to be a list of ten elements 724@var{state}.
726as well. However, the meaning of the tenth element is subject to
727change and only the first eight elements of @var{state} need to be
728specified.
729 725
730@cindex indenting with parentheses 726@cindex indenting with parentheses
731This function is most often used to compute indentation for languages 727This function is most often used to compute indentation for languages
@@ -941,6 +937,12 @@ This function returns the internal form @code{(@var{syntax-code} .
941@var{matching-char})} corresponding to the syntax descriptor @var{desc}. 937@var{matching-char})} corresponding to the syntax descriptor @var{desc}.
942@end defun 938@end defun
943 939
940@defun syntax-after pos
941This function returns the syntax code of the character in the buffer
942after position @var{pos}, taking account of syntax properties as well
943as the syntax table.
944@end defun
945
944@node Categories 946@node Categories
945@section Categories 947@section Categories
946@cindex categories of characters 948@cindex categories of characters
@@ -973,7 +975,7 @@ defaults to the current buffer's category table.
973 975
974@defun define-category char docstring &optional table 976@defun define-category char docstring &optional table
975This function defines a new category, with name @var{char} and 977This function defines a new category, with name @var{char} and
976documentation @var{docstring}, for the category table @var{table}, 978documentation @var{docstring}, for the category table @var{table}.
977@end defun 979@end defun
978 980
979@defun category-docstring category &optional table 981@defun category-docstring category &optional table
diff --git a/lispref/tips.texi b/lispref/tips.texi
index 8d7fd5ec5fb..c029ee1d451 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -46,7 +46,7 @@ variables, constants, and functions in your program with the chosen
46prefix. This helps avoid name conflicts. 46prefix. This helps avoid name conflicts.
47 47
48This recommendation applies even to names for traditional Lisp 48This recommendation applies even to names for traditional Lisp
49primitives that are not primitives in Emacs Lisp---even to 49primitives that are not primitives in Emacs Lisp---such as
50@code{copy-list}. Believe it or not, there is more than one plausible 50@code{copy-list}. Believe it or not, there is more than one plausible
51way to define @code{copy-list}. Play it safe; append your name prefix 51way to define @code{copy-list}. Play it safe; append your name prefix
52to produce a name like @code{foo-copy-list} or @code{mylib-copy-list} 52to produce a name like @code{foo-copy-list} or @code{mylib-copy-list}
@@ -101,11 +101,7 @@ standard Emacs namespace. If your package loads @code{cl} at run time,
101that could cause name clashes for users who don't use that package. 101that could cause name clashes for users who don't use that package.
102 102
103However, there is no problem with using the @code{cl} package at compile 103However, there is no problem with using the @code{cl} package at compile
104time, for the sake of macros. You do that like this: 104time, with @code{(eval-when-compile (require 'cl))}.
105
106@example
107(eval-when-compile (require 'cl))
108@end example
109 105
110@item 106@item
111When defining a major mode, please follow the major mode 107When defining a major mode, please follow the major mode
@@ -134,16 +130,26 @@ follow the naming conventions for hooks. @xref{Hooks}.
134@item 130@item
135@cindex reserved keys 131@cindex reserved keys
136@cindex keys, reserved 132@cindex keys, reserved
137Please do not define @kbd{C-c @var{letter}} as a key in your major 133Please do not define @kbd{C-c @var{letter}} as a key in Lisp programs.
138modes. Sequences consisting of @kbd{C-c} and a letter (either upper 134Sequences consisting of @kbd{C-c} and a letter (either upper or lower
139or lower case) are reserved for users; they are the @strong{only} 135case) are reserved for users; they are the @strong{only} sequences
140sequences reserved for users, so do not block them. 136reserved for users, so do not block them.
141 137
142Changing all the Emacs major modes to respect this convention was a 138Changing all the Emacs major modes to respect this convention was a
143lot of work; abandoning this convention would make that work go to 139lot of work; abandoning this convention would make that work go to
144waste, and inconvenience users. Please comply with it. 140waste, and inconvenience users. Please comply with it.
145 141
146@item 142@item
143Function keys @key{F5} through @key{F9} without modifier keys are
144also reserved for users to define.
145
146@item
147Applications should not bind mouse events based on button 1 with the
148shift key held down. These events include @kbd{S-mouse-1},
149@kbd{M-S-mouse-1}, @kbd{C-S-mouse-1}, and so on. They are reserved for
150users.
151
152@item
147Sequences consisting of @kbd{C-c} followed by a control character or a 153Sequences consisting of @kbd{C-c} followed by a control character or a
148digit are reserved for major modes. 154digit are reserved for major modes.
149 155
@@ -158,10 +164,6 @@ not absolutely prohibited, but if you do that, the major mode binding
158may be shadowed from time to time by minor modes. 164may be shadowed from time to time by minor modes.
159 165
160@item 166@item
161Function keys @key{F5} through @key{F9} without modifier keys are
162reserved for users to define.
163
164@item
165Do not bind @kbd{C-h} following any prefix character (including 167Do not bind @kbd{C-h} following any prefix character (including
166@kbd{C-c}). If you don't bind @kbd{C-h}, it is automatically available 168@kbd{C-c}). If you don't bind @kbd{C-h}, it is automatically available
167as a help character for listing the subcommands of the prefix character. 169as a help character for listing the subcommands of the prefix character.
@@ -189,12 +191,6 @@ after @key{ESC}. In these states, you should define @kbd{@key{ESC}
189@kbd{@key{ESC} @key{ESC}} instead. 191@kbd{@key{ESC} @key{ESC}} instead.
190 192
191@item 193@item
192Applications should not bind mouse events based on button 1 with the
193shift key held down. These events include @kbd{S-mouse-1},
194@kbd{M-S-mouse-1}, @kbd{C-S-mouse-1}, and so on. They are reserved for
195users.
196
197@item
198@cindex mouse-2 194@cindex mouse-2
199@cindex references, following 195@cindex references, following
200Special major modes used for read-only text should usually redefine 196Special major modes used for read-only text should usually redefine
@@ -202,6 +198,9 @@ Special major modes used for read-only text should usually redefine
202Modes such as Dired, Info, Compilation, and Occur redefine it in this 198Modes such as Dired, Info, Compilation, and Occur redefine it in this
203way. 199way.
204 200
201In addition, they should mark the text as a kind of ``link'' so that
202@kbd{mouse-1} will follow it also. @xref{Links and Mouse-1}.
203
205@item 204@item
206When a package provides a modification of ordinary Emacs behavior, it is 205When a package provides a modification of ordinary Emacs behavior, it is
207good to include a command to enable and disable the feature, provide a 206good to include a command to enable and disable the feature, provide a
@@ -382,8 +381,7 @@ not to warn about uses of the variable @code{foo} in this file.
382@item 381@item
383If you use many functions and variables from a certain file, you can 382If you use many functions and variables from a certain file, you can
384add a @code{require} for that package to avoid compilation warnings 383add a @code{require} for that package to avoid compilation warnings
385for them. It is better if the @code{require} acts only at compile 384for them. For instance,
386time. Here's how to do this:
387 385
388@example 386@example
389(eval-when-compile 387(eval-when-compile
@@ -434,7 +432,7 @@ Use a message like this one:
434 432
435If you have signed papers to assign the copyright to the Foundation, 433If you have signed papers to assign the copyright to the Foundation,
436then use @samp{Free Software Foundation, Inc.} as @var{name}. 434then use @samp{Free Software Foundation, Inc.} as @var{name}.
437Otherwise, use your name. 435Otherwise, use your name. See also @xref{Library Headers}.
438@end itemize 436@end itemize
439 437
440@node Compilation Tips 438@node Compilation Tips
diff --git a/man/ChangeLog b/man/ChangeLog
index 667bcea4606..0571628041c 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,45 @@
12005-02-27 Matt Hodges <MPHodges@member.fsf.org>
2
3 * calendar.texi (General Calendar): Document binding of
4 scroll-other-window-down.
5 (Mayan Calendar): Fix earliest date.
6 (Time Intervals): Document timeclock-change. Fix
7 timeclock-ask-before-exiting documentation.
8
92005-02-26 Kim F. Storm <storm@cua.dk>
10
11 * frames.texi (Mouse References):
12 Add mouse-1-click-in-non-selected-windows.
13
142005-02-25 Richard M. Stallman <rms@gnu.org>
15
16 * screen.texi (Screen): Explain better about cursors and mode lines;
17 don't presuppose text terminals.
18 (Point): Don't assume just one cursor.
19 Clarify explanation of cursors.
20 (Echo Area, Menu Bar): Cleanups.
21
22 * mini.texi (Minibuffer): Prompts are highlighted.
23 (Minibuffer Edit): Newline = C-j only on text terminals.
24 Clarify resize-mini-windows values.
25 Mention M-PAGEUP and M-PAGEDOWN.
26 (Completion Commands): Mouse-1 like Mouse-2.
27 (Minibuffer History): Explain history commands better.
28 (Repetition): Add xref to Incremental Search.
29
30 * mark.texi (Setting Mark): Clarify info about displaying mark.
31 Clarify explanation of C-@ and C-SPC.
32 (Transient Mark): Mention Delete Selection mode.
33 (Marking Objects): Clean up text about extending the region.
34
35 * m-x.texi (M-x): One C-g doesn't always go to top level.
36 No delay before suggest-key-bindings output.
37
38 * fixit.texi (Fixit): Mention C-/ for undo.
39 (Spelling): Mention ESC TAB like M-TAB.
40 Replacement words with r and R are rechecked.
41 Say where C-g leaves point. Mention ? as input.
42
12005-02-23 Lute Kamstra <lute@gnu.org> 432005-02-23 Lute Kamstra <lute@gnu.org>
2 44
3 * cmdargs.texi (Initial Options): Add cross reference. 45 * cmdargs.texi (Initial Options): Add cross reference.
diff --git a/man/building.texi b/man/building.texi
index 3cb0e929ec0..10ac5142d61 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -82,12 +82,13 @@ file to specify a local value for @code{compile-command} (@pxref{File
82Variables}). 82Variables}).
83 83
84 Starting a compilation displays the buffer @samp{*compilation*} in 84 Starting a compilation displays the buffer @samp{*compilation*} in
85another window but does not select it. The buffer's mode line tells you 85another window but does not select it. The buffer's mode line tells
86whether compilation is finished, with the word @samp{run} or @samp{exit} 86you whether compilation is finished, with the word @samp{run},
87inside the parentheses. You do not have to keep this buffer visible; 87@samp{signal} or @samp{exit} inside the parentheses. You do not have
88compilation continues in any case. While a compilation is going on, the 88to keep this buffer visible; compilation continues in any case. While
89string @samp{Compiling} appears in the mode lines of all windows. When 89a compilation is going on, the string @samp{Compiling} appears in the
90this string disappears, the compilation is finished. 90mode lines of all windows. When this string disappears, the
91compilation is finished.
91 92
92 If you want to watch the compilation transcript as it appears, switch 93 If you want to watch the compilation transcript as it appears, switch
93to the @samp{*compilation*} buffer and move point to the end of the 94to the @samp{*compilation*} buffer and move point to the end of the
@@ -104,12 +105,14 @@ follow output as it comes in.
104 105
105@findex kill-compilation 106@findex kill-compilation
106 When the compiler process terminates, for whatever reason, the mode 107 When the compiler process terminates, for whatever reason, the mode
107line of the @samp{*compilation*} buffer changes to say @samp{signal} 108line of the @samp{*compilation*} buffer changes to say @samp{exit}
108instead of @samp{run}. Starting a new compilation also kills any 109(followed by the exit code, @samp{[0]} for a normal exit), or
109running compilation, as only one can exist at any time. However, 110@samp{signal} (if a signal terminated the process), instead of
110@kbd{M-x compile} asks for confirmation before actually killing a 111@samp{run}. Starting a new compilation also kills any running
111compilation that is running. You can also kill the compilation 112compilation, as only one can exist at any time. However, @kbd{M-x
112process with @kbd{M-x kill-compilation}. 113compile} asks for confirmation before actually killing a compilation
114that is running. You can also kill the compilation process with
115@kbd{M-x kill-compilation}.
113 116
114@findex recompile 117@findex recompile
115 To rerun the last compilation with the same command, type @kbd{M-x 118 To rerun the last compilation with the same command, type @kbd{M-x
diff --git a/man/calendar.texi b/man/calendar.texi
index ba4b582bbec..bbbeec53017 100644
--- a/man/calendar.texi
+++ b/man/calendar.texi
@@ -291,7 +291,9 @@ Display day-in-year (@code{calendar-print-day-of-year}).
291@item C-c C-l 291@item C-c C-l
292Regenerate the calendar window (@code{redraw-calendar}). 292Regenerate the calendar window (@code{redraw-calendar}).
293@item SPC 293@item SPC
294Scroll the next window (@code{scroll-other-window}). 294Scroll the next window up (@code{scroll-other-window}).
295@item DEL
296Scroll the next window down (@code{scroll-other-window-down}).
295@item q 297@item q
296Exit from calendar (@code{exit-calendar}). 298Exit from calendar (@code{exit-calendar}).
297@end table 299@end table
@@ -314,8 +316,9 @@ non-Calendar-mode editing commands.)
314 316
315@kindex SPC @r{(Calendar mode)} 317@kindex SPC @r{(Calendar mode)}
316 In Calendar mode, you can use @kbd{SPC} (@code{scroll-other-window}) 318 In Calendar mode, you can use @kbd{SPC} (@code{scroll-other-window})
317to scroll the other window. This is handy when you display a list of 319and @kbd{DEL} (@code{scroll-other-window-down}) to scroll the other
318holidays or diary entries in another window. 320window up or down, respectively. This is handy when you display a list
321of holidays or diary entries in another window.
319 322
320@kindex q @r{(Calendar mode)} 323@kindex q @r{(Calendar mode)}
321@findex exit-calendar 324@findex exit-calendar
@@ -437,8 +440,8 @@ marks, type @kbd{u}, which also erases any diary marks (@pxref{Diary}).
437@findex list-calendar-holidays 440@findex list-calendar-holidays
438 To get even more detailed information, use the @kbd{a} command, which 441 To get even more detailed information, use the @kbd{a} command, which
439displays a separate buffer containing a list of all holidays in the 442displays a separate buffer containing a list of all holidays in the
440current three-month range. You can use @key{SPC} in the calendar window 443current three-month range. You can use @key{SPC} and @key{DEL} in the
441to scroll that list. 444calendar window to scroll that list up and down, respectively.
442 445
443@findex holidays 446@findex holidays
444 The command @kbd{M-x holidays} displays the list of holidays for the 447 The command @kbd{M-x holidays} displays the list of holidays for the
@@ -861,7 +864,7 @@ The @dfn{long count} is a counting of days with these units:
861@noindent 864@noindent
862Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11 865Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
863tun, 16 uinal, and 6 kin. The Emacs calendar can handle Mayan long 866tun, 16 uinal, and 6 kin. The Emacs calendar can handle Mayan long
864count dates as early as 7.17.18.13.1, but no earlier. When you use the 867count dates as early as 7.17.18.13.3, but no earlier. When you use the
865@kbd{g m l} command, type the Mayan long count date with the baktun, 868@kbd{g m l} command, type the Mayan long count date with the baktun,
866katun, tun, uinal, and kin separated by periods. 869katun, tun, uinal, and kin separated by periods.
867 870
@@ -1510,11 +1513,14 @@ instance) keep track of how much time you spend working.
1510 1513
1511@findex timeclock-in 1514@findex timeclock-in
1512@findex timeclock-out 1515@findex timeclock-out
1516@findex timeclock-change
1513@findex timeclock-workday-remaining 1517@findex timeclock-workday-remaining
1514@findex timeclock-when-to-leave 1518@findex timeclock-when-to-leave
1515 Use the @kbd{M-x timeclock-in} command when you start working on a 1519 Use the @kbd{M-x timeclock-in} command when you start working on a
1516project, and @kbd{M-x timeclock-out} command when you're done. Each 1520project, and @kbd{M-x timeclock-out} command when you're done. Each
1517time you do this, it adds one time interval to the record of the project. 1521time you do this, it adds one time interval to the record of the
1522project. You can change to working on a different project with @kbd{M-x
1523timeclock-change}.
1518 1524
1519 Once you've collected data from a number of time intervals, you can use 1525 Once you've collected data from a number of time intervals, you can use
1520@kbd{M-x timeclock-workday-remaining} to see how much time is left to 1526@kbd{M-x timeclock-workday-remaining} to see how much time is left to
@@ -1529,12 +1535,13 @@ workday in the mode line, either customize the
1529@code{t}, or invoke the @kbd{M-x timeclock-modeline-display} command. 1535@code{t}, or invoke the @kbd{M-x timeclock-modeline-display} command.
1530 1536
1531@vindex timeclock-ask-before-exiting 1537@vindex timeclock-ask-before-exiting
1532 Terminating the current Emacs session might or might not mean that 1538 Terminating the current Emacs session might or might not mean that you
1533you have stopped working on the project. If you'd like Emacs to ask 1539have stopped working on the project and, by default, Emacs queries this.
1534you about this, set the value of the variable 1540You can, however, set the value of the variable
1535@code{timeclock-ask-before-exiting} to @code{t} (via @kbd{M-x 1541@code{timeclock-ask-before-exiting} to @code{nil} (via @kbd{M-x
1536customize}). By default, only an explicit @kbd{M-x timeclock-out} 1542customize}) to avoid this behaviour; then, only an explicit @kbd{M-x
1537tells Emacs that the current interval is over. 1543timeclock-out} or @kbd{M-x timeclock-change} will tell Emacs that the
1544current interval is over.
1538 1545
1539@cindex @file{.timelog} file 1546@cindex @file{.timelog} file
1540@vindex timeclock-file 1547@vindex timeclock-file
diff --git a/man/fixit.texi b/man/fixit.texi
index 0982b0856ef..104297b974e 100644
--- a/man/fixit.texi
+++ b/man/fixit.texi
@@ -11,12 +11,12 @@ the times when you catch a mistake in your text just after you have made
11it, or change your mind while composing text on the fly. 11it, or change your mind while composing text on the fly.
12 12
13 The most fundamental command for correcting erroneous editing is the 13 The most fundamental command for correcting erroneous editing is the
14undo command, @kbd{C-x u} or @kbd{C-_}. This command undoes a single 14undo command, @kbd{C-x u} or @kbd{C-_} or @kbd{C-/}. This command
15command (usually), a part of a command (in the case of 15undoes a single command (usually), a part of a command (in the case of
16@code{query-replace}), or several consecutive self-inserting characters. 16@code{query-replace}), or several consecutive self-inserting
17Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and 17characters. Consecutive repetitions of the undo command undo earlier
18earlier changes, back to the limit of the undo information available. 18and earlier changes, back to the limit of the undo information
19@xref{Undo}, for more information. 19available. @xref{Undo}, for more information.
20 20
21@menu 21@menu
22* Kill Errors:: Commands to kill a batch of recently entered text. 22* Kill Errors:: Commands to kill a batch of recently entered text.
@@ -164,6 +164,7 @@ Enable Flyspell mode for comments and strings only.
164@item M-$ 164@item M-$
165Check and correct spelling of the word at point (@code{ispell-word}). 165Check and correct spelling of the word at point (@code{ispell-word}).
166@item M-@key{TAB} 166@item M-@key{TAB}
167@itemx @key{ESC} @key{TAB}
167Complete the word before point based on the spelling dictionary 168Complete the word before point based on the spelling dictionary
168(@code{ispell-complete-word}). 169(@code{ispell-complete-word}).
169@item M-x ispell 170@item M-x ispell
@@ -239,11 +240,13 @@ Skip this word---continue to consider it incorrect, but don't change it
239here. 240here.
240 241
241@item r @var{new} @key{RET} 242@item r @var{new} @key{RET}
242Replace the word (just this time) with @var{new}. 243Replace the word (just this time) with @var{new}. (The replacement
244string will be rescanned for more spelling errors.)
243 245
244@item R @var{new} @key{RET} 246@item R @var{new} @key{RET}
245Replace the word with @var{new}, and do a @code{query-replace} so you 247Replace the word with @var{new}, and do a @code{query-replace} so you
246can replace it elsewhere in the buffer if you wish. 248can replace it elsewhere in the buffer if you wish. (The replacements
249will be rescanned for more spelling errors.)
247 250
248@item @var{digit} 251@item @var{digit}
249Replace the word (just this time) with one of the displayed 252Replace the word (just this time) with one of the displayed
@@ -277,8 +280,9 @@ the replacement by typing a digit. You can use @samp{*} in @var{word} as a
277wildcard. 280wildcard.
278 281
279@item C-g 282@item C-g
280Quit interactive spell checking. You can restart it again afterward 283Quit interactive spell checking, leaving point at the word that was
281with @kbd{C-u M-$}. 284being checked. You can restart checking again afterward with @kbd{C-u
285M-$}.
282 286
283@item X 287@item X
284Same as @kbd{C-g}. 288Same as @kbd{C-g}.
@@ -296,6 +300,9 @@ Refresh the screen.
296@item C-z 300@item C-z
297This key has its normal command meaning (suspend Emacs or iconify this 301This key has its normal command meaning (suspend Emacs or iconify this
298frame). 302frame).
303
304@item ?
305Show the list of options.
299@end table 306@end table
300 307
301@findex ispell-complete-word 308@findex ispell-complete-word
diff --git a/man/frames.texi b/man/frames.texi
index a3f71e64bab..3fdaac6d020 100644
--- a/man/frames.texi
+++ b/man/frames.texi
@@ -312,6 +312,12 @@ mouse while it is held down, also has its usual behavior of setting
312the region. The variable @code{mouse-1-click-follows-link} controls 312the region. The variable @code{mouse-1-click-follows-link} controls
313whether @kbd{Mouse-1} has this behavior. 313whether @kbd{Mouse-1} has this behavior.
314 314
315@vindex mouse-1-click-follows-link
316 Normally, the @kbd{Mouse-1} click behavior is performed on links in
317any window. The variable @code{mouse-1-click-in-non-selected-windows}
318controls whether @kbd{Mouse-1} has this behavior even in non-selected
319windows, or only in the selected window.
320
315@vindex mouse-highlight 321@vindex mouse-highlight
316 You can usually tell when @kbd{Mouse-1} and @kbd{Mouse-2} have this 322 You can usually tell when @kbd{Mouse-1} and @kbd{Mouse-2} have this
317special sort of meaning because the sensitive text highlights when you 323special sort of meaning because the sensitive text highlights when you
diff --git a/man/m-x.texi b/man/m-x.texi
index 8881850d323..5a33bab0737 100644
--- a/man/m-x.texi
+++ b/man/m-x.texi
@@ -46,8 +46,9 @@ Note that @code{forward-char} is the same command that you invoke with
46the key @kbd{C-f}. You can run any Emacs command by name using 46the key @kbd{C-f}. You can run any Emacs command by name using
47@kbd{M-x}, whether or not any keys are bound to it. 47@kbd{M-x}, whether or not any keys are bound to it.
48 48
49 If you type @kbd{C-g} while the command name is being read, you cancel 49 If you type @kbd{C-g} while the command name is being read, you
50the @kbd{M-x} command and get out of the minibuffer, ending up at top level. 50cancel the @kbd{M-x} command and get out of the minibuffer, ending up
51at command level.
51 52
52 To pass a numeric argument to the command you are invoking with 53 To pass a numeric argument to the command you are invoking with
53@kbd{M-x}, specify the numeric argument before the @kbd{M-x}. @kbd{M-x} 54@kbd{M-x}, specify the numeric argument before the @kbd{M-x}. @kbd{M-x}
@@ -56,11 +57,10 @@ appears in the prompt while the command name is being read.
56 57
57@vindex suggest-key-bindings 58@vindex suggest-key-bindings
58 If the command you type has a key binding of its own, Emacs mentions 59 If the command you type has a key binding of its own, Emacs mentions
59this in the echo area, two seconds after the command finishes (if you 60this in the echo area. For example, if you type @kbd{M-x
60don't type anything else first). For example, if you type @kbd{M-x
61forward-word}, the message says that you can run the same command more 61forward-word}, the message says that you can run the same command more
62easily by typing @kbd{M-f}. You can turn off these messages by setting 62easily by typing @kbd{M-f}. You can turn off these messages by
63@code{suggest-key-bindings} to @code{nil}. 63setting @code{suggest-key-bindings} to @code{nil}.
64 64
65 Normally, when describing in this manual a command that is run by 65 Normally, when describing in this manual a command that is run by
66name, we omit the @key{RET} that is needed to terminate the name. Thus 66name, we omit the @key{RET} that is needed to terminate the name. Thus
diff --git a/man/mark.texi b/man/mark.texi
index c37bd7857e0..f609472bca7 100644
--- a/man/mark.texi
+++ b/man/mark.texi
@@ -85,23 +85,28 @@ can move point away, leaving the mark behind.
85button one across a range of text; that puts point where you release the 85button one across a range of text; that puts point where you release the
86mouse button, and sets the mark at the other end of that range. Or you 86mouse button, and sets the mark at the other end of that range. Or you
87can click mouse button three, which sets the mark at point (like 87can click mouse button three, which sets the mark at point (like
88@kbd{C-@key{SPC}}) and then moves point (like @kbd{Mouse-1}). Both of 88@kbd{C-@key{SPC}}) and then moves point where you clicked (like
89these methods copy the region into the kill ring in addition to setting 89@kbd{Mouse-1}). Both of these methods copy the region into the kill
90the mark; that gives behavior consistent with other window-driven 90ring in addition to setting the mark; that gives behavior consistent
91applications, but if you don't want to modify the kill ring, you must 91with other window-driven applications, but if you don't want to modify
92use keyboard commands to set the mark. @xref{Mouse Commands}. 92the kill ring, you must use keyboard commands to set the mark.
93@xref{Mouse Commands}.
93 94
94@kindex C-x C-x 95@kindex C-x C-x
95@findex exchange-point-and-mark 96@findex exchange-point-and-mark
96 Ordinary terminals have only one cursor, so there is no way for Emacs 97 When Emacs was developed, terminals had only one cursor, so Emacs
97to show you where the mark is located. You have to remember. The usual 98does not show where the mark is located--you have to remember. If you
98solution to this problem is to set the mark and then use it soon, before 99enable Transient Mark mode (see below), then the region is highlighted
99you forget where it is. Alternatively, you can see where the mark is 100when it is active; you can tell mark is at the other end of the
100with the command @kbd{C-x C-x} (@code{exchange-point-and-mark}) which 101highlighted region. But this only applies when the mark is active.
101puts the mark where point was and point where the mark was. The extent 102
102of the region is unchanged, but the cursor and point are now at the 103 The usual solution to this problem is to set the mark and then use
103previous position of the mark. In Transient Mark mode, this command 104it soon, before you forget where it is. Alternatively, you can see
104also reactivates the mark. 105where the mark is with the command @kbd{C-x C-x}
106(@code{exchange-point-and-mark}) which puts the mark where point was
107and point where the mark was. The extent of the region is unchanged,
108but the cursor and point are now at the previous position of the mark.
109In Transient Mark mode, this command also reactivates the mark.
105 110
106 @kbd{C-x C-x} is also useful when you are satisfied with the position 111 @kbd{C-x C-x} is also useful when you are satisfied with the position
107of point but want to move the other end of the region (where the mark 112of point but want to move the other end of the region (where the mark
@@ -113,14 +118,13 @@ the new position with point back at its original position.
113@ref{Mark Ring}. 118@ref{Mark Ring}.
114 119
115@kindex C-@@ 120@kindex C-@@
116 There is no such character as @kbd{C-@key{SPC}} in @acronym{ASCII}; when you 121 There is no such character as @kbd{C-@key{SPC}} in @acronym{ASCII};
117type @key{SPC} while holding down @key{CTRL}, what you get on most 122when you type @key{SPC} while holding down @key{CTRL} on a text
118ordinary terminals is the character @kbd{C-@@}. This key is actually 123terminal, what you get is the character @kbd{C-@@}. This key is also
119bound to @code{set-mark-command}. But unless you are unlucky enough to 124bound to @code{set-mark-command}--so unless you are unlucky enough to
120have a terminal where typing @kbd{C-@key{SPC}} does not produce 125have a text terminal where typing @kbd{C-@key{SPC}} does not produce
121@kbd{C-@@}, you might as well think of this character as 126@kbd{C-@@}, you might as well think of this character as
122@kbd{C-@key{SPC}}. Under X, @kbd{C-@key{SPC}} is actually a distinct 127@kbd{C-@key{SPC}}.
123character, but its binding is still @code{set-mark-command}.
124 128
125@node Transient Mark 129@node Transient Mark
126@section Transient Mark Mode 130@section Transient Mark Mode
@@ -182,6 +186,10 @@ on a region will get an error and refuse to operate. You can make the
182region active again by typing @kbd{C-x C-x}. 186region active again by typing @kbd{C-x C-x}.
183 187
184@item 188@item
189If Delete Selection mode is also enabled, some commands delete the
190region when used while the mark is active. @xref{Graphical Kill}.
191
192@item
185Quitting with @kbd{C-g} deactivates the mark. 193Quitting with @kbd{C-g} deactivates the mark.
186 194
187@item 195@item
@@ -320,10 +328,10 @@ Put region around current page (@code{mark-page}).
320word, while @kbd{C-M-@@} (@code{mark-sexp}) puts it at the end of the 328word, while @kbd{C-M-@@} (@code{mark-sexp}) puts it at the end of the
321next balanced expression (@pxref{Expressions}). These commands handle 329next balanced expression (@pxref{Expressions}). These commands handle
322arguments just like @kbd{M-f} and @kbd{C-M-f}. If you repeat these 330arguments just like @kbd{M-f} and @kbd{C-M-f}. If you repeat these
323commands, the region is extended. For example, you can type either 331commands, that extends the region. For example, you can type either
324@kbd{C-u 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words. 332@kbd{C-u 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words. This
325The region is also extended when the mark is active in Transient Mark 333command also extends the region when the mark is active in Transient
326mode, regardless of the last command. 334Mark mode, regardless of the last command.
327 335
328@kindex C-x h 336@kindex C-x h
329@findex mark-whole-buffer 337@findex mark-whole-buffer
@@ -337,20 +345,20 @@ paragraph. With prefix argument, if the argument's value is positive,
337point. If the prefix argument is @minus{}@var{n}, @kbd{M-h} also 345point. If the prefix argument is @minus{}@var{n}, @kbd{M-h} also
338marks @var{n} paragraphs, running back form the one surrounding point. 346marks @var{n} paragraphs, running back form the one surrounding point.
339In that last case, point moves forward to the end of that paragraph, 347In that last case, point moves forward to the end of that paragraph,
340and the mark goes at the start of the region. The @kbd{M-h} command 348and the mark goes at the start of the region. Repeating the @kbd{M-h}
341also supports the extension of the region, similar to @kbd{M-@@} and 349command extends the region, just as with @kbd{M-@@} and @kbd{C-M-@@}.
342@kbd{C-M-@@}.
343 350
344 @kbd{C-M-h} (@code{mark-defun}) similarly puts point before, and the 351 @kbd{C-M-h} (@code{mark-defun}) similarly puts point before, and the
345mark after, the current (or following) major top-level definition, or 352mark after, the current (or following) major top-level definition, or
346defun (@pxref{Moving by Defuns}). (Currently it only marks one defun, 353defun (@pxref{Moving by Defuns}). Repeating @kbd{C-M-h} also extends
347but repeating it marks more defuns, like for @kbd{M-@@}.) @kbd{C-x 354the region.
348C-p} (@code{mark-page}) puts point before the current page, and mark 355
349at the end (@pxref{Pages}). The mark goes after the terminating page 356 @kbd{C-x C-p} (@code{mark-page}) puts point before the current page,
350delimiter (to include it in the region), while point goes after the 357and mark at the end (@pxref{Pages}). The mark goes after the
351preceding page delimiter (to exclude it). A numeric argument 358terminating page delimiter (to include it in the region), while point
352specifies a later page (if positive) or an earlier page (if negative) 359goes after the preceding page delimiter (to exclude it). A numeric
353instead of the current page. 360argument specifies a later page (if positive) or an earlier page (if
361negative) instead of the current page.
354 362
355 Finally, @kbd{C-x h} (@code{mark-whole-buffer}) sets up the entire 363 Finally, @kbd{C-x h} (@code{mark-whole-buffer}) sets up the entire
356buffer as the region, by putting point at the beginning and the mark at 364buffer as the region, by putting point at the beginning and the mark at
diff --git a/man/mini.texi b/man/mini.texi
index 69e31032b12..4345a947a75 100644
--- a/man/mini.texi
+++ b/man/mini.texi
@@ -16,9 +16,10 @@ the minibuffer to edit the argument text.
16@cindex prompt 16@cindex prompt
17 When the minibuffer is in use, it appears in the echo area, and the 17 When the minibuffer is in use, it appears in the echo area, and the
18terminal's cursor moves there. The beginning of the minibuffer line 18terminal's cursor moves there. The beginning of the minibuffer line
19displays a @dfn{prompt} which says what kind of input you should supply and 19displays a @dfn{prompt} in a special color, to say what kind of input
20how it will be used. Often this prompt is derived from the name of the 20you should supply and how it will be used. Often this prompt is
21command that the argument is for. The prompt normally ends with a colon. 21derived from the name of the command that the argument is for. The
22prompt normally ends with a colon.
22 23
23@cindex default argument 24@cindex default argument
24 Sometimes a @dfn{default argument} appears in parentheses after the 25 Sometimes a @dfn{default argument} appears in parentheses after the
@@ -123,8 +124,8 @@ entering.
123 124
124 Since @key{RET} in the minibuffer is defined to exit the minibuffer, 125 Since @key{RET} in the minibuffer is defined to exit the minibuffer,
125you can't use it to insert a newline in the minibuffer. To do that, 126you can't use it to insert a newline in the minibuffer. To do that,
126type @kbd{C-o} or @kbd{C-q C-j}. (Recall that a newline is really the 127type @kbd{C-o} or @kbd{C-q C-j}. (On text terminals, newline is
127character control-J.) 128really the @acronym{ASCII} character control-J.)
128 129
129 The minibuffer has its own window which always has space on the screen 130 The minibuffer has its own window which always has space on the screen
130but acts as if it were not there when the minibuffer is not in use. When 131but acts as if it were not there when the minibuffer is not in use. When
@@ -147,12 +148,13 @@ with @kbd{C-x ^}.
147 148
148@vindex resize-mini-windows 149@vindex resize-mini-windows
149 The minibuffer window expands vertically as necessary to hold the 150 The minibuffer window expands vertically as necessary to hold the
150text that you put in the minibuffer, if @code{resize-mini-windows} is 151text that you put in the minibuffer. If @code{resize-mini-windows} is
151non-@code{nil}. If @code{resize-mini-windows} is @code{t}, the window 152@code{t} (the default), the window is always resized to fit the size
152is always resized to fit the size of the text it displays. If 153of the text it displays. If its value is the symbol @code{grow-only},
153@code{resize-mini-windows} is the symbol @code{grow-only}, the window 154the window grows when the size of displayed text increases, but
154grows when the size of displayed text increases, but shrinks (back to 155shrinks (back to the normal size) only when the minibuffer becomes
155the normal size) only when the minibuffer becomes inactive. 156inactive. If its value is @code{nil}, you have to adjust the height
157yourself.
156 158
157@vindex max-mini-window-height 159@vindex max-mini-window-height
158 The variable @code{max-mini-window-height} controls the maximum 160 The variable @code{max-mini-window-height} controls the maximum
@@ -161,11 +163,13 @@ specifies a fraction of the frame's height; an integer specifies the
161maximum number of lines; @code{nil} means do not resize the minibuffer 163maximum number of lines; @code{nil} means do not resize the minibuffer
162window automatically. The default value is 0.25. 164window automatically. The default value is 0.25.
163 165
164 If while in the minibuffer you issue a command that displays help text 166 If, while in the minibuffer, you issue a command that displays help
165of any sort in another window, you can use the @kbd{C-M-v} command while 167text of any sort in another window, you can use the @kbd{C-M-v}
166in the minibuffer to scroll the help text. This lasts until you exit 168command while in the minibuffer to scroll the help text.
167the minibuffer. This feature is especially useful when you display 169(@kbd{M-@key{PAGEUP}} and @kbd{M-@key{PAGEDOWN}} also operate on that
168a buffer listing possible completions. @xref{Other Window}. 170help text.) This lasts until you exit the minibuffer. This feature
171is especially useful when you display a buffer listing possible
172completions. @xref{Other Window}.
169 173
170@vindex enable-recursive-minibuffers 174@vindex enable-recursive-minibuffers
171 Emacs normally disallows most commands that use the minibuffer while 175 Emacs normally disallows most commands that use the minibuffer while
@@ -273,8 +277,9 @@ window that displays a list of completions:
273 277
274@table @kbd 278@table @kbd
275@findex mouse-choose-completion 279@findex mouse-choose-completion
276@item Mouse-2 280@item Mouse-1
277Clicking mouse button 2 on a completion in the list of possible 281@itemx Mouse-2
282Clicking mouse button 1 or 2 on a completion in the list of possible
278completions chooses that completion (@code{mouse-choose-completion}). 283completions chooses that completion (@code{mouse-choose-completion}).
279You normally use this command while point is in the minibuffer, but you 284You normally use this command while point is in the minibuffer, but you
280must click in the list of completions, not in the minibuffer itself. 285must click in the list of completions, not in the minibuffer itself.
@@ -447,10 +452,13 @@ match for @var{regexp} (@code{next-matching-history-element}).
447@findex previous-history-element 452@findex previous-history-element
448 The simplest way to reuse the saved arguments in the history list is 453 The simplest way to reuse the saved arguments in the history list is
449to move through the history list one element at a time. While in the 454to move through the history list one element at a time. While in the
450minibuffer, use @kbd{M-p} or up-arrow (@code{previous-history-element}) 455minibuffer, use @kbd{M-p} or up-arrow
451to ``move to'' the next earlier minibuffer input, and use @kbd{M-n} or 456(@code{previous-history-element}) to ``move to'' the next earlier
452down-arrow (@code{next-history-element}) to ``move to'' the next later 457minibuffer input, and use @kbd{M-n} or down-arrow
453input. 458(@code{next-history-element}) to ``move to'' the next later input.
459These commands don't move the cursor, they bring different saved
460strings into the minibuffer. But you can think of them as ``moving''
461through the history list.
454 462
455 The previous input that you fetch from the history entirely replaces 463 The previous input that you fetch from the history entirely replaces
456the contents of the minibuffer. To use it as the argument, exit the 464the contents of the minibuffer. To use it as the argument, exit the
@@ -570,7 +578,7 @@ but it does something similar. Although it behaves like a complex command,
570it normally does not appear in the history list for @kbd{C-x 578it normally does not appear in the history list for @kbd{C-x
571@key{ESC} @key{ESC}}. You can make it appear in the history by 579@key{ESC} @key{ESC}}. You can make it appear in the history by
572setting @code{isearch-resume-in-command-history} to a non-@code{nil} 580setting @code{isearch-resume-in-command-history} to a non-@code{nil}
573value. 581value. @xref{Incremental Search}.
574 582
575@vindex command-history 583@vindex command-history
576 The list of previous minibuffer-using commands is stored as a Lisp 584 The list of previous minibuffer-using commands is stored as a Lisp
diff --git a/man/screen.texi b/man/screen.texi
index ee3bb3e7dce..e2987e6ccf6 100644
--- a/man/screen.texi
+++ b/man/screen.texi
@@ -29,19 +29,23 @@ into multiple text windows, each of which can be used for a different
29file (@pxref{Windows}). In this manual, the word ``window'' always 29file (@pxref{Windows}). In this manual, the word ``window'' always
30refers to the subdivisions of a frame within Emacs. 30refers to the subdivisions of a frame within Emacs.
31 31
32 At any time, one window is the @dfn{selected window}; the most 32 At any time, one window is the @dfn{selected window}. On graphical
33prominent cursor indicates which window is selected. Most Emacs 33terminals, the selected window normally shows a more prominent cursor
34commands implicitly apply to the text in the selected window (though 34(solid and blinking) while other windows show a weaker cursor (such as
35mouse commands generally operate on whatever window you click them in, 35a hollow box). On text terminals, which have just one cursor, that cursor
36whether selected or not). The other windows display text for 36appears in the selected window.
37reference only, unless/until you select them. If you use multiple 37
38frames under the X Window System, then giving the input focus to a 38 Most Emacs commands implicitly apply to the text in the selected
39particular frame selects a window in that frame. 39window (though mouse commands generally operate on whatever window you
40click them in, whether selected or not). The other windows display
41text for reference only, unless/until you select them. If you use
42multiple frames under the X Window System, then giving the input focus
43to a particular frame selects a window in that frame.
40 44
41 Each window's last line is a @dfn{mode line}, which describes what 45 Each window's last line is a @dfn{mode line}, which describes what
42is going on in that window. It appears in inverse video, if the 46is going on in that window. It appears in different color and/or a
43terminal supports that; its contents normally begin with 47``3D'' box, if the terminal supports that; its contents normally begin
44@w{@samp{--:-- @ *scratch*}} when Emacs starts. The mode line 48with @w{@samp{--:-- @ *scratch*}} when Emacs starts. The mode line
45displays status information such as what buffer is being displayed 49displays status information such as what buffer is being displayed
46above it in the window, what major and minor modes are in use, and 50above it in the window, what major and minor modes are in use, and
47whether the buffer contains unsaved changes. 51whether the buffer contains unsaved changes.
@@ -58,7 +62,7 @@ whether the buffer contains unsaved changes.
58@cindex point 62@cindex point
59@cindex cursor 63@cindex cursor
60 64
61 Within Emacs, the terminal's cursor shows the location at which 65 Within Emacs, the active cursor shows the location at which
62editing commands will take effect. This location is called @dfn{point}. 66editing commands will take effect. This location is called @dfn{point}.
63Many Emacs commands move point through the text, so that you can edit at 67Many Emacs commands move point through the text, so that you can edit at
64different places in it. You can also place point by clicking mouse 68different places in it. You can also place point by clicking mouse
@@ -93,9 +97,9 @@ though. Once display updating finishes, Emacs puts the cursor where
93point is. 97point is.
94 98
95 On graphical terminals, Emacs shows a cursor in each window; the 99 On graphical terminals, Emacs shows a cursor in each window; the
96selected window's cursor is solid or blinking, and the other cursors 100selected window's cursor is solid and blinking, and the other cursors
97are just hollow. Thus, the most striking cursor always shows you 101are just hollow. Thus, the most prominent cursor always shows you the
98the selected window, on all kinds of terminals. 102selected window, on all kinds of terminals.
99 103
100 @xref{Cursor Display}, for customizable variables that control display 104 @xref{Cursor Display}, for customizable variables that control display
101of the cursor or cursors. 105of the cursor or cursors.
@@ -111,11 +115,11 @@ for accessing the value now called ``point.''
111 115
112 The line at the bottom of the frame (below the mode line) is the 116 The line at the bottom of the frame (below the mode line) is the
113@dfn{echo area}. It is used to display small amounts of text for 117@dfn{echo area}. It is used to display small amounts of text for
114several purposes. 118various purposes.
115 119
116 @dfn{Echoing} means displaying the characters that you type. Outside 120 @dfn{Echoing} means displaying the characters that you type. At the
117Emacs, the operating system normally echoes all your input. Emacs 121command line, the operating system normally echoes all your input.
118handles echoing differently. 122Emacs handles echoing differently.
119 123
120 Single-character commands do not echo in Emacs, and multi-character 124 Single-character commands do not echo in Emacs, and multi-character
121commands echo only if you pause while typing them. As soon as you pause 125commands echo only if you pause while typing them. As soon as you pause
@@ -326,7 +330,7 @@ them here, as you can more easily see for yourself.
326 When you are using a window system, you can use the mouse to choose a 330 When you are using a window system, you can use the mouse to choose a
327command from the menu bar. An arrow pointing right, after the menu 331command from the menu bar. An arrow pointing right, after the menu
328item, indicates that the item leads to a subsidiary menu; @samp{...} at 332item, indicates that the item leads to a subsidiary menu; @samp{...} at
329the end means that the command will read arguments from the keyboard 333the end means that the command will read arguments (further input from you)
330before it actually does anything. 334before it actually does anything.
331 335
332 To view the full command name and documentation for a menu item, type 336 To view the full command name and documentation for a menu item, type
diff --git a/src/ChangeLog b/src/ChangeLog
index 23074668343..56833a341a4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12005-02-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * gtkutil.c (xg_resize_outer_widget): Removed unneeded call to
4 gtk_window_resize and x_wm_set_size_hint.
5
62005-02-25 Kim F. Storm <storm@cua.dk>
7
8 * dispextern.h (OVERLAY_STRING_CHUNK_SIZE): Increase from 3 to 16.
9
10 * xdisp.c (init_from_display_pos): Don't read past end of
11 it->overlay_strings array.
12
132005-02-25 Stephan Stahl <stahl@eos.franken.de> (tiny change)
14
15 * buffer.c (syms_of_buffer): Fix typo.
16
12005-02-23 Lute Kamstra <lute@gnu.org> 172005-02-23 Lute Kamstra <lute@gnu.org>
2 18
3 * buffer.c (Foverlay_buffer): Doc fix. 19 * buffer.c (Foverlay_buffer): Doc fix.
diff --git a/src/buffer.c b/src/buffer.c
index 3394e1dead2..8738466abd1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5673,7 +5673,7 @@ arrow bitmaps.
5673 5673
5674If value is a symbol `left' or `right', both angle and arrow bitmaps 5674If value is a symbol `left' or `right', both angle and arrow bitmaps
5675are displayed in the left or right fringe, resp. Any other value 5675are displayed in the left or right fringe, resp. Any other value
5676that doesn't look like an alist means displat the angle bitmaps in 5676that doesn't look like an alist means display the angle bitmaps in
5677the left fringe but no arrows. 5677the left fringe but no arrows.
5678 5678
5679You can exercise more precise control by using an alist as the 5679You can exercise more precise control by using an alist as the
diff --git a/src/dispextern.h b/src/dispextern.h
index 77dba7bb09e..5401fecedd5 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1882,7 +1882,7 @@ struct it
1882 1882
1883 /* Vector of overlays to process. Overlay strings are processed 1883 /* Vector of overlays to process. Overlay strings are processed
1884 OVERLAY_STRING_CHUNK_SIZE at a time. */ 1884 OVERLAY_STRING_CHUNK_SIZE at a time. */
1885#define OVERLAY_STRING_CHUNK_SIZE 3 1885#define OVERLAY_STRING_CHUNK_SIZE 16
1886 Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE]; 1886 Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE];
1887 1887
1888 /* Total number of overlay strings to process. This can be > 1888 /* Total number of overlay strings to process. This can be >
diff --git a/src/gtkutil.c b/src/gtkutil.c
index c291b44f5a2..6dcba3036c0 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -556,12 +556,6 @@ xg_resize_outer_widget (f, columns, rows)
556 int columns; 556 int columns;
557 int rows; 557 int rows;
558{ 558{
559 gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
560 FRAME_PIXEL_WIDTH (f), FRAME_TOTAL_PIXEL_HEIGHT (f));
561
562 /* base_height is now changed. */
563 x_wm_set_size_hint (f, 0, 0);
564
565 /* If we are not mapped yet, set geometry once again, as window 559 /* If we are not mapped yet, set geometry once again, as window
566 height now have changed. */ 560 height now have changed. */
567 if (! GTK_WIDGET_MAPPED (FRAME_GTK_OUTER_WIDGET (f))) 561 if (! GTK_WIDGET_MAPPED (FRAME_GTK_OUTER_WIDGET (f)))
diff --git a/src/xdisp.c b/src/xdisp.c
index 671b20683e8..5e17a7e3ca5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2534,7 +2534,10 @@ init_from_display_pos (it, w, pos)
2534 after-string. */ 2534 after-string. */
2535 init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID); 2535 init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID);
2536 2536
2537 for (i = 0; i < it->n_overlay_strings; ++i) 2537 /* This only scans the current chunk -- it should scan all chunks.
2538 However, OVERLAY_STRING_CHUNK_SIZE has been increased from 3 in 21.1
2539 to 16 in 22.1 to make this a lesser problem. */
2540 for (i = 0; i < it->n_overlay_strings && i < OVERLAY_STRING_CHUNK_SIZE; ++i)
2538 { 2541 {
2539 const char *s = SDATA (it->overlay_strings[i]); 2542 const char *s = SDATA (it->overlay_strings[i]);
2540 const char *e = s + SBYTES (it->overlay_strings[i]); 2543 const char *e = s + SBYTES (it->overlay_strings[i]);
@@ -5841,9 +5844,9 @@ move_it_in_display_line_to (it, to_charpos, to_x, op)
5841 ((op & MOVE_TO_POS) != 0 \ 5844 ((op & MOVE_TO_POS) != 0 \
5842 && BUFFERP (it->object) \ 5845 && BUFFERP (it->object) \
5843 && IT_CHARPOS (*it) >= to_charpos \ 5846 && IT_CHARPOS (*it) >= to_charpos \
5844 && (it->method == GET_FROM_BUFFER || \ 5847 && (it->method == GET_FROM_BUFFER \
5845 (it->method == GET_FROM_DISPLAY_VECTOR && \ 5848 || (it->method == GET_FROM_DISPLAY_VECTOR \
5846 it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) 5849 && it->dpvec + it->current.dpvec_index + 1 >= it->dpend)))
5847 5850
5848 5851
5849 while (1) 5852 while (1)
@@ -20772,8 +20775,10 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop)
20772 20775
20773 /* If whole rows or last part of a row came from a display overlay, 20776 /* If whole rows or last part of a row came from a display overlay,
20774 row_containing_pos will skip over such rows because their end pos 20777 row_containing_pos will skip over such rows because their end pos
20775 equals the start pos of the overlay or interval. Backtrack if we 20778 equals the start pos of the overlay or interval.
20776 have a STOP object and previous row's end glyph came from STOP. */ 20779
20780 Move back if we have a STOP object and previous row's
20781 end glyph came from STOP. */
20777 if (!NILP (stop)) 20782 if (!NILP (stop))
20778 { 20783 {
20779 struct glyph_row *prev; 20784 struct glyph_row *prev;
@@ -20781,11 +20786,11 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop)
20781 && MATRIX_ROW_END_CHARPOS (prev) == charpos 20786 && MATRIX_ROW_END_CHARPOS (prev) == charpos
20782 && prev->used[TEXT_AREA] > 0) 20787 && prev->used[TEXT_AREA] > 0)
20783 { 20788 {
20784 end = prev->glyphs[TEXT_AREA]; 20789 struct glyph *beg = prev->glyphs[TEXT_AREA];
20785 glyph = end + prev->used[TEXT_AREA]; 20790 glyph = beg + prev->used[TEXT_AREA];
20786 while (--glyph >= end 20791 while (--glyph >= beg
20787 && INTEGERP (glyph->object)); 20792 && INTEGERP (glyph->object));
20788 if (glyph < end 20793 if (glyph < beg
20789 || !EQ (stop, glyph->object)) 20794 || !EQ (stop, glyph->object))
20790 break; 20795 break;
20791 row = prev; 20796 row = prev;
@@ -22814,8 +22819,10 @@ Bind this around calls to `message' to let it take effect. */);
22814 message_truncate_lines = 0; 22819 message_truncate_lines = 0;
22815 22820
22816 DEFVAR_LISP ("menu-bar-update-hook", &Vmenu_bar_update_hook, 22821 DEFVAR_LISP ("menu-bar-update-hook", &Vmenu_bar_update_hook,
22817 doc: /* Normal hook run for clicks on menu bar, before displaying a submenu. 22822 doc: /* Normal hook run to update the menu bar definitions.
22818Can be used to update submenus whose contents should vary. */); 22823Redisplay runs this hook before it redisplays the menu bar.
22824This is used to update submenus such as Buffers,
22825whose contents depend on various data. */);
22819 Vmenu_bar_update_hook = Qnil; 22826 Vmenu_bar_update_hook = Qnil;
22820 22827
22821 DEFVAR_BOOL ("inhibit-menubar-update", &inhibit_menubar_update, 22828 DEFVAR_BOOL ("inhibit-menubar-update", &inhibit_menubar_update,