aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2005-07-22 08:27:27 +0000
committerMiles Bader2005-07-22 08:27:27 +0000
commit3674ae2f87e47a654524af689ea610ee3edeaca7 (patch)
tree58ea33c40c8521a79fb503080b8bb6231ffbf579 /lisp
parent3e03f554f116e04ba860dcde7c6d862939911e16 (diff)
parent7929f858f8897f0448771a471f8afc5f244e4bca (diff)
downloademacs-3674ae2f87e47a654524af689ea610ee3edeaca7.tar.gz
emacs-3674ae2f87e47a654524af689ea610ee3edeaca7.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-71
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 485-492) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 92-94) - Merge from emacs--cvs-trunk--0 - Update from CVS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog618
-rw-r--r--lisp/abbrev.el13
-rw-r--r--lisp/add-log.el6
-rw-r--r--lisp/allout.el69
-rw-r--r--lisp/arc-mode.el26
-rw-r--r--lisp/array.el8
-rw-r--r--lisp/buff-menu.el28
-rw-r--r--lisp/calc/README3
-rw-r--r--lisp/calc/calc-aent.el3
-rw-r--r--lisp/calc/calc-alg.el3
-rw-r--r--lisp/calc/calc-arith.el3
-rw-r--r--lisp/calc/calc-bin.el3
-rw-r--r--lisp/calc/calc-comb.el3
-rw-r--r--lisp/calc/calc-cplx.el3
-rw-r--r--lisp/calc/calc-embed.el3
-rw-r--r--lisp/calc/calc-ext.el3
-rw-r--r--lisp/calc/calc-fin.el3
-rw-r--r--lisp/calc/calc-forms.el4
-rw-r--r--lisp/calc/calc-frac.el3
-rw-r--r--lisp/calc/calc-funcs.el3
-rw-r--r--lisp/calc/calc-graph.el3
-rw-r--r--lisp/calc/calc-help.el4
-rw-r--r--lisp/calc/calc-incom.el3
-rw-r--r--lisp/calc/calc-keypd.el3
-rw-r--r--lisp/calc/calc-lang.el3
-rw-r--r--lisp/calc/calc-macs.el3
-rw-r--r--lisp/calc/calc-map.el3
-rw-r--r--lisp/calc/calc-math.el3
-rw-r--r--lisp/calc/calc-misc.el3
-rw-r--r--lisp/calc/calc-mode.el3
-rw-r--r--lisp/calc/calc-mtx.el3
-rw-r--r--lisp/calc/calc-poly.el3
-rw-r--r--lisp/calc/calc-prog.el3
-rw-r--r--lisp/calc/calc-rewr.el3
-rw-r--r--lisp/calc/calc-rules.el3
-rw-r--r--lisp/calc/calc-sel.el4
-rw-r--r--lisp/calc/calc-stat.el3
-rw-r--r--lisp/calc/calc-store.el3
-rw-r--r--lisp/calc/calc-stuff.el3
-rw-r--r--lisp/calc/calc-trail.el3
-rw-r--r--lisp/calc/calc-undo.el3
-rw-r--r--lisp/calc/calc-units.el3
-rw-r--r--lisp/calc/calc-vec.el3
-rw-r--r--lisp/calc/calc-yank.el3
-rw-r--r--lisp/calc/calc.el6
-rw-r--r--lisp/calc/calcalg2.el3
-rw-r--r--lisp/calc/calcalg3.el3
-rw-r--r--lisp/calc/calccomp.el3
-rw-r--r--lisp/calc/calcsel2.el3
-rw-r--r--lisp/calculator.el15
-rw-r--r--lisp/calendar/calendar.el8
-rw-r--r--lisp/calendar/icalendar.el3
-rw-r--r--lisp/comint.el57
-rw-r--r--lisp/compare-w.el26
-rw-r--r--lisp/composite.el6
-rw-r--r--lisp/cus-edit.el3
-rw-r--r--lisp/custom.el2
-rw-r--r--lisp/descr-text.el50
-rw-r--r--lisp/desktop.el33
-rw-r--r--lisp/diff-mode.el58
-rw-r--r--lisp/dired-x.el79
-rw-r--r--lisp/dired.el69
-rw-r--r--lisp/dirtrack.el4
-rw-r--r--lisp/ediff-diff.el1
-rw-r--r--lisp/ediff.el12
-rw-r--r--lisp/emacs-lisp/bytecomp.el51
-rw-r--r--lisp/emacs-lisp/checkdoc.el44
-rw-r--r--lisp/emacs-lisp/cl-macs.el3
-rw-r--r--lisp/emacs-lisp/derived.el17
-rw-r--r--lisp/emacs-lisp/easy-mmode.el22
-rw-r--r--lisp/emacs-lisp/edebug.el13
-rw-r--r--lisp/emacs-lisp/find-func.el2
-rw-r--r--lisp/emacs-lisp/find-gc.el108
-rw-r--r--lisp/emacs-lisp/lisp-mode.el5
-rw-r--r--lisp/emacs-lisp/re-builder.el11
-rw-r--r--lisp/emulation/cua-base.el251
-rw-r--r--lisp/emulation/viper-cmd.el10
-rw-r--r--lisp/emulation/viper-init.el4
-rw-r--r--lisp/eshell/em-hist.el8
-rw-r--r--lisp/eshell/em-ls.el9
-rw-r--r--lisp/faces.el38
-rw-r--r--lisp/files.el44
-rw-r--r--lisp/font-core.el2
-rw-r--r--lisp/font-lock.el3
-rw-r--r--lisp/forms-d2.el6
-rw-r--r--lisp/frame.el30
-rw-r--r--lisp/gnus/ChangeLog22
-rw-r--r--lisp/gnus/gnus-art.el8
-rw-r--r--lisp/gnus/gnus-msg.el12
-rw-r--r--lisp/gnus/gnus-util.el26
-rw-r--r--lisp/gnus/mm-uu.el19
-rw-r--r--lisp/gnus/mml.el16
-rw-r--r--lisp/help-fns.el16
-rw-r--r--lisp/help-mode.el2
-rw-r--r--lisp/hexl.el9
-rw-r--r--lisp/hilit-chg.el37
-rw-r--r--lisp/ido.el33
-rw-r--r--lisp/image-file.el14
-rw-r--r--lisp/info.el7
-rw-r--r--lisp/international/isearch-x.el10
-rw-r--r--lisp/international/mule-cmds.el128
-rw-r--r--lisp/international/mule.el44
-rw-r--r--lisp/isearch.el70
-rw-r--r--lisp/mail/emacsbug.el13
-rw-r--r--lisp/mail/smtpmail.el22
-rw-r--r--lisp/mail/uce.el8
-rw-r--r--lisp/net/eudc-bob.el6
-rw-r--r--lisp/net/eudc-hotlist.el10
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/novice.el3
-rw-r--r--lisp/paths.el4
-rw-r--r--lisp/pcvs-util.el6
-rw-r--r--lisp/play/gamegrid.el26
-rw-r--r--lisp/play/snake.el19
-rw-r--r--lisp/play/tetris.el19
-rw-r--r--lisp/play/zone.el2
-rw-r--r--lisp/progmodes/ada-mode.el3
-rw-r--r--lisp/progmodes/asm-mode.el3
-rw-r--r--lisp/progmodes/f90.el3
-rw-r--r--lisp/progmodes/gdb-ui.el33
-rw-r--r--lisp/progmodes/grep.el28
-rw-r--r--lisp/progmodes/gud.el6
-rw-r--r--lisp/progmodes/pascal.el12
-rw-r--r--lisp/ps-print.el14
-rw-r--r--lisp/replace.el2
-rw-r--r--lisp/s-region.el10
-rw-r--r--lisp/server.el2
-rw-r--r--lisp/simple.el50
-rw-r--r--lisp/skeleton.el2
-rw-r--r--lisp/startup.el29
-rw-r--r--lisp/strokes.el31
-rw-r--r--lisp/tempo.el112
-rw-r--r--lisp/term.el2
-rw-r--r--lisp/textmodes/org.el591
-rw-r--r--lisp/textmodes/picture.el2
-rw-r--r--lisp/url/ChangeLog8
-rw-r--r--lisp/url/url-http.el5
-rw-r--r--lisp/url/url.el9
-rw-r--r--lisp/vcursor.el39
-rw-r--r--lisp/version.el4
-rw-r--r--lisp/w32-fns.el12
-rw-r--r--lisp/whitespace.el39
-rw-r--r--lisp/wid-edit.el56
143 files changed, 2375 insertions, 1352 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c822e5cfd34..e0f12487fb4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,598 @@
12005-07-22 Juanma Barranquero <lekktu@gmail.com>
2
3 * hilit-chg.el (highlight-changes-global-initial-state)
4 (highlight-compare-buffers, hilit-chg-turn-on-maybe)
5 (hilit-chg-fixup, highlight-changes-mode):
6 Fix typos in docstrings.
7 (highlight-changes-global-modes, highlight-changes-rotate-faces):
8 Doc fixes.
9
102005-07-21 Luc Teirlinck <teirllm@auburn.edu>
11
12 * emacs-lisp/easy-mmode.el (define-minor-mode): Never call the
13 mode function using `eval-after-load'.
14
152005-07-21 Kim F. Storm <storm@cua.dk>
16
17 * mail/emacsbug.el (report-emacs-bug): Request that backtraces are
18 included when reporting an emacs crash, and tell about the DEBUG file.
19
20 * image-file.el (insert-image-file): Add yank-handler.
21 (image-file-yank-handler): Yank handler to make unique copies of
22 images when they are yanked into a buffer next to each other.
23
242005-07-21 Juanma Barranquero <lekktu@gmail.com>
25
26 * comint.el (comint-use-prompt-regexp, comint-send-input)
27 (comint-source-default, comint-extract-string)
28 (comint-get-source, comint-word, comint-completion)
29 (comint-source, comint-prompt-read-only, comint-update-fence):
30 Fix typos in docstrings.
31 (comint-use-prompt-regexp-instead-of-fields, comint-kill-output):
32 Declare with define-obsolete-*-alias macros.
33 (comint-previous-matching-input-from-input)
34 (comint-next-matching-input-from-input)
35 (comint-previous-matching-input, comint-next-matching-input)
36 (comint-forward-matching-input):
37 Improve argument/docstring consistency.
38
39 * desktop.el (desktop-clear-preserve-buffers-regexp):
40 Also preserve the *server* buffer.
41
42 * simple.el (clone-indirect-buffer): Doc fix.
43 (fixup-whitespace, just-one-space)
44 (backward-delete-char-untabify, lambda): "?\ " -> "?\s".
45 (next-error, next-error-highlight)
46 (next-error-highlight-no-select, next-error-last-buffer)
47 (next-error-buffer-p, next-error-find-buffer, next-error)
48 (previous-error, next-error-no-select, previous-error-no-select)
49 (open-line, split-line, minibuffer-prompt-width, kill-new)
50 (binary-overwrite-mode): Fix typos in docstrings.
51 (set-fill-column): Fix typo in message.
52
53 * skeleton.el (skeleton-proxy-new): Doc fix.
54
55 * strokes.el (strokes-load-hook): Doc fix.
56 (strokes-grid-resolution, strokes-get-grid-position)
57 (strokes-renormalize-to-grid, strokes-read-stroke)
58 (strokes-read-complex-stroke, strokes-file, strokes-last-stroke)
59 (strokes-global-map): Fix typos in docstrings.
60 (strokes-help): Doc fix. Fix help message and pass it through
61 `substitute-command-keys'.
62
63 * tempo.el (tempo-insert-prompt, tempo-interactive)
64 (tempo-show-completion-buffer, tempo-tags, tempo-match-finder)
65 (tempo-insert-string-functions, tempo-local-tags)
66 (tempo-define-template, tempo-insert-template)
67 (tempo-insert-prompt-compat, tempo-is-user-element)
68 (tempo-insert-mark, tempo-find-match-string, tempo-complete-tag):
69 Fix typos in docstrings.
70
71 * vcursor.el (vcursor-other-window, vcursor-bind-keys)
72 (vcursor-key-bindings, vcursor-use-vcursor-map)
73 (vcursor-find-window, vcursor-scroll-down)
74 (vcursor-disable, vcursor-beginning-of-buffer)
75 (vcursor-end-of-buffer): Fix typos in docstrings.
76 (vcursor-relative-move, vcursor-get-char-count):
77 Improve argument/docstring consistency.
78
79 * version.el: "?\ " -> "?\s".
80
81 * wid-edit.el (widget-default-create, widget-after-change)
82 (widget-default-format-handler, widget-checklist-add-item)
83 (widget-radio-add-item, widget-choose, widget-specify-secret)
84 (widget-field-value-create, widget-field-value-get)
85 (widget-editable-list-format-handler)
86 (widget-editable-list-entry-create, widget-group-value-create)
87 (widget-documentation-link-add)
88 (widget-documentation-string-value-create): "?\ " -> "?\s".
89 (widget-convert-text): Doc fix.
90 (widget-narrow-to-field, widget-field-find)
91 (widget-url-link-action, widget-emacs-library-link-action)
92 (widget-color-notify): Fix typos in docstrings.
93
94 * w32-fns.el (w32-shell-name): Use `bound-and-true-p'.
95 (x-select-text, set-w32-system-coding-system)
96 (w32-add-charset-info): Fix typos in docstrings.
97
98 * emulation/cua-base.el (cua-mode, cua-enable-register-prefix)
99 (cua-enable-cua-keys, cua-use-hyper-key)
100 (cua-virtual-rectangle-edges): Fix typos in docstrings.
101 (cua--M/H-key, cua--init-keymaps): "?\ " -> "?\s".
102
103 * net/tramp.el (tramp-handle-load): Fix typo in error message.
104
105 * emacs-lisp/re-builder.el (regexp-builder): Declare with
106 `defalias' instead of faking it.
107
108 * eshell/em-ls.el (eshell-ls-decorated-name): Doc fix.
109 (eshell-ls-missing, eshell-ls-dired-initial-args)
110 (eshell-ls-use-in-dired): Fix typos in docstrings.
111
1122005-07-20 Kim F. Storm <storm@cua.dk>
113
114 * emulation/cua-base.el (cua-mode): Improve doc string.
115
1162005-07-20 Juanma Barranquero <lekktu@gmail.com>
117
118 * abbrev.el (expand-region-abbrevs): Doc fix.
119 (inverse-add-mode-abbrev, inverse-add-global-abbrev):
120 Improve argument/docstring consistency.
121
122 * arc-mode.el (archive-get-descr, archive-alternate-display):
123 Doc fixes.
124 (archive-l-e): Improve argument/docstring consistency.
125 (archive-tmpdir, archive-unixdate, archive-unixtime)
126 (archive-chmod-entry): Fix typos in docstrings.
127 (archive-unflag, archive-unflag-backwards)
128 (archive-unmark-all-files): "?\ " -> "?\s".
129
130 * buff-menu.el (Buffer-menu-unmark): Doc fix.
131 (Buffer-menu-not-modified, Buffer-menu-execute)
132 (Buffer-menu-toggle-read-only, Buffer-menu-buffer+size)
133 (list-buffers-noselect, Buffer-menu-select): "?\ " -> "?\s".
134
135 * composite.el (compose-string, encode-composition-rule)
136 (compose-last-chars): Fix typos in docstrings.
137
138 * desktop.el (desktop-enable, desktop-basefilename):
139 Declare with `define-obsolete-variable-alias'.
140 (desktop-internal-v2s): Don't quote keywords.
141 (desktop-clear): "?\ " -> "?\s".
142
143 * dired.el (dired-align-file, dired-flag-backup-files)
144 (dired-change-marks, dired-unmark-all-files): "?\ " -> "?\s".
145 (dired-listing-switches, dired-ls-F-marks-symlinks)
146 (dired-dwim-target, dired-load-hook, dired-mode-hook)
147 (dired-directory, dired-faces, dired, dired-revert)
148 (dired-mode, dired-summary, dired-view-file)
149 (dired-copy-filename-as-kill, dired-delete-file)
150 (dired-no-confirm, dired-unmark-all-marks)
151 (dired-sort-by-date-regexp, dired-sort-by-name-regexp)
152 (dired-sort-inhibit, dired-sort-other): Fix typos in docstrings.
153 (dired-undo, dired-get-file-for-visit, dired-sort-toggle-or-edit):
154 Fix typos in message strings.
155
156 * dired-x.el (virtual-dired): Declare with `defalias'.
157 (dired-mark-unmarked-files, dired-local-variables-file)
158 (dired-omit-here-always): Doc fix.
159 (dired-omit-mode, dired-find-subdir)
160 (dired-enable-local-variables, dired-clean-up-buffers-too)
161 (dired-extra-startup, dired-mark-extension, dired-jump)
162 (dired-jump-other-window, dired-omit-localp, dired-virtual-mode)
163 (dired-smart-shell-command, dired-guess-shell-alist-user)
164 (dired-man, dired-initial-position, dired-x-hands-off-my-keys)
165 (dired-x-bind-find-file, dired-x-submit-report):
166 Fix typos in docstrings.
167 (dired-mark-unmarked-files): "?\ " -> "?\s".
168
169 * dirtrack.el (dirtrack-list): Fix typos in docstring.
170
171 * faces.el (describe-face): "?\ " -> "?\s".
172 (read-all-face-attributes, read-face-font, modify-face)
173 (face-attr-construct, italic): Fix typos in docstrings.
174 (frame-update-face-colors): Declare with
175 `define-obsolete-function-alias'.
176
177 * files.el (find-file-noselect, recode-file-name): Doc fixes.
178 (insert-directory, kill-some-buffers): "?\ " -> "?\s".
179 (magic-mode-alist, buffer-file-numbers-unique)
180 (write-file-functions, get-free-disk-space):
181 Fix typos in docstrings.
182 (find-file-not-found-hooks, find-file-hooks, write-file-hooks)
183 (write-contents-hooks, write-file-hooks):
184 Declare with `define-obsolete-variable-alias'.
185
186 * forms-d2.el (arch-rj): Fix typo in docstrings.
187 (arch-tocol): Likewise. "?\ " -> "?\s".
188
189 * frame.el (set-frame-font, cursor-in-non-selected-windows):
190 Fix typo in docstring.
191 (set-screen-width, set-screen-height): Delete redundant info in
192 doctrings.
193 (new-frame, screen-height, screen-width): Declare with
194 `define-obsolete-function-alias'.
195 (delete-frame-hook, blink-cursor): Declare with
196 `define-obsolete-variable-alias'.
197
198 * paths.el (prune-directory-list): Fix typos in docstring.
199
200 * pcvs-util.el (cvs-flags-query, cvs-strings->string)
201 (cvs-prefix-get): Fix typos in docstrings.
202
203 * ps-print.el (ps-extend-face-list, ps-extend-face)
204 (ps-print-background-image): Fix typos in docstrings.
205 (ps-default-fg, ps-default-bg): Doc fixes.
206
207 * s-region.el (s-region-bind): Doc fix.
208 (s-region-move-p1, s-region-move-p2): Fix typos in docstrings.
209
210 * textmodes/org.el (org-table-formula-substitute-names)
211 (org-table-get-vertical-vector): Doc fixes.
212 (org-table-recalculate): Remove unused argument to `message'.
213
2142005-07-19 Carsten Dominik <dominik@science.uva.nl>
215
216 * textmodes/org.el (org-table-column-names)
217 (org-table-column-name-regexp)
218 (org-table-named-field-locations): New variables.
219 (org-archive-subtree): Protect `this-command' when calling
220 `org-copy-subtree' and `org-cut-subtree', to avoid appending to
221 the kill buffer.
222 (org-complete): Remove fixed-formula completion.
223 (org-edit-formulas-map): New variable.
224 (org-table-edit-formulas): New command.
225 (org-finish-edit-formulas, org-abort-edit-formulas)
226 (org-show-variable, org-table-get-vertical-vector): New functions.
227 (org-table-maybe-eval-formula): Handle `:=' fields.
228 (org-table-get-stored-formulas, org-table-store-formulas)
229 (org-table-get-formula, org-table-modify-formulas)
230 (org-table-replace-in-formulas): Handle named field formulas.
231 (org-table-get-specials): Store locations of named fields.
232
2332005-07-19 Juri Linkov <juri@jurta.org>
234
235 * progmodes/grep.el (grep-regexp-alist)
236 (grep-mode-font-lock-keywords, grep-process-setup):
237 Use default GNU grep match color "01;31m" instead of "01;41m".
238 (grep-regexp-alist, grep-mode-font-lock-keywords):
239 Use `\\[[0-9]*m' instead of `\\[00m'.
240 (grep-regexp-alist): Move `\\(?:\033\\[K\\)?' from sgr_end to
241 sgr_start where its handling is more important. Use the real
242 length of sgr_start instead of constant 8.
243 (grep-mode-font-lock-keywords): Don't delete `\\(?:\033\\[K\\)?'
244 specially. Delete all remaining escape sequences.
245 (grep-process-setup): Set "GREP_COLORS" for GNU grep 2.5.1-cvs.
246 (grep-regexp-alist): Make hyperlink only for binary file name
247 instead of the whole line.
248 (grep-mode-map): Bind `backtab' to `compilation-previous-file'.
249 (grep-mode): Add autoload.
250
251 * emacs-lisp/find-func.el (find-function-regexp):
252 Add `define-compilation-mode'.
253
2542005-07-19 Juri Linkov <juri@jurta.org>
255
256 * compare-w.el (compare-ignore-whitespace, compare-windows-sync)
257 (compare-windows-sync-string-size, compare-windows-recenter)
258 (compare-windows-highlight, compare-windows): Add version 22.1.
259 (compare-windows) <defface>: Inherit from lazy-highlight instead
260 of duplicating its default value.
261
262 * cus-edit.el (custom-mode-map): Bind `C-c C-c' to `Custom-set'.
263 (Custom-mode-menu): Use `info' instead of `Info-goto-node'.
264
265 * descr-text.el (describe-char): Create link buttons for `charset'
266 and `code point'. Add the current input method name with a link
267 button to `to input' field. Print face names of display table
268 characters in `The display table entry is displayed by' section
269 instead of printing face-id in the `display' field.
270 Guess hardcoded faces and create a link button for them.
271 Skip empty fields when calculating max-width.
272 Treat `widget-create' specially while inserting strings from the
273 collected field list.
274 (describe-char-after): Made obsolete in version 22.1, not 21.5.
275
276 * diff-mode.el (diff-file-header): Change foreground color from
277 yellow to green on light backgrounds.
278 (diff-context): Inherit from `shadow' only for color/grayscale
279 with more than 88 colors.
280 (diff-indicator-removed, diff-indicator-added)
281 (diff-indicator-changed): New faces.
282 (diff-font-lock-keywords): Use new faces. Regroup rules.
283 Add "^---$" for `normal' diff format. Fontify `#' lines with
284 font-lock-comment-delimiter-face and font-lock-comment-face.
285 Add `#' to ^[^...] in the rule for `diff-context-face'.
286
287 * faces.el (mode-line-highlight): Replace RoyalBlue4 with
288 a button-like box. Inherit from `highlight' on low colors.
289 (shadow): Use shades of gray only for color/grayscale with
290 more than 88 colors. Use green for light backgrounds with
291 8 colors, and yellow for dark backgrounds with 8 colors.
292
293 * font-lock.el (font-lock-regexp-grouping-backslash): Don't
294 inherit from escape-glyph (use bold for all cases).
295
296 * info.el (info-xref-visited): Use light foreground color `violet'
297 for dark backgrounds instead of dark color `magenta3'.
298 (info-title-1): Use `yellow' color for dark backgrounds.
299
300 * isearch.el (isearch): Use not-too-dark magenta3 instead of
301 too-light magenta2.
302
303 * replace.el (match): Use slightly more light RoyalBlue3 instead
304 of dark RoyalBlue4.
305
306 * wid-edit.el (widget-inactive): Inherit from `shadow'.
307
3082005-07-19 Juanma Barranquero <lekktu@gmail.com>
309
310 * novice.el (disabled-command-hook): Declare it with
311 `define-obsolete-variable-alias'.
312
313 * desktop.el (desktop-enable, desktop-buffer-modes-to-save)
314 (desktop-buffer-misc-functions, desktop-buffer-handlers)
315 (desktop-load-default): Add release to obsolescence info.
316 (desktop-globals-to-clear, desktop-buffer-mode-handlers)
317 (desktop-append-buffer-args, desktop-read):
318 Fix typos in docstrings.
319 (desktop-kill): Fix typo in message.
320 (desktop-save): Doc fix.
321
3222005-07-19 Michael Kifer <kifer@cs.stonybrook.edu>
323
324 * viper-cmd.el (viper-escape-to-state): Bug fix.
325 (viper-envelop-ESC-key): Change the definition of fast
326 keysequence so it'll work with keyboard macros.
327
328 * ediff.el (ediff-patch-buffer): Change the docstring.
329
3302005-07-19 Kenichi Handa <handa@m17n.org>
331
332 * international/mule-cmds.el (select-safe-coding-system): Try to
333 use an auto-coding (if any) before anything else. If the found
334 auto-coding is invalid, show a warning message.
335
336 * international/mule.el (find-auto-coding): New function created
337 by modifying the body of set-auto-coding.
338 (set-auto-coding): Use find-auto-coding to find a coding.
339
3402005-07-18 Richard M. Stallman <rms@gnu.org>
341
342 * allout.el (allout-isearch-expose): Use isearch-mode-end-hook-quit,
343 not isearch-mode-end-hook-error.
344 (allout-before-change-protect): Fix error message.
345
3462005-07-18 Juri Linkov <juri@jurta.org>
347
348 * allout.el (allout-mode):
349 * calculator.el (calculator-copy):
350 * custom.el (custom-known-themes):
351 * dired.el (dired-desktop-buffer-misc-data)
352 (dired-restore-desktop-buffer):
353 * dired-x.el (dired-omit-marker-char):
354 * files.el (basic-save-buffer):
355 * font-core.el (font-lock-mode):
356 * calendar/calendar.el (calendar-goto-hebrew-date)
357 (calendar-goto-coptic-date, calendar-goto-ethiopic-date)
358 (calendar-goto-persian-date):
359 * language/ethio-util.el (ethio-sera-to-fidel-region):
360 * textmodes/picture.el (picture-mode):
361 Delete duplicate duplicate words.
362
3632005-07-18 Juri Linkov <juri@jurta.org>
364
365 * isearch.el (isearch-mode-map): Remove key bindings for regexp
366 chars * ? } |.
367 (isearch-fallback): Don't call `isearch-process-search-char'.
368 (isearch-*-char, isearch-}-char, isearch-|-char): Remove functions.
369 (isearch-process-search-char): Call `isearch-fallback' for regexp
370 chars * ? } |.
371 (isearch-return-char): Make obsolete with `make-obsolete' instead
372 of simply documenting it as obsolete in the docstring.
373 (isearch-fallback): Refill docstring.
374
375 * international/isearch-x.el
376 (isearch-process-search-multibyte-characters): Remove unneeded `concat'.
377 Add intermediate values to `junk-hist' instead of `minibuffer-history'.
378 Test the length of `str'.
379
3802005-07-18 Juanma Barranquero <lekktu@gmail.com>
381
382 * allout.el (allout-resolve-xref): Fix typos in error strings.
383 (allout-before-change-protect): Remove unneeded `concat'.
384
385 * array.el (array-mode, array-reconfigure-rows)
386 (untabify-backward): Fix typos in docstrings.
387 (array-reconfigure-rows): Use `insert-buffer-substring', not
388 `insert-buffer'.
389
390 * calendar/icalendar.el (icalendar--get-unfolded-buffer):
391 * progmodes/ada-mode.el (ada-make-body): Use
392 `insert-buffer-substring' and `goto-char', not `insert-buffer'.
393
394 * dired.el (dired-log):
395 * tar-mode.el (tar-subfile-save-buffer):
396 * play/zone.el (zone-pgm-stress-destress):
397 Use `insert-buffer-substring', not `insert-buffer'.
398
3992005-07-17 Simon Josefsson <jas@extundo.com>
400
401 * mail/smtpmail.el (smtpmail-auth-supported): Prefer PLAIN over LOGIN.
402
4032005-07-16 Jose E. Marchesi <jemarch@gnu.org>
404
405 * lisp/mail/smtpmail.el (smtpmail-auth-supported):
406 Add plain auth method.
407 (smtpmail-try-auth-methods): Add AUTH PLAIN dialog.
408
4092005-07-17 Kim F. Storm <storm@cua.dk>
410
411 * ido.el (dired-other-window): Add ido property.
412
4132005-07-16 Juanma Barranquero <lekktu@gmail.com>
414
415 * emacs-lisp/bytecomp.el (byte-compile-maybe-guarded):
416 Fix typo in docstring.
417 (byte-compile-interactive-only-functions): Add `insert-buffer' and
418 `insert-file-literally'.
419
420 * emacs-lisp/edebug.el (def-edebug-form-spec): Add obsolescence
421 info and delete redundant message. Doc fix.
422 (edebug-install-custom-print-funcs, edebug-reset-print-funcs)
423 (edebug-uninstall-custom-print-funcs): Define as obsolete aliases.
424
4252005-07-16 Richard M. Stallman <rms@gnu.org>
426
427 * emacs-lisp/bytecomp.el (byte-compile-and-recursion): New function.
428 (byte-compile-and): Use byte-compile-and-recursion.
429 (byte-compile-or-recursion): New function.
430 (byte-compile-or): Use that.
431 (byte-compile-if): Guard the else-clause too.
432 (byte-compile-maybe-guarded): Handle (not (featurep 'emacs)).
433
434 * isearch.el (isearch-mode-end-hook-quit): New variable.
435 (isearch-done): Bind it.
436 (isearch-mode-end-hook): Doc fix.
437
438 * allout.el (allout-isearch-did-quit): Variable deleted.
439 (allout-real-isearch-abort): Function name no longer used.
440 (allout-mode): Do allout-enwrap-isearch whenever feature is wanted.
441 (allout-isearch-rectification): isearch-mode always exists.
442 Don't set allout-isearch-did-quit.
443 (allout-isearch-expose): Check isearch-mode-end-hook-error, not
444 allout-isearch-did-quit.
445 (allout-enwrap-isearch): Just add the hook.
446 (allout-isearch-abort): Function deleted.
447 (allout-pre-command-business): Avoid warning.
448
449 * progmodes/pascal.el (pascal-outline-map): Use fboundp, not boundp.
450 Correctly avoid warnings.
451 (pascal-outline): Likewise.
452
453 * progmodes/f90.el (f90-abbrev-start): Avoid warning.
454
455 * progmodes/asm-mode.el (asm-comment): Use with-no-warnings.
456
457 * play/tetris.el (tetris-mode): Avoid warning.
458
459 * play/snake.el (snake-mode): Avoid warning.
460
461 * play/gamegrid.el (gamegrid-shared-game-dir): Add defvar.
462 (gamegrid-set-display-table): Avoid warning.
463 (gamegrid-set-timer): Likewise.
464 (gamegrid-make-mono-tty-face): Use set-face-inverse-video-p.
465 (gamegrid-add-score-with-update-game-score-1): Take FILE
466 as argument.
467 (gamegrid-add-score-with-update-game-score): Pass that argument.
468 Rename have-shared-game-dir to gamegrid-shared-game-dir.
469
470 * net/eudc-hotlist.el (eudc-hotlist-mode): Avoid warnings.
471
472 * net/eudc-bob.el (eudc-jump-to-event): Avoid warning.
473 (eudc-bob-display-jpeg, eudc-bob-can-display-inline-images): Likewise.
474
475 * mail/uce.el (uce-reply-to-uce): Replace beginning-of-buffer
476 and insert-file.
477
478 * mail/supercite.el (sc-no-blank-line-or-header): Avoid warning.
479 (sc-ask): Avoid warnings.
480
481 * eshell/em-hist.el (eshell-rebind-keys-alist): Add defvar.
482 (eshell-hist-initialize): Use that var the natural way.
483
484 * emulation/viper-init.el (viper-activate-input-method): Avoid warning.
485
486 * emacs-lisp/re-builder.el (reb-cook-regexp): Avoid
487 warning calling lre-compile-string.
488 (reb-color-display-p): Avoid warning.
489
490 * calculator.el (calculator-last-input): Guard uses
491 of event-key and key-press-event-p.
492 (event-key, key-press-event-p): Delete definitions.
493
494 * emacs-lisp/find-gc.el (find-gc-unsafe-list)
495 (find-gc-source-directory, find-gc-subrs-callers)
496 (find-gc-noreturn-list, find-gc-source-files)
497 (find-gc-subrs-called): Vars renamed and defvar'd.
498
499 * emacs-lisp/checkdoc.el (checkdoc-make-overlay)
500 (checkdoc-overlay-put, checkdoc-delete-overlay)
501 (checkdoc-overlay-start, checkdoc-overlay-end)
502 (checkdoc-mode-line-update, checkdoc-char=):
503 Define such that compiler knows they are defined.
504 (checkdoc-call-eval-buffer): Deleted. Use eval-buffer directly.
505 (checkdoc-read-event): Deleted. Use read-event directly.
506
507 * whitespace.el (whitespace-make-overlay)
508 (whitespace-overlay-put, whitespace-delete-overlay)
509 (whitespace-overlay-start, whitespace-overlay-end):
510 Define such that compiler knows they are defined.
511 (whitespace): Move conditional inside.
512
513 * tempo.el (tempo-insert-template): Suppress warning.
514
515 * ediff-diff.el (longlines-mode): Add defvar.
516
5172005-07-16 Gary Howell <g1howell-list@yahoo.com> (tiny change)
518
519 * server.el: Bind "C-x #" in a way that works even if C-x is
520 redefined to a command key, not a prefix key.
521
5222005-07-16 Johan Bockgard <bojohan@users.sourceforge.net> (tiny change)
523
524 * emacs-lisp/cl-macs.el (cl-make-type-test): Defer evaluation of
525 cl-make-type-test till execution time.
526
5272005-07-16 Markus Rost <rost@math.uni-bielefeld.de>
528
529 * dired-x.el (dired-do-relsymlink-regexp): Add missing optional
530 arg ARG and use it.
531
5322005-07-16 Johan Bockgard <bojohan@users.sourceforge.net> (tiny change)
533
534 * emacs-lisp/cl-macs.el (cl-make-type-test): Add `atom' type.
535
5362005-07-15 Luc Teirlinck <teirllm@auburn.edu>
537
538 * emacs-lisp/easy-mmode.el (define-minor-mode): Avoid constructing
539 a defcustom with two :set or :type keywords.
540
5412005-07-15 Richard M. Stallman <rms@gnu.org>
542
543 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):
544 Don't give ^M comment-end syntax.
545
5462005-07-16 Nick Roberts <nickrob@snap.net.nz>
547
548 * progmodes/gdb-ui.el (gdb-var-update, gdb-var-update-handler):
549 Don't consider gdbmi (gdb-mi.el has its own update functions).
550 (gdb-var-delete): Make it work for gdbmi as well.
551 (gdb-speedbar-expand-node): Move var-update here for gdbmi.
552
553 * progmodes/gud.el (etags, sdb): Only require etags when needed.
554 (gud-speedbar-menu-items): Correct logic for enabling items.
555
5562005-07-15 Kim F. Storm <storm@cua.dk>
557
558 * ido.el: Fix commentary.
559 (ido-define-mode-map): Move ido-next-work-file to C-M-o.
560 Use with-no-warnings around ffap-guesser.
561 (ido-file-internal, ido-read-file-name, ido-read-directory-name):
562 Let bind minibuffer-completing-file-name to t.
563
5642005-07-15 Juanma Barranquero <lekktu@gmail.com>
565
566 * startup.el (site-run-file, keyboard-type): Doc fixes.
567 (command-line): Check for "--basic-display" argument; also for
568 "--quick", not "--bare-bones" (which was renamed).
569 (fancy-splash-text): Add missing item "Getting New Versions".
570 (normal-splash-screen): Fix typos and improve consistency with
571 `fancy-splash-text'. Update copyright year.
572
573 * hexl.el (hexl-mode-map): Recognize also `ehelp-command' as a
574 valid binding for `help-char'.
575
576 * emacs-lisp/derived.el (derived-mode-hook-name): Doc fix.
577
5782005-07-14 Dan Nicolaescu <dann@ics.uci.edu>
579
580 * term.el (term-mode): Disable cua-mode for term buffers.
581
5822005-07-14 Juanma Barranquero <lekktu@gmail.com>
583
584 * add-log.el (add-log-mailing-address, change-log-merge):
585 Doc fixes.
586 (change-log-get-method-definition): Fix typo in docstring.
587
5882005-07-14 Kim F. Storm <storm@cua.dk>
589
590 * emulation/cua-base.el:
591 (cua--pre-command-handler-1, cua--pre-command-handler)
592 (cua--post-command-handler-1, cua--post-command-handler):
593 Split in two. Check (buffer local) value of cua-mode.
594 (cua-selection-mode): New command.
595
12005-07-13 Luc Teirlinck <teirllm@auburn.edu> 5962005-07-13 Luc Teirlinck <teirllm@auburn.edu>
2 597
3 * custom.el (custom-initialize-safe-set) 598 * custom.el (custom-initialize-safe-set)
@@ -12,8 +607,8 @@
12 * startup.el (command-line): Use `custom-reevaluate-setting' again 607 * startup.el (command-line): Use `custom-reevaluate-setting' again
13 for tooltip-mode. 608 for tooltip-mode.
14 609
15 * emacs-lisp/easy-mmode.el (define-minor-mode): Do not override 610 * emacs-lisp/easy-mmode.el (define-minor-mode): Avoid constructing
16 explicitly specified :initialize keyword. 611 a defcustom with two :initialize keywords.
17 612
182005-07-13 Juanma Barranquero <lekktu@gmail.com> 6132005-07-13 Juanma Barranquero <lekktu@gmail.com>
19 614
@@ -24,7 +619,7 @@
24 (allout-insert-latex-header, allout-insert-latex-trailer) 619 (allout-insert-latex-header, allout-insert-latex-trailer)
25 (allout-latex-verbatim-quote-curr-line, allout-latexify-exposed) 620 (allout-latex-verbatim-quote-curr-line, allout-latexify-exposed)
26 (allout-latex-verb-quote): Fix typos in docstrings. 621 (allout-latex-verb-quote): Fix typos in docstrings.
27 (allout-enwrap-isearch, regexp-sans-escapes): Doc fix. 622 (allout-enwrap-isearch, regexp-sans-escapes): Doc fixes.
28 (allout-unprotected, allout-prefix-data): 623 (allout-unprotected, allout-prefix-data):
29 Improve argument/docstring consistency. 624 Improve argument/docstring consistency.
30 (allout-chart-subtree): Fix argument spec. 625 (allout-chart-subtree): Fix argument spec.
@@ -42,7 +637,7 @@
42 (whitespace-check-indent-whitespace) 637 (whitespace-check-indent-whitespace)
43 (whitespace-check-ateol-whitespace, whitespace-abort-on-error) 638 (whitespace-check-ateol-whitespace, whitespace-abort-on-error)
44 (whitespace-modes): Fix typos in docstrings. 639 (whitespace-modes): Fix typos in docstrings.
45 (defgroup, defcustom): Doc fix. 640 (defgroup, defcustom): Doc fixes.
46 641
47 * winner.el (winner-mode, winner-boring-buffers) 642 * winner.el (winner-mode, winner-boring-buffers)
48 (winner-pending-undo-ring): Doc fixes. 643 (winner-pending-undo-ring): Doc fixes.
@@ -335,7 +930,7 @@
335 930
3362005-07-07 Jay Belanger <belanger@truman.edu> 9312005-07-07 Jay Belanger <belanger@truman.edu>
337 932
338 * calc/calc-units.el (math-apply-units): Change the places in 933 * calc/calc-units.el (math-apply-units): Change the places in
339 which units are simplified. 934 which units are simplified.
340 935
3412005-07-07 Luc Teirlinck <teirllm@auburn.edu> 9362005-07-07 Luc Teirlinck <teirllm@auburn.edu>
@@ -6404,7 +6999,8 @@
6404 * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el 6999 * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el
6405 * textmodes/reftex-index.el, textmodes/reftex-parse.el 7000 * textmodes/reftex-index.el, textmodes/reftex-parse.el
6406 * textmodes/reftex-ref.el, textmodes/reftex-vars.el 7001 * textmodes/reftex-ref.el, textmodes/reftex-vars.el
6407 * textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'. 7002 * textmodes/reftex.el, textmodes/org.el:
7003 Replace `illegal' with `invalid'.
6408 7004
64092005-03-24 Stefan Monnier <monnier@iro.umontreal.ca> 70052005-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
6410 7006
@@ -8637,7 +9233,7 @@
8637 * textmodes/org.el (org-set-regexps-and-options): Rename from 9233 * textmodes/org.el (org-set-regexps-and-options): Rename from
8638 `org-set-regexps'. Added checking for STARTUP keyword. 9234 `org-set-regexps'. Added checking for STARTUP keyword.
8639 (org-get-current-options): Add STARTUP options. 9235 (org-get-current-options): Add STARTUP options.
8640 (org-table-insert-row): Mode mode intelligent about when 9236 (org-table-insert-row): Make mode intelligent about when
8641 realignment is needed. 9237 realignment is needed.
8642 (org-self-insert-command, org-delete-backward-char, org-delete-char): 9238 (org-self-insert-command, org-delete-backward-char, org-delete-char):
8643 New commands. 9239 New commands.
@@ -11831,7 +12427,7 @@
11831 12427
11832 * simple.el (line-move-invisible-p): Rename from line-move-invisible. 12428 * simple.el (line-move-invisible-p): Rename from line-move-invisible.
11833 (line-move): New args NOERROR and TO-END. 12429 (line-move): New args NOERROR and TO-END.
11834 Return t if if succeed in moving specified number of lines. 12430 Return t if succeed in moving specified number of lines.
11835 (move-end-of-line): New function. 12431 (move-end-of-line): New function.
11836 12432
11837 * simple.el (beginning-of-buffer-other-window): Use with-no-warnings. 12433 * simple.el (beginning-of-buffer-other-window): Use with-no-warnings.
@@ -14554,7 +15150,7 @@
145542004-08-16 Reiner Steib <Reiner.Steib@gmx.de> 151502004-08-16 Reiner Steib <Reiner.Steib@gmx.de>
14555 15151
14556 * calendar/time-date.el (time-to-number-of-days): New function. 15152 * calendar/time-date.el (time-to-number-of-days): New function.
14557 Imported from from Gnus. 15153 Imported from Gnus.
14558 15154
145592004-07-22 Kim F. Storm <storm@cua.dk> 151552004-07-22 Kim F. Storm <storm@cua.dk>
14560 15156
@@ -16115,7 +16711,7 @@
161152004-05-18 Stefan Monnier <monnier@iro.umontreal.ca> 167112004-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
16116 16712
16117 * files.el (auto-save-file-name-transforms): Make sure ange-ftp temp 16713 * files.el (auto-save-file-name-transforms): Make sure ange-ftp temp
16118 files files don't contain an accidental additional /. 16714 files don't contain an accidental additional /.
16119 16715
16120 * textmodes/tex-mode.el (tex-compilation-parse-errors): Save excursion 16716 * textmodes/tex-mode.el (tex-compilation-parse-errors): Save excursion
16121 in source buffer. 16717 in source buffer.
@@ -22537,7 +23133,7 @@
22537 23133
22538 * menu-bar.el (menu-bar-options-menu): Supply a body for the 23134 * menu-bar.el (menu-bar-options-menu): Supply a body for the
22539 [save-place] binding in the Options menu. Have it require 23135 [save-place] binding in the Options menu. Have it require
22540 'saveplace' and then toggle the variable manually, to avoid an an 23136 'saveplace' and then toggle the variable manually, to avoid an
22541 unbound variable error. Thanks to <Sebastien.Kirche@sage.com> 23137 unbound variable error. Thanks to <Sebastien.Kirche@sage.com>
22542 for the bug report. 23138 for the bug report.
22543 23139
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index b63814e922a..cb8f9b69aca 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -281,7 +281,7 @@ Don't use this function in a Lisp program; use `define-abbrev' instead."
281 name (abbrev-expansion name table)))) 281 name (abbrev-expansion name table))))
282 (define-abbrev table (downcase name) exp)))) 282 (define-abbrev table (downcase name) exp))))
283 283
284(defun inverse-add-mode-abbrev (arg) 284(defun inverse-add-mode-abbrev (n)
285 "Define last word before point as a mode-specific abbrev. 285 "Define last word before point as a mode-specific abbrev.
286With prefix argument N, defines the Nth word before point. 286With prefix argument N, defines the Nth word before point.
287This command uses the minibuffer to read the expansion. 287This command uses the minibuffer to read the expansion.
@@ -292,15 +292,15 @@ Expands the abbreviation after defining it."
292 global-abbrev-table 292 global-abbrev-table
293 (or local-abbrev-table 293 (or local-abbrev-table
294 (error "No per-mode abbrev table"))) 294 (error "No per-mode abbrev table")))
295 "Mode" arg)) 295 "Mode" n))
296 296
297(defun inverse-add-global-abbrev (arg) 297(defun inverse-add-global-abbrev (n)
298 "Define last word before point as a global (mode-independent) abbrev. 298 "Define last word before point as a global (mode-independent) abbrev.
299With prefix argument N, defines the Nth word before point. 299With prefix argument N, defines the Nth word before point.
300This command uses the minibuffer to read the expansion. 300This command uses the minibuffer to read the expansion.
301Expands the abbreviation after defining it." 301Expands the abbreviation after defining it."
302 (interactive "p") 302 (interactive "p")
303 (inverse-add-abbrev global-abbrev-table "Global" arg)) 303 (inverse-add-abbrev global-abbrev-table "Global" n))
304 304
305(defun inverse-add-abbrev (table type arg) 305(defun inverse-add-abbrev (table type arg)
306 (let (name exp start end) 306 (let (name exp start end)
@@ -338,9 +338,8 @@ ARG is non-nil. Interactively, ARG is the prefix argument."
338 338
339(defun expand-region-abbrevs (start end &optional noquery) 339(defun expand-region-abbrevs (start end &optional noquery)
340 "For abbrev occurrence in the region, offer to expand it. 340 "For abbrev occurrence in the region, offer to expand it.
341The user is asked to type y or n for each occurrence. 341The user is asked to type `y' or `n' for each occurrence.
342A prefix argument means don't query; expand all abbrevs. 342A prefix argument means don't query; expand all abbrevs."
343If called from a Lisp program, arguments are START END &optional NOQUERY."
344 (interactive "r\nP") 343 (interactive "r\nP")
345 (save-excursion 344 (save-excursion
346 (goto-char start) 345 (goto-char start)
diff --git a/lisp/add-log.el b/lisp/add-log.el
index ec802ef4ae7..27da19ee602 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -70,7 +70,7 @@ This defaults to the value returned by the function `user-full-name'."
70 70
71;;;###autoload 71;;;###autoload
72(defcustom add-log-mailing-address nil 72(defcustom add-log-mailing-address nil
73 "*Electronic mail addresses of user, for inclusion in ChangeLog headers. 73 "*Email addresses of user, for inclusion in ChangeLog headers.
74This defaults to the value of `user-mail-address'. In addition to 74This defaults to the value of `user-mail-address'. In addition to
75being a simple string, this value can also be a list. All elements 75being a simple string, this value can also be a list. All elements
76will be recognized as referring to the same user; when creating a new 76will be recognized as referring to the same user; when creating a new
@@ -976,7 +976,7 @@ Has a preference of looking backwards."
976 (goto-char (match-end 0))) 976 (goto-char (match-end 0)))
977 977
978(defun change-log-get-method-definition () 978(defun change-log-get-method-definition ()
979"For objective C, return the method name if we are in a method." 979"For Objective C, return the method name if we are in a method."
980 (let ((change-log-get-method-definition-md "[")) 980 (let ((change-log-get-method-definition-md "["))
981 (save-excursion 981 (save-excursion
982 (if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t) 982 (if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t)
@@ -1022,7 +1022,7 @@ Point is assumed to be at the start of the entry."
1022 1022
1023;;;###autoload 1023;;;###autoload
1024(defun change-log-merge (other-log) 1024(defun change-log-merge (other-log)
1025 "Merge the contents of ChangeLog file OTHER-LOG with this buffer. 1025 "Merge the contents of change log file OTHER-LOG with this buffer.
1026Both must be found in Change Log mode (since the merging depends on 1026Both must be found in Change Log mode (since the merging depends on
1027the appropriate motion commands). OTHER-LOG can be either a file name 1027the appropriate motion commands). OTHER-LOG can be either a file name
1028or a buffer. 1028or a buffer.
diff --git a/lisp/allout.el b/lisp/allout.el
index eb8df2dae5c..6f5d06cf79e 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -870,13 +870,6 @@ allout-pre- and -post-command-hooks.")
870(defvar allout-isearch-prior-pos nil 870(defvar allout-isearch-prior-pos nil
871 "Cue for isearch-dynamic-exposure tracking, used by `allout-isearch-expose'.") 871 "Cue for isearch-dynamic-exposure tracking, used by `allout-isearch-expose'.")
872(make-variable-buffer-local 'allout-isearch-prior-pos) 872(make-variable-buffer-local 'allout-isearch-prior-pos)
873;;;_ = allout-isearch-did-quit
874(defvar allout-isearch-did-quit nil
875 "Distinguishes isearch conclusion and cancellation.
876
877Maintained by `allout-isearch-abort' \(which is wrapped around the real
878isearch-abort), and monitored by `allout-isearch-expose' for action.")
879(make-variable-buffer-local 'allout-isearch-did-quit)
880;;;_ = allout-override-protect nil 873;;;_ = allout-override-protect nil
881(defvar allout-override-protect nil 874(defvar allout-override-protect nil
882 "Used in `allout-mode' for regulate of concealed-text protection mechanism. 875 "Used in `allout-mode' for regulate of concealed-text protection mechanism.
@@ -1154,7 +1147,7 @@ Topic text constituents:
1154 1147
1155HEADER: The first line of a topic, include the topic PREFIX and header 1148HEADER: The first line of a topic, include the topic PREFIX and header
1156 text. 1149 text.
1157PREFIX: The leading text of a topic which which distinguishes it from 1150PREFIX: The leading text of a topic which distinguishes it from
1158 normal text. It has a strict form, which consists of a 1151 normal text. It has a strict form, which consists of a
1159 prefix-lead string, padding, and a bullet. The bullet may be 1152 prefix-lead string, padding, and a bullet. The bullet may be
1160 followed by a number, indicating the ordinal number of the 1153 followed by a number, indicating the ordinal number of the
@@ -1343,8 +1336,7 @@ OPEN: A topic that is not closed, though its offspring or body may be."
1343 (if allout-layout 1336 (if allout-layout
1344 (setq do-layout t)) 1337 (setq do-layout t))
1345 1338
1346 (if (and allout-isearch-dynamic-expose 1339 (if allout-isearch-dynamic-expose
1347 (not (fboundp 'allout-real-isearch-abort)))
1348 (allout-enwrap-isearch)) 1340 (allout-enwrap-isearch))
1349 1341
1350 (run-hooks 'allout-mode-hook) 1342 (run-hooks 'allout-mode-hook)
@@ -2226,8 +2218,7 @@ are exempt from this restriction."
2226 (if rehide-place (goto-char rehide-place)) 2218 (if rehide-place (goto-char rehide-place))
2227 (allout-hide-current-entry-completely)) 2219 (allout-hide-current-entry-completely))
2228 (allout-hide-current-entry)) 2220 (allout-hide-current-entry))
2229 (error (concat 2221 (error "Change within concealed region prevented"))))))
2230 "Change within concealed region prevented.")))))))
2231 ) ; if 2222 ) ; if
2232 ) ; defun 2223 ) ; defun
2233;;;_ = allout-post-goto-bullet 2224;;;_ = allout-post-goto-bullet
@@ -2325,9 +2316,7 @@ return to regular interpretation of self-insert characters."
2325 (let* ((this-key-num (cond 2316 (let* ((this-key-num (cond
2326 ((numberp last-command-char) 2317 ((numberp last-command-char)
2327 last-command-char) 2318 last-command-char)
2328 ;; XXX Only XEmacs has characterp. 2319 ((fboundp 'char-to-int)
2329 ((and (fboundp 'characterp)
2330 (characterp last-command-char))
2331 (char-to-int last-command-char)) 2320 (char-to-int last-command-char))
2332 (t 0))) 2321 (t 0)))
2333 mapped-binding) 2322 mapped-binding)
@@ -2363,7 +2352,7 @@ See `allout-init' for setup instructions."
2363 2352
2364Called as part of `allout-post-command-business'." 2353Called as part of `allout-post-command-business'."
2365 2354
2366 (let ((isearching (and (boundp 'isearch-mode) isearch-mode))) 2355 (let ((isearching isearch-mode))
2367 (cond ((and isearching (not allout-pre-was-isearching)) 2356 (cond ((and isearching (not allout-pre-was-isearching))
2368 (allout-isearch-expose 'start)) 2357 (allout-isearch-expose 'start))
2369 ((and isearching allout-pre-was-isearching) 2358 ((and isearching allout-pre-was-isearching)
@@ -2371,8 +2360,7 @@ Called as part of `allout-post-command-business'."
2371 ((and (not isearching) allout-pre-was-isearching) 2360 ((and (not isearching) allout-pre-was-isearching)
2372 (allout-isearch-expose 'final)) 2361 (allout-isearch-expose 'final))
2373 ;; Not and wasn't isearching: 2362 ;; Not and wasn't isearching:
2374 (t (setq allout-isearch-prior-pos nil) 2363 (t (setq allout-isearch-prior-pos nil)))))
2375 (setq allout-isearch-did-quit nil)))))
2376;;;_ = allout-isearch-was-font-lock 2364;;;_ = allout-isearch-was-font-lock
2377(defvar allout-isearch-was-font-lock 2365(defvar allout-isearch-was-font-lock
2378 (and (boundp 'font-lock-mode) font-lock-mode)) 2366 (and (boundp 'font-lock-mode) font-lock-mode))
@@ -2414,51 +2402,16 @@ Returns the endpoint of the region."
2414 (setq allout-isearch-prior-pos nil) 2402 (setq allout-isearch-prior-pos nil)
2415 (if (not (eq mode 'final)) 2403 (if (not (eq mode 'final))
2416 (setq allout-isearch-prior-pos (cons (point) (allout-show-entry))) 2404 (setq allout-isearch-prior-pos (cons (point) (allout-show-entry)))
2417 (if allout-isearch-did-quit 2405 (if isearch-mode-end-hook-quit
2418 nil 2406 nil
2419 (setq allout-isearch-prior-pos nil) 2407 (setq allout-isearch-prior-pos nil)
2420 (allout-show-children)))) 2408 (allout-show-children)))))
2421 (setq allout-isearch-did-quit nil))
2422;;;_ > allout-enwrap-isearch () 2409;;;_ > allout-enwrap-isearch ()
2423(defun allout-enwrap-isearch () 2410(defun allout-enwrap-isearch ()
2424 "Impose `isearch-abort' wrapper for dynamic exposure in isearch. 2411 "Impose `isearch-abort' wrapper for dynamic exposure in isearch.
2425 2412
2426The function checks to ensure that the rebinding is done only once." 2413The function checks to ensure that the rebinding is done only once."
2427 2414 (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification))
2428 (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification)
2429 (if (fboundp 'allout-real-isearch-abort)
2430 ;;
2431 nil
2432 ; Ensure load of isearch-mode:
2433 (if (or (and (fboundp 'isearch-mode)
2434 (fboundp 'isearch-abort))
2435 (condition-case error
2436 (load-library "isearch-mode")
2437 ('file-error (message
2438 "Skipping isearch-mode provisions - %s '%s'"
2439 (car (cdr error))
2440 (car (cdr (cdr error))))
2441 (sit-for 1)
2442 ;; Inhibit subsequent tries and return nil:
2443 (setq allout-isearch-dynamic-expose nil))))
2444 ;; Isearch-mode loaded, encapsulate specific entry points for
2445 ;; outline dynamic-exposure business:
2446 (progn
2447 ;; stash crucial isearch-mode funcs under known, private
2448 ;; names, then register wrapper functions under the old
2449 ;; names, in their stead:
2450 (fset 'allout-real-isearch-abort (symbol-function 'isearch-abort))
2451 (fset 'isearch-abort 'allout-isearch-abort)))))
2452;;;_ > allout-isearch-abort ()
2453(defun allout-isearch-abort ()
2454 "Wrapper for `allout-real-isearch-abort' \(which see), to register
2455actual quits."
2456 (interactive)
2457 (setq allout-isearch-did-quit nil)
2458 (condition-case what
2459 (allout-real-isearch-abort)
2460 ('quit (setq allout-isearch-did-quit t)
2461 (signal 'quit nil))))
2462 2415
2463;;; Prevent unnecessary font-lock while isearching! 2416;;; Prevent unnecessary font-lock while isearching!
2464(defvar isearch-was-font-locking nil) 2417(defvar isearch-was-font-locking nil)
@@ -3472,9 +3425,9 @@ by pops to non-distinctive yanks. Bug..."
3472 (interactive) 3425 (interactive)
3473 (if (not allout-file-xref-bullet) 3426 (if (not allout-file-xref-bullet)
3474 (error 3427 (error
3475 "outline cross references disabled - no `allout-file-xref-bullet'") 3428 "Outline cross references disabled - no `allout-file-xref-bullet'")
3476 (if (not (string= (allout-current-bullet) allout-file-xref-bullet)) 3429 (if (not (string= (allout-current-bullet) allout-file-xref-bullet))
3477 (error "current heading lacks cross-reference bullet `%s'" 3430 (error "Current heading lacks cross-reference bullet `%s'"
3478 allout-file-xref-bullet) 3431 allout-file-xref-bullet)
3479 (let (file-name) 3432 (let (file-name)
3480 (save-excursion 3433 (save-excursion
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 2cf578a9891..a99ad64e715 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -131,7 +131,7 @@
131 (make-temp-name 131 (make-temp-name
132 (expand-file-name (if (eq system-type 'ms-dos) "ar" "archive.tmp") 132 (expand-file-name (if (eq system-type 'ms-dos) "ar" "archive.tmp")
133 temporary-file-directory)) 133 temporary-file-directory))
134 "Directory for temporary files made by arc-mode.el." 134 "Directory for temporary files made by `arc-mode.el'."
135 :type 'directory 135 :type 'directory
136 :group 'archive) 136 :group 'archive)
137 137
@@ -481,9 +481,9 @@ Each descriptor is a vector of the form
481 (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix))) 481 (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix)))
482 482
483(defun archive-l-e (str &optional len) 483(defun archive-l-e (str &optional len)
484 "Convert little endian string/vector to integer. 484 "Convert little endian string/vector STR to integer.
485Alternatively, first argument may be a buffer position in the current buffer 485Alternatively, STR may be a buffer position in the current buffer
486in which case a second argument, length, should be supplied." 486in which case a second argument, length LEN, should be supplied."
487 (if (stringp str) 487 (if (stringp str)
488 (setq len (length str)) 488 (setq len (length str))
489 (setq str (buffer-substring str (+ str len)))) 489 (setq str (buffer-substring str (+ str len))))
@@ -584,7 +584,7 @@ the mode is invalid. If ERROR is nil then nil will be returned."
584 (format "%02d:%02d:%02d" hour minute second))) 584 (format "%02d:%02d:%02d" hour minute second)))
585 585
586(defun archive-unixdate (low high) 586(defun archive-unixdate (low high)
587 "Stringify unix (LOW HIGH) date." 587 "Stringify Unix (LOW HIGH) date."
588 (let ((str (current-time-string (cons high low)))) 588 (let ((str (current-time-string (cons high low))))
589 (format "%s-%s-%s" 589 (format "%s-%s-%s"
590 (substring str 8 10) 590 (substring str 8 10)
@@ -592,7 +592,7 @@ the mode is invalid. If ERROR is nil then nil will be returned."
592 (substring str 20 24)))) 592 (substring str 20 24))))
593 593
594(defun archive-unixtime (low high) 594(defun archive-unixtime (low high)
595 "Stringify unix (LOW HIGH) time." 595 "Stringify Unix (LOW HIGH) time."
596 (let ((str (current-time-string (cons high low)))) 596 (let ((str (current-time-string (cons high low))))
597 (substring str 11 19))) 597 (substring str 11 19)))
598 598
@@ -604,7 +604,7 @@ the mode is invalid. If ERROR is nil then nil will be returned."
604 604
605(defun archive-get-descr (&optional noerror) 605(defun archive-get-descr (&optional noerror)
606 "Return the descriptor vector for file at point. 606 "Return the descriptor vector for file at point.
607Does not signal an error if optional second argument NOERROR is non-nil." 607Does not signal an error if optional argument NOERROR is non-nil."
608 (let ((no (archive-get-lineno))) 608 (let ((no (archive-get-lineno)))
609 (if (and (>= (point) archive-file-list-start) 609 (if (and (>= (point) archive-file-list-start)
610 (< no (length archive-files))) 610 (< no (length archive-files)))
@@ -783,7 +783,7 @@ when parsing the archive."
783 783
784(defun archive-alternate-display () 784(defun archive-alternate-display ()
785 "Toggle alternative display. 785 "Toggle alternative display.
786To avoid very long lines some archive mode don't show all information. 786To avoid very long lines archive mode does not show all information.
787This function changes the set of information shown for each files." 787This function changes the set of information shown for each files."
788 (interactive) 788 (interactive)
789 (setq archive-alternate-display (not archive-alternate-display)) 789 (setq archive-alternate-display (not archive-alternate-display))
@@ -1184,13 +1184,13 @@ With a prefix argument, mark that many files."
1184 "In archive mode, un-mark this member if it is marked to be deleted. 1184 "In archive mode, un-mark this member if it is marked to be deleted.
1185With a prefix argument, un-mark that many files forward." 1185With a prefix argument, un-mark that many files forward."
1186 (interactive "p") 1186 (interactive "p")
1187 (archive-flag-deleted p ? )) 1187 (archive-flag-deleted p ?\s))
1188 1188
1189(defun archive-unflag-backwards (p) 1189(defun archive-unflag-backwards (p)
1190 "In archive mode, un-mark this member if it is marked to be deleted. 1190 "In archive mode, un-mark this member if it is marked to be deleted.
1191With a prefix argument, un-mark that many members backward." 1191With a prefix argument, un-mark that many members backward."
1192 (interactive "p") 1192 (interactive "p")
1193 (archive-flag-deleted (- p) ? )) 1193 (archive-flag-deleted (- p) ?\s))
1194 1194
1195(defun archive-unmark-all-files () 1195(defun archive-unmark-all-files ()
1196 "Remove all marks." 1196 "Remove all marks."
@@ -1200,8 +1200,8 @@ With a prefix argument, un-mark that many members backward."
1200 (save-excursion 1200 (save-excursion
1201 (goto-char archive-file-list-start) 1201 (goto-char archive-file-list-start)
1202 (while (< (point) archive-file-list-end) 1202 (while (< (point) archive-file-list-end)
1203 (or (= (following-char) ? ) 1203 (or (= (following-char) ?\s)
1204 (progn (delete-char 1) (insert ? ))) 1204 (progn (delete-char 1) (insert ?\s)))
1205 (forward-line 1))) 1205 (forward-line 1)))
1206 (restore-buffer-modified-p modified))) 1206 (restore-buffer-modified-p modified)))
1207 1207
@@ -1239,7 +1239,7 @@ Use \\[archive-unmark-all-files] to remove all marks."
1239(defun archive-chmod-entry (new-mode) 1239(defun archive-chmod-entry (new-mode)
1240 "Change the protection bits associated with all marked or this member. 1240 "Change the protection bits associated with all marked or this member.
1241The new protection bits can either be specified as an octal number or 1241The new protection bits can either be specified as an octal number or
1242as a relative change like \"g+rw\" as for chmod(2)" 1242as a relative change like \"g+rw\" as for chmod(2)."
1243 (interactive "sNew mode (octal or relative): ") 1243 (interactive "sNew mode (octal or relative): ")
1244 (if archive-read-only (error "Archive is read-only")) 1244 (if archive-read-only (error "Archive is read-only"))
1245 (let ((func (archive-name "chmod-entry"))) 1245 (let ((func (archive-name "chmod-entry")))
diff --git a/lisp/array.el b/lisp/array.el
index 836ba99ff6d..819840c8a1a 100644
--- a/lisp/array.el
+++ b/lisp/array.el
@@ -638,7 +638,7 @@ If optional ARG is given, copy through ARG rows up."
638 "Reconfigure the state of `array-rows-numbered' and `array-columns-per-line'. 638 "Reconfigure the state of `array-rows-numbered' and `array-columns-per-line'.
639NEW-COLUMNS-PER-LINE is the desired value of `array-columns-per-line' and 639NEW-COLUMNS-PER-LINE is the desired value of `array-columns-per-line' and
640NEW-ROWS-NUMBERED (a character, either ?y or ?n) is the desired value 640NEW-ROWS-NUMBERED (a character, either ?y or ?n) is the desired value
641of array-rows-numbered." 641of `array-rows-numbered'."
642 (interactive "nColumns per line: \ncRows numbered? (y or n) ") 642 (interactive "nColumns per line: \ncRows numbered? (y or n) ")
643 ;; Check on new-columns-per-line 643 ;; Check on new-columns-per-line
644 (let ((check t)) 644 (let ((check t))
@@ -717,7 +717,7 @@ of array-rows-numbered."
717 (let ((inhibit-quit t)) 717 (let ((inhibit-quit t))
718 (set-buffer main-buffer) 718 (set-buffer main-buffer)
719 (erase-buffer) 719 (erase-buffer)
720 (insert-buffer temp-buffer) 720 (insert-buffer-substring temp-buffer)
721 ;; Update local variables. 721 ;; Update local variables.
722 (setq array-columns-per-line new-columns-per-line) 722 (setq array-columns-per-line new-columns-per-line)
723 (setq array-rows-numbered new-rows-numbered) 723 (setq array-rows-numbered new-rows-numbered)
@@ -767,7 +767,7 @@ Return COLUMN."
767 (move-to-column column))))) 767 (move-to-column column)))))
768 768
769(defun untabify-backward () 769(defun untabify-backward ()
770 "Untabify the preceding tab." 770 "Untabify the preceding TAB."
771 (save-excursion 771 (save-excursion
772 (let ((start (point))) 772 (let ((start (point)))
773 (backward-char 1) 773 (backward-char 1)
@@ -817,7 +817,7 @@ NOT recognized as integers or real numbers.
817 The array MUST reside at the top of the buffer. 817 The array MUST reside at the top of the buffer.
818 818
819 TABs are not respected, and may be converted into spaces at any time. 819 TABs are not respected, and may be converted into spaces at any time.
820Setting the variable 'array-respect-tabs to non-nil will prevent TAB conversion, 820Setting the variable `array-respect-tabs' to non-nil will prevent TAB conversion,
821but will cause many functions to give errors if they encounter one. 821but will cause many functions to give errors if they encounter one.
822 822
823 Upon entering array mode, you will be prompted for the values of 823 Upon entering array mode, you will be prompted for the values of
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 7f10e7f3c1f..59188b6ae92 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -305,7 +305,7 @@ For more information, see the function `buffer-menu'."
305 305
306(defun Buffer-menu-unmark (&optional backup) 306(defun Buffer-menu-unmark (&optional backup)
307 "Cancel all requested operations on buffer on this line and move down. 307 "Cancel all requested operations on buffer on this line and move down.
308Optional ARG means move up." 308Optional prefix arg means move up."
309 (interactive "P") 309 (interactive "P")
310 (when (Buffer-menu-no-header) 310 (when (Buffer-menu-no-header)
311 (let* ((buf (Buffer-menu-buffer t)) 311 (let* ((buf (Buffer-menu-buffer t))
@@ -369,10 +369,10 @@ and then move up one line. Prefix arg means move that many lines."
369 (save-excursion 369 (save-excursion
370 (beginning-of-line) 370 (beginning-of-line)
371 (forward-char 2) 371 (forward-char 2)
372 (if (= (char-after) (if arg ? ?*)) 372 (if (= (char-after) (if arg ?\s ?*))
373 (let ((buffer-read-only nil)) 373 (let ((buffer-read-only nil))
374 (delete-char 1) 374 (delete-char 1)
375 (insert (if arg ?* ? )))))) 375 (insert (if arg ?* ?\s))))))
376 376
377(defun Buffer-menu-beginning () 377(defun Buffer-menu-beginning ()
378 (goto-char (point-min)) 378 (goto-char (point-min))
@@ -392,7 +392,7 @@ and then move up one line. Prefix arg means move that many lines."
392 (setq modp (buffer-modified-p))) 392 (setq modp (buffer-modified-p)))
393 (let ((buffer-read-only nil)) 393 (let ((buffer-read-only nil))
394 (delete-char -1) 394 (delete-char -1)
395 (insert (if modp ?* ? )))))) 395 (insert (if modp ?* ?\s))))))
396 (save-excursion 396 (save-excursion
397 (Buffer-menu-beginning) 397 (Buffer-menu-beginning)
398 (let ((buff-menu-buffer (current-buffer)) 398 (let ((buff-menu-buffer (current-buffer))
@@ -405,7 +405,7 @@ and then move up one line. Prefix arg means move that many lines."
405 (save-excursion (kill-buffer buf))) 405 (save-excursion (kill-buffer buf)))
406 (if (and buf (buffer-name buf)) 406 (if (and buf (buffer-name buf))
407 (progn (delete-char 1) 407 (progn (delete-char 1)
408 (insert ? )) 408 (insert ?\s))
409 (delete-region (point) (progn (forward-line 1) (point))) 409 (delete-region (point) (progn (forward-line 1) (point)))
410 (unless (bobp) 410 (unless (bobp)
411 (forward-char -1)))))))) 411 (forward-char -1))))))))
@@ -425,7 +425,7 @@ in the selected frame."
425 (setq tem (Buffer-menu-buffer t)) 425 (setq tem (Buffer-menu-buffer t))
426 (let ((buffer-read-only nil)) 426 (let ((buffer-read-only nil))
427 (delete-char -1) 427 (delete-char -1)
428 (insert ?\ )) 428 (insert ?\s))
429 (or (eq tem buff) (memq tem others) (setq others (cons tem others)))) 429 (or (eq tem buff) (memq tem others) (setq others (cons tem others))))
430 (setq others (nreverse others) 430 (setq others (nreverse others)
431 tem (/ (1- (frame-height)) (1+ (length others)))) 431 tem (/ (1- (frame-height)) (1+ (length others))))
@@ -521,7 +521,7 @@ The current window remains selected."
521 (save-excursion 521 (save-excursion
522 (set-buffer (Buffer-menu-buffer t)) 522 (set-buffer (Buffer-menu-buffer t))
523 (vc-toggle-read-only) 523 (vc-toggle-read-only)
524 (setq char (if buffer-read-only ?% ? ))) 524 (setq char (if buffer-read-only ?% ?\s)))
525 (save-excursion 525 (save-excursion
526 (beginning-of-line) 526 (beginning-of-line)
527 (forward-char 1) 527 (forward-char 1)
@@ -594,7 +594,7 @@ For more information, see the function `buffer-menu'."
594 (make-string (- Buffer-menu-buffer+size-width 594 (make-string (- Buffer-menu-buffer+size-width
595 (length name) 595 (length name)
596 (length size)) 596 (length size))
597 ? ) 597 ?\s)
598 size)) 598 size))
599 599
600(defun Buffer-menu-sort (column) 600(defun Buffer-menu-sort (column)
@@ -677,7 +677,7 @@ it means list those buffers and no others.
677For more information, see the function `buffer-menu'." 677For more information, see the function `buffer-menu'."
678 (let* ((old-buffer (current-buffer)) 678 (let* ((old-buffer (current-buffer))
679 (standard-output standard-output) 679 (standard-output standard-output)
680 (mode-end (make-string (- Buffer-menu-mode-width 2) ? )) 680 (mode-end (make-string (- Buffer-menu-mode-width 2) ?\s))
681 (header (concat "CRM " 681 (header (concat "CRM "
682 (Buffer-menu-buffer+size 682 (Buffer-menu-buffer+size
683 (Buffer-menu-make-sort-button "Buffer" 2) 683 (Buffer-menu-make-sort-button "Buffer" 2)
@@ -712,7 +712,7 @@ For more information, see the function `buffer-menu'."
712 (insert header 712 (insert header
713 (apply 'string 713 (apply 'string
714 (mapcar (lambda (c) 714 (mapcar (lambda (c)
715 (if (memq c '(?\n ?\ )) c underline)) 715 (if (memq c '(?\n ?\s)) c underline))
716 header))))) 716 header)))))
717 ;; Collect info for every buffer we're interested in. 717 ;; Collect info for every buffer we're interested in.
718 (dolist (buffer (or buffer-list (buffer-list))) 718 (dolist (buffer (or buffer-list (buffer-list)))
@@ -732,17 +732,17 @@ For more information, see the function `buffer-menu'."
732 (format-mode-line mode-line-process 732 (format-mode-line mode-line-process
733 nil nil buffer)))) 733 nil nil buffer))))
734 (bits (string 734 (bits (string
735 (if (eq buffer old-buffer) ?. ?\ ) 735 (if (eq buffer old-buffer) ?. ?\s)
736 ;; Handle readonly status. The output buffer 736 ;; Handle readonly status. The output buffer
737 ;; is special cased to appear readonly; it is 737 ;; is special cased to appear readonly; it is
738 ;; actually made so at a later date. 738 ;; actually made so at a later date.
739 (if (or (eq buffer standard-output) 739 (if (or (eq buffer standard-output)
740 buffer-read-only) 740 buffer-read-only)
741 ?% ?\ ) 741 ?% ?\s)
742 ;; Identify modified buffers. 742 ;; Identify modified buffers.
743 (if (buffer-modified-p) ?* ?\ ) 743 (if (buffer-modified-p) ?* ?\s)
744 ;; Space separator. 744 ;; Space separator.
745 ?\ ))) 745 ?\s)))
746 (unless file 746 (unless file
747 ;; No visited file. Check local value of 747 ;; No visited file. Check local value of
748 ;; list-buffers-directory. 748 ;; list-buffers-directory.
diff --git a/lisp/calc/README b/lisp/calc/README
index a307b711f1e..97f2a29f6ce 100644
--- a/lisp/calc/README
+++ b/lisp/calc/README
@@ -2,7 +2,8 @@
2This directory contains Calc, an advanced desk calculator for GNU 2This directory contains Calc, an advanced desk calculator for GNU
3Emacs. 3Emacs.
4 4
5"Calc" Copyright 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 5"Calc" Copyright 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
6 2005 Free Software Foundation, Inc.
6 7
7Written by: 8Written by:
8 Dave Gillespie 9 Dave Gillespie
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index 8af03c4d206..6919527751b 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -1,6 +1,7 @@
1;;; calc-aent.el --- algebraic entry functions for Calc 1;;; calc-aent.el --- algebraic entry functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: Dave Gillespie <daveg@synaptics.com> 6;; Author: Dave Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index 45d66231835..ada18830988 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -1,6 +1,7 @@
1;;; calc-alg.el --- algebraic functions for Calc 1;;; calc-alg.el --- algebraic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el
index bba7a8fe942..25ccfc48019 100644
--- a/lisp/calc/calc-arith.el
+++ b/lisp/calc/calc-arith.el
@@ -1,6 +1,7 @@
1;;; calc-arith.el --- arithmetic functions for Calc 1;;; calc-arith.el --- arithmetic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el
index 445f9d28531..376c049e93e 100644
--- a/lisp/calc/calc-bin.el
+++ b/lisp/calc/calc-bin.el
@@ -1,6 +1,7 @@
1;;; calc-bin.el --- binary functions for Calc 1;;; calc-bin.el --- binary functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el
index b4b397c43f6..5105148a60f 100644
--- a/lisp/calc/calc-comb.el
+++ b/lisp/calc/calc-comb.el
@@ -1,6 +1,7 @@
1;;; calc-comb.el --- combinatoric functions for Calc 1;;; calc-comb.el --- combinatoric functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el
index 32d8a07ffc0..cf9054343d4 100644
--- a/lisp/calc/calc-cplx.el
+++ b/lisp/calc/calc-cplx.el
@@ -1,6 +1,7 @@
1;;; calc-cplx.el --- Complex number functions for Calc 1;;; calc-cplx.el --- Complex number functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index 0a7696c9311..4127c0b33da 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -1,6 +1,7 @@
1;;; calc-embed.el --- embed Calc in a buffer 1;;; calc-embed.el --- embed Calc in a buffer
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 0b177b06dc4..db370f766d9 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -1,6 +1,7 @@
1;;; calc-ext.el --- various extension functions for Calc 1;;; calc-ext.el --- various extension functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el
index c65e8341394..b15f7c254d1 100644
--- a/lisp/calc/calc-fin.el
+++ b/lisp/calc/calc-fin.el
@@ -1,6 +1,7 @@
1;;; calc-fin.el --- financial functions for Calc 1;;; calc-fin.el --- financial functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index ad2ef9dbbff..3a192e3f0be 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -1,7 +1,7 @@
1;;; calc-forms.el --- data format conversion functions for Calc 1;;; calc-forms.el --- data format conversion functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; Free Software Foundation, Inc. 4;; 2005 Free Software Foundation, Inc.
5 5
6;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
7;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el
index 87ee59440c3..bf3850b72b9 100644
--- a/lisp/calc/calc-frac.el
+++ b/lisp/calc/calc-frac.el
@@ -1,6 +1,7 @@
1;;; calc-frac.el --- fraction functions for Calc 1;;; calc-frac.el --- fraction functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el
index 7ae9f524c90..9d491a2c540 100644
--- a/lisp/calc/calc-funcs.el
+++ b/lisp/calc/calc-funcs.el
@@ -1,6 +1,7 @@
1;;; calc-funcs.el --- well-known functions for Calc 1;;; calc-funcs.el --- well-known functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 113cdcd33bc..31d45c50a70 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -1,6 +1,7 @@
1;;; calc-graph.el --- graph output functions for Calc 1;;; calc-graph.el --- graph output functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 84176b36eea..2d79fd36f6c 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -1,7 +1,7 @@
1;;; calc-help.el --- help display functions for Calc, 1;;; calc-help.el --- help display functions for Calc,
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; Free Software Foundation, Inc. 4;; 2005 Free Software Foundation, Inc.
5 5
6;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
7;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el
index 3fdec5a4b06..50d6f16f7bd 100644
--- a/lisp/calc/calc-incom.el
+++ b/lisp/calc/calc-incom.el
@@ -1,6 +1,7 @@
1;;; calc-incom.el --- complex data type input functions for Calc 1;;; calc-incom.el --- complex data type input functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el
index ad1e4664661..f3034bdd4b3 100644
--- a/lisp/calc/calc-keypd.el
+++ b/lisp/calc/calc-keypd.el
@@ -1,6 +1,7 @@
1;;; calc-keypd.el --- mouse-capable keypad input for Calc 1;;; calc-keypd.el --- mouse-capable keypad input for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el
index 67cc5270942..e0099ee4e07 100644
--- a/lisp/calc/calc-lang.el
+++ b/lisp/calc/calc-lang.el
@@ -1,6 +1,7 @@
1;;; calc-lang.el --- calc language functions 1;;; calc-lang.el --- calc language functions
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el
index 1004a8f1f56..352ffafe389 100644
--- a/lisp/calc/calc-macs.el
+++ b/lisp/calc/calc-macs.el
@@ -1,6 +1,7 @@
1;;; calc-macs.el --- important macros for Calc 1;;; calc-macs.el --- important macros for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el
index e636dd565fa..da9b91243ae 100644
--- a/lisp/calc/calc-map.el
+++ b/lisp/calc/calc-map.el
@@ -1,6 +1,7 @@
1;;; calc-map.el --- higher-order functions for Calc 1;;; calc-map.el --- higher-order functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el
index bd939e1669c..53d80350834 100644
--- a/lisp/calc/calc-math.el
+++ b/lisp/calc/calc-math.el
@@ -1,6 +1,7 @@
1;;; calc-math.el --- mathematical functions for Calc 1;;; calc-math.el --- mathematical functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 643465f8478..e8c0ea4b658 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -1,6 +1,7 @@
1;;; calc-misc.el --- miscellaneous functions for Calc 1;;; calc-misc.el --- miscellaneous functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index e0e2ccbd717..5e627203049 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -1,6 +1,7 @@
1;;; calc-mode.el --- calculator modes for Calc 1;;; calc-mode.el --- calculator modes for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el
index ea79c98252e..0b18927a7f1 100644
--- a/lisp/calc/calc-mtx.el
+++ b/lisp/calc/calc-mtx.el
@@ -1,6 +1,7 @@
1;;; calc-mtx.el --- matrix functions for Calc 1;;; calc-mtx.el --- matrix functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 89d8273d6d6..3dd19b6f67a 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -1,6 +1,7 @@
1;;; calc-poly.el --- polynomial functions for Calc 1;;; calc-poly.el --- polynomial functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 8d2fba7fef0..b44d8d256a5 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -1,6 +1,7 @@
1;;; calc-prog.el --- user programmability functions for Calc 1;;; calc-prog.el --- user programmability functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el
index 2afb16b7535..5c08bd4baf6 100644
--- a/lisp/calc/calc-rewr.el
+++ b/lisp/calc/calc-rewr.el
@@ -1,6 +1,7 @@
1;;; calc-rewr.el --- rewriting functions for Calc 1;;; calc-rewr.el --- rewriting functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el
index 14fb59ce376..a3a07b04563 100644
--- a/lisp/calc/calc-rules.el
+++ b/lisp/calc/calc-rules.el
@@ -1,6 +1,7 @@
1;;; calc-rules.el --- rules for simplifying algebraic expressions in Calc 1;;; calc-rules.el --- rules for simplifying algebraic expressions in Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el
index 04cb2bee2bd..87767a12244 100644
--- a/lisp/calc/calc-sel.el
+++ b/lisp/calc/calc-sel.el
@@ -1,7 +1,7 @@
1;;; calc-sel.el --- data selection functions for Calc 1;;; calc-sel.el --- data selection functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; Free Software Foundation, Inc. 4;; 2005 Free Software Foundation, Inc.
5 5
6;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
7;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el
index c1b8ebc307c..9db057d30d1 100644
--- a/lisp/calc/calc-stat.el
+++ b/lisp/calc/calc-stat.el
@@ -1,6 +1,7 @@
1;;; calc-stat.el --- statistical functions for Calc 1;;; calc-stat.el --- statistical functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index 35db6d71019..1410b7d6651 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -1,6 +1,7 @@
1;;; calc-store.el --- value storage functions for Calc 1;;; calc-store.el --- value storage functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el
index 0564e39ed57..635dcf95036 100644
--- a/lisp/calc/calc-stuff.el
+++ b/lisp/calc/calc-stuff.el
@@ -1,6 +1,7 @@
1;;; calc-stuff.el --- miscellaneous functions for Calc 1;;; calc-stuff.el --- miscellaneous functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el
index e86117585ff..d5bba8dbb92 100644
--- a/lisp/calc/calc-trail.el
+++ b/lisp/calc/calc-trail.el
@@ -1,6 +1,7 @@
1;;; calc-trail.el --- functions for manipulating the Calc "trail" 1;;; calc-trail.el --- functions for manipulating the Calc "trail"
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el
index 1837fe071f6..e52ab015f26 100644
--- a/lisp/calc/calc-undo.el
+++ b/lisp/calc/calc-undo.el
@@ -1,6 +1,7 @@
1;;; calc-undo.el --- undo functions for Calc 1;;; calc-undo.el --- undo functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 3857d930902..7d42fd9ca9a 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -1,6 +1,7 @@
1;;; calc-units.el --- unit conversion functions for Calc 1;;; calc-units.el --- unit conversion functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el
index 1153eabed57..a830887a652 100644
--- a/lisp/calc/calc-vec.el
+++ b/lisp/calc/calc-vec.el
@@ -1,6 +1,7 @@
1;;; calc-vec.el --- vector functions for Calc 1;;; calc-vec.el --- vector functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index 1544e8956c1..628b1fef1c0 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -1,6 +1,7 @@
1;;; calc-yank.el --- kill-ring functionality for Calc 1;;; calc-yank.el --- kill-ring functionality for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 1dc4e94adb2..c53e7971956 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1,12 +1,12 @@
1;;; calc.el --- the GNU Emacs calculator 1;;; calc.el --- the GNU Emacs calculator
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; Free Software Foundation, Inc. 4;; 2005 Free Software Foundation, Inc.
5 5
6;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
7;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
8;; Keywords: convenience, extensions 8;; Keywords: convenience, extensions
9;; Version: 2.02g 9;; Version: 2.1
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el
index d139dcf28ba..a534e4fd459 100644
--- a/lisp/calc/calcalg2.el
+++ b/lisp/calc/calcalg2.el
@@ -1,6 +1,7 @@
1;;; calcalg2.el --- more algebraic functions for Calc 1;;; calcalg2.el --- more algebraic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el
index 3fff729a012..0aef3ba55af 100644
--- a/lisp/calc/calcalg3.el
+++ b/lisp/calc/calcalg3.el
@@ -1,6 +1,7 @@
1;;; calcalg3.el --- more algebraic functions for Calc 1;;; calcalg3.el --- more algebraic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el
index 70ceb01da64..aab079ed739 100644
--- a/lisp/calc/calccomp.el
+++ b/lisp/calc/calccomp.el
@@ -1,6 +1,7 @@
1;;; calccomp.el --- composition functions for Calc 1;;; calccomp.el --- composition functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el
index 2a322b8b74b..6734065a701 100644
--- a/lisp/calc/calcsel2.el
+++ b/lisp/calc/calcsel2.el
@@ -1,6 +1,7 @@
1;;; calcsel2.el --- selection functions for Calc 1;;; calcsel2.el --- selection functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc.
4 5
5;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 7;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 923d4022098..4210fad2ec9 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Eli Barzilay <eli@barzilay.org> 5;; Author: Eli Barzilay <eli@barzilay.org>
6;; Keywords: tools, convenience 6;; Keywords: tools, convenience
7;; Time-stamp: <26 May 2005, 14:32:34, Lute Kamstra, pijl> 7;; Time-stamp: <2005-07-18 17:45:34 juri>
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
10 10
@@ -1277,12 +1277,6 @@ arguments."
1277 (if Dbound (fset 'D Dsave) (fmakunbound 'D))))) 1277 (if Dbound (fset 'D Dsave) (fmakunbound 'D)))))
1278 (error 0))) 1278 (error 0)))
1279 1279
1280(eval-when-compile ; silence the compiler
1281 (or (fboundp 'event-key)
1282 (defun event-key (&rest _) nil))
1283 (or (fboundp 'key-press-event-p)
1284 (defun key-press-event-p (&rest _) nil)))
1285
1286;;;--------------------------------------------------------------------- 1280;;;---------------------------------------------------------------------
1287;;; Input interaction 1281;;; Input interaction
1288 1282
@@ -1301,8 +1295,9 @@ Optional string argument KEYS will force using it as the keys entered."
1301 (setq k (aref inp i)) 1295 (setq k (aref inp i))
1302 ;; if Emacs will someday have a event-key, then this would 1296 ;; if Emacs will someday have a event-key, then this would
1303 ;; probably be modified anyway 1297 ;; probably be modified anyway
1304 (and (fboundp 'event-key) (key-press-event-p k) 1298 (and (if (fboundp 'key-press-event-p) (key-press-event-p k))
1305 (event-key k) (setq k (event-key k))) 1299 (if (fboundp 'event-key)
1300 (and (event-key k) (setq k (event-key k)))))
1306 ;; assume all symbols are translatable with an ascii-character 1301 ;; assume all symbols are translatable with an ascii-character
1307 (and (symbolp k) 1302 (and (symbolp k)
1308 (setq k (or (get k 'ascii-character) ? ))) 1303 (setq k (or (get k 'ascii-character) ? )))
@@ -1599,7 +1594,7 @@ Optional string argument KEYS will force using it as the keys entered."
1599 (calculator-displayers 1594 (calculator-displayers
1600 (if calculator-copy-displayer nil calculator-displayers))) 1595 (if calculator-copy-displayer nil calculator-displayers)))
1601 (calculator-enter) 1596 (calculator-enter)
1602 ;; remove trailing spaces and and an index 1597 ;; remove trailing spaces and an index
1603 (let ((s (cdr calculator-stack-display))) 1598 (let ((s (cdr calculator-stack-display)))
1604 (and s 1599 (and s
1605 (if (string-match "^\\([^ ]+\\) *\\(\\[[0-9/]+\\]\\)? *$" s) 1600 (if (string-match "^\\([^ ]+\\) *\\(\\[[0-9/]+\\]\\)? *$" s)
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 8fe92fc0810..ada15878f13 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1818,7 +1818,7 @@ Driven by the variable `calendar-date-display-form'.")
1818 t) 1818 t)
1819 1819
1820(autoload 'calendar-goto-hebrew-date "cal-hebrew" 1820(autoload 'calendar-goto-hebrew-date "cal-hebrew"
1821 "Move cursor to Hebrew date date." 1821 "Move cursor to Hebrew date."
1822 t) 1822 t)
1823 1823
1824(autoload 'calendar-print-hebrew-date "cal-hebrew" 1824(autoload 'calendar-print-hebrew-date "cal-hebrew"
@@ -1830,7 +1830,7 @@ Driven by the variable `calendar-date-display-form'.")
1830 t) 1830 t)
1831 1831
1832(autoload 'calendar-goto-coptic-date "cal-coptic" 1832(autoload 'calendar-goto-coptic-date "cal-coptic"
1833 "Move cursor to Coptic date date." 1833 "Move cursor to Coptic date."
1834 t) 1834 t)
1835 1835
1836(autoload 'calendar-print-coptic-date "cal-coptic" 1836(autoload 'calendar-print-coptic-date "cal-coptic"
@@ -1842,7 +1842,7 @@ Driven by the variable `calendar-date-display-form'.")
1842 t) 1842 t)
1843 1843
1844(autoload 'calendar-goto-ethiopic-date "cal-coptic" 1844(autoload 'calendar-goto-ethiopic-date "cal-coptic"
1845 "Move cursor to Ethiopic date date." 1845 "Move cursor to Ethiopic date."
1846 t) 1846 t)
1847 1847
1848(autoload 'calendar-print-ethiopic-date "cal-coptic" 1848(autoload 'calendar-print-ethiopic-date "cal-coptic"
@@ -1854,7 +1854,7 @@ Driven by the variable `calendar-date-display-form'.")
1854 t) 1854 t)
1855 1855
1856(autoload 'calendar-goto-persian-date "cal-persia" 1856(autoload 'calendar-goto-persian-date "cal-persia"
1857 "Move cursor to Persian date date." 1857 "Move cursor to Persian date."
1858 t) 1858 t)
1859 1859
1860(autoload 'calendar-print-persian-date "cal-persia" 1860(autoload 'calendar-print-persian-date "cal-persia"
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index aa33ac598e1..7e9e44210ef 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -189,7 +189,8 @@ buffer."
189 (save-current-buffer 189 (save-current-buffer
190 (set-buffer unfolded-buffer) 190 (set-buffer unfolded-buffer)
191 (erase-buffer) 191 (erase-buffer)
192 (insert-buffer folded-ical-buffer) 192 (insert-buffer-substring folded-ical-buffer)
193 (goto-char (point-min))
193 (while (re-search-forward "\r?\n[ \t]" nil t) 194 (while (re-search-forward "\r?\n[ \t]" nil t)
194 (replace-match "" nil nil))) 195 (replace-match "" nil nil)))
195 unfolded-buffer)) 196 unfolded-buffer))
diff --git a/lisp/comint.el b/lisp/comint.el
index 99ea2c44436..ab0d41d6735 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -411,17 +411,15 @@ See `comint-send-input'."
411 "*If non-nil, use `comint-prompt-regexp' to recognize prompts. 411 "*If non-nil, use `comint-prompt-regexp' to recognize prompts.
412If nil, then program output and user-input are given different `field' 412If nil, then program output and user-input are given different `field'
413properties, which Emacs commands can use to distinguish them (in 413properties, which Emacs commands can use to distinguish them (in
414particular, common movement commands such as begining-of-line respect 414particular, common movement commands such as `beginning-of-line'
415field boundaries in a natural way)." 415respect field boundaries in a natural way)."
416 :type 'boolean 416 :type 'boolean
417 :group 'comint) 417 :group 'comint)
418 418
419;; Autoload is necessary for Custom to recognize old alias. 419;; Autoload is necessary for Custom to recognize old alias.
420;;;###autoload 420;;;###autoload
421(defvaralias 'comint-use-prompt-regexp-instead-of-fields 421(define-obsolete-variable-alias 'comint-use-prompt-regexp-instead-of-fields
422 'comint-use-prompt-regexp) 422 'comint-use-prompt-regexp "22.1")
423(make-obsolete-variable 'comint-use-prompt-regexp-instead-of-fields
424 'comint-use-prompt-regexp "22.1")
425 423
426(defcustom comint-mode-hook nil 424(defcustom comint-mode-hook nil
427 "Hook run upon entry to `comint-mode'. 425 "Hook run upon entry to `comint-mode'.
@@ -1079,14 +1077,14 @@ Moves relative to START, or `comint-input-ring-index'."
1079 (if (string-match regexp (ring-ref comint-input-ring n)) 1077 (if (string-match regexp (ring-ref comint-input-ring n))
1080 n))) 1078 n)))
1081 1079
1082(defun comint-previous-matching-input (regexp arg) 1080(defun comint-previous-matching-input (regexp n)
1083 "Search backwards through input history for match for REGEXP. 1081 "Search backwards through input history for match for REGEXP.
1084\(Previous history elements are earlier commands.) 1082\(Previous history elements are earlier commands.)
1085With prefix argument N, search for Nth previous match. 1083With prefix argument N, search for Nth previous match.
1086If N is negative, find the next or Nth next match." 1084If N is negative, find the next or Nth next match."
1087 (interactive (comint-regexp-arg "Previous input matching (regexp): ")) 1085 (interactive (comint-regexp-arg "Previous input matching (regexp): "))
1088 (setq arg (comint-search-arg arg)) 1086 (setq n (comint-search-arg n))
1089 (let ((pos (comint-previous-matching-input-string-position regexp arg))) 1087 (let ((pos (comint-previous-matching-input-string-position regexp n)))
1090 ;; Has a match been found? 1088 ;; Has a match been found?
1091 (if (null pos) 1089 (if (null pos)
1092 (error "Not found") 1090 (error "Not found")
@@ -1099,15 +1097,15 @@ If N is negative, find the next or Nth next match."
1099 (point)) 1097 (point))
1100 (insert (ring-ref comint-input-ring pos))))) 1098 (insert (ring-ref comint-input-ring pos)))))
1101 1099
1102(defun comint-next-matching-input (regexp arg) 1100(defun comint-next-matching-input (regexp n)
1103 "Search forwards through input history for match for REGEXP. 1101 "Search forwards through input history for match for REGEXP.
1104\(Later history elements are more recent commands.) 1102\(Later history elements are more recent commands.)
1105With prefix argument N, search for Nth following match. 1103With prefix argument N, search for Nth following match.
1106If N is negative, find the previous or Nth previous match." 1104If N is negative, find the previous or Nth previous match."
1107 (interactive (comint-regexp-arg "Next input matching (regexp): ")) 1105 (interactive (comint-regexp-arg "Next input matching (regexp): "))
1108 (comint-previous-matching-input regexp (- arg))) 1106 (comint-previous-matching-input regexp (- n)))
1109 1107
1110(defun comint-previous-matching-input-from-input (arg) 1108(defun comint-previous-matching-input-from-input (n)
1111 "Search backwards through input history for match for current input. 1109 "Search backwards through input history for match for current input.
1112\(Previous history elements are earlier commands.) 1110\(Previous history elements are earlier commands.)
1113With prefix argument N, search for Nth previous match. 1111With prefix argument N, search for Nth previous match.
@@ -1124,15 +1122,15 @@ If N is negative, search forwards for the -Nth following match."
1124 comint-input-ring-index nil)) 1122 comint-input-ring-index nil))
1125 (comint-previous-matching-input 1123 (comint-previous-matching-input
1126 (concat "^" (regexp-quote comint-matching-input-from-input-string)) 1124 (concat "^" (regexp-quote comint-matching-input-from-input-string))
1127 arg)) 1125 n))
1128 1126
1129(defun comint-next-matching-input-from-input (arg) 1127(defun comint-next-matching-input-from-input (n)
1130 "Search forwards through input history for match for current input. 1128 "Search forwards through input history for match for current input.
1131\(Following history elements are more recent commands.) 1129\(Following history elements are more recent commands.)
1132With prefix argument N, search for Nth following match. 1130With prefix argument N, search for Nth following match.
1133If N is negative, search backwards for the -Nth previous match." 1131If N is negative, search backwards for the -Nth previous match."
1134 (interactive "p") 1132 (interactive "p")
1135 (comint-previous-matching-input-from-input (- arg))) 1133 (comint-previous-matching-input-from-input (- n)))
1136 1134
1137 1135
1138(defun comint-replace-by-expanded-history (&optional silent start) 1136(defun comint-replace-by-expanded-history (&optional silent start)
@@ -1434,14 +1432,14 @@ If the interpreter is the csh,
1434 return the current line with any initial string matching the 1432 return the current line with any initial string matching the
1435 regexp `comint-prompt-regexp' removed. 1433 regexp `comint-prompt-regexp' removed.
1436 `comint-input-filter-functions' monitors input for \"cd\", \"pushd\", and 1434 `comint-input-filter-functions' monitors input for \"cd\", \"pushd\", and
1437 \"popd\" commands. When it sees one, it cd's the buffer. 1435 \"popd\" commands. When it sees one, it cd's the buffer.
1438 comint-input-filter is the default: returns t if the input isn't all white 1436 `comint-input-filter' is the default: returns t if the input isn't all white
1439 space. 1437 space.
1440 1438
1441If the Comint is Lucid Common Lisp, 1439If the Comint is Lucid Common Lisp,
1442 comint-get-old-input snarfs the sexp ending at point. 1440 `comint-get-old-input' snarfs the sexp ending at point.
1443 comint-input-filter-functions does nothing. 1441 `comint-input-filter-functions' does nothing.
1444 comint-input-filter returns nil if the input matches input-filter-regexp, 1442 `comint-input-filter' returns nil if the input matches input-filter-regexp,
1445 which matches (1) all whitespace (2) :a, :c, etc. 1443 which matches (1) all whitespace (2) :a, :c, etc.
1446 1444
1447Similarly for Soar, Scheme, etc." 1445Similarly for Soar, Scheme, etc."
@@ -2002,8 +2000,8 @@ Does not delete the prompt."
2002 (delete-region pmark (point)))) 2000 (delete-region pmark (point))))
2003 ;; Output message and put back prompt 2001 ;; Output message and put back prompt
2004 (comint-output-filter proc replacement))) 2002 (comint-output-filter proc replacement)))
2005(defalias 'comint-kill-output 'comint-delete-output) 2003(define-obsolete-function-alias 'comint-kill-output
2006(make-obsolete 'comint-kill-output 'comint-delete-output "21.1") 2004 'comint-delete-output "21.1")
2007 2005
2008(defun comint-write-output (filename &optional append mustbenew) 2006(defun comint-write-output (filename &optional append mustbenew)
2009 "Write output from interpreter since last input to FILENAME. 2007 "Write output from interpreter since last input to FILENAME.
@@ -2169,7 +2167,7 @@ If N is negative, find the next or Nth next match."
2169 (goto-char pos)))) 2167 (goto-char pos))))
2170 2168
2171 2169
2172(defun comint-forward-matching-input (regexp arg) 2170(defun comint-forward-matching-input (regexp n)
2173 "Search forward through buffer for input fields that match REGEXP. 2171 "Search forward through buffer for input fields that match REGEXP.
2174If `comint-use-prompt-regexp' is non-nil, then input fields are identified 2172If `comint-use-prompt-regexp' is non-nil, then input fields are identified
2175by lines that match `comint-prompt-regexp'. 2173by lines that match `comint-prompt-regexp'.
@@ -2177,7 +2175,7 @@ by lines that match `comint-prompt-regexp'.
2177With prefix argument N, search for Nth following match. 2175With prefix argument N, search for Nth following match.
2178If N is negative, find the previous or Nth previous match." 2176If N is negative, find the previous or Nth previous match."
2179 (interactive (comint-regexp-arg "Forward input matching (regexp): ")) 2177 (interactive (comint-regexp-arg "Forward input matching (regexp): "))
2180 (comint-backward-matching-input regexp (- arg))) 2178 (comint-backward-matching-input regexp (- n)))
2181 2179
2182 2180
2183(defun comint-next-prompt (n) 2181(defun comint-next-prompt (n)
@@ -2388,7 +2386,7 @@ updated using `comint-update-fence', if necessary."
2388(defun comint-source-default (previous-dir/file source-modes) 2386(defun comint-source-default (previous-dir/file source-modes)
2389 "Compute the defaults for `load-file' and `compile-file' commands. 2387 "Compute the defaults for `load-file' and `compile-file' commands.
2390 2388
2391PREVIOUS-DIR/FILE is a pair (directory . filename) from the last 2389PREVIOUS-DIR/FILE is a pair (DIRECTORY . FILENAME) from the last
2392source-file processing command, or nil if there hasn't been one yet. 2390source-file processing command, or nil if there hasn't been one yet.
2393SOURCE-MODES is a list used to determine what buffers contain source 2391SOURCE-MODES is a list used to determine what buffers contain source
2394files: if the major mode of the buffer is in SOURCE-MODES, it's source. 2392files: if the major mode of the buffer is in SOURCE-MODES, it's source.
@@ -2409,7 +2407,7 @@ processing command (i.e., PREVIOUS-DIR/FILE). If this is the first time
2409the command has been run (PREVIOUS-DIR/FILE is nil), the default directory 2407the command has been run (PREVIOUS-DIR/FILE is nil), the default directory
2410is the cwd, with no default file. (\"no default file\" = nil) 2408is the cwd, with no default file. (\"no default file\" = nil)
2411 2409
2412SOURCE-REGEXP is typically going to be something like (tea-mode) 2410SOURCE-MODES is typically going to be something like (tea-mode)
2413for T programs, (lisp-mode) for Lisp programs, (soar-mode lisp-mode) 2411for T programs, (lisp-mode) for Lisp programs, (soar-mode lisp-mode)
2414for Soar programs, etc. 2412for Soar programs, etc.
2415 2413
@@ -2440,7 +2438,7 @@ the load or compile."
2440 (set-buffer old-buffer))))) 2438 (set-buffer old-buffer)))))
2441 2439
2442(defun comint-extract-string () 2440(defun comint-extract-string ()
2443 "Return string around POINT, or nil." 2441 "Return string around point, or nil."
2444 (let ((syntax (syntax-ppss))) 2442 (let ((syntax (syntax-ppss)))
2445 (when (nth 3 syntax) 2443 (when (nth 3 syntax)
2446 (condition-case () 2444 (condition-case ()
@@ -2460,7 +2458,7 @@ See `comint-source-default' for more on determining defaults.
2460PROMPT is the prompt string. PREV-DIR/FILE is the (DIRECTORY . FILE) pair 2458PROMPT is the prompt string. PREV-DIR/FILE is the (DIRECTORY . FILE) pair
2461from the last source processing command. SOURCE-MODES is a list of major 2459from the last source processing command. SOURCE-MODES is a list of major
2462modes used to determine what file buffers contain source files. (These 2460modes used to determine what file buffers contain source files. (These
2463two arguments are used for determining defaults). If MUSTMATCH-P is true, 2461two arguments are used for determining defaults.) If MUSTMATCH-P is true,
2464then the filename reader will only accept a file that exists. 2462then the filename reader will only accept a file that exists.
2465 2463
2466A typical use: 2464A typical use:
@@ -2618,8 +2616,7 @@ This is a good thing to set in mode hooks.")
2618(defun comint-word (word-chars) 2616(defun comint-word (word-chars)
2619 "Return the word of WORD-CHARS at point, or nil if none is found. 2617 "Return the word of WORD-CHARS at point, or nil if none is found.
2620Word constituents are considered to be those in WORD-CHARS, which is like the 2618Word constituents are considered to be those in WORD-CHARS, which is like the
2621inside of a \"[...]\" (see `skip-chars-forward'), 2619inside of a \"[...]\" (see `skip-chars-forward'), plus all non-ASCII characters."
2622plus all non-ASCII characters."
2623 (save-excursion 2620 (save-excursion
2624 (let ((here (point)) 2621 (let ((here (point))
2625 giveup) 2622 giveup)
diff --git a/lisp/compare-w.el b/lisp/compare-w.el
index e0a6d5cf732..4bbed1e1fa8 100644
--- a/lisp/compare-w.el
+++ b/lisp/compare-w.el
@@ -56,7 +56,8 @@ whitespace is considered to match, and is skipped."
56(defcustom compare-ignore-whitespace nil 56(defcustom compare-ignore-whitespace nil
57 "*Non-nil means `compare-windows' ignores whitespace." 57 "*Non-nil means `compare-windows' ignores whitespace."
58 :type 'boolean 58 :type 'boolean
59 :group 'compare-w) 59 :group 'compare-w
60 :version "22.1")
60 61
61(defcustom compare-ignore-case nil 62(defcustom compare-ignore-case nil
62 "*Non-nil means `compare-windows' ignores case differences." 63 "*Non-nil means `compare-windows' ignores case differences."
@@ -88,7 +89,8 @@ be made buffer-local.
88If the value of this variable is `nil', then function `ding' is 89If the value of this variable is `nil', then function `ding' is
89called to beep or flash the screen when points are mismatched." 90called to beep or flash the screen when points are mismatched."
90 :type '(choice regexp function) 91 :type '(choice regexp function)
91 :group 'compare-w) 92 :group 'compare-w
93 :version "22.1")
92 94
93(defcustom compare-windows-sync-string-size 32 95(defcustom compare-windows-sync-string-size 32
94 "*Size of string from one window that is searched in second window. 96 "*Size of string from one window that is searched in second window.
@@ -99,7 +101,8 @@ difference regions more coarse-grained.
99 101
100The default value 32 is good for the most cases." 102The default value 32 is good for the most cases."
101 :type 'integer 103 :type 'integer
102 :group 'compare-w) 104 :group 'compare-w
105 :version "22.1")
103 106
104(defcustom compare-windows-recenter nil 107(defcustom compare-windows-recenter nil
105 "*List of two values, each of which is used as argument of 108 "*List of two values, each of which is used as argument of
@@ -109,23 +112,20 @@ matching points side-by-side.
109The value `(-1 0)' is useful if windows are split vertically, 112The value `(-1 0)' is useful if windows are split vertically,
110and the value `((4) (4))' for horizontally split windows." 113and the value `((4) (4))' for horizontally split windows."
111 :type '(list sexp sexp) 114 :type '(list sexp sexp)
112 :group 'compare-w) 115 :group 'compare-w
116 :version "22.1")
113 117
114(defcustom compare-windows-highlight t 118(defcustom compare-windows-highlight t
115 "*Non-nil means compare-windows highlights the differences." 119 "*Non-nil means compare-windows highlights the differences."
116 :type 'boolean 120 :type 'boolean
117 :group 'compare-w) 121 :group 'compare-w
122 :version "22.1")
118 123
119(defface compare-windows 124(defface compare-windows
120 '((((class color) (min-colors 88) (background light)) 125 '((t :inherit lazy-highlight))
121 (:background "paleturquoise"))
122 (((class color) (min-colors 88) (background dark))
123 (:background "paleturquoise4"))
124 (((class color))
125 (:background "turquoise3"))
126 (t (:underline t)))
127 "Face for highlighting of compare-windows difference regions." 126 "Face for highlighting of compare-windows difference regions."
128 :group 'compare-w) 127 :group 'compare-w
128 :version "22.1")
129;; backward-compatibility alias 129;; backward-compatibility alias
130(put 'compare-windows-face 'face-alias 'compare-windows) 130(put 'compare-windows-face 'face-alias 'compare-windows)
131 131
diff --git a/lisp/composite.el b/lisp/composite.el
index 11c927a3f8b..c25536812df 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -85,7 +85,7 @@ shifting percentage against the font size.")
85(defun encode-composition-rule (rule) 85(defun encode-composition-rule (rule)
86 "Encode composition rule RULE into an integer value. 86 "Encode composition rule RULE into an integer value.
87RULE is a cons of global and new reference point symbols 87RULE is a cons of global and new reference point symbols
88\(see reference-point-alist)." 88\(see `reference-point-alist')."
89 89
90 ;; This must be compatible with C macro COMPOSITION_ENCODE_RULE 90 ;; This must be compatible with C macro COMPOSITION_ENCODE_RULE
91 ;; defined in composite.h. 91 ;; defined in composite.h.
@@ -368,11 +368,11 @@ The argument is a parameterized event of the form
368where N is the number of characters before point to compose, 368where N is the number of characters before point to compose,
369COMPONENTS, if non-nil, is the same as the argument to `compose-region' 369COMPONENTS, if non-nil, is the same as the argument to `compose-region'
370\(which see). If it is nil, `compose-chars-after' is called, 370\(which see). If it is nil, `compose-chars-after' is called,
371and that function find a proper rule to compose the target characters. 371and that function finds a proper rule to compose the target characters.
372This function is intended to be used from input methods. 372This function is intended to be used from input methods.
373The global keymap binds special event `compose-last-chars' to this 373The global keymap binds special event `compose-last-chars' to this
374function. Input method may generate an event (compose-last-chars N COMPONENTS) 374function. Input method may generate an event (compose-last-chars N COMPONENTS)
375after a sequence character events." 375after a sequence of character events."
376 (interactive "e") 376 (interactive "e")
377 (let ((chars (nth 1 args))) 377 (let ((chars (nth 1 args)))
378 (if (and (numberp chars) 378 (if (and (numberp chars)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 5c3ff9448c0..4a3088e6f12 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4228,6 +4228,7 @@ The format is suitable for use with `easy-menu-define'."
4228 (suppress-keymap map) 4228 (suppress-keymap map)
4229 (define-key map " " 'scroll-up) 4229 (define-key map " " 'scroll-up)
4230 (define-key map "\177" 'scroll-down) 4230 (define-key map "\177" 'scroll-down)
4231 (define-key map "\C-c\C-c" 'Custom-set)
4231 (define-key map "\C-x\C-s" 'Custom-save) 4232 (define-key map "\C-x\C-s" 'Custom-save)
4232 (define-key map "q" 'Custom-buffer-done) 4233 (define-key map "q" 'Custom-buffer-done)
4233 (define-key map "u" 'Custom-goto-parent) 4234 (define-key map "u" 'Custom-goto-parent)
@@ -4257,7 +4258,7 @@ The format is suitable for use with `easy-menu-define'."
4257 ["Reset to Current" Custom-reset-current t] 4258 ["Reset to Current" Custom-reset-current t]
4258 ["Reset to Saved" Custom-reset-saved t] 4259 ["Reset to Saved" Custom-reset-saved t]
4259 ["Reset to Standard Settings" Custom-reset-standard t] 4260 ["Reset to Standard Settings" Custom-reset-standard t]
4260 ["Info" (Info-goto-node "(emacs)Easy Customization") t])) 4261 ["Info" (info "(emacs)Easy Customization") t]))
4261 4262
4262(defun Custom-goto-parent () 4263(defun Custom-goto-parent ()
4263 "Go to the parent group listed at the top of this buffer. 4264 "Go to the parent group listed at the top of this buffer.
diff --git a/lisp/custom.el b/lisp/custom.el
index 9766c77a256..cfb4373fdab 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -584,7 +584,7 @@ This recursively follows aliases."
584 "Themes that have been defined with `deftheme'. 584 "Themes that have been defined with `deftheme'.
585The default value is the list (user standard). The theme `standard' 585The default value is the list (user standard). The theme `standard'
586contains the Emacs standard settings from the original Lisp files. The 586contains the Emacs standard settings from the original Lisp files. The
587theme `user' contains all the the settings the user customized and saved. 587theme `user' contains all the settings the user customized and saved.
588Additional themes declared with the `deftheme' macro will be added to 588Additional themes declared with the `deftheme' macro will be added to
589the front of this list.") 589the front of this list.")
590 590
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 447762704ca..3116a22b8d0 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -434,7 +434,14 @@ as well as widgets, buttons, overlays, and text properties."
434 (if (consp key-list) 434 (if (consp key-list)
435 (list "type" 435 (list "type"
436 (mapconcat #'(lambda (x) (concat "\"" x "\"")) 436 (mapconcat #'(lambda (x) (concat "\"" x "\""))
437 key-list " or "))))) 437 key-list " or ")
438 "with"
439 `(widget-create
440 'link
441 :notify (lambda (&rest ignore)
442 (describe-input-method
443 ',current-input-method))
444 ,(format "%s" current-input-method))))))
438 ("buffer code" 445 ("buffer code"
439 ,(encoded-string-description 446 ,(encoded-string-description
440 (string-as-unibyte (char-to-string char)) nil)) 447 (string-as-unibyte (char-to-string char)) nil))
@@ -458,11 +465,7 @@ as well as widgets, buttons, overlays, and text properties."
458 (format "by display table entry [%s] (see below)" 465 (format "by display table entry [%s] (see below)"
459 (mapconcat 466 (mapconcat
460 #'(lambda (x) 467 #'(lambda (x)
461 (if (> (car x) #x7ffff) 468 (format "?%c" (logand (car x) #x7ffff)))
462 (format "?%c<face-id=%s>"
463 (logand (car x) #x7ffff)
464 (lsh (car x) -19))
465 (format "?%c" (car x))))
466 disp-vector " "))) 469 disp-vector " ")))
467 (composition 470 (composition
468 (let ((from (car composition)) 471 (let ((from (car composition))
@@ -506,13 +509,16 @@ as well as widgets, buttons, overlays, and text properties."
506 (when (cadr elt) 509 (when (cadr elt)
507 (insert (format formatter (car elt))) 510 (insert (format formatter (car elt)))
508 (dolist (clm (cdr elt)) 511 (dolist (clm (cdr elt))
509 (when (>= (+ (current-column) 512 (if (eq (car-safe clm) 'widget-create)
510 (or (string-match "\n" clm) 513 (progn (insert " ") (eval clm))
511 (string-width clm)) 1) 514 (when (>= (+ (current-column)
512 (window-width)) 515 (or (string-match "\n" clm)
513 (insert "\n") 516 (string-width clm))
514 (indent-to (1+ max-width))) 517 1)
515 (insert " " clm)) 518 (window-width))
519 (insert "\n")
520 (indent-to (1+ max-width)))
521 (insert " " clm)))
516 (insert "\n")))) 522 (insert "\n"))))
517 523
518 (save-excursion 524 (save-excursion
@@ -540,7 +546,21 @@ as well as widgets, buttons, overlays, and text properties."
540 (format "%s (0x%02X)" (cadr (aref disp-vector i)) 546 (format "%s (0x%02X)" (cadr (aref disp-vector i))
541 (cddr (aref disp-vector i))) 547 (cddr (aref disp-vector i)))
542 "-- no font --") 548 "-- no font --")
543 "\n "))) 549 "\n")
550 (when (> (car (aref disp-vector i)) #x7ffff)
551 (let* ((face-id (lsh (car (aref disp-vector i)) -19))
552 (face (car (delq nil (mapcar (lambda (face)
553 (and (eq (face-id face)
554 face-id) face))
555 (face-list))))))
556 (when face
557 (insert (propertize " " 'display '(space :align-to 5))
558 "face: ")
559 (widget-create 'link
560 :notify `(lambda (&rest ignore)
561 (describe-face ',face))
562 (format "%S" face))
563 (insert "\n"))))))
544 (insert "these terminal codes:\n") 564 (insert "these terminal codes:\n")
545 (dotimes (i (length disp-vector)) 565 (dotimes (i (length disp-vector))
546 (insert (car (aref disp-vector i)) 566 (insert (car (aref disp-vector i))
@@ -606,7 +626,7 @@ as well as widgets, buttons, overlays, and text properties."
606 (describe-text-mode))))) 626 (describe-text-mode)))))
607 627
608(defalias 'describe-char-after 'describe-char) 628(defalias 'describe-char-after 'describe-char)
609(make-obsolete 'describe-char-after 'describe-char "21.5") 629(make-obsolete 'describe-char-after 'describe-char "22.1")
610 630
611(provide 'descr-text) 631(provide 'descr-text)
612 632
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 3679140ba38..b80aa600a8a 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -106,8 +106,7 @@ desktop is saved."
106 :group 'desktop) 106 :group 'desktop)
107 107
108;; Maintained for backward compatibility 108;; Maintained for backward compatibility
109(defvaralias 'desktop-enable 'desktop-save-mode) 109(define-obsolete-variable-alias 'desktop-enable 'desktop-save-mode "22.1")
110(make-obsolete-variable 'desktop-enable 'desktop-save-mode)
111 110
112(defcustom desktop-save 'ask-if-new 111(defcustom desktop-save 'ask-if-new
113 "*Specifies whether the desktop should be saved when it is killed. 112 "*Specifies whether the desktop should be saved when it is killed.
@@ -120,7 +119,7 @@ Possible values are:
120 if-exists -- save if desktop file exists, otherwise don't save. 119 if-exists -- save if desktop file exists, otherwise don't save.
121 nil -- never save. 120 nil -- never save.
122The desktop is never saved when `desktop-save-mode' is nil. 121The desktop is never saved when `desktop-save-mode' is nil.
123The variables `desktop-directory' and `desktop-base-file-name' 122The variables `desktop-dirname' and `desktop-base-file-name'
124determine where the desktop is saved." 123determine where the desktop is saved."
125 :type '(choice 124 :type '(choice
126 (const :tag "Always save" t) 125 (const :tag "Always save" t)
@@ -137,7 +136,7 @@ determine where the desktop is saved."
137 "Name of file for Emacs desktop, excluding the directory part." 136 "Name of file for Emacs desktop, excluding the directory part."
138 :type 'file 137 :type 'file
139 :group 'desktop) 138 :group 'desktop)
140(defvaralias 'desktop-basefilename 'desktop-base-file-name) 139(define-obsolete-variable-alias 'desktop-basefilename 'desktop-base-file-name "22.1")
141 140
142(defcustom desktop-path '("." "~") 141(defcustom desktop-path '("." "~")
143 "List of directories to search for the desktop file. 142 "List of directories to search for the desktop file.
@@ -200,14 +199,14 @@ Feature: Saving `kill-ring' implies saving `kill-ring-yank-pointer'."
200 regexp-search-ring-yank-pointer) 199 regexp-search-ring-yank-pointer)
201 "List of global variables that `desktop-clear' will clear. 200 "List of global variables that `desktop-clear' will clear.
202An element may be variable name (a symbol) or a cons cell of the form 201An element may be variable name (a symbol) or a cons cell of the form
203\(VAR . FORM). Symbols are set to nil and for cons cells VAR is set 202\(VAR . FORM). Symbols are set to nil and for cons cells VAR is set
204to the value obtained by evaluateing FORM." 203to the value obtained by evaluating FORM."
205 :type '(repeat (restricted-sexp :match-alternatives (symbolp consp))) 204 :type '(repeat (restricted-sexp :match-alternatives (symbolp consp)))
206 :group 'desktop 205 :group 'desktop
207 :version "22.1") 206 :version "22.1")
208 207
209(defcustom desktop-clear-preserve-buffers-regexp 208(defcustom desktop-clear-preserve-buffers-regexp
210 "^\\(\\*scratch\\*\\|\\*Messages\\*\\|\\*tramp/.+\\*\\)$" 209 "^\\(\\*scratch\\*\\|\\*Messages\\*\\|\\*server\\*\\|\\*tramp/.+\\*\\)$"
211 "Regexp identifying buffers that `desktop-clear' should not delete. 210 "Regexp identifying buffers that `desktop-clear' should not delete.
212See also `desktop-clear-preserve-buffers'." 211See also `desktop-clear-preserve-buffers'."
213 :type 'regexp 212 :type 'regexp
@@ -305,9 +304,9 @@ to restore the buffer, the auxiliary information is passed as the argument
305DESKTOP-BUFFER-MISC.") 304DESKTOP-BUFFER-MISC.")
306(make-variable-buffer-local 'desktop-save-buffer) 305(make-variable-buffer-local 'desktop-save-buffer)
307(make-obsolete-variable 'desktop-buffer-modes-to-save 306(make-obsolete-variable 'desktop-buffer-modes-to-save
308 'desktop-save-buffer) 307 'desktop-save-buffer "22.1")
309(make-obsolete-variable 'desktop-buffer-misc-functions 308(make-obsolete-variable 'desktop-buffer-misc-functions
310 'desktop-save-buffer) 309 'desktop-save-buffer "22.1")
311 310
312(defcustom desktop-buffer-mode-handlers 311(defcustom desktop-buffer-mode-handlers
313 '((dired-mode . dired-restore-desktop-buffer) 312 '((dired-mode . dired-restore-desktop-buffer)
@@ -315,7 +314,7 @@ DESKTOP-BUFFER-MISC.")
315 (mh-folder-mode . mh-restore-desktop-buffer) 314 (mh-folder-mode . mh-restore-desktop-buffer)
316 (Info-mode . Info-restore-desktop-buffer)) 315 (Info-mode . Info-restore-desktop-buffer))
317 "Alist of major mode specific functions to restore a desktop buffer. 316 "Alist of major mode specific functions to restore a desktop buffer.
318Functions are called by `desktop-read'. List elements must have the form 317Functions are called by `desktop-read'. List elements must have the form
319\(MAJOR-MODE . RESTORE-BUFFER-FUNCTION). 318\(MAJOR-MODE . RESTORE-BUFFER-FUNCTION).
320 319
321Buffers with a major mode not specified here, are restored by the default 320Buffers with a major mode not specified here, are restored by the default
@@ -342,7 +341,7 @@ and variable values for that buffer are copied into it."
342 341
343(put 'desktop-buffer-mode-handlers 'risky-local-variable t) 342(put 'desktop-buffer-mode-handlers 'risky-local-variable t)
344(make-obsolete-variable 'desktop-buffer-handlers 343(make-obsolete-variable 'desktop-buffer-handlers
345 'desktop-buffer-mode-handlers) 344 'desktop-buffer-mode-handlers "22.1")
346 345
347(defcustom desktop-minor-mode-table 346(defcustom desktop-minor-mode-table
348 '((auto-fill-function auto-fill-mode) 347 '((auto-fill-function auto-fill-mode)
@@ -399,7 +398,7 @@ variables listed in `desktop-globals-to-clear'."
399 (string-match desktop-clear-preserve-buffers-regexp bufname) 398 (string-match desktop-clear-preserve-buffers-regexp bufname)
400 (member bufname desktop-clear-preserve-buffers) 399 (member bufname desktop-clear-preserve-buffers)
401 ;; Don't kill buffers made for internal purposes. 400 ;; Don't kill buffers made for internal purposes.
402 (and (not (equal bufname "")) (eq (aref bufname 0) ?\ )) 401 (and (not (equal bufname "")) (eq (aref bufname 0) ?\s))
403 (kill-buffer (car buffers)))) 402 (kill-buffer (car buffers))))
404 (setq buffers (cdr buffers)))) 403 (setq buffers (cdr buffers))))
405 (delete-other-windows)) 404 (delete-other-windows))
@@ -432,7 +431,7 @@ is nil, ask the user where to save the desktop."
432 (condition-case err 431 (condition-case err
433 (desktop-save desktop-dirname) 432 (desktop-save desktop-dirname)
434 (file-error 433 (file-error
435 (unless (yes-or-no-p "Error while saving the desktop. Ignore? ") 434 (unless (yes-or-no-p "Error while saving the desktop. Ignore? ")
436 (signal (car err) (cdr err))))))) 435 (signal (car err) (cdr err)))))))
437 436
438;; ---------------------------------------------------------------------------- 437;; ----------------------------------------------------------------------------
@@ -454,7 +453,7 @@ TXT is a string that when read and evaluated yields value.
454QUOTE may be `may' (value may be quoted), 453QUOTE may be `may' (value may be quoted),
455`must' (values must be quoted), or nil (value may not be quoted)." 454`must' (values must be quoted), or nil (value may not be quoted)."
456 (cond 455 (cond
457 ((or (numberp value) (null value) (eq t value)) 456 ((or (numberp value) (null value) (eq t value) (keywordp value))
458 (cons 'may (prin1-to-string value))) 457 (cons 'may (prin1-to-string value)))
459 ((stringp value) 458 ((stringp value)
460 (let ((copy (copy-sequence value))) 459 (let ((copy (copy-sequence value)))
@@ -711,7 +710,7 @@ This function also sets `desktop-dirname' to nil."
711 "Read and process the desktop file in directory DIRNAME. 710 "Read and process the desktop file in directory DIRNAME.
712Look for a desktop file in DIRNAME, or if DIRNAME is omitted, look in 711Look for a desktop file in DIRNAME, or if DIRNAME is omitted, look in
713directories listed in `desktop-path'. If a desktop file is found, it 712directories listed in `desktop-path'. If a desktop file is found, it
714is processed and `desktop-after-read-hook' is run. If no desktop file 713is processed and `desktop-after-read-hook' is run. If no desktop file
715is found, clear the desktop and run `desktop-no-desktop-file-hook'. 714is found, clear the desktop and run `desktop-no-desktop-file-hook'.
716This function is a no-op when Emacs is running in batch mode. 715This function is a no-op when Emacs is running in batch mode.
717It returns t if a desktop file was loaded, nil otherwise." 716It returns t if a desktop file was loaded, nil otherwise."
@@ -781,7 +780,7 @@ Also inhibit further loading of it."
781 (progn 780 (progn
782 (load "default" t t) 781 (load "default" t t)
783 (setq inhibit-default-init t)))) 782 (setq inhibit-default-init t))))
784(make-obsolete 'desktop-load-default 'desktop-save-mode) 783(make-obsolete 'desktop-load-default 'desktop-save-mode "22.1")
785 784
786;; ---------------------------------------------------------------------------- 785;; ----------------------------------------------------------------------------
787;;;###autoload 786;;;###autoload
@@ -958,7 +957,7 @@ directory DIRNAME."
958 (cons 'overwrite-mode (car mim))))) 957 (cons 'overwrite-mode (car mim)))))
959 958
960(defun desktop-append-buffer-args (&rest args) 959(defun desktop-append-buffer-args (&rest args)
961 "Append ARGS at end of `desktop-buffer-args-list' 960 "Append ARGS at end of `desktop-buffer-args-list'.
962ARGS must be an argument list for `desktop-create-buffer'." 961ARGS must be an argument list for `desktop-create-buffer'."
963 (setq desktop-buffer-args-list (nconc desktop-buffer-args-list (list args))) 962 (setq desktop-buffer-args-list (nconc desktop-buffer-args-list (list args)))
964 (unless desktop-lazy-timer 963 (unless desktop-lazy-timer
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index b6444aad2a4..f10ac7d57d2 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -197,7 +197,7 @@ when editing big diffs)."
197 (((class color) (min-colors 88) (background dark)) 197 (((class color) (min-colors 88) (background dark))
198 :background "grey60" :weight bold) 198 :background "grey60" :weight bold)
199 (((class color) (background light)) 199 (((class color) (background light))
200 :foreground "yellow" :weight bold) 200 :foreground "green" :weight bold)
201 (((class color) (background dark)) 201 (((class color) (background dark))
202 :foreground "cyan" :weight bold) 202 :foreground "cyan" :weight bold)
203 (t :weight bold)) ; :height 1.3 203 (t :weight bold)) ; :height 1.3
@@ -250,6 +250,27 @@ when editing big diffs)."
250(put 'diff-changed-face 'face-alias 'diff-changed) 250(put 'diff-changed-face 'face-alias 'diff-changed)
251(defvar diff-changed-face 'diff-changed) 251(defvar diff-changed-face 'diff-changed)
252 252
253(defface diff-indicator-removed
254 '((t :inherit diff-removed))
255 "`diff-mode' face used to highlight indicator of removed lines (-, <)."
256 :group 'diff-mode
257 :version "22.1")
258(defvar diff-indicator-removed-face 'diff-indicator-removed)
259
260(defface diff-indicator-added
261 '((t :inherit diff-added))
262 "`diff-mode' face used to highlight indicator of added lines (+, >)."
263 :group 'diff-mode
264 :version "22.1")
265(defvar diff-indicator-added-face 'diff-indicator-added)
266
267(defface diff-indicator-changed
268 '((t :inherit diff-changed))
269 "`diff-mode' face used to highlight indicator of changed lines."
270 :group 'diff-mode
271 :version "22.1")
272(defvar diff-indicator-changed-face 'diff-indicator-changed)
273
253(defface diff-function 274(defface diff-function
254 '((t :inherit diff-context)) 275 '((t :inherit diff-context))
255 "`diff-mode' face used to highlight function names produced by \"diff -p\"." 276 "`diff-mode' face used to highlight function names produced by \"diff -p\"."
@@ -259,7 +280,7 @@ when editing big diffs)."
259(defvar diff-function-face 'diff-function) 280(defvar diff-function-face 'diff-function)
260 281
261(defface diff-context 282(defface diff-context
262 '((t :inherit shadow)) 283 '((((class color grayscale) (min-colors 88)) :inherit shadow))
263 "`diff-mode' face used to highlight context and other side-information." 284 "`diff-mode' face used to highlight context and other side-information."
264 :group 'diff-mode) 285 :group 'diff-mode)
265;; backward-compatibility alias 286;; backward-compatibility alias
@@ -298,24 +319,29 @@ when editing big diffs)."
298 319
299 320
300(defvar diff-font-lock-keywords 321(defvar diff-font-lock-keywords
301 `(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified 322 `(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified
302 (1 diff-hunk-header-face) 323 (1 diff-hunk-header-face) (2 diff-function-face))
303 (2 diff-function-face)) 324 ("^\\(\\*\\{15\\}\\)\\(.*\\)$" ;context
304 ("^--- .+ ----$" . diff-hunk-header-face) ;context 325 (1 diff-hunk-header-face) (2 diff-function-face))
305 ("^\\(\\*\\{15\\}\\)\\(.*\\)$" ;context
306 (1 diff-hunk-header-face)
307 (2 diff-function-face))
308 ("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header-face) ;context 326 ("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header-face) ;context
327 ("^--- .+ ----$" . diff-hunk-header-face) ;context
328 ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ;normal
329 ("^---$" . diff-hunk-header-face) ;normal
309 ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n" 330 ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n"
310 (0 diff-header-face) (2 diff-file-header-face prepend)) 331 (0 diff-header-face) (2 diff-file-header-face prepend))
311 ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) 332 ("^\\([-<]\\)\\(.*\n\\)"
312 ("^!.*\n" (0 diff-changed-face)) 333 (1 diff-indicator-removed-face) (2 diff-removed-face))
313 ("^[+>].*\n" (0 diff-added-face)) 334 ("^\\([+>]\\)\\(.*\n\\)"
314 ("^[-<].*\n" (0 diff-removed-face)) 335 (1 diff-indicator-added-face) (2 diff-added-face))
315 ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend)) 336 ("^\\(!\\)\\(.*\n\\)"
337 (1 diff-indicator-changed-face) (2 diff-changed-face))
338 ("^Index: \\(.+\\).*\n"
339 (0 diff-header-face) (1 diff-index-face prepend))
316 ("^Only in .*\n" . diff-nonexistent-face) 340 ("^Only in .*\n" . diff-nonexistent-face)
317 ("^#.*" . font-lock-string-face) 341 ("^\\(#\\)\\(.*\\)"
318 ("^[^-=+*!<>].*\n" (0 diff-context-face)))) 342 (1 font-lock-comment-delimiter-face)
343 (2 font-lock-comment-face))
344 ("^[^-=+*!<>#].*\n" (0 diff-context-face))))
319 345
320(defconst diff-font-lock-defaults 346(defconst diff-font-lock-defaults
321 '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil))) 347 '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil)))
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 42df15b47d2..006186a562e 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -157,7 +157,7 @@ Read-only folders only work in VM 5, not in VM 4."
157(define-minor-mode dired-omit-mode 157(define-minor-mode dired-omit-mode
158 "Toggle Dired-Omit mode. 158 "Toggle Dired-Omit mode.
159With numeric ARG, enable Dired-Omit mode if ARG is positive, disable 159With numeric ARG, enable Dired-Omit mode if ARG is positive, disable
160otherwise. Enabling and disabling is buffer-local. 160otherwise. Enabling and disabling is buffer-local.
161If enabled, \"uninteresting\" files are not listed. 161If enabled, \"uninteresting\" files are not listed.
162Uninteresting files are those whose filenames match regexp `dired-omit-files', 162Uninteresting files are those whose filenames match regexp `dired-omit-files',
163plus those ending with extensions in `dired-omit-extensions'." 163plus those ending with extensions in `dired-omit-extensions'."
@@ -185,7 +185,7 @@ files and lock files."
185If nil, Dired finds the directory as a subdirectory in some other buffer 185If nil, Dired finds the directory as a subdirectory in some other buffer
186if it is present as one. 186if it is present as one.
187 187
188If there are several Dired buffers for a directory, the most recently 188If there are several dired buffers for a directory, the most recently
189used is chosen. 189used is chosen.
190 190
191Dired avoids switching to the current buffer, so that if you have 191Dired avoids switching to the current buffer, so that if you have
@@ -201,7 +201,7 @@ If nil, there is no maximum size."
201 :group 'dired-x) 201 :group 'dired-x)
202 202
203(defcustom dired-enable-local-variables t 203(defcustom dired-enable-local-variables t
204 "*Control use of local-variables lists in dired. 204 "*Control use of local-variables lists in Dired.
205The value can be t, nil or something else. 205The value can be t, nil or something else.
206A value of t means local-variables lists are obeyed; 206A value of t means local-variables lists are obeyed;
207nil means they are ignored; anything else means query. 207nil means they are ignored; anything else means query.
@@ -232,7 +232,7 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
232 :group 'dired-x) 232 :group 'dired-x)
233 233
234(defcustom dired-clean-up-buffers-too t 234(defcustom dired-clean-up-buffers-too t
235 "*Non-nil means offer to kill buffers visiting files and dirs deleted in dired." 235 "*Non-nil means offer to kill buffers visiting files and dirs deleted in Dired."
236 :type 'boolean 236 :type 'boolean
237 :group 'dired-x) 237 :group 'dired-x)
238 238
@@ -271,7 +271,7 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
271(add-hook 'dired-after-readin-hook 'dired-omit-expunge) 271(add-hook 'dired-after-readin-hook 'dired-omit-expunge)
272 272
273(defun dired-extra-startup () 273(defun dired-extra-startup ()
274 "Automatically put on `dired-mode-hook' to get extra dired features: 274 "Automatically put on `dired-mode-hook' to get extra Dired features:
275\\<dired-mode-map> 275\\<dired-mode-map>
276 \\[dired-do-run-mail]\t-- run mail on folder (see `dired-bind-vm') 276 \\[dired-do-run-mail]\t-- run mail on folder (see `dired-bind-vm')
277 \\[dired-info]\t-- run info on file 277 \\[dired-info]\t-- run info on file
@@ -279,8 +279,8 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
279 \\[dired-do-find-marked-files]\t-- visit all marked files simultaneously 279 \\[dired-do-find-marked-files]\t-- visit all marked files simultaneously
280 \\[dired-omit-mode]\t-- toggle omitting of files 280 \\[dired-omit-mode]\t-- toggle omitting of files
281 \\[dired-mark-sexp]\t-- mark by Lisp expression 281 \\[dired-mark-sexp]\t-- mark by Lisp expression
282 \\[dired-copy-filename-as-kill]\t-- copy the file or subdir names into the kill ring. 282 \\[dired-copy-filename-as-kill]\t-- copy the file or subdir names into the kill ring;
283 \t You can feed it to other commands using \\[yank]. 283 \t you can feed it to other commands using \\[yank]
284 284
285For more features, see variables 285For more features, see variables
286 286
@@ -357,7 +357,7 @@ Remove expanded subdir of deleted dir, if any."
357;;; Mark files with some extension. 357;;; Mark files with some extension.
358(defun dired-mark-extension (extension &optional marker-char) 358(defun dired-mark-extension (extension &optional marker-char)
359 "Mark all files with a certain EXTENSION for use in later commands. 359 "Mark all files with a certain EXTENSION for use in later commands.
360A `.' is not automatically prepended to the string entered." 360A `.' is *not* automatically prepended to the string entered."
361 ;; EXTENSION may also be a list of extensions instead of a single one. 361 ;; EXTENSION may also be a list of extensions instead of a single one.
362 ;; Optional MARKER-CHAR is marker to use. 362 ;; Optional MARKER-CHAR is marker to use.
363 (interactive "sMarking extension: \nP") 363 (interactive "sMarking extension: \nP")
@@ -434,7 +434,7 @@ See variables `dired-texinfo-unclean-extensions',
434(defun dired-jump (&optional other-window) 434(defun dired-jump (&optional other-window)
435 "Jump to dired buffer corresponding to current buffer. 435 "Jump to dired buffer corresponding to current buffer.
436If in a file, dired the current directory and move to file's line. 436If in a file, dired the current directory and move to file's line.
437If in dired already, pop up a level and goto old directory's line. 437If in Dired already, pop up a level and goto old directory's line.
438In case the proper dired file line cannot be found, refresh the dired 438In case the proper dired file line cannot be found, refresh the dired
439buffer and try again." 439buffer and try again."
440 (interactive "P") 440 (interactive "P")
@@ -465,7 +465,7 @@ buffer and try again."
465 (dired-goto-file file)))))))) 465 (dired-goto-file file))))))))
466 466
467(defun dired-jump-other-window () 467(defun dired-jump-other-window ()
468 "Like \\[dired-jump] (dired-jump) but in other window." 468 "Like \\[dired-jump] (`dired-jump') but in other window."
469 (interactive) 469 (interactive)
470 (dired-jump t)) 470 (dired-jump t))
471 471
@@ -478,13 +478,13 @@ buffer and try again."
478;; sk 28-Aug-1991 09:37 478;; sk 28-Aug-1991 09:37
479(defvar dired-omit-localp 'no-dir 479(defvar dired-omit-localp 'no-dir
480 "The LOCALP argument `dired-omit-expunge' passes to `dired-get-filename'. 480 "The LOCALP argument `dired-omit-expunge' passes to `dired-get-filename'.
481If it is 'no-dir, omitting is much faster, but you can only match 481If it is `no-dir', omitting is much faster, but you can only match
482against the non-directory part of the file name. Set it to nil if you 482against the non-directory part of the file name. Set it to nil if you
483need to match the entire file name.") 483need to match the entire file name.")
484 484
485;; \017=^O for Omit - other packages can chose other control characters. 485;; \017=^O for Omit - other packages can chose other control characters.
486(defvar dired-omit-marker-char ?\017 486(defvar dired-omit-marker-char ?\017
487 "Temporary marker used by by dired-omit. 487 "Temporary marker used by dired-omit.
488Should never be used as marker by the user or other packages.") 488Should never be used as marker by the user or other packages.")
489 489
490(defun dired-omit-startup () 490(defun dired-omit-startup ()
@@ -569,9 +569,9 @@ This functions works by temporarily binding `dired-marker-char' to
569REGEXP is matched against the entire file name. 569REGEXP is matched against the entire file name.
570Does not re-mark files which already have a mark. 570Does not re-mark files which already have a mark.
571With prefix argument, unflag all those files. 571With prefix argument, unflag all those files.
572Second optional argument LOCALP is as in `dired-get-filename'." 572Optional fourth argument LOCALP is as in `dired-get-filename'."
573 (interactive "P") 573 (interactive "P")
574 (let ((dired-marker-char (if unflag-p ?\ dired-marker-char))) 574 (let ((dired-marker-char (if unflag-p ?\s dired-marker-char)))
575 (dired-mark-if 575 (dired-mark-if
576 (and 576 (and
577 ;; not already marked 577 ;; not already marked
@@ -621,7 +621,7 @@ Second optional argument LOCALP is as in `dired-get-filename'."
621 621
622;;; For browsing `ls -lR' listings in a dired-like fashion. 622;;; For browsing `ls -lR' listings in a dired-like fashion.
623 623
624(fset 'virtual-dired 'dired-virtual) 624(defalias 'virtual-dired 'dired-virtual)
625(defun dired-virtual (dirname &optional switches) 625(defun dired-virtual (dirname &optional switches)
626 "Put this buffer into Virtual Dired mode. 626 "Put this buffer into Virtual Dired mode.
627 627
@@ -638,10 +638,10 @@ buffer.
638If you have save a Dired buffer in a file you can use \\[dired-virtual] to 638If you have save a Dired buffer in a file you can use \\[dired-virtual] to
639resume it in a later session. 639resume it in a later session.
640 640
641Type \\<dired-mode-map>\\[revert-buffer] in the 641Type \\<dired-mode-map>\\[revert-buffer] \
642Virtual Dired buffer and answer `y' to convert the virtual to a real 642in the Virtual Dired buffer and answer `y' to convert
643dired buffer again. You don't have to do this, though: you can relist 643the virtual to a real dired buffer again. You don't have to do this, though:
644single subdirs using \\[dired-do-redisplay]." 644you can relist single subdirs using \\[dired-do-redisplay]."
645 645
646 ;; DIRNAME is the top level directory of the buffer. It will become 646 ;; DIRNAME is the top level directory of the buffer. It will become
647 ;; its `default-directory'. If nil, the old value of 647 ;; its `default-directory'. If nil, the old value of
@@ -725,12 +725,12 @@ nil."
725;; `buffer-contents-mode-alist'. 725;; `buffer-contents-mode-alist'.
726;; Or you use infer-mode.el and infer-mode-alist, same syntax. 726;; Or you use infer-mode.el and infer-mode-alist, same syntax.
727(defun dired-virtual-mode () 727(defun dired-virtual-mode ()
728 "Put current buffer into virtual dired mode (see `dired-virtual'). 728 "Put current buffer into Virtual Dired mode (see `dired-virtual').
729Useful on `buffer-contents-mode-alist' (which see) with the regexp 729Useful on `buffer-contents-mode-alist' (which see) with the regexp
730 730
731 \"^ \\(/[^ /]+\\)/?+:$\" 731 \"^ \\(/[^ /]+\\)/?+:$\"
732 732
733to put saved dired buffers automatically into virtual dired mode. 733to put saved dired buffers automatically into Virtual Dired mode.
734 734
735Also useful for `auto-mode-alist' (which see) like this: 735Also useful for `auto-mode-alist' (which see) like this:
736 736
@@ -768,7 +768,7 @@ Knows about the special cases in variable `default-directory-alist'."
768 default-directory)) 768 default-directory))
769 769
770(defun dired-smart-shell-command (cmd &optional insert) 770(defun dired-smart-shell-command (cmd &optional insert)
771 "Like function `shell-command', but in the current Tree Dired directory." 771 "Like function `shell-command', but in the current Virtual Dired directory."
772 (interactive (list (read-from-minibuffer "Shell command: " 772 (interactive (list (read-from-minibuffer "Shell command: "
773 nil nil nil 'shell-command-history) 773 nil nil nil 'shell-command-history)
774 current-prefix-arg)) 774 current-prefix-arg))
@@ -800,8 +800,9 @@ Knows about the special cases in variable `default-directory-alist'."
800(defvar dired-local-variables-file (convert-standard-filename ".dired") 800(defvar dired-local-variables-file (convert-standard-filename ".dired")
801 "Filename, as string, containing local dired buffer variables to be hacked. 801 "Filename, as string, containing local dired buffer variables to be hacked.
802If this file found in current directory, then it will be inserted into dired 802If this file found in current directory, then it will be inserted into dired
803buffer and `hack-local-variables' will be run. See Emacs Info pages for more 803buffer and `hack-local-variables' will be run. See Info node
804information on local variables. See also `dired-enable-local-variables'.") 804`(emacs)File Variables' for more information on local variables.
805See also `dired-enable-local-variables'.")
805 806
806(defun dired-hack-local-variables () 807(defun dired-hack-local-variables ()
807 "Evaluate local variables in `dired-local-variables-file' for dired buffer." 808 "Evaluate local variables in `dired-local-variables-file' for dired buffer."
@@ -828,7 +829,7 @@ information on local variables. See also `dired-enable-local-variables'.")
828 829
829(defun dired-omit-here-always () 830(defun dired-omit-here-always ()
830 "Create `dired-local-variables-file' for omitting and reverts directory. 831 "Create `dired-local-variables-file' for omitting and reverts directory.
831Sets dired-omit-file-p to t in a local variables file that is readable by 832Sets `dired-omit-mode' to t in a local variables file that is readable by
832dired." 833dired."
833 (interactive) 834 (interactive)
834 (if (file-exists-p dired-local-variables-file) 835 (if (file-exists-p dired-local-variables-file)
@@ -1024,7 +1025,7 @@ Each element of this list looks like
1024 1025
1025 \(REGEXP COMMAND...\) 1026 \(REGEXP COMMAND...\)
1026 1027
1027where each COMMAND can either be a string or a lisp expression that evaluates 1028where each COMMAND can either be a string or a Lisp expression that evaluates
1028to a string. If several COMMANDs are given, the first one will be the default 1029to a string. If several COMMANDs are given, the first one will be the default
1029and the rest will be added temporarily to the history and can be retrieved 1030and the rest will be added temporarily to the history and can be retrieved
1030with \\[previous-history-element] (M-p) . 1031with \\[previous-history-element] (M-p) .
@@ -1223,14 +1224,14 @@ not absolute ones like
1223 (dired-do-create-files 'relsymlink (function dired-make-relative-symlink) 1224 (dired-do-create-files 'relsymlink (function dired-make-relative-symlink)
1224 "RelSymLink" arg dired-keep-marker-relsymlink)) 1225 "RelSymLink" arg dired-keep-marker-relsymlink))
1225 1226
1226(defun dired-do-relsymlink-regexp (regexp newname &optional whole-name) 1227(defun dired-do-relsymlink-regexp (regexp newname &optional arg whole-name)
1227 "RelSymlink all marked files containing REGEXP to NEWNAME. 1228 "RelSymlink all marked files containing REGEXP to NEWNAME.
1228See functions `dired-do-rename-regexp' and `dired-do-relsymlink' 1229See functions `dired-do-rename-regexp' and `dired-do-relsymlink'
1229for more info." 1230for more info."
1230 (interactive (dired-mark-read-regexp "RelSymLink")) 1231 (interactive (dired-mark-read-regexp "RelSymLink"))
1231 (dired-do-create-files-regexp 1232 (dired-do-create-files-regexp
1232 (function dired-make-relative-symlink) 1233 (function dired-make-relative-symlink)
1233 "RelSymLink" nil regexp newname whole-name dired-keep-marker-relsymlink)) 1234 "RelSymLink" arg regexp newname whole-name dired-keep-marker-relsymlink))
1234 1235
1235 1236
1236;;; VISIT ALL MARKED FILES SIMULTANEOUSLY. 1237;;; VISIT ALL MARKED FILES SIMULTANEOUSLY.
@@ -1321,7 +1322,7 @@ NOSELECT the files are merely found but not selected."
1321 1322
1322(defun dired-man () 1323(defun dired-man ()
1323 "Run man on this file. Display old buffer if buffer name matches filename. 1324 "Run man on this file. Display old buffer if buffer name matches filename.
1324Uses ../lisp/man.el of \\[manual-entry] fame." 1325Uses `man.el' of \\[manual-entry] fame."
1325 (interactive) 1326 (interactive)
1326 (require 'man) 1327 (require 'man)
1327 (let* ((file (dired-get-filename)) 1328 (let* ((file (dired-get-filename))
@@ -1441,7 +1442,7 @@ See also variable `dired-vm-read-only-folders'."
1441(defun dired-initial-position (dirname) 1442(defun dired-initial-position (dirname)
1442 "Where point should go in a new listing of DIRNAME. 1443 "Where point should go in a new listing of DIRNAME.
1443Point assumed at beginning of new subdir line. 1444Point assumed at beginning of new subdir line.
1444You may redefine this function as you wish, e.g. like in dired-x.el." 1445You may redefine this function as you wish, e.g. like in `dired-x.el'."
1445 (end-of-line) 1446 (end-of-line)
1446 (if dired-find-subdir (dired-goto-subdir dirname)) ; new 1447 (if dired-find-subdir (dired-goto-subdir dirname)) ; new
1447 (if dired-trivial-filenames (dired-goto-next-nontrivial-file))) 1448 (if dired-trivial-filenames (dired-goto-next-nontrivial-file)))
@@ -1550,7 +1551,7 @@ to mark all zero length files."
1550(defvar dired-x-hands-off-my-keys t 1551(defvar dired-x-hands-off-my-keys t
1551 "*Non-nil means don't bind `dired-x-find-file' over `find-file' on keyboard. 1552 "*Non-nil means don't bind `dired-x-find-file' over `find-file' on keyboard.
1552Similarly for `dired-x-find-file-other-window' over `find-file-other-window'. 1553Similarly for `dired-x-find-file-other-window' over `find-file-other-window'.
1553If you change this variable after dired-x.el is loaded then do 1554If you change this variable after `dired-x.el' is loaded then do
1554\\[dired-x-bind-find-file].") 1555\\[dired-x-bind-find-file].")
1555 1556
1556;;; Bind `dired-x-find-file{-other-window}' over wherever 1557;;; Bind `dired-x-find-file{-other-window}' over wherever
@@ -1559,7 +1560,7 @@ If you change this variable after dired-x.el is loaded then do
1559 "Bind `dired-x-find-file' in place of `find-file' \(or reverse\). 1560 "Bind `dired-x-find-file' in place of `find-file' \(or reverse\).
1560Similarly for `dired-x-find-file-other-window' and `find-file-other-window'. 1561Similarly for `dired-x-find-file-other-window' and `find-file-other-window'.
1561Binding direction based on `dired-x-hands-off-my-keys'. 1562Binding direction based on `dired-x-hands-off-my-keys'.
1562This function part of `after-init-hook'." 1563This function is part of `after-init-hook'."
1563 (interactive) 1564 (interactive)
1564 (if (interactive-p) 1565 (if (interactive-p)
1565 (setq dired-x-hands-off-my-keys 1566 (setq dired-x-hands-off-my-keys
@@ -1592,9 +1593,9 @@ May create a new window, or reuse an existing one.
1592See the function `display-buffer'. 1593See the function `display-buffer'.
1593 1594
1594Identical to `find-file' except when called interactively, with a prefix arg 1595Identical to `find-file' except when called interactively, with a prefix arg
1595\(e.g., \\[universal-argument]\), in which case it guesses filename near 1596\(e.g., \\[universal-argument]\), in which case it guesses filename near point.
1596point. Useful for editing file mentioned in buffer you are viewing, or to 1597Useful for editing file mentioned in buffer you are viewing,
1597test if that file exists. Use minibuffer after snatching filename." 1598or to test if that file exists. Use minibuffer after snatching filename."
1598 (interactive (list (read-filename-at-point "Find file: "))) 1599 (interactive (list (read-filename-at-point "Find file: ")))
1599 (find-file (expand-file-name filename))) 1600 (find-file (expand-file-name filename)))
1600 1601
@@ -1604,9 +1605,9 @@ May create a new window, or reuse an existing one.
1604See the function `display-buffer'. 1605See the function `display-buffer'.
1605 1606
1606Identical to `find-file-other-window' except when called interactively, with a 1607Identical to `find-file-other-window' except when called interactively, with a
1607prefix arg \(e.g., \\[universal-argument]\), in which case it guesses filename 1608prefix arg \(e.g., \\[universal-argument]\), in which case it guesses filename near point.
1608near point. Useful for editing file mentioned in buffer you are viewing, or 1609Useful for editing file mentioned in buffer you are viewing,
1609to test if that file exists. Use minibuffer after snatching filename." 1610or to test if that file exists. Use minibuffer after snatching filename."
1610 (interactive (list (read-filename-at-point "Find file: "))) 1611 (interactive (list (read-filename-at-point "Find file: ")))
1611 (find-file-other-window (expand-file-name filename))) 1612 (find-file-other-window (expand-file-name filename)))
1612 1613
@@ -1695,7 +1696,7 @@ If `current-prefix-arg' is non-nil, uses name at point as guess."
1695 "List of variables to be appended to reports sent by `dired-x-submit-report'.") 1696 "List of variables to be appended to reports sent by `dired-x-submit-report'.")
1696 1697
1697(defun dired-x-submit-report () 1698(defun dired-x-submit-report ()
1698 "Submit via reporter.el a bug report on program. 1699 "Submit via `reporter.el' a bug report on program.
1699Send report on `dired-x-file' version `dired-x-version,' to 1700Send report on `dired-x-file' version `dired-x-version,' to
1700`dired-x-maintainer' at address `dired-x-help-address' listing 1701`dired-x-maintainer' at address `dired-x-help-address' listing
1701variables `dired-x-variable-list' in the message." 1702variables `dired-x-variable-list' in the message."
diff --git a/lisp/dired.el b/lisp/dired.el
index a45395ecef9..0ba369e4640 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -50,13 +50,13 @@
50 50
51;;;###autoload 51;;;###autoload
52(defcustom dired-listing-switches "-al" 52(defcustom dired-listing-switches "-al"
53 "*Switches passed to `ls' for dired. MUST contain the `l' option. 53 "*Switches passed to `ls' for Dired. MUST contain the `l' option.
54May contain all other options that don't contradict `-l'; 54May contain all other options that don't contradict `-l';
55may contain even `F', `b', `i' and `s'. See also the variable 55may contain even `F', `b', `i' and `s'. See also the variable
56`dired-ls-F-marks-symlinks' concerning the `F' switch. 56`dired-ls-F-marks-symlinks' concerning the `F' switch.
57On systems such as MS-DOS and MS-Windows, which use `ls' emulation in Lisp, 57On systems such as MS-DOS and MS-Windows, which use `ls' emulation in Lisp,
58some of the `ls' switches are not supported; see the doc string of 58some of the `ls' switches are not supported; see the doc string of
59`insert-directory' on ls-lisp.el for more details." 59`insert-directory' on `ls-lisp.el' for more details."
60 :type 'string 60 :type 'string
61 :group 'dired) 61 :group 'dired)
62 62
@@ -88,7 +88,7 @@ If nil, `dired-listing-switches' is used.")
88 88
89;;;###autoload 89;;;###autoload
90(defcustom dired-ls-F-marks-symlinks nil 90(defcustom dired-ls-F-marks-symlinks nil
91 "*Informs dired about how `ls -lF' marks symbolic links. 91 "*Informs Dired about how `ls -lF' marks symbolic links.
92Set this to t if `ls' (or whatever program is specified by 92Set this to t if `ls' (or whatever program is specified by
93`insert-directory-program') with `-lF' marks the symbolic link 93`insert-directory-program') with `-lF' marks the symbolic link
94itself with a trailing @ (usually the case under Ultrix). 94itself with a trailing @ (usually the case under Ultrix).
@@ -153,7 +153,7 @@ If a character, new links are unconditionally marked with that character."
153 153
154;;;###autoload 154;;;###autoload
155(defcustom dired-dwim-target nil 155(defcustom dired-dwim-target nil
156 "*If non-nil, dired tries to guess a default target directory. 156 "*If non-nil, Dired tries to guess a default target directory.
157This means: if there is a dired buffer displayed in the next window, 157This means: if there is a dired buffer displayed in the next window,
158use its current subdir, instead of the current subdir of this dired buffer. 158use its current subdir, instead of the current subdir of this dired buffer.
159 159
@@ -176,13 +176,13 @@ The target is used in the prompt for file copy, rename etc."
176;;; Hook variables 176;;; Hook variables
177 177
178(defcustom dired-load-hook nil 178(defcustom dired-load-hook nil
179 "Run after loading dired. 179 "Run after loading Dired.
180You can customize key bindings or load extensions with this." 180You can customize key bindings or load extensions with this."
181 :group 'dired 181 :group 'dired
182 :type 'hook) 182 :type 'hook)
183 183
184(defcustom dired-mode-hook nil 184(defcustom dired-mode-hook nil
185 "Run at the very end of dired-mode." 185 "Run at the very end of `dired-mode'."
186 :group 'dired 186 :group 'dired
187 :type 'hook) 187 :type 'hook)
188 188
@@ -229,8 +229,7 @@ This is what the do-commands look for, and what the mark-commands store.")
229(defvar dired-del-marker ?D 229(defvar dired-del-marker ?D
230 "Character used to flag files for deletion.") 230 "Character used to flag files for deletion.")
231 231
232(defvar dired-shrink-to-fit 232(defvar dired-shrink-to-fit t
233 t
234;; I see no reason ever to make this nil -- rms. 233;; I see no reason ever to make this nil -- rms.
235;; (> baud-rate search-slow-speed) 234;; (> baud-rate search-slow-speed)
236 "Non-nil means Dired shrinks the display buffer to fit the marked files.") 235 "Non-nil means Dired shrinks the display buffer to fit the marked files.")
@@ -241,7 +240,7 @@ This is what the do-commands look for, and what the mark-commands store.")
241 240
242;;;###autoload 241;;;###autoload
243(defvar dired-directory nil 242(defvar dired-directory nil
244 "The directory name or wildcard spec that this Dired directory lists. 243 "The directory name or wildcard spec that this dired directory lists.
245Local to each dired buffer. May be a list, in which case the car is the 244Local to each dired buffer. May be a list, in which case the car is the
246directory name and the cdr is the list of files to mention. 245directory name and the cdr is the list of files to mention.
247The directory name must be absolute, but need not be fully expanded.") 246The directory name must be absolute, but need not be fully expanded.")
@@ -295,7 +294,7 @@ of the line (\\n or \\r).
295Subexpression 2 must end right before the \\n or \\r.") 294Subexpression 2 must end right before the \\n or \\r.")
296 295
297(defgroup dired-faces nil 296(defgroup dired-faces nil
298 "Faces used by dired." 297 "Faces used by Dired."
299 :group 'dired 298 :group 'dired
300 :group 'faces) 299 :group 'faces)
301 300
@@ -598,7 +597,7 @@ list of files to make directory entries for.
598You can move around in it with the usual commands. 597You can move around in it with the usual commands.
599You can flag files for deletion with \\[dired-flag-file-deletion] and then 598You can flag files for deletion with \\[dired-flag-file-deletion] and then
600delete them by typing \\[dired-do-flagged-delete]. 599delete them by typing \\[dired-do-flagged-delete].
601Type \\[describe-mode] after entering dired for more info. 600Type \\[describe-mode] after entering Dired for more info.
602 601
603If DIRNAME is already in a dired buffer, that buffer is used without refresh." 602If DIRNAME is already in a dired buffer, that buffer is used without refresh."
604 ;; Cannot use (interactive "D") because of wildcards. 603 ;; Cannot use (interactive "D") because of wildcards.
@@ -911,7 +910,7 @@ BEG..END is the line where the file info is located."
911 (move-to-column curcol) 910 (move-to-column curcol)
912 (when (looking-at 911 (when (looking-at
913 (concat 912 (concat
914 (if (eq (char-before) ?\ ) " *" "[^ ]* *") 913 (if (eq (char-before) ?\s) " *" "[^ ]* *")
915 (if num-align "[0-9][^ ]*"))) 914 (if num-align "[0-9][^ ]*")))
916 (- (match-end 0) (match-beginning 0))))) 915 (- (match-end 0) (match-beginning 0)))))
917 ;; Now, the number of spaces to insert is align-pt-offset 916 ;; Now, the number of spaces to insert is align-pt-offset
@@ -1020,7 +1019,7 @@ If HDR is non-nil, insert a header line with the directory name."
1020 1019
1021(defun dired-revert (&optional arg noconfirm) 1020(defun dired-revert (&optional arg noconfirm)
1022 "Reread the dired buffer. 1021 "Reread the dired buffer.
1023Must also be called after dired-actual-switches have changed. 1022Must also be called after `dired-actual-switches' have changed.
1024Should not fail even on completely garbaged buffers. 1023Should not fail even on completely garbaged buffers.
1025Preserves old cursor, marks/flags, hidden-p." 1024Preserves old cursor, marks/flags, hidden-p."
1026 (widen) ; just in case user narrowed 1025 (widen) ; just in case user narrowed
@@ -1500,12 +1499,12 @@ Type \\[dired-find-file-other-window] to find file or dired directory in Other w
1500Type \\[dired-maybe-insert-subdir] to Insert a subdirectory in this buffer. 1499Type \\[dired-maybe-insert-subdir] to Insert a subdirectory in this buffer.
1501Type \\[dired-do-rename] to Rename a file or move the marked files to another directory. 1500Type \\[dired-do-rename] to Rename a file or move the marked files to another directory.
1502Type \\[dired-do-copy] to Copy files. 1501Type \\[dired-do-copy] to Copy files.
1503Type \\[dired-sort-toggle-or-edit] to toggle sorting by name/date or change the `ls' switches. 1502Type \\[dired-sort-toggle-or-edit] to toggle Sorting by name/date or change the `ls' switches.
1504Type \\[revert-buffer] to read all currently expanded directories again. 1503Type \\[revert-buffer] to read all currently expanded directories aGain.
1505 This retains all marks and hides subdirs again that were hidden before. 1504 This retains all marks and hides subdirs again that were hidden before.
1506SPC and DEL can be used to move down and up by lines. 1505SPC and DEL can be used to move down and up by lines.
1507 1506
1508If dired ever gets confused, you can either type \\[revert-buffer] \ 1507If Dired ever gets confused, you can either type \\[revert-buffer] \
1509to read the 1508to read the
1510directories again, type \\[dired-do-redisplay] \ 1509directories again, type \\[dired-do-redisplay] \
1511to relist a single or the marked files or a 1510to relist a single or the marked files or a
@@ -1575,7 +1574,7 @@ Keybindings:
1575;; Idiosyncratic dired commands that don't deal with marks. 1574;; Idiosyncratic dired commands that don't deal with marks.
1576 1575
1577(defun dired-summary () 1576(defun dired-summary ()
1578 "Summarize basic Dired commands and show recent Dired errors." 1577 "Summarize basic Dired commands and show recent dired errors."
1579 (interactive) 1578 (interactive)
1580 (dired-why) 1579 (dired-why)
1581 ;>> this should check the key-bindings and use substitute-command-keys if non-standard 1580 ;>> this should check the key-bindings and use substitute-command-keys if non-standard
@@ -1590,7 +1589,7 @@ You can use it to recover marks, killed lines or subdirs."
1590 (let (buffer-read-only) 1589 (let (buffer-read-only)
1591 (undo)) 1590 (undo))
1592 (dired-build-subdir-alist) 1591 (dired-build-subdir-alist)
1593 (message "Change in Dired buffer undone. 1592 (message "Change in dired buffer undone.
1594Actual changes in files cannot be undone by Emacs.")) 1593Actual changes in files cannot be undone by Emacs."))
1595 1594
1596(defun dired-next-line (arg) 1595(defun dired-next-line (arg)
@@ -1654,7 +1653,7 @@ Creates a buffer if necessary."
1654 file-name 1653 file-name
1655 (if (file-symlink-p file-name) 1654 (if (file-symlink-p file-name)
1656 (error "File is a symlink to a nonexistent target") 1655 (error "File is a symlink to a nonexistent target")
1657 (error "File no longer exists; type `g' to update Dired buffer"))))) 1656 (error "File no longer exists; type `g' to update dired buffer")))))
1658 1657
1659;; Force `f' rather than `e' in the mode doc: 1658;; Force `f' rather than `e' in the mode doc:
1660(defalias 'dired-advertised-find-file 'dired-find-file) 1659(defalias 'dired-advertised-find-file 'dired-find-file)
@@ -1696,7 +1695,7 @@ Creates a buffer if necessary."
1696 (find-file-other-window (file-name-sans-versions file t))))) 1695 (find-file-other-window (file-name-sans-versions file t)))))
1697 1696
1698(defun dired-view-file () 1697(defun dired-view-file ()
1699 "In Dired, examine a file in view mode, returning to dired when done. 1698 "In Dired, examine a file in view mode, returning to Dired when done.
1700When file is a directory, show it in this buffer if it is inserted. 1699When file is a directory, show it in this buffer if it is inserted.
1701Otherwise, display it in another buffer." 1700Otherwise, display it in another buffer."
1702 (interactive) 1701 (interactive)
@@ -1976,7 +1975,7 @@ Return the position of the beginning of the filename, or nil if none found."
1976 "Copy names of marked (or next ARG) files into the kill ring. 1975 "Copy names of marked (or next ARG) files into the kill ring.
1977The names are separated by a space. 1976The names are separated by a space.
1978With a zero prefix arg, use the absolute file name of each marked file. 1977With a zero prefix arg, use the absolute file name of each marked file.
1979With \\[universal-argument], use the file name relative to the Dired buffer's 1978With \\[universal-argument], use the file name relative to the dired buffer's
1980`default-directory'. (This still may contain slashes if in a subdirectory.) 1979`default-directory'. (This still may contain slashes if in a subdirectory.)
1981 1980
1982If on a subdir headerline, use absolute subdirname instead; 1981If on a subdir headerline, use absolute subdirname instead;
@@ -2361,7 +2360,7 @@ Anything else means ask for each directory."
2361(defun dired-delete-file (file &optional recursive) "\ 2360(defun dired-delete-file (file &optional recursive) "\
2362Delete FILE or directory (possibly recursively if optional RECURSIVE is true.) 2361Delete FILE or directory (possibly recursively if optional RECURSIVE is true.)
2363RECURSIVE determines what to do with a non-empty directory. If RECURSIVE is: 2362RECURSIVE determines what to do with a non-empty directory. If RECURSIVE is:
2364Nil, do not delete. 2363nil, do not delete.
2365`always', delete recursively without asking. 2364`always', delete recursively without asking.
2366`top', ask for each directory at top level. 2365`top', ask for each directory at top level.
2367Anything else, ask for each sub-directory." 2366Anything else, ask for each sub-directory."
@@ -2554,7 +2553,7 @@ if there are no flagged files."
2554 ))) 2553 )))
2555 2554
2556(defvar dired-no-confirm nil 2555(defvar dired-no-confirm nil
2557 "A list of symbols for commands dired should not confirm. 2556 "A list of symbols for commands Dired should not confirm.
2558Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress', 2557Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress',
2559`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink', 2558`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink',
2560`touch' and `uncompress'.") 2559`touch' and `uncompress'.")
@@ -2891,7 +2890,7 @@ A prefix argument says to unflag those files instead."
2891 "Flag all backup files (names ending with `~') for deletion. 2890 "Flag all backup files (names ending with `~') for deletion.
2892With prefix argument, unflag these files." 2891With prefix argument, unflag these files."
2893 (interactive "P") 2892 (interactive "P")
2894 (let ((dired-marker-char (if unflag-p ?\ dired-del-marker))) 2893 (let ((dired-marker-char (if unflag-p ?\s dired-del-marker)))
2895 (dired-mark-if 2894 (dired-mark-if
2896 ;; Don't call backup-file-name-p unless the last character looks like 2895 ;; Don't call backup-file-name-p unless the last character looks like
2897 ;; it might be the end of a backup file name. This isn't very general, 2896 ;; it might be the end of a backup file name. This isn't very general,
@@ -2925,7 +2924,7 @@ OLD and NEW are both characters used to mark files."
2925 (save-excursion 2924 (save-excursion
2926 (goto-char (point-min)) 2925 (goto-char (point-min))
2927 (while (search-forward string nil t) 2926 (while (search-forward string nil t)
2928 (if (if (= old ?\ ) 2927 (if (if (= old ?\s)
2929 (save-match-data 2928 (save-match-data
2930 (dired-get-filename 'no-dir t)) 2929 (dired-get-filename 'no-dir t))
2931 t) 2930 t)
@@ -2933,7 +2932,7 @@ OLD and NEW are both characters used to mark files."
2933 (match-end 0) old new))))))) 2932 (match-end 0) old new)))))))
2934 2933
2935(defun dired-unmark-all-marks () 2934(defun dired-unmark-all-marks ()
2936 "Remove all marks from all files in the Dired buffer." 2935 "Remove all marks from all files in the dired buffer."
2937 (interactive) 2936 (interactive)
2938 (dired-unmark-all-files ?\r)) 2937 (dired-unmark-all-files ?\r))
2939 2938
@@ -2961,7 +2960,7 @@ Type SPC or `y' to unmark one file, DEL or `n' to skip to next,
2961 (dired-query 'query "Unmark file `%s'? " 2960 (dired-query 'query "Unmark file `%s'? "
2962 file)))) 2961 file))))
2963 (progn (subst-char-in-region (1- (point)) (point) 2962 (progn (subst-char-in-region (1- (point)) (point)
2964 (preceding-char) ?\ ) 2963 (preceding-char) ?\s)
2965 (setq count (1+ count))))) 2964 (setq count (1+ count)))))
2966 (message (if (= count 1) "1 mark removed" 2965 (message (if (= count 1) "1 mark removed"
2967 "%d marks removed") 2966 "%d marks removed")
@@ -3004,7 +3003,7 @@ Thus, use \\[backward-page] to find the beginning of a group of errors."
3004 (apply (function format) log args) 3003 (apply (function format) log args)
3005 log))) 3004 log)))
3006 ((bufferp log) 3005 ((bufferp log)
3007 (insert-buffer log)) 3006 (insert-buffer-substring log))
3008 ((eq t log) 3007 ((eq t log)
3009 (backward-page 1) 3008 (backward-page 1)
3010 (unless (bolp) 3009 (unless (bolp)
@@ -3048,15 +3047,15 @@ format, use `\\[universal-argument] \\[dired]'.")
3048(defvar dired-sort-by-date-regexp 3047(defvar dired-sort-by-date-regexp
3049 (concat "^-[^" dired-ls-sorting-switches 3048 (concat "^-[^" dired-ls-sorting-switches
3050 "]*t[^" dired-ls-sorting-switches "]*$") 3049 "]*t[^" dired-ls-sorting-switches "]*$")
3051 "Regexp recognized by dired to set `by date' mode.") 3050 "Regexp recognized by Dired to set `by date' mode.")
3052 3051
3053(defvar dired-sort-by-name-regexp 3052(defvar dired-sort-by-name-regexp
3054 (concat "^-[^t" dired-ls-sorting-switches "]+$") 3053 (concat "^-[^t" dired-ls-sorting-switches "]+$")
3055 "Regexp recognized by dired to set `by name' mode.") 3054 "Regexp recognized by Dired to set `by name' mode.")
3056 3055
3057(defvar dired-sort-inhibit nil 3056(defvar dired-sort-inhibit nil
3058 "Non-nil means the Dired sort command is disabled. 3057 "Non-nil means the Dired sort command is disabled.
3059The idea is to set this buffer-locally in special Dired buffers.") 3058The idea is to set this buffer-locally in special dired buffers.")
3060 3059
3061(defun dired-sort-set-modeline () 3060(defun dired-sort-set-modeline ()
3062 ;; Set modeline display according to dired-actual-switches. 3061 ;; Set modeline display according to dired-actual-switches.
@@ -3078,7 +3077,7 @@ The idea is to set this buffer-locally in special Dired buffers.")
3078With a prefix argument you can edit the current listing switches instead." 3077With a prefix argument you can edit the current listing switches instead."
3079 (interactive "P") 3078 (interactive "P")
3080 (when dired-sort-inhibit 3079 (when dired-sort-inhibit
3081 (error "Cannot sort this Dired buffer")) 3080 (error "Cannot sort this dired buffer"))
3082 (if arg 3081 (if arg
3083 (dired-sort-other 3082 (dired-sort-other
3084 (read-string "ls switches (must contain -l): " dired-actual-switches)) 3083 (read-string "ls switches (must contain -l): " dired-actual-switches))
@@ -3121,7 +3120,7 @@ With a prefix argument you can edit the current listing switches instead."
3121 (concat result (substring string start)))) 3120 (concat result (substring string start))))
3122 3121
3123(defun dired-sort-other (switches &optional no-revert) 3122(defun dired-sort-other (switches &optional no-revert)
3124 "Specify new ls SWITCHES for current dired buffer. 3123 "Specify new `ls' SWITCHES for current dired buffer.
3125Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp' 3124Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp'
3126set the minor mode accordingly, others appear literally in the mode line. 3125set the minor mode accordingly, others appear literally in the mode line.
3127With optional second arg NO-REVERT, don't refresh the listing afterwards." 3126With optional second arg NO-REVERT, don't refresh the listing afterwards."
@@ -3262,7 +3261,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3262 ;; Directory name followed by list of files. 3261 ;; Directory name followed by list of files.
3263 (cons (desktop-file-name (car dired-directory) desktop-dirname) 3262 (cons (desktop-file-name (car dired-directory) desktop-dirname)
3264 (cdr dired-directory)) 3263 (cdr dired-directory))
3265 ;; Directory name, optionally with with shell wildcard. 3264 ;; Directory name, optionally with shell wildcard.
3266 (desktop-file-name dired-directory desktop-dirname)) 3265 (desktop-file-name dired-directory desktop-dirname))
3267 ;; Subdirectories in `dired-subdir-alist'. 3266 ;; Subdirectories in `dired-subdir-alist'.
3268 (cdr 3267 (cdr
@@ -3277,7 +3276,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3277 desktop-buffer-misc) 3276 desktop-buffer-misc)
3278 "Restore a dired buffer specified in a desktop file." 3277 "Restore a dired buffer specified in a desktop file."
3279 ;; First element of `desktop-buffer-misc' is the value of `dired-directory'. 3278 ;; First element of `desktop-buffer-misc' is the value of `dired-directory'.
3280 ;; This value is a directory name, optionally with with shell wildcard or 3279 ;; This value is a directory name, optionally with shell wildcard or
3281 ;; a directory name followed by list of files. 3280 ;; a directory name followed by list of files.
3282 (let* ((dired-dir (car desktop-buffer-misc)) 3281 (let* ((dired-dir (car desktop-buffer-misc))
3283 (dir (if (consp dired-dir) (car dired-dir) dired-dir))) 3282 (dir (if (consp dired-dir) (car dired-dir) dired-dir)))
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index 5ae76f91316..e9bcab6e4e8 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -133,8 +133,8 @@
133(defcustom dirtrack-list (list "^emacs \\([a-zA-Z]:.*\\)>" 1) 133(defcustom dirtrack-list (list "^emacs \\([a-zA-Z]:.*\\)>" 1)
134 "*List for directory tracking. 134 "*List for directory tracking.
135First item is a regexp that describes where to find the path in a prompt. 135First item is a regexp that describes where to find the path in a prompt.
136Second is a number, the regexp group to match. Optional third item is 136Second is a number, the regexp group to match. Optional third item is
137whether the prompt is multi-line. If nil or omitted, prompt is assumed to 137whether the prompt is multi-line. If nil or omitted, prompt is assumed to
138be on a single line." 138be on a single line."
139 :group 'dirtrack 139 :group 'dirtrack
140 :type '(sexp (regexp :tag "Prompt Expression") 140 :type '(sexp (regexp :tag "Prompt Expression")
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el
index 6d6b36692bc..ef859eb9b20 100644
--- a/lisp/ediff-diff.el
+++ b/lisp/ediff-diff.el
@@ -30,6 +30,7 @@
30;; compiler pacifier 30;; compiler pacifier
31(defvar ediff-default-variant) 31(defvar ediff-default-variant)
32(defvar null-device) 32(defvar null-device)
33(defvar longlines-mode)
33 34
34(eval-when-compile 35(eval-when-compile
35 (let ((load-path (cons (expand-file-name ".") load-path))) 36 (let ((load-path (cons (expand-file-name ".") load-path)))
diff --git a/lisp/ediff.el b/lisp/ediff.el
index f842e9dec6c..1bf52b1c59f 100644
--- a/lisp/ediff.el
+++ b/lisp/ediff.el
@@ -1357,11 +1357,13 @@ buffer. If odd -- assume it is in a file."
1357 1357
1358;;;###autoload 1358;;;###autoload
1359(defun ediff-patch-buffer (&optional arg patch-buf) 1359(defun ediff-patch-buffer (&optional arg patch-buf)
1360 "Run Ediff by patching BUFFER-NAME. 1360 "Run Ediff by patching the buffer specified at prompt.
1361Without prefix argument: asks if the patch is in some buffer and prompts for 1361Without the optional prefix ARG, asks if the patch is in some buffer and
1362the buffer or a file, depending on the answer. 1362prompts for the buffer or a file, depending on the answer.
1363With prefix arg=1: assumes the patch is in a file and prompts for the file. 1363With ARG=1, assumes the patch is in a file and prompts for the file.
1364With prefix arg=2: assumes the patch is in a buffer and prompts for the buffer." 1364With ARG=2, assumes the patch is in a buffer and prompts for the buffer.
1365PATCH-BUF is an optional argument, which specifies the buffer that contains the
1366patch. If not given, the user is prompted according to the prefix argument."
1365 (interactive "P") 1367 (interactive "P")
1366 (require 'ediff-ptch) 1368 (require 'ediff-ptch)
1367 (setq patch-buf 1369 (setq patch-buf
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 6aff16143b3..1094b1b8cb1 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -358,7 +358,7 @@ Elements of the list may be be:
358 358
359(defvar byte-compile-interactive-only-functions 359(defvar byte-compile-interactive-only-functions
360 '(beginning-of-buffer end-of-buffer replace-string replace-regexp 360 '(beginning-of-buffer end-of-buffer replace-string replace-regexp
361 insert-file) 361 insert-file insert-buffer insert-file-literally)
362 "List of commands that are not meant to be called from Lisp.") 362 "List of commands that are not meant to be called from Lisp.")
363 363
364(defvar byte-compile-not-obsolete-var nil 364(defvar byte-compile-not-obsolete-var nil
@@ -3355,12 +3355,12 @@ That command is designed for interactive use only" fn))
3355 "Execute forms in BODY, potentially guarded by CONDITION. 3355 "Execute forms in BODY, potentially guarded by CONDITION.
3356CONDITION is a variable whose value is a test in an `if' or `cond'. 3356CONDITION is a variable whose value is a test in an `if' or `cond'.
3357BODY is the code to compile first arm of the if or the body of the 3357BODY is the code to compile first arm of the if or the body of the
3358cond clause. If CONDITION's value is of the form `(foundp 'foo)' 3358cond clause. If CONDITION's value is of the form (fboundp 'foo)
3359or `(boundp 'foo)', the relevant warnings from BODY about foo 3359or (boundp 'foo), the relevant warnings from BODY about foo's
3360being undefined will be suppressed. 3360being undefined will be suppressed.
3361 3361
3362If CONDITION's value is `(featurep 'xemacs)', that suppresses all 3362If CONDITION's value is (not (featurep 'emacs)) or (featurep 'xemacs),
3363warnings during execution of BODY." 3363that suppresses all warnings during execution of BODY."
3364 (declare (indent 1) (debug t)) 3364 (declare (indent 1) (debug t))
3365 `(let* ((fbound 3365 `(let* ((fbound
3366 (if (eq 'fboundp (car-safe ,condition)) 3366 (if (eq 'fboundp (car-safe ,condition))
@@ -3379,8 +3379,10 @@ warnings during execution of BODY."
3379 (if bound 3379 (if bound
3380 (cons bound byte-compile-bound-variables) 3380 (cons bound byte-compile-bound-variables)
3381 byte-compile-bound-variables)) 3381 byte-compile-bound-variables))
3382 ;; Suppress all warnings, for code not used in Emacs.
3382 (byte-compile-warnings 3383 (byte-compile-warnings
3383 (if (equal ,condition '(featurep 'xemacs)) 3384 (if (member ,condition '((featurep 'xemacs)
3385 (not (featurep 'emacs))))
3384 nil byte-compile-warnings))) 3386 nil byte-compile-warnings)))
3385 (unwind-protect 3387 (unwind-protect
3386 (progn ,@body) 3388 (progn ,@body)
@@ -3409,7 +3411,8 @@ warnings during execution of BODY."
3409 (byte-compile-form (nth 2 form) for-effect)) 3411 (byte-compile-form (nth 2 form) for-effect))
3410 (byte-compile-goto 'byte-goto donetag) 3412 (byte-compile-goto 'byte-goto donetag)
3411 (byte-compile-out-tag elsetag) 3413 (byte-compile-out-tag elsetag)
3412 (byte-compile-body (cdr (cdr (cdr form))) for-effect) 3414 (byte-compile-maybe-guarded (list 'not clause)
3415 (byte-compile-body (cdr (cdr (cdr form))) for-effect))
3413 (byte-compile-out-tag donetag)))) 3416 (byte-compile-out-tag donetag))))
3414 (setq for-effect nil)) 3417 (setq for-effect nil))
3415 3418
@@ -3450,24 +3453,38 @@ warnings during execution of BODY."
3450 (args (cdr form))) 3453 (args (cdr form)))
3451 (if (null args) 3454 (if (null args)
3452 (byte-compile-form-do-effect t) 3455 (byte-compile-form-do-effect t)
3453 (while (cdr args) 3456 (byte-compile-and-recursion args failtag))))
3454 (byte-compile-form (car args)) 3457
3458;; Handle compilation of a nontrivial `and' call.
3459;; We use tail recursion so we can use byte-compile-maybe-guarded.
3460(defun byte-compile-and-recursion (rest failtag)
3461 (if (cdr rest)
3462 (progn
3463 (byte-compile-form (car rest))
3455 (byte-compile-goto-if nil for-effect failtag) 3464 (byte-compile-goto-if nil for-effect failtag)
3456 (setq args (cdr args))) 3465 (byte-compile-maybe-guarded (car rest)
3457 (byte-compile-form-do-effect (car args)) 3466 (byte-compile-and-recursion (cdr rest) failtag)))
3458 (byte-compile-out-tag failtag)))) 3467 (byte-compile-form-do-effect (car rest))
3468 (byte-compile-out-tag failtag)))
3459 3469
3460(defun byte-compile-or (form) 3470(defun byte-compile-or (form)
3461 (let ((wintag (byte-compile-make-tag)) 3471 (let ((wintag (byte-compile-make-tag))
3462 (args (cdr form))) 3472 (args (cdr form)))
3463 (if (null args) 3473 (if (null args)
3464 (byte-compile-form-do-effect nil) 3474 (byte-compile-form-do-effect nil)
3465 (while (cdr args) 3475 (byte-compile-or-recursion args wintag))))
3466 (byte-compile-form (car args)) 3476
3477;; Handle compilation of a nontrivial `or' call.
3478;; We use tail recursion so we can use byte-compile-maybe-guarded.
3479(defun byte-compile-or-recursion (rest wintag)
3480 (if (cdr rest)
3481 (progn
3482 (byte-compile-form (car rest))
3467 (byte-compile-goto-if t for-effect wintag) 3483 (byte-compile-goto-if t for-effect wintag)
3468 (setq args (cdr args))) 3484 (byte-compile-maybe-guarded (list 'not (car rest))
3469 (byte-compile-form-do-effect (car args)) 3485 (byte-compile-or-recursion (cdr rest) wintag)))
3470 (byte-compile-out-tag wintag)))) 3486 (byte-compile-form-do-effect (car rest))
3487 (byte-compile-out-tag wintag)))
3471 3488
3472(defun byte-compile-while (form) 3489(defun byte-compile-while (form)
3473 (let ((endtag (byte-compile-make-tag)) 3490 (let ((endtag (byte-compile-make-tag))
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 6534af050f3..2ed1f9b552b 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -430,32 +430,20 @@ be re-created.")
430 430
431;;; Compatibility 431;;; Compatibility
432;; 432;;
433(if (string-match "X[Ee]macs" emacs-version) 433(defalias 'checkdoc-make-overlay
434 (progn 434 (if (featurep 'xemacs) 'make-extent 'make-overlay))
435 (defalias 'checkdoc-make-overlay 'make-extent) 435(defalias 'checkdoc-overlay-put
436 (defalias 'checkdoc-overlay-put 'set-extent-property) 436 (if (featurep 'xemacs) 'set-extent-property 'overlay-put))
437 (defalias 'checkdoc-delete-overlay 'delete-extent) 437(defalias 'checkdoc-delete-overlay
438 (defalias 'checkdoc-overlay-start 'extent-start) 438 (if (featurep 'xemacs) 'delete-extent 'delete-overlay))
439 (defalias 'checkdoc-overlay-end 'extent-end) 439(defalias 'checkdoc-overlay-start
440 (defalias 'checkdoc-mode-line-update 'redraw-modeline) 440 (if (featurep 'xemacs) 'extent-start 'overlay-start))
441 (defalias 'checkdoc-call-eval-buffer 'eval-buffer) 441(defalias 'checkdoc-overlay-end
442 ) 442 (if (featurep 'xemacs) 'extent-end 'overlay-end))
443 (defalias 'checkdoc-make-overlay 'make-overlay) 443(defalias 'checkdoc-mode-line-update
444 (defalias 'checkdoc-overlay-put 'overlay-put) 444 (if (featurep 'xemacs) 'redraw-modeline 'force-mode-line-update))
445 (defalias 'checkdoc-delete-overlay 'delete-overlay) 445(defalias 'checkdoc-char=
446 (defalias 'checkdoc-overlay-start 'overlay-start) 446 (if (featurep 'xemacs) 'char= '=))
447 (defalias 'checkdoc-overlay-end 'overlay-end)
448 (defalias 'checkdoc-mode-line-update 'force-mode-line-update)
449 (defalias 'checkdoc-call-eval-buffer 'eval-current-buffer)
450 )
451
452;; Emacs 20s have MULE characters which don't equate to numbers.
453(if (fboundp 'char=)
454 (defalias 'checkdoc-char= 'char=)
455 (defalias 'checkdoc-char= '=))
456
457;; Read events, not characters
458(defalias 'checkdoc-read-event 'read-event)
459 447
460;;; User level commands 448;;; User level commands
461;; 449;;
@@ -628,7 +616,7 @@ style."
628 (goto-char (checkdoc-error-start (car (car err-list)))) 616 (goto-char (checkdoc-error-start (car (car err-list))))
629 (if (not (pos-visible-in-window-p)) 617 (if (not (pos-visible-in-window-p))
630 (recenter (- (window-height) 2))) 618 (recenter (- (window-height) 2)))
631 (setq c (checkdoc-read-event))) 619 (setq c (read-event)))
632 (if (not (integerp c)) (setq c ??)) 620 (if (not (integerp c)) (setq c ??))
633 (cond 621 (cond
634 ;; Exit condition 622 ;; Exit condition
@@ -844,7 +832,7 @@ Evaluation is done first because good documentation for something that
844doesn't work is just not useful. Comments, doc strings, and rogue 832doesn't work is just not useful. Comments, doc strings, and rogue
845spacing are all verified." 833spacing are all verified."
846 (interactive) 834 (interactive)
847 (checkdoc-call-eval-buffer nil) 835 (eval-buffer nil)
848 (checkdoc-current-buffer t)) 836 (checkdoc-current-buffer t))
849 837
850;;;###autoload 838;;;###autoload
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index bc60bee0374..95d1846b30b 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2384,6 +2384,7 @@ The type name can then be used in `typecase', `check-type', etc."
2384 (cl-make-type-test val (funcall (get type 'cl-deftype-handler)))) 2384 (cl-make-type-test val (funcall (get type 'cl-deftype-handler))))
2385 ((memq type '(nil t)) type) 2385 ((memq type '(nil t)) type)
2386 ((eq type 'null) `(null ,val)) 2386 ((eq type 'null) `(null ,val))
2387 ((eq type 'atom) `(atom ,val))
2387 ((eq type 'float) `(floatp-safe ,val)) 2388 ((eq type 'float) `(floatp-safe ,val))
2388 ((eq type 'real) `(numberp ,val)) 2389 ((eq type 'real) `(numberp ,val))
2389 ((eq type 'fixnum) `(integerp ,val)) 2390 ((eq type 'fixnum) `(integerp ,val))
@@ -2398,7 +2399,7 @@ The type name can then be used in `typecase', `check-type', etc."
2398 (cl-make-type-test val (apply (get (car type) 'cl-deftype-handler) 2399 (cl-make-type-test val (apply (get (car type) 'cl-deftype-handler)
2399 (cdr type)))) 2400 (cdr type))))
2400 ((memq (car type) '(integer float real number)) 2401 ((memq (car type) '(integer float real number))
2401 (delq t (and (cl-make-type-test val (car type)) 2402 (delq t (list 'and (cl-make-type-test val (car type))
2402 (if (memq (cadr type) '(* nil)) t 2403 (if (memq (cadr type) '(* nil)) t
2403 (if (consp (cadr type)) (list '> val (caadr type)) 2404 (if (consp (cadr type)) (list '> val (caadr type))
2404 (list '>= val (cadr type)))) 2405 (list '>= val (cadr type))))
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index ef8e3288bbc..764f58bcd23 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -96,7 +96,7 @@
96;;; PRIVATE: defsubst must be defined before they are first used 96;;; PRIVATE: defsubst must be defined before they are first used
97 97
98(defsubst derived-mode-hook-name (mode) 98(defsubst derived-mode-hook-name (mode)
99 "Construct the mode hook name based on mode name MODE." 99 "Construct a mode-hook name based on a MODE name."
100 (intern (concat (symbol-name mode) "-hook"))) 100 (intern (concat (symbol-name mode) "-hook")))
101 101
102(defsubst derived-mode-map-name (mode) 102(defsubst derived-mode-map-name (mode)
@@ -382,18 +382,11 @@ Always merge its parent into it, since the merge is non-destructive."
382 (derived-mode-merge-abbrev-tables old-table new-table) 382 (derived-mode-merge-abbrev-tables old-table new-table)
383 (setq local-abbrev-table new-table))) 383 (setq local-abbrev-table new-table)))
384 384
385;;;(defun derived-mode-run-setup-function (mode)
386;;; "Run the setup function if it exists."
387
388;;; (let ((fname (derived-mode-setup-function-name mode)))
389;;; (if (fboundp fname)
390;;; (funcall fname))))
391
392(defun derived-mode-run-hooks (mode) 385(defun derived-mode-run-hooks (mode)
393 "Run the mode hook for MODE." 386 "Run the mode hook for MODE."
394 (let ((hooks-name (derived-mode-hook-name mode))) 387 (let ((hooks-name (derived-mode-hook-name mode)))
395 (if (boundp hooks-name) 388 (if (boundp hooks-name)
396 (run-hooks hooks-name)))) 389 (run-hooks hooks-name))))
397 390
398;; Functions to merge maps and tables. 391;; Functions to merge maps and tables.
399 392
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 3b4662277b6..09abd272e53 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -142,8 +142,10 @@ For example, you could write
142 (let* ((mode-name (symbol-name mode)) 142 (let* ((mode-name (symbol-name mode))
143 (pretty-name (easy-mmode-pretty-mode-name mode lighter)) 143 (pretty-name (easy-mmode-pretty-mode-name mode lighter))
144 (globalp nil) 144 (globalp nil)
145 (set nil)
145 (initialize nil) 146 (initialize nil)
146 (group nil) 147 (group nil)
148 (type nil)
147 (extra-args nil) 149 (extra-args nil)
148 (extra-keywords nil) 150 (extra-keywords nil)
149 (require t) 151 (require t)
@@ -160,8 +162,10 @@ For example, you could write
160 (:lighter (setq lighter (pop body))) 162 (:lighter (setq lighter (pop body)))
161 (:global (setq globalp (pop body))) 163 (:global (setq globalp (pop body)))
162 (:extra-args (setq extra-args (pop body))) 164 (:extra-args (setq extra-args (pop body)))
165 (:set (setq set (list :set (pop body))))
163 (:initialize (setq initialize (list :initialize (pop body)))) 166 (:initialize (setq initialize (list :initialize (pop body))))
164 (:group (setq group (nconc group (list :group (pop body))))) 167 (:group (setq group (nconc group (list :group (pop body)))))
168 (:type (setq type (list :type (pop body))))
165 (:require (setq require (pop body))) 169 (:require (setq require (pop body)))
166 (:keymap (setq keymap (pop body))) 170 (:keymap (setq keymap (pop body)))
167 (t (push keyw extra-keywords) (push (pop body) extra-keywords)))) 171 (t (push keyw extra-keywords) (push (pop body) extra-keywords))))
@@ -169,9 +173,10 @@ For example, you could write
169 (setq keymap-sym (if (and keymap (symbolp keymap)) keymap 173 (setq keymap-sym (if (and keymap (symbolp keymap)) keymap
170 (intern (concat mode-name "-map")))) 174 (intern (concat mode-name "-map"))))
171 175
176 (unless set (setq set '(:set 'custom-set-minor-mode)))
177
172 (unless initialize 178 (unless initialize
173 (setq initialize 179 (setq initialize '(:initialize 'custom-initialize-default)))
174 '(:initialize 'custom-initialize-default)))
175 180
176 (unless group 181 (unless group
177 ;; We might as well provide a best-guess default group. 182 ;; We might as well provide a best-guess default group.
@@ -179,6 +184,8 @@ For example, you could write
179 `(:group ',(intern (replace-regexp-in-string 184 `(:group ',(intern (replace-regexp-in-string
180 "-mode\\'" "" mode-name))))) 185 "-mode\\'" "" mode-name)))))
181 186
187 (unless type (setq type '(:type 'boolean)))
188
182 `(progn 189 `(progn
183 ;; Define the variable to enable or disable the mode. 190 ;; Define the variable to enable or disable the mode.
184 ,(if (not globalp) 191 ,(if (not globalp)
@@ -201,10 +208,10 @@ See the command `%s' for a description of this minor-mode."))
201 208
202 `(defcustom ,mode ,init-value 209 `(defcustom ,mode ,init-value
203 ,(format base-doc-string pretty-name mode mode) 210 ,(format base-doc-string pretty-name mode mode)
204 :set 'custom-set-minor-mode 211 ,@set
205 ,@initialize 212 ,@initialize
206 ,@group 213 ,@group
207 :type 'boolean 214 ,@type
208 ,@(cond 215 ,@(cond
209 ((not (and curfile require)) nil) 216 ((not (and curfile require)) nil)
210 ((not (eq require t)) `(:require ,require))) 217 ((not (eq require t)) `(:require ,require)))
@@ -260,12 +267,7 @@ With zero or negative ARG turn mode off.
260 (add-minor-mode ',mode ',lighter 267 (add-minor-mode ',mode ',lighter
261 ,(if keymap keymap-sym 268 ,(if keymap keymap-sym
262 `(if (boundp ',keymap-sym) 269 `(if (boundp ',keymap-sym)
263 (symbol-value ',keymap-sym)))) 270 (symbol-value ',keymap-sym)))))))
264
265 ;; If the mode is global, call the function according to the default.
266 ,(if globalp
267 `(if (and load-file-name (not (equal ,init-value ,mode)))
268 (eval-after-load load-file-name '(,mode (if ,mode 1 -1))))))))
269 271
270;;; 272;;;
271;;; make global minor mode 273;;; make global minor mode
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 1a592709819..f80e9f36dd0 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -243,9 +243,9 @@ Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol
243 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec))) 243 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec)))
244 244
245(defmacro def-edebug-form-spec (symbol spec-form) 245(defmacro def-edebug-form-spec (symbol spec-form)
246 "For compatibility with old version. Use `def-edebug-spec' instead." 246 "For compatibility with old version."
247 (message "Obsolete: use def-edebug-spec instead.")
248 (def-edebug-spec symbol (eval spec-form))) 247 (def-edebug-spec symbol (eval spec-form)))
248(make-obsolete 'def-edebug-form-spec 'def-edebug-spec "22.1")
249 249
250(defun get-edebug-spec (symbol) 250(defun get-edebug-spec (symbol)
251 ;; Get the spec of symbol resolving all indirection. 251 ;; Get the spec of symbol resolving all indirection.
@@ -3651,9 +3651,12 @@ Return the result of the last expression."
3651;; Replace printing functions. 3651;; Replace printing functions.
3652 3652
3653;; obsolete names 3653;; obsolete names
3654(defalias 'edebug-install-custom-print-funcs 'edebug-install-custom-print) 3654(define-obsolete-function-alias 'edebug-install-custom-print-funcs
3655(defalias 'edebug-reset-print-funcs 'edebug-uninstall-custom-print) 3655 'edebug-install-custom-print "22.1")
3656(defalias 'edebug-uninstall-custom-print-funcs 'edebug-uninstall-custom-print) 3656(define-obsolete-function-alias 'edebug-reset-print-funcs
3657 'edebug-uninstall-custom-print "22.1")
3658(define-obsolete-function-alias 'edebug-uninstall-custom-print-funcs
3659 'edebug-uninstall-custom-print "22.1")
3657 3660
3658(defun edebug-install-custom-print () 3661(defun edebug-install-custom-print ()
3659 "Replace print functions used by Edebug with custom versions." 3662 "Replace print functions used by Edebug with custom versions."
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 4c25acf49c3..945acaac73e 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -62,7 +62,7 @@
62 ;; (define-derived-mode foo ...), (define-minor-mode foo) 62 ;; (define-derived-mode foo ...), (define-minor-mode foo)
63 (concat 63 (concat
64 "^\\s-*(\\(def\\(ine-skeleton\\|ine-generic-mode\\|ine-derived-mode\\|\ 64 "^\\s-*(\\(def\\(ine-skeleton\\|ine-generic-mode\\|ine-derived-mode\\|\
65ine-minor-mode\\|un-cvs-mode\\|foo\\|[^cfgv]\\w+\\*?\\)\ 65ine-minor-mode\\|ine-compilation-mode\\|un-cvs-mode\\|foo\\|[^cfgv]\\w+\\*?\\)\
66\\|easy-mmode-define-global-mode\\|menu-bar-make-toggle\\)" 66\\|easy-mmode-define-global-mode\\|menu-bar-make-toggle\\)"
67 find-function-space-re 67 find-function-space-re
68 "\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)") 68 "\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)")
diff --git a/lisp/emacs-lisp/find-gc.el b/lisp/emacs-lisp/find-gc.el
index 1606395c673..8d3b0b02a4e 100644
--- a/lisp/emacs-lisp/find-gc.el
+++ b/lisp/emacs-lisp/find-gc.el
@@ -23,56 +23,86 @@
23 23
24;;; Commentary: 24;;; Commentary:
25 25
26;; Produce in unsafe-list the set of all functions that may invoke GC. 26;; Produce in find-gc-unsafe-list the set of all functions that may invoke GC.
27;; This expects the Emacs sources to live in emacs-source-directory. 27;; This expects the Emacs sources to live in find-gc-source-directory.
28;; It creates a temporary working directory /tmp/esrc. 28;; It creates a temporary working directory /tmp/esrc.
29 29
30;;; Code: 30;;; Code:
31 31
32(defvar find-gc-unsafe-list nil
33 "The list of unsafe functions is placed here by `find-gc-unsafe'.")
34
35(defvar find-gc-source-directory)
36
37(defvar find-gc-subrs-callers nil
38 "Alist of users of subrs, from GC testing.
39Each entry has the form (FUNCTION . FUNCTIONS-THAT-CALL-IT).")
40
41(defvar find-gc-subrs-called nil
42 "Alist of subrs called, in GC testing.
43Each entry has the form (FUNCTION . FUNCTIONS-IT-CALLS).")
44
45
46;;; Functions on this list are safe, even if they appear to be able
47;;; to call the target.
48
49(defvar find-gc-noreturn-list '(Fsignal Fthrow wrong_type_argument))
50
51;;; This was originally generated directory-files, but there were
52;;; too many files there that were not actually compiled. The
53;;; list below was created for a HP-UX 7.0 system.
54
55(defvar find-gc-source-files
56 '("dispnew.c" "scroll.c" "xdisp.c" "window.c"
57 "term.c" "cm.c" "emacs.c" "keyboard.c" "macros.c"
58 "keymap.c" "sysdep.c" "buffer.c" "filelock.c"
59 "insdel.c" "marker.c" "minibuf.c" "fileio.c"
60 "dired.c" "filemode.c" "cmds.c" "casefiddle.c"
61 "indent.c" "search.c" "regex.c" "undo.c"
62 "alloc.c" "data.c" "doc.c" "editfns.c"
63 "callint.c" "eval.c" "fns.c" "print.c" "lread.c"
64 "abbrev.c" "syntax.c" "unexec.c"
65 "bytecode.c" "process.c" "callproc.c" "doprnt.c"
66 "x11term.c" "x11fns.c"))
67
68
32(defun find-gc-unsafe () 69(defun find-gc-unsafe ()
70 "Return a list of unsafe functions--that is, which can call GC.
71Also store it in `find-gc-unsafe'."
33 (trace-call-tree nil) 72 (trace-call-tree nil)
34 (trace-use-tree) 73 (trace-use-tree)
35 (find-unsafe-funcs 'Fgarbage_collect) 74 (find-unsafe-funcs 'Fgarbage_collect)
36 (setq unsafe-list (sort unsafe-list 75 (setq find-gc-unsafe-list
37 (function (lambda (x y) 76 (sort find-gc-unsafe-list
38 (string-lessp (car x) (car y)))))) 77 (function (lambda (x y)
78 (string-lessp (car x) (car y))))))
39) 79)
40 80
41(setq emacs-source-directory "/usr/gnu/src/dist/src")
42
43
44;;; This does a depth-first search to find all functions that can 81;;; This does a depth-first search to find all functions that can
45;;; ultimately call the function "target". The result is an a-list 82;;; ultimately call the function "target". The result is an a-list
46;;; in unsafe-list; the cars are the unsafe functions, and the cdrs 83;;; in find-gc-unsafe-list; the cars are the unsafe functions, and the cdrs
47;;; are (one of) the unsafe functions that these functions directly 84;;; are (one of) the unsafe functions that these functions directly
48;;; call. 85;;; call.
49 86
50(defun find-unsafe-funcs (target) 87(defun find-unsafe-funcs (target)
51 (setq unsafe-list (list (list target))) 88 (setq find-gc-unsafe-list (list (list target)))
52 (trace-unsafe target) 89 (trace-unsafe target)
53) 90)
54 91
55(defun trace-unsafe (func) 92(defun trace-unsafe (func)
56 (let ((used (assq func subrs-used))) 93 (let ((used (assq func find-gc-subrs-callers)))
57 (or used 94 (or used
58 (error "No subrs-used for %s" (car unsafe-list))) 95 (error "No find-gc-subrs-callers for %s" (car find-gc-unsafe-list)))
59 (while (setq used (cdr used)) 96 (while (setq used (cdr used))
60 (or (assq (car used) unsafe-list) 97 (or (assq (car used) find-gc-unsafe-list)
61 (memq (car used) noreturn-list) 98 (memq (car used) find-gc-noreturn-list)
62 (progn 99 (progn
63 (setq unsafe-list (cons (cons (car used) func) unsafe-list)) 100 (push (cons (car used) func) find-gc-unsafe-list)
64 (trace-unsafe (car used)))))) 101 (trace-unsafe (car used))))))
65) 102)
66 103
67 104
68;;; Functions on this list are safe, even if they appear to be able
69;;; to call the target.
70
71(setq noreturn-list '( Fsignal Fthrow wrong_type_argument ))
72
73 105
74;;; This produces an a-list of functions in subrs-called. The cdr of
75;;; each entry is a list of functions which the function in car calls.
76 106
77(defun trace-call-tree (&optional already-setup) 107(defun trace-call-tree (&optional already-setup)
78 (message "Setting up directories...") 108 (message "Setting up directories...")
@@ -83,12 +113,12 @@
83 (call-process "csh" nil nil nil "-c" "mkdir /tmp/esrc") 113 (call-process "csh" nil nil nil "-c" "mkdir /tmp/esrc")
84 (call-process "csh" nil nil nil "-c" 114 (call-process "csh" nil nil nil "-c"
85 (format "ln -s %s/*.[ch] /tmp/esrc" 115 (format "ln -s %s/*.[ch] /tmp/esrc"
86 emacs-source-directory)))) 116 find-gc-source-directory))))
87 (save-excursion 117 (save-excursion
88 (set-buffer (get-buffer-create "*Trace Call Tree*")) 118 (set-buffer (get-buffer-create "*Trace Call Tree*"))
89 (setq subrs-called nil) 119 (setq find-gc-subrs-called nil)
90 (let ((case-fold-search nil) 120 (let ((case-fold-search nil)
91 (files source-files) 121 (files find-gc-source-files)
92 name entry) 122 name entry)
93 (while files 123 (while files
94 (message "Compiling %s..." (car files)) 124 (message "Compiling %s..." (car files))
@@ -105,7 +135,7 @@
105 (match-end 0)))) 135 (match-end 0))))
106 (message "%s : %s" (car files) name) 136 (message "%s : %s" (car files) name)
107 (setq entry (list name) 137 (setq entry (list name)
108 subrs-called (cons entry subrs-called))) 138 find-gc-subrs-called (cons entry find-gc-subrs-called)))
109 (if (looking-at ".*\n?.*\"\\([A-Za-z0-9_]+\\)\"") 139 (if (looking-at ".*\n?.*\"\\([A-Za-z0-9_]+\\)\"")
110 (progn 140 (progn
111 (setq name (intern (buffer-substring (match-beginning 1) 141 (setq name (intern (buffer-substring (match-beginning 1)
@@ -117,34 +147,14 @@
117) 147)
118 148
119 149
120;;; This was originally generated directory-files, but there were
121;;; too many files there that were not actually compiled. The
122;;; list below was created for a HP-UX 7.0 system.
123
124(setq source-files '("dispnew.c" "scroll.c" "xdisp.c" "window.c"
125 "term.c" "cm.c" "emacs.c" "keyboard.c" "macros.c"
126 "keymap.c" "sysdep.c" "buffer.c" "filelock.c"
127 "insdel.c" "marker.c" "minibuf.c" "fileio.c"
128 "dired.c" "filemode.c" "cmds.c" "casefiddle.c"
129 "indent.c" "search.c" "regex.c" "undo.c"
130 "alloc.c" "data.c" "doc.c" "editfns.c"
131 "callint.c" "eval.c" "fns.c" "print.c" "lread.c"
132 "abbrev.c" "syntax.c" "unexec.c"
133 "bytecode.c" "process.c" "callproc.c" "doprnt.c"
134 "x11term.c" "x11fns.c"))
135
136
137;;; This produces an inverted a-list in subrs-used. The cdr of each
138;;; entry is a list of functions that call the function in car.
139
140(defun trace-use-tree () 150(defun trace-use-tree ()
141 (setq subrs-used (mapcar 'list (mapcar 'car subrs-called))) 151 (setq find-gc-subrs-callers (mapcar 'list (mapcar 'car find-gc-subrs-called)))
142 (let ((ptr subrs-called) 152 (let ((ptr find-gc-subrs-called)
143 p2 found) 153 p2 found)
144 (while ptr 154 (while ptr
145 (setq p2 (car ptr)) 155 (setq p2 (car ptr))
146 (while (setq p2 (cdr p2)) 156 (while (setq p2 (cdr p2))
147 (if (setq found (assq (car p2) subrs-used)) 157 (if (setq found (assq (car p2) find-gc-subrs-callers))
148 (setcdr found (cons (car (car ptr)) (cdr found))))) 158 (setcdr found (cons (car (car ptr)) (cdr found)))))
149 (setq ptr (cdr ptr)))) 159 (setq ptr (cdr ptr))))
150) 160)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 8469aec1362..88e6319709b 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -54,8 +54,9 @@
54 (modify-syntax-entry ?\t " " table) 54 (modify-syntax-entry ?\t " " table)
55 (modify-syntax-entry ?\f " " table) 55 (modify-syntax-entry ?\f " " table)
56 (modify-syntax-entry ?\n "> " table) 56 (modify-syntax-entry ?\n "> " table)
57 ;; Give CR the same syntax as newline, for selective-display. 57;;; This is probably obsolete since nowadays such features use overlays.
58 (modify-syntax-entry ?\^m "> " table) 58;;; ;; Give CR the same syntax as newline, for selective-display.
59;;; (modify-syntax-entry ?\^m "> " table)
59 (modify-syntax-entry ?\; "< " table) 60 (modify-syntax-entry ?\; "< " table)
60 (modify-syntax-entry ?` "' " table) 61 (modify-syntax-entry ?` "' " table)
61 (modify-syntax-entry ?' "' " table) 62 (modify-syntax-entry ?' "' " table)
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 67a682358f4..bdfe79b3b6a 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -319,7 +319,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
319 ;; emacs/xemacs compatibility 319 ;; emacs/xemacs compatibility
320 (if (fboundp 'frame-parameter) 320 (if (fboundp 'frame-parameter)
321 (frame-parameter (selected-frame) 'display-type) 321 (frame-parameter (selected-frame) 'display-type)
322 (frame-property (selected-frame) 'display-type)))) 322 (if (fboundp 'frame-property)
323 (frame-property (selected-frame) 'display-type)))))
323 324
324(defsubst reb-lisp-syntax-p () 325(defsubst reb-lisp-syntax-p ()
325 "Return non-nil if RE Builder uses a Lisp syntax." 326 "Return non-nil if RE Builder uses a Lisp syntax."
@@ -331,10 +332,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
331 332
332;;; This is to help people find this in Apropos. 333;;; This is to help people find this in Apropos.
333;;;###autoload 334;;;###autoload
334(defun regexp-builder () 335(defalias 'regexp-builder 're-builder)
335 "Alias for `re-builder': Construct a regexp interactively."
336 (interactive)
337 (re-builder))
338 336
339;;;###autoload 337;;;###autoload
340(defun re-builder () 338(defun re-builder ()
@@ -610,7 +608,8 @@ optional fourth argument FORCE is non-nil."
610(defun reb-cook-regexp (re) 608(defun reb-cook-regexp (re)
611 "Return RE after processing it according to `reb-re-syntax'." 609 "Return RE after processing it according to `reb-re-syntax'."
612 (cond ((eq reb-re-syntax 'lisp-re) 610 (cond ((eq reb-re-syntax 'lisp-re)
613 (lre-compile-string (eval (car (read-from-string re))))) 611 (if (fboundp 'lre-compile-string)
612 (lre-compile-string (eval (car (read-from-string re))))))
614 ((eq reb-re-syntax 'sregex) 613 ((eq reb-re-syntax 'sregex)
615 (apply 'sregex (eval (car (read-from-string re))))) 614 (apply 'sregex (eval (car (read-from-string re)))))
616 ((eq reb-re-syntax 'rx) 615 ((eq reb-re-syntax 'rx)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 008a3c3ba49..49979ce3b78 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -62,7 +62,7 @@
62;; If you really need to perform a command which starts with one of 62;; If you really need to perform a command which starts with one of
63;; the prefix keys even when the region is active, you have three options: 63;; the prefix keys even when the region is active, you have three options:
64;; - press the prefix key twice very quickly (within 0.2 seconds), 64;; - press the prefix key twice very quickly (within 0.2 seconds),
65;; - press the prefix key and the following key within 0.2 seconds), or 65;; - press the prefix key and the following key within 0.2 seconds, or
66;; - use the SHIFT key with the prefix key, i.e. C-X or C-C 66;; - use the SHIFT key with the prefix key, i.e. C-X or C-C
67;; 67;;
68;; This behaviour can be customized via the 68;; This behaviour can be customized via the
@@ -274,7 +274,7 @@
274(defcustom cua-enable-cua-keys t 274(defcustom cua-enable-cua-keys t
275 "*Enable using C-z, C-x, C-c, and C-v for undo, cut, copy, and paste. 275 "*Enable using C-z, C-x, C-c, and C-v for undo, cut, copy, and paste.
276If the value is t, these mappings are always enabled. If the value is 276If the value is t, these mappings are always enabled. If the value is
277'shift, these keys are only enabled if the last region was marked with 277`shift', these keys are only enabled if the last region was marked with
278a shifted movement key. If the value is nil, these keys are never 278a shifted movement key. If the value is nil, these keys are never
279enabled." 279enabled."
280 :type '(choice (const :tag "Disabled" nil) 280 :type '(choice (const :tag "Disabled" nil)
@@ -314,9 +314,9 @@ If the value is nil, use a shifted prefix key to inhibit the override."
314 "*If non-nil, registers are supported via numeric prefix arg. 314 "*If non-nil, registers are supported via numeric prefix arg.
315If the value is t, any numeric prefix arg in the range 0 to 9 will be 315If the value is t, any numeric prefix arg in the range 0 to 9 will be
316interpreted as a register number. 316interpreted as a register number.
317If the value is not-ctrl-u, using C-u to enter a numeric prefix is not 317If the value is `not-ctrl-u', using C-u to enter a numeric prefix is not
318interpreted as a register number. 318interpreted as a register number.
319If the value is ctrl-u-only, only numeric prefix entered with C-u is 319If the value is `ctrl-u-only', only numeric prefix entered with C-u is
320interpreted as a register number." 320interpreted as a register number."
321 :type '(choice (const :tag "Disabled" nil) 321 :type '(choice (const :tag "Disabled" nil)
322 (const :tag "Enabled, but C-u arg is not a register" not-ctrl-u) 322 (const :tag "Enabled, but C-u arg is not a register" not-ctrl-u)
@@ -331,7 +331,7 @@ interpreted as a register number."
331 331
332(defcustom cua-use-hyper-key nil 332(defcustom cua-use-hyper-key nil
333 "*If non-nil, bind rectangle commands to H-... instead of M-.... 333 "*If non-nil, bind rectangle commands to H-... instead of M-....
334If set to 'also, toggle region command is also on C-return. 334If set to `also', toggle region command is also on C-return.
335Must be set prior to enabling CUA." 335Must be set prior to enabling CUA."
336 :type '(choice (const :tag "Meta key and C-return" nil) 336 :type '(choice (const :tag "Meta key and C-return" nil)
337 (const :tag "Hyper key only" only) 337 (const :tag "Hyper key only" only)
@@ -362,7 +362,7 @@ managers, so try setting this to nil, if prefix override doesn't work."
362 "*If non-nil, rectangles have virtual straight edges. 362 "*If non-nil, rectangles have virtual straight edges.
363Note that although rectangles are always DISPLAYED with straight edges, the 363Note that although rectangles are always DISPLAYED with straight edges, the
364buffer is NOT modified, until you execute a command that actually modifies it. 364buffer is NOT modified, until you execute a command that actually modifies it.
365\[M-p] toggles this feature when a rectangle is active." 365M-p toggles this feature when a rectangle is active."
366 :type 'boolean 366 :type 'boolean
367 :group 'cua) 367 :group 'cua)
368 368
@@ -1060,118 +1060,122 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1060 1060
1061;;; Pre-command hook 1061;;; Pre-command hook
1062 1062
1063(defun cua--pre-command-handler-1 ()
1064 (let ((movement (eq (get this-command 'CUA) 'move)))
1065
1066 ;; Cancel prefix key timeout if user enters another key.
1067 (when cua--prefix-override-timer
1068 (if (timerp cua--prefix-override-timer)
1069 (cancel-timer cua--prefix-override-timer))
1070 (setq cua--prefix-override-timer nil))
1071
1072 ;; Handle shifted cursor keys and other movement commands.
1073 ;; If region is not active, region is activated if key is shifted.
1074 ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC).
1075 ;; If rectangle is active, expand rectangle in specified direction and ignore the movement.
1076 (if movement
1077 (cond
1078 ((if window-system
1079 (memq 'shift (event-modifiers
1080 (aref (this-single-command-raw-keys) 0)))
1081 (or
1082 (memq 'shift (event-modifiers
1083 (aref (this-single-command-keys) 0)))
1084 ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home.
1085 (and (boundp 'function-key-map)
1086 function-key-map
1087 (let ((ev (lookup-key function-key-map
1088 (this-single-command-raw-keys))))
1089 (and (vector ev)
1090 (symbolp (setq ev (aref ev 0)))
1091 (string-match "S-" (symbol-name ev)))))))
1092 (unless mark-active
1093 (push-mark-command nil t))
1094 (setq cua--last-region-shifted t)
1095 (setq cua--explicit-region-start nil))
1096 ((or cua--explicit-region-start cua--rectangle)
1097 (unless mark-active
1098 (push-mark-command nil nil)))
1099 (t
1100 ;; If we set mark-active to nil here, the region highlight will not be
1101 ;; removed by the direct_output_ commands.
1102 (setq deactivate-mark t)))
1103
1104 ;; Handle delete-selection property on other commands
1105 (if (and mark-active (not deactivate-mark))
1106 (let* ((ds (or (get this-command 'delete-selection)
1107 (get this-command 'pending-delete)))
1108 (nc (cond
1109 ((not ds) nil)
1110 ((eq ds 'yank)
1111 'cua-paste)
1112 ((eq ds 'kill)
1113 (if cua--rectangle
1114 'cua-copy-rectangle
1115 'cua-copy-region))
1116 ((eq ds 'supersede)
1117 (if cua--rectangle
1118 'cua-delete-rectangle
1119 'cua-delete-region))
1120 (t
1121 (if cua--rectangle
1122 'cua-delete-rectangle ;; replace?
1123 'cua-replace-region)))))
1124 (if nc
1125 (setq this-original-command this-command
1126 this-command nc)))))
1127
1128 ;; Detect extension of rectangles by mouse or other movement
1129 (setq cua--buffer-and-point-before-command
1130 (if cua--rectangle (cons (current-buffer) (point))))))
1131
1063(defun cua--pre-command-handler () 1132(defun cua--pre-command-handler ()
1064 (condition-case nil 1133 (when cua-mode
1065 (let ((movement (eq (get this-command 'CUA) 'move))) 1134 (condition-case nil
1066 1135 (cua--pre-command-handler-1)
1067 ;; Cancel prefix key timeout if user enters another key. 1136 (error nil))))
1068 (when cua--prefix-override-timer
1069 (if (timerp cua--prefix-override-timer)
1070 (cancel-timer cua--prefix-override-timer))
1071 (setq cua--prefix-override-timer nil))
1072
1073 ;; Handle shifted cursor keys and other movement commands.
1074 ;; If region is not active, region is activated if key is shifted.
1075 ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC).
1076 ;; If rectangle is active, expand rectangle in specified direction and ignore the movement.
1077 (if movement
1078 (cond
1079 ((if window-system
1080 (memq 'shift (event-modifiers
1081 (aref (this-single-command-raw-keys) 0)))
1082 (or
1083 (memq 'shift (event-modifiers
1084 (aref (this-single-command-keys) 0)))
1085 ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home.
1086 (and (boundp 'function-key-map)
1087 function-key-map
1088 (let ((ev (lookup-key function-key-map
1089 (this-single-command-raw-keys))))
1090 (and (vector ev)
1091 (symbolp (setq ev (aref ev 0)))
1092 (string-match "S-" (symbol-name ev)))))))
1093 (unless mark-active
1094 (push-mark-command nil t))
1095 (setq cua--last-region-shifted t)
1096 (setq cua--explicit-region-start nil))
1097 ((or cua--explicit-region-start cua--rectangle)
1098 (unless mark-active
1099 (push-mark-command nil nil)))
1100 (t
1101 ;; If we set mark-active to nil here, the region highlight will not be
1102 ;; removed by the direct_output_ commands.
1103 (setq deactivate-mark t)))
1104
1105 ;; Handle delete-selection property on other commands
1106 (if (and mark-active (not deactivate-mark))
1107 (let* ((ds (or (get this-command 'delete-selection)
1108 (get this-command 'pending-delete)))
1109 (nc (cond
1110 ((not ds) nil)
1111 ((eq ds 'yank)
1112 'cua-paste)
1113 ((eq ds 'kill)
1114 (if cua--rectangle
1115 'cua-copy-rectangle
1116 'cua-copy-region))
1117 ((eq ds 'supersede)
1118 (if cua--rectangle
1119 'cua-delete-rectangle
1120 'cua-delete-region))
1121 (t
1122 (if cua--rectangle
1123 'cua-delete-rectangle ;; replace?
1124 'cua-replace-region)))))
1125 (if nc
1126 (setq this-original-command this-command
1127 this-command nc)))))
1128
1129 ;; Detect extension of rectangles by mouse or other movement
1130 (setq cua--buffer-and-point-before-command
1131 (if cua--rectangle (cons (current-buffer) (point))))
1132 )
1133 (error nil)))
1134 1137
1135;;; Post-command hook 1138;;; Post-command hook
1136 1139
1137(defun cua--post-command-handler () 1140(defun cua--post-command-handler-1 ()
1138 (condition-case nil 1141 (when cua--global-mark-active
1139 (progn 1142 (cua--global-mark-post-command))
1140 (when cua--global-mark-active 1143 (when (fboundp 'cua--rectangle-post-command)
1141 (cua--global-mark-post-command)) 1144 (cua--rectangle-post-command))
1142 (when (fboundp 'cua--rectangle-post-command) 1145 (setq cua--buffer-and-point-before-command nil)
1143 (cua--rectangle-post-command)) 1146 (if (or (not mark-active) deactivate-mark)
1144 (setq cua--buffer-and-point-before-command nil) 1147 (setq cua--explicit-region-start nil))
1145 (if (or (not mark-active) deactivate-mark) 1148
1146 (setq cua--explicit-region-start nil)) 1149 ;; Debugging
1147 1150 (if cua--debug
1148 ;; Debugging 1151 (cond
1149 (if cua--debug 1152 (cua--rectangle (cua--rectangle-assert))
1150 (cond 1153 (mark-active (message "Mark=%d Point=%d Expl=%s"
1151 (cua--rectangle (cua--rectangle-assert)) 1154 (mark t) (point) cua--explicit-region-start))))
1152 (mark-active (message "Mark=%d Point=%d Expl=%s"
1153 (mark t) (point) cua--explicit-region-start))))
1154
1155 ;; Disable transient-mark-mode if rectangle active in current buffer.
1156 (if (not (window-minibuffer-p (selected-window)))
1157 (setq transient-mark-mode (and (not cua--rectangle)
1158 (if cua-highlight-region-shift-only
1159 (not cua--explicit-region-start)
1160 t))))
1161 (if cua-enable-cursor-indications
1162 (cua--update-indications))
1163 1155
1164 (cua--select-keymaps) 1156 ;; Disable transient-mark-mode if rectangle active in current buffer.
1165 ) 1157 (if (not (window-minibuffer-p (selected-window)))
1158 (setq transient-mark-mode (and (not cua--rectangle)
1159 (if cua-highlight-region-shift-only
1160 (not cua--explicit-region-start)
1161 t))))
1162 (if cua-enable-cursor-indications
1163 (cua--update-indications))
1166 1164
1167 (error nil))) 1165 (cua--select-keymaps))
1166
1167(defun cua--post-command-handler ()
1168 (when cua-mode
1169 (condition-case nil
1170 (cua--post-command-handler-1)
1171 (error nil))))
1168 1172
1169 1173
1170;;; Keymaps 1174;;; Keymaps
1171 1175
1172(defun cua--M/H-key (map key fct) 1176(defun cua--M/H-key (map key fct)
1173 ;; bind H-KEY or M-KEY to FCT in MAP 1177 ;; bind H-KEY or M-KEY to FCT in MAP
1174 (if (eq key 'space) (setq key ? )) 1178 (if (eq key 'space) (setq key ?\s))
1175 (unless (listp key) (setq key (list key))) 1179 (unless (listp key) (setq key (list key)))
1176 (define-key map (vector (cons (if cua-use-hyper-key 'hyper 'meta) key)) fct)) 1180 (define-key map (vector (cons (if cua-use-hyper-key 'hyper 'meta) key)) fct))
1177 1181
@@ -1240,7 +1244,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1240 (cua--M/H-key cua-global-keymap 'space 'cua-set-rectangle-mark) 1244 (cua--M/H-key cua-global-keymap 'space 'cua-set-rectangle-mark)
1241 (define-key cua-global-keymap [(hyper mouse-1)] 'cua-mouse-set-rectangle-mark)) 1245 (define-key cua-global-keymap [(hyper mouse-1)] 'cua-mouse-set-rectangle-mark))
1242 1246
1243 (define-key cua-global-keymap [(shift control ? )] 'cua-toggle-global-mark) 1247 (define-key cua-global-keymap [(shift control ?\s)] 'cua-toggle-global-mark)
1244 1248
1245 ;; replace region with rectangle or element on kill ring 1249 ;; replace region with rectangle or element on kill ring
1246 (define-key cua-global-keymap [remap yank] 'cua-paste) 1250 (define-key cua-global-keymap [remap yank] 'cua-paste)
@@ -1328,10 +1332,26 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1328;;;###autoload 1332;;;###autoload
1329(define-minor-mode cua-mode 1333(define-minor-mode cua-mode
1330 "Toggle CUA key-binding mode. 1334 "Toggle CUA key-binding mode.
1331When enabled, using shifted movement keys will activate the region (and 1335When enabled, using shifted movement keys will activate the
1332highlight the region using `transient-mark-mode'), and typed text replaces 1336region (and highlight the region using `transient-mark-mode'),
1333the active selection. C-z, C-x, C-c, and C-v will undo, cut, copy, and 1337and typed text replaces the active selection.
1334paste (in addition to the normal Emacs bindings)." 1338
1339Also when enabled, you can use C-z, C-x, C-c, and C-v to undo,
1340cut, copy, and paste in addition to the normal Emacs bindings.
1341The C-x and C-c keys only do cut and copy when the region is
1342active, so in most cases, they do not conflict with the normal
1343function of these prefix keys.
1344
1345If you really need to perform a command which starts with one of
1346the prefix keys even when the region is active, you have three
1347options:
1348- press the prefix key twice very quickly (within 0.2 seconds),
1349- press the prefix key and the following key within 0.2 seconds, or
1350- use the SHIFT key with the prefix key, i.e. C-S-x or C-S-c.
1351
1352You can customize `cua-enable-cua-keys' to completely disable the
1353CUA bindings, or `cua-prefix-override-inhibit-delay' to change
1354the prefix fallback behavior."
1335 :global t 1355 :global t
1336 :group 'cua 1356 :group 'cua
1337 :set-after '(cua-enable-modeline-indications cua-use-hyper-key) 1357 :set-after '(cua-enable-modeline-indications cua-use-hyper-key)
@@ -1393,6 +1413,15 @@ paste (in addition to the normal Emacs bindings)."
1393 (if (or (nth 1 cua--saved-state) (nth 2 cua--saved-state)) " enabled" ""))) 1413 (if (or (nth 1 cua--saved-state) (nth 2 cua--saved-state)) " enabled" "")))
1394 (setq cua--saved-state nil)))) 1414 (setq cua--saved-state nil))))
1395 1415
1416
1417;;;###autoload
1418(defun cua-selection-mode (arg)
1419 "Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings."
1420 (interactive "P")
1421 (setq-default cua-enable-cua-keys nil)
1422 (cua-mode arg))
1423
1424
1396(defun cua-debug () 1425(defun cua-debug ()
1397 "Toggle CUA debugging." 1426 "Toggle CUA debugging."
1398 (interactive) 1427 (interactive)
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index ecd5251891c..47b677b2e19 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -774,7 +774,8 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
774 ) 774 )
775 775
776 (if (commandp com) 776 (if (commandp com)
777 (progn 777 ;; pretend that current state is the state we excaped to
778 (let ((viper-current-state state))
778 (setq prefix-arg (or prefix-arg arg)) 779 (setq prefix-arg (or prefix-arg arg))
779 (command-execute com))) 780 (command-execute com)))
780 ) 781 )
@@ -996,9 +997,12 @@ as a Meta key and any number of multiple escapes is allowed."
996 (inhibit-quit t)) 997 (inhibit-quit t))
997 (if (viper-ESC-event-p event) 998 (if (viper-ESC-event-p event)
998 (progn 999 (progn
999 (if (viper-fast-keysequence-p) 1000 ;; Emacs 22.50.8 introduced a bug, which makes even a single ESC into
1001 ;; a fast keyseq. To guard against this, we added a check if there
1002 ;; are other events as well
1003 (if (and (viper-fast-keysequence-p) unread-command-events)
1000 (progn 1004 (progn
1001 (let (minor-mode-map-alist) 1005 (let (minor-mode-map-alist emulation-mode-map-alists)
1002 (viper-set-unread-command-events event) 1006 (viper-set-unread-command-events event)
1003 (setq keyseq (read-key-sequence nil 'continue-echo)) 1007 (setq keyseq (read-key-sequence nil 'continue-echo))
1004 ) ; let 1008 ) ; let
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 8d9aed94770..f898c15c158 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -362,8 +362,8 @@ Use `M-x viper-set-expert-level' to change this.")
362(defun viper-activate-input-method () 362(defun viper-activate-input-method ()
363 (cond ((and viper-emacs-p (fboundp 'activate-input-method)) 363 (cond ((and viper-emacs-p (fboundp 'activate-input-method))
364 (activate-input-method default-input-method)) 364 (activate-input-method default-input-method))
365 ((and viper-xemacs-p (fboundp 'quail-mode)) 365 ((featurep 'xemacs)
366 (quail-mode 1)))) 366 (if (fboundp 'quail-mode) (quail-mode 1)))))
367 367
368;; Set quail-mode to ARG 368;; Set quail-mode to ARG
369(defun viper-set-input-method (arg) 369(defun viper-set-input-method (arg)
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index c82be565c4f..68770788349 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -204,6 +204,8 @@ element, regardless of any text on the command line. In that case,
204 (define-key eshell-isearch-map [(control ?c)] 'eshell-isearch-cancel-map) 204 (define-key eshell-isearch-map [(control ?c)] 'eshell-isearch-cancel-map)
205 (define-key eshell-isearch-cancel-map [(control ?c)] 'eshell-isearch-cancel)) 205 (define-key eshell-isearch-cancel-map [(control ?c)] 'eshell-isearch-cancel))
206 206
207(defvar eshell-rebind-keys-alist)
208
207;;; Functions: 209;;; Functions:
208 210
209(defun eshell-hist-initialize () 211(defun eshell-hist-initialize ()
@@ -217,10 +219,10 @@ element, regardless of any text on the command line. In that case,
217 219
218 (if (and (eshell-using-module 'eshell-rebind) 220 (if (and (eshell-using-module 'eshell-rebind)
219 (not eshell-non-interactive-p)) 221 (not eshell-non-interactive-p))
220 (let ((rebind-alist (symbol-value 'eshell-rebind-keys-alist))) 222 (let ((rebind-alist eshell-rebind-keys-alist))
221 (make-local-variable 'eshell-rebind-keys-alist) 223 (make-local-variable 'eshell-rebind-keys-alist)
222 (set 'eshell-rebind-keys-alist 224 (setq eshell-rebind-keys-alist
223 (append rebind-alist eshell-hist-rebind-keys-alist)) 225 (append rebind-alist eshell-hist-rebind-keys-alist))
224 (set (make-local-variable 'search-invisible) t) 226 (set (make-local-variable 'search-invisible) t)
225 (set (make-local-variable 'search-exit-option) t) 227 (set (make-local-variable 'search-exit-option) t)
226 (add-hook 'isearch-mode-hook 228 (add-hook 'isearch-mode-hook
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 514138b6bc2..8ed49ccbd40 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -64,13 +64,13 @@ This is useful for enabling human-readable format (-h), for example."
64 :group 'eshell-ls) 64 :group 'eshell-ls)
65 65
66(defcustom eshell-ls-dired-initial-args nil 66(defcustom eshell-ls-dired-initial-args nil
67 "*If non-nil, args is included before any call to `ls' in dired. 67 "*If non-nil, args is included before any call to `ls' in Dired.
68This is useful for enabling human-readable format (-h), for example." 68This is useful for enabling human-readable format (-h), for example."
69 :type '(repeat :tag "Arguments" string) 69 :type '(repeat :tag "Arguments" string)
70 :group 'eshell-ls) 70 :group 'eshell-ls)
71 71
72(defcustom eshell-ls-use-in-dired nil 72(defcustom eshell-ls-use-in-dired nil
73 "*If non-nil, use `eshell-ls' to read directories in dired." 73 "*If non-nil, use `eshell-ls' to read directories in Dired."
74 :set (lambda (symbol value) 74 :set (lambda (symbol value)
75 (if value 75 (if value
76 (unless (and (boundp 'eshell-ls-use-in-dired) 76 (unless (and (boundp 'eshell-ls-use-in-dired)
@@ -158,7 +158,7 @@ faster and conserves more memory."
158(defface eshell-ls-missing 158(defface eshell-ls-missing
159 '((((class color) (background light)) (:foreground "Red" :weight bold)) 159 '((((class color) (background light)) (:foreground "Red" :weight bold))
160 (((class color) (background dark)) (:foreground "Red" :weight bold))) 160 (((class color) (background dark)) (:foreground "Red" :weight bold)))
161 "*The face used for highlighting non-existant file names." 161 "*The face used for highlighting non-existent file names."
162 :group 'eshell-ls) 162 :group 'eshell-ls)
163;; backward-compatibility alias 163;; backward-compatibility alias
164(put 'eshell-ls-missing-face 'face-alias 'eshell-ls-missing) 164(put 'eshell-ls-missing-face 'face-alias 'eshell-ls-missing)
@@ -863,8 +863,7 @@ to use, and each member of which is the width of that column
863 (cons col-widths newfiles))))) 863 (cons col-widths newfiles)))))
864 864
865(defun eshell-ls-decorated-name (file) 865(defun eshell-ls-decorated-name (file)
866 "Return FILE, possibly decorated. 866 "Return FILE, possibly decorated."
867Use TRUENAME for predicate tests, if passed."
868 (if eshell-ls-use-colors 867 (if eshell-ls-use-colors
869 (let ((face 868 (let ((face
870 (cond 869 (cond
diff --git a/lisp/faces.el b/lisp/faces.el
index 0b301a2af61..733d7cae1ba 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -385,7 +385,7 @@ completely specified)."
385(defun face-attribute-merged-with (attribute value faces &optional frame) 385(defun face-attribute-merged-with (attribute value faces &optional frame)
386 "Merges ATTRIBUTE, initially VALUE, with faces from FACES until absolute. 386 "Merges ATTRIBUTE, initially VALUE, with faces from FACES until absolute.
387FACES may be either a single face or a list of faces. 387FACES may be either a single face or a list of faces.
388\[This is an internal function]" 388\[This is an internal function.]"
389 (cond ((not (face-attribute-relative-p attribute value)) 389 (cond ((not (face-attribute-relative-p attribute value))
390 value) 390 value)
391 ((null faces) 391 ((null faces)
@@ -1095,7 +1095,7 @@ of a global face. Value is the new attribute value."
1095 1095
1096(defun read-face-font (face &optional frame) 1096(defun read-face-font (face &optional frame)
1097 "Read the name of a font for FACE on FRAME. 1097 "Read the name of a font for FACE on FRAME.
1098If optional argument FRAME Is nil or omitted, use the selected frame." 1098If optional argument FRAME is nil or omitted, use the selected frame."
1099 (let ((completion-ignore-case t)) 1099 (let ((completion-ignore-case t))
1100 (completing-read (format "Set font attributes of face `%s' from font: " face) 1100 (completing-read (format "Set font attributes of face `%s' from font: " face)
1101 (append (fontset-list) (x-list-fonts "*" nil frame))))) 1101 (append (fontset-list) (x-list-fonts "*" nil frame)))))
@@ -1103,7 +1103,7 @@ If optional argument FRAME Is nil or omitted, use the selected frame."
1103 1103
1104(defun read-all-face-attributes (face &optional frame) 1104(defun read-all-face-attributes (face &optional frame)
1105 "Interactively read all attributes for FACE. 1105 "Interactively read all attributes for FACE.
1106If optional argument FRAME Is nil or omitted, use the selected frame. 1106If optional argument FRAME is nil or omitted, use the selected frame.
1107Value is a property list of attribute names and new values." 1107Value is a property list of attribute names and new values."
1108 (let (result) 1108 (let (result)
1109 (dolist (attribute face-attribute-name-alist result) 1109 (dolist (attribute face-attribute-name-alist result)
@@ -1117,7 +1117,7 @@ Value is a property list of attribute names and new values."
1117If optional argument FRAME is nil or omitted, modify the face used 1117If optional argument FRAME is nil or omitted, modify the face used
1118for newly created frame, i.e. the global face. 1118for newly created frame, i.e. the global face.
1119For non-interactive use, `set-face-attribute' is preferred. 1119For non-interactive use, `set-face-attribute' is preferred.
1120When called from elisp, if FACE is nil, all arguments but FRAME are ignored 1120When called from Lisp, if FACE is nil, all arguments but FRAME are ignored
1121and the face and its settings are obtained by querying the user." 1121and the face and its settings are obtained by querying the user."
1122 (interactive) 1122 (interactive)
1123 (if face 1123 (if face
@@ -1317,7 +1317,7 @@ If FRAME is omitted or nil, use the selected frame."
1317 (terpri)) 1317 (terpri))
1318 (dolist (a attrs) 1318 (dolist (a attrs)
1319 (let ((attr (face-attribute f (car a) frame))) 1319 (let ((attr (face-attribute f (car a) frame)))
1320 (insert (make-string (- max-width (length (cdr a))) ?\ ) 1320 (insert (make-string (- max-width (length (cdr a))) ?\s)
1321 (cdr a) ": " (format "%s" attr) "\n"))))) 1321 (cdr a) ": " (format "%s" attr) "\n")))))
1322 (terpri))) 1322 (terpri)))
1323 (print-help-return-message)))) 1323 (print-help-return-message))))
@@ -1331,7 +1331,7 @@ If FRAME is omitted or nil, use the selected frame."
1331;; face implementation. 1331;; face implementation.
1332 1332
1333(defun face-attr-construct (face &optional frame) 1333(defun face-attr-construct (face &optional frame)
1334 "Return a defface-style attribute list for FACE on FRAME. 1334 "Return a `defface'-style attribute list for FACE on FRAME.
1335Value is a property list of pairs ATTRIBUTE VALUE for all specified 1335Value is a property list of pairs ATTRIBUTE VALUE for all specified
1336face attributes of FACE where ATTRIBUTE is the attribute name and 1336face attributes of FACE where ATTRIBUTE is the attribute name and
1337VALUE is the specified value of that attribute." 1337VALUE is the specified value of that attribute."
@@ -1836,8 +1836,8 @@ created."
1836;; Update the colors of FACE, after FRAME's own colors have been 1836;; Update the colors of FACE, after FRAME's own colors have been
1837;; changed. 1837;; changed.
1838 1838
1839(defalias 'frame-update-face-colors 'frame-set-background-mode) 1839(define-obsolete-function-alias 'frame-update-face-colors
1840(make-obsolete 'frame-update-face-colors 'frame-set-background-mode "21.1") 1840 'frame-set-background-mode "21.1")
1841 1841
1842 1842
1843;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1843;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1883,12 +1883,10 @@ created."
1883 :group 'basic-faces) 1883 :group 'basic-faces)
1884 1884
1885(defface mode-line-highlight 1885(defface mode-line-highlight
1886 '((((class color) (min-colors 88) (background light)) 1886 '((((class color) (min-colors 88))
1887 :background "RoyalBlue4" :foreground "white") 1887 :box (:line-width 2 :color "grey40" :style released-button))
1888 (((class color) (min-colors 88) (background dark)) 1888 (t
1889 :background "light sky blue" :foreground "black") 1889 :inherit highlight))
1890 (t
1891 :inverse-video t))
1892 "Basic mode line face for highlighting." 1890 "Basic mode line face for highlighting."
1893 :version "22.1" 1891 :version "22.1"
1894 :group 'modeline 1892 :group 'modeline
@@ -2058,7 +2056,7 @@ Note: Other faces cannot inherit from the cursor face."
2058 ;; because in some cases the display engine will do it's own 2056 ;; because in some cases the display engine will do it's own
2059 ;; workaround (to `dim' on ttys) 2057 ;; workaround (to `dim' on ttys)
2060 :slant italic)) 2058 :slant italic))
2061 "Basic italic font." 2059 "Basic italic face."
2062 :group 'basic-faces) 2060 :group 'basic-faces)
2063 2061
2064 2062
@@ -2150,8 +2148,14 @@ Note: Other faces cannot inherit from the cursor face."
2150 :version "22.1") 2148 :version "22.1")
2151 2149
2152(defface shadow 2150(defface shadow
2153 '((((background dark)) :foreground "grey70") 2151 '((((class color grayscale) (min-colors 88) (background light))
2154 (((background light)) :foreground "grey50")) 2152 :foreground "grey50")
2153 (((class color grayscale) (min-colors 88) (background dark))
2154 :foreground "grey70")
2155 (((class color) (min-colors 8) (background light))
2156 :foreground "green")
2157 (((class color) (min-colors 8) (background dark))
2158 :foreground "yellow"))
2155 "Basic face for shadowed text." 2159 "Basic face for shadowed text."
2156 :group 'basic-faces 2160 :group 'basic-faces
2157 :version "22.1") 2161 :version "22.1")
diff --git a/lisp/files.el b/lisp/files.el
index f41a9b29522..6479ef3bc92 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -159,8 +159,7 @@ both at the file level and at the levels of the containing directories."
159 :type 'boolean 159 :type 'boolean
160 :group 'find-file) 160 :group 'find-file)
161 161
162(defcustom revert-without-query 162(defcustom revert-without-query nil
163 nil
164 "*Specify which files should be reverted without query. 163 "*Specify which files should be reverted without query.
165The value is a list of regular expressions. 164The value is a list of regular expressions.
166If the file name matches one of these regular expressions, 165If the file name matches one of these regular expressions,
@@ -178,7 +177,7 @@ If the buffer is visiting a new file, the value is nil.")
178(put 'buffer-file-number 'permanent-local t) 177(put 'buffer-file-number 'permanent-local t)
179 178
180(defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt))) 179(defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt)))
181 "Non-nil means that buffer-file-number uniquely identifies files.") 180 "Non-nil means that `buffer-file-number' uniquely identifies files.")
182 181
183(defvar buffer-file-read-only nil 182(defvar buffer-file-read-only nil
184 "Non-nil if visited file was read-only when visited.") 183 "Non-nil if visited file was read-only when visited.")
@@ -381,9 +380,8 @@ and should return either a buffer or nil."
381These functions are called as soon as the error is detected. 380These functions are called as soon as the error is detected.
382Variable `buffer-file-name' is already set up. 381Variable `buffer-file-name' is already set up.
383The functions are called in the order given until one of them returns non-nil.") 382The functions are called in the order given until one of them returns non-nil.")
384(defvaralias 'find-file-not-found-hooks 'find-file-not-found-functions) 383(define-obsolete-variable-alias 'find-file-not-found-hooks
385(make-obsolete-variable 384 'find-file-not-found-functions "22.1")
386 'find-file-not-found-hooks 'find-file-not-found-functions "22.1")
387 385
388;;;It is not useful to make this a local variable. 386;;;It is not useful to make this a local variable.
389;;;(put 'find-file-hooks 'permanent-local t) 387;;;(put 'find-file-hooks 'permanent-local t)
@@ -395,8 +393,7 @@ functions are called."
395 :type 'hook 393 :type 'hook
396 :options '(auto-insert) 394 :options '(auto-insert)
397 :version "22.1") 395 :version "22.1")
398(defvaralias 'find-file-hooks 'find-file-hook) 396(define-obsolete-variable-alias 'find-file-hooks 'find-file-hook "22.1")
399(make-obsolete-variable 'find-file-hooks 'find-file-hook "22.1")
400 397
401(defvar write-file-functions nil 398(defvar write-file-functions nil
402 "List of functions to be called before writing out a buffer to a file. 399 "List of functions to be called before writing out a buffer to a file.
@@ -412,10 +409,9 @@ This hook is not run if any of the functions in
412to how to save a buffer to file, for instance, choosing a suitable 409to how to save a buffer to file, for instance, choosing a suitable
413coding system and setting mode bits. (See Info 410coding system and setting mode bits. (See Info
414node `(elisp)Saving Buffers'.) To perform various checks or 411node `(elisp)Saving Buffers'.) To perform various checks or
415updates before the buffer is saved, use `before-save-hook' .") 412updates before the buffer is saved, use `before-save-hook'.")
416(put 'write-file-functions 'permanent-local t) 413(put 'write-file-functions 'permanent-local t)
417(defvaralias 'write-file-hooks 'write-file-functions) 414(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1")
418(make-obsolete-variable 'write-file-hooks 'write-file-functions "22.1")
419 415
420(defvar local-write-file-hooks nil) 416(defvar local-write-file-hooks nil)
421(make-variable-buffer-local 'local-write-file-hooks) 417(make-variable-buffer-local 'local-write-file-hooks)
@@ -439,8 +435,8 @@ For hooks that _do_ pertain to the particular visited file, use
439To perform various checks or updates before the buffer is saved, 435To perform various checks or updates before the buffer is saved,
440use `before-save-hook'.") 436use `before-save-hook'.")
441(make-variable-buffer-local 'write-contents-functions) 437(make-variable-buffer-local 'write-contents-functions)
442(defvaralias 'write-contents-hooks 'write-contents-functions) 438(define-obsolete-variable-alias 'write-contents-hooks
443(make-obsolete-variable 'write-contents-hooks 'write-contents-functions "22.1") 439 'write-contents-functions "22.1")
444 440
445(defcustom enable-local-variables t 441(defcustom enable-local-variables t
446 "*Control use of local variables in files you visit. 442 "*Control use of local variables in files you visit.
@@ -866,8 +862,8 @@ it means chase no more than that many links and then stop."
866 "Change the encoding of FILE's name from CODING to NEW-CODING. 862 "Change the encoding of FILE's name from CODING to NEW-CODING.
867The value is a new name of FILE. 863The value is a new name of FILE.
868Signals a `file-already-exists' error if a file of the new name 864Signals a `file-already-exists' error if a file of the new name
869already exists unless optional third argument OK-IF-ALREADY-EXISTS 865already exists unless optional fourth argument OK-IF-ALREADY-EXISTS
870is non-nil. A number as third arg means request confirmation if 866is non-nil. A number as fourth arg means request confirmation if
871the new name already exists. This is what happens in interactive 867the new name already exists. This is what happens in interactive
872use with M-x." 868use with M-x."
873 (interactive 869 (interactive
@@ -1326,9 +1322,9 @@ When nil, never request confirmation."
1326If a buffer exists visiting FILENAME, return that one, but 1322If a buffer exists visiting FILENAME, return that one, but
1327verify that the file has not changed since visited or saved. 1323verify that the file has not changed since visited or saved.
1328The buffer is not selected, just returned to the caller. 1324The buffer is not selected, just returned to the caller.
1329Optional first arg NOWARN non-nil means suppress any warning messages. 1325Optional second arg NOWARN non-nil means suppress any warning messages.
1330Optional second arg RAWFILE non-nil means the file is read literally. 1326Optional third arg RAWFILE non-nil means the file is read literally.
1331Optional third arg WILDCARDS non-nil means do wildcard processing 1327Optional fourth arg WILDCARDS non-nil means do wildcard processing
1332and visit all the matching files. When wildcards are actually 1328and visit all the matching files. When wildcards are actually
1333used and expanded, return a list of buffers that are visiting 1329used and expanded, return a list of buffers that are visiting
1334the various files." 1330the various files."
@@ -2000,7 +1996,7 @@ if REGEXP matches the text at the beginning of the buffer,
2000to decide the buffer's major mode. 1996to decide the buffer's major mode.
2001 1997
2002If FUNCTION is nil, then it is not called. (That is a way of saying 1998If FUNCTION is nil, then it is not called. (That is a way of saying
2003\"allow `auto-mode-alist' to decide for these files.)") 1999\"allow `auto-mode-alist' to decide for these files.\")")
2004 2000
2005(defun set-auto-mode (&optional keep-mode-if-same) 2001(defun set-auto-mode (&optional keep-mode-if-same)
2006 "Select major mode appropriate for current buffer. 2002 "Select major mode appropriate for current buffer.
@@ -3237,7 +3233,7 @@ in such cases.")
3237 "Save the current buffer in its visited file, if it has been modified. 3233 "Save the current buffer in its visited file, if it has been modified.
3238The hooks `write-contents-functions' and `write-file-functions' get a chance 3234The hooks `write-contents-functions' and `write-file-functions' get a chance
3239to do the job of saving; if they do not, then the buffer is saved in 3235to do the job of saving; if they do not, then the buffer is saved in
3240the visited file file in the usual way. 3236the visited file in the usual way.
3241Before and after saving the buffer, this function runs 3237Before and after saving the buffer, this function runs
3242`before-save-hook' and `after-save-hook', respectively." 3238`before-save-hook' and `after-save-hook', respectively."
3243 (interactive) 3239 (interactive)
@@ -4009,7 +4005,7 @@ specifies the list of buffers to kill, asking for approval for each one."
4009 (and name ; Can be nil for an indirect buffer 4005 (and name ; Can be nil for an indirect buffer
4010 ; if we killed the base buffer. 4006 ; if we killed the base buffer.
4011 (not (string-equal name "")) 4007 (not (string-equal name ""))
4012 (/= (aref name 0) ? ) 4008 (/= (aref name 0) ?\s)
4013 (yes-or-no-p 4009 (yes-or-no-p
4014 (format "Buffer %s %s. Kill? " 4010 (format "Buffer %s %s. Kill? "
4015 name 4011 name
@@ -4392,9 +4388,9 @@ preference to the program given by this variable."
4392 :group 'dired) 4388 :group 'dired)
4393 4389
4394(defun get-free-disk-space (dir) 4390(defun get-free-disk-space (dir)
4395 "Return the mount of free space on directory DIR's file system. 4391 "Return the amount of free space on directory DIR's file system.
4396The result is a string that gives the number of free 1KB blocks, 4392The result is a string that gives the number of free 1KB blocks,
4397or nil if the system call or the program which retrieve the infornmation 4393or nil if the system call or the program which retrieve the information
4398fail. 4394fail.
4399 4395
4400This function calls `file-system-info' if it is available, or invokes the 4396This function calls `file-system-info' if it is available, or invokes the
@@ -4642,7 +4638,7 @@ normally equivalent short `-D' option is just passed on to
4642 (end (insert-directory-adj-pos 4638 (end (insert-directory-adj-pos
4643 (+ beg (read (current-buffer))) 4639 (+ beg (read (current-buffer)))
4644 error-lines))) 4640 error-lines)))
4645 (if (memq (char-after end) '(?\n ?\ )) 4641 (if (memq (char-after end) '(?\n ?\s))
4646 ;; End is followed by \n or by " -> ". 4642 ;; End is followed by \n or by " -> ".
4647 (put-text-property start end 'dired-filename t) 4643 (put-text-property start end 'dired-filename t)
4648 ;; It seems that we can't trust ls's output as to 4644 ;; It seems that we can't trust ls's output as to
diff --git a/lisp/font-core.el b/lisp/font-core.el
index 318191e1757..19417720d3a 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -125,7 +125,7 @@ major modes support different levels of fontification, you can use the variable
125When you turn Font Lock mode on/off the buffer is fontified/defontified, though 125When you turn Font Lock mode on/off the buffer is fontified/defontified, though
126fontification occurs only if the buffer is less than `font-lock-maximum-size'. 126fontification occurs only if the buffer is less than `font-lock-maximum-size'.
127 127
128For example, to specify that Font Lock mode use use Lazy Lock mode as a support 128For example, to specify that Font Lock mode uses Lazy Lock mode as a support
129mode and use maximum levels of fontification, put in your ~/.emacs: 129mode and use maximum levels of fontification, put in your ~/.emacs:
130 130
131 (setq font-lock-support-mode 'lazy-lock-mode) 131 (setq font-lock-support-mode 'lazy-lock-mode)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 0ba073409f2..6a95bc973d8 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1830,8 +1830,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1830 :group 'font-lock-highlighting-faces) 1830 :group 'font-lock-highlighting-faces)
1831 1831
1832(defface font-lock-regexp-grouping-backslash 1832(defface font-lock-regexp-grouping-backslash
1833 '((((class color) (min-colors 16)) :inherit escape-glyph) 1833 '((t :inherit bold))
1834 (t :inherit bold))
1835 "Font Lock mode face for backslashes in Lisp regexp grouping constructs." 1834 "Font Lock mode face for backslashes in Lisp regexp grouping constructs."
1836 :group 'font-lock-highlighting-faces) 1835 :group 'font-lock-highlighting-faces)
1837 1836
diff --git a/lisp/forms-d2.el b/lisp/forms-d2.el
index 19164b6a6db..63b47fc028d 100644
--- a/lisp/forms-d2.el
+++ b/lisp/forms-d2.el
@@ -32,17 +32,17 @@
32;; The following functions are used by this form for layout purposes. 32;; The following functions are used by this form for layout purposes.
33;; 33;;
34(defun arch-tocol (target &optional fill) 34(defun arch-tocol (target &optional fill)
35 "Produces a string to skip to column TARGET. Prepends newline if needed. 35 "Produces a string to skip to column TARGET. Prepends newline if needed.
36The optional FILL should be a character, used to fill to the column." 36The optional FILL should be a character, used to fill to the column."
37 (if (null fill) 37 (if (null fill)
38 (setq fill ? )) 38 (setq fill ?\s))
39 (if (< target (current-column)) 39 (if (< target (current-column))
40 (concat "\n" (make-string target fill)) 40 (concat "\n" (make-string target fill))
41 (make-string (- target (current-column)) fill))) 41 (make-string (- target (current-column)) fill)))
42;; 42;;
43(defun arch-rj (target field &optional fill) 43(defun arch-rj (target field &optional fill)
44 "Produces a string to skip to column TARGET minus the width of field FIELD. 44 "Produces a string to skip to column TARGET minus the width of field FIELD.
45Prepends newline if needed. The optional FILL should be a character, 45Prepends newline if needed. The optional FILL should be a character,
46used to fill to the column." 46used to fill to the column."
47 (arch-tocol (- target (length (nth field forms-fields))) fill)) 47 (arch-tocol (- target (length (nth field forms-fields))) fill))
48 48
diff --git a/lisp/frame.el b/lisp/frame.el
index 5496c857af0..e416817d185 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -592,8 +592,7 @@ The functions are run with one arg, the newly created frame.")
592 "Functions to run after a frame's font has been changed.") 592 "Functions to run after a frame's font has been changed.")
593 593
594;; Alias, kept temporarily. 594;; Alias, kept temporarily.
595(defalias 'new-frame 'make-frame) 595(define-obsolete-function-alias 'new-frame 'make-frame "22.1")
596(make-obsolete 'new-frame 'make-frame "22.1")
597 596
598(defun make-frame (&optional parameters) 597(defun make-frame (&optional parameters)
599 "Return a newly created frame displaying the current buffer. 598 "Return a newly created frame displaying the current buffer.
@@ -851,7 +850,7 @@ When called interactively, prompt for the name of the font to use.
851To get the frame's current default font, use `frame-parameters'. 850To get the frame's current default font, use `frame-parameters'.
852 851
853The default behavior is to keep the numbers of lines and columns in 852The default behavior is to keep the numbers of lines and columns in
854the frame, thus may change its pixel size. If optional KEEP-SIZE is 853the frame, thus may change its pixel size. If optional KEEP-SIZE is
855non-nil (interactively, prefix argument) the current frame size (in 854non-nil (interactively, prefix argument) the current frame size (in
856pixels) is kept by adjusting the numbers of the lines and columns." 855pixels) is kept by adjusting the numbers of the lines and columns."
857 (interactive 856 (interactive
@@ -1149,23 +1148,21 @@ The value is one of the symbols `static-gray', `gray-scale',
1149 1148
1150 1149
1151;;;; Aliases for backward compatibility with Emacs 18. 1150;;;; Aliases for backward compatibility with Emacs 18.
1152(defalias 'screen-height 'frame-height) 1151(define-obsolete-function-alias 'screen-height 'frame-height) ;before 19.15
1153(defalias 'screen-width 'frame-width) 1152(define-obsolete-function-alias 'screen-width 'frame-width) ;before 19.15
1154 1153
1155(defun set-screen-width (cols &optional pretend) 1154(defun set-screen-width (cols &optional pretend)
1156 "Obsolete function to change the size of the screen to COLS columns. 1155 "Change the size of the screen to COLS columns.
1157Optional second arg non-nil means that redisplay should use COLS columns 1156Optional second arg non-nil means that redisplay should use COLS columns
1158but that the idea of the actual width of the frame should not be changed. 1157but that the idea of the actual width of the frame should not be changed.
1159This function is provided only for compatibility with Emacs 18; new code 1158This function is provided only for compatibility with Emacs 18."
1160should use `set-frame-width instead'."
1161 (set-frame-width (selected-frame) cols pretend)) 1159 (set-frame-width (selected-frame) cols pretend))
1162 1160
1163(defun set-screen-height (lines &optional pretend) 1161(defun set-screen-height (lines &optional pretend)
1164 "Obsolete function to change the height of the screen to LINES lines. 1162 "Change the height of the screen to LINES lines.
1165Optional second arg non-nil means that redisplay should use LINES lines 1163Optional second arg non-nil means that redisplay should use LINES lines
1166but that the idea of the actual height of the screen should not be changed. 1164but that the idea of the actual height of the screen should not be changed.
1167This function is provided only for compatibility with Emacs 18; new code 1165This function is provided only for compatibility with Emacs 18."
1168should use `set-frame-height' instead."
1169 (set-frame-height (selected-frame) lines pretend)) 1166 (set-frame-height (selected-frame) lines pretend))
1170 1167
1171(defun delete-other-frames (&optional frame) 1168(defun delete-other-frames (&optional frame)
@@ -1188,14 +1185,12 @@ left untouched. FRAME nil or omitted means use the selected frame."
1188 (when (eq (frame-parameter frame 'minibuffer) 'only) 1185 (when (eq (frame-parameter frame 'minibuffer) 'only)
1189 (delete-frame frame))))) 1186 (delete-frame frame)))))
1190 1187
1191(make-obsolete 'screen-height 'frame-height) ;before 19.15
1192(make-obsolete 'screen-width 'frame-width) ;before 19.15
1193(make-obsolete 'set-screen-width 'set-frame-width) ;before 19.15 1188(make-obsolete 'set-screen-width 'set-frame-width) ;before 19.15
1194(make-obsolete 'set-screen-height 'set-frame-height) ;before 19.15 1189(make-obsolete 'set-screen-height 'set-frame-height) ;before 19.15
1195 1190
1196;; miscellaneous obsolescence declarations 1191;; miscellaneous obsolescence declarations
1197(defvaralias 'delete-frame-hook 'delete-frame-functions) 1192(define-obsolete-variable-alias 'delete-frame-hook
1198(make-obsolete-variable 'delete-frame-hook 'delete-frame-functions "22.1") 1193 'delete-frame-functions "22.1")
1199 1194
1200 1195
1201;; Highlighting trailing whitespace. 1196;; Highlighting trailing whitespace.
@@ -1286,8 +1281,7 @@ cursor display. On a text-only terminal, this is not implemented."
1286 'blink-cursor-start))) 1281 'blink-cursor-start)))
1287 (internal-show-cursor nil t))) 1282 (internal-show-cursor nil t)))
1288 1283
1289(defvaralias 'blink-cursor 'blink-cursor-mode) 1284(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
1290(make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
1291 1285
1292(defun blink-cursor-start () 1286(defun blink-cursor-start ()
1293 "Timer function called from the timer `blink-cursor-idle-timer'. 1287 "Timer function called from the timer `blink-cursor-idle-timer'.
@@ -1333,7 +1327,7 @@ itself as a pre-command hook."
1333 1327
1334 1328
1335(defcustom cursor-in-non-selected-windows t 1329(defcustom cursor-in-non-selected-windows t
1336 "*Non-nil means show a hollow box cursor in non-selected-windows. 1330 "*Non-nil means show a hollow box cursor in non-selected windows.
1337If nil, don't show a cursor except in the selected window. 1331If nil, don't show a cursor except in the selected window.
1338Use Custom to set this variable to get the display updated." 1332Use Custom to set this variable to get the display updated."
1339 :tag "Cursor in non-selected windows" 1333 :tag "Cursor in non-selected windows"
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7298fb92d69..33f639380a6 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,25 @@
12005-07-21 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * mml.el (mml-minibuffer-read-disposition): Don't use inline by default
4 for text/rtf. Display default in prompt. Pass default for M-n.
5
6 * mm-uu.el (mm-uu-copy-to-buffer): Use with-current-buffer.
7
82005-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
9
10 * gnus-msg.el (gnus-button-mailto): Remove
11 save-selected-window-window hackery because it relies on
12 save-selected-window internals.
13
142005-07-15 Katsumi Yamaoka <yamaoka@jpl.org>
15
16 * gnus-art.el (gnus-article-next-page): Use gnus-end-of-window.
17 (gnus-article-next-page-1): Use gnus-beginning-of-window.
18 (gnus-article-prev-page): Ditto.
19
20 * gnus-util.el (gnus-beginning-of-window): New function.
21 (gnus-end-of-window): New function.
22
12005-07-13 Katsumi Yamaoka <yamaoka@jpl.org> 232005-07-13 Katsumi Yamaoka <yamaoka@jpl.org>
2 24
3 * gnus-salt.el (gnus-pick-mode): Remove the 5th arg of 25 * gnus-salt.el (gnus-pick-mode): Remove the 5th arg of
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 82f06d2f5a2..2be1afea77d 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5160,7 +5160,7 @@ If given a numerical ARG, move forward ARG pages."
5160If end of article, return non-nil. Otherwise return nil. 5160If end of article, return non-nil. Otherwise return nil.
5161Argument LINES specifies lines to be scrolled up." 5161Argument LINES specifies lines to be scrolled up."
5162 (interactive "p") 5162 (interactive "p")
5163 (move-to-window-line (max (- -1 scroll-margin) (- -1 (window-body-height)))) 5163 (gnus-end-of-window)
5164 (if (save-excursion 5164 (if (save-excursion
5165 (end-of-line) 5165 (end-of-line)
5166 (and (pos-visible-in-window-p) ;Not continuation line. 5166 (and (pos-visible-in-window-p) ;Not continuation line.
@@ -5189,13 +5189,13 @@ Argument LINES specifies lines to be scrolled up."
5189 (end-of-buffer 5189 (end-of-buffer
5190 ;; Long lines may cause an end-of-buffer error. 5190 ;; Long lines may cause an end-of-buffer error.
5191 (goto-char (point-max))))) 5191 (goto-char (point-max)))))
5192 (move-to-window-line (min scroll-margin (window-body-height)))) 5192 (gnus-beginning-of-window))
5193 5193
5194(defun gnus-article-prev-page (&optional lines) 5194(defun gnus-article-prev-page (&optional lines)
5195 "Show previous page of current article. 5195 "Show previous page of current article.
5196Argument LINES specifies lines to be scrolled down." 5196Argument LINES specifies lines to be scrolled down."
5197 (interactive "p") 5197 (interactive "p")
5198 (move-to-window-line (min scroll-margin (window-body-height))) 5198 (gnus-beginning-of-window)
5199 (if (and gnus-page-broken 5199 (if (and gnus-page-broken
5200 (bobp) 5200 (bobp)
5201 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? 5201 (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer?
@@ -5209,7 +5209,7 @@ Argument LINES specifies lines to be scrolled down."
5209 (scroll-down lines) 5209 (scroll-down lines)
5210 (beginning-of-buffer 5210 (beginning-of-buffer
5211 (goto-char (point-min)))) 5211 (goto-char (point-min))))
5212 (move-to-window-line (min scroll-margin (window-body-height))))))) 5212 (gnus-beginning-of-window)))))
5213 5213
5214(defun gnus-article-only-boring-p () 5214(defun gnus-article-only-boring-p ()
5215 "Decide whether there is only boring text remaining in the article. 5215 "Decide whether there is only boring text remaining in the article.
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 8cc8bfe5dd1..1317211389d 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -466,27 +466,19 @@ Gcc: header for archiving purposes."
466 ;; COMPOSEFUNC should return t if succeed. Undocumented ??? 466 ;; COMPOSEFUNC should return t if succeed. Undocumented ???
467 t) 467 t)
468 468
469(defvar save-selected-window-window)
470
471;;;###autoload 469;;;###autoload
472(defun gnus-button-mailto (address) 470(defun gnus-button-mailto (address)
473 "Mail to ADDRESS." 471 "Mail to ADDRESS."
474 (set-buffer (gnus-copy-article-buffer)) 472 (set-buffer (gnus-copy-article-buffer))
475 (gnus-setup-message 'message 473 (gnus-setup-message 'message
476 (message-reply address)) 474 (message-reply address)))
477 (and (boundp 'save-selected-window-window)
478 (not (window-live-p save-selected-window-window))
479 (setq save-selected-window-window (selected-window))))
480 475
481;;;###autoload 476;;;###autoload
482(defun gnus-button-reply (&optional to-address wide) 477(defun gnus-button-reply (&optional to-address wide)
483 "Like `message-reply'." 478 "Like `message-reply'."
484 (interactive) 479 (interactive)
485 (gnus-setup-message 'message 480 (gnus-setup-message 'message
486 (message-reply to-address wide)) 481 (message-reply to-address wide)))
487 (and (boundp 'save-selected-window-window)
488 (not (window-live-p save-selected-window-window))
489 (setq save-selected-window-window (selected-window))))
490 482
491;;;###autoload 483;;;###autoload
492(define-mail-user-agent 'gnus-user-agent 484(define-mail-user-agent 'gnus-user-agent
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index da14d52161b..363b9c2f4a0 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1,5 +1,5 @@
1;;; gnus-util.el --- utility functions for Gnus 1;;; gnus-util.el --- utility functions 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>
@@ -1577,6 +1577,30 @@ empty directories from OLD-PATH."
1577 (defalias 'gnus-set-process-query-on-exit-flag 1577 (defalias 'gnus-set-process-query-on-exit-flag
1578 'process-kill-without-query)) 1578 'process-kill-without-query))
1579 1579
1580(defun gnus-beginning-of-window ()
1581 "Move point to the beginning of the window."
1582 (move-to-window-line
1583 (if (featurep 'xemacs)
1584 0
1585 (min scroll-margin
1586 (max 1 (- (window-height)
1587 (if mode-line-format 1 0)
1588 (if (and (boundp 'header-line-format)
1589 (symbol-value 'header-line-format))
1590 1 0)))))))
1591
1592(defun gnus-end-of-window ()
1593 "Move point to the end of the window."
1594 (move-to-window-line
1595 (if (featurep 'xemacs)
1596 -1
1597 (max (- -1 scroll-margin)
1598 (- -1 (max 1 (- (window-height)
1599 (if mode-line-format 1 0)
1600 (if (and (boundp 'header-line-format)
1601 (symbol-value 'header-line-format))
1602 1 0))))))))
1603
1580(provide 'gnus-util) 1604(provide 'gnus-util)
1581 1605
1582;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49 1606;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index ad40ffb4564..5d8f696fe41 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -111,8 +111,8 @@ This can be either \"inline\" or \"attachment\".")
111 "^exit 0$" 111 "^exit 0$"
112 mm-uu-shar-extract) 112 mm-uu-shar-extract)
113 (forward 113 (forward
114;;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and 114 ;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
115;;; Peter von der Ah\'e <pahe@daimi.au.dk> 115 ;; Peter von der Ah\'e <pahe@daimi.au.dk>
116 "^-+ \\(Start of \\)?Forwarded message" 116 "^-+ \\(Start of \\)?Forwarded message"
117 "^-+ End \\(of \\)?forwarded message" 117 "^-+ End \\(of \\)?forwarded message"
118 mm-uu-forward-extract 118 mm-uu-forward-extract
@@ -186,13 +186,12 @@ To disable dissecting shar codes, for instance, add
186(defun mm-uu-copy-to-buffer (&optional from to) 186(defun mm-uu-copy-to-buffer (&optional from to)
187 "Copy the contents of the current buffer to a fresh buffer. 187 "Copy the contents of the current buffer to a fresh buffer.
188Return that buffer." 188Return that buffer."
189 (save-excursion 189 (let ((obuf (current-buffer))
190 (let ((obuf (current-buffer)) 190 (coding-system
191 (coding-system 191 ;; Might not exist in non-MULE XEmacs
192 ;; Might not exist in non-MULE XEmacs 192 (when (boundp 'buffer-file-coding-system)
193 (when (boundp 'buffer-file-coding-system) 193 buffer-file-coding-system)))
194 buffer-file-coding-system))) 194 (with-current-buffer (generate-new-buffer " *mm-uu*")
195 (set-buffer (generate-new-buffer " *mm-uu*"))
196 (setq buffer-file-coding-system coding-system) 195 (setq buffer-file-coding-system coding-system)
197 (insert-buffer-substring obuf from to) 196 (insert-buffer-substring obuf from to)
198 (current-buffer)))) 197 (current-buffer))))
@@ -496,5 +495,5 @@ Return that buffer."
496 495
497(provide 'mm-uu) 496(provide 'mm-uu)
498 497
499;;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c 498;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c
500;;; mm-uu.el ends here 499;;; mm-uu.el ends here
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 9721a054f06..a44a4560cf8 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -942,13 +942,15 @@ See Info node `(emacs-mime)Composing'.
942 description)) 942 description))
943 943
944(defun mml-minibuffer-read-disposition (type &optional default) 944(defun mml-minibuffer-read-disposition (type &optional default)
945 (let* ((default (or default 945 (unless default (setq default
946 (if (string-match "^text/.*" type) 946 (if (and (string-match "\\`text/" type)
947 "inline" 947 (not (string-match "\\`text/rtf\\'" type)))
948 "attachment"))) 948 "inline"
949 (disposition (completing-read "Disposition: " 949 "attachment")))
950 '(("attachment") ("inline") ("")) 950 (let ((disposition (completing-read
951 nil t))) 951 (format "Disposition (default %s): " default)
952 '(("attachment") ("inline") (""))
953 nil t nil nil default)))
952 (if (not (equal disposition "")) 954 (if (not (equal disposition ""))
953 disposition 955 disposition
954 default))) 956 default)))
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 6160391df95..93c34af7a5c 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -217,13 +217,13 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
217 (intern (upcase name)))))) 217 (intern (upcase name))))))
218 arglist))) 218 arglist)))
219 219
220;;; Could be this, if we make symbol-file do the work below. 220;; Could be this, if we make symbol-file do the work below.
221;;; (defun help-C-file-name (subr-or-var kind) 221;; (defun help-C-file-name (subr-or-var kind)
222;;; "Return the name of the C file where SUBR-OR-VAR is defined. 222;; "Return the name of the C file where SUBR-OR-VAR is defined.
223;;; KIND should be `var' for a variable or `subr' for a subroutine." 223;; KIND should be `var' for a variable or `subr' for a subroutine."
224;;; (symbol-file (if (symbolp subr-or-var) subr-or-var 224;; (symbol-file (if (symbolp subr-or-var) subr-or-var
225;;; (subr-name subr-or-var)) 225;; (subr-name subr-or-var))
226;;; (if (eq kind 'var) 'defvar 'defun))) 226;; (if (eq kind 'var) 'defvar 'defun)))
227;;;###autoload 227;;;###autoload
228(defun help-C-file-name (subr-or-var kind) 228(defun help-C-file-name (subr-or-var kind)
229 "Return the name of the C file where SUBR-OR-VAR is defined. 229 "Return the name of the C file where SUBR-OR-VAR is defined.
@@ -715,5 +715,5 @@ BUFFER should be a buffer or a buffer name."
715 715
716(provide 'help-fns) 716(provide 'help-fns)
717 717
718;;; arch-tag: 9e10331c-ae81-4d13-965d-c4819aaab0b3 718;; arch-tag: 9e10331c-ae81-4d13-965d-c4819aaab0b3
719;;; help-fns.el ends here 719;;; help-fns.el ends here
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 3349bc058f3..831db8cc0cc 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -631,5 +631,5 @@ For the cross-reference format, see `help-make-xrefs'."
631 631
632(provide 'help-mode) 632(provide 'help-mode)
633 633
634;;; arch-tag: 850954ae-3725-4cb4-8e91-0bf6d52d6b0b 634;; arch-tag: 850954ae-3725-4cb4-8e91-0bf6d52d6b0b
635;;; help-mode.el ends here 635;;; help-mode.el ends here
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 894633a1f34..35423ec0335 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -287,7 +287,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
287 (set (make-local-variable 'eldoc-documentation-function) 287 (set (make-local-variable 'eldoc-documentation-function)
288 'hexl-print-current-point-info) 288 'hexl-print-current-point-info)
289 (eldoc-add-command-completions "hexl-") 289 (eldoc-add-command-completions "hexl-")
290 (eldoc-remove-command "hexl-save-buffer" 290 (eldoc-remove-command "hexl-save-buffer"
291 "hexl-current-address") 291 "hexl-current-address")
292 292
293 (if hexl-follow-ascii (hexl-follow-ascii 1))) 293 (if hexl-follow-ascii (hexl-follow-ascii 1)))
@@ -918,7 +918,7 @@ Customize the variable `hexl-follow-ascii' to disable this feature."
918(defun hexl-activate-ruler () 918(defun hexl-activate-ruler ()
919 "Activate `ruler-mode'" 919 "Activate `ruler-mode'"
920 (require 'ruler-mode) 920 (require 'ruler-mode)
921 (set (make-local-variable 'ruler-mode-ruler-function) 921 (set (make-local-variable 'ruler-mode-ruler-function)
922 'hexl-mode-ruler) 922 'hexl-mode-ruler)
923 (ruler-mode 1)) 923 (ruler-mode 1))
924 924
@@ -929,7 +929,7 @@ Customize the variable `hexl-follow-ascii' to disable this feature."
929 (with-no-warnings 929 (with-no-warnings
930 (set (make-local-variable 'hl-line-range-function) 930 (set (make-local-variable 'hl-line-range-function)
931 'hexl-highlight-line-range) 931 'hexl-highlight-line-range)
932 (set (make-local-variable 'hl-line-face) 932 (set (make-local-variable 'hl-line-face)
933 'highlight)) 933 'highlight))
934 (hl-line-mode 1)) 934 (hl-line-mode 1))
935 935
@@ -1009,7 +1009,8 @@ This function is assumed to be used as call back function for `hl-line-mode'."
1009 (define-key hexl-mode-map "\C-e" 'hexl-end-of-line) 1009 (define-key hexl-mode-map "\C-e" 'hexl-end-of-line)
1010 (define-key hexl-mode-map "\C-f" 'hexl-forward-char) 1010 (define-key hexl-mode-map "\C-f" 'hexl-forward-char)
1011 1011
1012 (if (not (eq (key-binding (char-to-string help-char)) 'help-command)) 1012 (if (not (memq (key-binding (char-to-string help-char))
1013 '(help-command ehelp-command)))
1013 (define-key hexl-mode-map (char-to-string help-char) 'undefined)) 1014 (define-key hexl-mode-map (char-to-string help-char) 'undefined))
1014 1015
1015 (define-key hexl-mode-map "\C-k" 'undefined) 1016 (define-key hexl-mode-map "\C-k" 'undefined)
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 59468147cb7..df95766641b 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -81,11 +81,11 @@
81;; 81;;
82;; Example usage: 82;; Example usage:
83;; (defun my-highlight-changes-enable-hook () 83;; (defun my-highlight-changes-enable-hook ()
84;; (add-hook 'local-write-file-hooks 'highlight-changes-rotate-faces) 84;; (add-hook 'write-file-functions 'highlight-changes-rotate-faces nil t)
85;; ) 85;; )
86;; 86;;
87;; (defun my-highlight-changes-disable-hook () 87;; (defun my-highlight-changes-disable-hook ()
88;; (remove-hook 'local-write-file-hooks 'highlight-changes-rotate-faces) 88;; (remove-hook 'write-file-functions 'highlight-changes-rotate-faces t)
89;; ) 89;; )
90;; 90;;
91;; (add-hook 'highlight-changes-enable-hook 'my-highlight-changes-enable-hook) 91;; (add-hook 'highlight-changes-enable-hook 'my-highlight-changes-enable-hook)
@@ -213,7 +213,7 @@
213;; indentation on inserts gets underlined (which can look pretty ugly!). 213;; indentation on inserts gets underlined (which can look pretty ugly!).
214 214
215(defface highlight-changes 215(defface highlight-changes
216 '((((min-colors 88) (class color)) (:foreground "red1" )) 216 '((((min-colors 88) (class color)) (:foreground "red1"))
217 (((class color)) (:foreground "red" )) 217 (((class color)) (:foreground "red" ))
218 (t (:inverse-video t))) 218 (t (:inverse-video t)))
219 "Face used for highlighting changes." 219 "Face used for highlighting changes."
@@ -270,7 +270,7 @@ This variable must be set to one of the symbols `active' or `passive'."
270(defcustom highlight-changes-global-initial-state 'passive 270(defcustom highlight-changes-global-initial-state 'passive
271 "*What state `global-highlight-changes' should start in. 271 "*What state `global-highlight-changes' should start in.
272This is used if `global-highlight-changes' is called with no argument. 272This is used if `global-highlight-changes' is called with no argument.
273This variable must be set to either `active' or `passive'" 273This variable must be set to either `active' or `passive'."
274 :type '(choice (const :tag "Active" active) 274 :type '(choice (const :tag "Active" active)
275 (const :tag "Passive" passive)) 275 (const :tag "Passive" passive))
276 :group 'highlight-changes) 276 :group 'highlight-changes)
@@ -302,8 +302,8 @@ A list means the elements are major modes suitable for Highlight
302Changes mode, or a list whose first element is `not' followed by major 302Changes mode, or a list whose first element is `not' followed by major
303modes which are not suitable. 303modes which are not suitable.
304 304
305t means the buffer is suitable if it is visiting a file and its name 305A value of t means the buffer is suitable if it is visiting a file and
306does not begin with ` ' or `*'. 306its name does not begin with ` ' or `*'.
307 307
308A value of nil means no buffers are suitable for `global-highlight-changes' 308A value of nil means no buffers are suitable for `global-highlight-changes'
309\(effectively disabling the mode). 309\(effectively disabling the mode).
@@ -488,7 +488,7 @@ This is the opposite of `hilit-chg-display-changes'."
488 "Fix change overlays in region between BEG and END. 488 "Fix change overlays in region between BEG and END.
489 489
490Ensure the overlays agree with the changes as determined from 490Ensure the overlays agree with the changes as determined from
491the text properties of type `hilit-chg' ." 491the text properties of type `hilit-chg'."
492 ;; Remove or alter overlays in region beg..end 492 ;; Remove or alter overlays in region beg..end
493 (let (ov-start ov-end props q) 493 (let (ov-start ov-end props q)
494 ;; temp for debugging: 494 ;; temp for debugging:
@@ -641,12 +641,12 @@ Functions:
641\\[highlight-changes-remove-highlight] - remove the change face from the region 641\\[highlight-changes-remove-highlight] - remove the change face from the region
642\\[highlight-changes-rotate-faces] - rotate different \"ages\" of changes \ 642\\[highlight-changes-rotate-faces] - rotate different \"ages\" of changes \
643through 643through
644 various faces. 644 various faces
645 645
646Hook variables: 646Hook variables:
647`highlight-changes-enable-hook' - when enabling Highlight Changes mode. 647`highlight-changes-enable-hook' - when enabling Highlight Changes mode
648`highlight-changes-toggle-hook' - when entering active or passive state 648`highlight-changes-toggle-hook' - when entering active or passive state
649`highlight-changes-disable-hook' - when turning off Highlight Changes mode." 649`highlight-changes-disable-hook' - when turning off Highlight Changes mode"
650 (interactive "P") 650 (interactive "P")
651 (if (or (display-color-p) 651 (if (or (display-color-p)
652 (and (fboundp 'x-display-grayscale-p) (x-display-grayscale-p))) 652 (and (fboundp 'x-display-grayscale-p) (x-display-grayscale-p)))
@@ -781,11 +781,11 @@ of `highlight-changes-face-list', one level older changes are shown in
781face described by the second element, and so on. Very old changes remain 781face described by the second element, and so on. Very old changes remain
782shown in the last face in the list. 782shown in the last face in the list.
783 783
784You can automatically rotate colors when the buffer is saved 784You can automatically rotate colors when the buffer is saved by adding
785by adding the following to `local-write-file-hooks', by evaling it in the 785this function to `write-file-functions' as a buffer-local value. To do
786buffer to be saved): 786this, eval the following in the buffer to be saved:
787 787
788 \(add-hook 'local-write-file-hooks 'highlight-changes-rotate-faces)" 788 \(add-hook 'write-file-functions 'highlight-changes-rotate-faces nil t)"
789 (interactive) 789 (interactive)
790 ;; If not in active mode do nothing but don't complain because this 790 ;; If not in active mode do nothing but don't complain because this
791 ;; may be bound to a hook. 791 ;; may be bound to a hook.
@@ -800,8 +800,7 @@ buffer to be saved):
800 ;; and display them all if active 800 ;; and display them all if active
801 (if (eq highlight-changes-mode 'active) 801 (if (eq highlight-changes-mode 'active)
802 (hilit-chg-display-changes)))) 802 (hilit-chg-display-changes))))
803 ;; This always returns nil so it is safe to use in 803 ;; This always returns nil so it is safe to use in write-file-functions
804 ;; local-write-file-hook
805 nil) 804 nil)
806 805
807;; ======================================================================== 806;; ========================================================================
@@ -886,7 +885,7 @@ The default is the current buffer and the one in the next window.
886If either buffer is modified and is visiting a file, you are prompted 885If either buffer is modified and is visiting a file, you are prompted
887to save the file. 886to save the file.
888 887
889Unless the buffer is unmodified and visiting a file, the buffer is 888Unless the buffer is unmodified and visiting a file, the buffer is
890written to a temporary file for comparison. 889written to a temporary file for comparison.
891 890
892If a buffer is read-only, differences will be highlighted but no property 891If a buffer is read-only, differences will be highlighted but no property
@@ -1110,9 +1109,9 @@ variable `highlight-changes-global-changes-existing-buffers' is non-nil).
1110 1109
1111A buffer is appropriate for Highlight Changes mode if all these are true: 1110A buffer is appropriate for Highlight Changes mode if all these are true:
1112- the buffer is not a special buffer (one whose name begins with 1111- the buffer is not a special buffer (one whose name begins with
1113 `*' or ` ') 1112 `*' or ` '),
1114- the buffer's mode is suitable as per variable 1113- the buffer's mode is suitable as per variable
1115 `highlight-changes-global-modes' 1114 `highlight-changes-global-modes',
1116- Highlight Changes mode is not already on for this buffer. 1115- Highlight Changes mode is not already on for this buffer.
1117 1116
1118This function is called from `hilit-chg-update-all-buffers' or 1117This function is called from `hilit-chg-update-all-buffers' or
diff --git a/lisp/ido.el b/lisp/ido.el
index 97adb97bdd5..9d7b4877fe8 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -101,9 +101,9 @@
101;; The list in {...} are the matching buffers, most recent first 101;; The list in {...} are the matching buffers, most recent first
102;; (buffers visible in the current frame are put at the end of the 102;; (buffers visible in the current frame are put at the end of the
103;; list by default). At any time I can select the item at the head of 103;; list by default). At any time I can select the item at the head of
104;; the list by pressing RET. I can also bring the put the first 104;; the list by pressing RET. I can also put the first element at the
105;; element at the end of the list by pressing C-s or [right], or put 105;; end of the list by pressing C-s or [right], or bring the last
106;; the last element at the head of the list by pressing C-r or [left]. 106;; element to the head of the list by pressing C-r or [left].
107;; 107;;
108;; The item in [...] indicates what can be added to my input by 108;; The item in [...] indicates what can be added to my input by
109;; pressing TAB. In this case, I will get "3" added to my input. 109;; pressing TAB. In this case, I will get "3" added to my input.
@@ -210,8 +210,7 @@
210;; Example: 210;; Example:
211;; 211;;
212;; If you have again two Buffers "123456" and "123" then hitting "2" does 212;; If you have again two Buffers "123456" and "123" then hitting "2" does
213;; not match because "2" is not a PREFIX in any of the buffer-names. This 213;; not match because "2" is not a PREFIX in any of the buffer-names.
214;; is the only difference between the substring and prefix matching.
215 214
216;; Flexible matching 215;; Flexible matching
217;; ----------------- 216;; -----------------
@@ -236,14 +235,10 @@
236;; 235;;
237;; There is limited provision for regexp matching within ido, 236;; There is limited provision for regexp matching within ido,
238;; enabled through `ido-enable-regexp' (toggle with C-t). 237;; enabled through `ido-enable-regexp' (toggle with C-t).
239;; This allows you to type `c$' for example and see all file names 238;; This allows you to type `[ch]$' for example and see all file names
240;; ending in `c'. This facility is quite limited though in two 239;; ending in `c' or `h'.
241;; respects. First, you can't currently type in expressions like 240;;
242;; `[0-9]' directly -- you have to type them in when ido-enable-regexp 241;; Note: ido-style completion is inhibited when you enable regexp matching.
243;; is nil and then toggle on the regexp functionality. Likewise,
244;; don't enter an expression containing `\' in regexp mode. If you
245;; try, ido gets confused, so just hit C-g and try again. Secondly,
246;; no completion mechanism is currently offered with regexp searching.
247 242
248 243
249;; Customization 244;; Customization
@@ -1405,7 +1400,7 @@ This function also adds a hook to the minibuffer."
1405 (define-key map "\C-s" 'ido-next-match) 1400 (define-key map "\C-s" 'ido-next-match)
1406 (define-key map "\C-t" 'ido-toggle-regexp) 1401 (define-key map "\C-t" 'ido-toggle-regexp)
1407 (define-key map "\C-z" 'ido-undo-merge-work-directory) 1402 (define-key map "\C-z" 'ido-undo-merge-work-directory)
1408 (define-key map [(control ? )] 'ido-restrict-to-matches) 1403 (define-key map [(control ?\s)] 'ido-restrict-to-matches)
1409 (define-key map [(control ?@)] 'ido-restrict-to-matches) 1404 (define-key map [(control ?@)] 'ido-restrict-to-matches)
1410 (define-key map [right] 'ido-next-match) 1405 (define-key map [right] 'ido-next-match)
1411 (define-key map [left] 'ido-prev-match) 1406 (define-key map [left] 'ido-prev-match)
@@ -1436,7 +1431,7 @@ This function also adds a hook to the minibuffer."
1436 (define-key map [(meta ?m)] 'ido-make-directory) 1431 (define-key map [(meta ?m)] 'ido-make-directory)
1437 (define-key map [(meta ?n)] 'ido-next-work-directory) 1432 (define-key map [(meta ?n)] 'ido-next-work-directory)
1438 (define-key map [(meta ?o)] 'ido-prev-work-file) 1433 (define-key map [(meta ?o)] 'ido-prev-work-file)
1439 (define-key map [(meta ?O)] 'ido-next-work-file) 1434 (define-key map [(meta control ?o)] 'ido-next-work-file)
1440 (define-key map [(meta ?p)] 'ido-prev-work-directory) 1435 (define-key map [(meta ?p)] 'ido-prev-work-directory)
1441 (define-key map [(meta ?s)] 'ido-merge-work-directories) 1436 (define-key map [(meta ?s)] 'ido-merge-work-directories)
1442 ) 1437 )
@@ -2028,7 +2023,8 @@ If INITIAL is non-nil, it specifies the initial input string."
2028 (setq item 'file)) 2023 (setq item 'file))
2029 (let ((ido-current-directory (ido-expand-directory default)) 2024 (let ((ido-current-directory (ido-expand-directory default))
2030 (ido-context-switch-command switch-cmd) 2025 (ido-context-switch-command switch-cmd)
2031 ido-directory-nonreadable ido-directory-too-big 2026 ido-directory-nonreadable ido-directory-too-big
2027 (minibuffer-completing-file-name t)
2032 filename) 2028 filename)
2033 2029
2034 (if (or (not ido-mode) (ido-is-slow-ftp-host)) 2030 (if (or (not ido-mode) (ido-is-slow-ftp-host))
@@ -2056,7 +2052,7 @@ If INITIAL is non-nil, it specifies the initial input string."
2056 2052
2057 ((and ido-use-filename-at-point 2053 ((and ido-use-filename-at-point
2058 (setq fn (if (eq ido-use-filename-at-point 'guess) 2054 (setq fn (if (eq ido-use-filename-at-point 'guess)
2059 (ffap-guesser) 2055 (with-no-warnings (ffap-guesser))
2060 (ffap-string-at-point))) 2056 (ffap-string-at-point)))
2061 (not (string-match "^http:/" fn)) 2057 (not (string-match "^http:/" fn))
2062 (setq d (file-name-directory fn)) 2058 (setq d (file-name-directory fn))
@@ -4215,6 +4211,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
4215 4211
4216(put 'dired-do-rename 'ido 'ignore) 4212(put 'dired-do-rename 'ido 'ignore)
4217(put 'ibuffer-find-file 'ido 'find-file) 4213(put 'ibuffer-find-file 'ido 'find-file)
4214(put 'dired-other-window 'ido 'dir)
4218 4215
4219;;;###autoload 4216;;;###autoload
4220(defun ido-read-buffer (prompt &optional default require-match) 4217(defun ido-read-buffer (prompt &optional default require-match)
@@ -4255,6 +4252,7 @@ See `read-file-name' for additional parameters."
4255 (ido-context-switch-command 4252 (ido-context-switch-command
4256 (if (eq (get this-command 'ido) 'find-file) nil 'ignore)) 4253 (if (eq (get this-command 'ido) 'find-file) nil 'ignore))
4257 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) 4254 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
4255 (minibuffer-completing-file-name t)
4258 (ido-current-directory (ido-expand-directory dir)) 4256 (ido-current-directory (ido-expand-directory dir))
4259 (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) 4257 (ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
4260 (ido-directory-too-big (and (not ido-directory-nonreadable) 4258 (ido-directory-too-big (and (not ido-directory-nonreadable)
@@ -4287,6 +4285,7 @@ See `read-file-name' for additional parameters."
4287Read directory name, prompting with PROMPT and completing in directory DIR. 4285Read directory name, prompting with PROMPT and completing in directory DIR.
4288See `read-directory-name' for additional parameters." 4286See `read-directory-name' for additional parameters."
4289 (let* (filename 4287 (let* (filename
4288 (minibuffer-completing-file-name t)
4290 (ido-context-switch-command 'ignore) 4289 (ido-context-switch-command 'ignore)
4291 ido-saved-vc-hb 4290 ido-saved-vc-hb
4292 (ido-current-directory (ido-expand-directory dir)) 4291 (ido-current-directory (ido-expand-directory dir))
diff --git a/lisp/image-file.el b/lisp/image-file.el
index 8f74dd63c0a..be95470184c 100644
--- a/lisp/image-file.el
+++ b/lisp/image-file.el
@@ -118,6 +118,7 @@ the command `insert-file-contents'."
118 (create-image data nil t)) 118 (create-image data nil t))
119 (props 119 (props
120 `(display ,image 120 `(display ,image
121 yank-handler (image-file-yank-handler)
121 intangible ,image 122 intangible ,image
122 rear-nonsticky (display intangible) 123 rear-nonsticky (display intangible)
123 ;; This a cheap attempt to make the whole buffer 124 ;; This a cheap attempt to make the whole buffer
@@ -135,6 +136,19 @@ the command `insert-file-contents'."
135 (setq truncate-lines t)))) 136 (setq truncate-lines t))))
136 rval)) 137 rval))
137 138
139;; We use a yank-handler to make yanked images unique, so that
140;; yanking two copies of the same image next to each other are
141;; recognized as two different images.
142(defun image-file-yank-handler (string)
143 "Yank handler for inserting an image into a buffer."
144 (let ((image (get-text-property 0 'display string)))
145 (if (consp image)
146 (put-text-property 0 (length string)
147 'display
148 (cons (car image) (cdr image))
149 string))
150 (insert string)))
151
138(put 'image-file-handler 'safe-magic t) 152(put 'image-file-handler 'safe-magic t)
139(defun image-file-handler (operation &rest args) 153(defun image-file-handler (operation &rest args)
140 "Filename handler for inserting image files. 154 "Filename handler for inserting image files.
diff --git a/lisp/info.el b/lisp/info.el
index 695d67c3647..a7f4c494244 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -96,7 +96,7 @@ The Lisp code is executed when the node is selected.")
96(defface info-xref-visited 96(defface info-xref-visited
97 '((default :inherit info-xref) 97 '((default :inherit info-xref)
98 (((class color) (background light)) :foreground "magenta4") 98 (((class color) (background light)) :foreground "magenta4")
99 (((class color) (background dark)) :foreground "magenta3")) ;"violet"? 99 (((class color) (background dark)) :foreground "violet"))
100 "Face for visited Info cross-references." 100 "Face for visited Info cross-references."
101 :group 'info) 101 :group 'info)
102 102
@@ -3527,7 +3527,10 @@ the variable `Info-file-list-for-emacs'."
3527 (Info-goto-emacs-command-node command))))) 3527 (Info-goto-emacs-command-node command)))))
3528 3528
3529(defface info-title-1 3529(defface info-title-1
3530 '((((type tty pc) (class color)) :foreground "green" :weight bold) 3530 '((((type tty pc) (class color) (background light))
3531 :foreground "green" :weight bold)
3532 (((type tty pc) (class color) (background dark))
3533 :foreground "yellow" :weight bold)
3531 (t :height 1.2 :inherit info-title-2)) 3534 (t :height 1.2 :inherit info-title-2))
3532 "Face for info titles at level 1." 3535 "Face for info titles at level 1."
3533 :group 'info) 3536 :group 'info)
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el
index 46193d24d2c..1d0d50b01ac 100644
--- a/lisp/international/isearch-x.el
+++ b/lisp/international/isearch-x.el
@@ -98,9 +98,9 @@
98(defun isearch-process-search-multibyte-characters (last-char) 98(defun isearch-process-search-multibyte-characters (last-char)
99 (if (eq this-command 'isearch-printing-char) 99 (if (eq this-command 'isearch-printing-char)
100 (let ((overriding-terminal-local-map nil) 100 (let ((overriding-terminal-local-map nil)
101 (prompt (concat (isearch-message-prefix))) 101 (prompt (isearch-message-prefix))
102 (minibuffer-local-map isearch-minibuffer-local-map) 102 (minibuffer-local-map isearch-minibuffer-local-map)
103 str) 103 str junk-hist)
104 (if isearch-input-method-function 104 (if isearch-input-method-function
105 (let (;; Let input method work rather tersely. 105 (let (;; Let input method work rather tersely.
106 (input-method-verbose-flag nil)) 106 (input-method-verbose-flag nil))
@@ -108,8 +108,8 @@
108 (cons 'with-input-method 108 (cons 'with-input-method
109 (cons last-char unread-command-events)) 109 (cons last-char unread-command-events))
110 ;; Inherit current-input-method in a minibuffer. 110 ;; Inherit current-input-method in a minibuffer.
111 str (read-string prompt isearch-message nil nil t)) 111 str (read-string prompt isearch-message 'junk-hist nil t))
112 (if (not str) 112 (if (or (not str) (< (length str) (length isearch-message)))
113 ;; All inputs were deleted while the input method 113 ;; All inputs were deleted while the input method
114 ;; was working. 114 ;; was working.
115 (setq str "") 115 (setq str "")
@@ -124,7 +124,7 @@
124 (setq unread-command-events 124 (setq unread-command-events
125 (cons 'with-keyboard-coding 125 (cons 'with-keyboard-coding
126 (cons last-char unread-command-events)) 126 (cons last-char unread-command-events))
127 str (read-string prompt))) 127 str (read-string prompt nil 'junk-hist)))
128 128
129 (if (and str (> (length str) 0)) 129 (if (and str (> (length str) 0))
130 (let ((unread-command-events nil)) 130 (let ((unread-command-events nil))
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index b84fb380802..cdb76a2ccc1 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -800,7 +800,7 @@ returned without any user interaction. See also the command
800`prefer-coding-system'. 800`prefer-coding-system'.
801 801
802However, the user is queried if the chosen coding system is 802However, the user is queried if the chosen coding system is
803inconsistent with what would be selected by `set-auto-coding' from 803inconsistent with what would be selected by `find-auto-coding' from
804coding cookies &c. if the contents of the region were read from a 804coding cookies &c. if the contents of the region were read from a
805file. (That could lead to data corruption in a file subsequently 805file. (That could lead to data corruption in a file subsequently
806re-visited and edited.) 806re-visited and edited.)
@@ -830,7 +830,33 @@ and TO is ignored."
830 (not (listp default-coding-system))) 830 (not (listp default-coding-system)))
831 (setq default-coding-system (list default-coding-system))) 831 (setq default-coding-system (list default-coding-system)))
832 832
833 (let ((no-other-defaults nil)) 833 (let ((no-other-defaults nil)
834 auto-cs)
835 (unless (or (stringp from) find-file-literally)
836 ;; Find an auto-coding that is specified for the the current
837 ;; buffer and file from the region FROM and TO.
838 (save-excursion
839 (save-restriction
840 (widen)
841 (goto-char from)
842 (setq auto-cs (find-auto-coding (or file buffer-file-name "")
843 (- to from)))
844 (if auto-cs
845 (if (coding-system-p (car auto-cs))
846 (setq auto-cs (car auto-cs))
847 (display-warning
848 :warning
849 (format "\
850Invalid coding system `%s' is specified
851for the current buffer/file by the %s.
852It is highly recommended to fix it before writing to a file."
853 (car auto-cs)
854 (if (eq (cdr auto-cs) :coding) ":coding tag"
855 (format "variable `%s'" (cdr auto-cs)))))
856 (or (yes-or-no-p "Really proceed with writing? ")
857 (error "Save aborted"))
858 (setq auto-cs nil))))))
859
834 (if (eq (car default-coding-system) t) 860 (if (eq (car default-coding-system) t)
835 (setq no-other-defaults t 861 (setq no-other-defaults t
836 default-coding-system (cdr default-coding-system))) 862 default-coding-system (cdr default-coding-system)))
@@ -840,6 +866,15 @@ and TO is ignored."
840 (mapcar (function (lambda (x) (cons x (coding-system-base x)))) 866 (mapcar (function (lambda (x) (cons x (coding-system-base x))))
841 default-coding-system)) 867 default-coding-system))
842 868
869 (if (and auto-cs (not no-other-defaults))
870 ;; If the file has a coding cookie, try to use it before anything
871 ;; else (i.e. before default-coding-system which will typically come
872 ;; from file-coding-system-alist).
873 (let ((base (coding-system-base auto-cs)))
874 (or (memq base '(nil undecided))
875 (rassq base default-coding-system)
876 (push (cons auto-cs base) default-coding-system))))
877
843 ;; From now on, the list of defaults is reversed. 878 ;; From now on, the list of defaults is reversed.
844 (setq default-coding-system (nreverse default-coding-system)) 879 (setq default-coding-system (nreverse default-coding-system))
845 880
@@ -871,52 +906,45 @@ and TO is ignored."
871 (coding-system-get preferred :mime-charset) 906 (coding-system-get preferred :mime-charset)
872 (not (rassq base default-coding-system)) 907 (not (rassq base default-coding-system))
873 (push (cons preferred base) 908 (push (cons preferred base)
874 default-coding-system))))) 909 default-coding-system))))
875 910
876 (if select-safe-coding-system-accept-default-p 911 (if select-safe-coding-system-accept-default-p
877 (setq accept-default-p select-safe-coding-system-accept-default-p)) 912 (setq accept-default-p select-safe-coding-system-accept-default-p))
878 913
879 (let ((codings (find-coding-systems-region from to)) 914 (let ((codings (find-coding-systems-region from to))
880 (coding-system nil) 915 (coding-system nil)
881 safe rejected unsafe) 916 safe rejected unsafe)
882 ;; Classify the defaults into safe, rejected, and unsafe. 917 ;; Classify the defaults into safe, rejected, and unsafe.
883 (dolist (elt default-coding-system) 918 (dolist (elt default-coding-system)
884 (if (or (eq (car codings) 'undecided) 919 (if (or (eq (car codings) 'undecided)
885 (memq (cdr elt) codings)) 920 (memq (cdr elt) codings))
886 (if (and (functionp accept-default-p) 921 (if (and (functionp accept-default-p)
887 (not (funcall accept-default-p (cdr elt)))) 922 (not (funcall accept-default-p (cdr elt))))
888 (push (car elt) rejected) 923 (push (car elt) rejected)
889 (push (car elt) safe)) 924 (push (car elt) safe))
890 (push (car elt) unsafe))) 925 (push (car elt) unsafe)))
891 (if safe 926 (if safe
892 (setq coding-system (car safe))) 927 (setq coding-system (car safe)))
893 928
894 ;; If all the defaults failed, ask a user. 929 ;; If all the defaults failed, ask a user.
895 (unless coding-system 930 (unless coding-system
896 (setq coding-system (select-safe-coding-system-interactively 931 (setq coding-system (select-safe-coding-system-interactively
897 from to codings unsafe rejected (car codings)))) 932 from to codings unsafe rejected (car codings))))
898 933
899 (if (and coding-system (vectorp (coding-system-eol-type coding-system))) 934 (if (and coding-system (vectorp (coding-system-eol-type coding-system)))
900 (let ((eol (coding-system-eol-type buffer-file-coding-system))) 935 (let ((eol (coding-system-eol-type buffer-file-coding-system)))
901 (if (numberp eol) 936 (if (numberp eol)
902 (setq coding-system 937 (setq coding-system
903 (coding-system-change-eol-conversion coding-system eol))))) 938 (coding-system-change-eol-conversion coding-system eol)))))
904 939
905 ;; Check we're not inconsistent with what `coding:' spec &c would 940 ;; Check we're not inconsistent with what `coding:' spec &c would
906 ;; give when file is re-read. 941 ;; give when file is re-read.
907 ;; But don't do this if we explicitly ignored the cookie 942 ;; But don't do this if we explicitly ignored the cookie
908 ;; by using `find-file-literally'. 943 ;; by using `find-file-literally'.
909 (unless (or (stringp from) 944 (when (and auto-cs
910 find-file-literally 945 (not (and
911 (and coding-system 946 coding-system
912 (memq (coding-system-type coding-system) '(0 5)))) 947 (memq (coding-system-type coding-system) '(0 5)))))
913 (let ((auto-cs (save-excursion
914 (save-restriction
915 (widen)
916 (narrow-to-region from to)
917 (goto-char (point-min))
918 (set-auto-coding (or file buffer-file-name "")
919 (buffer-size))))))
920 ;; Merge coding-system and auto-cs as far as possible. 948 ;; Merge coding-system and auto-cs as far as possible.
921 (if (not coding-system) 949 (if (not coding-system)
922 (setq coding-system auto-cs) 950 (setq coding-system auto-cs)
@@ -948,8 +976,8 @@ and TO is ignored."
948 (format "Selected encoding %s disagrees with \ 976 (format "Selected encoding %s disagrees with \
949%s specified by file contents. Really save (else edit coding cookies \ 977%s specified by file contents. Really save (else edit coding cookies \
950and try again)? " coding-system auto-cs)) 978and try again)? " coding-system auto-cs))
951 (error "Save aborted"))))) 979 (error "Save aborted"))))
952 coding-system)) 980 coding-system)))
953 981
954(setq select-safe-coding-system-function 'select-safe-coding-system) 982(setq select-safe-coding-system-function 'select-safe-coding-system)
955 983
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 2ba0c034d92..b66ef2cd028 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1576,8 +1576,8 @@ This is used for loading and byte-compiling Emacs Lisp files.")
1576 (setq alist (cdr alist)))) 1576 (setq alist (cdr alist))))
1577 coding-system)) 1577 coding-system))
1578 1578
1579(defun set-auto-coding (filename size) 1579(defun find-auto-coding (filename size)
1580 "Return coding system for a file FILENAME of which SIZE bytes follow point. 1580 "Find a coding system for a file FILENAME of which SIZE bytes follow point.
1581These bytes should include at least the first 1k of the file 1581These bytes should include at least the first 1k of the file
1582and the last 3k of the file, but the middle may be omitted. 1582and the last 3k of the file, but the middle may be omitted.
1583 1583
@@ -1591,12 +1591,21 @@ contents of the current buffer following point against
1591succeed, it checks to see if any function in `auto-coding-functions' 1591succeed, it checks to see if any function in `auto-coding-functions'
1592gives a match. 1592gives a match.
1593 1593
1594The return value is the specified coding system, or nil if nothing is 1594If a coding system is specifed, the return value is a
1595specified. 1595cons (CODING . SOURCE), where CODING is the specified coding
1596system and SOURCE is a symbol `auto-coding-alist',
1597`auto-coding-regexp-alist', `coding:', or `auto-coding-functions'
1598indicating by what CODING is specified. Note that the validity
1599of CODING is not checked; it's callers responsibility to check
1600it.
1601
1602If nothing is specified, the return value is nil.
1596 1603
1597The variable `set-auto-coding-function' (which see) is set to this 1604The variable `set-auto-coding-function' (which see) is set to this
1598function by default." 1605function by default."
1599 (or (auto-coding-alist-lookup filename) 1606 (or (let ((coding-system (auto-coding-alist-lookup filename)))
1607 (if coding-system
1608 (cons coding-system 'auto-coding-alist)))
1600 ;; Try using `auto-coding-regexp-alist'. 1609 ;; Try using `auto-coding-regexp-alist'.
1601 (save-excursion 1610 (save-excursion
1602 (let ((alist auto-coding-regexp-alist) 1611 (let ((alist auto-coding-regexp-alist)
@@ -1606,7 +1615,8 @@ function by default."
1606 (when (re-search-forward regexp (+ (point) size) t) 1615 (when (re-search-forward regexp (+ (point) size) t)
1607 (setq coding-system (cdr (car alist))))) 1616 (setq coding-system (cdr (car alist)))))
1608 (setq alist (cdr alist))) 1617 (setq alist (cdr alist)))
1609 coding-system)) 1618 (if coding-system
1619 (cons coding-system 'auto-coding-regexp-alist))))
1610 (let* ((case-fold-search t) 1620 (let* ((case-fold-search t)
1611 (head-start (point)) 1621 (head-start (point))
1612 (head-end (+ head-start (min size 1024))) 1622 (head-end (+ head-start (min size 1024)))
@@ -1640,9 +1650,7 @@ function by default."
1640 (re-search-forward 1650 (re-search-forward
1641 "\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)" 1651 "\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)"
1642 head-end t)) 1652 head-end t))
1643 (setq coding-system (intern (match-string 2))) 1653 (setq coding-system (intern (match-string 2))))))
1644 (or (coding-system-p coding-system)
1645 (setq coding-system nil)))))
1646 1654
1647 ;; If no coding: tag in the head, check the tail. 1655 ;; If no coding: tag in the head, check the tail.
1648 ;; Here we must pay attention to the case that the end-of-line 1656 ;; Here we must pay attention to the case that the end-of-line
@@ -1683,10 +1691,9 @@ function by default."
1683 (setq coding-system 'raw-text)) 1691 (setq coding-system 'raw-text))
1684 (when (and (not coding-system) 1692 (when (and (not coding-system)
1685 (re-search-forward re-coding tail-end t)) 1693 (re-search-forward re-coding tail-end t))
1686 (setq coding-system (intern (match-string 1))) 1694 (setq coding-system (intern (match-string 1)))))))
1687 (or (coding-system-p coding-system) 1695 (if coding-system
1688 (setq coding-system nil)))))) 1696 (cons coding-system :coding)))
1689 coding-system)
1690 ;; Finally, try all the `auto-coding-functions'. 1697 ;; Finally, try all the `auto-coding-functions'.
1691 (let ((funcs auto-coding-functions) 1698 (let ((funcs auto-coding-functions)
1692 (coding-system nil)) 1699 (coding-system nil))
@@ -1696,7 +1703,16 @@ function by default."
1696 (goto-char (point-min)) 1703 (goto-char (point-min))
1697 (funcall (pop funcs) size)) 1704 (funcall (pop funcs) size))
1698 (error nil)))) 1705 (error nil))))
1699 coding-system))) 1706 (if coding-system
1707 (cons coding-system 'auto-coding-functions)))))
1708
1709(defun set-auto-coding (filename size)
1710 "Return coding system for a file FILENAME of which SIZE bytes follow point.
1711See `find-auto-coding' for how the coding system is found.
1712Return nil if an invalid coding system is found."
1713 (let ((found (find-auto-coding filename size)))
1714 (if (and found (coding-system-p (car found)))
1715 (car found))))
1700 1716
1701(setq set-auto-coding-function 'set-auto-coding) 1717(setq set-auto-coding-function 'set-auto-coding)
1702 1718
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ec3dcc37886..90a12b7a7b9 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -154,7 +154,12 @@ command history."
154 "Function(s) to call after starting up an incremental search.") 154 "Function(s) to call after starting up an incremental search.")
155 155
156(defvar isearch-mode-end-hook nil 156(defvar isearch-mode-end-hook nil
157 "Function(s) to call after terminating an incremental search.") 157 "Function(s) to call after terminating an incremental search.
158When these functions are called, `isearch-mode-end-hook-quit'
159is non-nil if the user quit the search.")
160
161(defvar isearch-mode-end-hook-quit nil
162 "Non-nil while running `isearch-mode-end-hook' if user quit the search.")
158 163
159(defvar isearch-wrap-function nil 164(defvar isearch-wrap-function nil
160 "Function to call to wrap the search when search is failed. 165 "Function to call to wrap the search when search is failed.
@@ -205,7 +210,7 @@ Default value, nil, means edit the string instead."
205 '((((class color) (min-colors 88) (background light)) 210 '((((class color) (min-colors 88) (background light))
206 ;; The background must not be too dark, for that means 211 ;; The background must not be too dark, for that means
207 ;; the character is hard to see when the cursor is there. 212 ;; the character is hard to see when the cursor is there.
208 (:background "magenta2" :foreground "lightskyblue1")) 213 (:background "magenta3" :foreground "lightskyblue1"))
209 (((class color) (min-colors 88) (background dark)) 214 (((class color) (min-colors 88) (background dark))
210 (:background "palevioletred2" :foreground "brown4")) 215 (:background "palevioletred2" :foreground "brown4"))
211 (((class color) (min-colors 16)) 216 (((class color) (min-colors 16))
@@ -352,13 +357,6 @@ A value of nil means highlight all matches."
352 (define-key map "\M-\C-y" 'isearch-yank-char) 357 (define-key map "\M-\C-y" 'isearch-yank-char)
353 (define-key map "\C-y" 'isearch-yank-line) 358 (define-key map "\C-y" 'isearch-yank-line)
354 359
355 ;; Define keys for regexp chars * ? } |.
356 ;; Nothing special for + because it matches at least once.
357 (define-key map "*" 'isearch-*-char)
358 (define-key map "?" 'isearch-*-char)
359 (define-key map "}" 'isearch-}-char)
360 (define-key map "|" 'isearch-|-char)
361
362 ;; Turned off because I find I expect to get the global definition--rms. 360 ;; Turned off because I find I expect to get the global definition--rms.
363 ;; ;; Instead bind C-h to special help command for isearch-mode. 361 ;; ;; Instead bind C-h to special help command for isearch-mode.
364 ;; (define-key map "\C-h" 'isearch-mode-help) 362 ;; (define-key map "\C-h" 'isearch-mode-help)
@@ -740,6 +738,12 @@ is treated as a regexp. See \\[isearch-forward] for more info."
740 (setq disable-point-adjustment t)) 738 (setq disable-point-adjustment t))
741 739
742(defun isearch-done (&optional nopush edit) 740(defun isearch-done (&optional nopush edit)
741 "Exit Isearch mode.
742For successful search, pass no args.
743For a failing search, NOPUSH is t.
744For going to the minibuffer to edit the search string,
745NOPUSH is t and EDIT is t."
746
743 (if isearch-resume-in-command-history 747 (if isearch-resume-in-command-history
744 (let ((command `(isearch-resume ,isearch-string ,isearch-regexp 748 (let ((command `(isearch-resume ,isearch-string ,isearch-regexp
745 ,isearch-word ,isearch-forward 749 ,isearch-word ,isearch-forward
@@ -791,7 +795,8 @@ is treated as a regexp. See \\[isearch-forward] for more info."
791 ;; Update the ring data. 795 ;; Update the ring data.
792 (isearch-update-ring isearch-string isearch-regexp)) 796 (isearch-update-ring isearch-string isearch-regexp))
793 797
794 (run-hooks 'isearch-mode-end-hook) 798 (let ((isearch-mode-end-hook-quit (and nopush (not edit))))
799 (run-hooks 'isearch-mode-end-hook))
795 800
796 ;; If there was movement, mark the starting position. 801 ;; If there was movement, mark the starting position.
797 ;; Maybe should test difference between and set mark iff > threshold. 802 ;; Maybe should test difference between and set mark iff > threshold.
@@ -1400,14 +1405,14 @@ might return the position of the end of the line."
1400Respects \\[isearch-repeat-forward] and \\[isearch-repeat-backward] by 1405Respects \\[isearch-repeat-forward] and \\[isearch-repeat-backward] by
1401stopping at `isearch-barrier' as needed. 1406stopping at `isearch-barrier' as needed.
1402 1407
1403Do nothing if a backslash is escaping the liberalizing character. If 1408Do nothing if a backslash is escaping the liberalizing character.
1404WANT-BACKSLASH is non-nil, invert this behavior (for \\} and \\|). 1409If WANT-BACKSLASH is non-nil, invert this behavior (for \\} and \\|).
1405 1410
1406Do nothing if regexp has recently been invalid unless optional ALLOW-INVALID 1411Do nothing if regexp has recently been invalid unless optional
1407non-nil. 1412ALLOW-INVALID non-nil.
1408 1413
1409If optional TO-BARRIER non-nil, ignore previous matches and go exactly to the 1414If optional TO-BARRIER non-nil, ignore previous matches and go exactly
1410barrier." 1415to the barrier."
1411 ;; (eq (not a) (not b)) makes all non-nil values equivalent 1416 ;; (eq (not a) (not b)) makes all non-nil values equivalent
1412 (when (and isearch-regexp (eq (not (isearch-backslash isearch-string)) 1417 (when (and isearch-regexp (eq (not (isearch-backslash isearch-string))
1413 (not want-backslash)) 1418 (not want-backslash))
@@ -1453,26 +1458,7 @@ barrier."
1453 (goto-char (if isearch-forward 1458 (goto-char (if isearch-forward
1454 (max last-other-end isearch-barrier) 1459 (max last-other-end isearch-barrier)
1455 (min last-other-end isearch-barrier))) 1460 (min last-other-end isearch-barrier)))
1456 (setq isearch-adjusted t)))))) 1461 (setq isearch-adjusted t)))))))
1457 (isearch-process-search-char last-command-char))
1458
1459;; * and ? are special when not preceded by \.
1460(defun isearch-*-char ()
1461 "Maybe back up to handle * and ? specially in regexps."
1462 (interactive)
1463 (isearch-fallback nil))
1464
1465;; } is special when it is preceded by \.
1466(defun isearch-}-char ()
1467 "Handle \\} specially in regexps."
1468 (interactive)
1469 (isearch-fallback t t))
1470
1471;; | is special when it is preceded by \.
1472(defun isearch-|-char ()
1473 "If in regexp search, jump to the barrier unless in a group."
1474 (interactive)
1475 (isearch-fallback t nil t))
1476 1462
1477(defun isearch-unread-key-sequence (keylist) 1463(defun isearch-unread-key-sequence (keylist)
1478 "Unread the given key-sequence KEYLIST. 1464 "Unread the given key-sequence KEYLIST.
@@ -1770,10 +1756,10 @@ Isearch mode."
1770 (isearch-process-search-char char)))) 1756 (isearch-process-search-char char))))
1771 1757
1772(defun isearch-return-char () 1758(defun isearch-return-char ()
1773 "Convert return into newline for incremental search. 1759 "Convert return into newline for incremental search."
1774Obsolete."
1775 (interactive) 1760 (interactive)
1776 (isearch-process-search-char ?\n)) 1761 (isearch-process-search-char ?\n))
1762(make-obsolete 'isearch-return-char 'isearch-printing-char)
1777 1763
1778(defun isearch-printing-char () 1764(defun isearch-printing-char ()
1779 "Add this ordinary printing character to the search string and search." 1765 "Add this ordinary printing character to the search string and search."
@@ -1792,6 +1778,14 @@ Obsolete."
1792 (isearch-process-search-char char))))) 1778 (isearch-process-search-char char)))))
1793 1779
1794(defun isearch-process-search-char (char) 1780(defun isearch-process-search-char (char)
1781 ;; * and ? are special in regexps when not preceded by \.
1782 ;; } and | are special in regexps when preceded by \.
1783 ;; Nothing special for + because it matches at least once.
1784 (cond
1785 ((memq char '(?* ??)) (isearch-fallback nil))
1786 ((eq char ?\}) (isearch-fallback t t))
1787 ((eq char ?|) (isearch-fallback t nil t)))
1788
1795 ;; Append the char to the search string, update the message and re-search. 1789 ;; Append the char to the search string, update the message and re-search.
1796 (isearch-process-search-string 1790 (isearch-process-search-string
1797 (char-to-string char) 1791 (char-to-string char)
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index bc6060f40c4..2eea86e7a4a 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -125,9 +125,18 @@ usually do not have translators to read other languages for them.\n\n")
125 125
126 (insert "\n\n") 126 (insert "\n\n")
127 (setq user-point (point)) 127 (setq user-point (point))
128 (insert "\n\n\n") 128 (insert "\n\n")
129
130 (insert "If emacs crashed, and you have the emacs process in the gdb debugger,\n"
131 "please include the output from the following gdb commands:\n"
132 " `bt full' and `xbacktrace'.\n")
133
134 (let ((debug-file (expand-file-name "DEBUG" data-directory)))
135 (if (file-readable-p debug-file)
136 (insert "If you would like to further debug the crash, please read the file\n"
137 debug-file " for instructions.\n")))
129 138
130 (insert "In " (emacs-version) "\n") 139 (insert "\n\nIn " (emacs-version) "\n")
131 (if (fboundp 'x-server-vendor) 140 (if (fboundp 'x-server-vendor)
132 (condition-case nil 141 (condition-case nil
133 (insert "X server distributor `" (x-server-vendor) "', version " 142 (insert "X server distributor `" (x-server-vendor) "', version "
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 0c076011044..55a4d060fad 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -1,6 +1,6 @@
1;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail 1;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail
2 2
3;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004 3;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> 6;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
@@ -207,7 +207,7 @@ This is relative to `smtpmail-queue-dir'.")
207(defvar smtpmail-queue-index (concat smtpmail-queue-dir 207(defvar smtpmail-queue-index (concat smtpmail-queue-dir
208 smtpmail-queue-index-file)) 208 smtpmail-queue-index-file))
209 209
210(defconst smtpmail-auth-supported '(cram-md5 login) 210(defconst smtpmail-auth-supported '(cram-md5 plain login)
211 "List of supported SMTP AUTH mechanisms.") 211 "List of supported SMTP AUTH mechanisms.")
212 212
213;;; 213;;;
@@ -559,8 +559,24 @@ This is relative to `smtpmail-queue-dir'.")
559 (not (integerp (car ret))) 559 (not (integerp (car ret)))
560 (>= (car ret) 400)) 560 (>= (car ret) 400))
561 (throw 'done nil))) 561 (throw 'done nil)))
562 ((eq mech 'plain)
563 (smtpmail-send-command process "AUTH PLAIN")
564 (if (or (null (car (setq ret (smtpmail-read-response process))))
565 (not (integerp (car ret)))
566 (not (equal (car ret) 334)))
567 (throw 'done nil))
568 (smtpmail-send-command process (base64-encode-string
569 (concat "\0"
570 (smtpmail-cred-user cred)
571 "\0"
572 (smtpmail-cred-passwd cred))))
573 (if (or (null (car (setq ret (smtpmail-read-response process))))
574 (not (integerp (car ret)))
575 (not (equal (car ret) 235)))
576 (throw 'done nil)))
577
562 (t 578 (t
563 (error "Mechanism %s not implemented" mech))) 579 (error "Mechanism %s not implemented" mech)))
564 ;; Remember the password. 580 ;; Remember the password.
565 (when (and (not (stringp smtpmail-auth-credentials)) 581 (when (and (not (stringp smtpmail-auth-credentials))
566 (null (smtpmail-cred-passwd cred))) 582 (null (smtpmail-cred-passwd cred)))
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el
index 14e613ac280..2a7fedf8493 100644
--- a/lisp/mail/uce.el
+++ b/lisp/mail/uce.el
@@ -283,7 +283,7 @@ address, and postmaster of the mail relay used."
283 (re-search-forward "^Lines:") 283 (re-search-forward "^Lines:")
284 (beginning-of-line)) 284 (beginning-of-line))
285 ((eq uce-mail-reader 'rmail) 285 ((eq uce-mail-reader 'rmail)
286 (beginning-of-buffer) 286 (goto-char (point-min))
287 (search-forward "*** EOOH ***\n") 287 (search-forward "*** EOOH ***\n")
288 (beginning-of-line) 288 (beginning-of-line)
289 (forward-line -1))) 289 (forward-line -1)))
@@ -364,11 +364,7 @@ address, and postmaster of the mail relay used."
364 (if (file-exists-p "~/.signature") 364 (if (file-exists-p "~/.signature")
365 (progn 365 (progn
366 (insert "\n\n-- \n") 366 (insert "\n\n-- \n")
367 (insert-file "~/.signature") 367 (forward-char (cadr (insert-file-contents "~/.signature"))))))
368 ;; Function insert-file leaves point where it was,
369 ;; while we want to place signature in the ``middle''
370 ;; of the message.
371 (exchange-point-and-mark))))
372 (uce-signature 368 (uce-signature
373 (insert "\n\n-- \n" uce-signature))) 369 (insert "\n\n-- \n" uce-signature)))
374 ;; And text of the original message. 370 ;; And text of the original message.
diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el
index a4ad3044f43..6ee8840d3bb 100644
--- a/lisp/net/eudc-bob.el
+++ b/lisp/net/eudc-bob.el
@@ -69,7 +69,7 @@
69 69
70(defun eudc-jump-to-event (event) 70(defun eudc-jump-to-event (event)
71 "Jump to the window and point where EVENT occurred." 71 "Jump to the window and point where EVENT occurred."
72 (if eudc-xemacs-p 72 (if (fboundp 'event-closest-point)
73 (goto-char (event-closest-point event)) 73 (goto-char (event-closest-point event))
74 (set-buffer (window-buffer (posn-window (event-start event)))) 74 (set-buffer (window-buffer (posn-window (event-start event))))
75 (goto-char (posn-point (event-start event))))) 75 (goto-char (posn-point (event-start event)))))
@@ -89,7 +89,7 @@
89 89
90(defun eudc-bob-can-display-inline-images () 90(defun eudc-bob-can-display-inline-images ()
91 "Return non-nil if we can display images inline." 91 "Return non-nil if we can display images inline."
92 (if eudc-xemacs-p 92 (if (fboundp 'console-type)
93 (and (memq (console-type) '(x mswindows)) 93 (and (memq (console-type) '(x mswindows))
94 (fboundp 'make-glyph)) 94 (fboundp 'make-glyph))
95 (and (fboundp 'display-graphic-p) 95 (and (fboundp 'display-graphic-p)
@@ -120,7 +120,7 @@ LABEL."
120 "Display the JPEG DATA at point. 120 "Display the JPEG DATA at point.
121If INLINE is non-nil, try to inline the image otherwise simply 121If INLINE is non-nil, try to inline the image otherwise simply
122display a button." 122display a button."
123 (cond (eudc-xemacs-p 123 (cond ((fboundp 'make-glyph)
124 (let ((glyph (if (eudc-bob-can-display-inline-images) 124 (let ((glyph (if (eudc-bob-can-display-inline-images)
125 (make-glyph (list (vector 'jpeg :data data) 125 (make-glyph (list (vector 'jpeg :data data)
126 [string :data "[JPEG Picture]"]))))) 126 [string :data "[JPEG Picture]"])))))
diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el
index f892bd6058e..a13606e8f43 100644
--- a/lisp/net/eudc-hotlist.el
+++ b/lisp/net/eudc-hotlist.el
@@ -51,11 +51,11 @@ These are the special commands of this mode:
51 (setq major-mode 'eudc-hotlist-mode) 51 (setq major-mode 'eudc-hotlist-mode)
52 (setq mode-name "EUDC-Servers") 52 (setq mode-name "EUDC-Servers")
53 (use-local-map eudc-hotlist-mode-map) 53 (use-local-map eudc-hotlist-mode-map)
54 (setq mode-popup-menu eudc-hotlist-menu) 54 (when (featurep 'xemacs)
55 (when (and eudc-xemacs-p 55 (setq mode-popup-menu eudc-hotlist-menu)
56 (featurep 'menubar)) 56 (when (featurep 'menubar)
57 (set-buffer-menubar current-menubar) 57 (set-buffer-menubar current-menubar)
58 (add-submenu nil (cons "EUDC-Hotlist" (cdr (cdr eudc-hotlist-menu))))) 58 (add-submenu nil (cons "EUDC-Hotlist" (cdr (cdr eudc-hotlist-menu))))))
59 (setq buffer-read-only t) 59 (setq buffer-read-only t)
60 (run-mode-hooks 'eudc-hotlist-mode-hook)) 60 (run-mode-hooks 'eudc-hotlist-mode-hook))
61 61
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6d6e606e5e5..9b029a17074 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2095,7 +2095,7 @@ target of the symlink differ."
2095 file))) 2095 file)))
2096 (unless noerror 2096 (unless noerror
2097 (when (not (file-exists-p file)) 2097 (when (not (file-exists-p file))
2098 (error "Cannot load nonexistant file `%s'" file))) 2098 (error "Cannot load nonexistent file `%s'" file)))
2099 (if (not (file-exists-p file)) 2099 (if (not (file-exists-p file))
2100 nil 2100 nil
2101 (unless nomessage 2101 (unless nomessage
diff --git a/lisp/novice.el b/lisp/novice.el
index 6fd67d4ac1e..ea17ea642e5 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -42,8 +42,7 @@
42If nil, the feature is disabled, i.e., all commands work normally.") 42If nil, the feature is disabled, i.e., all commands work normally.")
43 43
44;;;###autoload 44;;;###autoload
45(defvaralias 'disabled-command-hook 'disabled-command-function) 45(define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1")
46;;;###autoload (make-obsolete-variable 'disabled-command-hook 'disabled-command-function "22.1")
47 46
48;;;###autoload 47;;;###autoload
49(defun disabled-command-function (&rest ignore) 48(defun disabled-command-function (&rest ignore)
diff --git a/lisp/paths.el b/lisp/paths.el
index b79e925aee3..388da1af8f2 100644
--- a/lisp/paths.el
+++ b/lisp/paths.el
@@ -37,13 +37,13 @@
37;; DOC file rather than in memory. 37;; DOC file rather than in memory.
38 38
39(defun prune-directory-list (dirs &optional keep reject) 39(defun prune-directory-list (dirs &optional keep reject)
40 "Returns a copy of DIRS with all non-existant directories removed. 40 "Returns a copy of DIRS with all non-existent directories removed.
41The optional argument KEEP is a list of directories to retain even if 41The optional argument KEEP is a list of directories to retain even if
42they don't exist, and REJECT is a list of directories to remove from 42they don't exist, and REJECT is a list of directories to remove from
43DIRS, even if they exist; REJECT takes precedence over KEEP. 43DIRS, even if they exist; REJECT takes precedence over KEEP.
44 44
45Note that membership in REJECT and KEEP is checked using simple string 45Note that membership in REJECT and KEEP is checked using simple string
46comparision." 46comparison."
47 (apply #'nconc 47 (apply #'nconc
48 (mapcar (lambda (dir) 48 (mapcar (lambda (dir)
49 (and (not (member dir reject)) 49 (and (not (member dir reject))
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el
index 9531f06b3c6..05495d1e264 100644
--- a/lisp/pcvs-util.el
+++ b/lisp/pcvs-util.el
@@ -188,7 +188,7 @@ arguments. If ARGS is not a list, no argument will be passed."
188 "Concatenate the STRINGS, adding the SEPARATOR (default \" \"). 188 "Concatenate the STRINGS, adding the SEPARATOR (default \" \").
189This tries to quote the strings to avoid ambiguity such that 189This tries to quote the strings to avoid ambiguity such that
190 (cvs-string->strings (cvs-strings->string strs)) == strs 190 (cvs-string->strings (cvs-strings->string strs)) == strs
191Only some SEPARATOR will work properly." 191Only some SEPARATORs will work properly."
192 (let ((sep (or separator " "))) 192 (let ((sep (or separator " ")))
193 (mapconcat 193 (mapconcat
194 (lambda (str) 194 (lambda (str)
@@ -277,7 +277,7 @@ The SEPARATOR regexp defaults to \"\\s-+\"."
277 277
278(defun cvs-flags-query (sym &optional desc arg) 278(defun cvs-flags-query (sym &optional desc arg)
279 "Query flags based on SYM. 279 "Query flags based on SYM.
280Optional argument DESC will be used for the prompt 280Optional argument DESC will be used for the prompt.
281If ARG (or a prefix argument) is nil, just use the 0th default. 281If ARG (or a prefix argument) is nil, just use the 0th default.
282If it is a non-negative integer, use the corresponding default. 282If it is a non-negative integer, use the corresponding default.
283If it is a negative integer query for a new value of the corresponding 283If it is a negative integer query for a new value of the corresponding
@@ -382,7 +382,7 @@ If ARG is nil toggle the PREFIX's value between its 0th default and nil
382 382
383(defun cvs-prefix-get (sym &optional read-only) 383(defun cvs-prefix-get (sym &optional read-only)
384 "Return the current value of the prefix SYM. 384 "Return the current value of the prefix SYM.
385and reset it unless READ-ONLY is non-nil." 385And reset it unless READ-ONLY is non-nil."
386 (prog1 (symbol-value sym) 386 (prog1 (symbol-value sym)
387 (unless (or read-only 387 (unless (or read-only
388 (cvs-flags-persist (symbol-value (cvs-prefix-sym sym)))) 388 (cvs-flags-persist (symbol-value (cvs-prefix-sym sym))))
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index df68343ddc2..00193973b00 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -179,9 +179,7 @@ static unsigned char gamegrid_bits[] = {
179 179
180(defun gamegrid-make-mono-tty-face () 180(defun gamegrid-make-mono-tty-face ()
181 (let ((face (make-face 'gamegrid-mono-tty-face))) 181 (let ((face (make-face 'gamegrid-mono-tty-face)))
182 (condition-case nil 182 (set-face-inverse-video-p face t)
183 (set-face-property face 'reverse t)
184 (error nil))
185 face)) 183 face))
186 184
187(defun gamegrid-make-color-tty-face (color) 185(defun gamegrid-make-color-tty-face (color)
@@ -298,7 +296,7 @@ static unsigned char gamegrid_bits[] = {
298 'emacs-tty))) 296 'emacs-tty)))
299 297
300(defun gamegrid-set-display-table () 298(defun gamegrid-set-display-table ()
301 (if (fboundp 'specifierp) 299 (if (featurep 'xemacs)
302 (add-spec-to-specifier current-display-table 300 (add-spec-to-specifier current-display-table
303 gamegrid-display-table 301 gamegrid-display-table
304 (current-buffer) 302 (current-buffer)
@@ -409,7 +407,7 @@ static unsigned char gamegrid_bits[] = {
409 407
410(defun gamegrid-set-timer (delay) 408(defun gamegrid-set-timer (delay)
411 (if gamegrid-timer 409 (if gamegrid-timer
412 (if (featurep 'itimer) 410 (if (fboundp 'set-itimer-restart)
413 (set-itimer-restart gamegrid-timer delay) 411 (set-itimer-restart gamegrid-timer delay)
414 (timer-set-time gamegrid-timer 412 (timer-set-time gamegrid-timer
415 (list (aref gamegrid-timer 1) 413 (list (aref gamegrid-timer 1)
@@ -475,25 +473,27 @@ FILE is created there."
475;; FILE in the user's home directory. There is presumably no 473;; FILE in the user's home directory. There is presumably no
476;; shared game directory. 474;; shared game directory.
477 475
476(defvar gamegrid-shared-game-dir)
477
478(defun gamegrid-add-score-with-update-game-score (file score) 478(defun gamegrid-add-score-with-update-game-score (file score)
479 (let* ((result nil) ;; What is this good for? -- os 479 (let* ((result nil) ;; What is this good for? -- os
480 (have-shared-game-dir 480 (gamegrid-shared-game-dir
481 (not (zerop (logand (file-modes 481 (not (zerop (logand (file-modes
482 (expand-file-name "update-game-score" 482 (expand-file-name "update-game-score"
483 exec-directory)) 483 exec-directory))
484 #o4000))))) 484 #o4000)))))
485 (cond ((file-name-absolute-p file) 485 (cond ((file-name-absolute-p file)
486 (gamegrid-add-score-insecure file score)) 486 (gamegrid-add-score-insecure file score))
487 ((and have-shared-game-dir 487 ((and gamegrid-shared-game-dir
488 (file-exists-p (expand-file-name file shared-game-score-directory))) 488 (file-exists-p (expand-file-name file shared-game-score-directory)))
489 ;; Use the setuid "update-game-score" program to update a 489 ;; Use the setuid "update-game-score" program to update a
490 ;; system-wide score file. 490 ;; system-wide score file.
491 (gamegrid-add-score-with-update-game-score-1 491 (gamegrid-add-score-with-update-game-score-1 file
492 (expand-file-name file shared-game-score-directory) score)) 492 (expand-file-name file shared-game-score-directory) score))
493 ;; Else: Add the score to a score file in the user's home 493 ;; Else: Add the score to a score file in the user's home
494 ;; directory. 494 ;; directory.
495 (have-shared-game-dir 495 (gamegrid-shared-game-dir
496 ;; If `have-shared-game-dir' is non-nil, then 496 ;; If `gamegrid-shared-game-dir' is non-nil, then
497 ;; "update-gamescore" program is setuid, so don't use it. 497 ;; "update-gamescore" program is setuid, so don't use it.
498 (unless (file-exists-p 498 (unless (file-exists-p
499 (directory-file-name gamegrid-user-score-file-directory)) 499 (directory-file-name gamegrid-user-score-file-directory))
@@ -509,9 +509,9 @@ FILE is created there."
509 (setq f (expand-file-name file f)) 509 (setq f (expand-file-name file f))
510 (unless (file-exists-p f) 510 (unless (file-exists-p f)
511 (write-region "" nil f nil 'silent nil 'excl))) 511 (write-region "" nil f nil 'silent nil 'excl)))
512 (gamegrid-add-score-with-update-game-score-1 f score)))))) 512 (gamegrid-add-score-with-update-game-score-1 file f score))))))
513 513
514(defun gamegrid-add-score-with-update-game-score-1 (target score) 514(defun gamegrid-add-score-with-update-game-score-1 (file target score)
515 (let ((default-directory "/") 515 (let ((default-directory "/")
516 (errbuf (generate-new-buffer " *update-game-score loss*"))) 516 (errbuf (generate-new-buffer " *update-game-score loss*")))
517 (apply 517 (apply
@@ -521,7 +521,7 @@ FILE is created there."
521 (expand-file-name "update-game-score" exec-directory) 521 (expand-file-name "update-game-score" exec-directory)
522 nil errbuf nil 522 nil errbuf nil
523 "-m" (int-to-string gamegrid-score-file-length) 523 "-m" (int-to-string gamegrid-score-file-length)
524 "-d" (if have-shared-game-dir 524 "-d" (if gamegrid-shared-game-dir
525 (expand-file-name shared-game-score-directory) 525 (expand-file-name shared-game-score-directory)
526 (file-name-directory target)) 526 (file-name-directory target))
527 file 527 file
diff --git a/lisp/play/snake.el b/lisp/play/snake.el
index 8909f3fada2..a36b29eee59 100644
--- a/lisp/play/snake.el
+++ b/lisp/play/snake.el
@@ -370,15 +370,16 @@ Snake mode keybindings:
370 (setq major-mode 'snake-mode) 370 (setq major-mode 'snake-mode)
371 (setq mode-name "Snake") 371 (setq mode-name "Snake")
372 372
373 (setq mode-popup-menu 373 (unless (featurep 'emacs)
374 '("Snake Commands" 374 (setq mode-popup-menu
375 ["Start new game" snake-start-game] 375 '("Snake Commands"
376 ["End game" snake-end-game 376 ["Start new game" snake-start-game]
377 (snake-active-p)] 377 ["End game" snake-end-game
378 ["Pause" snake-pause-game 378 (snake-active-p)]
379 (and (snake-active-p) (not snake-paused))] 379 ["Pause" snake-pause-game
380 ["Resume" snake-pause-game 380 (and (snake-active-p) (not snake-paused))]
381 (and (snake-active-p) snake-paused)])) 381 ["Resume" snake-pause-game
382 (and (snake-active-p) snake-paused)])))
382 383
383 (setq gamegrid-use-glyphs snake-use-glyphs-flag) 384 (setq gamegrid-use-glyphs snake-use-glyphs-flag)
384 (setq gamegrid-use-color snake-use-color-flag) 385 (setq gamegrid-use-color snake-use-color-flag)
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index 7ef997a9865..9ecb9261241 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -601,15 +601,16 @@ tetris-mode keybindings:
601 (setq major-mode 'tetris-mode) 601 (setq major-mode 'tetris-mode)
602 (setq mode-name "Tetris") 602 (setq mode-name "Tetris")
603 603
604 (setq mode-popup-menu 604 (unless (featurep 'emacs)
605 '("Tetris Commands" 605 (setq mode-popup-menu
606 ["Start new game" tetris-start-game] 606 '("Tetris Commands"
607 ["End game" tetris-end-game 607 ["Start new game" tetris-start-game]
608 (tetris-active-p)] 608 ["End game" tetris-end-game
609 ["Pause" tetris-pause-game 609 (tetris-active-p)]
610 (and (tetris-active-p) (not tetris-paused))] 610 ["Pause" tetris-pause-game
611 ["Resume" tetris-pause-game 611 (and (tetris-active-p) (not tetris-paused))]
612 (and (tetris-active-p) tetris-paused)])) 612 ["Resume" tetris-pause-game
613 (and (tetris-active-p) tetris-paused)])))
613 614
614 (setq gamegrid-use-glyphs tetris-use-glyphs) 615 (setq gamegrid-use-glyphs tetris-use-glyphs)
615 (setq gamegrid-use-color tetris-use-color) 616 (setq gamegrid-use-color tetris-use-color)
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index a075729ab99..7379a6f0352 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -622,7 +622,7 @@ If the element is a function or a list of a function and a number,
622 (sit-for 3) 622 (sit-for 3)
623 (erase-buffer) 623 (erase-buffer)
624 (sit-for 3) 624 (sit-for 3)
625 (insert-buffer "*Messages*") 625 (insert-buffer-substring "*Messages*")
626 (message "") 626 (message "")
627 (goto-char (point-max)) 627 (goto-char (point-max))
628 (recenter -1) 628 (recenter -1)
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index fdb1a9d69f7..d062d6d1e98 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -5349,7 +5349,8 @@ spec buffer in here and modify it to make it a body.
5349This function typically is to be hooked into `ff-file-created-hooks'." 5349This function typically is to be hooked into `ff-file-created-hooks'."
5350 (interactive) 5350 (interactive)
5351 (delete-region (point-min) (point-max)) 5351 (delete-region (point-min) (point-max))
5352 (insert-buffer (car (cdr (buffer-list)))) 5352 (insert-buffer-substring (car (cdr (buffer-list))))
5353 (goto-char (point-min))
5353 (ada-mode) 5354 (ada-mode)
5354 5355
5355 (let (found ada-procedure-or-package-start-regexp) 5356 (let (found ada-procedure-or-package-start-regexp)
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index 94ac76c0686..c98dbdac892 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -204,7 +204,8 @@ repeatedly until you are satisfied with the kind of comment."
204 (let (comempty comment) 204 (let (comempty comment)
205 (save-excursion 205 (save-excursion
206 (beginning-of-line) 206 (beginning-of-line)
207 (setq comment (comment-search-forward (line-end-position) t)) 207 (with-no-warnings
208 (setq comment (comment-search-forward (line-end-position) t)))
208 (setq comempty (looking-at "[ \t]*$"))) 209 (setq comempty (looking-at "[ \t]*$")))
209 210
210 (cond 211 (cond
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 99d33553f53..02fe9c5f117 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1790,7 +1790,8 @@ Any other key combination is executed normally."
1790 (let (char event) 1790 (let (char event)
1791 (if (fboundp 'next-command-event) ; XEmacs 1791 (if (fboundp 'next-command-event) ; XEmacs
1792 (setq event (next-command-event) 1792 (setq event (next-command-event)
1793 char (event-to-character event)) 1793 char (and (fboundp 'event-to-character)
1794 (event-to-character event)))
1794 (setq event (read-event) 1795 (setq event (read-event)
1795 char event)) 1796 char event))
1796 ;; Insert char if not equal to `?', or if abbrev-mode is off. 1797 ;; Insert char if not equal to `?', or if abbrev-mode is off.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index f4b6a705ea9..8a426a37365 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -503,15 +503,11 @@ Also display the main routine in the disassembly buffer if present."
503 (setq gdb-var-list (nreverse var-list)))))) 503 (setq gdb-var-list (nreverse var-list))))))
504 504
505(defun gdb-var-update () 505(defun gdb-var-update ()
506 (if (not (member 'gdb-var-update gdb-pending-triggers)) 506 (when (not (member 'gdb-var-update gdb-pending-triggers))
507 (progn 507 (gdb-enqueue-input
508 (gdb-enqueue-input 508 (list "server interpreter mi \"-var-update *\"\n"
509 (list 509 'gdb-var-update-handler))
510 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 510 (push 'gdb-var-update gdb-pending-triggers)))
511 "server interpreter mi \"-var-update *\"\n"
512 "-var-update *\n")
513 'gdb-var-update-handler))
514 (push 'gdb-var-update gdb-pending-triggers))))
515 511
516(defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"") 512(defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"")
517 513
@@ -522,13 +518,9 @@ Also display the main routine in the disassembly buffer if present."
522 (let ((varnum (match-string 1))) 518 (let ((varnum (match-string 1)))
523 (gdb-enqueue-input 519 (gdb-enqueue-input
524 (list 520 (list
525 (if (with-current-buffer gud-comint-buffer 521 (concat "server interpreter mi \"-var-evaluate-expression "
526 (eq gud-minor-mode 'gdba)) 522 varnum "\"\n")
527 (concat "server interpreter mi \"-var-evaluate-expression " 523 `(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))
528 varnum "\"\n")
529 (concat "-var-evaluate-expression " varnum "\n"))
530 `(lambda () (gdb-var-evaluate-expression-handler
531 ,varnum t)))))))
532 (setq gdb-pending-triggers 524 (setq gdb-pending-triggers
533 (delq 'gdb-var-update gdb-pending-triggers)) 525 (delq 'gdb-var-update gdb-pending-triggers))
534 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 526 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
@@ -544,9 +536,10 @@ Also display the main routine in the disassembly buffer if present."
544 (speedbar-timer-fn))) 536 (speedbar-timer-fn)))
545 537
546(defun gdb-var-delete () 538(defun gdb-var-delete ()
547 "Delete watched expression from the speedbar." 539 "Delete watch expression at point from the speedbar."
548 (interactive) 540 (interactive)
549 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 541 (if (with-current-buffer
542 gud-comint-buffer (memq gud-minor-mode '(gdbmi gdba)))
550 (let ((text (speedbar-line-text))) 543 (let ((text (speedbar-line-text)))
551 (string-match "\\(\\S-+\\)" text) 544 (string-match "\\(\\S-+\\)" text)
552 (let* ((expr (match-string 1 text)) 545 (let* ((expr (match-string 1 text))
@@ -595,7 +588,9 @@ INDENT is the current indentation depth."
595 (cond ((string-match "+" text) ;expand this node 588 (cond ((string-match "+" text) ;expand this node
596 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 589 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
597 (gdb-var-list-children token) 590 (gdb-var-list-children token)
598 (gdbmi-var-list-children token))) 591 (progn
592 (gdbmi-var-update)
593 (gdbmi-var-list-children token))))
599 ((string-match "-" text) ;contract this node 594 ((string-match "-" text) ;contract this node
600 (dolist (var gdb-var-list) 595 (dolist (var gdb-var-list)
601 (if (string-match (concat token "\\.") (nth 1 var)) 596 (if (string-match (concat token "\\.") (nth 1 var))
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 0f1045eeb5a..8f6dd73cba1 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -196,6 +196,7 @@ See `compilation-error-screen-columns'"
196 (define-key map "p" 'previous-error-no-select) 196 (define-key map "p" 'previous-error-no-select)
197 (define-key map "{" 'compilation-previous-file) 197 (define-key map "{" 'compilation-previous-file)
198 (define-key map "}" 'compilation-next-file) 198 (define-key map "}" 'compilation-next-file)
199 (define-key map [backtab] 'compilation-previous-file)
199 (define-key map "\t" 'compilation-next-file) 200 (define-key map "\t" 'compilation-next-file)
200 201
201 ;; Set up the menu-bar 202 ;; Set up the menu-bar
@@ -255,16 +256,17 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
255\\(?:-\\(?:\\([0-9]+\\)\\4\\)?\\.?\\([0-9]+\\)?\\)?\\2" 256\\(?:-\\(?:\\([0-9]+\\)\\4\\)?\\.?\\([0-9]+\\)?\\)?\\2"
256 1 (3 . 6) (5 . 7)) 257 1 (3 . 6) (5 . 7))
257 ("^\\(\\(.+?\\):\\([0-9]+\\):\\).*?\ 258 ("^\\(\\(.+?\\):\\([0-9]+\\):\\).*?\
258\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)" 259\\(\033\\[01;31m\\(?:\033\\[K\\)?\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)"
259 2 3 260 2 3
260 ;; Calculate column positions (beg . end) of first grep match on a line 261 ;; Calculate column positions (beg . end) of first grep match on a line
261 ((lambda () 262 ((lambda ()
262 (setq compilation-error-screen-columns nil) 263 (setq compilation-error-screen-columns nil)
263 (- (match-beginning 5) (match-end 1) 8)) 264 (- (match-beginning 4) (match-end 1)))
264 . 265 .
265 (lambda () (- (match-end 5) (match-end 1) 8))) 266 (lambda () (- (match-end 5) (match-end 1)
267 (- (match-end 4) (match-beginning 4)))))
266 nil 1) 268 nil 1)
267 ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) 269 ("^Binary file \\(.+\\) matches$" 1 nil nil 1 1))
268 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") 270 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.")
269 271
270(defvar grep-error "grep hit" 272(defvar grep-error "grep hit"
@@ -296,17 +298,21 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
296 (1 compilation-warning-face) 298 (1 compilation-warning-face)
297 (2 compilation-line-face)) 299 (2 compilation-line-face))
298 ;; Highlight grep matches and delete markers 300 ;; Highlight grep matches and delete markers
299 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)" 301 ("\\(\033\\[01;31m\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)"
300 ;; Refontification does not work after the markers have been 302 ;; Refontification does not work after the markers have been
301 ;; deleted. So we use the font-lock-face property here as Font 303 ;; deleted. So we use the font-lock-face property here as Font
302 ;; Lock does not clear that. 304 ;; Lock does not clear that.
303 (2 (list 'face nil 'font-lock-face grep-match-face)) 305 (2 (list 'face nil 'font-lock-face grep-match-face))
304 ((lambda (p)) 306 ((lambda (bound))
305 (progn 307 (progn
306 ;; Delete markers with `replace-match' because it updates 308 ;; Delete markers with `replace-match' because it updates
307 ;; the match-data, whereas `delete-region' would render it obsolete. 309 ;; the match-data, whereas `delete-region' would render it obsolete.
308 (replace-match "" t t nil 3) 310 (replace-match "" t t nil 3)
309 (replace-match "" t t nil 1))))) 311 (replace-match "" t t nil 1))))
312 ("\\(\033\\[[0-9;]*[mK]\\)"
313 ;; Delete all remaining escape sequences
314 ((lambda (bound))
315 (replace-match "" t t nil 1))))
310 "Additional things to highlight in grep output. 316 "Additional things to highlight in grep output.
311This gets tacked on the end of the generated expressions.") 317This gets tacked on the end of the generated expressions.")
312 318
@@ -354,7 +360,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
354 (when (eq grep-highlight-matches t) 360 (when (eq grep-highlight-matches t)
355 ;; Modify `process-environment' locally bound in `compilation-start' 361 ;; Modify `process-environment' locally bound in `compilation-start'
356 (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=always")) 362 (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=always"))
357 (setenv "GREP_COLOR" "01;41")) 363 ;; for GNU grep 2.5.1
364 (setenv "GREP_COLOR" "01;31")
365 ;; for GNU grep 2.5.1-cvs
366 (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:ml=:cx=:ne"))
358 (set (make-local-variable 'compilation-exit-message-function) 367 (set (make-local-variable 'compilation-exit-message-function)
359 (lambda (status code msg) 368 (lambda (status code msg)
360 (if (eq status 'exit) 369 (if (eq status 'exit)
@@ -514,6 +523,7 @@ temporarily highlight in visited source lines."
514 command-args) 523 command-args)
515 'grep-mode nil highlight-regexp))) 524 'grep-mode nil highlight-regexp)))
516 525
526;;;###autoload
517(define-compilation-mode grep-mode "Grep" 527(define-compilation-mode grep-mode "Grep"
518 "Sets `grep-last-buffer' and `compilation-window-height'." 528 "Sets `grep-last-buffer' and `compilation-window-height'."
519 (setq grep-last-buffer (current-buffer)) 529 (setq grep-last-buffer (current-buffer))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 50644383667..f93ff3d7e02 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -42,7 +42,6 @@
42(eval-when-compile (require 'cl)) ; for case macro 42(eval-when-compile (require 'cl)) ; for case macro
43 43
44(require 'comint) 44(require 'comint)
45(require 'etags)
46(require 'font-lock) 45(require 'font-lock)
47 46
48;; ====================================================================== 47;; ======================================================================
@@ -352,10 +351,10 @@ t means that there is no stack, and we are in display-file mode.")
352 (not (memq gud-minor-mode '(gdbmi gdba))))] 351 (not (memq gud-minor-mode '(gdbmi gdba))))]
353 ["Edit value" speedbar-edit-line 352 ["Edit value" speedbar-edit-line
354 (with-current-buffer gud-comint-buffer 353 (with-current-buffer gud-comint-buffer
355 (not (memq gud-minor-mode '(gdbmi gdba))))] 354 (memq gud-minor-mode '(gdbmi gdba)))]
356 ["Delete expression" gdb-var-delete 355 ["Delete expression" gdb-var-delete
357 (with-current-buffer gud-comint-buffer 356 (with-current-buffer gud-comint-buffer
358 (not (memq gud-minor-mode '(gdbmi gdba))))]) 357 (memq gud-minor-mode '(gdbmi gdba)))])
359 "Additional menu items to add to the speedbar frame.") 358 "Additional menu items to add to the speedbar frame.")
360 359
361;; Make sure our special speedbar mode is loaded 360;; Make sure our special speedbar mode is loaded
@@ -833,6 +832,7 @@ The directory containing FILE becomes the initial working directory
833and source-file directory for your debugger." 832and source-file directory for your debugger."
834 (interactive (list (gud-query-cmdline 'sdb))) 833 (interactive (list (gud-query-cmdline 'sdb)))
835 834
835 (if gud-sdb-needs-tags (require 'etags))
836 (if (and gud-sdb-needs-tags 836 (if (and gud-sdb-needs-tags
837 (not (and (boundp 'tags-file-name) 837 (not (and (boundp 'tags-file-name)
838 (stringp tags-file-name) 838 (stringp tags-file-name)
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index ebe37bc1d46..3212107b20d 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -1493,12 +1493,12 @@ The default is a name found in the buffer around point."
1493 1493
1494(if pascal-outline-map 1494(if pascal-outline-map
1495 nil 1495 nil
1496 (if (boundp 'set-keymap-name) 1496 (if (fboundp 'set-keymap-name)
1497 (set-keymap-name pascal-outline-map 'pascal-outline-map)) 1497 (set-keymap-name pascal-outline-map 'pascal-outline-map))
1498 (if (not (boundp 'set-keymap-parent)) 1498 (if (fboundp 'set-keymap-parent)
1499 (setq pascal-outline-map (copy-keymap pascal-mode-map)) 1499 (set-keymap-parent (setq pascal-outline-map (make-sparse-keymap))
1500 (setq pascal-outline-map (make-sparse-keymap)) 1500 pascal-mode-map)
1501 (set-keymap-parent pascal-outline-map pascal-mode-map)) 1501 (setq pascal-outline-map (copy-keymap pascal-mode-map)))
1502 (define-key pascal-outline-map "\M-\C-a" 'pascal-outline-prev-defun) 1502 (define-key pascal-outline-map "\M-\C-a" 'pascal-outline-prev-defun)
1503 (define-key pascal-outline-map "\M-\C-e" 'pascal-outline-next-defun) 1503 (define-key pascal-outline-map "\M-\C-e" 'pascal-outline-next-defun)
1504 (define-key pascal-outline-map "\C-c\C-d" 'pascal-outline-goto-defun) 1504 (define-key pascal-outline-map "\C-c\C-d" 'pascal-outline-goto-defun)
@@ -1533,7 +1533,7 @@ Pascal Outline mode provides some additional commands.
1533 (interactive "P") 1533 (interactive "P")
1534 (setq pascal-outline-mode 1534 (setq pascal-outline-mode
1535 (if (null arg) (not pascal-outline-mode) t)) 1535 (if (null arg) (not pascal-outline-mode) t))
1536 (if (boundp 'redraw-mode-line) 1536 (if (fboundp 'redraw-mode-line)
1537 (redraw-mode-line)) 1537 (redraw-mode-line))
1538 (if pascal-outline-mode 1538 (if pascal-outline-mode
1539 (progn 1539 (progn
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 98d65d6a653..ffaa78becc1 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -2269,7 +2269,7 @@ programming like EPS.
2269FILENAME is ignored, if it doesn't exist or is read protected. 2269FILENAME is ignored, if it doesn't exist or is read protected.
2270 2270
2271X and Y are relative positions on paper to put the image. 2271X and Y are relative positions on paper to put the image.
2272If X and Y are nil, the image is centralized on paper. 2272If X and Y are nil, the image is centered on paper.
2273 2273
2274XSCALE and YSCALE are scale factor to be applied to image before printing. 2274XSCALE and YSCALE are scale factor to be applied to image before printing.
2275If XSCALE and YSCALE are nil, the original size is used. 2275If XSCALE and YSCALE are nil, the original size is used.
@@ -3031,7 +3031,7 @@ Valid values are:
3031 Where RED, GREEN and BLUE are reals between 0.0 (no color) and 3031 Where RED, GREEN and BLUE are reals between 0.0 (no color) and
3032 1.0 (full color). 3032 1.0 (full color).
3033 3033
3034Any other value is ignored and it's used the black color. 3034Any other value is ignored and black will be used.
3035 3035
3036It's used only when `ps-print-color-p' is non-nil." 3036It's used only when `ps-print-color-p' is non-nil."
3037 :type '(choice :menu-tag "Default Foreground Gray/Color" 3037 :type '(choice :menu-tag "Default Foreground Gray/Color"
@@ -3071,7 +3071,7 @@ Valid values are:
3071 Where RED, GREEN and BLUE are reals between 0.0 (no color) and 3071 Where RED, GREEN and BLUE are reals between 0.0 (no color) and
3072 1.0 (full color). 3072 1.0 (full color).
3073 3073
3074Any other value is ignored and it's used the white color. 3074Any other value is ignored and white will be used.
3075 3075
3076It's used only when `ps-print-color-p' is non-nil. 3076It's used only when `ps-print-color-p' is non-nil.
3077 3077
@@ -4137,10 +4137,10 @@ Each symbol correspond to one bit in a bit vector.")
4137If optional MERGE-P is non-nil, extensions in FACE-EXTENSION-LIST are merged 4137If optional MERGE-P is non-nil, extensions in FACE-EXTENSION-LIST are merged
4138with face extension in ALIST-SYM; otherwise, overrides. 4138with face extension in ALIST-SYM; otherwise, overrides.
4139 4139
4140If optional ALIST-SYM is nil, it's used `ps-print-face-extension-alist'; 4140If optional ALIST-SYM is nil, `ps-print-face-extension-alist' is used;
4141otherwise, it should be an alist symbol. 4141otherwise, it should be an alist symbol.
4142 4142
4143The elements in FACE-EXTENSION-LIST is like those for `ps-extend-face'. 4143The elements in FACE-EXTENSION-LIST are like those for `ps-extend-face'.
4144 4144
4145See `ps-extend-face' for documentation." 4145See `ps-extend-face' for documentation."
4146 (while face-extension-list 4146 (while face-extension-list
@@ -4155,7 +4155,7 @@ See `ps-extend-face' for documentation."
4155If optional MERGE-P is non-nil, extensions in FACE-EXTENSION list are merged 4155If optional MERGE-P is non-nil, extensions in FACE-EXTENSION list are merged
4156with face extensions in ALIST-SYM; otherwise, overrides. 4156with face extensions in ALIST-SYM; otherwise, overrides.
4157 4157
4158If optional ALIST-SYM is nil, it's used `ps-print-face-extension-alist'; 4158If optional ALIST-SYM is nil, `ps-print-face-extension-alist' is used;
4159otherwise, it should be an alist symbol. 4159otherwise, it should be an alist symbol.
4160 4160
4161The elements of FACE-EXTENSION list have the form: 4161The elements of FACE-EXTENSION list have the form:
@@ -4974,7 +4974,7 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th
4974 "PrintHeight 2 div BottomMargin add") 4974 "PrintHeight 2 div BottomMargin add")
4975 "\nBeginBackImage\n") 4975 "\nBeginBackImage\n")
4976 (ps-insert-file image-file) 4976 (ps-insert-file image-file)
4977 ;; coordinate adjustment to centralize image 4977 ;; coordinate adjustment to center image
4978 ;; around x and y position 4978 ;; around x and y position
4979 (let ((box (ps-get-boundingbox))) 4979 (let ((box (ps-get-boundingbox)))
4980 (save-excursion 4980 (save-excursion
diff --git a/lisp/replace.el b/lisp/replace.el
index a8ef61e828d..451650401b1 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -847,7 +847,7 @@ Compatibility function for \\[next-error] invocations."
847 '((((class color) (min-colors 88) (background light)) 847 '((((class color) (min-colors 88) (background light))
848 :background "Tan") 848 :background "Tan")
849 (((class color) (min-colors 88) (background dark)) 849 (((class color) (min-colors 88) (background dark))
850 :background "RoyalBlue4") 850 :background "RoyalBlue3")
851 (((class color) (min-colors 8)) 851 (((class color) (min-colors 8))
852 :background "blue" :foreground "white") 852 :background "blue" :foreground "white")
853 (((type tty) (class mono)) 853 (((type tty) (class mono))
diff --git a/lisp/s-region.el b/lisp/s-region.el
index d3fa6b1f307..b28ab222434 100644
--- a/lisp/s-region.el
+++ b/lisp/s-region.el
@@ -63,12 +63,12 @@
63 (error "Non-vector key: %S" key))) 63 (error "Non-vector key: %S" key)))
64 64
65(defun s-region-move-p1 (&rest arg) 65(defun s-region-move-p1 (&rest arg)
66 "This is an overlay function to point-moving keys that are interactive \"p\"" 66 "This is an overlay function to point-moving keys that are interactive \"p\"."
67 (interactive "p") 67 (interactive "p")
68 (apply (function s-region-move) arg)) 68 (apply (function s-region-move) arg))
69 69
70(defun s-region-move-p2 (&rest arg) 70(defun s-region-move-p2 (&rest arg)
71 "This is an overlay function to point-moving keys that are interactive \"P\"" 71 "This is an overlay function to point-moving keys that are interactive \"P\"."
72 (interactive "P") 72 (interactive "P")
73 (apply (function s-region-move) arg)) 73 (apply (function s-region-move) arg))
74 74
@@ -83,10 +83,10 @@
83 (delete-overlay s-region-overlay)) 83 (delete-overlay s-region-overlay))
84 84
85(defun s-region-bind (keylist &optional map) 85(defun s-region-bind (keylist &optional map)
86 "Bind shifted keys in KEYLIST to s-region-move-p1 or s-region-move-p2. 86 "Bind shifted keys in KEYLIST to `s-region-move-p1' or `s-region-move-p2'.
87Each key in KEYLIST is shifted and bound to one of the s-region-move 87Each key in KEYLIST is shifted and bound to one of the `s-region-move'
88functions provided it is already bound to some command or other. 88functions provided it is already bound to some command or other.
89Optional third argument MAP specifies keymap to add binding to, defaulting 89Optional second argument MAP specifies keymap to add binding to, defaulting
90to global keymap." 90to global keymap."
91 (let ((p2 (list 'scroll-up 'scroll-down 91 (let ((p2 (list 'scroll-up 'scroll-down
92 'beginning-of-buffer 'end-of-buffer))) 92 'beginning-of-buffer 'end-of-buffer)))
diff --git a/lisp/server.el b/lisp/server.el
index 73878d8435b..48ff50f3dbc 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -625,7 +625,7 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it."
625 ;; a minibuffer/dedicated-window (if there's no other). 625 ;; a minibuffer/dedicated-window (if there's no other).
626 (error (pop-to-buffer next-buffer))))))))) 626 (error (pop-to-buffer next-buffer)))))))))
627 627
628(global-set-key "\C-x#" 'server-edit) 628(define-key ctl-x-map "#" 'server-edit)
629 629
630(defun server-unload-hook () 630(defun server-unload-hook ()
631 (server-start t) 631 (server-start t)
diff --git a/lisp/simple.el b/lisp/simple.el
index 4adc5b05273..32b83c465ae 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -74,7 +74,7 @@ wait this many seconds after Emacs becomes idle before doing an update."
74;;; next-error support framework 74;;; next-error support framework
75 75
76(defgroup next-error nil 76(defgroup next-error nil
77 "next-error support framework." 77 "`next-error' support framework."
78 :group 'compilation 78 :group 'compilation
79 :version "22.1") 79 :version "22.1")
80 80
@@ -86,8 +86,8 @@ wait this many seconds after Emacs becomes idle before doing an update."
86 86
87(defcustom next-error-highlight 0.1 87(defcustom next-error-highlight 0.1
88 "*Highlighting of locations in selected source buffers. 88 "*Highlighting of locations in selected source buffers.
89If number, highlight the locus in next-error face for given time in seconds. 89If number, highlight the locus in `next-error' face for given time in seconds.
90If t, use persistent overlays fontified in next-error face. 90If t, use persistent overlays fontified in `next-error' face.
91If nil, don't highlight the locus in the source buffer. 91If nil, don't highlight the locus in the source buffer.
92If `fringe-arrow', indicate the locus by the fringe arrow." 92If `fringe-arrow', indicate the locus by the fringe arrow."
93 :type '(choice (number :tag "Delay") 93 :type '(choice (number :tag "Delay")
@@ -99,8 +99,8 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
99 99
100(defcustom next-error-highlight-no-select 0.1 100(defcustom next-error-highlight-no-select 0.1
101 "*Highlighting of locations in non-selected source buffers. 101 "*Highlighting of locations in non-selected source buffers.
102If number, highlight the locus in next-error face for given time in seconds. 102If number, highlight the locus in `next-error' face for given time in seconds.
103If t, use persistent overlays fontified in next-error face. 103If t, use persistent overlays fontified in `next-error' face.
104If nil, don't highlight the locus in the source buffer. 104If nil, don't highlight the locus in the source buffer.
105If `fringe-arrow', indicate the locus by the fringe arrow." 105If `fringe-arrow', indicate the locus by the fringe arrow."
106 :type '(choice (number :tag "Delay") 106 :type '(choice (number :tag "Delay")
@@ -122,7 +122,7 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
122(add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position) 122(add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position)
123 123
124(defvar next-error-last-buffer nil 124(defvar next-error-last-buffer nil
125 "The most recent next-error buffer. 125 "The most recent `next-error' buffer.
126A buffer becomes most recent when its compilation, grep, or 126A buffer becomes most recent when its compilation, grep, or
127similar mode is started, or when it is used with \\[next-error] 127similar mode is started, or when it is used with \\[next-error]
128or \\[compile-goto-error].") 128or \\[compile-goto-error].")
@@ -143,7 +143,7 @@ to navigate in it.")
143 &optional avoid-current 143 &optional avoid-current
144 extra-test-inclusive 144 extra-test-inclusive
145 extra-test-exclusive) 145 extra-test-exclusive)
146 "Test if BUFFER is a next-error capable buffer. 146 "Test if BUFFER is a `next-error' capable buffer.
147 147
148If AVOID-CURRENT is non-nil, treat the current buffer 148If AVOID-CURRENT is non-nil, treat the current buffer
149as an absolute last resort only. 149as an absolute last resort only.
@@ -170,7 +170,7 @@ that buffer is rejected."
170(defun next-error-find-buffer (&optional avoid-current 170(defun next-error-find-buffer (&optional avoid-current
171 extra-test-inclusive 171 extra-test-inclusive
172 extra-test-exclusive) 172 extra-test-exclusive)
173 "Return a next-error capable buffer. 173 "Return a `next-error' capable buffer.
174If AVOID-CURRENT is non-nil, treat the current buffer 174If AVOID-CURRENT is non-nil, treat the current buffer
175as an absolute last resort only. 175as an absolute last resort only.
176 176
@@ -223,7 +223,7 @@ that buffer is rejected."
223 (error "No next-error capable buffer found"))) 223 (error "No next-error capable buffer found")))
224 224
225(defun next-error (&optional arg reset) 225(defun next-error (&optional arg reset)
226 "Visit next next-error message and corresponding source code. 226 "Visit next `next-error' message and corresponding source code.
227 227
228If all the error messages parsed so far have been processed already, 228If all the error messages parsed so far have been processed already,
229the message buffer is checked for new ones. 229the message buffer is checked for new ones.
@@ -264,7 +264,7 @@ See variables `compilation-parse-errors-function' and
264(defalias 'next-match 'next-error) 264(defalias 'next-match 'next-error)
265 265
266(defun previous-error (&optional n) 266(defun previous-error (&optional n)
267 "Visit previous next-error message and corresponding source code. 267 "Visit previous `next-error' message and corresponding source code.
268 268
269Prefix arg N says how many error messages to move backwards (or 269Prefix arg N says how many error messages to move backwards (or
270forwards, if negative). 270forwards, if negative).
@@ -282,7 +282,7 @@ This operates on the output from the \\[compile] command, for instance."
282 (next-error n t)) 282 (next-error n t))
283 283
284(defun next-error-no-select (&optional n) 284(defun next-error-no-select (&optional n)
285 "Move point to the next error in the next-error buffer and highlight match. 285 "Move point to the next error in the `next-error' buffer and highlight match.
286Prefix arg N says how many error messages to move forwards (or 286Prefix arg N says how many error messages to move forwards (or
287backwards, if negative). 287backwards, if negative).
288Finds and highlights the source line like \\[next-error], but does not 288Finds and highlights the source line like \\[next-error], but does not
@@ -293,7 +293,7 @@ select the source buffer."
293 (pop-to-buffer next-error-last-buffer)) 293 (pop-to-buffer next-error-last-buffer))
294 294
295(defun previous-error-no-select (&optional n) 295(defun previous-error-no-select (&optional n)
296 "Move point to the previous error in the next-error buffer and highlight match. 296 "Move point to the previous error in the `next-error' buffer and highlight match.
297Prefix arg N says how many error messages to move backwards (or 297Prefix arg N says how many error messages to move backwards (or
298forwards, if negative). 298forwards, if negative).
299Finds and highlights the source line like \\[previous-error], but does not 299Finds and highlights the source line like \\[previous-error], but does not
@@ -426,8 +426,8 @@ than the value of `fill-column' and ARG is nil."
426 426
427(defun open-line (n) 427(defun open-line (n)
428 "Insert a newline and leave point before it. 428 "Insert a newline and leave point before it.
429If there is a fill prefix and/or a left-margin, insert them on the new line 429If there is a fill prefix and/or a `left-margin', insert them
430if the line would have been blank. 430on the new line if the line would have been blank.
431With arg N, insert N newlines." 431With arg N, insert N newlines."
432 (interactive "*p") 432 (interactive "*p")
433 (let* ((do-fill-prefix (and fill-prefix (bolp))) 433 (let* ((do-fill-prefix (and fill-prefix (bolp)))
@@ -449,7 +449,7 @@ With arg N, insert N newlines."
449(defun split-line (&optional arg) 449(defun split-line (&optional arg)
450 "Split current line, moving portion beyond point vertically down. 450 "Split current line, moving portion beyond point vertically down.
451If the current line starts with `fill-prefix', insert it on the new 451If the current line starts with `fill-prefix', insert it on the new
452line as well. With prefix ARG, don't insert fill-prefix on new line. 452line as well. With prefix ARG, don't insert `fill-prefix' on new line.
453 453
454When called from Lisp code, ARG may be a prefix string to copy." 454When called from Lisp code, ARG may be a prefix string to copy."
455 (interactive "*P") 455 (interactive "*P")
@@ -647,7 +647,7 @@ Leave one space or none, according to the context."
647 (save-excursion (forward-char -1) 647 (save-excursion (forward-char -1)
648 (looking-at "$\\|\\s(\\|\\s'"))) 648 (looking-at "$\\|\\s(\\|\\s'")))
649 nil 649 nil
650 (insert ?\ )))) 650 (insert ?\s))))
651 651
652(defun delete-horizontal-space (&optional backward-only) 652(defun delete-horizontal-space (&optional backward-only)
653 "Delete all spaces and tabs around point. 653 "Delete all spaces and tabs around point.
@@ -671,9 +671,9 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point."
671 (skip-chars-backward " \t") 671 (skip-chars-backward " \t")
672 (constrain-to-field nil orig-pos) 672 (constrain-to-field nil orig-pos)
673 (dotimes (i (or n 1)) 673 (dotimes (i (or n 1))
674 (if (= (following-char) ?\ ) 674 (if (= (following-char) ?\s)
675 (forward-char 1) 675 (forward-char 1)
676 (insert ?\ ))) 676 (insert ?\s)))
677 (delete-region 677 (delete-region
678 (point) 678 (point)
679 (progn 679 (progn
@@ -1274,7 +1274,7 @@ by the new completion."
1274;; For compatibility with the old subr of the same name. 1274;; For compatibility with the old subr of the same name.
1275(defun minibuffer-prompt-width () 1275(defun minibuffer-prompt-width ()
1276 "Return the display width of the minibuffer prompt. 1276 "Return the display width of the minibuffer prompt.
1277Return 0 if current buffer is not a mini-buffer." 1277Return 0 if current buffer is not a minibuffer."
1278 ;; Return the width of everything before the field at the end of 1278 ;; Return the width of everything before the field at the end of
1279 ;; the buffer; this should be 0 for normal buffers. 1279 ;; the buffer; this should be 0 for normal buffers.
1280 (1- (minibuffer-prompt-end))) 1280 (1- (minibuffer-prompt-end)))
@@ -2345,7 +2345,7 @@ handler, if non-nil, is stored as a `yank-handler' text property on STRING).
2345 2345
2346When the yank handler has a non-nil PARAM element, the original STRING 2346When the yank handler has a non-nil PARAM element, the original STRING
2347argument is not used by `insert-for-yank'. However, since Lisp code 2347argument is not used by `insert-for-yank'. However, since Lisp code
2348may access and use elements from the kill-ring directly, the STRING 2348may access and use elements from the kill ring directly, the STRING
2349argument should still be a \"useful\" string for such uses." 2349argument should still be a \"useful\" string for such uses."
2350 (if (> (length string) 0) 2350 (if (> (length string) 0)
2351 (if yank-handler 2351 (if yank-handler
@@ -2684,7 +2684,7 @@ and KILLP is t if a prefix arg was specified."
2684 (let ((col (current-column))) 2684 (let ((col (current-column)))
2685 (forward-char -1) 2685 (forward-char -1)
2686 (setq col (- col (current-column))) 2686 (setq col (- col (current-column)))
2687 (insert-char ?\ col) 2687 (insert-char ?\s col)
2688 (delete-char 1))) 2688 (delete-char 1)))
2689 (forward-char -1) 2689 (forward-char -1)
2690 (setq count (1- count)))))) 2690 (setq count (1- count))))))
@@ -4075,7 +4075,7 @@ Just \\[universal-argument] as argument means to use the current column."
4075 (setq arg (current-column))) 4075 (setq arg (current-column)))
4076 (if (not (integerp arg)) 4076 (if (not (integerp arg))
4077 ;; Disallow missing argument; it's probably a typo for C-x C-f. 4077 ;; Disallow missing argument; it's probably a typo for C-x C-f.
4078 (error "Set-fill-column requires an explicit argument") 4078 (error "set-fill-column requires an explicit argument")
4079 (message "Fill column set to %d (was %d)" arg fill-column) 4079 (message "Fill column set to %d (was %d)" arg fill-column)
4080 (setq fill-column arg))) 4080 (setq fill-column arg)))
4081 4081
@@ -4155,7 +4155,7 @@ with the character typed.
4155typing characters do. 4155typing characters do.
4156 4156
4157Note that binary overwrite mode is not its own minor mode; it is a 4157Note that binary overwrite mode is not its own minor mode; it is a
4158specialization of overwrite-mode, entered by setting the 4158specialization of overwrite mode, entered by setting the
4159`overwrite-mode' variable to `overwrite-mode-binary'." 4159`overwrite-mode' variable to `overwrite-mode-binary'."
4160 (interactive "P") 4160 (interactive "P")
4161 (setq overwrite-mode 4161 (setq overwrite-mode
@@ -4999,7 +4999,7 @@ PREFIX is the string that represents this modifier in an event type symbol."
4999 (define-key function-key-map (vector keypad) (vector normal)))) 4999 (define-key function-key-map (vector keypad) (vector normal))))
5000 '((kp-0 ?0) (kp-1 ?1) (kp-2 ?2) (kp-3 ?3) (kp-4 ?4) 5000 '((kp-0 ?0) (kp-1 ?1) (kp-2 ?2) (kp-3 ?3) (kp-4 ?4)
5001 (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9) 5001 (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
5002 (kp-space ?\ ) 5002 (kp-space ?\s)
5003 (kp-tab ?\t) 5003 (kp-tab ?\t)
5004 (kp-enter ?\r) 5004 (kp-enter ?\r)
5005 (kp-multiply ?*) 5005 (kp-multiply ?*)
@@ -5140,7 +5140,7 @@ or by incrementing the N in an existing suffix.
5140DISPLAY-FLAG non-nil means show the new buffer with `pop-to-buffer'. 5140DISPLAY-FLAG non-nil means show the new buffer with `pop-to-buffer'.
5141This is always done when called interactively. 5141This is always done when called interactively.
5142 5142
5143Optional last arg NORECORD non-nil means do not put this buffer at the 5143Optional third arg NORECORD non-nil means do not put this buffer at the
5144front of the list of recently selected ones." 5144front of the list of recently selected ones."
5145 (interactive 5145 (interactive
5146 (progn 5146 (progn
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index f854621cc85..d0d7a0e96c6 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -154,7 +154,7 @@ on `skeleton-autowrap'. An ARG of M-0 will prevent this just for once.
154This command can also be an abbrev expansion (3rd and 4th columns in 154This command can also be an abbrev expansion (3rd and 4th columns in
155\\[edit-abbrevs] buffer: \"\" command-name). 155\\[edit-abbrevs] buffer: \"\" command-name).
156 156
157Optional first argument STR may also be a string which will be the value 157Optional second argument STR may also be a string which will be the value
158of `str' whereas the skeleton's interactor is then ignored." 158of `str' whereas the skeleton's interactor is then ignored."
159 (skeleton-insert (funcall skeleton-filter skeleton) 159 (skeleton-insert (funcall skeleton-filter skeleton)
160 ;; Pretend C-x a e passed its prefix arg to us 160 ;; Pretend C-x a e passed its prefix arg to us
diff --git a/lisp/startup.el b/lisp/startup.el
index 18b331b3a5f..2f71a9ba352 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -184,9 +184,9 @@ This is because we already did so.")
184 184
185(defvar keyboard-type nil 185(defvar keyboard-type nil
186 "The brand of keyboard you are using. 186 "The brand of keyboard you are using.
187This variable is used to define 187This variable is used to define the proper function and keypad
188the proper function and keypad keys for use under X. It is used in a 188keys for use under X. It is used in a fashion analogous to the
189fashion analogous to the environment variable TERM.") 189environment variable TERM.")
190 190
191(defvar window-setup-hook nil 191(defvar window-setup-hook nil
192 "Normal hook run to initialize window system display. 192 "Normal hook run to initialize window system display.
@@ -234,7 +234,7 @@ is less convenient.
234This variable is defined for customization so as to make 234This variable is defined for customization so as to make
235it visible in the relevant context. However, actually customizing it 235it visible in the relevant context. However, actually customizing it
236is not allowed, since it would not work anyway. The only way to set 236is not allowed, since it would not work anyway. The only way to set
237this variable usefully is to set it during while building and dumping Emacs." 237this variable usefully is to set it while building and dumping Emacs."
238 :type '(choice (const :tag "none" nil) string) 238 :type '(choice (const :tag "none" nil) string)
239 :group 'initialization 239 :group 'initialization
240 :initialize 'custom-initialize-default 240 :initialize 'custom-initialize-default
@@ -664,9 +664,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
664 ;; processed. This is consistent with the way main in emacs.c 664 ;; processed. This is consistent with the way main in emacs.c
665 ;; does things. 665 ;; does things.
666 (while (and (not done) args) 666 (while (and (not done) args)
667 (let* ((longopts '(("--no-init-file") ("--no-site-file") ("--user") 667 (let* ((longopts '(("--no-init-file") ("--no-site-file") ("--debug-init")
668 ("--debug-init") ("--iconic") ("--icon-type") 668 ("--user") ("--iconic") ("--icon-type") ("--quick")
669 ("--no-blinking-cursor") ("--bare-bones"))) 669 ("--no-blinking-cursor") ("--basic-display")))
670 (argi (pop args)) 670 (argi (pop args))
671 (orig-argi argi) 671 (orig-argi argi)
672 argval) 672 argval)
@@ -1057,6 +1057,7 @@ Read the Emacs Manual\tView the Emacs manual using Info
1057 :face variable-pitch 1057 :face variable-pitch
1058 "\ 1058 "\
1059Copying Conditions\tConditions for redistributing and changing Emacs 1059Copying Conditions\tConditions for redistributing and changing Emacs
1060Getting New Versions\tHow to obtain the latest version of Emacs
1060More Manuals / Ordering Manuals Buying printed manuals from the FSF\n") 1061More Manuals / Ordering Manuals Buying printed manuals from the FSF\n")
1061 (:face variable-pitch 1062 (:face variable-pitch
1062 "You can do basic editing with the menu bar and scroll bar \ 1063 "You can do basic editing with the menu bar and scroll bar \
@@ -1345,20 +1346,20 @@ You can do basic editing with the menu bar and scroll bar using the mouse.
1345 1346
1346Useful File menu items: 1347Useful File menu items:
1347Exit Emacs (or type Control-x followed by Control-c) 1348Exit Emacs (or type Control-x followed by Control-c)
1348Recover Session recover files you were editing before a crash 1349Recover Session Recover files you were editing before a crash
1349 1350
1350Important Help menu items: 1351Important Help menu items:
1351Emacs Tutorial Learn-by-doing tutorial for using Emacs efficiently. 1352Emacs Tutorial Learn how to use Emacs efficiently
1352Emacs FAQ Frequently asked questions and answers 1353Emacs FAQ Frequently asked questions and answers
1353Read the Emacs Manual View the Emacs manual using Info 1354Read the Emacs Manual View the Emacs manual using Info
1354\(Non)Warranty GNU Emacs comes with ABSOLUTELY NO WARRANTY 1355\(Non)Warranty GNU Emacs comes with ABSOLUTELY NO WARRANTY
1355Copying Conditions Conditions for redistributing and changing Emacs. 1356Copying Conditions Conditions for redistributing and changing Emacs
1356Getting New Versions How to obtain the latest version of Emacs. 1357Getting New Versions How to obtain the latest version of Emacs
1357More Manuals / Ordering Manuals How to order printed manuals from the FSF. 1358More Manuals / Ordering Manuals How to order printed manuals from the FSF
1358") 1359")
1359 (insert "\n\n" (emacs-version) 1360 (insert "\n\n" (emacs-version)
1360 " 1361 "
1361Copyright (C) 2004 Free Software Foundation, Inc.")) 1362Copyright (C) 2005 Free Software Foundation, Inc."))
1362 1363
1363 ;; No mouse menus, so give help using kbd commands. 1364 ;; No mouse menus, so give help using kbd commands.
1364 1365
@@ -1406,7 +1407,7 @@ If you have no Meta key, you may instead type ESC followed by the character.)")
1406 1407
1407 (insert "\n\n" (emacs-version) 1408 (insert "\n\n" (emacs-version)
1408 " 1409 "
1409Copyright (C) 2004 Free Software Foundation, Inc.") 1410Copyright (C) 2005 Free Software Foundation, Inc.")
1410 1411
1411 (if (and (eq (key-binding "\C-h\C-c") 'describe-copying) 1412 (if (and (eq (key-binding "\C-h\C-c") 'describe-copying)
1412 (eq (key-binding "\C-h\C-d") 'describe-distribution) 1413 (eq (key-binding "\C-h\C-d") 'describe-distribution)
diff --git a/lisp/strokes.el b/lisp/strokes.el
index bb99591d1e1..a35a5d6f161 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -243,9 +243,9 @@ ones, then strokes should NOT pick the one that came closest."
243 243
244(defcustom strokes-grid-resolution 9 244(defcustom strokes-grid-resolution 9
245 "*Integer defining dimensions of the stroke grid. 245 "*Integer defining dimensions of the stroke grid.
246The grid is a square grid, where STROKES-GRID-RESOLUTION defaults to 246The grid is a square grid, where `strokes-grid-resolution' defaults to
247`9', making a 9x9 grid whose coordinates go from (0 . 0) on the top 247`9', making a 9x9 grid whose coordinates go from (0 . 0) on the top
248left to ((STROKES-GRID-RESOLUTION - 1) . (STROKES-GRID-RESOLUTION - 1)) 248left to ((strokes-grid-resolution - 1) . (strokes-grid-resolution - 1))
249on the bottom right. The greater the resolution, the more intricate 249on the bottom right. The greater the resolution, the more intricate
250your strokes can be. 250your strokes can be.
251NOTE: This variable should be odd and MUST NOT be less than 3 and need 251NOTE: This variable should be odd and MUST NOT be less than 3 and need
@@ -259,7 +259,7 @@ WARNING: Changing the value of this variable will gravely affect the
259 :group 'strokes) 259 :group 'strokes)
260 260
261(defcustom strokes-file (convert-standard-filename "~/.strokes") 261(defcustom strokes-file (convert-standard-filename "~/.strokes")
262 "*File containing saved strokes for stroke-mode (default is ~/.strokes)." 262 "*File containing saved strokes for Strokes mode (default is ~/.strokes)."
263 :type 'file 263 :type 'file
264 :group 'strokes) 264 :group 'strokes)
265 265
@@ -284,17 +284,17 @@ This is set properly in the function `strokes-update-window-configuration'.")
284 "Last stroke entered by the user. 284 "Last stroke entered by the user.
285Its value gets set every time the function 285Its value gets set every time the function
286`strokes-fill-stroke' gets called, 286`strokes-fill-stroke' gets called,
287since that is the best time to set the variable") 287since that is the best time to set the variable.")
288 288
289(defvar strokes-global-map '() 289(defvar strokes-global-map '()
290 "Association list of strokes and their definitions. 290 "Association list of strokes and their definitions.
291Each entry is (STROKE . COMMAND) where STROKE is itself a list of 291Each entry is (STROKE . COMMAND) where STROKE is itself a list of
292coordinates (X . Y) where X and Y are lists of positions on the 292coordinates (X . Y) where X and Y are lists of positions on the
293normalized stroke grid, with the top left at (0 . 0). COMMAND is the 293normalized stroke grid, with the top left at (0 . 0). COMMAND is the
294corresponding interactive function") 294corresponding interactive function.")
295 295
296(defvar strokes-load-hook nil 296(defvar strokes-load-hook nil
297 "Function or functions to be called when `strokes' is loaded.") 297 "Functions to be called when Strokes is loaded.")
298 298
299;;; ### NOT IMPLEMENTED YET ### 299;;; ### NOT IMPLEMENTED YET ###
300;;(defvar edit-strokes-menu 300;;(defvar edit-strokes-menu
@@ -473,10 +473,10 @@ Compare `strokes-global-set-stroke'."
473 473
474(defun strokes-get-grid-position (stroke-extent position &optional grid-resolution) 474(defun strokes-get-grid-position (stroke-extent position &optional grid-resolution)
475 "Map POSITION to a new grid position. 475 "Map POSITION to a new grid position.
476Do so based on its STROKE-EXTENT and GRID-RESOLUTION. 476Do so based on its STROKE-EXTENT and GRID-RESOLUTION.
477STROKE-EXTENT as a list \(\(XMIN . YMIN\) \(XMAX . YMAX\)\). 477STROKE-EXTENT as a list \(\(XMIN . YMIN\) \(XMAX . YMAX\)\).
478If POSITION is a `strokes-lift', then it is itself returned. 478If POSITION is a `strokes-lift', then it is itself returned.
479Optional GRID-RESOLUTION may be used in place of STROKES-GRID-RESOLUTION. 479Optional GRID-RESOLUTION may be used in place of `strokes-grid-resolution'.
480The grid is a square whose dimension is [0,GRID-RESOLUTION)." 480The grid is a square whose dimension is [0,GRID-RESOLUTION)."
481 (cond ((consp position) ; actual pixel location 481 (cond ((consp position) ; actual pixel location
482 (let ((grid-resolution (or grid-resolution strokes-grid-resolution)) 482 (let ((grid-resolution (or grid-resolution strokes-grid-resolution))
@@ -566,7 +566,7 @@ The return value is a list ((XMIN . YMIN) (XMAX . YMAX))."
566(defun strokes-renormalize-to-grid (positions &optional grid-resolution) 566(defun strokes-renormalize-to-grid (positions &optional grid-resolution)
567 "Map POSITIONS to a new grid whose dimensions are based on GRID-RESOLUTION. 567 "Map POSITIONS to a new grid whose dimensions are based on GRID-RESOLUTION.
568POSITIONS is a list of positions and stroke-lifts. 568POSITIONS is a list of positions and stroke-lifts.
569Optional GRID-RESOLUTION may be used in place of STROKES-GRID-RESOLUTION. 569Optional GRID-RESOLUTION may be used in place of `strokes-grid-resolution'.
570The grid is a square whose dimension is [0,GRID-RESOLUTION)." 570The grid is a square whose dimension is [0,GRID-RESOLUTION)."
571 (or grid-resolution (setq grid-resolution strokes-grid-resolution)) 571 (or grid-resolution (setq grid-resolution strokes-grid-resolution))
572 (let ((stroke-extent (strokes-get-stroke-extent positions))) 572 (let ((stroke-extent (strokes-get-stroke-extent positions)))
@@ -726,7 +726,7 @@ Optional PROMPT in minibuffer displays before and during stroke reading.
726This function will display the stroke interactively as it is being 726This function will display the stroke interactively as it is being
727entered in the strokes buffer if the variable 727entered in the strokes buffer if the variable
728`strokes-use-strokes-buffer' is non-nil. 728`strokes-use-strokes-buffer' is non-nil.
729Optional EVENT is acceptable as the starting event of the stroke" 729Optional EVENT is acceptable as the starting event of the stroke."
730 (save-excursion 730 (save-excursion
731 (let ((pix-locs nil) 731 (let ((pix-locs nil)
732 (grid-locs nil) 732 (grid-locs nil)
@@ -790,7 +790,7 @@ Optional PROMPT in minibuffer displays before and during stroke reading.
790Note that a complex stroke allows the user to pen-up and pen-down. This 790Note that a complex stroke allows the user to pen-up and pen-down. This
791is implemented by allowing the user to paint with button 1 or button 2 and 791is implemented by allowing the user to paint with button 1 or button 2 and
792then complete the stroke with button 3. 792then complete the stroke with button 3.
793Optional EVENT is acceptable as the starting event of the stroke" 793Optional EVENT is acceptable as the starting event of the stroke."
794 (save-excursion 794 (save-excursion
795 (save-window-excursion 795 (save-window-excursion
796 (set-window-configuration strokes-window-configuration) 796 (set-window-configuration strokes-window-configuration)
@@ -892,11 +892,12 @@ This must be bound to a mouse event."
892 892
893;;;###autoload 893;;;###autoload
894(defun strokes-help () 894(defun strokes-help ()
895 "Get instruction on using the `strokes' package." 895 "Get instruction on using the Strokes package."
896 (interactive) 896 (interactive)
897 (with-output-to-temp-buffer "*Help with Strokes*" 897 (with-output-to-temp-buffer "*Help with Strokes*"
898 (princ 898 (princ
899 "This is help for the strokes package. 899 (substitute-command-keys
900 "This is help for the strokes package.
900 901
901------------------------------------------------------------ 902------------------------------------------------------------
902 903
@@ -986,7 +987,7 @@ You can change this location by setting the variable `strokes-file'.
986You will be prompted to save them when you exit Emacs, or you can save 987You will be prompted to save them when you exit Emacs, or you can save
987them with 988them with
988 989
989> M-x strokes-save-strokes 990> M-x strokes-prompt-user-save-strokes
990 991
991Your strokes get loaded automatically when you enable `strokes-mode'. 992Your strokes get loaded automatically when you enable `strokes-mode'.
992You can also load in your user-defined strokes with 993You can also load in your user-defined strokes with
@@ -1024,7 +1025,7 @@ o Strokes are a bit computer-dependent in that they depend somewhat on
1024 variable which many people wanted to see was 1025 variable which many people wanted to see was
1025 `strokes-use-strokes-buffer' which allows the user to use strokes 1026 `strokes-use-strokes-buffer' which allows the user to use strokes
1026 silently--without displaying the strokes. All variables can be set 1027 silently--without displaying the strokes. All variables can be set
1027 by customizing the group `strokes' via \[customize-group].") 1028 by customizing the group `strokes' via \\[customize-group]."))
1028 (set-buffer standard-output) 1029 (set-buffer standard-output)
1029 (help-mode) 1030 (help-mode)
1030 (print-help-return-message))) 1031 (print-help-return-message)))
diff --git a/lisp/tempo.el b/lisp/tempo.el
index 3f5687d0d08..915d3a430d8 100644
--- a/lisp/tempo.el
+++ b/lisp/tempo.el
@@ -117,7 +117,7 @@
117(defcustom tempo-interactive nil 117(defcustom tempo-interactive nil
118 "*Prompt user for strings in templates. 118 "*Prompt user for strings in templates.
119If this variable is non-nil, `tempo-insert' prompts the 119If this variable is non-nil, `tempo-insert' prompts the
120user for text to insert in the templates" 120user for text to insert in the templates."
121 :type 'boolean 121 :type 'boolean
122 :group 'tempo) 122 :group 'tempo)
123 123
@@ -133,7 +133,7 @@ In Transient Mark mode, this option is unused."
133 133
134(defcustom tempo-show-completion-buffer t 134(defcustom tempo-show-completion-buffer t
135 "*If non-nil, show a buffer with possible completions, when only 135 "*If non-nil, show a buffer with possible completions, when only
136a partial completion can be found" 136a partial completion can be found."
137 :type 'boolean 137 :type 'boolean
138 :group 'tempo) 138 :group 'tempo)
139 139
@@ -148,17 +148,17 @@ disappears at the next keypress; otherwise, it remains forever."
148(defvar tempo-insert-string-functions nil 148(defvar tempo-insert-string-functions nil
149 "List of functions to run when inserting a string. 149 "List of functions to run when inserting a string.
150Each function is called with a single arg, STRING and should return 150Each function is called with a single arg, STRING and should return
151another string. This could be used for making all strings upcase by 151another string. This could be used for making all strings upcase by
152setting it to '(upcase), for example.") 152setting it to '(upcase), for example.")
153 153
154(defvar tempo-tags nil 154(defvar tempo-tags nil
155 "An association list with tags and corresponding templates") 155 "An association list with tags and corresponding templates.")
156 156
157(defvar tempo-local-tags '((tempo-tags . nil)) 157(defvar tempo-local-tags '((tempo-tags . nil))
158 "A list of locally installed tag completion lists. 158 "A list of locally installed tag completion lists.
159It is a association list where the car of every element is a symbol 159It is a association list where the car of every element is a symbol
160whose variable value is a template list. The cdr part, if non-nil, is a 160whose variable value is a template list. The cdr part, if non-nil,
161function or a regexp that defines the string to match. See the 161is a function or a regexp that defines the string to match. See the
162documentation for the function `tempo-complete-tag' for more info. 162documentation for the function `tempo-complete-tag' for more info.
163 163
164`tempo-tags' is always in the last position in this list.") 164`tempo-tags' is always in the last position in this list.")
@@ -175,8 +175,8 @@ documentation for the function `tempo-complete-tag' for more info.
175(defvar tempo-match-finder "\\b\\([[:word:]]+\\)\\=" 175(defvar tempo-match-finder "\\b\\([[:word:]]+\\)\\="
176 "The regexp or function used to find the string to match against tags. 176 "The regexp or function used to find the string to match against tags.
177 177
178If `tempo-match-finder is a string, it should contain a regular 178If `tempo-match-finder' is a string, it should contain a regular
179expression with at least one \\( \\) pair. When searching for tags, 179expression with at least one \\( \\) pair. When searching for tags,
180`tempo-complete-tag' calls `re-search-backward' with this string, and 180`tempo-complete-tag' calls `re-search-backward' with this string, and
181the string between the first \\( and \\) is used for matching against 181the string between the first \\( and \\) is used for matching against
182each string in the tag list. If one is found, the whole text between 182each string in the tag list. If one is found, the whole text between
@@ -229,51 +229,50 @@ NAME is a string that contains the name of the template, ELEMENTS is a
229list of elements in the template, TAG is the tag used for completion, 229list of elements in the template, TAG is the tag used for completion,
230DOCUMENTATION is the documentation string for the insertion command 230DOCUMENTATION is the documentation string for the insertion command
231created, and TAGLIST (a symbol) is the tag list that TAG (if provided) 231created, and TAGLIST (a symbol) is the tag list that TAG (if provided)
232should be added to). If TAGLIST is nil and TAG is non-nil, TAG is 232should be added to. If TAGLIST is nil and TAG is non-nil, TAG is
233added to `tempo-tags' 233added to `tempo-tags'.
234 234
235The elements in ELEMENTS can be of several types: 235The elements in ELEMENTS can be of several types:
236 236
237 - A string. It is sent to the hooks in `tempo-insert-string-functions', 237 - A string: It is sent to the hooks in `tempo-insert-string-functions',
238 and the result is inserted. 238 and the result is inserted.
239 - The symbol 'p. This position is saved in `tempo-marks'. 239 - The symbol `p': This position is saved in `tempo-marks'.
240 - The symbol 'r. If `tempo-insert' is called with ON-REGION non-nil 240 - The symbol `r': If `tempo-insert' is called with ON-REGION non-nil
241 the current region is placed here. Otherwise it works like 'p. 241 the current region is placed here. Otherwise it works like `p'.
242 - (p PROMPT <NAME> <NOINSERT>) If `tempo-interactive' is non-nil, the 242 - (p PROMPT <NAME> <NOINSERT>): If `tempo-interactive' is non-nil, the
243 user is prompted in the minibuffer with PROMPT for a string to be 243 user is prompted in the minibuffer with PROMPT for a string to be
244 inserted. If the optional parameter NAME is non-nil, the text is 244 inserted. If the optional parameter NAME is non-nil, the text is
245 saved for later insertion with the `s' tag. If there already is 245 saved for later insertion with the `s' tag. If there already is
246 something saved under NAME that value is used instead and no 246 something saved under NAME that value is used instead and no
247 prompting is made. If NOINSERT is provided and non-nil, nothing is 247 prompting is made. If NOINSERT is provided and non-nil, nothing is
248 inserted, but text is still saved when a NAME is provided. For 248 inserted, but text is still saved when a NAME is provided. For
249 clarity, the symbol 'noinsert should be used as argument. 249 clarity, the symbol `noinsert' should be used as argument.
250 - (P PROMPT <NAME> <NOINSERT>) Works just like the previous tag, but 250 - (P PROMPT <NAME> <NOINSERT>): Works just like the previous tag, but
251 forces tempo-interactive to be true. 251 forces `tempo-interactive' to be true.
252 - (r PROMPT <NAME> <NOINSERT>) like the previous, but if 252 - (r PROMPT <NAME> <NOINSERT>): Like the previous tag, but if
253 `tempo-interactive' is nil and `tempo-insert' is called with 253 `tempo-interactive' is nil and `tempo-insert' is called with
254 ON-REGION non-nil, the current region is placed here. This usually 254 ON-REGION non-nil, the current region is placed here. This usually
255 happens when you call the template function with a prefix argument. 255 happens when you call the template function with a prefix argument.
256 - (s NAME) Inserts text previously read with the (p ..) construct. 256 - (s NAME): Inserts text previously read with the (p ..) construct.
257 Finds the insertion saved under NAME and inserts it. Acts like 'p 257 Finds the insertion saved under NAME and inserts it. Acts like `p'
258 if tempo-interactive is nil. 258 if tempo-interactive is nil.
259 - '& If there is only whitespace between the line start and point, 259 - `&': If there is only whitespace between the line start and point,
260 nothing happens. Otherwise a newline is inserted. 260 nothing happens. Otherwise a newline is inserted.
261 - '% If there is only whitespace between point and end-of-line 261 - `%': If there is only whitespace between point and end of line,
262 nothing happens. Otherwise a newline is inserted. 262 nothing happens. Otherwise a newline is inserted.
263 - 'n inserts a newline. 263 - `n': Inserts a newline.
264 - '> The line is indented using `indent-according-to-mode'. Note that 264 - `>': The line is indented using `indent-according-to-mode'. Note
265 you often should place this item after the text you want on the 265 that you often should place this item after the text you want on
266 line. 266 the line.
267 - 'r> Like r, but it also indents the region. 267 - `r>': Like `r', but it also indents the region.
268 - 'n> Inserts a newline and indents line. 268 - `n>': Inserts a newline and indents line.
269 - 'o Like '% but leaves the point before the newline. 269 - `o': Like `%' but leaves the point before the newline.
270 - nil. It is ignored. 270 - nil: It is ignored.
271 - Anything else. It is evaluated and the result is treated as an 271 - Anything else: It is evaluated and the result is treated as an
272 element to be inserted. One additional tag is useful for these 272 element to be inserted. One additional tag is useful for these
273 cases. If an expression returns a list '(l foo bar), the elements 273 cases. If an expression returns a list '(l foo bar), the elements
274 after 'l will be inserted according to the usual rules. This makes 274 after `l' will be inserted according to the usual rules. This makes
275 it possible to return several elements from one expression." 275 it possible to return several elements from one expression."
276
277 (let* ((template-name (intern (concat "tempo-template-" 276 (let* ((template-name (intern (concat "tempo-template-"
278 name))) 277 name)))
279 (command-name template-name)) 278 (command-name template-name))
@@ -296,14 +295,14 @@ The elements in ELEMENTS can be of several types:
296(defun tempo-insert-template (template on-region) 295(defun tempo-insert-template (template on-region)
297 "Insert a template. 296 "Insert a template.
298TEMPLATE is the template to be inserted. If ON-REGION is non-nil the 297TEMPLATE is the template to be inserted. If ON-REGION is non-nil the
299`r' elements are replaced with the current region. In Transient Mark 298`r' elements are replaced with the current region. In Transient Mark
300mode, ON-REGION is ignored and assumed true if the region is active." 299mode, ON-REGION is ignored and assumed true if the region is active."
301 (unwind-protect 300 (unwind-protect
302 (progn 301 (progn
303 (if (or (and (boundp 'transient-mark-mode) ; For Emacs 302 (if (or (and (boundp 'transient-mark-mode) ; For Emacs
304 transient-mark-mode 303 transient-mark-mode
305 mark-active) 304 mark-active)
306 (and (boundp 'zmacs-regions) ; For XEmacs 305 (if (featurep 'xemacs)
307 zmacs-regions (mark))) 306 zmacs-regions (mark)))
308 (setq on-region t)) 307 (setq on-region t))
309 (and on-region 308 (and on-region
@@ -399,9 +398,9 @@ possible."
399;;; tempo-insert-prompt 398;;; tempo-insert-prompt
400 399
401(defun tempo-insert-prompt-compat (prompt) 400(defun tempo-insert-prompt-compat (prompt)
402 "Compatibility hack for tempo-insert-prompt. 401 "Compatibility hack for `tempo-insert-prompt'.
403PROMPT can be either a prompt string, or a list of arguments to 402PROMPT can be either a prompt string, or a list of arguments to
404tempo-insert-prompt, or nil." 403`tempo-insert-prompt', or nil."
405 (if (consp prompt) ; not nil either 404 (if (consp prompt) ; not nil either
406 (apply 'tempo-insert-prompt prompt) 405 (apply 'tempo-insert-prompt prompt)
407 (tempo-insert-prompt prompt))) 406 (tempo-insert-prompt prompt)))
@@ -410,12 +409,12 @@ tempo-insert-prompt, or nil."
410 "Prompt for a text string and insert it in the current buffer. 409 "Prompt for a text string and insert it in the current buffer.
411If the variable `tempo-interactive' is non-nil the user is prompted 410If the variable `tempo-interactive' is non-nil the user is prompted
412for a string in the minibuffer, which is then inserted in the current 411for a string in the minibuffer, which is then inserted in the current
413buffer. If `tempo-interactive' is nil, the current point is placed on 412buffer. If `tempo-interactive' is nil, the current point is placed on
414`tempo-mark'. 413`tempo-mark'.
415 414
416PROMPT is the prompt string, SAVE-NAME is a name to save the inserted 415PROMPT is the prompt string, SAVE-NAME is a name to save the inserted
417text under. If the optional argument NO-INSERT is non-nil, no text i 416text under. If the optional argument NO-INSERT is non-nil, no text is
418inserted. This can be useful when there is a SAVE-NAME. 417inserted. This can be useful when there is a SAVE-NAME.
419 418
420If there already is a value for SAVE-NAME, it is used and the user is 419If there already is a value for SAVE-NAME, it is used and the user is
421never prompted." 420never prompted."
@@ -448,8 +447,7 @@ never prompted."
448;;; tempo-is-user-element 447;;; tempo-is-user-element
449 448
450(defun tempo-is-user-element (element) 449(defun tempo-is-user-element (element)
451 "Tries all the user-defined element handlers in 450 "Tries all the user-defined element handlers in `tempo-user-elements'."
452`tempo-user-elements'"
453 ;; Sigh... I need (some list) 451 ;; Sigh... I need (some list)
454 (catch 'found 452 (catch 'found
455 (mapcar (function (lambda (handler) 453 (mapcar (function (lambda (handler)
@@ -531,7 +529,7 @@ and insert the results."
531;;; tempo-insert-mark 529;;; tempo-insert-mark
532 530
533(defun tempo-insert-mark (mark) 531(defun tempo-insert-mark (mark)
534 "Insert a mark `tempo-marks' while keeping it sorted" 532 "Insert a mark `tempo-marks' while keeping it sorted."
535 (cond ((null tempo-marks) (setq tempo-marks (list mark))) 533 (cond ((null tempo-marks) (setq tempo-marks (list mark)))
536 ((< mark (car tempo-marks)) (setq tempo-marks (cons mark tempo-marks))) 534 ((< mark (car tempo-marks)) (setq tempo-marks (cons mark tempo-marks)))
537 (t (let ((lp tempo-marks)) 535 (t (let ((lp tempo-marks))
@@ -603,8 +601,8 @@ TAG-LIST is a symbol whose variable value is a tag list created with
603 601
604COMPLETION-FUNCTION is an obsolete option for specifying an optional 602COMPLETION-FUNCTION is an obsolete option for specifying an optional
605function or string that is used by `\\[tempo-complete-tag]' to find a 603function or string that is used by `\\[tempo-complete-tag]' to find a
606string to match the tag against. It has the same definition as the 604string to match the tag against. It has the same definition as the
607variable `tempo-match-finder'. In this version, supplying a 605variable `tempo-match-finder'. In this version, supplying a
608COMPLETION-FUNCTION just sets `tempo-match-finder' locally." 606COMPLETION-FUNCTION just sets `tempo-match-finder' locally."
609 (let ((old (assq tag-list tempo-local-tags))) 607 (let ((old (assq tag-list tempo-local-tags)))
610 (if old 608 (if old
@@ -647,7 +645,7 @@ If `tempo-dirty-collection' is nil, the old collection is reused."
647 645
648(defun tempo-find-match-string (finder) 646(defun tempo-find-match-string (finder)
649 "Find a string to be matched against a tag list. 647 "Find a string to be matched against a tag list.
650FINDER is a function or a string. Returns (STRING . POS), or nil 648FINDER is a function or a string. Returns (STRING . POS), or nil
651if no reasonable string is found." 649if no reasonable string is found."
652 (cond ((stringp finder) 650 (cond ((stringp finder)
653 (let (successful) 651 (let (successful)
@@ -671,7 +669,7 @@ if no reasonable string is found."
671All the tags in the tag lists in `tempo-local-tags' 669All the tags in the tag lists in `tempo-local-tags'
672\(this includes `tempo-tags') are searched for a match for the text 670\(this includes `tempo-tags') are searched for a match for the text
673before the point. The way the string to match for is determined can 671before the point. The way the string to match for is determined can
674be altered with the variable `tempo-match-finder'. If 672be altered with the variable `tempo-match-finder'. If
675`tempo-match-finder' returns nil, then the results are the same as 673`tempo-match-finder' returns nil, then the results are the same as
676no match at all. 674no match at all.
677 675
diff --git a/lisp/term.el b/lisp/term.el
index 2947e68f746..ddb9fe5168e 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1100,6 +1100,8 @@ Entry to this mode runs the hooks on `term-mode-hook'."
1100 (make-local-variable 'term-current-face) 1100 (make-local-variable 'term-current-face)
1101 (make-local-variable 'term-pending-frame) 1101 (make-local-variable 'term-pending-frame)
1102 (setq term-pending-frame nil) 1102 (setq term-pending-frame nil)
1103 ;; Cua-mode's keybindings interfere with the term keybindings, disable it.
1104 (set (make-local-variable 'cua-mode) nil)
1103 (run-mode-hooks 'term-mode-hook) 1105 (run-mode-hooks 'term-mode-hook)
1104 (term-if-xemacs 1106 (term-if-xemacs
1105 (set-buffer-menubar 1107 (set-buffer-menubar
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 1709b1554a5..26708deefe2 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar 6;; Keywords: outlines, hypermedia, calendar
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 3.13 8;; Version: 3.14
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -21,8 +21,8 @@
21 21
22;; You should have received a copy of the GNU General Public License 22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs; see the file COPYING. If not, write to the 23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25;; Boston, MA 02110-1301, USA. 25;; Boston, MA 02111-1307, USA.
26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27;; 27;;
28;;; Commentary: 28;;; Commentary:
@@ -80,6 +80,12 @@
80;; 80;;
81;; Changes: 81;; Changes:
82;; ------- 82;; -------
83;; Version 3.14
84;; - Formulas for individual fields in table.
85;; - Automatic recalculation in calculating tables.
86;; - Named fields and columns in tables.
87;; - Fixed bug with calling `org-archive' several times in a row.
88;;
83;; Version 3.13 89;; Version 3.13
84;; - Efficiency improvements: Fewer table re-alignments needed. 90;; - Efficiency improvements: Fewer table re-alignments needed.
85;; - New special lines in tables, for defining names for individual cells. 91;; - New special lines in tables, for defining names for individual cells.
@@ -182,7 +188,7 @@
182 188
183;;; Customization variables 189;;; Customization variables
184 190
185(defvar org-version "3.13" 191(defvar org-version "3.14"
186 "The version number of the file org.el.") 192 "The version number of the file org.el.")
187(defun org-version () 193(defun org-version ()
188 (interactive) 194 (interactive)
@@ -1215,6 +1221,20 @@ line will be formatted with <th> tags."
1215 :group 'org-table 1221 :group 'org-table
1216 :type 'boolean) 1222 :type 'boolean)
1217 1223
1224(defcustom org-table-tab-recognizes-table.el t
1225 "Non-nil means, TAB will automatically notice a table.el table.
1226When it sees such a table, it moves point into it and - if necessary -
1227calls `table-recognize-table'."
1228 :group 'org-table
1229 :type 'boolean)
1230
1231;; FIXME: Should this one be in another group? Which one?
1232(defcustom org-enable-fixed-width-editor t
1233 "Non-nil means, lines starting with \":\" are treated as fixed-width.
1234This currently only means, they are never auto-wrapped.
1235When nil, such lines will be treated like ordinary lines."
1236 :group 'org-table
1237 :type 'boolean)
1218 1238
1219(defgroup org-table-calculation nil 1239(defgroup org-table-calculation nil
1220 "Options concerning tables in Org-mode." 1240 "Options concerning tables in Org-mode."
@@ -1284,29 +1304,10 @@ in table calculations, including symbolics etc."
1284 :group 'org-table-calculation 1304 :group 'org-table-calculation
1285 :type 'boolean) 1305 :type 'boolean)
1286 1306
1287(defcustom org-table-tab-recognizes-table.el t 1307(defcustom org-table-allow-automatic-line-recalculation t
1288 "Non-nil means, TAB will automatically notice a table.el table. 1308 "Non-nil means, lines makred with |#| or |*| will be recomputed automatically.
1289When it sees such a table, it moves point into it and - if necessary - 1309Automatically means, when TAB or RET or C-c C-c are pressed in the line."
1290calls `table-recognize-table'." 1310 :group 'org-table-calculation
1291 :group 'org-table
1292 :type 'boolean)
1293
1294(defcustom org-export-prefer-native-exporter-for-tables nil
1295 "Non-nil means, always export tables created with table.el natively.
1296Natively means, use the HTML code generator in table.el.
1297When nil, Org-mode's own HTML generator is used when possible (i.e. if
1298the table does not use row- or column-spanning). This has the
1299advantage, that the automatic HTML conversions for math symbols and
1300sub/superscripts can be applied. Org-mode's HTML generator is also
1301much faster."
1302 :group 'org-table
1303 :type 'boolean)
1304
1305(defcustom org-enable-fixed-width-editor t
1306 "Non-nil means, lines starting with \":\" are treated as fixed-width.
1307This currently only means, they are never auto-wrapped.
1308When nil, such lines will be treated like ordinary lines."
1309 :group 'org-table
1310 :type 'boolean) 1311 :type 'boolean)
1311 1312
1312(defgroup org-export nil 1313(defgroup org-export nil
@@ -1425,6 +1426,17 @@ This option can also be set with the +OPTIONS line, e.g. \"|:nil\"."
1425 :group 'org-export 1426 :group 'org-export
1426 :type 'boolean) 1427 :type 'boolean)
1427 1428
1429(defcustom org-export-prefer-native-exporter-for-tables nil
1430 "Non-nil means, always export tables created with table.el natively.
1431Natively means, use the HTML code generator in table.el.
1432When nil, Org-mode's own HTML generator is used when possible (i.e. if
1433the table does not use row- or column-spanning). This has the
1434advantage, that the automatic HTML conversions for math symbols and
1435sub/superscripts can be applied. Org-mode's HTML generator is also
1436much faster."
1437 :group 'org-export
1438 :type 'boolean)
1439
1428(defcustom org-export-html-table-tag 1440(defcustom org-export-html-table-tag
1429 "<table border=1 cellspacing=0 cellpadding=6>" 1441 "<table border=1 cellspacing=0 cellpadding=6>"
1430 "The HTML tag used to start a table. 1442 "The HTML tag used to start a table.
@@ -1926,7 +1938,7 @@ The following commands are available:
1926 '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)" 1938 '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)"
1927 (1 'org-table t)) 1939 (1 'org-table t))
1928 '("^[ \t]*\\(:.*\\)" (1 'org-table t)) 1940 '("^[ \t]*\\(:.*\\)" (1 'org-table t))
1929 '("| *\\(=[^|\n]*\\)" (1 'org-formula t)) 1941 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t))
1930 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) 1942 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t))
1931 ))) 1943 )))
1932 (set (make-local-variable 'org-font-lock-keywords) 1944 (set (make-local-variable 'org-font-lock-keywords)
@@ -2634,7 +2646,10 @@ heading be marked DONE, and the current time will be added."
2634 (setq level (match-end 0)) 2646 (setq level (match-end 0))
2635 (setq heading nil level 0)) 2647 (setq heading nil level 0))
2636 (save-excursion 2648 (save-excursion
2637 (org-copy-subtree) ; We first only copy, in case something goes wrong 2649 ;; We first only copy, in case something goes wrong
2650 ;; we need to protect this-command, to avoid kill-region sets it,
2651 ;; which would lead to duplication of subtrees
2652 (let (this-command) (org-copy-subtree))
2638 (set-buffer buffer) 2653 (set-buffer buffer)
2639 ;; Enforce org-mode for the archive buffer 2654 ;; Enforce org-mode for the archive buffer
2640 (if (not (eq major-mode 'org-mode)) 2655 (if (not (eq major-mode 'org-mode))
@@ -2691,7 +2706,7 @@ heading be marked DONE, and the current time will be added."
2691 (if (not (eq this-buffer buffer)) (save-buffer)))) 2706 (if (not (eq this-buffer buffer)) (save-buffer))))
2692 ;; Here we are back in the original buffer. Everything seems to have 2707 ;; Here we are back in the original buffer. Everything seems to have
2693 ;; worked. So now cut the tree and finish up. 2708 ;; worked. So now cut the tree and finish up.
2694 (org-cut-subtree) 2709 (let (this-command) (org-cut-subtree))
2695 (if (looking-at "[ \t]*$") (kill-line)) 2710 (if (looking-at "[ \t]*$") (kill-line))
2696 (message "Subtree archived %s" 2711 (message "Subtree archived %s"
2697 (if (eq this-buffer buffer) 2712 (if (eq this-buffer buffer)
@@ -2717,7 +2732,6 @@ At all other locations, this simply calls `ispell-complete-word'."
2717 (skip-chars-backward "a-zA-Z0-9_:$") 2732 (skip-chars-backward "a-zA-Z0-9_:$")
2718 (point))) 2733 (point)))
2719 (texp (equal (char-before beg) ?\\)) 2734 (texp (equal (char-before beg) ?\\))
2720 (form (equal (char-before beg) ?=))
2721 (opt (equal (buffer-substring (max (point-at-bol) (- beg 2)) 2735 (opt (equal (buffer-substring (max (point-at-bol) (- beg 2))
2722 beg) 2736 beg)
2723 "#+")) 2737 "#+"))
@@ -2734,9 +2748,6 @@ At all other locations, this simply calls `ispell-complete-word'."
2734 (texp 2748 (texp
2735 (setq type :tex) 2749 (setq type :tex)
2736 org-html-entities) 2750 org-html-entities)
2737 (form
2738 (setq type :form)
2739 '(("sum") ("sumv") ("sumh")))
2740 ((string-match "\\`\\*+[ \t]*\\'" 2751 ((string-match "\\`\\*+[ \t]*\\'"
2741 (buffer-substring (point-at-bol) beg)) 2752 (buffer-substring (point-at-bol) beg))
2742 (setq type :todo) 2753 (setq type :todo)
@@ -5816,6 +5827,8 @@ See also the variable `org-reverse-note-order'."
5816 "Detects a table line marked for automatic recalculation.") 5827 "Detects a table line marked for automatic recalculation.")
5817(defconst org-table-recalculate-regexp "^[ \t]*| *[#*] *\\(|\\|$\\)" 5828(defconst org-table-recalculate-regexp "^[ \t]*| *[#*] *\\(|\\|$\\)"
5818 "Detects a table line marked for automatic recalculation.") 5829 "Detects a table line marked for automatic recalculation.")
5830(defconst org-table-calculate-mark-regexp "^[ \t]*| *[!$^_#*] *\\(|\\|$\\)"
5831 "Detects a table line marked for automatic recalculation.")
5819(defconst org-table-hline-regexp "^[ \t]*|-" 5832(defconst org-table-hline-regexp "^[ \t]*|-"
5820 "Detects an org-type table hline.") 5833 "Detects an org-type table hline.")
5821(defconst org-table1-hline-regexp "^[ \t]*\\+-[-+]" 5834(defconst org-table1-hline-regexp "^[ \t]*\\+-[-+]"
@@ -6119,7 +6132,7 @@ Optional argument NEW may specify text to replace the current field content."
6119 (cond 6132 (cond
6120 ((and (not new) org-table-may-need-update)) ; Realignment will happen anyway 6133 ((and (not new) org-table-may-need-update)) ; Realignment will happen anyway
6121 ((org-at-table-hline-p) 6134 ((org-at-table-hline-p)
6122 ;; FIXME: I use to enforce realign here, but I think this is not needed. 6135 ;; FIXME: I used to enforce realign here, but I think this is not needed.
6123 ;; (setq org-table-may-need-update t) 6136 ;; (setq org-table-may-need-update t)
6124 ) 6137 )
6125 ((and (not new) 6138 ((and (not new)
@@ -6133,15 +6146,17 @@ Optional argument NEW may specify text to replace the current field content."
6133 (let* ((pos (point)) s 6146 (let* ((pos (point)) s
6134 (col (org-table-current-column)) 6147 (col (org-table-current-column))
6135 (num (nth (1- col) org-table-last-alignment)) 6148 (num (nth (1- col) org-table-last-alignment))
6136 l f n o upd) 6149 l f n o e)
6137 (when (> col 0) 6150 (when (> col 0)
6138 (skip-chars-backward "^|\n") 6151 (skip-chars-backward "^|\n")
6139 (if (looking-at " *\\([^|\n]*?\\) *|") 6152 (if (looking-at " *\\([^|\n]*?\\) *\\(|\\|$\\)")
6140 (progn 6153 (progn
6141 (setq s (match-string 1) 6154 (setq s (match-string 1)
6142 o (match-string 0) 6155 o (match-string 0)
6143 l (max 1 (- (match-end 0) (match-beginning 0) 3))) 6156 l (max 1 (- (match-end 0) (match-beginning 0) 3))
6144 (setq f (format (if num " %%%ds |" " %%-%ds |") l) 6157 e (not (= (match-beginning 2) (match-end 2))))
6158 (setq f (format (if num " %%%ds %s" " %%-%ds %s")
6159 l (if e "|" (setq org-table-may-need-update t) ""))
6145 n (format f s t t)) 6160 n (format f s t t))
6146 (if new 6161 (if new
6147 (if (<= (length new) l) 6162 (if (<= (length new) l)
@@ -6980,91 +6995,186 @@ If NLAST is a number, only the NLAST fields will actually be summed."
6980 ((equal n 0) nil) 6995 ((equal n 0) nil)
6981 (t n)))) 6996 (t n))))
6982 6997
6998(defun org-table-get-vertical-vector (desc &optional tbeg col)
6999 "Get a calc vector from a column, according to descriptor DESC.
7000Optional arguments TBEG and COL can give the beginning of the table
7001and the current column, to avoid unnecessary parsing."
7002 (save-excursion
7003 (or tbeg (setq tbeg (org-table-begin)))
7004 (or col (setq col (org-table-current-column)))
7005 (let (beg end nn n n1 n2 l (thisline (org-current-line)) hline-list)
7006 (cond
7007 ((string-match "\\(I+\\)\\(-\\(I+\\)\\)?" desc)
7008 (setq n1 (- (match-end 1) (match-beginning 1)))
7009 (if (match-beginning 3)
7010 (setq n2 (- (match-end 2) (match-beginning 3))))
7011 (setq n (if n2 (max n1 n2) n1))
7012 (setq n1 (if n2 (min n1 n2)))
7013 (setq nn n)
7014 (while (and (> nn 0)
7015 (re-search-backward org-table-hline-regexp tbeg t))
7016 (push (org-current-line) hline-list)
7017 (setq nn (1- nn)))
7018 (setq hline-list (nreverse hline-list))
7019 (goto-line (nth (1- n) hline-list))
7020 (when (re-search-forward org-table-dataline-regexp)
7021 (org-table-goto-column col)
7022 (setq beg (point)))
7023 (goto-line (if n1 (nth (1- n1) hline-list) thisline))
7024 (when (re-search-backward org-table-dataline-regexp)
7025 (org-table-goto-column col)
7026 (setq end (point)))
7027 (setq l (apply 'append (org-table-copy-region beg end)))
7028 (concat "[" (mapconcat (lambda (x) (setq x (org-trim x))
7029 (if (equal x "") "0" x))
7030 l ",") "]"))
7031 ((string-match "\\([0-9]+\\)-\\([0-9]+\\)" desc)
7032 (setq n1 (string-to-number (match-string 1 desc))
7033 n2 (string-to-number (match-string 2 desc)))
7034 (beginning-of-line 1)
7035 (save-excursion
7036 (when (re-search-backward org-table-dataline-regexp tbeg t n1)
7037 (org-table-goto-column col)
7038 (setq beg (point))))
7039 (when (re-search-backward org-table-dataline-regexp tbeg t n2)
7040 (org-table-goto-column col)
7041 (setq end (point)))
7042 (setq l (apply 'append (org-table-copy-region beg end)))
7043 (concat "[" (mapconcat
7044 (lambda (x) (setq x (org-trim x))
7045 (if (equal x "") "0" x))
7046 l ",") "]"))
7047 ((string-match "\\([0-9]+\\)" desc)
7048 (beginning-of-line 1)
7049 (when (re-search-backward org-table-dataline-regexp tbeg t
7050 (string-to-number (match-string 0 desc)))
7051 (org-table-goto-column col)
7052 (org-trim (org-table-get-field))))))))
7053
6983(defvar org-table-formula-history nil) 7054(defvar org-table-formula-history nil)
6984 7055
6985(defun org-table-get-formula (&optional equation) 7056(defvar org-table-column-names nil
7057 "Alist with column names, derived from the `!' line.")
7058(defvar org-table-column-name-regexp nil
7059 "Regular expression matching the current column names.")
7060(defvar org-table-local-parameters nil
7061 "Alist with parameter names, derived from the `$' line.")
7062(defvar org-table-named-field-locations nil
7063 "Alist with locations of named fields.")
7064
7065(defun org-table-get-formula (&optional equation named)
6986 "Read a formula from the minibuffer, offer stored formula as default." 7066 "Read a formula from the minibuffer, offer stored formula as default."
6987 (let* ((col (org-table-current-column)) 7067 (let* ((name (car (rassoc (list (org-current-line)
7068 (org-table-current-column))
7069 org-table-named-field-locations)))
7070 (scol (if named
7071 (if name name
7072 (error "Not in a named field"))
7073 (int-to-string (org-table-current-column))))
7074 (dummy (and name (not named)
7075 (not (y-or-n-p "Replace named-field formula with column equation? " ))
7076 (error "Abort")))
6988 (org-table-may-need-update nil) 7077 (org-table-may-need-update nil)
6989 (stored-list (org-table-get-stored-formulas)) 7078 (stored-list (org-table-get-stored-formulas))
6990 (stored (cdr (assoc col stored-list))) 7079 (stored (cdr (assoc scol stored-list)))
6991 (eq (cond 7080 (eq (cond
6992 ((and stored equation (string-match "^ *= *$" equation)) 7081 ((and stored equation (string-match "^ *= *$" equation))
6993 stored) 7082 stored)
6994 ((stringp equation) 7083 ((stringp equation)
6995 equation) 7084 equation)
6996 (t (read-string 7085 (t (read-string
6997 "Formula: " (or stored "") 'org-table-formula-history 7086 (format "%s formula $%s=" (if named "Field" "Column") scol)
6998 stored))))) 7087 (or stored "") 'org-table-formula-history
6999 (if (not (string-match "\\S-" eq)) 7088 ;stored
7000 (error "Empty formula")) 7089 ))))
7090 mustsave)
7091 (when (not (string-match "\\S-" eq))
7092 ;; remove formula
7093 (setq stored-list (delq (assoc scol stored-list) stored-list))
7094 (org-table-store-formulas stored-list)
7095 (error "Formula removed"))
7001 (if (string-match "^ *=?" eq) (setq eq (replace-match "" t t eq))) 7096 (if (string-match "^ *=?" eq) (setq eq (replace-match "" t t eq)))
7002 (if (string-match " *$" eq) (setq eq (replace-match "" t t eq))) 7097 (if (string-match " *$" eq) (setq eq (replace-match "" t t eq)))
7098 (if (and name (not named))
7099 ;; We set the column equation, delete the named one.
7100 (setq stored-list (delq (assoc name stored-list) stored-list)
7101 mustsave t))
7003 (if stored 7102 (if stored
7004 (setcdr (assoc col stored-list) eq) 7103 (setcdr (assoc scol stored-list) eq)
7005 (setq stored-list (cons (cons col eq) stored-list))) 7104 (setq stored-list (cons (cons scol eq) stored-list)))
7006 (if (not (equal stored eq)) 7105 (if (or mustsave (not (equal stored eq)))
7007 (org-table-store-formulas stored-list)) 7106 (org-table-store-formulas stored-list))
7008 eq)) 7107 eq))
7009 7108
7010(defun org-table-store-formulas (alist) 7109(defun org-table-store-formulas (alist)
7011 "Store the list of formulas below the current table." 7110 "Store the list of formulas below the current table."
7012 (setq alist (sort alist (lambda (a b) (< (car a) (car b))))) 7111 (setq alist (sort alist (lambda (a b) (string< (car a) (car b)))))
7013 (save-excursion 7112 (save-excursion
7014 (goto-char (org-table-end)) 7113 (goto-char (org-table-end))
7015 (if (looking-at "\\([ \t]*\n\\)*#\\+TBLFM:.*\n?") 7114 (if (looking-at "\\([ \t]*\n\\)*#\\+TBLFM:.*\n?")
7016 (delete-region (point) (match-end 0))) 7115 (delete-region (point) (match-end 0)))
7017 (insert "#+TBLFM: " 7116 (insert "#+TBLFM: "
7018 (mapconcat (lambda (x) 7117 (mapconcat (lambda (x)
7019 (concat "$" (int-to-string (car x)) "=" (cdr x))) 7118 (concat "$" (car x) "=" (cdr x)))
7020 alist "::") 7119 alist "::")
7021 "\n"))) 7120 "\n")))
7022 7121
7023(defun org-table-get-stored-formulas () 7122(defun org-table-get-stored-formulas ()
7024 "Return an alist withh the t=stored formulas directly after current table." 7123 "Return an alist with the t=stored formulas directly after current table."
7025 (interactive) 7124 (interactive)
7026 (let (col eq eq-alist strings string) 7125 (let (scol eq eq-alist strings string seen)
7027 (save-excursion 7126 (save-excursion
7028 (goto-char (org-table-end)) 7127 (goto-char (org-table-end))
7029 (when (looking-at "\\([ \t]*\n\\)*#\\+TBLFM: *\\(.*\\)") 7128 (when (looking-at "\\([ \t]*\n\\)*#\\+TBLFM: *\\(.*\\)")
7030 (setq strings (org-split-string (match-string 2) " *:: *")) 7129 (setq strings (org-split-string (match-string 2) " *:: *"))
7031 (while (setq string (pop strings)) 7130 (while (setq string (pop strings))
7032 (if (string-match "\\$\\([0-9]+\\) *= *\\(.*[^ \t]\\)" string) 7131 (when (string-match "\\$\\([a-zA-Z0-9]+\\) *= *\\(.*[^ \t]\\)" string)
7033 (setq col (string-to-number (match-string 1 string)) 7132 (setq scol (match-string 1 string)
7034 eq (match-string 2 string) 7133 eq (match-string 2 string)
7035 eq-alist (cons (cons col eq) eq-alist)))))) 7134 eq-alist (cons (cons scol eq) eq-alist))
7036 eq-alist)) 7135 (if (member scol seen)
7136 (error "Double definition `$%s=' in TBLFM line, please fix by hand" scol)
7137 (push scol seen))))))
7138 (nreverse eq-alist)))
7037 7139
7038(defun org-table-modify-formulas (action &rest columns) 7140(defun org-table-modify-formulas (action &rest columns)
7039 "Modify the formulas stored below the current table. 7141 "Modify the formulas stored below the current table.
7040ACTION can be `remove', `insert', `swap'. For `swap', two column numbers are 7142ACTION can be `remove', `insert', `swap'. For `swap', two column numbers are
7041expected, for the other action only a single column number is needed." 7143expected, for the other action only a single column number is needed."
7042 (let ((list (org-table-get-stored-formulas)) 7144 (let ((list (org-table-get-stored-formulas))
7043 (nmax (length (org-split-string (buffer-substring (point-at-bol) (point-at-eol)) 7145 (nmax (length (org-split-string
7044 "|"))) 7146 (buffer-substring (point-at-bol) (point-at-eol))
7045 col col1 col2) 7147 "|")))
7148 col col1 col2 scol si sc1 sc2)
7046 (cond 7149 (cond
7047 ((null list)) ; No action needed if there are no stored formulas 7150 ((null list)) ; No action needed if there are no stored formulas
7048 ((eq action 'remove) 7151 ((eq action 'remove)
7049 (setq col (car columns)) 7152 (setq col (car columns)
7050 (org-table-replace-in-formulas list col "INVALID") 7153 scol (int-to-string col))
7051 (if (assoc col list) (setq list (delq (assoc col list) list))) 7154 (org-table-replace-in-formulas list scol "INVALID")
7155 (if (assoc scol list) (setq list (delq (assoc scol list) list)))
7052 (loop for i from (1+ col) upto nmax by 1 do 7156 (loop for i from (1+ col) upto nmax by 1 do
7053 (org-table-replace-in-formulas list i (1- i)) 7157 (setq si (int-to-string i))
7054 (if (assoc i list) (setcar (assoc i list) (1- i))))) 7158 (org-table-replace-in-formulas list si (int-to-string (1- i)))
7159 (if (assoc si list) (setcar (assoc si list)
7160 (int-to-string (1- i))))))
7055 ((eq action 'insert) 7161 ((eq action 'insert)
7056 (setq col (car columns)) 7162 (setq col (car columns))
7057 (loop for i from nmax downto col by 1 do 7163 (loop for i from nmax downto col by 1 do
7058 (org-table-replace-in-formulas list i (1+ i)) 7164 (setq si (int-to-string i))
7059 (if (assoc i list) (setcar (assoc i list) (1+ i))))) 7165 (org-table-replace-in-formulas list si (int-to-string (1+ i)))
7166 (if (assoc si list) (setcar (assoc si list)
7167 (int-to-string (1+ i))))))
7060 ((eq action 'swap) 7168 ((eq action 'swap)
7061 (setq col1 (car columns) col2 (nth 1 columns)) 7169 (setq col1 (car columns) col2 (nth 1 columns)
7062 (org-table-replace-in-formulas list col1 "Z") 7170 sc1 (int-to-string col1) sc2 (int-to-string col2))
7063 (org-table-replace-in-formulas list col2 col1) 7171 ;; Hopefully, ZqZ will never be a name in a table... FIXME:
7064 (org-table-replace-in-formulas list "Z" col2) 7172 (org-table-replace-in-formulas list sc1 "ZqZ")
7065 (if (assoc col1 list) (setcar (assoc col1 list) "Z")) 7173 (org-table-replace-in-formulas list sc2 sc1)
7066 (if (assoc col2 list) (setcar (assoc col2 list) col1)) 7174 (org-table-replace-in-formulas list "ZqZ" sc2)
7067 (if (assoc "Z" list) (setcar (assoc "Z" list) col2))) 7175 (if (assoc sc1 list) (setcar (assoc sc1 list) "ZqZ"))
7176 (if (assoc sc2 list) (setcar (assoc sc2 list) sc1))
7177 (if (assoc "ZqZ" list) (setcar (assoc "ZqZ" list) sc2)))
7068 (t (error "Invalid action in `org-table-modify-formulas'"))) 7178 (t (error "Invalid action in `org-table-modify-formulas'")))
7069 (if list (org-table-store-formulas list)))) 7179 (if list (org-table-store-formulas list))))
7070 7180
@@ -7079,20 +7189,14 @@ expected, for the other action only a single column number is needed."
7079 (setq s (replace-match s2 t t s))) 7189 (setq s (replace-match s2 t t s)))
7080 (setcdr elt s)))) 7190 (setcdr elt s))))
7081 7191
7082(defvar org-table-column-names nil
7083 "Alist with column names, derived from the `!' line.")
7084(defvar org-table-column-name-regexp nil
7085 "Regular expression matching the current column names.")
7086(defvar org-table-local-parameters nil
7087 "Alist with parameter names, derived from the `$' line.")
7088
7089(defun org-table-get-specials () 7192(defun org-table-get-specials ()
7090 "Get the column nmaes and local parameters for this table." 7193 "Get the column nmaes and local parameters for this table."
7091 (save-excursion 7194 (save-excursion
7092 (let ((beg (org-table-begin)) (end (org-table-end)) 7195 (let ((beg (org-table-begin)) (end (org-table-end))
7093 names name fields fields1 field cnt c v) 7196 names name fields fields1 field cnt c v line col)
7094 (setq org-table-column-names nil 7197 (setq org-table-column-names nil
7095 org-table-local-parameters nil) 7198 org-table-local-parameters nil
7199 org-table-named-field-locations nil)
7096 (goto-char beg) 7200 (goto-char beg)
7097 (when (re-search-forward "^[ \t]*| *! *\\(|.*\\)" end t) 7201 (when (re-search-forward "^[ \t]*| *! *\\(|.*\\)" end t)
7098 (setq names (org-split-string (match-string 1) " *| *") 7202 (setq names (org-split-string (match-string 1) " *| *")
@@ -7117,13 +7221,15 @@ expected, for the other action only a single column number is needed."
7117 fields (org-split-string (match-string 2) " *| *")) 7221 fields (org-split-string (match-string 2) " *| *"))
7118 (save-excursion 7222 (save-excursion
7119 (beginning-of-line (if (equal c "_") 2 0)) 7223 (beginning-of-line (if (equal c "_") 2 0))
7224 (setq line (org-current-line) col 1)
7120 (and (looking-at "^[ \t]*|[^|]*\\(|.*\\)") 7225 (and (looking-at "^[ \t]*|[^|]*\\(|.*\\)")
7121 (setq fields1 (org-split-string (match-string 1) " *| *")))) 7226 (setq fields1 (org-split-string (match-string 1) " *| *"))))
7122 (while (setq field (pop fields)) 7227 (while (and fields1 (setq field (pop fields)))
7123 (setq v (pop fields1)) 7228 (setq v (pop fields1) col (1+ col))
7124 (if (and (stringp field) (stringp v) 7229 (when (and (stringp field) (stringp v)
7125 (string-match "^[a-zA-Z][a-zA-Z0-9]*$" field)) 7230 (string-match "^[a-zA-Z][a-zA-Z0-9]*$" field))
7126 (push (cons field v) org-table-local-parameters))))))) 7231 (push (cons field v) org-table-local-parameters)
7232 (push (list field line col) org-table-named-field-locations)))))))
7127 7233
7128(defun org-this-word () 7234(defun org-this-word ()
7129 ;; Get the current word 7235 ;; Get the current word
@@ -7133,46 +7239,18 @@ expected, for the other action only a single column number is needed."
7133 (buffer-substring-no-properties beg end)))) 7239 (buffer-substring-no-properties beg end))))
7134 7240
7135(defun org-table-maybe-eval-formula () 7241(defun org-table-maybe-eval-formula ()
7136 "Check if the current field starts with \"=\" and evaluate the formula." 7242 "Check if the current field starts with \"=\" or \":=\".
7243If yes, store the formula and apply it."
7137 ;; We already know we are in a table. Get field will only return a formula 7244 ;; We already know we are in a table. Get field will only return a formula
7138 ;; when appropriate. It might return a separator line, but no problem. 7245 ;; when appropriate. It might return a separator line, but no problem.
7139 (when org-table-formula-evaluate-inline 7246 (when org-table-formula-evaluate-inline
7140 (let* ((field (org-trim (or (org-table-get-field) ""))) 7247 (let* ((field (org-trim (or (org-table-get-field) "")))
7141 (dfield (downcase field)) 7248 named eq)
7142 col bolpos nlast) 7249 (when (string-match "^:?=\\(.+\\)" field)
7143 (when (equal (string-to-char field) ?=) 7250 (setq named (equal (string-to-char field) ?:)
7144 (if (string-match "^\\(=sum[vh]?\\)\\([0-9]+\\)$" dfield) 7251 eq (match-string 1 field))
7145 (setq nlast (1+ (string-to-number (match-string 2 dfield))) 7252 (if (fboundp 'calc-eval)
7146 dfield (match-string 1 dfield))) 7253 (org-table-eval-formula (if named '(4) nil) eq))))))
7147 (cond
7148 ((equal dfield "=sumh")
7149 (org-table-get-field
7150 nil (org-table-sum
7151 (save-excursion (org-table-goto-column 1) (point))
7152 (point) nlast)))
7153 ((member dfield '("=sum" "=sumv"))
7154 (setq col (org-table-current-column)
7155 bolpos (point-at-bol))
7156 (org-table-get-field
7157 nil (org-table-sum
7158 (save-excursion
7159 (goto-char (org-table-begin))
7160 (if (re-search-forward org-table-dataline-regexp bolpos t)
7161 (progn
7162 (goto-char (match-beginning 0))
7163 (org-table-goto-column col)
7164 (point))
7165 (error "No datalines above current")))
7166 (point) nlast)))
7167 ((and (string-match "^ *=" field)
7168 (fboundp 'calc-eval))
7169 (org-table-eval-formula nil field)))))))
7170
7171(defvar org-last-recalc-undo-list nil)
7172(defcustom org-table-allow-line-recalculation t
7173 "FIXME:"
7174 :group 'org-table
7175 :type 'boolean)
7176 7254
7177(defvar org-recalc-commands nil 7255(defvar org-recalc-commands nil
7178 "List of commands triggering the reccalculation of a line. 7256 "List of commands triggering the reccalculation of a line.
@@ -7210,8 +7288,10 @@ of the new mark."
7210 (col (org-table-current-column)) 7288 (col (org-table-current-column))
7211 (forcenew (car (assoc newchar org-recalc-marks))) 7289 (forcenew (car (assoc newchar org-recalc-marks)))
7212 epos new) 7290 epos new)
7213 (if l1 (setq newchar (char-to-string (read-char-exclusive "Change region to what mark? Type # * ! $ or SPC: ")) 7291 (when l1
7214 forcenew (car (assoc newchar org-recalc-marks)))) 7292 (message "Change region to what mark? Type # * ! $ or SPC: ")
7293 (setq newchar (char-to-string (read-char-exclusive))
7294 forcenew (car (assoc newchar org-recalc-marks))))
7215 (if (and newchar (not forcenew)) 7295 (if (and newchar (not forcenew))
7216 (error "Invalid NEWCHAR `%s' in `org-table-rotate-recalc-marks'" 7296 (error "Invalid NEWCHAR `%s' in `org-table-rotate-recalc-marks'"
7217 newchar)) 7297 newchar))
@@ -7248,7 +7328,7 @@ of the new mark."
7248(defun org-table-maybe-recalculate-line () 7328(defun org-table-maybe-recalculate-line ()
7249 "Recompute the current line if marked for it, and if we haven't just done it." 7329 "Recompute the current line if marked for it, and if we haven't just done it."
7250 (interactive) 7330 (interactive)
7251 (and org-table-allow-line-recalculation 7331 (and org-table-allow-automatic-line-recalculation
7252 (not (and (memq last-command org-recalc-commands) 7332 (not (and (memq last-command org-recalc-commands)
7253 (equal org-last-recalc-line (org-current-line)))) 7333 (equal org-last-recalc-line (org-current-line))))
7254 (save-excursion (beginning-of-line 1) 7334 (save-excursion (beginning-of-line 1)
@@ -7273,7 +7353,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
7273 (cons var (cons value modes))) 7353 (cons var (cons value modes)))
7274 modes) 7354 modes)
7275 7355
7276(defun org-table-eval-formula (&optional ndown equation 7356(defun org-table-eval-formula (&optional arg equation
7277 suppress-align suppress-const 7357 suppress-align suppress-const
7278 suppress-store) 7358 suppress-store)
7279 "Replace the table field value at the cursor by the result of a calculation. 7359 "Replace the table field value at the cursor by the result of a calculation.
@@ -7283,64 +7363,46 @@ most exciting program ever written for GNU Emacs. So you need to have calc
7283installed in order to use this function. 7363installed in order to use this function.
7284 7364
7285In a table, this command replaces the value in the current field with the 7365In a table, this command replaces the value in the current field with the
7286result of a formula. While nowhere near the computation options of a 7366result of a formula. It also installes the formula as the \"current\" column
7287spreadsheet program, this is still very useful. There is no automatic 7367formula, by storing it in a special line below the table. When called
7288updating of a calculated field, but the table will remember the last 7368with a `C-u' prefix, the current field must ba a named field, and the
7289formula for each column. The command needs to be applied again after 7369formula is installed as valid in only this specific field.
7290changing input fields. 7370
7291 7371When called, the command first prompts for a formula, which is read in
7292When called, the command first prompts for a formula, which is read in the 7372the minibuffer. Previously entered formulas are available through the
7293minibuffer. Previously entered formulas are available through the history 7373history list, and the last used formula is offered as a default.
7294list, and the last used formula for each column is offered as a default.
7295These stored formulas are adapted correctly when moving, inserting, or 7374These stored formulas are adapted correctly when moving, inserting, or
7296deleting columns with the corresponding commands. 7375deleting columns with the corresponding commands.
7297 7376
7298The formula can be any algebraic expression understood by the calc package. 7377The formula can be any algebraic expression understood by the calc package.
7299Before evaluation, variable substitution takes place: \"$\" is replaced by 7378For details, see the Org-mode manual.
7300the field the cursor is currently in, and $1..$n reference the fields in 7379
7301the current row. Values from a *different* row can *not* be referenced 7380This function can also be called from Lisp programs and offers
7302here, so the command supports only horizontal computing. The formula can 7381additional Arguments: EQUATION can be the formula to apply. If this
7303contain an optional printf format specifier after a semicolon, to reformat 7382argument is given, the user will not be prompted. SUPPRESS-ALIGN is
7304the result. 7383used to speed-up recursive calls by by-passing unnecessary aligns.
7305 7384SUPPRESS-CONST suppresses the interpretation of constants in the
7306A few examples for formulas: 7385formula, assuming that this has been done already outside the fuction.
7307 $1+$2 Sum of first and second field 7386SUPPRESS-STORE means the formula should not be stored, either because
7308 $1+$2;%.2f Same, and format result to two digits after dec.point 7387it is already stored, or because it is a modified equation that should
7309 exp($2)+exp($1) Math functions can be used 7388not overwrite the stored one."
7310 $;%.1f Reformat current cell to 1 digit after dec.point
7311 ($3-32)*5/9 degrees F -> C conversion
7312
7313When called with a raw \\[universal-argument] prefix, the formula is applied to the current
7314field, and to the same same column in all following rows, until reaching a
7315horizontal line or the end of the table. When the command is called with a
7316numeric prefix argument (like M-3 or C-7 or \\[universal-argument] 24), the formula is applied
7317to the current row, and to the following n-1 rows (but not beyond a
7318separator line).
7319
7320This function can also be called from Lisp programs and offers two additional
7321Arguments: EQUATION can be the formula to apply. If this argument is given,
7322the user will not be prompted. SUPPRESS-ALIGN is used to speed-up
7323recursive calls by by-passing unnecessary aligns. SUPPRESS-CONST suppresses
7324the interpretation of constants in the formula. SUPPRESS-STORE means the
7325formula should not be stored, either because it is already stored, or because
7326it is a modified equation that should not overwrite the stored one."
7327 (interactive "P") 7389 (interactive "P")
7328 (setq ndown (if (equal ndown '(4)) 10000 (prefix-numeric-value ndown)))
7329 (require 'calc) 7390 (require 'calc)
7330 (org-table-check-inside-data-field) 7391 (org-table-check-inside-data-field)
7331 (org-table-get-specials) 7392 (org-table-get-specials)
7332 (let* (fields 7393 (let* (fields
7394 (ndown (if (integerp arg) arg 1))
7333 (org-table-automatic-realign nil) 7395 (org-table-automatic-realign nil)
7334 (case-fold-search nil) 7396 (case-fold-search nil)
7335 (down (> ndown 1)) 7397 (down (> ndown 1))
7336 (formula (if (and equation suppress-store) 7398 (formula (if (and equation suppress-store)
7337 equation 7399 equation
7338 (org-table-get-formula equation))) 7400 (org-table-get-formula equation (equal arg '(4)))))
7339 (n0 (org-table-current-column)) 7401 (n0 (org-table-current-column))
7340 (modes (copy-sequence org-calc-default-modes)) 7402 (modes (copy-sequence org-calc-default-modes))
7341 n form fmt x ev orig c) 7403 n form fmt x ev orig c)
7342 ;; Parse the format string. Since we have a lot of modes, this is 7404 ;; Parse the format string. Since we have a lot of modes, this is
7343 ;; a lot of work. 7405 ;; a lot of work. However, I think calc still uses most of the time.
7344 (if (string-match ";" formula) 7406 (if (string-match ";" formula)
7345 (let ((tmp (org-split-string formula ";"))) 7407 (let ((tmp (org-split-string formula ";")))
7346 (setq formula (car tmp) 7408 (setq formula (car tmp)
@@ -7374,6 +7436,7 @@ it is a modified equation that should not overwrite the stored one."
7374 fields))) 7436 fields)))
7375 (setq ndown (1- ndown)) 7437 (setq ndown (1- ndown))
7376 (setq form (copy-sequence formula)) 7438 (setq form (copy-sequence formula))
7439 ;; Insert the references to fields in same row
7377 (while (string-match "\\$\\([0-9]+\\)?" form) 7440 (while (string-match "\\$\\([0-9]+\\)?" form)
7378 (setq n (if (match-beginning 1) 7441 (setq n (if (match-beginning 1)
7379 (string-to-int (match-string 1 form)) 7442 (string-to-int (match-string 1 form))
@@ -7383,6 +7446,13 @@ it is a modified equation that should not overwrite the stored one."
7383 (match-string 0 form))) 7446 (match-string 0 form)))
7384 (if (equal x "") (setq x "0")) 7447 (if (equal x "") (setq x "0"))
7385 (setq form (replace-match (concat "(" x ")") t t form))) 7448 (setq form (replace-match (concat "(" x ")") t t form)))
7449 ;; Insert ranges in current column
7450 (while (string-match "\\&[-I0-9]+" form)
7451 (setq form (replace-match
7452 (save-match-data
7453 (org-table-get-vertical-vector (match-string 0 form)
7454 nil n0))
7455 t t form)))
7386 (setq ev (calc-eval (cons form modes) 7456 (setq ev (calc-eval (cons form modes)
7387 (if org-table-formula-numbers-only 'num))) 7457 (if org-table-formula-numbers-only 'num)))
7388 7458
@@ -7424,24 +7494,32 @@ $1-> %s\n" orig formula form))
7424 (unless (org-at-table-p) (error "Not at a table")) 7494 (unless (org-at-table-p) (error "Not at a table"))
7425 (org-table-get-specials) 7495 (org-table-get-specials)
7426 (let* ((eqlist (sort (org-table-get-stored-formulas) 7496 (let* ((eqlist (sort (org-table-get-stored-formulas)
7427 (lambda (a b) (< (car a) (car b))))) 7497 (lambda (a b) (string< (car a) (car b)))))
7428 (inhibit-redisplay t) 7498 (inhibit-redisplay t)
7429 (line-re org-table-dataline-regexp) 7499 (line-re org-table-dataline-regexp)
7430 (thisline (+ (if (bolp) 1 0) (count-lines (point-min) (point)))) 7500 (thisline (+ (if (bolp) 1 0) (count-lines (point-min) (point))))
7431 (thiscol (org-table-current-column)) 7501 (thiscol (org-table-current-column))
7432 beg end entry eql (cnt 0)) 7502 beg end entry eqlnum eqlname eql (cnt 0) eq a name)
7433 ;; Insert constants in all formulas 7503 ;; Insert constants in all formulas
7434 (setq eqlist 7504 (setq eqlist
7435 (mapcar (lambda (x) 7505 (mapcar (lambda (x)
7436 (setcdr x (org-table-formula-substitute-names (cdr x))) 7506 (setcdr x (org-table-formula-substitute-names (cdr x)))
7437 x) 7507 x)
7438 eqlist)) 7508 eqlist))
7509 ;; Split the equation list
7510 (while (setq eq (pop eqlist))
7511 (if (<= (string-to-char (car eq)) ?9)
7512 (push eq eqlnum)
7513 (push eq eqlname)))
7514 (setq eqlnum (nreverse eqlnum) eqlname (nreverse eqlname))
7439 (if all 7515 (if all
7440 (progn 7516 (progn
7441 (setq end (move-marker (make-marker) (1+ (org-table-end)))) 7517 (setq end (move-marker (make-marker) (1+ (org-table-end))))
7442 (goto-char (setq beg (org-table-begin))) 7518 (goto-char (setq beg (org-table-begin)))
7443 (if (re-search-forward org-table-recalculate-regexp end t) 7519 (if (re-search-forward org-table-calculate-mark-regexp end t)
7520 ;; This is a table with marked lines, only compute selected lines
7444 (setq line-re org-table-recalculate-regexp) 7521 (setq line-re org-table-recalculate-regexp)
7522 ;; Move forward to the first non-header line
7445 (if (and (re-search-forward org-table-dataline-regexp end t) 7523 (if (and (re-search-forward org-table-dataline-regexp end t)
7446 (re-search-forward org-table-hline-regexp end t) 7524 (re-search-forward org-table-hline-regexp end t)
7447 (re-search-forward org-table-dataline-regexp end t)) 7525 (re-search-forward org-table-dataline-regexp end t))
@@ -7452,23 +7530,37 @@ $1-> %s\n" orig formula form))
7452 (goto-char beg) 7530 (goto-char beg)
7453 (and all (message "Re-applying formulas to full table...")) 7531 (and all (message "Re-applying formulas to full table..."))
7454 (while (re-search-forward line-re end t) 7532 (while (re-search-forward line-re end t)
7455 (unless (string-match "^ *[!$] *$" (org-table-get-field 1)) 7533 (unless (string-match "^ *[_^!$] *$" (org-table-get-field 1))
7456 ;; Unprotected line, recalculate 7534 ;; Unprotected line, recalculate
7457 (and all (message "Re-applying formulas to full table...(line %d)" 7535 (and all (message "Re-applying formulas to full table...(line %d)"
7458 (setq cnt (1+ cnt)))) 7536 (setq cnt (1+ cnt))))
7459 (setq org-last-recalc-line (org-current-line)) 7537 (setq org-last-recalc-line (org-current-line))
7460 (setq eql eqlist) 7538 (setq eql eqlnum)
7461 (while (setq entry (pop eql)) 7539 (while (setq entry (pop eql))
7462 (goto-line org-last-recalc-line) 7540 (goto-line org-last-recalc-line)
7463 (org-table-goto-column (car entry) nil 'force) 7541 (org-table-goto-column (string-to-int (car entry)) nil 'force)
7464 (org-table-eval-formula nil (cdr entry) 'noalign 'nocst 'nostore)))) 7542 (org-table-eval-formula nil (cdr entry) 'noalign 'nocst 'nostore))))
7465 (goto-line thisline) 7543 (goto-line thisline)
7466 (org-table-goto-column thiscol) 7544 (org-table-goto-column thiscol)
7467 (or noalign (and org-table-may-need-update (org-table-align)) 7545 (or noalign (and org-table-may-need-update (org-table-align))
7468 (and all (message "Re-applying formulas to %d lines...done" cnt))))) 7546 (and all (message "Re-applying formulas to %d lines...done" cnt)))
7547 ;; Now do the names fields
7548 (while (setq eq (pop eqlname))
7549 (setq name (car eq)
7550 a (assoc name org-table-named-field-locations))
7551 (when a
7552 (message "Re-applying formula to named field: %s" name)
7553 (goto-line (nth 1 a))
7554 (org-table-goto-column (nth 2 a))
7555 (org-table-eval-formula nil (cdr eq) 'noalign 'nocst 'nostore)))
7556 ;; back to initial position
7557 (goto-line thisline)
7558 (org-table-goto-column thiscol)
7559 (or noalign (and org-table-may-need-update (org-table-align))
7560 (and all (message "Re-applying formulas...done")))))
7469 7561
7470(defun org-table-formula-substitute-names (f) 7562(defun org-table-formula-substitute-names (f)
7471 "Replace $const with values in stirng F." 7563 "Replace $const with values in string F."
7472 (let ((start 0) a n1 n2 nn1 nn2 s (f1 f)) 7564 (let ((start 0) a n1 n2 nn1 nn2 s (f1 f))
7473 ;; First, check for column names 7565 ;; First, check for column names
7474 (while (setq start (string-match org-table-column-name-regexp f start)) 7566 (while (setq start (string-match org-table-column-name-regexp f start))
@@ -7505,6 +7597,136 @@ Parameters get priority."
7505 (and (fboundp 'constants-get) (constants-get const)) 7597 (and (fboundp 'constants-get) (constants-get const))
7506 "#UNDEFINED_NAME")) 7598 "#UNDEFINED_NAME"))
7507 7599
7600(defvar org-edit-formulas-map (make-sparse-keymap))
7601(define-key org-edit-formulas-map "\C-c\C-c" 'org-finish-edit-formulas)
7602(define-key org-edit-formulas-map "\C-c\C-q" 'org-abort-edit-formulas)
7603(define-key org-edit-formulas-map "\C-c?" 'org-show-variable)
7604
7605(defvar org-pos)
7606(defvar org-window-configuration)
7607
7608(defun org-table-edit-formulas ()
7609 "Edit the formulas of the current table in a separate buffer."
7610 (interactive)
7611 (unless (org-at-table-p)
7612 (error "Not at a table"))
7613 (org-table-get-specials)
7614 (let ((eql (org-table-get-stored-formulas))
7615 (pos (move-marker (make-marker) (point)))
7616 (wc (current-window-configuration))
7617 entry loc s)
7618 (switch-to-buffer-other-window "*Edit Formulas*")
7619 (erase-buffer)
7620 (fundamental-mode)
7621 (set (make-local-variable 'org-pos) pos)
7622 (set (make-local-variable 'org-window-configuration) wc)
7623 (use-local-map org-edit-formulas-map)
7624 (setq s "# Edit formulas and finish with `C-c C-c'.
7625# Use `C-u C-c C-c' to also appy them immediately to the entire table.
7626# Use `C-c ?' to get information about $name at point.
7627# To cancel editing, press `C-c C-q'.\n")
7628 (put-text-property 0 (length s) 'face 'font-lock-comment-face s)
7629 (insert s)
7630 (while (setq entry (pop eql))
7631 (when (setq loc (assoc (car entry) org-table-named-field-locations))
7632 (setq s (format "# Named formula, referring to column %d in line %d\n"
7633 (nth 2 loc) (nth 1 loc)))
7634 (put-text-property 0 (length s) 'face 'font-lock-comment-face s)
7635 (insert s))
7636 (setq s (concat "$" (car entry) "=" (cdr entry) "\n"))
7637 (remove-text-properties 0 (length s) '(face nil) s)
7638 (insert s))
7639 (goto-char (point-min))
7640 (message "Edit formulas and finish with `C-c C-c'.")))
7641
7642(defun org-show-variable ()
7643 "Show the location/value of the $ expression at point."
7644 (interactive)
7645 (let (var (pos org-pos) (win (selected-window)) e)
7646 (save-excursion
7647 (or (looking-at "\\$") (skip-chars-backward "$a-zA-Z0-9"))
7648 (if (looking-at "\\$\\([a-zA-Z0-9]+\\)")
7649 (setq var (match-string 1))
7650 (error "No variable at point")))
7651 (cond
7652 ((setq e (assoc var org-table-named-field-locations))
7653 (switch-to-buffer-other-window (marker-buffer pos))
7654 (goto-line (nth 1 e))
7655 (org-table-goto-column (nth 2 e))
7656 (select-window win)
7657 (message "Named field, column %d of line %d" (nth 2 e) (nth 1 e)))
7658 ((setq e (assoc var org-table-column-names))
7659 (switch-to-buffer-other-window (marker-buffer pos))
7660 (goto-char pos)
7661 (goto-char (org-table-begin))
7662 (if (re-search-forward (concat "^[ \t]*| *! *.*?| *\\(" var "\\) *|")
7663 (org-table-end) t)
7664 (progn
7665 (goto-char (match-beginning 1))
7666 (message "Named column (column %s)" (cdr e)))
7667 (error "Column name not found"))
7668 (select-window win))
7669 ((string-match "^[0-9]$" var)
7670 ;; column number
7671 (switch-to-buffer-other-window (marker-buffer pos))
7672 (goto-char pos)
7673 (goto-char (org-table-begin))
7674 (recenter 1)
7675 (if (re-search-forward org-table-dataline-regexp
7676 (org-table-end) t)
7677 (progn
7678 (goto-char (match-beginning 0))
7679 (org-table-goto-column (string-to-number var))
7680 (message "Column %s" var))
7681 (error "Column name not found"))
7682 (select-window win))
7683 ((setq e (assoc var org-table-local-parameters))
7684 (switch-to-buffer-other-window (marker-buffer pos))
7685 (goto-char pos)
7686 (goto-char (org-table-begin))
7687 (if (re-search-forward (concat "^[ \t]*| *\\$ *.*?| *\\(" var "=\\)") nil t)
7688 (progn
7689 (goto-char (match-beginning 1))
7690 (message "Local parameter."))
7691 (error "Parameter not found"))
7692 (select-window win))
7693 (t
7694 (cond
7695 ((setq e (assoc var org-table-formula-constants))
7696 (message "Constant: $%s=%s in `org-table-formula-constants'." var (cdr e)))
7697 ((setq e (and (fboundp 'constants-get) (constants-get var)))
7698 (message "Constant: $%s=%s, retrieved from `constants.el'." var e))
7699 (t (error "Undefined name $%s" var)))))))
7700
7701(defun org-finish-edit-formulas (&optional arg)
7702 "Parse the buffer for formula definitions and install them.
7703With prefix ARG, apply the new formulas to the table."
7704 (interactive "P")
7705 (let ((pos org-pos) eql)
7706 (goto-char (point-min))
7707 (while (re-search-forward "^\\$\\([a-zA-Z0-9]+\\) *= *\\(.*?\\) *$" nil t)
7708 (push (cons (match-string 1) (match-string 2)) eql))
7709 (set-window-configuration org-window-configuration)
7710 (select-window (get-buffer-window (marker-buffer pos)))
7711 (goto-char pos)
7712 (unless (org-at-table-p)
7713 (error "Lost table position - cannot install formulae"))
7714 (org-table-store-formulas eql)
7715 (move-marker pos nil)
7716 (kill-buffer "*Edit Formulas*")
7717 (if arg
7718 (org-table-recalculate 'all)
7719 (message "New formulas installed - press C-u C-c C-c to apply."))))
7720
7721(defun org-abort-edit-formulas ()
7722 "Abort editing formulas, without installing the changes."
7723 (interactive)
7724 (let ((pos org-pos))
7725 (set-window-configuration org-window-configuration)
7726 (select-window (get-buffer-window (marker-buffer pos)))
7727 (goto-char pos)
7728 (message "Formula editing aborted without installing changes")))
7729
7508;;; The orgtbl minor mode 7730;;; The orgtbl minor mode
7509 7731
7510;; Define a minor mode which can be used in other modes in order to 7732;; Define a minor mode which can be used in other modes in order to
@@ -7657,6 +7879,7 @@ to execute outside of tables."
7657 '("\C-c+" org-table-sum) 7879 '("\C-c+" org-table-sum)
7658 '("\C-c|" org-table-toggle-vline-visibility) 7880 '("\C-c|" org-table-toggle-vline-visibility)
7659 '("\C-c=" org-table-eval-formula) 7881 '("\C-c=" org-table-eval-formula)
7882 '("\C-c'" org-table-edit-formulas)
7660 '("\C-c*" org-table-recalculate) 7883 '("\C-c*" org-table-recalculate)
7661 '([(control ?#)] org-table-rotate-recalc-marks))) 7884 '([(control ?#)] org-table-rotate-recalc-marks)))
7662 elt key fun cmd) 7885 elt key fun cmd)
@@ -7714,8 +7937,9 @@ to execute outside of tables."
7714 ["Paste Rectangle" org-paste-special :active (org-at-table-p) :keys "C-c C-y"] 7937 ["Paste Rectangle" org-paste-special :active (org-at-table-p) :keys "C-c C-y"]
7715 ["Fill Rectangle" org-table-wrap-region :active (org-at-table-p) :keys "C-c C-q"]) 7938 ["Fill Rectangle" org-table-wrap-region :active (org-at-table-p) :keys "C-c C-q"])
7716 "--" 7939 "--"
7717 ["Eval Formula" org-table-eval-formula :active (org-at-table-p) :keys "C-c ="] 7940 ["Set Column Formula" org-table-eval-formula :active (org-at-table-p) :keys "C-c ="]
7718 ["Eval Formula Down " (org-table-eval-formula '(4)) :active (org-at-table-p) :keys "C-u C-c ="] 7941 ["Set Named Field Formula" (org-table-eval-formula '(4)) :active (org-at-table-p) :keys "C-u C-c ="]
7942 ["Edit Formulas" org-table-edit-formulas :active (org-at-table-p) :keys "C-c '"]
7719 ["Recalculate line" org-table-recalculate :active (org-at-table-p) :keys "C-c *"] 7943 ["Recalculate line" org-table-recalculate :active (org-at-table-p) :keys "C-c *"]
7720 ["Recalculate all" (org-table-recalculate '(4)) :active (org-at-table-p) :keys "C-u C-c *"] 7944 ["Recalculate all" (org-table-recalculate '(4)) :active (org-at-table-p) :keys "C-u C-c *"]
7721 ["Toggle Recalculate Mark" org-table-rotate-recalc-marks :active (org-at-table-p) :keys "C-c #"] 7945 ["Toggle Recalculate Mark" org-table-rotate-recalc-marks :active (org-at-table-p) :keys "C-c #"]
@@ -8685,6 +8909,7 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8685 (t 8909 (t
8686 ;; Normal lines 8910 ;; Normal lines
8687 ;; Lines starting with "-", and empty lines make new paragraph. 8911 ;; Lines starting with "-", and empty lines make new paragraph.
8912 ;; FIXME: Should we add + and *?
8688 (if (string-match "^ *-\\|^[ \t]*$" line) (insert "<p>")) 8913 (if (string-match "^ *-\\|^[ \t]*$" line) (insert "<p>"))
8689 (insert line (if org-export-preserve-breaks "<br>\n" "\n")))) 8914 (insert line (if org-export-preserve-breaks "<br>\n" "\n"))))
8690 )) 8915 ))
@@ -9101,6 +9326,7 @@ When LEVEL is non-nil, increase section numbers on that level."
9101(define-key org-mode-map "\C-c+" 'org-table-sum) 9326(define-key org-mode-map "\C-c+" 'org-table-sum)
9102(define-key org-mode-map "\C-c|" 'org-table-toggle-vline-visibility) 9327(define-key org-mode-map "\C-c|" 'org-table-toggle-vline-visibility)
9103(define-key org-mode-map "\C-c=" 'org-table-eval-formula) 9328(define-key org-mode-map "\C-c=" 'org-table-eval-formula)
9329(define-key org-mode-map "\C-c'" 'org-table-edit-formulas)
9104(define-key org-mode-map "\C-c*" 'org-table-recalculate) 9330(define-key org-mode-map "\C-c*" 'org-table-recalculate)
9105(define-key org-mode-map [(control ?#)] 'org-table-rotate-recalc-marks) 9331(define-key org-mode-map [(control ?#)] 'org-table-rotate-recalc-marks)
9106(define-key org-mode-map "\C-c~" 'org-table-create-with-table.el) 9332(define-key org-mode-map "\C-c~" 'org-table-create-with-table.el)
@@ -9385,11 +9611,14 @@ scanning the buffer for these lines and updating the information."
9385 ["Fill Rectangle" org-table-wrap-region (org-at-table-p)]) 9611 ["Fill Rectangle" org-table-wrap-region (org-at-table-p)])
9386 "--" 9612 "--"
9387 ("Calculate" 9613 ("Calculate"
9388 ["Eval Formula" org-table-eval-formula (org-at-table-p)] 9614 ["Set Column Formula" org-table-eval-formula (org-at-table-p)]
9389 ["Eval Formula Down" (org-table-eval-formula '(4)) :active (org-at-table-p) :keys "C-u C-c ="] 9615 ["Set Named Field Formula" (org-table-eval-formula '(4)) :active (org-at-table-p) :keys "C-u C-c ="]
9616 ["Edit Formulas" org-table-edit-formulas (org-at-table-p)]
9617 "--"
9390 ["Recalculate line" org-table-recalculate (org-at-table-p)] 9618 ["Recalculate line" org-table-recalculate (org-at-table-p)]
9391 ["Recalculate all" (lambda () (interactive) (org-table-recalculate '(4))) :active (org-at-table-p) :keys "C-u C-c *"] 9619 ["Recalculate all" (lambda () (interactive) (org-table-recalculate '(4))) :active (org-at-table-p) :keys "C-u C-c *"]
9392 ["Toggle Recalculate Mark" org-table-rotate-recalc-marks (org-at-table-p)] 9620 ["Toggle Recalculate Mark" org-table-rotate-recalc-marks (org-at-table-p)]
9621 "--"
9393 ["Sum Column/Rectangle" org-table-sum 9622 ["Sum Column/Rectangle" org-table-sum
9394 (or (org-at-table-p) (org-region-active-p))] 9623 (or (org-at-table-p) (org-region-active-p))]
9395 ["Which Column?" org-table-current-column (org-at-table-p)]) 9624 ["Which Column?" org-table-current-column (org-at-table-p)])
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index fd788a772e4..3ae39213dff 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -710,7 +710,7 @@ You can manipulate rectangles with these commands:
710 C-c C-r Draw a rectangular box around mark and point. 710 C-c C-r Draw a rectangular box around mark and point.
711 \\[copy-rectangle-to-register] Copies a rectangle to a register. 711 \\[copy-rectangle-to-register] Copies a rectangle to a register.
712 \\[advertised-undo] Can undo effects of rectangle overlay commands 712 \\[advertised-undo] Can undo effects of rectangle overlay commands
713 commands if invoked soon enough. 713 if invoked soon enough.
714You can return to the previous mode with: 714You can return to the previous mode with:
715 C-c C-c Which also strips trailing whitespace from every line. 715 C-c C-c Which also strips trailing whitespace from every line.
716 Stripping is suppressed by supplying an argument. 716 Stripping is suppressed by supplying an argument.
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 0313379814f..2609ff4ee13 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,11 @@
12005-07-15 Richard M. Stallman <rms@gnu.org>
2
3 * url-http.el (url-http-parse-headers): Add :redirect arg-pair
4 when calling url-retrieve, to indicate a redirect.
5
6 * url.el (url-retrieve): The callback function can get an additional
7 keyword arg pair.
8
12005-07-04 Lute Kamstra <lute@gnu.org> 92005-07-04 Lute Kamstra <lute@gnu.org>
2 10
3 Update FSF's address in GPL notices. 11 Update FSF's address in GPL notices.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 92cbf41e76b..b8bf920e2e5 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -501,8 +501,9 @@ should be shown to the user."
501 (url-request-data url-http-data) 501 (url-request-data url-http-data)
502 (url-request-extra-headers url-http-extra-headers)) 502 (url-request-extra-headers url-http-extra-headers))
503 (url-retrieve redirect-uri url-callback-function 503 (url-retrieve redirect-uri url-callback-function
504 (cons redirect-uri 504 (cons :redirect
505 (cdr url-callback-arguments))) 505 (cons redirect-uri
506 url-callback-arguments)))
506 (url-mark-buffer-as-dead (current-buffer)))))) 507 (url-mark-buffer-as-dead (current-buffer))))))
507 (4 ; Client error 508 (4 ; Client error
508 ;; 400 Bad Request 509 ;; 400 Bad Request
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 695aceb871e..21859ad9566 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -123,9 +123,14 @@ Emacs."
123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
124(defun url-retrieve (url callback &optional cbargs) 124(defun url-retrieve (url callback &optional cbargs)
125 "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished. 125 "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished.
126The callback is called when the object has been completely retrieved, with 126URL is either a string or a parsed URL.
127
128CALLBACK is called when the object has been completely retrieved, with
127the current buffer containing the object, and any MIME headers associated 129the current buffer containing the object, and any MIME headers associated
128with it. URL is either a string or a parsed URL. 130with it. Normally it gets the arguments in the list CBARGS.
131However, if what we find is a redirect, CALLBACK is given
132two additional args, `:redirect' and the redirected URL,
133followed by CBARGS.
129 134
130Return the buffer URL will load into, or nil if the process has 135Return the buffer URL will load into, or nil if the process has
131already completed." 136already completed."
diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index fd7d1416661..89f30cf7232 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -356,7 +356,7 @@ disable the vcursor."
356 356
357(defun vcursor-bind-keys (var value) 357(defun vcursor-bind-keys (var value)
358 "Alter the value of the variable VAR to VALUE, binding keys as required. 358 "Alter the value of the variable VAR to VALUE, binding keys as required.
359VAR is usually vcursor-key-bindings. Normally this function is called 359VAR is usually `vcursor-key-bindings'. Normally this function is called
360on loading vcursor and from the customize package." 360on loading vcursor and from the customize package."
361 (set var value) 361 (set var value)
362 (cond 362 (cond
@@ -464,8 +464,8 @@ on loading vcursor and from the customize package."
464 464
465(defcustom vcursor-key-bindings nil 465(defcustom vcursor-key-bindings nil
466 "*How to bind keys when vcursor is loaded. 466 "*How to bind keys when vcursor is loaded.
467If t, guess; if xterm, use bindings suitable for an X terminal; if 467If t, guess; if `xterm', use bindings suitable for an X terminal; if
468oemacs, use bindings which work on a PC with Oemacs. If nil, don't 468`oemacs', use bindings which work on a PC with Oemacs. If nil, don't
469define any key bindings. 469define any key bindings.
470 470
471Default is nil." 471Default is nil."
@@ -514,7 +514,7 @@ scrolling set this. It is used by the `vcursor-auto-disable' code.")
514 514
515(defvar vcursor-use-vcursor-map nil 515(defvar vcursor-use-vcursor-map nil
516 "Non-nil if the vcursor map is mapped directly onto the main keymap. 516 "Non-nil if the vcursor map is mapped directly onto the main keymap.
517See vcursor-toggle-vcursor-map.") 517See `vcursor-toggle-vcursor-map'.")
518(make-variable-buffer-local 'vcursor-use-vcursor-map) 518(make-variable-buffer-local 'vcursor-use-vcursor-map)
519 519
520(defvar vcursor-map nil "Keymap for vcursor command.") 520(defvar vcursor-map nil "Keymap for vcursor command.")
@@ -575,7 +575,7 @@ With optional NOT-THIS non-nil never return the current window.
575 575
576With NEW-WIN non-nil, display the virtual cursor buffer in another 576With NEW-WIN non-nil, display the virtual cursor buffer in another
577window if the virtual cursor is not currently visible \(note, however, 577window if the virtual cursor is not currently visible \(note, however,
578that this function never changes window-point\). 578that this function never changes `window-point'\).
579 579
580With THIS-FRAME non-nil, don't search other frames for a new window 580With THIS-FRAME non-nil, don't search other frames for a new window
581\(though if the vcursor is already off-frame then its current window is 581\(though if the vcursor is already off-frame then its current window is
@@ -674,15 +674,15 @@ another window. With LEAVE-W, use the current `vcursor-window'."
674 (insert text)) 674 (insert text))
675 ) 675 )
676 676
677(defun vcursor-relative-move (fn &rest args) 677(defun vcursor-relative-move (func &rest args)
678 "Use FUNCTION with arbitrary ARG1 ... to move the virtual cursor. 678 "Call FUNC with arbitrary ARGS ... to move the virtual cursor.
679 679
680This is called by most of the virtual-cursor motion commands." 680This is called by most of the virtual-cursor motion commands."
681 (let (text opoint) 681 (let (text opoint)
682 (save-excursion 682 (save-excursion
683 (vcursor-locate) 683 (vcursor-locate)
684 (setq opoint (point)) 684 (setq opoint (point))
685 (apply fn args) 685 (apply func args)
686 (and (eq opoint (point-max)) (eq opoint (point)) 686 (and (eq opoint (point-max)) (eq opoint (point))
687 (signal 'end-of-buffer nil)) 687 (signal 'end-of-buffer nil))
688 (vcursor-move (point)) 688 (vcursor-move (point))
@@ -730,7 +730,7 @@ The vcursor will always appear in an unselected window."
730) 730)
731 731
732(defun vcursor-scroll-down (&optional n) 732(defun vcursor-scroll-down (&optional n)
733 "Scroll down the vcursor window ARG lines or near-full screen if none. 733 "Scroll down the vcursor window ARG lines or near full screen if none.
734The vcursor will always appear in an unselected window." 734The vcursor will always appear in an unselected window."
735 735
736 (interactive "P") 736 (interactive "P")
@@ -791,10 +791,10 @@ is visible in the current one."
791 (setq vcursor-last-command t) 791 (setq vcursor-last-command t)
792 ) 792 )
793 793
794(defun vcursor-get-char-count (fn &rest args) 794(defun vcursor-get-char-count (func &rest args)
795 "Apply FN to ARG1 ... and return the number of characters moved. 795 "Apply FUNC to ARGS ... and return the number of characters moved.
796Point is temporarily set to the virtual cursor position before FN is 796Point is temporarily set to the virtual cursor position before FUNC
797called. 797is called.
798 798
799This is called by most of the virtual-cursor copying commands to find 799This is called by most of the virtual-cursor copying commands to find
800out how much to copy." 800out how much to copy."
@@ -803,7 +803,7 @@ out how much to copy."
803 (save-excursion 803 (save-excursion
804 (set-buffer (overlay-buffer vcursor-overlay)) 804 (set-buffer (overlay-buffer vcursor-overlay))
805 (let ((start (goto-char (overlay-start vcursor-overlay)))) 805 (let ((start (goto-char (overlay-start vcursor-overlay))))
806 (- (progn (apply fn args) (point)) start))) 806 (- (progn (apply func args) (point)) start)))
807 ) 807 )
808 808
809;; Make sure the virtual cursor is active. Unless arg is non-nil, 809;; Make sure the virtual cursor is active. Unless arg is non-nil,
@@ -822,13 +822,12 @@ Next time you use it, it will start from point.
822 822
823With a positive prefix ARG, the first window in cyclic order 823With a positive prefix ARG, the first window in cyclic order
824displaying the virtual cursor (or which was recently displaying the 824displaying the virtual cursor (or which was recently displaying the
825virtual cursor) will be deleted unless it's the selected 825virtual cursor) will be deleted unless it's the selected window.
826window.
827 826
828With a negative prefix argument, enable the virtual cursor: make it 827With a negative prefix argument, enable the virtual cursor: make it
829active at the same point as the real cursor. 828active at the same point as the real cursor.
830 829
831Copying mode is always turned off: the next use of the vcursor will 830Copying mode is always turned off: the next use of the vcursor will
832not copy text until you turn it on again." 831not copy text until you turn it on again."
833 832
834 (interactive "P") 833 (interactive "P")
@@ -854,7 +853,7 @@ This is the next window cyclically after one currently showing the
854virtual cursor, or else after the current selected window. If there 853virtual cursor, or else after the current selected window. If there
855is no other window, the current window is split. 854is no other window, the current window is split.
856 855
857Arguments N and optional ALL-FRAMES are the same as with other-window. 856Arguments N and optional ALL-FRAMES are the same as with `other-window'.
858ALL-FRAMES is also used to decide whether to split the window." 857ALL-FRAMES is also used to decide whether to split the window."
859 858
860 (interactive "p") 859 (interactive "p")
@@ -1042,7 +1041,7 @@ ARG is as for `end-of-line'."
1042 1041
1043(defun vcursor-beginning-of-buffer (&optional arg) 1042(defun vcursor-beginning-of-buffer (&optional arg)
1044 "Move the virtual cursor to the beginning of its buffer. 1043 "Move the virtual cursor to the beginning of its buffer.
1045ARG is as for beginning-of-buffer." 1044ARG is as for `beginning-of-buffer'."
1046 (interactive "P") 1045 (interactive "P")
1047 (vcursor-relative-move 1046 (vcursor-relative-move
1048 (lambda (arg) 1047 (lambda (arg)
@@ -1053,7 +1052,7 @@ ARG is as for beginning-of-buffer."
1053 1052
1054(defun vcursor-end-of-buffer (&optional arg) 1053(defun vcursor-end-of-buffer (&optional arg)
1055 "Move the virtual cursor to the end of its buffer. 1054 "Move the virtual cursor to the end of its buffer.
1056ARG is as for end-of-buffer. 1055ARG is as for `end-of-buffer'.
1057 1056
1058Actually, the vcursor is moved to the second from last character or it 1057Actually, the vcursor is moved to the second from last character or it
1059would be invisible." 1058would be invisible."
diff --git a/lisp/version.el b/lisp/version.el
index eb073ee6d40..110317bff6c 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -47,7 +47,7 @@ Time at which Emacs was dumped out.")
47 47
48(defconst emacs-build-system (system-name)) 48(defconst emacs-build-system (system-name))
49 49
50(defun emacs-version (&optional here) "\ 50(defun emacs-version (&optional here) "\
51Return string describing the version of Emacs that is running. 51Return string describing the version of Emacs that is running.
52If optional argument HERE is non-nil, insert string at point. 52If optional argument HERE is non-nil, insert string at point.
53Don't use this function in programs to choose actions according 53Don't use this function in programs to choose actions according
@@ -83,7 +83,7 @@ to the system configuration; look at `system-configuration' instead."
83 83
84;; We put version info into the executable in the form that `ident' uses. 84;; We put version info into the executable in the form that `ident' uses.
85(or (memq system-type '(vax-vms windows-nt)) 85(or (memq system-type '(vax-vms windows-nt))
86 (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ? (emacs-version)) 86 (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version))
87 " $\n"))) 87 " $\n")))
88 88
89;;Local variables: 89;;Local variables:
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index 5b52849e2f4..9edcdb8c29e 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -1,6 +1,6 @@
1;;; w32-fns.el --- Lisp routines for Windows NT 1;;; w32-fns.el --- Lisp routines for Windows NT
2 2
3;; Copyright (C) 1994, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 2001, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Geoff Voelker <voelker@cs.washington.edu> 5;; Author: Geoff Voelker <voelker@cs.washington.edu>
6;; Keywords: internal 6;; Keywords: internal
@@ -60,7 +60,7 @@ That includes all Windows systems except for 9X/Me."
60 60
61(defun w32-shell-name () 61(defun w32-shell-name ()
62 "Return the name of the shell being used." 62 "Return the name of the shell being used."
63 (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name) 63 (or (bound-and-true-p explicit-shell-file-name)
64 (getenv "ESHELL") 64 (getenv "ESHELL")
65 (getenv "SHELL") 65 (getenv "SHELL")
66 (and (w32-using-nt) "cmd.exe") 66 (and (w32-using-nt) "cmd.exe")
@@ -272,7 +272,7 @@ shell requires it (see `w32-shell-dos-semantics')."
272(defun set-w32-system-coding-system (coding-system) 272(defun set-w32-system-coding-system (coding-system)
273 "Set the coding system used by the Windows system to CODING-SYSTEM. 273 "Set the coding system used by the Windows system to CODING-SYSTEM.
274This is used for things like passing font names with non-ASCII 274This is used for things like passing font names with non-ASCII
275characters in them to the system. For a list of possible values of 275characters in them to the system. For a list of possible values of
276CODING-SYSTEM, use \\[list-coding-systems]. 276CODING-SYSTEM, use \\[list-coding-systems].
277 277
278This function is provided for backward compatibility, since 278This function is provided for backward compatibility, since
@@ -355,8 +355,8 @@ This function is provided for backward compatibility, since
355Creates entries in `w32-charset-info-alist'. 355Creates entries in `w32-charset-info-alist'.
356XLFD-CHARSET is a string which will appear in the XLFD font name to 356XLFD-CHARSET is a string which will appear in the XLFD font name to
357identify the character set. WINDOWS-CHARSET is a symbol identifying 357identify the character set. WINDOWS-CHARSET is a symbol identifying
358the Windows character set this maps to. For the list of possible 358the Windows character set this maps to. For the list of possible
359values, see the documentation for `w32-charset-info-alist'. CODEPAGE 359values, see the documentation for `w32-charset-info-alist'. CODEPAGE
360can be a numeric codepage that Windows uses to display the character 360can be a numeric codepage that Windows uses to display the character
361set, t for Unicode output with no codepage translation or nil for 8 361set, t for Unicode output with no codepage translation or nil for 8
362bit output with no translation." 362bit output with no translation."
@@ -431,7 +431,7 @@ bit output with no translation."
431(defun x-select-text (text &optional push) 431(defun x-select-text (text &optional push)
432 "Make TEXT the last selected text. 432 "Make TEXT the last selected text.
433If `x-select-enable-clipboard' is non-nil, copy the text to the system 433If `x-select-enable-clipboard' is non-nil, copy the text to the system
434clipboard as well. Optional PUSH is ignored on Windows." 434clipboard as well. Optional PUSH is ignored on Windows."
435 (if x-select-enable-clipboard 435 (if x-select-enable-clipboard
436 (w32-set-clipboard-data text)) 436 (w32-set-clipboard-data text))
437 (setq x-last-selected-text text)) 437 (setq x-last-selected-text text))
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 6db1e2b2f3c..ac31a4d820b 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -150,33 +150,26 @@ visited by the buffers.")
150don't define it." 150don't define it."
151 `(defvar ,sym ,val ,doc)))) 151 `(defvar ,sym ,val ,doc))))
152 152
153(if (fboundp 'make-overlay) 153(defalias 'whitespace-make-overlay
154 (progn 154 (if (featurep 'xemacs) 'make-extent 'make-overlay))
155 (defalias 'whitespace-make-overlay 'make-overlay) 155(defalias 'whitespace-overlay-put
156 (defalias 'whitespace-overlay-put 'overlay-put) 156 (if (featurep 'xemacs) 'set-extent-property 'overlay-put))
157 (defalias 'whitespace-delete-overlay 'delete-overlay) 157(defalias 'whitespace-delete-overlay
158 (defalias 'whitespace-overlay-start 'overlay-start) 158 (if (featurep 'xemacs) 'delete-extent 'delete-overlay))
159 (defalias 'whitespace-overlay-end 'overlay-end) 159(defalias 'whitespace-overlay-start
160 (defalias 'whitespace-mode-line-update 'force-mode-line-update)) 160 (if (featurep 'xemacs) 'extent-start 'overlay-start))
161 (defalias 'whitespace-make-overlay 'make-extent) 161(defalias 'whitespace-overlay-end
162 (defalias 'whitespace-overlay-put 'set-extent-property) 162 (if (featurep 'xemacs) 'extent-end 'overlay-end))
163 (defalias 'whitespace-delete-overlay 'delete-extent) 163(defalias 'whitespace-mode-line-update
164 (defalias 'whitespace-overlay-start 'extent-start) 164 (if (featurep 'xemacs) 'redraw-modeline 'force-mode-line-update))
165 (defalias 'whitespace-overlay-end 'extent-end) 165
166 (defalias 'whitespace-mode-line-update 'redraw-modeline))
167
168(if (featurep 'xemacs)
169(defgroup whitespace nil
170 "Check for and fix five different types of whitespaces in source code."
171 ;; Since XEmacs doesn't have a 'convenience group, use the next best group
172 ;; which is 'editing?
173 :link '(emacs-commentary-link "whitespace.el")
174 :group 'editing)
175(defgroup whitespace nil 166(defgroup whitespace nil
176 "Check for and fix five different types of whitespaces in source code." 167 "Check for and fix five different types of whitespaces in source code."
177 :version "21.1" 168 :version "21.1"
178 :link '(emacs-commentary-link "whitespace.el") 169 :link '(emacs-commentary-link "whitespace.el")
179 :group 'convenience)) 170 ;; Since XEmacs doesn't have a 'convenience group, use the next best group
171 ;; which is 'editing?
172 :group (if (featurep 'xemacs) 'editing 'convenience))
180 173
181(defcustom whitespace-check-leading-whitespace t 174(defcustom whitespace-check-leading-whitespace t
182 "Flag to check leading whitespace. This is the global for the system. 175 "Flag to check leading whitespace. This is the global for the system.
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 3cab849ae74..372b068ceaf 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -275,7 +275,7 @@ minibuffer."
275 (while (not (or (and (>= char ?0) (< char next-digit)) 275 (while (not (or (and (>= char ?0) (< char next-digit))
276 (eq value 'keyboard-quit))) 276 (eq value 'keyboard-quit)))
277 ;; Unread a SPC to lead to our new menu. 277 ;; Unread a SPC to lead to our new menu.
278 (setq unread-command-events (cons ?\ unread-command-events)) 278 (setq unread-command-events (cons ?\s unread-command-events))
279 (setq keys (read-key-sequence title)) 279 (setq keys (read-key-sequence title))
280 (setq value 280 (setq value
281 (lookup-key overriding-terminal-local-map keys t) 281 (lookup-key overriding-terminal-local-map keys t)
@@ -377,7 +377,7 @@ new value.")
377 (end (widget-field-end field))) 377 (end (widget-field-end field)))
378 (when size 378 (when size
379 (while (and (> end begin) 379 (while (and (> end begin)
380 (eq (char-after (1- end)) ?\ )) 380 (eq (char-after (1- end)) ?\s))
381 (setq end (1- end)))) 381 (setq end (1- end))))
382 (while (< begin end) 382 (while (< begin end)
383 (let ((old (char-after begin))) 383 (let ((old (char-after begin)))
@@ -441,14 +441,8 @@ new value.")
441 (prog1 (progn ,@form) 441 (prog1 (progn ,@form)
442 (goto-char (point-max)))))) 442 (goto-char (point-max))))))
443 443
444(defface widget-inactive '((((class grayscale color) 444(defface widget-inactive
445 (background dark)) 445 '((t :inherit shadow))
446 (:foreground "light gray"))
447 (((class grayscale color)
448 (background light))
449 (:foreground "dim gray"))
450 (t
451 (:slant italic)))
452 "Face used for inactive widgets." 446 "Face used for inactive widgets."
453 :group 'widget-faces) 447 :group 'widget-faces)
454;; backward-compatibility alias 448;; backward-compatibility alias
@@ -802,8 +796,8 @@ The optional ARGS are additional keyword arguments."
802 &optional button-from button-to 796 &optional button-from button-to
803 &rest args) 797 &rest args)
804 "Return a widget of type TYPE with endpoint FROM TO. 798 "Return a widget of type TYPE with endpoint FROM TO.
805Optional ARGS are extra keyword arguments for TYPE. 799No text will be inserted to the buffer, instead the text between FROM
806and TO will be used as the widgets end points. If optional arguments 800and TO will be used as the widgets end points. If optional arguments
807BUTTON-FROM and BUTTON-TO are given, these will be used as the widgets 801BUTTON-FROM and BUTTON-TO are given, these will be used as the widgets
808button end points. 802button end points.
809Optional ARGS are extra keyword arguments for TYPE." 803Optional ARGS are extra keyword arguments for TYPE."
@@ -1111,7 +1105,7 @@ the field."
1111 :group 'widgets) 1105 :group 'widgets)
1112 1106
1113(defun widget-narrow-to-field () 1107(defun widget-narrow-to-field ()
1114 "Narrow to field" 1108 "Narrow to field."
1115 (interactive) 1109 (interactive)
1116 (let ((field (widget-field-find (point)))) 1110 (let ((field (widget-field-find (point))))
1117 (if field 1111 (if field
@@ -1219,7 +1213,7 @@ When not inside a field, move to the previous button or field."
1219 1213
1220(defun widget-field-find (pos) 1214(defun widget-field-find (pos)
1221 "Return the field at POS. 1215 "Return the field at POS.
1222Unlike (get-char-property POS 'field) this, works with empty fields too." 1216Unlike (get-char-property POS 'field), this works with empty fields too."
1223 (let ((fields widget-field-list) 1217 (let ((fields widget-field-list)
1224 field found) 1218 field found)
1225 (while fields 1219 (while fields
@@ -1269,7 +1263,7 @@ Unlike (get-char-property POS 'field) this, works with empty fields too."
1269 ;; Field too small. 1263 ;; Field too small.
1270 (save-excursion 1264 (save-excursion
1271 (goto-char end) 1265 (goto-char end)
1272 (insert-char ?\ (- (+ begin size) end)))) 1266 (insert-char ?\s (- (+ begin size) end))))
1273 ((> (- end begin) size) 1267 ((> (- end begin) size)
1274 ;; Field too large and 1268 ;; Field too large and
1275 (if (or (< (point) (+ begin size)) 1269 (if (or (< (point) (+ begin size))
@@ -1280,7 +1274,7 @@ Unlike (get-char-property POS 'field) this, works with empty fields too."
1280 (setq begin (point))) 1274 (setq begin (point)))
1281 (save-excursion 1275 (save-excursion
1282 (goto-char end) 1276 (goto-char end)
1283 (while (and (eq (preceding-char) ?\ ) 1277 (while (and (eq (preceding-char) ?\s)
1284 (> (point) begin)) 1278 (> (point) begin))
1285 (delete-backward-char 1))))))) 1279 (delete-backward-char 1)))))))
1286 (widget-specify-secret field)) 1280 (widget-specify-secret field))
@@ -1440,7 +1434,7 @@ If that does not exists, call the value of `widget-complete-field'."
1440 ((eq escape ?n) 1434 ((eq escape ?n)
1441 (when (widget-get widget :indent) 1435 (when (widget-get widget :indent)
1442 (insert ?\n) 1436 (insert ?\n)
1443 (insert-char ? (widget-get widget :indent)))) 1437 (insert-char ?\s (widget-get widget :indent))))
1444 ((eq escape ?t) 1438 ((eq escape ?t)
1445 (let ((image (widget-get widget :tag-glyph)) 1439 (let ((image (widget-get widget :tag-glyph))
1446 (tag (widget-get widget :tag))) 1440 (tag (widget-get widget :tag)))
@@ -1504,7 +1498,7 @@ If that does not exists, call the value of `widget-complete-field'."
1504 (when doc-text 1498 (when doc-text
1505 (and (eq (preceding-char) ?\n) 1499 (and (eq (preceding-char) ?\n)
1506 (widget-get widget :indent) 1500 (widget-get widget :indent)
1507 (insert-char ? (widget-get widget :indent))) 1501 (insert-char ?\s (widget-get widget :indent)))
1508 ;; The `*' in the beginning is redundant. 1502 ;; The `*' in the beginning is redundant.
1509 (when (eq (aref doc-text 0) ?*) 1503 (when (eq (aref doc-text 0) ?*)
1510 (setq doc-text (substring doc-text 1))) 1504 (setq doc-text (substring doc-text 1)))
@@ -1757,7 +1751,7 @@ If END is omitted, it defaults to the length of LIST."
1757 :action 'widget-url-link-action) 1751 :action 'widget-url-link-action)
1758 1752
1759(defun widget-url-link-action (widget &optional event) 1753(defun widget-url-link-action (widget &optional event)
1760 "Open the url specified by WIDGET." 1754 "Open the URL specified by WIDGET."
1761 (browse-url (widget-value widget))) 1755 (browse-url (widget-value widget)))
1762 1756
1763;;; The `function-link' Widget. 1757;;; The `function-link' Widget.
@@ -1797,7 +1791,7 @@ If END is omitted, it defaults to the length of LIST."
1797 :action 'widget-emacs-library-link-action) 1791 :action 'widget-emacs-library-link-action)
1798 1792
1799(defun widget-emacs-library-link-action (widget &optional event) 1793(defun widget-emacs-library-link-action (widget &optional event)
1800 "Find the Emacs Library file specified by WIDGET." 1794 "Find the Emacs library file specified by WIDGET."
1801 (find-file (locate-library (widget-value widget)))) 1795 (find-file (locate-library (widget-value widget))))
1802 1796
1803;;; The `emacs-commentary-link' Widget. 1797;;; The `emacs-commentary-link' Widget.
@@ -1878,7 +1872,7 @@ the earlier input."
1878 (insert value) 1872 (insert value)
1879 (and size 1873 (and size
1880 (< (length value) size) 1874 (< (length value) size)
1881 (insert-char ?\ (- size (length value)))) 1875 (insert-char ?\s (- size (length value))))
1882 (unless (memq widget widget-field-list) 1876 (unless (memq widget widget-field-list)
1883 (setq widget-field-new (cons widget widget-field-new))) 1877 (setq widget-field-new (cons widget widget-field-new)))
1884 (move-marker (cdr overlay) (point)) 1878 (move-marker (cdr overlay) (point))
@@ -1911,7 +1905,7 @@ the earlier input."
1911 (while (and size 1905 (while (and size
1912 (not (zerop size)) 1906 (not (zerop size))
1913 (> to from) 1907 (> to from)
1914 (eq (char-after (1- to)) ?\ )) 1908 (eq (char-after (1- to)) ?\s))
1915 (setq to (1- to))) 1909 (setq to (1- to)))
1916 (let ((result (buffer-substring-no-properties from to))) 1910 (let ((result (buffer-substring-no-properties from to)))
1917 (when secret 1911 (when secret
@@ -2192,7 +2186,7 @@ when he invoked the menu."
2192If the item is checked, CHOSEN is a cons whose cdr is the value." 2186If the item is checked, CHOSEN is a cons whose cdr is the value."
2193 (and (eq (preceding-char) ?\n) 2187 (and (eq (preceding-char) ?\n)
2194 (widget-get widget :indent) 2188 (widget-get widget :indent)
2195 (insert-char ? (widget-get widget :indent))) 2189 (insert-char ?\s (widget-get widget :indent)))
2196 (widget-specify-insert 2190 (widget-specify-insert
2197 (let* ((children (widget-get widget :children)) 2191 (let* ((children (widget-get widget :children))
2198 (buttons (widget-get widget :buttons)) 2192 (buttons (widget-get widget :buttons))
@@ -2372,7 +2366,7 @@ Return an alist of (TYPE MATCH)."
2372 ;; (setq type (widget-convert type)) 2366 ;; (setq type (widget-convert type))
2373 (and (eq (preceding-char) ?\n) 2367 (and (eq (preceding-char) ?\n)
2374 (widget-get widget :indent) 2368 (widget-get widget :indent)
2375 (insert-char ? (widget-get widget :indent))) 2369 (insert-char ?\s (widget-get widget :indent)))
2376 (widget-specify-insert 2370 (widget-specify-insert
2377 (let* ((value (widget-get widget :value)) 2371 (let* ((value (widget-get widget :value))
2378 (children (widget-get widget :children)) 2372 (children (widget-get widget :children))
@@ -2550,7 +2544,7 @@ Return an alist of (TYPE MATCH)."
2550 ;; (let ((widget-push-button-gui widget-editable-list-gui)) 2544 ;; (let ((widget-push-button-gui widget-editable-list-gui))
2551 (cond ((eq escape ?i) 2545 (cond ((eq escape ?i)
2552 (and (widget-get widget :indent) 2546 (and (widget-get widget :indent)
2553 (insert-char ?\ (widget-get widget :indent))) 2547 (insert-char ?\s (widget-get widget :indent)))
2554 (apply 'widget-create-child-and-convert 2548 (apply 'widget-create-child-and-convert
2555 widget 'insert-button 2549 widget 'insert-button
2556 (widget-get widget :append-button-args))) 2550 (widget-get widget :append-button-args)))
@@ -2662,7 +2656,7 @@ Return an alist of (TYPE MATCH)."
2662 (widget-specify-insert 2656 (widget-specify-insert
2663 (save-excursion 2657 (save-excursion
2664 (and (widget-get widget :indent) 2658 (and (widget-get widget :indent)
2665 (insert-char ?\ (widget-get widget :indent))) 2659 (insert-char ?\s (widget-get widget :indent)))
2666 (insert (widget-get widget :entry-format))) 2660 (insert (widget-get widget :entry-format)))
2667 ;; Parse % escapes in format. 2661 ;; Parse % escapes in format.
2668 (while (re-search-forward "%\\(.\\)" nil t) 2662 (while (re-search-forward "%\\(.\\)" nil t)
@@ -2726,7 +2720,7 @@ Return an alist of (TYPE MATCH)."
2726 value (cdr answer)) 2720 value (cdr answer))
2727 (and (eq (preceding-char) ?\n) 2721 (and (eq (preceding-char) ?\n)
2728 (widget-get widget :indent) 2722 (widget-get widget :indent)
2729 (insert-char ?\ (widget-get widget :indent))) 2723 (insert-char ?\s (widget-get widget :indent)))
2730 (push (cond ((null answer) 2724 (push (cond ((null answer)
2731 (widget-create-child widget arg)) 2725 (widget-create-child widget arg))
2732 ((widget-get arg :inline) 2726 ((widget-get arg :inline)
@@ -2865,7 +2859,7 @@ link for that string."
2865 (narrow-to-region from to) 2859 (narrow-to-region from to)
2866 (goto-char (point-min)) 2860 (goto-char (point-min))
2867 (while (search-forward "\n" nil t) 2861 (while (search-forward "\n" nil t)
2868 (insert-char ?\ indent))))))) 2862 (insert-char ?\s indent)))))))
2869 2863
2870;;; The `documentation-string' Widget. 2864;;; The `documentation-string' Widget.
2871 2865
@@ -2885,7 +2879,7 @@ link for that string."
2885 (let ((before (substring doc 0 (match-beginning 0))) 2879 (let ((before (substring doc 0 (match-beginning 0)))
2886 (after (substring doc (match-beginning 0))) 2880 (after (substring doc (match-beginning 0)))
2887 button) 2881 button)
2888 (insert before ?\ ) 2882 (insert before ?\s)
2889 (widget-documentation-link-add widget start (point)) 2883 (widget-documentation-link-add widget start (point))
2890 (setq button 2884 (setq button
2891 (widget-create-child-and-convert 2885 (widget-create-child-and-convert
@@ -2899,7 +2893,7 @@ link for that string."
2899 (when shown 2893 (when shown
2900 (setq start (point)) 2894 (setq start (point))
2901 (when (and indent (not (zerop indent))) 2895 (when (and indent (not (zerop indent)))
2902 (insert-char ?\ indent)) 2896 (insert-char ?\s indent))
2903 (insert after) 2897 (insert after)
2904 (widget-documentation-link-add widget start (point))) 2898 (widget-documentation-link-add widget start (point)))
2905 (widget-put widget :buttons (list button))) 2899 (widget-put widget :buttons (list button)))
@@ -3634,7 +3628,7 @@ example:
3634 (widget-apply widget :notify widget event)))) 3628 (widget-apply widget :notify widget event))))
3635 3629
3636(defun widget-color-notify (widget child &optional event) 3630(defun widget-color-notify (widget child &optional event)
3637 "Update the sample, and notofy the parent." 3631 "Update the sample, and notify the parent."
3638 (overlay-put (widget-get widget :sample-overlay) 3632 (overlay-put (widget-get widget :sample-overlay)
3639 'face (widget-apply widget :sample-face-get)) 3633 'face (widget-apply widget :sample-face-get))
3640 (widget-default-notify widget child event)) 3634 (widget-default-notify widget child event))