aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKenichi Handa2012-09-22 11:26:05 +0900
committerKenichi Handa2012-09-22 11:26:05 +0900
commitfa42927fd0ed023ec95a5475ce342429fd8a348d (patch)
tree5f37f88faa47b36dc85d19aedf89f483dc458358 /lisp
parent3cccbd87267735609a21df50b80b3aad07004555 (diff)
parent58f3a196fcd6c2f8b65e6b6cf1bc377d1a6287aa (diff)
downloademacs-fa42927fd0ed023ec95a5475ce342429fd8a348d.tar.gz
emacs-fa42927fd0ed023ec95a5475ce342429fd8a348d.zip
merge trunk
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog295
-rw-r--r--lisp/align.el7
-rw-r--r--lisp/autoinsert.el2
-rw-r--r--lisp/bookmark.el5
-rw-r--r--lisp/calc/calc-aent.el3
-rw-r--r--lisp/calc/calc-ext.el2
-rw-r--r--lisp/calc/calc-forms.el2
-rw-r--r--lisp/calc/calc-map.el20
-rw-r--r--lisp/calc/calc-store.el3
-rw-r--r--lisp/calc/calc.el45
-rw-r--r--lisp/calendar/calendar.el75
-rw-r--r--lisp/calendar/diary-lib.el24
-rw-r--r--lisp/calendar/holidays.el6
-rw-r--r--lisp/calendar/lunar.el2
-rw-r--r--lisp/calendar/solar.el2
-rw-r--r--lisp/calendar/timeclock.el4
-rw-r--r--lisp/comint.el6
-rw-r--r--lisp/cus-edit.el5
-rw-r--r--lisp/custom.el112
-rw-r--r--lisp/desktop.el2
-rw-r--r--lisp/dired-aux.el101
-rw-r--r--lisp/dired.el62
-rw-r--r--lisp/doc-view.el123
-rw-r--r--lisp/emacs-lisp/byte-run.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el16
-rw-r--r--lisp/emacs-lisp/cl-lib.el2
-rw-r--r--lisp/emacs-lisp/debug.el10
-rw-r--r--lisp/emacs-lisp/macroexp.el57
-rw-r--r--lisp/emacs-lisp/shadow.el8
-rw-r--r--lisp/emulation/edt-mapper.el4
-rw-r--r--lisp/emulation/edt.el10
-rw-r--r--lisp/emulation/tpu-edt.el6
-rw-r--r--lisp/emulation/tpu-extras.el2
-rw-r--r--lisp/emulation/tpu-mapper.el2
-rw-r--r--lisp/emulation/vi.el2
-rw-r--r--lisp/emulation/viper.el4
-rw-r--r--lisp/epa-mail.el38
-rw-r--r--lisp/erc/ChangeLog6
-rw-r--r--lisp/erc/erc-button.el2
-rw-r--r--lisp/erc/erc-capab.el2
-rw-r--r--lisp/erc/erc-match.el2
-rw-r--r--lisp/erc/erc-netsplit.el2
-rw-r--r--lisp/erc/erc-page.el2
-rw-r--r--lisp/erc/erc-replace.el2
-rw-r--r--lisp/erc/erc-stamp.el2
-rw-r--r--lisp/erc/erc-track.el2
-rw-r--r--lisp/eshell/em-alias.el8
-rw-r--r--lisp/eshell/esh-util.el2
-rw-r--r--lisp/ffap.el4
-rw-r--r--lisp/filesets.el2
-rw-r--r--lisp/flow-ctrl.el2
-rw-r--r--lisp/font-lock.el2
-rw-r--r--lisp/frame.el2
-rw-r--r--lisp/generic-x.el2
-rw-r--r--lisp/gnus/ChangeLog11
-rw-r--r--lisp/gnus/message.el8
-rw-r--r--lisp/gnus/mml.el68
-rw-r--r--lisp/hi-lock.el6
-rw-r--r--lisp/ibuffer.el12
-rw-r--r--lisp/ido.el23
-rw-r--r--lisp/ielm.el2
-rw-r--r--lisp/international/ogonek.el7
-rw-r--r--lisp/isearch.el4
-rw-r--r--lisp/locate.el2
-rw-r--r--lisp/mail/emacsbug.el11
-rw-r--r--lisp/mail/feedmail.el5
-rw-r--r--lisp/mail/mail-hist.el2
-rw-r--r--lisp/mail/mailabbrev.el47
-rw-r--r--lisp/mail/rmail.el11
-rw-r--r--lisp/mail/rmailedit.el2
-rw-r--r--lisp/mail/rmailmm.el35
-rw-r--r--lisp/mail/uce.el2
-rw-r--r--lisp/mouse-copy.el2
-rw-r--r--lisp/mouse-drag.el2
-rw-r--r--lisp/net/ange-ftp.el14
-rw-r--r--lisp/net/browse-url.el3
-rw-r--r--lisp/net/goto-addr.el2
-rw-r--r--lisp/net/newsticker.el2
-rw-r--r--lisp/net/quickurl.el2
-rw-r--r--lisp/net/tramp-cmds.el2
-rw-r--r--lisp/net/webjump.el2
-rw-r--r--lisp/novice.el4
-rw-r--r--lisp/pcmpl-gnu.el3
-rw-r--r--lisp/pcomplete.el9
-rw-r--r--lisp/play/bubbles.el2
-rw-r--r--lisp/play/decipher.el14
-rw-r--r--lisp/play/handwrite.el2
-rw-r--r--lisp/printing.el10
-rw-r--r--lisp/progmodes/antlr-mode.el2
-rw-r--r--lisp/progmodes/cc-styles.el4
-rw-r--r--lisp/progmodes/cmacexp.el2
-rw-r--r--lisp/progmodes/compile.el51
-rw-r--r--lisp/progmodes/ebnf2ps.el4
-rw-r--r--lisp/progmodes/f90.el5
-rw-r--r--lisp/progmodes/grep.el4
-rw-r--r--lisp/progmodes/hideshow.el2
-rw-r--r--lisp/progmodes/idlw-complete-structtag.el4
-rw-r--r--lisp/progmodes/idlw-shell.el8
-rw-r--r--lisp/progmodes/idlwave.el4
-rw-r--r--lisp/progmodes/inf-lisp.el4
-rw-r--r--lisp/progmodes/mixal-mode.el2
-rw-r--r--lisp/progmodes/octave-mod.el4
-rw-r--r--lisp/progmodes/perl-mode.el4
-rw-r--r--lisp/progmodes/prolog.el4
-rw-r--r--lisp/progmodes/ruby-mode.el44
-rw-r--r--lisp/progmodes/sql.el15
-rw-r--r--lisp/progmodes/verilog-mode.el4
-rw-r--r--lisp/ps-print.el2
-rw-r--r--lisp/replace.el96
-rw-r--r--lisp/saveplace.el12
-rw-r--r--lisp/shell.el36
-rw-r--r--lisp/speedbar.el2
-rw-r--r--lisp/startup.el31
-rw-r--r--lisp/strokes.el9
-rw-r--r--lisp/subr.el4
-rw-r--r--lisp/term/iris-ansi.el2
-rw-r--r--lisp/term/lk201.el2
-rw-r--r--lisp/term/rxvt.el2
-rw-r--r--lisp/term/tvi970.el2
-rw-r--r--lisp/term/wyse50.el2
-rw-r--r--lisp/term/xterm.el2
-rw-r--r--lisp/textmodes/flyspell.el6
-rw-r--r--lisp/textmodes/ispell.el5
-rw-r--r--lisp/textmodes/reftex.el4
-rw-r--r--lisp/textmodes/rst.el538
-rw-r--r--lisp/textmodes/sgml-mode.el2
-rw-r--r--lisp/textmodes/table.el10
-rw-r--r--lisp/textmodes/two-column.el5
-rw-r--r--lisp/time-stamp.el4
-rw-r--r--lisp/url/url-methods.el2
-rw-r--r--lisp/vc/diff.el3
-rw-r--r--lisp/vc/pcvs-defs.el4
-rw-r--r--lisp/vc/vc-git.el2
-rw-r--r--lisp/windmove.el2
134 files changed, 1529 insertions, 883 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b444761e55c..e6fa549e867 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,13 +1,302 @@
12012-09-21 Leo Liu <sdl.web@gmail.com>
2
3 IDO: Disable match re-ordering for buffer switching.
4 * ido.el (ido-buffer-disable-smart-matches): New variable.
5 (ido-set-matches-1): Use it. (Bug#2042)
6
72012-09-21 Jose Marino <marinoj@nso.edu> (tiny change)
8
9 * progmodes/idlw-shell.el (idlwave-shell-complete-filename):
10 Fix 2011-05-17 change. (Bug#12418)
11
122012-09-21 Leo Liu <sdl.web@gmail.com>
13
14 * subr.el (ignore-errors): Mention with-demoted-errors in doc-string.
15
162012-09-21 Glenn Morris <rgm@gnu.org>
17
18 * emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords):
19 Be more robust about locating simple.el.
20
212012-09-21 Glenn Morris <rgm@gnu.org>
22
23 * mail/emacsbug.el (report-emacs-bug): Trap load-path-shadows errors.
24
252012-09-21 Joel Bion <jpbion@westvi.com> (tiny change)
26
27 * pcmpl-gnu.el (pcmpl-gnu-tarfile-regexp): Add tar.xz. (Bug#12382)
28
292012-09-20 Juri Linkov <juri@jurta.org>
30
31 * replace.el (query-replace-read-from): Use `read-regexp' instead
32 of `read-from-minibuffer' when `regexp-flag' is non-nil.
33 (occur-read-primary-args): Use `read-regexp' instead of
34 `read-string'.
35 (multi-occur-in-matching-buffers): Use `read-regexp' instead of
36 `read-from-minibuffer'.
37 * isearch.el (isearch-occur): Use `read-regexp' instead of
38 `read-string'.
39 * dired.el (dired-read-regexp): Use `read-regexp' instead of
40 `read-from-minibuffer'.
41 * progmodes/grep.el (grep-read-regexp): Use `read-regexp' instead
42 of `read-string'. (Bug#7567)
43
44 * replace.el (read-regexp): Rename DEFAULT-VALUE arg to DEFAULTS
45 and allow accepting a list of strings prepended to a list of
46 standard default values. Doc fix. (Bug#12321)
47
48 * replace.el (read-regexp): Add HISTORY arg. (Bug#7567)
49
50 * replace.el (read-regexp): Don't add ": " when PROMPT already
51 ends with a colon and space. (Bug#12321)
52
532012-09-20 Tassilo Horn <tsdh@gnu.org>
54
55 * doc-view.el (doc-view-display): Better fix for the cl-assertion
56 error.
57
582012-09-20 Stefan Merten <smerten@oekonux.de>
59
60 * rst.el: Integrate support for `imenu' and `which-function'.
61 Fixes feature request bug#11711.
62 (rst-mode): Create `imenu-create-index-function'.
63 (rst-get-stripped-line): Delete after refactoring.
64 (rst-section-tree, rst-section-tree-rec)
65 (rst-section-tree-point): Refactor and document properly.
66 (rst-imenu-find-adornments-for-position)
67 (rst-imenu-convert-cell, rst-imenu-create-index): New
68 function.
69
702012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
71
72 * emacs-lisp/macroexp.el (macroexp--obsolete-warning): New function.
73 (macroexp--expand-all): Use it.
74 (macroexp--funcall-and-return): Remove by folding it into its sole
75 caller (macroexp--warn-and-return).
76 * emacs-lisp/bytecomp.el (byte-compile-warn-obsolete):
77 Use macroexp--obsolete-warning.
78
79 * calc/calc.el: Fix last change by removing the whole chunk, since it
80 was only needed back when Calc was not bundled.
81
822012-09-20 Martin Rudalics <rudalics@gmx.at>
83
84 * emacs-lisp/debug.el (debug): Restore assignment to
85 debugger-old-buffer removed on 2012-09-08.
86
872012-09-20 Juri Linkov <juri@jurta.org>
88
89 * dired-aux.el (dired-diff): Remove (require 'diff) since
90 `diff-latest-backup-file' is now autoloaded.
91
922012-09-20 Chong Yidong <cyd@gnu.org>
93
94 * vc/diff.el (diff-latest-backup-file): Autoload.
95
962012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
97
98 * calc/calc.el: Remove redundant autoload shape check.
99 (sel-mode): Don't defvar.
100 (calc-get-stack-element): Add `sel-mode' arg instead.
101 (calc-top, calc-top-list): Pass it this additional argument.
102 * calc/calc-store.el (calc-store-map):
103 * calc/calc-map.el (calc-apply, calc-reduce, calc-map)
104 (calc-map-equation, calc-outer-product, calc-inner-product):
105 * calc/calc-aent.el (calc-alg-entry): Don't bind sel-mode.
106
107 * emacs-lisp/macroexp.el (macroexp--expand-all): Fix last change.
108
1092012-09-19 Juri Linkov <juri@jurta.org>
110
111 * dired-aux.el (dired-diff): Add (require 'diff) because
112 `diff-latest-backup-file' is not autoloaded.
113 (dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg
114 of `dired-get-filename' to t to not report error when there is
115 no default file on the current line.
116
1172012-09-19 Stefan Monnier <monnier@iro.umontreal.ca>
118
119 * emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from
120 macroexp--eval-if-compile.
121 (macroexp--funcall-and-return, macroexp--warn-and-return): New funs.
122 (macroexp--expand-all): Use them (bug#12371).
123
124 * doc-view.el (doc-view-guess-paper-size)
125 (doc-view-scale-bounding-box): Fix unbound `caddr'.
126
1272012-09-19 Tassilo Horn <tsdh@gnu.org>
128
129 New feature: set optimal slice from BoundingBox information.
130 * doc-view.el (doc-view-mode-map): Add keybinding.
131 (doc-view-menu): Add menu entry.
132 (doc-view-set-slice): Adapt docstring.
133 (doc-view-get-bounding-box, doc-view-guess-paper-size)
134 (doc-view-scale-bounding-box)
135 (doc-view-set-slice-from-bounding-box): New functions.
136 (doc-view-paper-sizes): New defvar.
137
1382012-09-19 Glenn Morris <rgm@gnu.org>
139
140 * emacs-lisp/macroexp.el (byte-compile-warn-obsolete)
141 (byte-compile-log-warning): Autoload. (Bug#12371)
142
143 * calendar/calendar.el (calendar-american-month-header)
144 (calendar-european-month-header, calendar-iso-month-header)
145 (calendar-month-header): New options.
146 (calendar-set-date-style): Set calendar-month-header. Redraw calendar.
147 (calendar-generate-month): Use calendar-month-header. (Bug#9510)
148
1492012-09-19 Jan Djärv <jan.h.d@swipnet.se>
150
151 * startup.el (command-line-ns-option-alist): Add -g and --geometry.
152
1532012-09-18 Juri Linkov <juri@jurta.org>
154
155 * dired-aux.el (dired-diff): Restore original functionality of
156 getting the default value, but keep new feature of using the
157 latest existing backup file (`diff-latest-backup-file').
158
1592012-09-18 Juri Linkov <juri@jurta.org>
160
161 * dired.el (dired-mark): If the region is active in Transient Mark
162 mode, mark all files in the active region. Doc fix.
163 (dired-unmark, dired-flag-file-deletion, dired-unmark-backward):
164 Doc fix. (Bug#10624)
165
1662012-09-18 Juri Linkov <juri@jurta.org>
167
168 * dired-aux.el (dired-do-chxxx, dired-do-chmod): Default file
169 attributes for M-n are pulled from the file at point.
170 (dired-do-chgrp, dired-do-chown, dired-do-touch): Doc fix.
171 Suggested by Drew Adams. (Bug#10624)
172
1732012-09-18 Dmitry Gutov <dgutov@yandex.ru>
174
175 * progmodes/ruby-mode.el (ruby-brace-to-do-end): Don't add extra
176 whitespace after "end".
177 (ruby-do-end-to-brace): Collapse block to one line if it fits
178 within fill-column.
179
1802012-09-18 Martin Rudalics <rudalics@gmx.at>
181
182 * emacs-lisp/debug.el (debugger-bury-or-kill): Fix customization
183 value.
184 (debug): Don't remove debugger window when debugger is expected
185 to be back.
186
1872012-09-18 Chong Yidong <cyd@gnu.org>
188
189 * custom.el (defface): Doc fix.
190
191 * cus-edit.el (custom-unlispify-remove-prefixes): Add warning.
192
1932012-09-18 Martin Blais <blais@furius.ca> (tiny change)
194
195 * progmodes/compile.el (compilation-start): Use compilation-always-kill
196 to initialize query-on-exit; then test that instead (bug#12288).
197
1982012-09-17 Stefan Merten <smerten@oekonux.de>
199
200 * rst.el: Add support for `testcover'.
201 (rst-defcustom-testcover, rst-testcover-add-compose)
202 (rst-testcover-add-1value): New functions.
203 (rst-portable-mark-active-p): Replace by `use-region-p'.
204 (rst-update-section, rst-classify-adornment)
205 (rst-find-title-line): Mark `1value' forms.
206 (rst-classify-adornment): Remove superfluous form.
207 (rst-update-section, rst-get-adornments-around)
208 (rst-adornment-complete-p, rst-get-next-adornment)
209 (rst-adjust, rst-promote-region)
210 (rst-display-adornments-hierarchy, rst-straighten-adornments)
211 (rst-find-pfx-in-region, rst-section-tree-rec)
212 (rst-section-tree-point, rst-toc-insert, rst-toc-insert-node)
213 (rst-toc-node, rst-toc, rst-forward-section)
214 (rst-iterate-leftmost-paragraphs)
215 (rst-iterate-leftmost-paragraphs-2, rst-enumerate-region)
216 (rst-bullet-list-region)
217 (rst-convert-bullets-to-enumeration, rst-font-lock-keywords)
218 (rst-compile-find-conf, rst-compile)
219 (rst-repeat-last-character): Fix style.
220
2212012-09-17 Chong Yidong <cyd@gnu.org>
222
223 * comint.el (comint--complete-file-name-data): Don't add a space
224 if the status is `sole'; that adds a gratuitous space in the
225 completion-cycling case (Bug#12092).
226
227 * pcomplete.el (pcomplete-completions-at-point): Likewise.
228
2292012-09-17 Richard Stallman <rms@gnu.org>
230
231 * mail/rmailmm.el (rmail-mime-toggle-raw): Do rmail-mime-insert
232 only in the mime-shown mode, not in raw mode.
233 (rmail-mime): Toggle off mime by displaying the message without
234 mime processing. (Bug#12305)
235
236 * mail/rmail.el (rmail-retry-failure):
237 Turn off mime processing first. (Bug#12037)
238
239 * epa-mail.el (epa-mail-encrypt): Fix bug when a name has no key.
240
2412012-09-17 Chong Yidong <cyd@gnu.org>
242
243 * shell.el (shell-file-name-chars, shell-file-name-quote-list)
244 (shell-dynamic-complete-functions): Convert to defcustom.
245 (shell-prompt-pattern, shell-completion-fignore): Doc fix.
246
247 * bookmark.el (bookmark-bmenu-toggle-filenames): Doc fixes.
248 * comint.el (comint-prompt-read-only):
249 * custom.el (defcustom):
250 * hi-lock.el (hi-lock-mode):
251 * ibuffer.el (ibuffer-formats):
252 * ielm.el (ielm-prompt-read-only):
253 * novice.el (disable-command):
254 * saveplace.el (toggle-save-place):
255 * speedbar.el (speedbar-supported-extension-expressions):
256 * startup.el (auto-save-list-file-prefix, init-file-user)
257 (after-init-hook, inhibit-startup-echo-area-message):
258 * strokes.el (strokes-help):
259 * time-stamp.el (time-stamp):
260 * calendar/calendar.el (calendar, diary-file):
261 * calendar/diary-lib.el (diary-mail-entries, diary)
262 (diary-list-entries-hook):
263 * calendar/holidays.el (holidays, calendar-holidays):
264 * calendar/lunar.el (lunar-phases):
265 * calendar/solar.el (sunrise-sunset):
266 * emulation/edt.el (edt-load-keys):
267 * emulation/viper.el (viper-mode):
268 * eshell/em-alias.el (eshell-command-aliases-list):
269 * eshell/esh-util.el (eshell-convert-numeric-arguments):
270 * international/ogonek.el (ogonek-information):
271 * net/tramp-cmds.el (tramp-bug):
272 * net/quickurl.el (quickurl-reread-hook-postfix):
273 * play/decipher.el (decipher-font-lock-keywords):
274 * progmodes/cc-styles.el (c-set-style):
275 * progmodes/idlw-shell.el (idlwave-shell-prompt-pattern):
276 * progmodes/inf-lisp.el (inferior-lisp-prompt):
277 * progmodes/octave-mod.el (octave-mode):
278 * progmodes/sql.el (sql-mode, sql-interactive-mode, sql-password):
279 * progmodes/verilog-mode.el (verilog-read-defines):
280 * textmodes/two-column.el (2C-mode): Likewise.
281
2822012-09-16 Katsumi Yamaoka <yamaoka@jpl.org>
283
284 * mail/mailabbrev.el (mail-abbrev-expand-hook): Work for a mail aliasee
285 that holds many addresses.
286
12012-09-16 Chong Yidong <cyd@gnu.org> 2872012-09-16 Chong Yidong <cyd@gnu.org>
2 288
289 * align.el (align-areas): Call the indication function with
290 positions instead of markers for arguments (Bug#12343).
291
3 * files.el (parse-colon-path): Use split-string (Bug#12351). 292 * files.el (parse-colon-path): Use split-string (Bug#12351).
4 293
5 * window.el (special-display-popup-frame): Doc fix (Bug#8853). 294 * window.el (special-display-popup-frame): Doc fix (Bug#8853).
6 (display-buffer-function): Mark as obsolete. 295 (display-buffer-function): Mark as obsolete.
7 296
8 * progmodes/compile.el (compilation-parse-errors): Accept list 297 * progmodes/compile.el (compilation-parse-errors): Accept list
9 values similar to font-lock-keywords (Bug#12136). Suggested by 298 values similar to font-lock-keywords (Bug#12136).
10 Oleksandr Manzyuk. 299 Suggested by Oleksandr Manzyuk.
11 (compilation-error-regexp-alist): Doc fix. 300 (compilation-error-regexp-alist): Doc fix.
12 301
132012-09-15 Glenn Morris <rgm@gnu.org> 3022012-09-15 Glenn Morris <rgm@gnu.org>
@@ -1610,7 +1899,7 @@
1610 :local as the address. 1899 :local as the address.
1611 (list-processes): Doc fix. 1900 (list-processes): Doc fix.
1612 1901
16132012-08-04 Michal Nazarewicz <mina86@mina86.com> (tiny change) 19022012-08-04 Michal Nazarewicz <mina86@mina86.com>
1614 1903
1615 * lisp/mpc.el: Support password in host argument. 1904 * lisp/mpc.el: Support password in host argument.
1616 (mpc--proc-connect): Parse and use new password element. 1905 (mpc--proc-connect): Parse and use new password element.
diff --git a/lisp/align.el b/lisp/align.el
index 4c82d7bea81..0af5e56c668 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -74,7 +74,7 @@
74;; align-?-modes variables (for example, `align-dq-string-modes'), use 74;; align-?-modes variables (for example, `align-dq-string-modes'), use
75;; `add-to-list', or some similar function which checks first to see 75;; `add-to-list', or some similar function which checks first to see
76;; if the value is already there. Since the user may customize that 76;; if the value is already there. Since the user may customize that
77;; mode list, and then write your mode name into their .emacs file, 77;; mode list, and then write your mode name into their init file,
78;; causing the symbol already to be present the next time they load 78;; causing the symbol already to be present the next time they load
79;; your package. 79;; your package.
80 80
@@ -1201,7 +1201,10 @@ have been aligned. No changes will be made to the buffer."
1201 (gocol col) cur) 1201 (gocol col) cur)
1202 (when area 1202 (when area
1203 (if func 1203 (if func
1204 (funcall func (car area) (cdr area) change) 1204 (funcall func
1205 (marker-position (car area))
1206 (marker-position (cdr area))
1207 change)
1205 (if (not (and justify 1208 (if (not (and justify
1206 (consp (cdr area)))) 1209 (consp (cdr area))))
1207 (goto-char (cdr area)) 1210 (goto-char (cdr area))
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index fbf8c466585..21c35811ac3 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -36,7 +36,7 @@
36;; setq auto-insert-directory to an appropriate slash-terminated value 36;; setq auto-insert-directory to an appropriate slash-terminated value
37;; 37;;
38;; You can also customize the variable `auto-insert-mode' to load the 38;; You can also customize the variable `auto-insert-mode' to load the
39;; package. Alternatively, add the following to your .emacs file: 39;; package. Alternatively, add the following to your init file:
40;; (auto-insert-mode 1) 40;; (auto-insert-mode 1)
41;; 41;;
42;; Author: Charlie Martin 42;; Author: Charlie Martin
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 75a8d9f59dc..31bbc13acf9 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -144,10 +144,7 @@ You can toggle whether files are shown with \\<bookmark-bmenu-mode-map>\\[bookma
144 144
145(defcustom bookmark-bmenu-toggle-filenames t 145(defcustom bookmark-bmenu-toggle-filenames t
146 "Non-nil means show filenames when listing bookmarks. 146 "Non-nil means show filenames when listing bookmarks.
147This may result in truncated bookmark names. To disable this, put the 147A non-nil value may result in truncated bookmark names."
148following in your `.emacs' file:
149
150\(setq bookmark-bmenu-toggle-filenames nil)"
151 :type 'boolean 148 :type 'boolean
152 :group 'bookmark) 149 :group 'bookmark)
153 150
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index 4b91a8c2002..4cca7fb7e7f 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -286,8 +286,7 @@ The value t means abort and give an error message.")
286 286
287;;;###autoload 287;;;###autoload
288(defun calc-alg-entry (&optional initial prompt) 288(defun calc-alg-entry (&optional initial prompt)
289 (let* ((sel-mode nil) 289 (let* ((calc-dollar-values (mapcar #'calc-get-stack-element
290 (calc-dollar-values (mapcar 'calc-get-stack-element
291 (nthcdr calc-stack-top calc-stack))) 290 (nthcdr calc-stack-top calc-stack)))
292 (calc-dollar-used 0) 291 (calc-dollar-used 0)
293 (calc-plain-entry t) 292 (calc-plain-entry t)
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 2fd5ad6fd9c..c7d93530fd7 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -3483,7 +3483,7 @@ If X is not an error form, return 1."
3483 (substring str i)))) 3483 (substring str i))))
3484 str)) 3484 str))
3485 3485
3486;;; Users can redefine this in their .emacs files. 3486;;; Users can redefine this in their init files.
3487(defvar calc-keypad-user-menu nil 3487(defvar calc-keypad-user-menu nil
3488 "If non-nil, this describes an additional menu for calc-keypad. 3488 "If non-nil, this describes an additional menu for calc-keypad.
3489It should contain a list of three rows. 3489It should contain a list of three rows.
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index dfc5dfc6588..bd748158d66 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -494,7 +494,7 @@
494 (car res)))))))) 494 (car res))))))))
495 495
496 496
497;;; It is safe to redefine these in your .emacs file to use a different 497;;; It is safe to redefine these in your init file to use a different
498;;; language. 498;;; language.
499 499
500(defvar math-long-weekday-names '( "Sunday" "Monday" "Tuesday" "Wednesday" 500(defvar math-long-weekday-names '( "Sunday" "Monday" "Tuesday" "Wednesday"
diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el
index 2519e960e0e..9276e1a7832 100644
--- a/lisp/calc/calc-map.el
+++ b/lisp/calc/calc-map.el
@@ -32,8 +32,7 @@
32(defun calc-apply (&optional oper) 32(defun calc-apply (&optional oper)
33 (interactive) 33 (interactive)
34 (calc-wrapper 34 (calc-wrapper
35 (let* ((sel-mode nil) 35 (let* ((calc-dollar-values (mapcar #'calc-get-stack-element
36 (calc-dollar-values (mapcar 'calc-get-stack-element
37 (nthcdr calc-stack-top calc-stack))) 36 (nthcdr calc-stack-top calc-stack)))
38 (calc-dollar-used 0) 37 (calc-dollar-used 0)
39 (oper (or oper (calc-get-operator "Apply" 38 (oper (or oper (calc-get-operator "Apply"
@@ -53,11 +52,10 @@
53(defun calc-reduce (&optional oper accum) 52(defun calc-reduce (&optional oper accum)
54 (interactive) 53 (interactive)
55 (calc-wrapper 54 (calc-wrapper
56 (let* ((sel-mode nil) 55 (let* ((nest (calc-is-hyperbolic))
57 (nest (calc-is-hyperbolic))
58 (rev (calc-is-inverse)) 56 (rev (calc-is-inverse))
59 (nargs (if (and nest (not rev)) 2 1)) 57 (nargs (if (and nest (not rev)) 2 1))
60 (calc-dollar-values (mapcar 'calc-get-stack-element 58 (calc-dollar-values (mapcar #'calc-get-stack-element
61 (nthcdr calc-stack-top calc-stack))) 59 (nthcdr calc-stack-top calc-stack)))
62 (calc-dollar-used 0) 60 (calc-dollar-used 0)
63 (calc-mapping-dir (and (not accum) (not nest) "")) 61 (calc-mapping-dir (and (not accum) (not nest) ""))
@@ -99,8 +97,7 @@
99(defun calc-map (&optional oper) 97(defun calc-map (&optional oper)
100 (interactive) 98 (interactive)
101 (calc-wrapper 99 (calc-wrapper
102 (let* ((sel-mode nil) 100 (let* ((calc-dollar-values (mapcar #'calc-get-stack-element
103 (calc-dollar-values (mapcar 'calc-get-stack-element
104 (nthcdr calc-stack-top calc-stack))) 101 (nthcdr calc-stack-top calc-stack)))
105 (calc-dollar-used 0) 102 (calc-dollar-used 0)
106 (calc-mapping-dir "") 103 (calc-mapping-dir "")
@@ -120,8 +117,7 @@
120(defun calc-map-equation (&optional oper) 117(defun calc-map-equation (&optional oper)
121 (interactive) 118 (interactive)
122 (calc-wrapper 119 (calc-wrapper
123 (let* ((sel-mode nil) 120 (let* ((calc-dollar-values (mapcar #'calc-get-stack-element
124 (calc-dollar-values (mapcar 'calc-get-stack-element
125 (nthcdr calc-stack-top calc-stack))) 121 (nthcdr calc-stack-top calc-stack)))
126 (calc-dollar-used 0) 122 (calc-dollar-used 0)
127 (oper (or oper (calc-get-operator "Map-equation"))) 123 (oper (or oper (calc-get-operator "Map-equation")))
@@ -152,8 +148,7 @@
152(defun calc-outer-product (&optional oper) 148(defun calc-outer-product (&optional oper)
153 (interactive) 149 (interactive)
154 (calc-wrapper 150 (calc-wrapper
155 (let* ((sel-mode nil) 151 (let* ((calc-dollar-values (mapcar #'calc-get-stack-element
156 (calc-dollar-values (mapcar 'calc-get-stack-element
157 (nthcdr calc-stack-top calc-stack))) 152 (nthcdr calc-stack-top calc-stack)))
158 (calc-dollar-used 0) 153 (calc-dollar-used 0)
159 (oper (or oper (calc-get-operator "Outer" 2)))) 154 (oper (or oper (calc-get-operator "Outer" 2))))
@@ -170,8 +165,7 @@
170(defun calc-inner-product (&optional mul-oper add-oper) 165(defun calc-inner-product (&optional mul-oper add-oper)
171 (interactive) 166 (interactive)
172 (calc-wrapper 167 (calc-wrapper
173 (let* ((sel-mode nil) 168 (let* ((calc-dollar-values (mapcar #'calc-get-stack-element
174 (calc-dollar-values (mapcar 'calc-get-stack-element
175 (nthcdr calc-stack-top calc-stack))) 169 (nthcdr calc-stack-top calc-stack)))
176 (calc-dollar-used 0) 170 (calc-dollar-used 0)
177 (mul-oper (or mul-oper (calc-get-operator "Inner (Mult)" 2))) 171 (mul-oper (or mul-oper (calc-get-operator "Inner (Mult)" 2)))
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index 80d355ed5fa..64df10a40ca 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -235,8 +235,7 @@
235(defun calc-store-map (&optional oper var) 235(defun calc-store-map (&optional oper var)
236 (interactive) 236 (interactive)
237 (calc-wrapper 237 (calc-wrapper
238 (let* ((sel-mode nil) 238 (let* ((calc-dollar-values (mapcar #'calc-get-stack-element
239 (calc-dollar-values (mapcar 'calc-get-stack-element
240 (nthcdr calc-stack-top calc-stack))) 239 (nthcdr calc-stack-top calc-stack)))
241 (calc-dollar-used 0) 240 (calc-dollar-used 0)
242 (oper (or oper (calc-get-operator "Store Mapping"))) 241 (oper (or oper (calc-get-operator "Store Mapping")))
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 17f0998d30b..25f591a3945 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -912,35 +912,6 @@ Used by `calc-user-invocation'.")
912(defvar calc-embedded-mode-hook nil 912(defvar calc-embedded-mode-hook nil
913 "Hook run when starting embedded mode.") 913 "Hook run when starting embedded mode.")
914 914
915;; Set up the autoloading linkage.
916(let ((name (and (fboundp 'calc-dispatch)
917 (autoloadp (symbol-function 'calc-dispatch))
918 (nth 1 (symbol-function 'calc-dispatch))))
919 (p load-path))
920
921 ;; If Calc files exist on the load-path, we're all set.
922 (while (and p (not (file-exists-p
923 (expand-file-name "calc-misc.elc" (car p)))))
924 (setq p (cdr p)))
925 (or p
926
927 ;; If Calc is autoloaded using a path name, look there for Calc files.
928 ;; This works for both relative ("calc/calc.elc") and absolute paths.
929 (and name (file-name-directory name)
930 (let ((p2 load-path)
931 (name2 (concat (file-name-directory name)
932 "calc-misc.elc")))
933 (while (and p2 (not (file-exists-p
934 (expand-file-name name2 (car p2)))))
935 (setq p2 (cdr p2)))
936 (when p2
937 (setq load-path (nconc load-path
938 (list
939 (directory-file-name
940 (file-name-directory
941 (expand-file-name
942 name (car p2))))))))))))
943
944;; The following modes use specially-formatted data. 915;; The following modes use specially-formatted data.
945(put 'calc-mode 'mode-class 'special) 916(put 'calc-mode 'mode-class 'special)
946(put 'calc-trail-mode 'mode-class 'special) 917(put 'calc-trail-mode 'mode-class 'special)
@@ -1353,12 +1324,12 @@ Notations: 3.14e6 3.14 * 10^6
1353\\{calc-mode-map} 1324\\{calc-mode-map}
1354" 1325"
1355 (interactive) 1326 (interactive)
1356 (mapc (function 1327 (mapc (function ;FIXME: Why (set-default v (symbol-value v)) ?!?!?
1357 (lambda (v) (set-default v (symbol-value v)))) calc-local-var-list) 1328 (lambda (v) (set-default v (symbol-value v)))) calc-local-var-list)
1358 (kill-all-local-variables) 1329 (kill-all-local-variables)
1359 (use-local-map (if (eq calc-algebraic-mode 'total) 1330 (use-local-map (if (eq calc-algebraic-mode 'total)
1360 (progn (require 'calc-ext) calc-alg-map) calc-mode-map)) 1331 (progn (require 'calc-ext) calc-alg-map) calc-mode-map))
1361 (mapc (function (lambda (v) (make-local-variable v))) calc-local-var-list) 1332 (mapc #'make-local-variable calc-local-var-list)
1362 (make-local-variable 'overlay-arrow-position) 1333 (make-local-variable 'overlay-arrow-position)
1363 (make-local-variable 'overlay-arrow-string) 1334 (make-local-variable 'overlay-arrow-string)
1364 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) 1335 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
@@ -1395,7 +1366,7 @@ Notations: 3.14e6 3.14 * 10^6
1395 (if calc-buffer-list (setq calc-stack (copy-sequence calc-stack))) 1366 (if calc-buffer-list (setq calc-stack (copy-sequence calc-stack)))
1396 (add-to-list 'calc-buffer-list (current-buffer) t)) 1367 (add-to-list 'calc-buffer-list (current-buffer) t))
1397 1368
1398(defvar calc-check-defines 'calc-check-defines) ; suitable for run-hooks 1369(defvar calc-check-defines 'calc-check-defines) ; Suitable for run-hooks.
1399(defun calc-check-defines () 1370(defun calc-check-defines ()
1400 (if (symbol-plist 'calc-define) 1371 (if (symbol-plist 'calc-define)
1401 (let ((plist (copy-sequence (symbol-plist 'calc-define)))) 1372 (let ((plist (copy-sequence (symbol-plist 'calc-define))))
@@ -1943,8 +1914,7 @@ See calc-keypad for details."
1943 (delete-region (point) (point-max)))) 1914 (delete-region (point) (point-max))))
1944 (calc-set-command-flag 'renum-stack)))))) 1915 (calc-set-command-flag 'renum-stack))))))
1945 1916
1946(defvar sel-mode) 1917(defun calc-get-stack-element (x &optional sel-mode)
1947(defun calc-get-stack-element (x)
1948 (cond ((eq sel-mode 'entry) 1918 (cond ((eq sel-mode 'entry)
1949 x) 1919 x)
1950 ((eq sel-mode 'sel) 1920 ((eq sel-mode 'sel)
@@ -1961,9 +1931,9 @@ See calc-keypad for details."
1961(defun calc-top (&optional n sel-mode) 1931(defun calc-top (&optional n sel-mode)
1962 (or n (setq n 1)) 1932 (or n (setq n 1))
1963 (calc-check-stack n) 1933 (calc-check-stack n)
1964 (calc-get-stack-element (nth (+ n calc-stack-top -1) calc-stack))) 1934 (calc-get-stack-element (nth (+ n calc-stack-top -1) calc-stack) sel-mode))
1965 1935
1966(defun calc-top-n (&optional n sel-mode) ; in case precision has changed 1936(defun calc-top-n (&optional n sel-mode) ; In case precision has changed.
1967 (math-check-complete (calc-normalize (calc-top n sel-mode)))) 1937 (math-check-complete (calc-normalize (calc-top n sel-mode))))
1968 1938
1969(defun calc-top-list (&optional n m sel-mode) 1939(defun calc-top-list (&optional n m sel-mode)
@@ -1974,7 +1944,8 @@ See calc-keypad for details."
1974 (let ((top (copy-sequence (nthcdr (+ m calc-stack-top -1) 1944 (let ((top (copy-sequence (nthcdr (+ m calc-stack-top -1)
1975 calc-stack)))) 1945 calc-stack))))
1976 (setcdr (nthcdr (1- n) top) nil) 1946 (setcdr (nthcdr (1- n) top) nil)
1977 (nreverse (mapcar 'calc-get-stack-element top))))) 1947 (nreverse
1948 (mapcar (lambda (x) (calc-get-stack-element x sel-mode)) top)))))
1978 1949
1979(defun calc-top-list-n (&optional n m sel-mode) 1950(defun calc-top-list-n (&optional n m sel-mode)
1980 (mapcar 'math-check-complete 1951 (mapcar 'math-check-complete
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index d5514d14a32..93ef440541e 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -593,7 +593,7 @@ You can customize `diary-date-forms' to your preferred format.
593Three default styles are provided: `diary-american-date-forms', 593Three default styles are provided: `diary-american-date-forms',
594`diary-european-date-forms', and `diary-iso-date-forms'. 594`diary-european-date-forms', and `diary-iso-date-forms'.
595You can choose between these by setting `calendar-date-style' in your 595You can choose between these by setting `calendar-date-style' in your
596.emacs file, or by using `calendar-set-date-style' when in the calendar. 596init file, or by using `calendar-set-date-style' when in the calendar.
597 597
598A diary entry can be preceded by the character `diary-nonmarking-symbol' 598A diary entry can be preceded by the character `diary-nonmarking-symbol'
599\(ordinarily `&') to make that entry nonmarking--that is, it will not be 599\(ordinarily `&') to make that entry nonmarking--that is, it will not be
@@ -921,6 +921,64 @@ styles."
921 calendar-american-date-display-form) 921 calendar-american-date-display-form)
922 :group 'calendar) 922 :group 'calendar)
923 923
924(defcustom calendar-american-month-header
925 '(propertize (format "%s %d" (calendar-month-name month) year)
926 'font-lock-face 'font-lock-function-name-face)
927 "Default format for calendar month headings with the American date style.
928Normally you should not customize this, but `calender-month-header'."
929 :group 'calendar
930 :risky t
931 :type 'sexp
932 :version "24.3")
933
934(defcustom calendar-european-month-header
935 '(propertize (format "%s %d" (calendar-month-name month) year)
936 'font-lock-face 'font-lock-function-name-face)
937 "Default format for calendar month headings with the European date style.
938Normally you should not customize this, but `calender-month-header'."
939 :group 'calendar
940 :risky t
941 :type 'sexp
942 :version "24.3")
943
944(defcustom calendar-iso-month-header
945 '(propertize (format "%d %s" year (calendar-month-name month))
946 'font-lock-face 'font-lock-function-name-face)
947 "Default format for calendar month headings with the ISO date style.
948Normally you should not customize this, but `calender-month-header'."
949 :group 'calendar
950 :risky t
951 :type 'sexp
952 :version "24.3")
953
954(defcustom calendar-month-header
955 (cond ((eq calendar-date-style 'iso)
956 calendar-iso-month-header)
957 ((eq calendar-date-style 'european)
958 calendar-european-month-header)
959 (t calendar-american-month-header))
960 "Expression to evaluate to return the calendar month headings.
961When this expression is evaluated, the variables MONTH and YEAR are
962integers appropriate to the relevant month. The result is padded
963to the width of `calendar-month-digit-width'.
964
965For examples of three common styles, see `calendar-american-month-header',
966`calendar-european-month-header', and `calendar-iso-month-header'.
967
968Changing this variable without using customize has no effect on
969pre-existing calendar windows."
970 :group 'calendar
971 :initialize 'custom-initialize-default
972 :risky t
973 :set (lambda (sym val)
974 (set sym val)
975 (calendar-redraw))
976 :set-after '(calendar-date-style calendar-american-month-header
977 calendar-european-month-header
978 calendar-iso-month-header)
979 :type 'sexp
980 :version "24.3")
981
924(defun calendar-set-date-style (style) 982(defun calendar-set-date-style (style)
925 "Set the style of calendar and diary dates to STYLE (a symbol). 983 "Set the style of calendar and diary dates to STYLE (a symbol).
926The valid styles are described in the documentation of `calendar-date-style'." 984The valid styles are described in the documentation of `calendar-date-style'."
@@ -934,8 +992,11 @@ The valid styles are described in the documentation of `calendar-date-style'."
934 calendar-date-display-form 992 calendar-date-display-form
935 (symbol-value (intern-soft 993 (symbol-value (intern-soft
936 (format "calendar-%s-date-display-form" style))) 994 (format "calendar-%s-date-display-form" style)))
995 calendar-month-header
996 (symbol-value (intern-soft (format "calendar-%s-month-header" style)))
937 diary-date-forms 997 diary-date-forms
938 (symbol-value (intern-soft (format "diary-%s-date-forms" style)))) 998 (symbol-value (intern-soft (format "diary-%s-date-forms" style))))
999 (calendar-redraw)
939 (calendar-update-mode-line)) 1000 (calendar-update-mode-line))
940 1001
941(defun european-calendar () 1002(defun european-calendar ()
@@ -1276,7 +1337,7 @@ Runs the following hooks:
1276 generating a calendar, if today's date is visible or not, respectively 1337 generating a calendar, if today's date is visible or not, respectively
1277`calendar-initial-window-hook' - after first creating a calendar 1338`calendar-initial-window-hook' - after first creating a calendar
1278 1339
1279This function is suitable for execution in a .emacs file." 1340This function is suitable for execution in an init file."
1280 (interactive "P") 1341 (interactive "P")
1281 ;; Avoid loading cal-x unless it will be used. 1342 ;; Avoid loading cal-x unless it will be used.
1282 (if (and (memq calendar-setup '(one-frame two-frames calendar-only)) 1343 (if (and (memq calendar-setup '(one-frame two-frames calendar-only))
@@ -1463,9 +1524,8 @@ line."
1463 (goto-char (point-min)) 1524 (goto-char (point-min))
1464 (calendar-move-to-column indent) 1525 (calendar-move-to-column indent)
1465 (insert 1526 (insert
1466 (calendar-string-spread 1527 (calendar-string-spread (list calendar-month-header)
1467 (list (format "%s %d" (calendar-month-name month) year)) 1528 ?\s calendar-month-digit-width))
1468 ?\s calendar-month-digit-width))
1469 (calendar-ensure-newline) 1529 (calendar-ensure-newline)
1470 (calendar-insert-at-column indent calendar-intermonth-header trunc) 1530 (calendar-insert-at-column indent calendar-intermonth-header trunc)
1471 ;; Use the first two characters of each day to head the columns. 1531 ;; Use the first two characters of each day to head the columns.
@@ -2222,9 +2282,12 @@ Negative years are interpreted as years BC; -1 being 1 BC, and so on."
2222 (- mon2 mon1))) 2282 (- mon2 mon1)))
2223 2283
2224(defvar calendar-font-lock-keywords 2284(defvar calendar-font-lock-keywords
2285 ;; Month and year. Not really needed now that calendar-month-header
2286 ;; contains propertize, and not correct for non-american forms
2287 ;; of that variable.
2225 `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t) 2288 `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t)
2226 " -?[0-9]+") 2289 " -?[0-9]+")
2227 . font-lock-function-name-face) ; month and year 2290 . font-lock-function-name-face)
2228 (,(regexp-opt 2291 (,(regexp-opt
2229 (list (substring (aref calendar-day-name-array 6) 2292 (list (substring (aref calendar-day-name-array 6)
2230 0 calendar-day-header-width) 2293 0 calendar-day-header-width)
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 8fa5b0ddb07..4bce8ec0927 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -200,19 +200,21 @@ holidays), or hard copy output."
200 'diary-list-entries-hook "23.1") 200 'diary-list-entries-hook "23.1")
201 201
202(defcustom diary-list-entries-hook nil 202(defcustom diary-list-entries-hook nil
203 "List of functions called after diary file is culled for relevant entries. 203 "Hook run after diary file is culled for relevant entries.
204You might wish to add `diary-include-other-diary-files', in which case 204
205you will probably also want to add `diary-mark-included-diary-files' to 205If you add `diary-include-other-diary-files' to this hook, you
206`diary-mark-entries-hook'. For example, you could use 206will probably also want to add `diary-mark-included-diary-files'
207to `diary-mark-entries-hook'. For example, to cause the fancy
208diary buffer to be displayed with diary entries from various
209included files, each day's entries sorted into lexicographic
210order, add the following to your init file:
207 211
208 (setq diary-display-function 'diary-fancy-display) 212 (setq diary-display-function 'diary-fancy-display)
209 (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) 213 (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
210 (add-hook 'diary-list-entries-hook 'diary-sort-entries t) 214 (add-hook 'diary-list-entries-hook 'diary-sort-entries t)
211 215
212in your `.emacs' file to cause the fancy diary buffer to be displayed with 216Note how the sort function is placed last, so that it can sort
213diary entries from various included files, each day's entries sorted into 217the entries included from other files.
214lexicographic order. Note how the sort function is placed last,
215so that it can sort the entries included from other files.
216 218
217This hook runs after `diary-nongregorian-listing-hook'. These two hooks 219This hook runs after `diary-nongregorian-listing-hook'. These two hooks
218differ only if you are using included diary files. In that case, 220differ only if you are using included diary files. In that case,
@@ -532,7 +534,7 @@ If so, return the expanded file name, otherwise signal an error."
532 "Generate the diary window for ARG days starting with the current date. 534 "Generate the diary window for ARG days starting with the current date.
533If no argument is provided, the number of days of diary entries is governed 535If no argument is provided, the number of days of diary entries is governed
534by the variable `diary-number-of-entries'. A value of ARG less than 1 536by the variable `diary-number-of-entries'. A value of ARG less than 1
535does nothing. This function is suitable for execution in a `.emacs' file." 537does nothing. This function is suitable for execution in an init file."
536 (interactive "P") 538 (interactive "P")
537 (diary-check-diary-file) 539 (diary-check-diary-file)
538 (diary-list-entries (calendar-current-date) 540 (diary-list-entries (calendar-current-date)
@@ -1230,8 +1232,8 @@ Mail is sent to the address specified by `diary-mail-addr'.
1230 1232
1231Here is an example of a script to call `diary-mail-entries', 1233Here is an example of a script to call `diary-mail-entries',
1232suitable for regular scheduling using cron (or at). Note that 1234suitable for regular scheduling using cron (or at). Note that
1233since `emacs -script' does not load your `.emacs' file, you 1235since `emacs -script' does not load your init file, you should
1234should ensure that all relevant variables are set. 1236ensure that all relevant variables are set.
1235 1237
1236#!/usr/bin/emacs -script 1238#!/usr/bin/emacs -script
1237;; diary-rem.el - run the Emacs diary-reminder 1239;; diary-rem.el - run the Emacs diary-reminder
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 9643a1e2905..b94815f98ea 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -343,12 +343,12 @@ See the documentation for `calendar-holidays' for details."
343 "List of notable days for the command \\[holidays]. 343 "List of notable days for the command \\[holidays].
344 344
345Additional holidays are easy to add to the list, just put them in the 345Additional holidays are easy to add to the list, just put them in the
346list `holiday-other-holidays' in your .emacs file. Similarly, by setting 346list `holiday-other-holidays' in your init file. Similarly, by setting
347any of `holiday-general-holidays', `holiday-local-holidays', 347any of `holiday-general-holidays', `holiday-local-holidays',
348`holiday-christian-holidays', `holiday-hebrew-holidays', 348`holiday-christian-holidays', `holiday-hebrew-holidays',
349`holiday-islamic-holidays', `holiday-bahai-holidays', 349`holiday-islamic-holidays', `holiday-bahai-holidays',
350`holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your 350`holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your
351.emacs file, you can eliminate unwanted categories of holidays. 351init file, you can eliminate unwanted categories of holidays.
352 352
353The aforementioned variables control the holiday choices offered 353The aforementioned variables control the holiday choices offered
354by the function `holiday-list' when it is called interactively. 354by the function `holiday-list' when it is called interactively.
@@ -523,7 +523,7 @@ use instead of point."
523(defun holidays (&optional arg) 523(defun holidays (&optional arg)
524 "Display the holidays for last month, this month, and next month. 524 "Display the holidays for last month, this month, and next month.
525If called with an optional prefix argument ARG, prompts for month and year. 525If called with an optional prefix argument ARG, prompts for month and year.
526This function is suitable for execution in a .emacs file." 526This function is suitable for execution in a init file."
527 (interactive "P") 527 (interactive "P")
528 (save-excursion 528 (save-excursion
529 (let* ((completion-ignore-case t) 529 (let* ((completion-ignore-case t)
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index 8f09d20f50e..2761df0bdb1 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -236,7 +236,7 @@ use instead of point."
236(defun lunar-phases (&optional arg) 236(defun lunar-phases (&optional arg)
237 "Display the quarters of the moon for last month, this month, and next month. 237 "Display the quarters of the moon for last month, this month, and next month.
238If called with an optional prefix argument ARG, prompts for month and year. 238If called with an optional prefix argument ARG, prompts for month and year.
239This function is suitable for execution in a .emacs file." 239This function is suitable for execution in an init file."
240 (interactive "P") 240 (interactive "P")
241 (save-excursion 241 (save-excursion
242 (let* ((date (if arg (calendar-read-date t) 242 (let* ((date (if arg (calendar-read-date t)
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index a8d7d44af3b..3ccdf135fb6 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -797,7 +797,7 @@ If called with an optional prefix argument ARG, prompt for date.
797If called with an optional double prefix argument, prompt for 797If called with an optional double prefix argument, prompt for
798longitude, latitude, time zone, and date, and always use standard time. 798longitude, latitude, time zone, and date, and always use standard time.
799 799
800This function is suitable for execution in a .emacs file." 800This function is suitable for execution in an init file."
801 (interactive "p") 801 (interactive "p")
802 (or arg (setq arg 1)) 802 (or arg (setq arg 1))
803 (if (and (< arg 16) 803 (if (and (< arg 16)
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index 2ebb8c7c3ae..3151ce145de 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -49,7 +49,7 @@
49;; If you want Emacs to display the amount of time "left" to your 49;; If you want Emacs to display the amount of time "left" to your
50;; workday in the mode-line, you can either set the value of 50;; workday in the mode-line, you can either set the value of
51;; `timeclock-mode-line-display' to t using M-x customize, or you can 51;; `timeclock-mode-line-display' to t using M-x customize, or you can
52;; add this code to your .emacs file: 52;; add this code to your init file:
53;; 53;;
54;; (require 'timeclock) 54;; (require 'timeclock)
55;; (timeclock-mode-line-display) 55;; (timeclock-mode-line-display)
@@ -60,7 +60,7 @@
60;; You may also want Emacs to ask you before exiting, if you are 60;; You may also want Emacs to ask you before exiting, if you are
61;; currently working on a project. This can be done either by setting 61;; currently working on a project. This can be done either by setting
62;; `timeclock-ask-before-exiting' to t using M-x customize (this is 62;; `timeclock-ask-before-exiting' to t using M-x customize (this is
63;; the default), or by adding the following to your .emacs file: 63;; the default), or by adding the following to your init file:
64;; 64;;
65;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out) 65;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out)
66 66
diff --git a/lisp/comint.el b/lisp/comint.el
index 5b0eb3027e6..994d81a375a 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -181,7 +181,7 @@ override the read-only-ness of comint prompts is to call
181`comint-kill-whole-line' or `comint-kill-region' with no 181`comint-kill-whole-line' or `comint-kill-region' with no
182narrowing in effect. This way you will be certain that none of 182narrowing in effect. This way you will be certain that none of
183the remaining prompts will be accidentally messed up. You may 183the remaining prompts will be accidentally messed up. You may
184wish to put something like the following in your `.emacs' file: 184wish to put something like the following in your init file:
185 185
186\(add-hook 'comint-mode-hook 186\(add-hook 'comint-mode-hook
187 (lambda () 187 (lambda ()
@@ -3161,8 +3161,8 @@ See `completion-table-with-quoting' and `comint-unquote-function'.")
3161 (complete-with-action action table string pred)))) 3161 (complete-with-action action table string pred))))
3162 (unless (zerop (length filesuffix)) 3162 (unless (zerop (length filesuffix))
3163 (list :exit-function 3163 (list :exit-function
3164 (lambda (_s finished) 3164 (lambda (_s status)
3165 (when (memq finished '(sole finished)) 3165 (when (eq status 'finished)
3166 (if (looking-at (regexp-quote filesuffix)) 3166 (if (looking-at (regexp-quote filesuffix))
3167 (goto-char (match-end 0)) 3167 (goto-char (match-end 0))
3168 (insert filesuffix))))))))) 3168 (insert filesuffix)))))))))
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 86a19131569..2e6f2b14625 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -526,7 +526,10 @@ WIDGET is the widget to apply the filter entries of MENU on."
526 :type 'boolean) 526 :type 'boolean)
527 527
528(defcustom custom-unlispify-remove-prefixes nil 528(defcustom custom-unlispify-remove-prefixes nil
529 "Non-nil means remove group prefixes from option names in buffer." 529 "Non-nil means remove group prefixes from option names in buffer.
530Discarding prefixes often leads to confusing names for options
531and faces in Customize buffers, so do not set this to a non-nil
532value unless you are sure you know what it does."
530 :group 'custom-menu 533 :group 'custom-menu
531 :group 'custom-buffer 534 :group 'custom-buffer
532 :type 'boolean) 535 :type 'boolean)
diff --git a/lisp/custom.el b/lisp/custom.el
index 1f0729cfd97..dfc8e631152 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -237,7 +237,7 @@ The following keywords are meaningful:
237 is `default-value'. 237 is `default-value'.
238:require 238:require
239 VALUE should be a feature symbol. If you save a value 239 VALUE should be a feature symbol. If you save a value
240 for this option, then when your `.emacs' file loads the value, 240 for this option, then when your init file loads the value,
241 it does (require VALUE) first. 241 it does (require VALUE) first.
242:set-after VARIABLES 242:set-after VARIABLES
243 Specifies that SYMBOL should be set after the list of variables 243 Specifies that SYMBOL should be set after the list of variables
@@ -350,68 +350,62 @@ FACE does not need to be quoted.
350 350
351Third argument DOC is the face documentation. 351Third argument DOC is the face documentation.
352 352
353If FACE has been set with `custom-set-faces', set the face attributes 353If FACE has been set with `custom-set-faces', set the face
354as specified by that function, otherwise set the face attributes 354attributes as specified by that function, otherwise set the face
355according to SPEC. 355attributes according to SPEC.
356
357The remaining arguments should have the form
358
359 [KEYWORD VALUE]...
360 356
357The remaining arguments should have the form [KEYWORD VALUE]...
361For a list of valid keywords, see the common keywords listed in 358For a list of valid keywords, see the common keywords listed in
362`defcustom'. 359`defcustom'.
363 360
364SPEC should be an alist of the form ((DISPLAY ATTS)...). 361SPEC should be an alist of the form
365 362
366In the first element, DISPLAY can be `default'. The ATTS in that 363 ((DISPLAY . ATTS)...)
367element then act as defaults for all the following elements. 364
368 365where DISPLAY is a form specifying conditions to match certain
369Aside from that, DISPLAY specifies conditions to match some or 366terminals and ATTS is a property list (ATTR VALUE ATTR VALUE...)
370all frames. For each frame, the first element of SPEC where the 367specifying face attributes and values for frames on those
371DISPLAY conditions are satisfied is the one that applies to that 368terminals. On each terminal, the first element with a matching
372frame. The ATTRs in this element take effect, and the following 369DISPLAY specification takes effect, and the remaining elements in
373elements are ignored, on that frame. 370SPEC are disregarded.
374 371
375In the last element, DISPLAY can be t. That element applies to a 372As a special exception, in the first element of SPEC, DISPLAY can
376frame if none of the previous elements (except the `default' if 373be the special value `default'. Then the ATTS in that element
377any) did. 374act as defaults for all the following elements.
378 375
379ATTS is a list of face attributes followed by their values: 376For backward compatibility, elements of SPEC can be written
380 (ATTR VALUE ATTR VALUE...) 377as (DISPLAY ATTS) instead of (DISPLAY . ATTS).
381 378
382The possible attributes are `:family', `:width', `:height', `:weight', 379Each DISPLAY can have the following values:
383`:slant', `:underline', `:overline', `:strike-through', `:box', 380 - `default' (only in the first element).
384`:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'. 381 - The symbol t, which matches all terminals.
385 382 - An alist of conditions. Each alist element must have the form
386DISPLAY can be `default' (only in the first element), the symbol 383 (REQ ITEM...). A matching terminal must satisfy each
387t (only in the last element) to match all frames, or an alist of 384 specified condition by matching one of its ITEMs. Each REQ
388conditions of the form \(REQ ITEM...). For such an alist to 385 must be one of the following:
389match a frame, each of the conditions must be satisfied, meaning 386 - `type' (the terminal type).
390that the REQ property of the frame must match one of the 387 Each ITEM must be one of the values returned by
391corresponding ITEMs. These are the defined REQ values: 388 `window-system'. Under X, additional allowed values are
392 389 `motif', `lucid', `gtk' and `x-toolkit'.
393`type' (the value of `window-system') 390 - `class' (the terminal's color support).
394 Under X, in addition to the values `window-system' can take, 391 Each ITEM should be one of `color', `grayscale', or `mono'.
395 `motif', `lucid', `gtk' and `x-toolkit' are allowed, and match when 392 - `background' (what color is used for the background text)
396 the Motif toolkit, Lucid toolkit, GTK toolkit or any X toolkit is in use. 393 Each ITEM should be one of `light' or `dark'.
397 394 - `min-colors' (the minimum number of supported colors)
398`class' (the frame's color support) 395 Each ITEM should be an integer, which is compared with the
399 Should be one of `color', `grayscale', or `mono'. 396 result of `display-color-cells'.
400 397 - `supports' (match terminals supporting certain attributes).
401`background' (what color is used for the background text) 398 Each ITEM should be a list of face attributes. See
402 Should be one of `light' or `dark'. 399 `display-supports-face-attributes-p' for more information on
403 400 exactly how testing is done.
404`min-colors' (the minimum number of colors the frame should support) 401
405 Should be an integer, it is compared with the result of 402In the ATTS property list, possible attributes are `:family',
406 `display-color-cells'. 403`:width', `:height', `:weight', `:slant', `:underline',
407 404`:overline', `:strike-through', `:box', `:foreground',
408`supports' (only match frames that support the specified face attributes) 405`:background', `:stipple', `:inverse-video', and `:inherit'.
409 Should be a list of face attributes. See the documentation for 406
410 the function `display-supports-face-attributes-p' for more 407See Info node `(elisp) Faces' in the Emacs Lisp manual for more
411 information on exactly how testing is done. 408information."
412
413See Info node `(elisp) Customization' in the Emacs Lisp manual
414for more information."
415 (declare (doc-string 3)) 409 (declare (doc-string 3))
416 ;; It is better not to use backquote in this file, 410 ;; It is better not to use backquote in this file,
417 ;; because that makes a bootstrapping problem 411 ;; because that makes a bootstrapping problem
diff --git a/lisp/desktop.el b/lisp/desktop.el
index a873a6b63bf..75deb58b4d8 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -34,7 +34,7 @@
34;; - some local variables 34;; - some local variables
35 35
36;; To use this, use customize to turn on desktop-save-mode or add the 36;; To use this, use customize to turn on desktop-save-mode or add the
37;; following line somewhere in your .emacs file: 37;; following line somewhere in your init file:
38;; 38;;
39;; (desktop-save-mode 1) 39;; (desktop-save-mode 1)
40;; 40;;
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index e5ca463e8d4..afa0e32b3af 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -54,30 +54,52 @@ into this list; they also should call `dired-log' to log the errors.")
54;;;###autoload 54;;;###autoload
55(defun dired-diff (file &optional switches) 55(defun dired-diff (file &optional switches)
56 "Compare file at point with file FILE using `diff'. 56 "Compare file at point with file FILE using `diff'.
57If called interactively, prompt for FILE; if the file at point 57If called interactively, prompt for FILE. If the file at point
58has a backup file, use that as the default. 58has a backup file, use that as the default. If the mark is active
59in Transient Mark mode, use the file at the mark as the default.
60\(That's the mark set by \\[set-mark-command], not by Dired's
61\\[dired-mark] command.)
59 62
60FILE is the first file given to `diff'. 63FILE is the first file given to `diff'. The file at point
61With prefix arg, prompt for second argument SWITCHES, 64is the second file given to `diff'.
62which is the string of command switches for `diff'." 65
66With prefix arg, prompt for second argument SWITCHES, which is
67the string of command switches for the third argument of `diff'."
63 (interactive 68 (interactive
64 (let* ((current (dired-get-filename t)) 69 (let* ((current (dired-get-filename t))
65 (oldf (file-newest-backup current)) 70 ;; Get the latest existing backup file.
66 (dir (if oldf (file-name-directory oldf)))) 71 (oldf (diff-latest-backup-file current))
67 (list (read-file-name 72 ;; Get the file at the mark.
68 (format "Diff %s with%s: " 73 (file-at-mark (if (and transient-mark-mode mark-active)
69 (file-name-nondirectory current) 74 (save-excursion (goto-char (mark t))
70 (if oldf 75 (dired-get-filename t t))))
71 (concat " (default " 76 (default-file (or file-at-mark
72 (file-name-nondirectory oldf) 77 (and oldf (file-name-nondirectory oldf))))
73 ")") 78 ;; Use it as default if it's not the same as the current file,
74 "")) 79 ;; and the target dir is current or there is a default file.
75 dir oldf t) 80 (default (if (and (not (equal default-file current))
76 (if current-prefix-arg 81 (or (equal (dired-dwim-target-directory)
77 (read-string "Options for diff: " 82 (dired-current-directory))
78 (if (stringp diff-switches) 83 default-file))
79 diff-switches 84 default-file))
80 (mapconcat 'identity diff-switches " "))))))) 85 (target-dir (if default
86 (dired-current-directory)
87 (dired-dwim-target-directory)))
88 (defaults (dired-dwim-target-defaults (list current) target-dir)))
89 (list
90 (minibuffer-with-setup-hook
91 (lambda ()
92 (set (make-local-variable 'minibuffer-default-add-function) nil)
93 (setq minibuffer-default defaults))
94 (read-file-name
95 (format "Diff %s with%s: " current
96 (if default (format " (default %s)" default) ""))
97 target-dir default t))
98 (if current-prefix-arg
99 (read-string "Options for diff: "
100 (if (stringp diff-switches)
101 diff-switches
102 (mapconcat 'identity diff-switches " ")))))))
81 (let ((current (dired-get-filename t))) 103 (let ((current (dired-get-filename t)))
82 (when (or (equal (expand-file-name file) 104 (when (or (equal (expand-file-name file)
83 (expand-file-name current)) 105 (expand-file-name current))
@@ -223,10 +245,17 @@ List has a form of (file-name full-file-name (attribute-list))."
223 ;; OP-SYMBOL is the type of operation (for use in `dired-mark-pop-up'). 245 ;; OP-SYMBOL is the type of operation (for use in `dired-mark-pop-up').
224 ;; ARG describes which files to use, as in `dired-get-marked-files'. 246 ;; ARG describes which files to use, as in `dired-get-marked-files'.
225 (let* ((files (dired-get-marked-files t arg)) 247 (let* ((files (dired-get-marked-files t arg))
226 (default (and (eq op-symbol 'touch) 248 ;; The source of default file attributes is the file at point.
227 (stringp (car files)) 249 (default-file (dired-get-filename t t))
228 (format-time-string "%Y%m%d%H%M.%S" 250 (default (when default-file
229 (nth 5 (file-attributes (car files)))))) 251 (cond ((eq op-symbol 'touch)
252 (format-time-string
253 "%Y%m%d%H%M.%S"
254 (nth 5 (file-attributes default-file))))
255 ((eq op-symbol 'chown)
256 (nth 2 (file-attributes default-file 'string)))
257 ((eq op-symbol 'chgrp)
258 (nth 3 (file-attributes default-file 'string))))))
230 (prompt (concat "Change " attribute-name " of %s to" 259 (prompt (concat "Change " attribute-name " of %s to"
231 (if (eq op-symbol 'touch) 260 (if (eq op-symbol 'touch)
232 " (default now): " 261 " (default now): "
@@ -263,11 +292,15 @@ List has a form of (file-name full-file-name (attribute-list))."
263;;;###autoload 292;;;###autoload
264(defun dired-do-chmod (&optional arg) 293(defun dired-do-chmod (&optional arg)
265 "Change the mode of the marked (or next ARG) files. 294 "Change the mode of the marked (or next ARG) files.
266Symbolic modes like `g+w' are allowed." 295Symbolic modes like `g+w' are allowed.
296Type M-n to pull the file attributes of the file at point
297into the minibuffer."
267 (interactive "P") 298 (interactive "P")
268 (let* ((files (dired-get-marked-files t arg)) 299 (let* ((files (dired-get-marked-files t arg))
269 (modestr (and (stringp (car files)) 300 ;; The source of default file attributes is the file at point.
270 (nth 8 (file-attributes (car files))))) 301 (default-file (dired-get-filename t t))
302 (modestr (when default-file
303 (nth 8 (file-attributes default-file))))
271 (default 304 (default
272 (and (stringp modestr) 305 (and (stringp modestr)
273 (string-match "^.\\(...\\)\\(...\\)\\(...\\)$" modestr) 306 (string-match "^.\\(...\\)\\(...\\)\\(...\\)$" modestr)
@@ -300,7 +333,9 @@ Symbolic modes like `g+w' are allowed."
300 333
301;;;###autoload 334;;;###autoload
302(defun dired-do-chgrp (&optional arg) 335(defun dired-do-chgrp (&optional arg)
303 "Change the group of the marked (or next ARG) files." 336 "Change the group of the marked (or next ARG) files.
337Type M-n to pull the file attributes of the file at point
338into the minibuffer."
304 (interactive "P") 339 (interactive "P")
305 (if (memq system-type '(ms-dos windows-nt)) 340 (if (memq system-type '(ms-dos windows-nt))
306 (error "chgrp not supported on this system")) 341 (error "chgrp not supported on this system"))
@@ -308,7 +343,9 @@ Symbolic modes like `g+w' are allowed."
308 343
309;;;###autoload 344;;;###autoload
310(defun dired-do-chown (&optional arg) 345(defun dired-do-chown (&optional arg)
311 "Change the owner of the marked (or next ARG) files." 346 "Change the owner of the marked (or next ARG) files.
347Type M-n to pull the file attributes of the file at point
348into the minibuffer."
312 (interactive "P") 349 (interactive "P")
313 (if (memq system-type '(ms-dos windows-nt)) 350 (if (memq system-type '(ms-dos windows-nt))
314 (error "chown not supported on this system")) 351 (error "chown not supported on this system"))
@@ -317,7 +354,9 @@ Symbolic modes like `g+w' are allowed."
317;;;###autoload 354;;;###autoload
318(defun dired-do-touch (&optional arg) 355(defun dired-do-touch (&optional arg)
319 "Change the timestamp of the marked (or next ARG) files. 356 "Change the timestamp of the marked (or next ARG) files.
320This calls touch." 357This calls touch.
358Type M-n to pull the file attributes of the file at point
359into the minibuffer."
321 (interactive "P") 360 (interactive "P")
322 (dired-do-chxxx "Timestamp" dired-touch-program 'touch arg)) 361 (dired-do-chxxx "Timestamp" dired-touch-program 'touch arg))
323 362
diff --git a/lisp/dired.el b/lisp/dired.el
index 54921a4ea66..a5169fc301c 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3097,21 +3097,37 @@ argument or confirmation)."
3097(defun dired-mark (arg) 3097(defun dired-mark (arg)
3098 "Mark the current (or next ARG) files. 3098 "Mark the current (or next ARG) files.
3099If on a subdir headerline, mark all its files except `.' and `..'. 3099If on a subdir headerline, mark all its files except `.' and `..'.
3100If the region is active in Transient Mark mode, mark all files
3101in the active region.
3100 3102
3101Use \\[dired-unmark-all-files] to remove all marks 3103Use \\[dired-unmark-all-files] to remove all marks
3102and \\[dired-unmark] on a subdir to remove the marks in 3104and \\[dired-unmark] on a subdir to remove the marks in
3103this subdir." 3105this subdir."
3104 (interactive "P") 3106 (interactive "P")
3105 (if (dired-get-subdir) 3107 (cond
3106 (save-excursion (dired-mark-subdir-files)) 3108 ;; Mark files in the active region.
3109 ((and transient-mark-mode mark-active)
3110 (save-excursion
3111 (let ((beg (region-beginning))
3112 (end (region-end)))
3113 (dired-mark-files-in-region
3114 (progn (goto-char beg) (line-beginning-position))
3115 (progn (goto-char end) (line-beginning-position))))))
3116 ;; Mark subdir files from the subdir headerline.
3117 ((dired-get-subdir)
3118 (save-excursion (dired-mark-subdir-files)))
3119 ;; Mark the current (or next ARG) files.
3120 (t
3107 (let ((inhibit-read-only t)) 3121 (let ((inhibit-read-only t))
3108 (dired-repeat-over-lines 3122 (dired-repeat-over-lines
3109 (prefix-numeric-value arg) 3123 (prefix-numeric-value arg)
3110 (function (lambda () (delete-char 1) (insert dired-marker-char))))))) 3124 (function (lambda () (delete-char 1) (insert dired-marker-char))))))))
3111 3125
3112(defun dired-unmark (arg) 3126(defun dired-unmark (arg)
3113 "Unmark the current (or next ARG) files. 3127 "Unmark the current (or next ARG) files.
3114If looking at a subdir, unmark all its files except `.' and `..'." 3128If looking at a subdir, unmark all its files except `.' and `..'.
3129If the region is active in Transient Mark mode, unmark all files
3130in the active region."
3115 (interactive "P") 3131 (interactive "P")
3116 (let ((dired-marker-char ?\040)) 3132 (let ((dired-marker-char ?\040))
3117 (dired-mark arg))) 3133 (dired-mark arg)))
@@ -3119,8 +3135,9 @@ If looking at a subdir, unmark all its files except `.' and `..'."
3119(defun dired-flag-file-deletion (arg) 3135(defun dired-flag-file-deletion (arg)
3120 "In Dired, flag the current line's file for deletion. 3136 "In Dired, flag the current line's file for deletion.
3121With prefix arg, repeat over several lines. 3137With prefix arg, repeat over several lines.
3122 3138If on a subdir headerline, flag all its files except `.' and `..'.
3123If on a subdir headerline, mark all its files except `.' and `..'." 3139If the region is active in Transient Mark mode, flag all files
3140in the active region."
3124 (interactive "P") 3141 (interactive "P")
3125 (let ((dired-marker-char dired-del-marker)) 3142 (let ((dired-marker-char dired-del-marker))
3126 (dired-mark arg))) 3143 (dired-mark arg)))
@@ -3128,7 +3145,9 @@ If on a subdir headerline, mark all its files except `.' and `..'."
3128(defun dired-unmark-backward (arg) 3145(defun dired-unmark-backward (arg)
3129 "In Dired, move up lines and remove marks or deletion flags there. 3146 "In Dired, move up lines and remove marks or deletion flags there.
3130Optional prefix ARG says how many lines to unmark/unflag; default 3147Optional prefix ARG says how many lines to unmark/unflag; default
3131is one line." 3148is one line.
3149If the region is active in Transient Mark mode, unmark all files
3150in the active region."
3132 (interactive "p") 3151 (interactive "p")
3133 (dired-unmark (- arg))) 3152 (dired-unmark (- arg)))
3134 3153
@@ -3159,8 +3178,8 @@ As always, hidden subdirs are not affected."
3159(defvar dired-regexp-history nil 3178(defvar dired-regexp-history nil
3160 "History list of regular expressions used in Dired commands.") 3179 "History list of regular expressions used in Dired commands.")
3161 3180
3162(defun dired-read-regexp (prompt) 3181(defun dired-read-regexp (prompt &optional default history)
3163 (read-from-minibuffer prompt nil nil nil 'dired-regexp-history)) 3182 (read-regexp prompt default (or history 'dired-regexp-history)))
3164 3183
3165(defun dired-mark-files-regexp (regexp &optional marker-char) 3184(defun dired-mark-files-regexp (regexp &optional marker-char)
3166 "Mark all files matching REGEXP for use in later commands. 3185 "Mark all files matching REGEXP for use in later commands.
@@ -3744,17 +3763,22 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3744;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3763;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3745;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3764;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3746;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3765;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3747;;;;;; dired-diff) "dired-aux" "dired-aux.el" "3c768e470d5d053d0049e0286ce38da7") 3766;;;;;; dired-diff) "dired-aux" "dired-aux.el" "244227ae609852d3dc10ab3fc40ba9ab")
3748;;; Generated autoloads from dired-aux.el 3767;;; Generated autoloads from dired-aux.el
3749 3768
3750(autoload 'dired-diff "dired-aux" "\ 3769(autoload 'dired-diff "dired-aux" "\
3751Compare file at point with file FILE using `diff'. 3770Compare file at point with file FILE using `diff'.
3752If called interactively, prompt for FILE; if the file at point 3771If called interactively, prompt for FILE. If the file at point
3753has a backup file, use that as the default. 3772has a backup file, use that as the default. If the mark is active
3773in Transient Mark mode, use the file at the mark as the default.
3774\(That's the mark set by \\[set-mark-command], not by Dired's
3775\\[dired-mark] command.)
3776
3777FILE is the first file given to `diff'. The file at point
3778is the second file given to `diff'.
3754 3779
3755FILE is the first file given to `diff'. 3780With prefix arg, prompt for second argument SWITCHES, which is
3756With prefix arg, prompt for second argument SWITCHES, 3781the string of command switches for the third argument of `diff'.
3757which is the string of command switches for `diff'.
3758 3782
3759\(fn FILE &optional SWITCHES)" t nil) 3783\(fn FILE &optional SWITCHES)" t nil)
3760 3784
@@ -3798,22 +3822,30 @@ Examples of PREDICATE:
3798(autoload 'dired-do-chmod "dired-aux" "\ 3822(autoload 'dired-do-chmod "dired-aux" "\
3799Change the mode of the marked (or next ARG) files. 3823Change the mode of the marked (or next ARG) files.
3800Symbolic modes like `g+w' are allowed. 3824Symbolic modes like `g+w' are allowed.
3825Type M-n to pull the file attributes of the file at point
3826into the minibuffer.
3801 3827
3802\(fn &optional ARG)" t nil) 3828\(fn &optional ARG)" t nil)
3803 3829
3804(autoload 'dired-do-chgrp "dired-aux" "\ 3830(autoload 'dired-do-chgrp "dired-aux" "\
3805Change the group of the marked (or next ARG) files. 3831Change the group of the marked (or next ARG) files.
3832Type M-n to pull the file attributes of the file at point
3833into the minibuffer.
3806 3834
3807\(fn &optional ARG)" t nil) 3835\(fn &optional ARG)" t nil)
3808 3836
3809(autoload 'dired-do-chown "dired-aux" "\ 3837(autoload 'dired-do-chown "dired-aux" "\
3810Change the owner of the marked (or next ARG) files. 3838Change the owner of the marked (or next ARG) files.
3839Type M-n to pull the file attributes of the file at point
3840into the minibuffer.
3811 3841
3812\(fn &optional ARG)" t nil) 3842\(fn &optional ARG)" t nil)
3813 3843
3814(autoload 'dired-do-touch "dired-aux" "\ 3844(autoload 'dired-do-touch "dired-aux" "\
3815Change the timestamp of the marked (or next ARG) files. 3845Change the timestamp of the marked (or next ARG) files.
3816This calls touch. 3846This calls touch.
3847Type M-n to pull the file attributes of the file at point
3848into the minibuffer.
3817 3849
3818\(fn &optional ARG)" t nil) 3850\(fn &optional ARG)" t nil)
3819 3851
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 72b36feb1d8..158d447a1d4 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -3,8 +3,8 @@
3 3
4;; Copyright (C) 2007-2012 Free Software Foundation, Inc. 4;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
5;; 5;;
6;; Author: Tassilo Horn <tassilo@member.fsf.org> 6;; Author: Tassilo Horn <tsdh@gnu.org>
7;; Maintainer: Tassilo Horn <tassilo@member.fsf.org> 7;; Maintainer: Tassilo Horn <tsdh@gnu.org>
8;; Keywords: files, pdf, ps, dvi 8;; Keywords: files, pdf, ps, dvi
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -57,16 +57,21 @@
57;; pages won't be displayed before conversion of the document finished 57;; pages won't be displayed before conversion of the document finished
58;; completely. 58;; completely.
59;; 59;;
60;; DocView lets you select a slice of the displayed pages. This slice will be 60;; DocView lets you select a slice of the displayed pages. This slice
61;; remembered and applied to all pages of the current document. This enables 61;; will be remembered and applied to all pages of the current
62;; you to cut away the margins of a document to save some space. To select a 62;; document. This enables you to cut away the margins of a document
63;; slice you can use `doc-view-set-slice' (bound to `s s') which will query you 63;; to save some space. To select a slice you can use
64;; for the coordinates of the slice's top-left corner and its width and height. 64;; `doc-view-set-slice' (bound to `s s') which will query you for the
65;; A much more convenient way to do the same is offered by the command 65;; coordinates of the slice's top-left corner and its width and
66;; `doc-view-set-slice-using-mouse' (bound to `s m'). After invocation you 66;; height. A much more convenient way to do the same is offered by
67;; only have to press mouse-1 at the top-left corner and drag it to the 67;; the command `doc-view-set-slice-using-mouse' (bound to `s m').
68;; bottom-right corner of the desired slice. To reset the slice use 68;; After invocation you only have to press mouse-1 at the top-left
69;; `doc-view-reset-slice' (bound to `s r'). 69;; corner and drag it to the bottom-right corner of the desired slice.
70;; Even more accurate and convenient is to use
71;; `doc-view-set-slice-from-bounding-box' (bound to `s b') which uses
72;; the BoundingBox information of the current page to set an optimal
73;; slice. To reset the slice use `doc-view-reset-slice' (bound to `s
74;; r').
70;; 75;;
71;; You can also search within the document. The command `doc-view-search' 76;; You can also search within the document. The command `doc-view-search'
72;; (bound to `C-s') queries for a search regexp and initializes a list of all 77;; (bound to `C-s') queries for a search regexp and initializes a list of all
@@ -103,7 +108,6 @@
103;; - share more code with image-mode. 108;; - share more code with image-mode.
104;; - better menu. 109;; - better menu.
105;; - Bind slicing to a drag event. 110;; - Bind slicing to a drag event.
106;; - doc-view-fit-doc-to-window and doc-view-fit-window-to-doc?
107;; - zoom the region around the cursor (like xdvi). 111;; - zoom the region around the cursor (like xdvi).
108;; - get rid of the silly arrow in the fringe. 112;; - get rid of the silly arrow in the fringe.
109;; - improve anti-aliasing (pdf-utils gets it better). 113;; - improve anti-aliasing (pdf-utils gets it better).
@@ -340,6 +344,7 @@ Can be `dvi', `pdf', or `ps'.")
340 ;; Slicing the image 344 ;; Slicing the image
341 (define-key map (kbd "s s") 'doc-view-set-slice) 345 (define-key map (kbd "s s") 'doc-view-set-slice)
342 (define-key map (kbd "s m") 'doc-view-set-slice-using-mouse) 346 (define-key map (kbd "s m") 'doc-view-set-slice-using-mouse)
347 (define-key map (kbd "s b") 'doc-view-set-slice-from-bounding-box)
343 (define-key map (kbd "s r") 'doc-view-reset-slice) 348 (define-key map (kbd "s r") 'doc-view-reset-slice)
344 ;; Searching 349 ;; Searching
345 (define-key map (kbd "C-s") 'doc-view-search) 350 (define-key map (kbd "C-s") 'doc-view-search)
@@ -381,6 +386,7 @@ Can be `dvi', `pdf', or `ps'.")
381 ) 386 )
382 "---" 387 "---"
383 ["Set Slice" doc-view-set-slice-using-mouse] 388 ["Set Slice" doc-view-set-slice-using-mouse]
389 ["Set Slice (BoundingBox)" doc-view-set-slice-from-bounding-box]
384 ["Set Slice (manual)" doc-view-set-slice] 390 ["Set Slice (manual)" doc-view-set-slice]
385 ["Reset Slice" doc-view-reset-slice] 391 ["Reset Slice" doc-view-reset-slice]
386 "---" 392 "---"
@@ -991,8 +997,9 @@ You can use this function to tell doc-view not to display the
991margins of the document. It prompts for the top-left corner (X 997margins of the document. It prompts for the top-left corner (X
992and Y) of the slice to display and its WIDTH and HEIGHT. 998and Y) of the slice to display and its WIDTH and HEIGHT.
993 999
994See `doc-view-set-slice-using-mouse' for a more convenient way to 1000See `doc-view-set-slice-using-mouse' and
995do that. To reset the slice use `doc-view-reset-slice'." 1001`doc-view-set-slice-from-bounding-box' for more convenient ways
1002to do that. To reset the slice use `doc-view-reset-slice'."
996 (interactive 1003 (interactive
997 (let* ((size (image-size (doc-view-current-image) t)) 1004 (let* ((size (image-size (doc-view-current-image) t))
998 (a (read-number (format "Top-left X (0..%d): " (car size)))) 1005 (a (read-number (format "Top-left X (0..%d): " (car size))))
@@ -1023,6 +1030,79 @@ dragging it to its bottom-right corner. See also
1023 (setq done t)))) 1030 (setq done t))))
1024 (doc-view-set-slice x y w h))) 1031 (doc-view-set-slice x y w h)))
1025 1032
1033(defun doc-view-get-bounding-box ()
1034 "Get the BoundingBox information of the current page."
1035 (let* ((page (doc-view-current-page))
1036 (o (shell-command-to-string
1037 (concat doc-view-ghostscript-program
1038 " -dSAFER -dBATCH -dNOPAUSE -q -sDEVICE=bbox "
1039 (format "-dFirstPage=%s -dLastPage=%s %s"
1040 page page
1041 doc-view-buffer-file-name)))))
1042 (save-match-data
1043 (when (string-match (concat "%%BoundingBox: "
1044 "\\([[:digit:]]+\\) \\([[:digit:]]+\\) "
1045 "\\([[:digit:]]+\\) \\([[:digit:]]+\\)") o)
1046 (mapcar #'string-to-number
1047 (list (match-string 1 o)
1048 (match-string 2 o)
1049 (match-string 3 o)
1050 (match-string 4 o)))))))
1051
1052(defvar doc-view-paper-sizes
1053 '((a4 595 842)
1054 (a4-landscape 842 595)
1055 (letter 612 792)
1056 (letter-landscape 792 612)
1057 (legal 612 1008)
1058 (legal-landscape 1008 612)
1059 (a3 842 1191)
1060 (a3-landscape 1191 842)
1061 (tabloid 792 1224)
1062 (ledger 1224 792))
1063 "An alist from paper size names to dimensions.")
1064
1065(defun doc-view-guess-paper-size (iw ih)
1066 "Guess the paper size according to the aspect ratio."
1067 (cl-labels ((div (x y)
1068 (round (/ (* 100.0 x) y))))
1069 (let ((ar (div iw ih))
1070 (al (mapcar (lambda (l)
1071 (list (div (nth 1 l) (nth 2 l)) (car l)))
1072 doc-view-paper-sizes)))
1073 (cadr (assoc ar al)))))
1074
1075(defun doc-view-scale-bounding-box (ps iw ih bb)
1076 (list (/ (* (nth 0 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes)))
1077 (/ (* (nth 1 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes)))
1078 (/ (* (nth 2 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes)))
1079 (/ (* (nth 3 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes)))))
1080
1081(defun doc-view-set-slice-from-bounding-box (&optional force-paper-size)
1082 "Set the slice from the document's BoundingBox information.
1083The result is that the margins are almost completely cropped,
1084much more accurate than could be done manually using
1085`doc-view-set-slice-using-mouse'."
1086 (interactive "P")
1087 (let ((bb (doc-view-get-bounding-box)))
1088 (if (not bb)
1089 (message "BoundingBox couldn't be determined")
1090 (let* ((is (image-size (doc-view-current-image) t))
1091 (iw (car is))
1092 (ih (cdr is))
1093 (ps (or (and (null force-paper-size) (doc-view-guess-paper-size iw ih))
1094 (intern (completing-read "Paper size: "
1095 (mapcar #'car doc-view-paper-sizes)
1096 nil t))))
1097 (bb (doc-view-scale-bounding-box ps iw ih bb))
1098 (x1 (nth 0 bb))
1099 (y1 (nth 1 bb))
1100 (x2 (nth 2 bb))
1101 (y2 (nth 3 bb)))
1102 ;; We keep a 2 pixel margin.
1103 (doc-view-set-slice (- x1 2) (- ih y2 2)
1104 (+ (- x2 x1) 4) (+ (- y2 y1) 4))))))
1105
1026(defun doc-view-reset-slice () 1106(defun doc-view-reset-slice ()
1027 "Reset the current slice. 1107 "Reset the current slice.
1028After calling this function whole pages will be visible again." 1108After calling this function whole pages will be visible again."
@@ -1089,13 +1169,16 @@ Predicate for sorting `doc-view-current-files'."
1089If FORCE is non-nil, start viewing even if the document does not 1169If FORCE is non-nil, start viewing even if the document does not
1090have the page we want to view." 1170have the page we want to view."
1091 (with-current-buffer buffer 1171 (with-current-buffer buffer
1092 (let ((prev-pages doc-view-current-files)) 1172 (let ((prev-pages doc-view-current-files)
1173 (windows (get-buffer-window-list buffer nil t)))
1093 (setq doc-view-current-files 1174 (setq doc-view-current-files
1094 (sort (directory-files (doc-view-current-cache-dir) t 1175 (sort (directory-files (doc-view-current-cache-dir) t
1095 "page-[0-9]+\\.png" t) 1176 "page-[0-9]+\\.png" t)
1096 'doc-view-sort)) 1177 'doc-view-sort))
1097 (dolist (win (or (get-buffer-window-list buffer nil t) 1178 (unless windows
1098 (list (selected-window)))) 1179 (switch-to-buffer buffer)
1180 (setq windows (get-buffer-window-list buffer nil t)))
1181 (dolist (win windows)
1099 (let* ((page (doc-view-current-page win)) 1182 (let* ((page (doc-view-current-page win))
1100 (pagefile (expand-file-name (format "page-%d.png" page) 1183 (pagefile (expand-file-name (format "page-%d.png" page)
1101 (doc-view-current-cache-dir)))) 1184 (doc-view-current-cache-dir))))
@@ -1103,8 +1186,8 @@ have the page we want to view."
1103 (and (not (member pagefile prev-pages)) 1186 (and (not (member pagefile prev-pages))
1104 (member pagefile doc-view-current-files))) 1187 (member pagefile doc-view-current-files)))
1105 (with-selected-window win 1188 (with-selected-window win
1106 (cl-assert (eq (current-buffer) buffer)) 1189 (cl-assert (eq (current-buffer) buffer) t)
1107 (doc-view-goto-page page)))))))) 1190 (doc-view-goto-page page))))))))
1108 1191
1109(defun doc-view-buffer-message () 1192(defun doc-view-buffer-message ()
1110 ;; Only show this message initially, not when refreshing the buffer (in which 1193 ;; Only show this message initially, not when refreshing the buffer (in which
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index d1382f42b19..93e890a20c9 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -312,7 +312,7 @@ This uses `defvaralias' and `make-obsolete-variable' (which see).
312See the Info node `(elisp)Variable Aliases' for more details. 312See the Info node `(elisp)Variable Aliases' for more details.
313 313
314If CURRENT-NAME is a defcustom (more generally, any variable 314If CURRENT-NAME is a defcustom (more generally, any variable
315where OBSOLETE-NAME may be set, e.g. in a .emacs file, before the 315where OBSOLETE-NAME may be set, e.g. in an init file, before the
316alias is defined), then the define-obsolete-variable-alias 316alias is defined), then the define-obsolete-variable-alias
317statement should be evaluated before the defcustom, if user 317statement should be evaluated before the defcustom, if user
318customizations are to be respected. The simplest way to achieve 318customizations are to be respected. The simplest way to achieve
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index c42ae21aae5..7a229750178 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1115,18 +1115,12 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
1115 "Warn that SYMBOL (a variable or function) is obsolete." 1115 "Warn that SYMBOL (a variable or function) is obsolete."
1116 (when (byte-compile-warning-enabled-p 'obsolete) 1116 (when (byte-compile-warning-enabled-p 'obsolete)
1117 (let* ((funcp (get symbol 'byte-obsolete-info)) 1117 (let* ((funcp (get symbol 'byte-obsolete-info))
1118 (obsolete (or funcp (get symbol 'byte-obsolete-variable))) 1118 (msg (macroexp--obsolete-warning
1119 (instead (car obsolete)) 1119 symbol
1120 (asof (nth 2 obsolete))) 1120 (or funcp (get symbol 'byte-obsolete-variable))
1121 (if funcp "function" "variable"))))
1121 (unless (and funcp (memq symbol byte-compile-not-obsolete-funcs)) 1122 (unless (and funcp (memq symbol byte-compile-not-obsolete-funcs))
1122 (byte-compile-warn "`%s' is an obsolete %s%s%s" symbol 1123 (byte-compile-warn "%s" msg)))))
1123 (if funcp "function" "variable")
1124 (if asof (concat " (as of " asof ")") "")
1125 (cond ((stringp instead)
1126 (concat "; " instead))
1127 (instead
1128 (format "; use `%s' instead." instead))
1129 (t ".")))))))
1130 1124
1131(defun byte-compile-report-error (error-info) 1125(defun byte-compile-report-error (error-info)
1132 "Report Lisp error in compilation. ERROR-INFO is the error data." 1126 "Report Lisp error in compilation. ERROR-INFO is the error data."
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 532c81c502c..5749ff91b40 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -121,7 +121,7 @@ a future Emacs interpreter will be able to use it.")
121 121
122;;; Generalized variables. 122;;; Generalized variables.
123;; These macros are defined here so that they 123;; These macros are defined here so that they
124;; can safely be used in .emacs files. 124;; can safely be used in init files.
125 125
126(defmacro cl-incf (place &optional x) 126(defmacro cl-incf (place &optional x)
127 "Increment PLACE by X (1 by default). 127 "Increment PLACE by X (1 by default).
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 774b4d3d600..6fd52d67b90 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -75,9 +75,9 @@ window previously showing the debugger buffer.
75The value used here is passed to `quit-restore-window'." 75The value used here is passed to `quit-restore-window'."
76 :type '(choice 76 :type '(choice
77 (const :tag "Keep alive" nil) 77 (const :tag "Keep alive" nil)
78 (const :tag "Append" 'append) 78 (const :tag "Append" append)
79 (const :tag "Bury" 'bury) 79 (const :tag "Bury" bury)
80 (const :tag "Kill" 'kill)) 80 (const :tag "Kill" kill))
81 :group 'debugger 81 :group 'debugger
82 :version "24.2") 82 :version "24.2")
83 83
@@ -166,6 +166,7 @@ first will be printed into the backtrace buffer."
166 (with-current-buffer (get-buffer "*Backtrace*") 166 (with-current-buffer (get-buffer "*Backtrace*")
167 (list major-mode (buffer-string))))) 167 (list major-mode (buffer-string)))))
168 (debugger-buffer (get-buffer-create "*Backtrace*")) 168 (debugger-buffer (get-buffer-create "*Backtrace*"))
169 (debugger-old-buffer (current-buffer))
169 (debugger-window nil) 170 (debugger-window nil)
170 (debugger-step-after-exit nil) 171 (debugger-step-after-exit nil)
171 (debugger-will-be-back nil) 172 (debugger-will-be-back nil)
@@ -265,7 +266,8 @@ first will be printed into the backtrace buffer."
265 ;; Make sure we unbind buffer-read-only in the right buffer. 266 ;; Make sure we unbind buffer-read-only in the right buffer.
266 (save-excursion 267 (save-excursion
267 (recursive-edit)))) 268 (recursive-edit))))
268 (when (and (window-live-p debugger-window) 269 (when (and (not debugger-will-be-back)
270 (window-live-p debugger-window)
269 (eq (window-buffer debugger-window) debugger-buffer)) 271 (eq (window-buffer debugger-window) debugger-buffer))
270 ;; Record height of debugger window. 272 ;; Record height of debugger window.
271 (setq debugger-previous-window-height 273 (setq debugger-previous-window-height
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 394225d697e..cab693fecac 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -100,17 +100,42 @@ each clause."
100 (error (message "Compiler-macro error for %S: %S" (car form) err) 100 (error (message "Compiler-macro error for %S: %S" (car form) err)
101 form))) 101 form)))
102 102
103(defun macroexp--eval-if-compile (&rest _forms) 103(defun macroexp--funcall-if-compiled (_form)
104 "Pseudo function used internally by macroexp to delay warnings. 104 "Pseudo function used internally by macroexp to delay warnings.
105The purpose is to delay warnings to bytecomp.el, so they can use things 105The purpose is to delay warnings to bytecomp.el, so they can use things
106like `byte-compile-log-warning' to get better file-and-line-number data 106like `byte-compile-log-warning' to get better file-and-line-number data
107and also to avoid outputting the warning during normal execution." 107and also to avoid outputting the warning during normal execution."
108 nil) 108 nil)
109(put 'macroexp--eval-if-compile 'byte-compile 109(put 'macroexp--funcall-if-compiled 'byte-compile
110 (lambda (form) 110 (lambda (form)
111 (mapc (lambda (x) (funcall (eval x))) (cdr form)) 111 (funcall (eval (cadr form)))
112 (byte-compile-constant nil))) 112 (byte-compile-constant nil)))
113 113
114(defun macroexp--warn-and-return (msg form)
115 (let ((when-compiled (lambda () (byte-compile-log-warning msg t))))
116 (cond
117 ((null msg) form)
118 ;; FIXME: ¡¡Major Ugly Hack!! To determine whether the output of this
119 ;; macro-expansion will be processed by the byte-compiler, we check
120 ;; circumstantial evidence.
121 ((member '(declare-function . byte-compile-macroexpand-declare-function)
122 macroexpand-all-environment)
123 `(progn
124 (macroexp--funcall-if-compiled ',when-compiled)
125 ,form))
126 (t
127 (message "%s" msg)
128 form))))
129
130(defun macroexp--obsolete-warning (fun obsolescence-data type)
131 (let ((instead (car obsolescence-data))
132 (asof (nth 2 obsolescence-data)))
133 (format "`%s' is an obsolete %s%s%s" fun type
134 (if asof (concat " (as of " asof ")") "")
135 (cond ((stringp instead) (concat "; " instead))
136 (instead (format "; use `%s' instead." instead))
137 (t ".")))))
138
114(defun macroexp--expand-all (form) 139(defun macroexp--expand-all (form)
115 "Expand all macros in FORM. 140 "Expand all macros in FORM.
116This is an internal version of `macroexpand-all'. 141This is an internal version of `macroexpand-all'.
@@ -130,9 +155,11 @@ Assumes the caller has bound `macroexpand-all-environment'."
130 (car-safe form) 155 (car-safe form)
131 (symbolp (car form)) 156 (symbolp (car form))
132 (get (car form) 'byte-obsolete-info)) 157 (get (car form) 'byte-obsolete-info))
133 `(progn (macroexp--eval-if-compile 158 (let* ((fun (car form))
134 (lambda () (byte-compile-warn-obsolete ',(car form)))) 159 (obsolete (get fun 'byte-obsolete-info)))
135 ,new-form) 160 (macroexp--warn-and-return
161 (macroexp--obsolete-warning fun obsolete "macro")
162 new-form))
136 new-form))) 163 new-form)))
137 (pcase form 164 (pcase form
138 (`(cond . ,clauses) 165 (`(cond . ,clauses)
@@ -175,26 +202,16 @@ Assumes the caller has bound `macroexpand-all-environment'."
175 ;; First arg is a function: 202 ;; First arg is a function:
176 (`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc)) 203 (`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc))
177 ',(and f `(lambda . ,_)) . ,args) 204 ',(and f `(lambda . ,_)) . ,args)
178 (byte-compile-log-warning 205 (macroexp--warn-and-return
179 (format "%s quoted with ' rather than with #'" 206 (format "%s quoted with ' rather than with #'"
180 (list 'lambda (nth 1 f) '...)) 207 (list 'lambda (nth 1 f) '...))
181 t) 208 (macroexp--expand-all `(,fun ,f . ,args))))
182 ;; We don't use `macroexp--cons' since there's clearly a change.
183 (cons fun
184 (cons (macroexp--expand-all (list 'function f))
185 (macroexp--all-forms args))))
186 ;; Second arg is a function: 209 ;; Second arg is a function:
187 (`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args) 210 (`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args)
188 (byte-compile-log-warning 211 (macroexp--warn-and-return
189 (format "%s quoted with ' rather than with #'" 212 (format "%s quoted with ' rather than with #'"
190 (list 'lambda (nth 1 f) '...)) 213 (list 'lambda (nth 1 f) '...))
191 t) 214 (macroexp--expand-all `(,fun ,arg1 ,f . ,args))))
192 ;; We don't use `macroexp--cons' since there's clearly a change.
193 (cons fun
194 (cons (macroexp--expand-all arg1)
195 (cons (macroexp--expand-all
196 (list 'function f))
197 (macroexp--all-forms args)))))
198 (`(,func . ,_) 215 (`(,func . ,_)
199 ;; Macro expand compiler macros. This cannot be delayed to 216 ;; Macro expand compiler macros. This cannot be delayed to
200 ;; byte-optimize-form because the output of the compiler-macro can 217 ;; byte-optimize-form because the output of the compiler-macro can
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index 286c4937b5b..bceec296ad8 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -158,8 +158,14 @@ See the documentation for `list-load-path-shadows' for further information."
158 (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2)))))))) 158 (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2))))))))
159 159
160(defvar load-path-shadows-font-lock-keywords 160(defvar load-path-shadows-font-lock-keywords
161 ;; The idea is that shadows of files supplied with Emacs are more
162 ;; serious than various versions of external packages shadowing each
163 ;; other.
161 `((,(format "hides \\(%s.*\\)" 164 `((,(format "hides \\(%s.*\\)"
162 (file-name-directory (locate-library "simple.el"))) 165 (file-name-directory
166 (or (locate-library "simple")
167 (file-name-as-directory
168 (expand-file-name "../lisp" data-directory)))))
163 . (1 font-lock-warning-face))) 169 . (1 font-lock-warning-face)))
164 "Keywords to highlight in `load-path-shadows-mode'.") 170 "Keywords to highlight in `load-path-shadows-mode'.")
165 171
diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el
index 7fc24773b9e..87b6bcf0aa9 100644
--- a/lisp/emulation/edt-mapper.el
+++ b/lisp/emulation/edt-mapper.el
@@ -61,7 +61,7 @@
61 61
62;; emacs -q -l edt-mapper.el 62;; emacs -q -l edt-mapper.el
63 63
64;; The "-q" option prevents loading of your .emacs file (commands 64;; The "-q" option prevents loading of your init file (commands
65;; therein might confuse this program). 65;; therein might confuse this program).
66 66
67;; An instruction screen showing the typical LK-201 terminal 67;; An instruction screen showing the typical LK-201 terminal
@@ -74,7 +74,7 @@
74;; and loaded automatically when the EDT emulation is started. If 74;; and loaded automatically when the EDT emulation is started. If
75;; you specify a different file name, you will need to set the 75;; you specify a different file name, you will need to set the
76;; variable "edt-keys-file" before starting the EDT emulation. 76;; variable "edt-keys-file" before starting the EDT emulation.
77;; Here's how you might go about doing that in your .emacs file. 77;; Here's how you might go about doing that in your init file:
78 78
79;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) 79;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys"))
80 80
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index dbd13a01a8b..3810dcccbb3 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -48,7 +48,7 @@
48 48
49;; You can have the EDT Emulation start up automatically, each time 49;; You can have the EDT Emulation start up automatically, each time
50;; you initiate a GNU Emacs session, by adding the following line to 50;; you initiate a GNU Emacs session, by adding the following line to
51;; your .emacs file: 51;; your init file:
52;; 52;;
53;; (add-hook term-setup-hook 'edt-emulation-on) 53;; (add-hook term-setup-hook 'edt-emulation-on)
54 54
@@ -75,7 +75,7 @@
75;; default, this feature is enabled, with the top margin set to 75;; default, this feature is enabled, with the top margin set to
76;; 10% of the window and the bottom margin set to 15% of the 76;; 10% of the window and the bottom margin set to 15% of the
77;; window. To change these settings, you can invoke the function 77;; window. To change these settings, you can invoke the function
78;; edt-set-scroll-margins in your .emacs file. For example, the 78;; edt-set-scroll-margins in your init file. For example, the
79;; following line 79;; following line
80;; 80;;
81;; (edt-set-scroll-margins "20%" "25%") 81;; (edt-set-scroll-margins "20%" "25%")
@@ -363,7 +363,7 @@ This means that an edt-user.el file was found in the user's `load-path'.")
363;;; 363;;;
364;;; (setq edt-keep-current-page-delimiter t) 364;;; (setq edt-keep-current-page-delimiter t)
365;;; 365;;;
366;;; in your .emacs file. 366;;; in your init file.
367 367
368(defun edt-page-forward (num) 368(defun edt-page-forward (num)
369 "Move forward to just after next page delimiter. 369 "Move forward to just after next page delimiter.
@@ -1961,14 +1961,14 @@ created."
1961 Ack!! You're running the Enhanced EDT Emulation without loading an 1961 Ack!! You're running the Enhanced EDT Emulation without loading an
1962 EDT key mapping file. To create an EDT key mapping file, run the 1962 EDT key mapping file. To create an EDT key mapping file, run the
1963 edt-mapper program. It is safest to run it from an Emacs loaded 1963 edt-mapper program. It is safest to run it from an Emacs loaded
1964 without any of your own customizations found in your .emacs file, etc. 1964 without any of your own customizations found in your init file, etc.
1965 The reason for this is that some user customizations confuse edt-mapper. 1965 The reason for this is that some user customizations confuse edt-mapper.
1966 You can do this by quitting Emacs and then invoking Emacs again as 1966 You can do this by quitting Emacs and then invoking Emacs again as
1967 follows: 1967 follows:
1968 1968
1969 emacs -q -l edt-mapper 1969 emacs -q -l edt-mapper
1970 1970
1971 [NOTE: If you do nothing out of the ordinary in your .emacs file, and 1971 [NOTE: If you do nothing out of the ordinary in your init file, and
1972 the search for edt-mapper is successful, you can try running it now.] 1972 the search for edt-mapper is successful, you can try running it now.]
1973 1973
1974 The library edt-mapper includes these same directions on how to 1974 The library edt-mapper includes these same directions on how to
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el
index b8d07e8b744..d375725af56 100644
--- a/lisp/emulation/tpu-edt.el
+++ b/lisp/emulation/tpu-edt.el
@@ -163,8 +163,8 @@
163;; and type `tpu-edt' followed by a carriage return. 163;; and type `tpu-edt' followed by a carriage return.
164 164
165;; If you like TPU-edt and want to use it all the time, you can start 165;; If you like TPU-edt and want to use it all the time, you can start
166;; TPU-edt using the Emacs initialization file, .emacs. Simply create 166;; TPU-edt using the Emacs initialization file, .emacs. Simply add
167;; a .emacs file in your home directory containing the line: 167;; the following line to your init file:
168 168
169;; (tpu-edt) 169;; (tpu-edt)
170 170
@@ -2440,7 +2440,7 @@ If FILE is nil, try to load a default file. The default file names are
2440 2440
2441 2441
2442;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins 2442;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins
2443;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "76f06905db4c5bfb3b86491a51512a0e") 2443;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "bf5e7322f9a2c324a3bb306415813374")
2444;;; Generated autoloads from tpu-extras.el 2444;;; Generated autoloads from tpu-extras.el
2445 2445
2446(autoload 'tpu-cursor-free-mode "tpu-extras" "\ 2446(autoload 'tpu-cursor-free-mode "tpu-extras" "\
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el
index 521b189e3bc..4cf9eee037b 100644
--- a/lisp/emulation/tpu-extras.el
+++ b/lisp/emulation/tpu-extras.el
@@ -26,7 +26,7 @@
26 26
27;; Use the functions defined here to customize TPU-edt to your tastes by 27;; Use the functions defined here to customize TPU-edt to your tastes by
28;; setting scroll margins and/or turning on free cursor mode. Here's an 28;; setting scroll margins and/or turning on free cursor mode. Here's an
29;; example for your .emacs file. 29;; example for your init file.
30 30
31;; (tpu-set-cursor-free) ; Set cursor free. 31;; (tpu-set-cursor-free) ; Set cursor free.
32;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins. 32;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins.
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el
index ef4e9b305fc..9cced60816c 100644
--- a/lisp/emulation/tpu-mapper.el
+++ b/lisp/emulation/tpu-mapper.el
@@ -81,7 +81,7 @@ Finally, you will be prompted for the name of the file to store the key
81definitions. If you chose the default, TPU-edt will find it and load it 81definitions. If you chose the default, TPU-edt will find it and load it
82automatically. If you specify a different file name, you will need to 82automatically. If you specify a different file name, you will need to
83set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how 83set the variable ``tpu-xkeys-file'' before starting TPU-edt. Here's how
84you might go about doing that in your .emacs file. 84you might go about doing that in your init file.
85 85
86 (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\")) 86 (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\"))
87 (tpu-edt) 87 (tpu-edt)
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el
index 9bf108c8c38..a59dd610c21 100644
--- a/lisp/emulation/vi.el
+++ b/lisp/emulation/vi.el
@@ -28,7 +28,7 @@
28;; (if (not (or (eq major-mode 'Info-mode) 28;; (if (not (or (eq major-mode 'Info-mode)
29;; (eq major-mode 'vi-mode))) 29;; (eq major-mode 'vi-mode)))
30;; (vi-mode)))))) 30;; (vi-mode))))))
31;; 3) In your .emacs file you can define the command "vi-mode" to be "autoload" 31;; 3) In your init file you can define the command "vi-mode" to be "autoload"
32;; or you can execute the "load" command to load "vi" directly. 32;; or you can execute the "load" command to load "vi" directly.
33;; 4) Read the comments for command "vi-mode" before you start using it. 33;; 4) Read the comments for command "vi-mode" before you start using it.
34 34
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 81fbfb0394c..8de253d19b0 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -351,7 +351,7 @@ user decide when to invoke Viper in a major mode."
351If t, viperize Emacs. If nil -- don't. If `ask', ask the user. 351If t, viperize Emacs. If nil -- don't. If `ask', ask the user.
352This variable is used primarily when Viper is being loaded. 352This variable is used primarily when Viper is being loaded.
353 353
354Must be set in `~/.emacs' before Viper is loaded. 354Must be set in your init file before Viper is loaded.
355DO NOT set this variable interactively, unless you are using the customization 355DO NOT set this variable interactively, unless you are using the customization
356widget." 356widget."
357 :type '(choice (const nil) (const t) (const ask)) 357 :type '(choice (const nil) (const t) (const ask))
@@ -1173,7 +1173,7 @@ If you wish to Viperize AND make this your way of life, please put
1173 (setq viper-mode t) 1173 (setq viper-mode t)
1174 (require 'viper) 1174 (require 'viper)
1175 1175
1176in your .emacs file (preferably, close to the top). 1176in your init file (preferably, close to the top).
1177These two lines must come in the order given. 1177These two lines must come in the order given.
1178 1178
1179** Viper users: 1179** Viper users:
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el
index be5b849651c..a16fa5abdd4 100644
--- a/lisp/epa-mail.el
+++ b/lisp/epa-mail.el
@@ -170,24 +170,26 @@ Don't use this command in Lisp programs!"
170If no one is selected, symmetric encryption will be performed. " 170If no one is selected, symmetric encryption will be performed. "
171 recipients) 171 recipients)
172 (if recipients 172 (if recipients
173 (mapcar 173 (apply
174 (lambda (recipient) 174 'nconc
175 (setq recipient-key 175 (mapcar
176 (epa-mail--find-usable-key 176 (lambda (recipient)
177 (epg-list-keys 177 (setq recipient-key
178 (epg-make-context epa-protocol) 178 (epa-mail--find-usable-key
179 (if (string-match "@" recipient) 179 (epg-list-keys
180 (concat "<" recipient ">") 180 (epg-make-context epa-protocol)
181 recipient)) 181 (if (string-match "@" recipient)
182 'encrypt)) 182 (concat "<" recipient ">")
183 (unless (or recipient-key 183 recipient))
184 (y-or-n-p 184 'encrypt))
185 (format 185 (unless (or recipient-key
186 "No public key for %s; skip it? " 186 (y-or-n-p
187 recipient))) 187 (format
188 (error "No public key for %s" recipient)) 188 "No public key for %s; skip it? "
189 recipient-key) 189 recipient)))
190 recipients))) 190 (error "No public key for %s" recipient))
191 (if recipient-key (list recipient-key)))
192 recipients))))
191 (setq sign (if verbose (y-or-n-p "Sign? "))) 193 (setq sign (if verbose (y-or-n-p "Sign? ")))
192 (if sign 194 (if sign
193 (epa-select-keys context 195 (epa-select-keys context
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 37e755e7655..674a6c97eec 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,9 @@
12012-09-17 Chong Yidong <cyd@gnu.org>
2
3 * erc-page.el (erc-page-function):
4
5 * erc-stamp.el (erc-stamp): Doc fix.
6
12012-08-21 Josh Feinstein <jlf@foxtail.org> 72012-08-21 Josh Feinstein <jlf@foxtail.org>
2 8
3 * erc-join.el (erc-autojoin-timing): Fix defcustom type. 9 * erc-join.el (erc-autojoin-timing): Fix defcustom type.
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index c8a7fec32bd..a0593dcb743 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -25,7 +25,7 @@
25 25
26;; Heavily borrowed from gnus-art.el. Thanks to the original authors. 26;; Heavily borrowed from gnus-art.el. Thanks to the original authors.
27;; This buttonizes nicks and other stuff to make it all clickable. 27;; This buttonizes nicks and other stuff to make it all clickable.
28;; To enable, add to your ~/.emacs: 28;; To enable, add to your init file:
29;; (require 'erc-button) 29;; (require 'erc-button)
30;; (erc-button-mode 1) 30;; (erc-button-mode 1)
31;; 31;;
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el
index 4f6361ee923..c7103d6dc61 100644
--- a/lisp/erc/erc-capab.el
+++ b/lisp/erc/erc-capab.el
@@ -48,7 +48,7 @@
48 48
49;;; Usage: 49;;; Usage:
50 50
51;; Put the following in your ~/.emacs file. 51;; Put the following in your init file.
52 52
53;; (require 'erc-capab) 53;; (require 'erc-capab)
54;; (erc-capab-identify-mode 1) 54;; (erc-capab-identify-mode 1)
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index cac042c0298..de7f2137197 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -29,7 +29,7 @@
29;; customizable variables. 29;; customizable variables.
30 30
31;; Usage: 31;; Usage:
32;; Put (erc-match-mode 1) into your ~/.emacs file. 32;; Put (erc-match-mode 1) into your init file.
33 33
34;;; Code: 34;;; Code:
35 35
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el
index 44fbc9563d6..355b345492c 100644
--- a/lisp/erc/erc-netsplit.el
+++ b/lisp/erc/erc-netsplit.el
@@ -23,7 +23,7 @@
23;;; Commentary: 23;;; Commentary:
24 24
25;; This module hides quit/join messages if a netsplit occurs. 25;; This module hides quit/join messages if a netsplit occurs.
26;; To enable, add the following to your ~/.emacs: 26;; To enable, add the following to your init file:
27;; (require 'erc-netsplit) 27;; (require 'erc-netsplit)
28;; (erc-netsplit-mode 1) 28;; (erc-netsplit-mode 1)
29 29
diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el
index e6b670c91ba..51ddc33e1c0 100644
--- a/lisp/erc/erc-page.el
+++ b/lisp/erc/erc-page.el
@@ -45,7 +45,7 @@ If nil, this prints the page message in the minibuffer and calls
45`beep'. If non-nil, it must be a function that takes two arguments: 45`beep'. If non-nil, it must be a function that takes two arguments:
46SENDER and MSG, both strings. 46SENDER and MSG, both strings.
47 47
48Example for your ~/.emacs file: 48Example for your init file:
49 49
50\(setq erc-page-function 50\(setq erc-page-function
51 (lambda (sender msg) 51 (lambda (sender msg)
diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el
index 04c5885bc3e..6c5804c62a4 100644
--- a/lisp/erc/erc-replace.el
+++ b/lisp/erc/erc-replace.el
@@ -25,7 +25,7 @@
25 25
26;; This module allows you to systematically replace text in incoming 26;; This module allows you to systematically replace text in incoming
27;; messages. Load erc-replace, and customize `erc-replace-alist'. 27;; messages. Load erc-replace, and customize `erc-replace-alist'.
28;; Then add to your ~/.emacs: 28;; Then add to your init file:
29 29
30;; (require 'erc-replace) 30;; (require 'erc-replace)
31;; (erc-replace-mode 1) 31;; (erc-replace-mode 1)
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index 5831233affe..4ce2f18e041 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -43,7 +43,7 @@ group provides settings related to the format and display
43of timestamp information in `erc-mode' buffer. 43of timestamp information in `erc-mode' buffer.
44 44
45For timestamping to be activated, you just need to load `erc-stamp' 45For timestamping to be activated, you just need to load `erc-stamp'
46in your .emacs file or interactively using `load-library'." 46in your init file or interactively using `load-library'."
47 :group 'erc) 47 :group 'erc)
48 48
49(defcustom erc-timestamp-format "[%H:%M]" 49(defcustom erc-timestamp-format "[%H:%M]"
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 9c56c724224..88a3285730d 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -24,7 +24,7 @@
24;;; Commentary: 24;;; Commentary:
25 25
26;; Highlights keywords and pals (friends), and hides or highlights fools 26;; Highlights keywords and pals (friends), and hides or highlights fools
27;; (using a dark color). Add to your ~/.emacs: 27;; (using a dark color). Add to your init file:
28 28
29;; (require 'erc-track) 29;; (require 'erc-track)
30;; (erc-track-mode 1) 30;; (erc-track-mode 1)
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index 4b62fec95e6..940056b6438 100644
--- a/lisp/eshell/em-alias.el
+++ b/lisp/eshell/em-alias.el
@@ -133,10 +133,10 @@ Each element of this alias is a list of the form:
133Where NAME is the textual name of the alias, and DEFINITION is the 133Where NAME is the textual name of the alias, and DEFINITION is the
134command string to replace that command with. 134command string to replace that command with.
135 135
136Note: this list should not be modified in your '.emacs' file. Rather, 136Note: this list should not be modified in your init file.
137any desired alias definitions should be declared using the `alias' 137Rather, any desired alias definitions should be declared using
138command, which will automatically write them to the file named by 138the `alias' command, which will automatically write them to the
139`eshell-aliases-file'.") 139file named by `eshell-aliases-file'.")
140 140
141(put 'eshell-command-aliases-list 'risky-local-variable t) 141(put 'eshell-command-aliases-list 'risky-local-variable t)
142 142
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 8218e91ddc7..fa0336232f9 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -84,7 +84,7 @@ Numeric form is tested using the regular expression
84NOTE: If you find that numeric conversions are interfering with the 84NOTE: If you find that numeric conversions are interfering with the
85specification of filenames (for example, in calling `find-file', or 85specification of filenames (for example, in calling `find-file', or
86some other Lisp function that deals with files, not numbers), add the 86some other Lisp function that deals with files, not numbers), add the
87following in your .emacs file: 87following in your init file:
88 88
89 (put 'find-file 'eshell-no-numeric-conversions t) 89 (put 'find-file 'eshell-no-numeric-conversions t)
90 90
diff --git a/lisp/ffap.el b/lisp/ffap.el
index ebe8b6dee94..f3e8d4c194e 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -34,7 +34,7 @@
34;; README's, MANIFEST's, and so on. Submit bugs or suggestions with 34;; README's, MANIFEST's, and so on. Submit bugs or suggestions with
35;; M-x ffap-bug. 35;; M-x ffap-bug.
36;; 36;;
37;; For the default installation, add this line to your .emacs file: 37;; For the default installation, add this line to your init file:
38;; 38;;
39;; (ffap-bindings) ; do default key bindings 39;; (ffap-bindings) ; do default key bindings
40;; 40;;
@@ -206,7 +206,7 @@ Sensible values are nil, \"news\", or \"mailto\"."
206;; those features interesting but not clear winners (a matter of 206;; those features interesting but not clear winners (a matter of
207;; personal taste) I try to leave options to enable them. Read 207;; personal taste) I try to leave options to enable them. Read
208;; through this section for features that you like, put an appropriate 208;; through this section for features that you like, put an appropriate
209;; enabler in your .emacs file. 209;; enabler in your init file.
210 210
211(defcustom ffap-dired-wildcards "[*?][^/]*\\'" 211(defcustom ffap-dired-wildcards "[*?][^/]*\\'"
212 "A regexp matching filename wildcard characters, or nil. 212 "A regexp matching filename wildcard characters, or nil.
diff --git a/lisp/filesets.el b/lisp/filesets.el
index 6c24a4f43d6..a91d8cf0fcb 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -35,7 +35,7 @@
35;; inclusion group (i.e. a base file including other files). 35;; inclusion group (i.e. a base file including other files).
36 36
37;; Usage: 37;; Usage:
38;; 1. Put (require 'filesets) and (filesets-init) in your .emacs file. 38;; 1. Put (require 'filesets) and (filesets-init) in your init file.
39;; 2. Type ;; M-x filesets-edit or choose "Edit Filesets" from the menu. 39;; 2. Type ;; M-x filesets-edit or choose "Edit Filesets" from the menu.
40;; 3. Save your customizations. 40;; 3. Save your customizations.
41 41
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el
index 747a4ca018c..b301886de5b 100644
--- a/lisp/flow-ctrl.el
+++ b/lisp/flow-ctrl.el
@@ -31,7 +31,7 @@
31;; 31;;
32;; To invoke these adjustments, a user need only invoke the function 32;; To invoke these adjustments, a user need only invoke the function
33;; enable-flow-control-on with a list of terminal types in his/her own 33;; enable-flow-control-on with a list of terminal types in his/her own
34;; .emacs file. As arguments, give it the names of one or more terminal 34;; init file. As arguments, give it the names of one or more terminal
35;; types in use by that user which require flow control adjustments. 35;; types in use by that user which require flow control adjustments.
36;; Here's an example: 36;; Here's an example:
37;; 37;;
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 77c21d26535..6404af7703a 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -37,7 +37,7 @@
37;; When this minor mode is on, the faces of the current line are updated with 37;; When this minor mode is on, the faces of the current line are updated with
38;; every insertion or deletion. 38;; every insertion or deletion.
39;; 39;;
40;; To turn Font Lock mode on automatically, add this to your ~/.emacs file: 40;; To turn Font Lock mode on automatically, add this to your init file:
41;; 41;;
42;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) 42;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
43;; 43;;
diff --git a/lisp/frame.el b/lisp/frame.el
index c182a964820..0bef358ecfb 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -301,7 +301,7 @@ there (in decreasing order of priority)."
301 ;; existing frame. We need to explicitly include 301 ;; existing frame. We need to explicitly include
302 ;; default-frame-alist in the parameters of the screen we 302 ;; default-frame-alist in the parameters of the screen we
303 ;; create here, so that its new value, gleaned from the user's 303 ;; create here, so that its new value, gleaned from the user's
304 ;; .emacs file, will be applied to the existing screen. 304 ;; init file, will be applied to the existing screen.
305 (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) 305 (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist)
306 (assq 'minibuffer window-system-frame-alist) 306 (assq 'minibuffer window-system-frame-alist)
307 (assq 'minibuffer default-frame-alist) 307 (assq 'minibuffer default-frame-alist)
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index cc7963b1711..a97c5649c95 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -28,7 +28,7 @@
28;; 28;;
29;; INSTALLATION: 29;; INSTALLATION:
30;; 30;;
31;; Add this line to your .emacs file: 31;; Add this line to your init file:
32;; 32;;
33;; (require 'generic-x) 33;; (require 'generic-x)
34;; 34;;
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 69f0025b524..45f23a6d99c 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,14 @@
12012-09-17 Richard Stallman <rms@gnu.org>
2
3 * message.el (message-in-body-p): Don't set mark or modify buffer.
4
5 * mml.el (mml-attach-file): Doc fix.
6 (mml-attach-external, mml-attach-buffer, mml-attach-file):
7 Set mail-encode-mml when in Mail mode.
8 Simplify code to set HEAD and move back to HEAD.
9 (mml-insert-multipart, mml-insert-part):
10 Set mail-encode-mml when in Mail mode.
11
12012-09-13 Katsumi Yamaoka <yamaoka@jpl.org> 122012-09-13 Katsumi Yamaoka <yamaoka@jpl.org>
2 13
3 * gnus-util.el (gnus-timer--function): New function. 14 * gnus-util.el (gnus-timer--function): New function.
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 42911ce0648..5360f008432 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -3160,8 +3160,12 @@ M-RET `message-newline-and-reformat' (break the line and reformat)."
3160 3160
3161(defun message-in-body-p () 3161(defun message-in-body-p ()
3162 "Return t if point is in the message body." 3162 "Return t if point is in the message body."
3163 (let ((body (save-excursion (message-goto-body)))) 3163 (>= (point)
3164 (>= (point) body))) 3164 (save-excursion
3165 (goto-char (point-min))
3166 (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
3167 (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t))
3168 (point))))
3165 3169
3166(defun message-goto-eoh () 3170(defun message-goto-eoh ()
3167 "Move point to the end of the headers." 3171 "Move point to the end of the headers."
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index cc1aedf1b97..a72962aae0d 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1305,7 +1305,8 @@ to specify options."
1305(defun mml-attach-file (file &optional type description disposition) 1305(defun mml-attach-file (file &optional type description disposition)
1306 "Attach a file to the outgoing MIME message. 1306 "Attach a file to the outgoing MIME message.
1307The file is not inserted or encoded until you send the message with 1307The file is not inserted or encoded until you send the message with
1308`\\[message-send-and-exit]' or `\\[message-send]'. 1308`\\[message-send-and-exit]' or `\\[message-send]' in Message mode,
1309or `\\[mail-send-and-exit]' or `\\[mail-send]' in Mail mode.
1309 1310
1310FILE is the name of the file to attach. TYPE is its 1311FILE is the name of the file to attach. TYPE is its
1311content-type, a string of the form \"type/subtype\". DESCRIPTION 1312content-type, a string of the form \"type/subtype\". DESCRIPTION
@@ -1319,11 +1320,9 @@ body) or \"attachment\" (separate from the body)."
1319 (description (mml-minibuffer-read-description)) 1320 (description (mml-minibuffer-read-description))
1320 (disposition (mml-minibuffer-read-disposition type nil file))) 1321 (disposition (mml-minibuffer-read-disposition type nil file)))
1321 (list file type description disposition))) 1322 (list file type description disposition)))
1322 ;; Don't move point if this command is invoked inside the message header. 1323 ;; If in the message header, attach at the end and leave point unchanged.
1323 (let ((head (unless (message-in-body-p) 1324 (let ((head (unless (message-in-body-p) (point))))
1324 (prog1 1325 (if head (goto-char (point-max)))
1325 (point)
1326 (goto-char (point-max))))))
1327 (mml-insert-empty-tag 'part 1326 (mml-insert-empty-tag 'part
1328 'type type 1327 'type type
1329 ;; icicles redefines read-file-name and returns a 1328 ;; icicles redefines read-file-name and returns a
@@ -1331,12 +1330,15 @@ body) or \"attachment\" (separate from the body)."
1331 'filename (mm-substring-no-properties file) 1330 'filename (mm-substring-no-properties file)
1332 'disposition (or disposition "attachment") 1331 'disposition (or disposition "attachment")
1333 'description description) 1332 'description description)
1333 ;; When using Mail mode, make sure it does the mime encoding
1334 ;; when you send the message.
1335 (or (eq mail-user-agent 'message-user-agent)
1336 (setq mail-encode-mml t))
1334 (when head 1337 (when head
1335 (unless (prog1 1338 (unless (pos-visible-in-window-p)
1336 (pos-visible-in-window-p)
1337 (goto-char head))
1338 (message "The file \"%s\" has been attached at the end of the message" 1339 (message "The file \"%s\" has been attached at the end of the message"
1339 (file-name-nondirectory file)))))) 1340 (file-name-nondirectory file)))
1341 (goto-char head))))
1340 1342
1341(defun mml-dnd-attach-file (uri action) 1343(defun mml-dnd-attach-file (uri action)
1342 "Attach a drag and drop file. 1344 "Attach a drag and drop file.
@@ -1372,21 +1374,22 @@ BUFFER is the name of the buffer to attach. See
1372 (description (mml-minibuffer-read-description)) 1374 (description (mml-minibuffer-read-description))
1373 (disposition (mml-minibuffer-read-disposition type nil))) 1375 (disposition (mml-minibuffer-read-disposition type nil)))
1374 (list buffer type description disposition))) 1376 (list buffer type description disposition)))
1375 ;; Don't move point if this command is invoked inside the message header. 1377 ;; If in the message header, attach at the end and leave point unchanged.
1376 (let ((head (unless (message-in-body-p) 1378 (let ((head (unless (message-in-body-p) (point))))
1377 (prog1 1379 (if head (goto-char (point-max)))
1378 (point)
1379 (goto-char (point-max))))))
1380 (mml-insert-empty-tag 'part 'type type 'buffer buffer 1380 (mml-insert-empty-tag 'part 'type type 'buffer buffer
1381 'disposition disposition 1381 'disposition disposition
1382 'description description) 1382 'description description)
1383 ;; When using Mail mode, make sure it does the mime encoding
1384 ;; when you send the message.
1385 (or (eq mail-user-agent 'message-user-agent)
1386 (setq mail-encode-mml t))
1383 (when head 1387 (when head
1384 (unless (prog1 1388 (unless (pos-visible-in-window-p)
1385 (pos-visible-in-window-p)
1386 (goto-char head))
1387 (message 1389 (message
1388 "The buffer \"%s\" has been attached at the end of the message" 1390 "The buffer \"%s\" has been attached at the end of the message"
1389 buffer))))) 1391 buffer))
1392 (goto-char head))))
1390 1393
1391(defun mml-attach-external (file &optional type description) 1394(defun mml-attach-external (file &optional type description)
1392 "Attach an external file into the buffer. 1395 "Attach an external file into the buffer.
@@ -1397,19 +1400,20 @@ TYPE is the MIME type to use."
1397 (type (mml-minibuffer-read-type file)) 1400 (type (mml-minibuffer-read-type file))
1398 (description (mml-minibuffer-read-description))) 1401 (description (mml-minibuffer-read-description)))
1399 (list file type description))) 1402 (list file type description)))
1400 ;; Don't move point if this command is invoked inside the message header. 1403 ;; If in the message header, attach at the end and leave point unchanged.
1401 (let ((head (unless (message-in-body-p) 1404 (let ((head (unless (message-in-body-p) (point))))
1402 (prog1 1405 (if head (goto-char (point-max)))
1403 (point)
1404 (goto-char (point-max))))))
1405 (mml-insert-empty-tag 'external 'type type 'name file 1406 (mml-insert-empty-tag 'external 'type type 'name file
1406 'disposition "attachment" 'description description) 1407 'disposition "attachment" 'description description)
1408 ;; When using Mail mode, make sure it does the mime encoding
1409 ;; when you send the message.
1410 (or (eq mail-user-agent 'message-user-agent)
1411 (setq mail-encode-mml t))
1407 (when head 1412 (when head
1408 (unless (prog1 1413 (unless (pos-visible-in-window-p)
1409 (pos-visible-in-window-p)
1410 (goto-char head))
1411 (message "The file \"%s\" has been attached at the end of the message" 1414 (message "The file \"%s\" has been attached at the end of the message"
1412 (file-name-nondirectory file)))))) 1415 (file-name-nondirectory file)))
1416 (goto-char head))))
1413 1417
1414(defun mml-insert-multipart (&optional type) 1418(defun mml-insert-multipart (&optional type)
1415 (interactive (if (message-in-body-p) 1419 (interactive (if (message-in-body-p)
@@ -1422,12 +1426,20 @@ TYPE is the MIME type to use."
1422 (or type 1426 (or type
1423 (setq type "mixed")) 1427 (setq type "mixed"))
1424 (mml-insert-empty-tag "multipart" 'type type) 1428 (mml-insert-empty-tag "multipart" 'type type)
1429 ;; When using Mail mode, make sure it does the mime encoding
1430 ;; when you send the message.
1431 (or (eq mail-user-agent 'message-user-agent)
1432 (setq mail-encode-mml t))
1425 (forward-line -1)) 1433 (forward-line -1))
1426 1434
1427(defun mml-insert-part (&optional type) 1435(defun mml-insert-part (&optional type)
1428 (interactive (if (message-in-body-p) 1436 (interactive (if (message-in-body-p)
1429 (list (mml-minibuffer-read-type "")) 1437 (list (mml-minibuffer-read-type ""))
1430 (error "Use this command in the message body"))) 1438 (error "Use this command in the message body")))
1439 ;; When using Mail mode, make sure it does the mime encoding
1440 ;; when you send the message.
1441 (or (eq mail-user-agent 'message-user-agent)
1442 (setq mail-encode-mml t))
1431 (mml-insert-tag 'part 'type type 'disposition "inline")) 1443 (mml-insert-tag 'part 'type type 'disposition "inline"))
1432 1444
1433(declare-function message-subscribed-p "message" ()) 1445(declare-function message-subscribed-p "message" ())
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 644024a4b86..f92e2ab0af2 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -52,14 +52,14 @@
52;; 52;;
53;; Setup: 53;; Setup:
54;; 54;;
55;; Put the following code in your .emacs file. This turns on 55;; Put the following code in your init file. This turns on
56;; hi-lock mode and adds a "Regexp Highlighting" entry 56;; hi-lock mode and adds a "Regexp Highlighting" entry
57;; to the edit menu. 57;; to the edit menu.
58;; 58;;
59;; (global-hi-lock-mode 1) 59;; (global-hi-lock-mode 1)
60;; 60;;
61;; To enable the use of patterns found in files (presumably placed 61;; To enable the use of patterns found in files (presumably placed
62;; there by hi-lock) include the following in your .emacs file: 62;; there by hi-lock) include the following in your init file:
63;; 63;;
64;; (setq hi-lock-file-patterns-policy 'ask) 64;; (setq hi-lock-file-patterns-policy 'ask)
65;; 65;;
@@ -356,7 +356,7 @@ Hi-lock: end is found. A mode is excluded if it's in the list
356 "Possible archaic use of (hi-lock-mode). 356 "Possible archaic use of (hi-lock-mode).
357Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers, 357Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers,
358use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs 358use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs
359versions before 22 use the following in your .emacs file: 359versions before 22 use the following in your init file:
360 360
361 (if (functionp 'global-hi-lock-mode) 361 (if (functionp 'global-hi-lock-mode)
362 (global-hi-lock-mode 1) 362 (global-hi-lock-mode 1)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index c6e799252a2..77461469044 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -123,13 +123,13 @@ own!):
123 no upper limit on its size. The size will also be aligned to the 123 no upper limit on its size. The size will also be aligned to the
124 right. 124 right.
125 125
126Thus, if you wanted to use these two formats, add 126Thus, if you wanted to use these two formats, the appropriate
127value for this variable would be
127 128
128 (setq ibuffer-formats '((mark \" \" name) 129 '((mark \" \" name)
129 (mark modified read-only 130 (mark modified read-only
130 (name 16 16 :left) (size 6 -1 :right)))) 131 (name 16 16 :left)
131 132 (size 6 -1 :right)))
132to your ~/.emacs file.
133 133
134Using \\[ibuffer-switch-format], you can rotate the display between 134Using \\[ibuffer-switch-format], you can rotate the display between
135the specified formats in the list." 135the specified formats in the list."
diff --git a/lisp/ido.el b/lisp/ido.el
index 2100def1992..d48e7ba858b 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -493,6 +493,18 @@ as first char even if `ido-enable-prefix' is nil."
493 :type 'boolean 493 :type 'boolean
494 :group 'ido) 494 :group 'ido)
495 495
496;; See http://debbugs.gnu.org/2042 for more info.
497(defcustom ido-buffer-disable-smart-matches t
498 "Non-nil means not to re-order matches for buffer switching.
499By default, ido aranges matches in the following order:
500
501 full-matches > suffix matches > prefix matches > remaining matches
502
503which can get in the way for buffer switching."
504 :version "24.3"
505 :type 'boolean
506 :group 'ido)
507
496(defcustom ido-confirm-unique-completion nil 508(defcustom ido-confirm-unique-completion nil
497 "Non-nil means that even a unique completion must be confirmed. 509 "Non-nil means that even a unique completion must be confirmed.
498This means that \\[ido-complete] must always be followed by \\[ido-exit-minibuffer] 510This means that \\[ido-complete] must always be followed by \\[ido-exit-minibuffer]
@@ -3688,10 +3700,17 @@ This is to make them appear as if they were \"virtual buffers\"."
3688 (rex0 (if ido-enable-regexp text (regexp-quote text))) 3700 (rex0 (if ido-enable-regexp text (regexp-quote text)))
3689 (rexq (concat rex0 (if slash ".*/" ""))) 3701 (rexq (concat rex0 (if slash ".*/" "")))
3690 (re (if ido-enable-prefix (concat "\\`" rexq) rexq)) 3702 (re (if ido-enable-prefix (concat "\\`" rexq) rexq))
3691 (full-re (and do-full (not ido-enable-regexp) (not (string-match "\$\\'" rex0)) 3703 (full-re (and do-full
3704 (and (eq ido-cur-item 'buffer)
3705 (not ido-buffer-disable-smart-matches))
3706 (not ido-enable-regexp)
3707 (not (string-match "\$\\'" rex0))
3692 (concat "\\`" rex0 (if slash "/" "") "\\'"))) 3708 (concat "\\`" rex0 (if slash "/" "") "\\'")))
3693 (suffix-re (and do-full slash 3709 (suffix-re (and do-full slash
3694 (not ido-enable-regexp) (not (string-match "\$\\'" rex0)) 3710 (and (eq ido-cur-item 'buffer)
3711 (not ido-buffer-disable-smart-matches))
3712 (not ido-enable-regexp)
3713 (not (string-match "\$\\'" rex0))
3695 (concat rex0 "/\\'"))) 3714 (concat rex0 "/\\'")))
3696 (prefix-re (and full-re (not ido-enable-prefix) 3715 (prefix-re (and full-re (not ido-enable-prefix)
3697 (concat "\\`" rexq))) 3716 (concat "\\`" rexq)))
diff --git a/lisp/ielm.el b/lisp/ielm.el
index c93f235d81f..ba05bbcfc0f 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -59,7 +59,7 @@ override the read-only-ness of IELM prompts is to call
59`comint-kill-whole-line' or `comint-kill-region' with no 59`comint-kill-whole-line' or `comint-kill-region' with no
60narrowing in effect. This way you will be certain that none of 60narrowing in effect. This way you will be certain that none of
61the remaining prompts will be accidentally messed up. You may 61the remaining prompts will be accidentally messed up. You may
62wish to put something like the following in your `.emacs' file: 62wish to put something like the following in your init file:
63 63
64\(add-hook 'ielm-mode-hook 64\(add-hook 'ielm-mode-hook
65 (lambda () 65 (lambda ()
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el
index 39a88001112..3c34e5d9a2a 100644
--- a/lisp/international/ogonek.el
+++ b/lisp/international/ogonek.el
@@ -224,13 +224,14 @@ The functions come in the following groups.
224 ogonek-prefix-to-encoding iso8859-2 224 ogonek-prefix-to-encoding iso8859-2
225 225
226 The above default values can be changed by placing appropriate settings 226 The above default values can be changed by placing appropriate settings
227 in the '~/.emacs' file: 227 in your init file:
228 228
229 (setq ogonek-prefix-char ?/) 229 (setq ogonek-prefix-char ?/)
230 (setq ogonek-prefix-to-encoding \"iso8859-2\") 230 (setq ogonek-prefix-to-encoding \"iso8859-2\")
231 231
232 Instead of loading the whole library `ogonek' it may be better to 232 Instead of loading the whole library `ogonek' it may be better
233 autoload the needed functions, for example by placing in `~/.emacs': 233 to autoload the needed functions, for example by adding the
234 following lines to your init file:
234 235
235 (autoload 'ogonek-how \"ogonek\") 236 (autoload 'ogonek-how \"ogonek\")
236 (autoload 'ogonek-recode-region \"ogonek\") 237 (autoload 'ogonek-recode-region \"ogonek\")
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 04f5a7acc2c..37993767013 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1649,9 +1649,9 @@ characters in that string."
1649 (isearch-done nil t) 1649 (isearch-done nil t)
1650 (isearch-clean-overlays) 1650 (isearch-clean-overlays)
1651 (let ((default (car occur-collect-regexp-history))) 1651 (let ((default (car occur-collect-regexp-history)))
1652 (read-string 1652 (read-regexp
1653 (format "Regexp to collect (default %s): " default) 1653 (format "Regexp to collect (default %s): " default)
1654 nil 'occur-collect-regexp-history default))) 1654 default 'occur-collect-regexp-history)))
1655 ;; Otherwise normal occur takes numerical prefix argument. 1655 ;; Otherwise normal occur takes numerical prefix argument.
1656 (when current-prefix-arg 1656 (when current-prefix-arg
1657 (prefix-numeric-value current-prefix-arg)))))) 1657 (prefix-numeric-value current-prefix-arg))))))
diff --git a/lisp/locate.el b/lisp/locate.el
index 29d7c75cbb2..d172ce3d6c4 100644
--- a/lisp/locate.el
+++ b/lisp/locate.el
@@ -34,7 +34,7 @@
34;; 34;;
35;; SHELLPROGRAM Name-to-find 35;; SHELLPROGRAM Name-to-find
36;; 36;;
37;; set the variable `locate-command' in your .emacs file. 37;; set the variable `locate-command' in your init file.
38;; 38;;
39;; To use a more complicated expression, create a function which 39;; To use a more complicated expression, create a function which
40;; takes a string (the name to find) as input and returns a list. 40;; takes a string (the name to find) as input and returns a list.
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 6ee3c7898c5..ca9bc6b8676 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -308,9 +308,14 @@ usually do not have translators for other languages.\n\n")))
308 (insert "\n")) 308 (insert "\n"))
309 (insert "\n") 309 (insert "\n")
310 (insert "Load-path shadows:\n") 310 (insert "Load-path shadows:\n")
311 (message "Checking for load-path shadows...") 311 (let* ((msg "Checking for load-path shadows...")
312 (let ((shadows (list-load-path-shadows t))) 312 (result "done")
313 (message "Checking for load-path shadows...done") 313 (shadows (progn (message "%s" msg)
314 (condition-case nil (list-load-path-shadows t)
315 (error
316 (setq result "error")
317 "Error during checking")))))
318 (message "%s%s" msg result)
314 (insert (if (zerop (length shadows)) 319 (insert (if (zerop (length shadows))
315 "None found.\n" 320 "None found.\n"
316 shadows))) 321 shadows)))
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 520271940f2..4305094611a 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -139,9 +139,8 @@
139;; feedmail-send-it. Hers's the best way to use the stuff in this 139;; feedmail-send-it. Hers's the best way to use the stuff in this
140;; file: 140;; file:
141;; 141;;
142;; Save this file as feedmail.el somewhere on your elisp 142;; Save this file as feedmail.el somewhere on your elisp loadpath;
143;; loadpath; byte-compile it. Put the following lines somewhere in 143;; byte-compile it. Put the following lines in your init file:
144;; your ~/.emacs stuff:
145;; 144;;
146;; (setq send-mail-function 'feedmail-send-it) 145;; (setq send-mail-function 'feedmail-send-it)
147;; (autoload 'feedmail-send-it "feedmail") 146;; (autoload 'feedmail-send-it "feedmail")
diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el
index dd489e3c6a9..40d67b4e904 100644
--- a/lisp/mail/mail-hist.el
+++ b/lisp/mail/mail-hist.el
@@ -28,7 +28,7 @@
28;; time. 28;; time.
29;; 29;;
30;; To use this package, put it in a directory in your load-path, and 30;; To use this package, put it in a directory in your load-path, and
31;; put this in your .emacs file: 31;; put this in your init file:
32;; 32;;
33;; (load "mail-hist" nil t) 33;; (load "mail-hist" nil t)
34;; 34;;
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 290c57c1c55..2e4ffec1383 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -391,35 +391,24 @@ double-quotes."
391(defun mail-abbrev-expand-hook () 391(defun mail-abbrev-expand-hook ()
392 "For use as the fourth arg to `define-abbrev'. 392 "For use as the fourth arg to `define-abbrev'.
393After expanding a mail-abbrev, if Auto Fill mode is on and we're past the 393After expanding a mail-abbrev, if Auto Fill mode is on and we're past the
394fill-column, break the line at the previous comma, and indent the next line." 394fill-column, break the line at the previous comma, and indent the next line
395 ;; Disable abbrev mode to avoid recursion in indent-relative expanding 395with a space."
396 ;; part of the abbrev expansion as an abbrev itself. 396 (when auto-fill-function
397 (let ((abbrev-mode nil)) 397 (let (p)
398 (save-excursion 398 (save-excursion
399 (let ((p (point)) 399 (while (>= (current-column) fill-column)
400 bol comma fp) 400 (while (and (search-backward "," (point-at-bol) 'move)
401 (beginning-of-line) 401 (>= (current-column) (1- fill-column))
402 (setq bol (point)) 402 (setq p (point))))
403 (goto-char p) 403 (when (or (not (bolp))
404 (while (and auto-fill-function 404 (and p (goto-char p)))
405 (>= (current-column) fill-column) 405 (setq p nil)
406 (search-backward "," bol t)) 406 (forward-char 1)
407 (setq comma (point)) 407 (insert "\n")
408 (forward-char 1) ; Now we are just past the comma. 408 (when (looking-at "[\t ]+")
409 (insert "\n") 409 (delete-region (point) (match-end 0)))
410 (delete-horizontal-space) 410 (insert " ")
411 (setq p (point)) 411 (end-of-line)))))))
412 (indent-relative)
413 (setq fp (buffer-substring p (point)))
414 ;; Go to the end of the new line.
415 (end-of-line)
416 (if (> (current-column) fill-column)
417 ;; It's still too long; do normal auto-fill.
418 (let ((fill-prefix (or fp "\t")))
419 (do-auto-fill)))
420 ;; Resume the search.
421 (goto-char comma)
422 )))))
423 412
424;;; Syntax tables and abbrev-expansion 413;;; Syntax tables and abbrev-expansion
425 414
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index d88862b2d47..828cd6e72e7 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4068,6 +4068,13 @@ The variable `rmail-retry-ignored-headers' is a regular expression
4068specifying headers which should not be copied into the new message." 4068specifying headers which should not be copied into the new message."
4069 (interactive) 4069 (interactive)
4070 (require 'mail-utils) 4070 (require 'mail-utils)
4071 (if rmail-enable-mime
4072 (with-current-buffer rmail-buffer
4073 (if (rmail-mime-message-p)
4074 (let ((rmail-mime-mbox-buffer rmail-view-buffer)
4075 (rmail-mime-view-buffer rmail-buffer))
4076 (rmail-mime-toggle-raw 'raw)))))
4077
4071 (let ((rmail-this-buffer (current-buffer)) 4078 (let ((rmail-this-buffer (current-buffer))
4072 (msgnum rmail-current-message) 4079 (msgnum rmail-current-message)
4073 bounce-start bounce-end bounce-indent resending 4080 bounce-start bounce-end bounce-indent resending
@@ -4543,7 +4550,7 @@ encoded string (and the same mask) will decode the string."
4543;;; Start of automatically extracted autoloads. 4550;;; Start of automatically extracted autoloads.
4544 4551
4545;;;### (autoloads (rmail-edit-current-message) "rmailedit" "rmailedit.el" 4552;;;### (autoloads (rmail-edit-current-message) "rmailedit" "rmailedit.el"
4546;;;;;; "7d558f958574f6003fa474ce2f3c80a8") 4553;;;;;; "78b8b7d5c679935c118d595d473d7c5e")
4547;;; Generated autoloads from rmailedit.el 4554;;; Generated autoloads from rmailedit.el
4548 4555
4549(autoload 'rmail-edit-current-message "rmailedit" "\ 4556(autoload 'rmail-edit-current-message "rmailedit" "\
@@ -4598,7 +4605,7 @@ With prefix argument N moves forward N messages with these labels.
4598 4605
4599;;;*** 4606;;;***
4600 4607
4601;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "cd7656f82944d0b92b0d093a5f3a4c36") 4608;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "0c18b83f914803d1216e1a9df7ea5275")
4602;;; Generated autoloads from rmailmm.el 4609;;; Generated autoloads from rmailmm.el
4603 4610
4604(autoload 'rmail-mime "rmailmm" "\ 4611(autoload 'rmail-mime "rmailmm" "\
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index 0b837a43d94..e4e066bd642 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -111,6 +111,8 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'.
111 ;; Even if the message is in `raw' state, boundaries etc 111 ;; Even if the message is in `raw' state, boundaries etc
112 ;; are still missing. All we can do is insert the real 112 ;; are still missing. All we can do is insert the real
113 ;; raw message. (Bug#9840) 113 ;; raw message. (Bug#9840)
114 ;; FIXME? Since the 2012-09-17 changes to rmail-mime,
115 ;; can we just use that function now?
114 (when (and entity 116 (when (and entity
115 (not (equal "text/plain" 117 (not (equal "text/plain"
116 (car (rmail-mime-entity-type entity))))) 118 (car (rmail-mime-entity-type entity)))))
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 67b2e62275f..2cc57963ef7 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -389,13 +389,13 @@ Use `raw' for raw mode, and any other non-nil value for decoded mode."
389 ;; Enter the raw mode. 389 ;; Enter the raw mode.
390 (rmail-mime-raw-mode entity) 390 (rmail-mime-raw-mode entity)
391 ;; Enter the shown mode. 391 ;; Enter the shown mode.
392 (rmail-mime-shown-mode entity)) 392 (rmail-mime-shown-mode entity)
393 (let ((inhibit-read-only t) 393 (let ((inhibit-read-only t)
394 (modified (buffer-modified-p))) 394 (modified (buffer-modified-p)))
395 (save-excursion 395 (save-excursion
396 (goto-char (aref segment 1)) 396 (goto-char (aref segment 1))
397 (rmail-mime-insert entity) 397 (rmail-mime-insert entity)
398 (restore-buffer-modified-p modified))))) 398 (restore-buffer-modified-p modified))))))
399 399
400(defun rmail-mime-toggle-hidden () 400(defun rmail-mime-toggle-hidden ()
401 "Hide or show the body of the MIME-entity at point." 401 "Hide or show the body of the MIME-entity at point."
@@ -1212,7 +1212,7 @@ available."
1212 (if (rmail-mime-display-header current) 1212 (if (rmail-mime-display-header current)
1213 (delete-char (- (aref segment 2) (aref segment 1)))) 1213 (delete-char (- (aref segment 2) (aref segment 1))))
1214 (insert-buffer-substring rmail-mime-mbox-buffer 1214 (insert-buffer-substring rmail-mime-mbox-buffer
1215 (aref header 0) (aref header 1))) 1215 (aref header 0) (aref header 1)))
1216 ;; tagline 1216 ;; tagline
1217 (if (rmail-mime-display-tagline current) 1217 (if (rmail-mime-display-tagline current)
1218 (delete-char (- (aref segment 3) (aref segment 2)))) 1218 (delete-char (- (aref segment 3) (aref segment 2))))
@@ -1261,14 +1261,17 @@ The arguments ARG and STATE have no effect in this case."
1261 (interactive (list current-prefix-arg nil)) 1261 (interactive (list current-prefix-arg nil))
1262 (if rmail-enable-mime 1262 (if rmail-enable-mime
1263 (with-current-buffer rmail-buffer 1263 (with-current-buffer rmail-buffer
1264 (if (rmail-mime-message-p) 1264 (if (or (rmail-mime-message-p)
1265 (let ((rmail-mime-mbox-buffer rmail-view-buffer) 1265 (get-text-property (point-min) 'rmail-mime-hidden))
1266 (rmail-mime-view-buffer rmail-buffer) 1266 (let* ((hidden (get-text-property (point-min) 'rmail-mime-hidden))
1267 (entity (get-text-property 1267 (desired-hidden (if state (eq state 'raw) (not hidden))))
1268 (progn 1268 (unless (eq hidden desired-hidden)
1269 (or arg (goto-char (point-min))) 1269 (if (not desired-hidden)
1270 (point)) 'rmail-mime-entity))) 1270 (rmail-show-message rmail-current-message)
1271 (if (or (not arg) entity) (rmail-mime-toggle-raw state))) 1271 (let ((rmail-enable-mime nil)
1272 (inhibit-read-only t))
1273 (rmail-show-message rmail-current-message)
1274 (add-text-properties (point-min) (point-max) '(rmail-mime-hidden t))))))
1272 (message "Not a MIME message, just toggling headers") 1275 (message "Not a MIME message, just toggling headers")
1273 (rmail-toggle-header))) 1276 (rmail-toggle-header)))
1274 (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string)) 1277 (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string))
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el
index fdfe17a1a07..3d7495ffd1a 100644
--- a/lisp/mail/uce.el
+++ b/lisp/mail/uce.el
@@ -63,7 +63,7 @@
63;; Usage: 63;; Usage:
64 64
65;; Place uce.el in your load-path (and optionally byte-compile it). 65;; Place uce.el in your load-path (and optionally byte-compile it).
66;; Add the following line to your ~/.emacs: 66;; Add the following line to your init file:
67;; (autoload 'uce-reply-to-uce "uce" "Reply to UCEs" t nil) 67;; (autoload 'uce-reply-to-uce "uce" "Reply to UCEs" t nil)
68;; If you want to use it with Gnus rather than Rmail: 68;; If you want to use it with Gnus rather than Rmail:
69;; (setq uce-mail-reader 'gnus) 69;; (setq uce-mail-reader 'gnus)
diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el
index 8d043b4495f..a8e32bec1ae 100644
--- a/lisp/mouse-copy.el
+++ b/lisp/mouse-copy.el
@@ -35,7 +35,7 @@
35;; If you like mouse-copy, you should also check out mouse-drag 35;; If you like mouse-copy, you should also check out mouse-drag
36;; for ``one-click scrolling''. 36;; for ``one-click scrolling''.
37;; 37;;
38;; To use mouse-copy, place the following in your .emacs file: 38;; To use mouse-copy, place the following in your init file:
39;; (require 'mouse-copy) 39;; (require 'mouse-copy)
40;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting) 40;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting)
41;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving) 41;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving)
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el
index 7fb10505355..acdad9a42cf 100644
--- a/lisp/mouse-drag.el
+++ b/lisp/mouse-drag.el
@@ -46,7 +46,7 @@
46;; If you like mouse-drag, you should also check out mouse-copy 46;; If you like mouse-drag, you should also check out mouse-copy
47;; for ``one-click text copy and move''. 47;; for ``one-click text copy and move''.
48;; 48;;
49;; To use mouse-drag, place the following in your .emacs file: 49;; To use mouse-drag, place the following in your init file:
50;; -either- 50;; -either-
51;; (global-set-key [down-mouse-2] 'mouse-drag-throw) 51;; (global-set-key [down-mouse-2] 'mouse-drag-throw)
52;; -or- 52;; -or-
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 1501fa41baa..265a855b842 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -79,7 +79,7 @@
79;; that this change will take effect for the current GNU Emacs session only. 79;; that this change will take effect for the current GNU Emacs session only.
80;; See below for a discussion of non-UNIX hosts. If a large number of 80;; See below for a discussion of non-UNIX hosts. If a large number of
81;; machines with similar hostnames have this problem then it is easier to set 81;; machines with similar hostnames have this problem then it is easier to set
82;; the value of ange-ftp-dumb-unix-host-regexp in your .emacs file. ange-ftp 82;; the value of ange-ftp-dumb-unix-host-regexp in your init file. ange-ftp
83;; is unable to automatically recognize dumb unix hosts. 83;; is unable to automatically recognize dumb unix hosts.
84 84
85;; File name completion: 85;; File name completion:
@@ -275,10 +275,10 @@
275 275
276;; VMS support: 276;; VMS support:
277;; 277;;
278;; Ange-ftp has full support for VMS hosts. It 278;; Ange-ftp has full support for VMS hosts. It should be able to
279;; should be able to automatically recognize any VMS machine. However, if it 279;; automatically recognize any VMS machine. However, if it fails to do
280;; fails to do this, you can use the command ange-ftp-add-vms-host. As well, 280;; this, you can use the command ange-ftp-add-vms-host. Also, you can
281;; you can set the variable ange-ftp-vms-host-regexp in your .emacs file. We 281;; set the variable ange-ftp-vms-host-regexp in your init file. We
282;; would be grateful if you would report any failures to automatically 282;; would be grateful if you would report any failures to automatically
283;; recognize a VMS host as a bug. 283;; recognize a VMS host as a bug.
284;; 284;;
@@ -332,7 +332,7 @@
332;; the Michigan terminal system. It should be able to automatically 332;; the Michigan terminal system. It should be able to automatically
333;; recognize any MTS machine. However, if it fails to do this, you can use 333;; recognize any MTS machine. However, if it fails to do this, you can use
334;; the command ange-ftp-add-mts-host. As well, you can set the variable 334;; the command ange-ftp-add-mts-host. As well, you can set the variable
335;; ange-ftp-mts-host-regexp in your .emacs file. We would be grateful if you 335;; ange-ftp-mts-host-regexp in your init file. We would be grateful if you
336;; would report any failures to automatically recognize a MTS host as a bug. 336;; would report any failures to automatically recognize a MTS host as a bug.
337;; 337;;
338;; Filename syntax: 338;; Filename syntax:
@@ -358,7 +358,7 @@
358;; CMS. It should be able to automatically recognize any CMS machine. 358;; CMS. It should be able to automatically recognize any CMS machine.
359;; However, if it fails to do this, you can use the command 359;; However, if it fails to do this, you can use the command
360;; ange-ftp-add-cms-host. As well, you can set the variable 360;; ange-ftp-add-cms-host. As well, you can set the variable
361;; ange-ftp-cms-host-regexp in your .emacs file. We would be grateful if you 361;; ange-ftp-cms-host-regexp in your init file. We would be grateful if you
362;; would report any failures to automatically recognize a CMS host as a bug. 362;; would report any failures to automatically recognize a CMS host as a bug.
363;; 363;;
364;; Filename syntax: 364;; Filename syntax:
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index d1d33bfe566..c1c83d2245e 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -122,8 +122,7 @@
122;; the buffer, use: 122;; the buffer, use:
123;; M-x browse-url 123;; M-x browse-url
124 124
125;; To display a URL by shift-clicking on it, put this in your ~/.emacs 125;; To display a URL by shift-clicking on it, put this in your init file:
126;; file:
127;; (global-set-key [S-mouse-2] 'browse-url-at-mouse) 126;; (global-set-key [S-mouse-2] 'browse-url-at-mouse)
128;; (Note that using Shift-mouse-1 is not desirable because 127;; (Note that using Shift-mouse-1 is not desirable because
129;; that event has a standard meaning in Emacs.) 128;; that event has a standard meaning in Emacs.)
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 6a9d80f9672..f9e31788527 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -33,7 +33,7 @@
33;; INSTALLATION 33;; INSTALLATION
34;; 34;;
35;; To use goto-address in a particular mode (for example, while 35;; To use goto-address in a particular mode (for example, while
36;; reading mail in mh-e), add something like this in your .emacs file: 36;; reading mail in mh-e), add this to your init file:
37;; 37;;
38;; (add-hook 'mh-show-mode-hook 'goto-address) 38;; (add-hook 'mh-show-mode-hook 'goto-address)
39;; 39;;
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el
index 5d673faf0db..91eca84ce53 100644
--- a/lisp/net/newsticker.el
+++ b/lisp/net/newsticker.el
@@ -87,7 +87,7 @@
87;; If you are using Newsticker as part of GNU Emacs there is no need to 87;; If you are using Newsticker as part of GNU Emacs there is no need to
88;; perform any installation steps in order to use Newsticker. Otherwise 88;; perform any installation steps in order to use Newsticker. Otherwise
89;; place Newsticker in a directory where Emacs can find it. Add the 89;; place Newsticker in a directory where Emacs can find it. Add the
90;; following line to your Emacs startup file (`~/.emacs'). 90;; following line to your init file:
91;; (add-to-list 'load-path "/path/to/newsticker/") 91;; (add-to-list 'load-path "/path/to/newsticker/")
92;; (autoload 'newsticker-start "newsticker" "Emacs Newsticker" t) 92;; (autoload 'newsticker-start "newsticker" "Emacs Newsticker" t)
93;; (autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t) 93;; (autoload 'newsticker-show-news "newsticker" "Emacs Newsticker" t)
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index f3b0e372de4..f7d41fcd97a 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -164,7 +164,7 @@ To make use of this do something like:
164 164
165 (setq quickurl-postfix quickurl-reread-hook-postfix) 165 (setq quickurl-postfix quickurl-reread-hook-postfix)
166 166
167in your ~/.emacs (after loading/requiring quickurl).") 167in your init file (after loading/requiring quickurl).")
168 168
169;; Non-customize variables. 169;; Non-customize variables.
170 170
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 06aae1f6af2..abca6b3ea01 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -204,7 +204,7 @@ useful thing to do is to put
204 204
205 (setq tramp-verbose 9) 205 (setq tramp-verbose 9)
206 206
207in the ~/.emacs file and to repeat the bug. Then, include the 207in your init file and to repeat the bug. Then, include the
208contents of the *tramp/foo* buffer and the *debug tramp/foo* 208contents of the *tramp/foo* buffer and the *debug tramp/foo*
209buffer in your bug report. 209buffer in your bug report.
210 210
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 232e5ca581a..d5de2f410c5 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -38,7 +38,7 @@
38;; example sites. You'll probably want to override it with your own favorite 38;; example sites. You'll probably want to override it with your own favorite
39;; sites. The documentation for the variable describes the syntax. 39;; sites. The documentation for the variable describes the syntax.
40 40
41;; You may wish to add something like the following to your `.emacs' file: 41;; You may wish to add something like the following to your init file:
42;; 42;;
43;; (require 'webjump) 43;; (require 'webjump)
44;; (global-set-key "\C-cj" 'webjump) 44;; (global-set-key "\C-cj" 'webjump)
diff --git a/lisp/novice.el b/lisp/novice.el
index bcc94c86c9d..c621ac4b692 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -159,8 +159,8 @@ to future sessions."
159(defun disable-command (command) 159(defun disable-command (command)
160 "Require special confirmation to execute COMMAND from now on. 160 "Require special confirmation to execute COMMAND from now on.
161COMMAND must be a symbol. 161COMMAND must be a symbol.
162This command alters the user's .emacs file so that this will apply 162This command alters your init file so that this choice applies to
163to future sessions." 163future sessions."
164 (interactive "CDisable command: ") 164 (interactive "CDisable command: ")
165 (en/disable-command command t)) 165 (en/disable-command command t))
166 166
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el
index da72c81c44a..be389e9c25a 100644
--- a/lisp/pcmpl-gnu.el
+++ b/lisp/pcmpl-gnu.el
@@ -128,8 +128,9 @@
128 (pcomplete-uniqify-list rules)))) 128 (pcomplete-uniqify-list rules))))
129 129
130(defcustom pcmpl-gnu-tarfile-regexp 130(defcustom pcmpl-gnu-tarfile-regexp
131 "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" 131 "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\|xz\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'"
132 "A regexp which matches any tar archive." 132 "A regexp which matches any tar archive."
133 :version "24.3" ; added xz
133 :type 'regexp 134 :type 'regexp
134 :group 'pcmpl-gnu) 135 :group 'pcmpl-gnu)
135 136
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index d357da685e5..3f120961486 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -28,7 +28,7 @@
28;; argument position. 28;; argument position.
29;; 29;;
30;; To use pcomplete with shell-mode, for example, you will need the 30;; To use pcomplete with shell-mode, for example, you will need the
31;; following in your .emacs file: 31;; following in your init file:
32;; 32;;
33;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup) 33;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup)
34;; 34;;
@@ -451,9 +451,12 @@ Same as `pcomplete' but using the standard completion UI."
451 (list beg (point) table 451 (list beg (point) table
452 :predicate pred 452 :predicate pred
453 :exit-function 453 :exit-function
454 ;; If completion is finished, add a terminating space.
455 ;; We used to also do this if STATUS is `sole', but
456 ;; that does not work right when completion cycling.
454 (unless (zerop (length pcomplete-termination-string)) 457 (unless (zerop (length pcomplete-termination-string))
455 (lambda (_s finished) 458 (lambda (_s status)
456 (when (memq finished '(sole finished)) 459 (when (eq status 'finished)
457 (if (looking-at 460 (if (looking-at
458 (regexp-quote pcomplete-termination-string)) 461 (regexp-quote pcomplete-termination-string))
459 (goto-char (match-end 0)) 462 (goto-char (match-end 0))
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el
index 1f04099a6ae..3b6035473fd 100644
--- a/lisp/play/bubbles.el
+++ b/lisp/play/bubbles.el
@@ -33,7 +33,7 @@
33;; Installation 33;; Installation
34;; ------------ 34;; ------------
35 35
36;; Add the following lines to your Emacs startup file (`~/.emacs'). 36;; Add the following lines to your init file:
37;; (add-to-list 'load-path "/path/to/bubbles/") 37;; (add-to-list 'load-path "/path/to/bubbles/")
38;; (autoload 'bubbles "bubbles" "Play Bubbles" t) 38;; (autoload 'bubbles "bubbles" "Play Bubbles" t)
39 39
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el
index 8d9506a1614..ade0d15006a 100644
--- a/lisp/play/decipher.el
+++ b/lisp/play/decipher.el
@@ -138,19 +138,7 @@ the tail of the list."
138 ("^)\\([A-Z ]+\\)\\([a-z ]+\\)" 138 ("^)\\([A-Z ]+\\)\\([a-z ]+\\)"
139 (1 font-lock-keyword-face) 139 (1 font-lock-keyword-face)
140 (2 font-lock-string-face))) 140 (2 font-lock-string-face)))
141 "Expressions to fontify in Decipher mode. 141 "Font Lock keywords for Decipher mode.")
142
143Ciphertext uses `font-lock-keyword-face', plaintext uses
144`font-lock-string-face', comments use `font-lock-comment-face', and
145checkpoints use `font-lock-constant-face'. You can customize the
146display by changing these variables. For best results, I recommend
147that all faces use the same background color.
148
149For example, to display ciphertext in the `bold' face, use
150 (add-hook 'decipher-mode-hook
151 (lambda () (set (make-local-variable 'font-lock-keyword-face)
152 'bold)))
153in your `.emacs' file.")
154 142
155(defvar decipher-mode-map 143(defvar decipher-mode-map
156 (let ((map (make-keymap))) 144 (let ((map (make-keymap)))
diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el
index d2e307c0145..85c128b08e2 100644
--- a/lisp/play/handwrite.el
+++ b/lisp/play/handwrite.el
@@ -45,7 +45,7 @@
45;; Installation 45;; Installation
46;; 46;;
47;; type at your prompt "emacs -l handwrite.el" or put this file on your 47;; type at your prompt "emacs -l handwrite.el" or put this file on your
48;; Emacs-Lisp load path, add the following into your ~/.emacs startup file 48;; Emacs-Lisp load path, add the following into your init file:
49;; 49;;
50;; (require 'handwrite) 50;; (require 'handwrite)
51;; 51;;
diff --git a/lisp/printing.el b/lisp/printing.el
index 0152ed63dbb..02b2fb0139c 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -139,10 +139,9 @@ Please send all bug fixes and enhancements to
139;; 139;;
140;; One way to set variables is by calling `pr-customize', customize all 140;; One way to set variables is by calling `pr-customize', customize all
141;; variables and save the customization by future sessions (see Options 141;; variables and save the customization by future sessions (see Options
142;; section). Other way is by coding your settings on Emacs init file (that is, 142;; section). Other way is by adding code to your init file; see below
143;; ~/.emacs file), see below for a first setting template that it should be 143;; for a first setting template that it should be inserted on your
144;; inserted on your ~/.emacs file (or c:/_emacs, if you're using Windows 9x/NT 144;; init file:
145;; or MS-DOS):
146;; 145;;
147;; * Example of setting for Windows system: 146;; * Example of setting for Windows system:
148;; 147;;
@@ -297,8 +296,7 @@ Please send all bug fixes and enhancements to
297;; Using `printing' 296;; Using `printing'
298;; ---------------- 297;; ----------------
299;; 298;;
300;; To use `printing' insert in your ~/.emacs file (or c:/_emacs, if you're 299;; To use `printing' insert in your init file:
301;; using Windows 9x/NT or MS-DOS):
302;; 300;;
303;; (require 'printing) 301;; (require 'printing)
304;; ;; ...some user settings... 302;; ;; ...some user settings...
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 4062646c967..5a054af9883 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -69,7 +69,7 @@
69;; This file requires Emacs-20.3, XEmacs-20.4 or higher and package cc-mode. 69;; This file requires Emacs-20.3, XEmacs-20.4 or higher and package cc-mode.
70 70
71;; If antlr-mode is not part of your distribution, put this file into your 71;; If antlr-mode is not part of your distribution, put this file into your
72;; load-path and the following into your ~/.emacs: 72;; load-path and the following into your init file:
73;; (autoload 'antlr-mode "antlr-mode" nil t) 73;; (autoload 'antlr-mode "antlr-mode" nil t)
74;; (setq auto-mode-alist (cons '("\\.g\\'" . antlr-mode) auto-mode-alist)) 74;; (setq auto-mode-alist (cons '("\\.g\\'" . antlr-mode) auto-mode-alist))
75;; (add-hook 'speedbar-load-hook ; would be too late in antlr-mode.el 75;; (add-hook 'speedbar-load-hook ; would be too late in antlr-mode.el
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index cf628e44de0..20aa2bc2775 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -352,8 +352,8 @@ might get set too.
352If DONT-OVERRIDE is neither nil nor t, style variables whose default values 352If DONT-OVERRIDE is neither nil nor t, style variables whose default values
353have been set (more precisely, whose default values are not the symbol 353have been set (more precisely, whose default values are not the symbol
354`set-from-style') will not be changed. This avoids overriding global settings 354`set-from-style') will not be changed. This avoids overriding global settings
355done in ~/.emacs. It is useful to call c-set-style from a mode hook in this 355done in your init file. It is useful to call c-set-style from a mode hook
356way. 356in this way.
357 357
358If DONT-OVERRIDE is t, style variables that already have values (i.e., whose 358If DONT-OVERRIDE is t, style variables that already have values (i.e., whose
359values are not the symbol `set-from-style') will not be overridden. CC Mode 359values are not the symbol `set-from-style') will not be overridden. CC Mode
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index 943b5c6a067..525b1c9671e 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -49,7 +49,7 @@
49 49
50;; INSTALLATION ====================================================== 50;; INSTALLATION ======================================================
51 51
52;; Put the following in your ~/.emacs file. 52;; Put the following in your init file.
53 53
54;; If you want the *Macroexpansion* window to be not higher than 54;; If you want the *Macroexpansion* window to be not higher than
55;; necessary: 55;; necessary:
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f5dedf0cd59..95b8758ba80 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1556,20 +1556,20 @@ Returns the compilation buffer created."
1556 (get-buffer-create 1556 (get-buffer-create
1557 (compilation-buffer-name name-of-mode mode name-function))) 1557 (compilation-buffer-name name-of-mode mode name-function)))
1558 (let ((comp-proc (get-buffer-process (current-buffer)))) 1558 (let ((comp-proc (get-buffer-process (current-buffer))))
1559 (if comp-proc 1559 (if comp-proc
1560 (if (or (not (eq (process-status comp-proc) 'run)) 1560 (if (or (not (eq (process-status comp-proc) 'run))
1561 compilation-always-kill 1561 (eq (process-query-on-exit-flag comp-proc) nil)
1562 (yes-or-no-p 1562 (yes-or-no-p
1563 (format "A %s process is running; kill it? " 1563 (format "A %s process is running; kill it? "
1564 name-of-mode))) 1564 name-of-mode)))
1565 (condition-case () 1565 (condition-case ()
1566 (progn 1566 (progn
1567 (interrupt-process comp-proc) 1567 (interrupt-process comp-proc)
1568 (sit-for 1) 1568 (sit-for 1)
1569 (delete-process comp-proc)) 1569 (delete-process comp-proc))
1570 (error nil)) 1570 (error nil))
1571 (error "Cannot have two processes in `%s' at once" 1571 (error "Cannot have two processes in `%s' at once"
1572 (buffer-name))))) 1572 (buffer-name)))))
1573 ;; first transfer directory from where M-x compile was called 1573 ;; first transfer directory from where M-x compile was called
1574 (setq default-directory thisdir) 1574 (setq default-directory thisdir)
1575 ;; Make compilation buffer read-only. The filter can still write it. 1575 ;; Make compilation buffer read-only. The filter can still write it.
@@ -1624,7 +1624,7 @@ Returns the compilation buffer created."
1624 (let ((process-environment 1624 (let ((process-environment
1625 (append 1625 (append
1626 compilation-environment 1626 compilation-environment
1627 (if (if (boundp 'system-uses-terminfo) ; `if' for compiler warning 1627 (if (if (boundp 'system-uses-terminfo);`If' for compiler warning.
1628 system-uses-terminfo) 1628 system-uses-terminfo)
1629 (list "TERM=dumb" "TERMCAP=" 1629 (list "TERM=dumb" "TERMCAP="
1630 (format "COLUMNS=%d" (window-width))) 1630 (format "COLUMNS=%d" (window-width)))
@@ -1674,13 +1674,20 @@ Returns the compilation buffer created."
1674 nil `("-c" ,command)))) 1674 nil `("-c" ,command))))
1675 (start-file-process-shell-command (downcase mode-name) 1675 (start-file-process-shell-command (downcase mode-name)
1676 outbuf command)))) 1676 outbuf command))))
1677 ;; Make the buffer's mode line show process state. 1677 ;; Make the buffer's mode line show process state.
1678 (setq mode-line-process 1678 (setq mode-line-process
1679 '(:propertize ":%s" face compilation-mode-line-run)) 1679 '(:propertize ":%s" face compilation-mode-line-run))
1680 (set-process-sentinel proc 'compilation-sentinel) 1680
1681 (unless (eq mode t) 1681 ;; Set the process as killable without query by default.
1682 ;; Keep the comint filter, since it's needed for proper handling 1682 ;; This allows us to start a new compilation without
1683 ;; of the prompts. 1683 ;; getting prompted.
1684 (when compilation-always-kill
1685 (set-process-query-on-exit-flag proc nil))
1686
1687 (set-process-sentinel proc 'compilation-sentinel)
1688 (unless (eq mode t)
1689 ;; Keep the comint filter, since it's needed for proper
1690 ;; handling of the prompts.
1684 (set-process-filter proc 'compilation-filter)) 1691 (set-process-filter proc 'compilation-filter))
1685 ;; Use (point-max) here so that output comes in 1692 ;; Use (point-max) here so that output comes in
1686 ;; after the initial text, 1693 ;; after the initial text,
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index cdbaf4708a7..0f18cffc3de 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -43,7 +43,7 @@ Please send all bug fixes and enhancements to
43;; 43;;
44;; This package translates an EBNF to a syntactic chart on PostScript. 44;; This package translates an EBNF to a syntactic chart on PostScript.
45;; 45;;
46;; To use ebnf2ps, insert in your ~/.emacs: 46;; To use ebnf2ps, insert in your init file:
47;; 47;;
48;; (require 'ebnf2ps) 48;; (require 'ebnf2ps)
49;; 49;;
@@ -772,7 +772,7 @@ Please send all bug fixes and enhancements to
772;; 772;;
773;; To set the above options you may: 773;; To set the above options you may:
774;; 774;;
775;; a) insert the code in your ~/.emacs, like: 775;; a) insert the code in your init file, like:
776;; 776;;
777;; (setq ebnf-terminal-shape 'bevel) 777;; (setq ebnf-terminal-shape 'bevel)
778;; 778;;
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index cc1251f6a75..f42952685d0 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -102,10 +102,9 @@
102;; (abbrev-mode 1) ; turn on abbreviation mode 102;; (abbrev-mode 1) ; turn on abbreviation mode
103;; (f90-add-imenu-menu) ; extra menu with functions etc. 103;; (f90-add-imenu-menu) ; extra menu with functions etc.
104;; (if f90-auto-keyword-case ; change case of all keywords on startup 104;; (if f90-auto-keyword-case ; change case of all keywords on startup
105;; (f90-change-keywords f90-auto-keyword-case)) 105;; (f90-change-keywords f90-auto-keyword-case))))
106;; ))
107;; 106;;
108;; in your .emacs file. You can also customize the lists 107;; in your init file. You can also customize the lists
109;; f90-font-lock-keywords, etc. 108;; f90-font-lock-keywords, etc.
110;; 109;;
111;; The auto-fill and abbreviation minor modes are accessible from the F90 menu, 110;; The auto-fill and abbreviation minor modes are accessible from the F90 menu,
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index a6ae42f86b1..c056b0f4e26 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -817,11 +817,11 @@ substitution string. Note dynamic scoping of variables.")
817(defun grep-read-regexp () 817(defun grep-read-regexp ()
818 "Read regexp arg for interactive grep." 818 "Read regexp arg for interactive grep."
819 (let ((default (grep-tag-default))) 819 (let ((default (grep-tag-default)))
820 (read-string 820 (read-regexp
821 (concat "Search for" 821 (concat "Search for"
822 (if (and default (> (length default) 0)) 822 (if (and default (> (length default) 0))
823 (format " (default \"%s\"): " default) ": ")) 823 (format " (default \"%s\"): " default) ": "))
824 nil 'grep-regexp-history default))) 824 default 'grep-regexp-history)))
825 825
826(defun grep-read-files (regexp) 826(defun grep-read-files (regexp)
827 "Read files arg for interactive grep." 827 "Read files arg for interactive grep."
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 233b9a5212e..2a77ad013c7 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -52,7 +52,7 @@
52;; 52;;
53;; First make sure hideshow.el is in a directory in your `load-path'. 53;; First make sure hideshow.el is in a directory in your `load-path'.
54;; You can optionally byte-compile it using `M-x byte-compile-file'. 54;; You can optionally byte-compile it using `M-x byte-compile-file'.
55;; Then, add the following to your ~/.emacs: 55;; Then, add the following to your init file:
56;; 56;;
57;; (load-library "hideshow") 57;; (load-library "hideshow")
58;; (add-hook 'X-mode-hook ; other modes similarly 58;; (add-hook 'X-mode-hook ; other modes similarly
diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el
index 246ba8f29cd..24613d14634 100644
--- a/lisp/progmodes/idlw-complete-structtag.el
+++ b/lisp/progmodes/idlw-complete-structtag.el
@@ -53,8 +53,8 @@
53;; 53;;
54;; INSTALLATION 54;; INSTALLATION
55;; ============ 55;; ============
56;; Put this file on the emacs load path and load it with the following 56;; Put this file on the emacs load path and load it with the following
57;; line in your .emacs file: 57;; line in your init file:
58;; 58;;
59;; (add-hook 'idlwave-load-hook 59;; (add-hook 'idlwave-load-hook
60;; (lambda () (require 'idlw-complete-structtag))) 60;; (lambda () (require 'idlw-complete-structtag)))
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 4f9109284ae..0abd4daf61b 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -48,7 +48,7 @@
48;; 48;;
49;; Follow the instructions in the INSTALL file of the distribution. 49;; Follow the instructions in the INSTALL file of the distribution.
50;; In short, put this file on your load path and add the following 50;; In short, put this file on your load path and add the following
51;; lines to your .emacs file: 51;; lines to your init file:
52;; 52;;
53;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) 53;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
54;; 54;;
@@ -111,9 +111,7 @@ For example, \"^\r?IDL> \" or \"^\r?WAVE> \".
111The \"^\r?\" is needed, to indicate the beginning of the line, with 111The \"^\r?\" is needed, to indicate the beginning of the line, with
112optional return character (which IDL seems to output randomly). 112optional return character (which IDL seems to output randomly).
113This variable is used to initialize `comint-prompt-regexp' in the 113This variable is used to initialize `comint-prompt-regexp' in the
114process buffer. 114process buffer."
115
116This is a fine thing to set in your `.emacs' file."
117 :group 'idlwave-shell-general-setup 115 :group 'idlwave-shell-general-setup
118 :type 'regexp) 116 :type 'regexp)
119 117
@@ -2172,7 +2170,7 @@ args of an executive .run, .rnew or .compile."
2172 ;; CWD might have changed, resync, to set default directory 2170 ;; CWD might have changed, resync, to set default directory
2173 (idlwave-shell-resync-dirs) 2171 (idlwave-shell-resync-dirs)
2174 (let ((comint-file-name-chars idlwave-shell-file-name-chars)) 2172 (let ((comint-file-name-chars idlwave-shell-file-name-chars))
2175 (comint-filename-completion))) 2173 (comint-dynamic-complete-filename)))
2176 2174
2177(defun idlwave-shell-executive-command () 2175(defun idlwave-shell-executive-command ()
2178 "Return the name of the current executive command, if any." 2176 "Return the name of the current executive command, if any."
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index a35ffd3e45d..9b634328fa7 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -51,7 +51,7 @@
51;; 51;;
52;; Follow the instructions in the INSTALL file of the distribution. 52;; Follow the instructions in the INSTALL file of the distribution.
53;; In short, put this file on your load path and add the following 53;; In short, put this file on your load path and add the following
54;; lines to your .emacs file: 54;; lines to your init file:
55;; 55;;
56;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) 56;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t)
57;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) 57;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
@@ -746,7 +746,7 @@ or even '?'. '.' is not a good choice because it can make structure
746field names act like abbrevs in certain circumstances. 746field names act like abbrevs in certain circumstances.
747 747
748Changes to this in `idlwave-mode-hook' will have no effect. Instead a user 748Changes to this in `idlwave-mode-hook' will have no effect. Instead a user
749must set it directly using `setq' in the .emacs file before idlwave.el 749must set it directly using `setq' in the init file before idlwave.el
750is loaded." 750is loaded."
751 :group 'idlwave-abbrev-and-indent-action 751 :group 'idlwave-abbrev-and-indent-action
752 :type 'string) 752 :type 'string)
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index cd6c8869d9f..401970b2ce8 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -168,9 +168,7 @@ This variable is only used if the variable
168More precise choices: 168More precise choices:
169Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" 169Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\"
170franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" 170franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\"
171kcl: \"^>+ *\" 171kcl: \"^>+ *\""
172
173This is a fine thing to set in your .emacs file or through Custom."
174 :type 'regexp 172 :type 'regexp
175 :group 'inferior-lisp) 173 :group 'inferior-lisp)
176 174
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index 54d857dd4b1..a59176a5aa6 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -32,7 +32,7 @@
32;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and 32;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and
33;; `ftp://ftp.gnu.org/pub/gnu/mdk'. 33;; `ftp://ftp.gnu.org/pub/gnu/mdk'.
34;; 34;;
35;; To use this mode, place the following in your .emacs file: 35;; To use this mode, place the following in your init file:
36;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. 36;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'.
37;; When you load a file with the extension .mixal the mode will be started 37;; When you load a file with the extension .mixal the mode will be started
38;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. 38;; automatic. If you want to start the mode manual, use `M-x mixal-mode'.
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 79b3fcee720..ab5a19f8a2f 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -585,12 +585,12 @@ Variables you can use to customize Octave mode
585Turning on Octave mode runs the hook `octave-mode-hook'. 585Turning on Octave mode runs the hook `octave-mode-hook'.
586 586
587To begin using this mode for all `.m' files that you edit, add the 587To begin using this mode for all `.m' files that you edit, add the
588following lines to your `.emacs' file: 588following lines to your init file:
589 589
590 (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) 590 (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode))
591 591
592To automatically turn on the abbrev and auto-fill features, 592To automatically turn on the abbrev and auto-fill features,
593add the following lines to your `.emacs' file as well: 593add the following lines to your init file as well:
594 594
595 (add-hook 'octave-mode-hook 595 (add-hook 'octave-mode-hook
596 (lambda () 596 (lambda ()
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index e13b67e596d..3dd9a48bb33 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -28,14 +28,14 @@
28;;; Commentary: 28;;; Commentary:
29 29
30;; To enter perl-mode automatically, add (autoload 'perl-mode "perl-mode") 30;; To enter perl-mode automatically, add (autoload 'perl-mode "perl-mode")
31;; to your .emacs file and change the first line of your perl script to: 31;; to your init file and change the first line of your perl script to:
32;; #!/usr/bin/perl -- # -*-Perl-*- 32;; #!/usr/bin/perl -- # -*-Perl-*-
33;; With arguments to perl: 33;; With arguments to perl:
34;; #!/usr/bin/perl -P- # -*-Perl-*- 34;; #!/usr/bin/perl -P- # -*-Perl-*-
35;; To handle files included with do 'filename.pl';, add something like 35;; To handle files included with do 'filename.pl';, add something like
36;; (setq auto-mode-alist (append (list (cons "\\.pl\\'" 'perl-mode)) 36;; (setq auto-mode-alist (append (list (cons "\\.pl\\'" 'perl-mode))
37;; auto-mode-alist)) 37;; auto-mode-alist))
38;; to your .emacs file; otherwise the .pl suffix defaults to prolog-mode. 38;; to your init file; otherwise the .pl suffix defaults to prolog-mode.
39 39
40;; This code is based on the 18.53 version c-mode.el, with extensive 40;; This code is based on the 18.53 version c-mode.el, with extensive
41;; rewriting. Most of the features of c-mode survived intact. 41;; rewriting. Most of the features of c-mode survived intact.
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 16d85cb2d79..33d43cb3d5a 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -60,9 +60,7 @@
60 60
61;;; Installation: 61;;; Installation:
62;; 62;;
63;; Insert the following lines in your init file--typically ~/.emacs 63;; Insert the following lines in your init file:
64;; (GNU Emacs and XEmacs <21.4), or ~/.xemacs/init.el (XEmacs
65;; 21.4)--to use this mode when editing Prolog files under Emacs:
66;; 64;;
67;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) 65;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path))
68;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) 66;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 77ec8084ea2..0f02e81cbad 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1112,8 +1112,9 @@ See `add-log-current-defun-function'."
1112 (goto-char end) 1112 (goto-char end)
1113 (when (eq (char-before) ?\}) 1113 (when (eq (char-before) ?\})
1114 (delete-char -1) 1114 (delete-char -1)
1115 (skip-chars-backward " \t") 1115 (when (save-excursion
1116 (when (not (bolp)) 1116 (skip-chars-backward " \t")
1117 (not (bolp)))
1117 (insert "\n")) 1118 (insert "\n"))
1118 (insert "end") 1119 (insert "end")
1119 (setq end-marker (point-marker)) 1120 (setq end-marker (point-marker))
@@ -1137,16 +1138,35 @@ See `add-log-current-defun-function'."
1137 t))) 1138 t)))
1138 1139
1139(defun ruby-do-end-to-brace (orig end) 1140(defun ruby-do-end-to-brace (orig end)
1140 (goto-char (- end 3)) 1141 (let (beg-marker end-marker beg-pos end-pos)
1141 (when (looking-at ruby-block-end-re) 1142 (goto-char (- end 3))
1142 (delete-char 3) 1143 (when (looking-at ruby-block-end-re)
1143 (insert "}") 1144 (delete-char 3)
1144 (goto-char orig) 1145 (setq end-marker (point-marker))
1145 (delete-char 2) 1146 (insert "}")
1146 (insert "{") 1147 (goto-char orig)
1147 (if (looking-at "\\s +|") 1148 (delete-char 2)
1148 (delete-char (- (match-end 0) (match-beginning 0) 1))) 1149 (insert "{")
1149 t)) 1150 (setq beg-marker (point-marker))
1151 (when (looking-at "\\s +|")
1152 (delete-char (- (match-end 0) (match-beginning 0) 1))
1153 (forward-char)
1154 (re-search-forward "|" (line-end-position) t))
1155 (save-excursion
1156 (skip-chars-forward " \t\n\r")
1157 (setq beg-pos (point))
1158 (goto-char end-marker)
1159 (skip-chars-backward " \t\n\r")
1160 (setq end-pos (point)))
1161 (when (or
1162 (< end-pos beg-pos)
1163 (and (= (line-number-at-pos beg-pos) (line-number-at-pos end-pos))
1164 (< (+ (current-column) (- end-pos beg-pos) 2) fill-column)))
1165 (just-one-space -1)
1166 (goto-char end-marker)
1167 (just-one-space -1))
1168 (goto-char beg-marker)
1169 t)))
1150 1170
1151(defun ruby-toggle-block () 1171(defun ruby-toggle-block ()
1152 "Toggle block type from do-end to braces or back. 1172 "Toggle block type from do-end to braces or back.
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index f3ecbe3fc3d..3d5abc4df62 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -268,9 +268,8 @@
268 268
269(defcustom sql-password "" 269(defcustom sql-password ""
270 "Default password. 270 "Default password.
271 271If you customize this, the value will be stored in your init
272Storing your password in a textfile such as ~/.emacs could be dangerous. 272file. Since that is a plaintext file, this could be dangerous."
273Customizing your password will store it in your ~/.emacs file."
274 :type 'string 273 :type 'string
275 :group 'SQL 274 :group 'SQL
276 :risky t) 275 :risky t)
@@ -1285,8 +1284,8 @@ Based on `comint-mode-map'.")
1285 ["List all objects" sql-list-all (sql-get-product-feature sql-product :list-all)] 1284 ["List all objects" sql-list-all (sql-get-product-feature sql-product :list-all)]
1286 ["List table details" sql-list-table (sql-get-product-feature sql-product :list-table)])) 1285 ["List table details" sql-list-table (sql-get-product-feature sql-product :list-table)]))
1287 1286
1288;; Abbreviations -- if you want more of them, define them in your 1287;; Abbreviations -- if you want more of them, define them in your init
1289;; ~/.emacs file. Abbrevs have to be enabled in your ~/.emacs, too. 1288;; file. Abbrevs have to be enabled in your init file, too.
1290 1289
1291(defvar sql-mode-abbrev-table nil 1290(defvar sql-mode-abbrev-table nil
1292 "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") 1291 "Abbrev table used in `sql-mode' and `sql-interactive-mode'.")
@@ -3715,8 +3714,8 @@ For information on how to create multiple SQLi buffers, see
3715`sql-interactive-mode'. 3714`sql-interactive-mode'.
3716 3715
3717Note that SQL doesn't have an escape character unless you specify 3716Note that SQL doesn't have an escape character unless you specify
3718one. If you specify backslash as escape character in SQL, 3717one. If you specify backslash as escape character in SQL, you
3719you must tell Emacs. Here's how to do that in your `~/.emacs' file: 3718must tell Emacs. Here's how to do that in your init file:
3720 3719
3721\(add-hook 'sql-mode-hook 3720\(add-hook 'sql-mode-hook
3722 (lambda () 3721 (lambda ()
@@ -3806,7 +3805,7 @@ cause the window to scroll to the end of the buffer.
3806If you want to make SQL buffers limited in length, add the function 3805If you want to make SQL buffers limited in length, add the function
3807`comint-truncate-buffer' to `comint-output-filter-functions'. 3806`comint-truncate-buffer' to `comint-output-filter-functions'.
3808 3807
3809Here is an example for your .emacs file. It keeps the SQLi buffer a 3808Here is an example for your init file. It keeps the SQLi buffer a
3810certain length. 3809certain length.
3811 3810
3812\(add-hook 'sql-interactive-mode-hook 3811\(add-hook 'sql-interactive-mode-hook
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index c072754e66d..835d548c19f 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -8790,7 +8790,7 @@ Note these are only read when the file is first visited, you must use
8790\\[find-alternate-file] RET to have these take effect after editing them! 8790\\[find-alternate-file] RET to have these take effect after editing them!
8791 8791
8792If you want to disable the \"Process `eval' or hook local variables\" 8792If you want to disable the \"Process `eval' or hook local variables\"
8793warning message, you need to add to your .emacs file: 8793warning message, you need to add to your init file:
8794 8794
8795 (setq enable-local-eval t)" 8795 (setq enable-local-eval t)"
8796 (let ((origbuf (current-buffer))) 8796 (let ((origbuf (current-buffer)))
@@ -11756,7 +11756,7 @@ An example:
11756 11756
11757 // For this example we declare the function in the 11757 // For this example we declare the function in the
11758 // module's file itself. Often you'd define it instead 11758 // module's file itself. Often you'd define it instead
11759 // in a site-start.el or .emacs file. 11759 // in a site-start.el or init file.
11760 /* 11760 /*
11761 Local Variables: 11761 Local Variables:
11762 eval: 11762 eval:
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index addf2975c5f..930e750ab27 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -1042,7 +1042,7 @@ Please send all bug fixes and enhancements to
1042;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'. 1042;; variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'.
1043;; These variables contain lists of faces that ps-print should consider bold, 1043;; These variables contain lists of faces that ps-print should consider bold,
1044;; italic or underline; to set them, put code like the following into your 1044;; italic or underline; to set them, put code like the following into your
1045;; .emacs file: 1045;; init file:
1046;; 1046;;
1047;; (setq ps-bold-faces '(my-blue-face)) 1047;; (setq ps-bold-faces '(my-blue-face))
1048;; (setq ps-italic-faces '(my-red-face)) 1048;; (setq ps-italic-faces '(my-red-face))
diff --git a/lisp/replace.el b/lisp/replace.el
index 001f7d1a78d..f192574a7e2 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -128,20 +128,21 @@ wants to replace FROM with TO."
128 (if query-replace-interactive 128 (if query-replace-interactive
129 (car (if regexp-flag regexp-search-ring search-ring)) 129 (car (if regexp-flag regexp-search-ring search-ring))
130 (let* ((history-add-new-input nil) 130 (let* ((history-add-new-input nil)
131 (prompt
132 (if query-replace-defaults
133 (format "%s (default %s -> %s): " prompt
134 (query-replace-descr (car query-replace-defaults))
135 (query-replace-descr (cdr query-replace-defaults)))
136 (format "%s: " prompt)))
131 (from 137 (from
132 ;; The save-excursion here is in case the user marks and copies 138 ;; The save-excursion here is in case the user marks and copies
133 ;; a region in order to specify the minibuffer input. 139 ;; a region in order to specify the minibuffer input.
134 ;; That should not clobber the region for the query-replace itself. 140 ;; That should not clobber the region for the query-replace itself.
135 (save-excursion 141 (save-excursion
136 (read-from-minibuffer 142 (if regexp-flag
137 (if query-replace-defaults 143 (read-regexp prompt nil query-replace-from-history-variable)
138 (format "%s (default %s -> %s): " prompt 144 (read-from-minibuffer
139 (query-replace-descr (car query-replace-defaults)) 145 prompt nil nil nil query-replace-from-history-variable nil t)))))
140 (query-replace-descr (cdr query-replace-defaults)))
141 (format "%s: " prompt))
142 nil nil nil
143 query-replace-from-history-variable
144 nil t))))
145 (if (and (zerop (length from)) query-replace-defaults) 146 (if (and (zerop (length from)) query-replace-defaults)
146 (cons (car query-replace-defaults) 147 (cons (car query-replace-defaults)
147 (query-replace-compile-replacement 148 (query-replace-compile-replacement
@@ -574,38 +575,47 @@ of `history-length', which see.")
574(defvar occur-collect-regexp-history '("\\1") 575(defvar occur-collect-regexp-history '("\\1")
575 "History of regexp for occur's collect operation") 576 "History of regexp for occur's collect operation")
576 577
577(defun read-regexp (prompt &optional default-value) 578(defun read-regexp (prompt &optional defaults history)
578 "Read regexp as a string using the regexp history and some useful defaults. 579 "Read and return a regular expression as a string.
579Prompt for a regular expression with PROMPT (without a colon and 580When PROMPT doesn't end with a colon and space, it adds a final \": \".
580space) in the minibuffer. The optional argument DEFAULT-VALUE 581If DEFAULTS is non-nil, it displays the first default in the prompt.
581provides the value to display in the minibuffer prompt that is 582
582returned if the user just types RET. 583Non-nil optional arg DEFAULTS is a string or a list of strings that
583Values available via M-n are the string at point, the last isearch 584are prepended to a list of standard default values, which include the
584regexp, the last isearch string, and the last replacement regexp." 585string at point, the last isearch regexp, the last isearch string, and
585 (let* ((defaults 586the last replacement regexp.
586 (list (regexp-quote 587
587 (or (funcall (or find-tag-default-function 588Non-nil HISTORY is a symbol to use for the history list.
588 (get major-mode 'find-tag-default-function) 589If HISTORY is nil, `regexp-history' is used."
589 'find-tag-default)) 590 (let* ((default (if (consp defaults) (car defaults) defaults))
590 "")) 591 (defaults
591 (car regexp-search-ring) 592 (append
592 (regexp-quote (or (car search-ring) "")) 593 (if (listp defaults) defaults (list defaults))
593 (car (symbol-value 594 (list (regexp-quote
594 query-replace-from-history-variable)))) 595 (or (funcall (or find-tag-default-function
596 (get major-mode 'find-tag-default-function)
597 'find-tag-default))
598 ""))
599 (car regexp-search-ring)
600 (regexp-quote (or (car search-ring) ""))
601 (car (symbol-value
602 query-replace-from-history-variable)))))
595 (defaults (delete-dups (delq nil (delete "" defaults)))) 603 (defaults (delete-dups (delq nil (delete "" defaults))))
596 ;; Don't add automatically the car of defaults for empty input 604 ;; Do not automatically add default to the history for empty input.
597 (history-add-new-input nil) 605 (history-add-new-input nil)
598 (input 606 (input (read-from-minibuffer
599 (read-from-minibuffer 607 (cond ((string-match-p ":[ \t]*\\'" prompt)
600 (if default-value 608 prompt)
601 (format "%s (default %s): " prompt 609 (default
602 (query-replace-descr default-value)) 610 (format "%s (default %s): " prompt
603 (format "%s: " prompt)) 611 (query-replace-descr default)))
604 nil nil nil 'regexp-history defaults t))) 612 (t
613 (format "%s: " prompt)))
614 nil nil nil (or history 'regexp-history) defaults t)))
605 (if (equal input "") 615 (if (equal input "")
606 (or default-value input) 616 (or default input)
607 (prog1 input 617 (prog1 input
608 (add-to-history 'regexp-history input))))) 618 (add-to-history (or history 'regexp-history) input)))))
609 619
610 620
611(defalias 'delete-non-matching-lines 'keep-lines) 621(defalias 'delete-non-matching-lines 'keep-lines)
@@ -1130,9 +1140,9 @@ which means to discard all text properties."
1130 "\\&" 1140 "\\&"
1131 ;; Get the regexp for collection pattern. 1141 ;; Get the regexp for collection pattern.
1132 (let ((default (car occur-collect-regexp-history))) 1142 (let ((default (car occur-collect-regexp-history)))
1133 (read-string 1143 (read-regexp
1134 (format "Regexp to collect (default %s): " default) 1144 (format "Regexp to collect (default %s): " default)
1135 nil 'occur-collect-regexp-history default))) 1145 default 'occur-collect-regexp-history)))
1136 ;; Otherwise normal occur takes numerical prefix argument. 1146 ;; Otherwise normal occur takes numerical prefix argument.
1137 (when current-prefix-arg 1147 (when current-prefix-arg
1138 (prefix-numeric-value current-prefix-arg)))))) 1148 (prefix-numeric-value current-prefix-arg))))))
@@ -1219,14 +1229,10 @@ See also `multi-occur'."
1219 (cons 1229 (cons
1220 (let* ((default (car regexp-history)) 1230 (let* ((default (car regexp-history))
1221 (input 1231 (input
1222 (read-from-minibuffer 1232 (read-regexp
1223 (if current-prefix-arg 1233 (if current-prefix-arg
1224 "List lines in buffers whose names match regexp: " 1234 "List lines in buffers whose names match regexp: "
1225 "List lines in buffers whose filenames match regexp: ") 1235 "List lines in buffers whose filenames match regexp: "))))
1226 nil
1227 nil
1228 nil
1229 'regexp-history)))
1230 (if (equal input "") 1236 (if (equal input "")
1231 default 1237 default
1232 input)) 1238 input))
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 43dad63a140..0c082169462 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -56,13 +56,12 @@ This means when you visit a file, point goes to the last place
56where it was when you previously visited the same file. 56where it was when you previously visited the same file.
57This variable is automatically buffer-local. 57This variable is automatically buffer-local.
58 58
59If you wish your place in any file to always be automatically saved, 59If you wish your place in any file to always be automatically
60simply put this in your `~/.emacs' file: 60saved, set this to t using the Customize facility, or put the
61following code in your init file:
61 62
62\(setq-default save-place t) 63\(setq-default save-place t)
63\(require 'saveplace) 64\(require 'saveplace)"
64
65or else use the Custom facility to set this option."
66 :type 'boolean 65 :type 'boolean
67 :require 'saveplace 66 :require 'saveplace
68 :group 'save-place) 67 :group 'save-place)
@@ -148,7 +147,8 @@ even in a later Emacs session.
148If called with a prefix arg, the mode is enabled if and only if 147If called with a prefix arg, the mode is enabled if and only if
149the argument is positive. 148the argument is positive.
150 149
151To save places automatically in all files, put this in your `.emacs' file: 150To save places automatically in all files, put this in your init
151file:
152 152
153\(setq-default save-place t\)" 153\(setq-default save-place t\)"
154 (interactive "P") 154 (interactive "P")
diff --git a/lisp/shell.el b/lisp/shell.el
index b98efceefbf..77a42389785 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -46,7 +46,7 @@
46 46
47;; YOUR .EMACS FILE 47;; YOUR .EMACS FILE
48;;============================================================================= 48;;=============================================================================
49;; Some suggestions for your .emacs file. 49;; Some suggestions for your init file.
50;; 50;;
51;; ;; Define M-# to run some strange command: 51;; ;; Define M-# to run some strange command:
52;; (eval-after-load "shell" 52;; (eval-after-load "shell"
@@ -136,9 +136,7 @@ how Shell mode treats paragraphs.
136 136
137The pattern should probably not match more than one line. If it does, 137The pattern should probably not match more than one line. If it does,
138Shell mode may become confused trying to distinguish prompt from input 138Shell mode may become confused trying to distinguish prompt from input
139on lines which don't start with a prompt. 139on lines which don't start with a prompt."
140
141This is a fine thing to set in your `.emacs' file."
142 :type 'regexp 140 :type 'regexp
143 :group 'shell) 141 :group 'shell)
144 142
@@ -146,9 +144,7 @@ This is a fine thing to set in your `.emacs' file."
146 "List of suffixes to be disregarded during file/command completion. 144 "List of suffixes to be disregarded during file/command completion.
147This variable is used to initialize `comint-completion-fignore' in the shell 145This variable is used to initialize `comint-completion-fignore' in the shell
148buffer. The default is nil, for compatibility with most shells. 146buffer. The default is nil, for compatibility with most shells.
149Some people like (\"~\" \"#\" \"%\"). 147Some people like (\"~\" \"#\" \"%\")."
150
151This is a fine thing to set in your `.emacs' file."
152 :type '(repeat (string :tag "Suffix")) 148 :type '(repeat (string :tag "Suffix"))
153 :group 'shell) 149 :group 'shell)
154 150
@@ -158,31 +154,29 @@ This variable is used to initialize `comint-delimiter-argument-list' in the
158shell buffer. The value may depend on the operating system or shell." 154shell buffer. The value may depend on the operating system or shell."
159 :type '(choice (const nil) 155 :type '(choice (const nil)
160 (repeat :tag "List of characters" character)) 156 (repeat :tag "List of characters" character))
161 ;; Reverted.
162;; :version "24.1" ; changed to nil (bug#8027)
163 :group 'shell) 157 :group 'shell)
164 158
165(defvar shell-file-name-chars 159(defcustom shell-file-name-chars
166 (if (memq system-type '(ms-dos windows-nt cygwin)) 160 (if (memq system-type '(ms-dos windows-nt cygwin))
167 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" 161 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-"
168 "[]~/A-Za-z0-9+@:_.$#%,={}-") 162 "[]~/A-Za-z0-9+@:_.$#%,={}-")
169 "String of characters valid in a file name. 163 "String of characters valid in a file name.
170This variable is used to initialize `comint-file-name-chars' in the 164This variable is used to initialize `comint-file-name-chars' in the
171shell buffer. The value may depend on the operating system or shell. 165shell buffer. The value may depend on the operating system or shell."
172 166 :type 'string
173This is a fine thing to set in your `.emacs' file.") 167 :group 'shell)
174 168
175(defvar shell-file-name-quote-list 169(defcustom shell-file-name-quote-list
176 (if (memq system-type '(ms-dos windows-nt)) 170 (if (memq system-type '(ms-dos windows-nt))
177 nil 171 nil
178 (append shell-delimiter-argument-list '(?\s ?$ ?\* ?\! ?\" ?\' ?\` ?\# ?\\))) 172 (append shell-delimiter-argument-list '(?\s ?$ ?\* ?\! ?\" ?\' ?\` ?\# ?\\)))
179 "List of characters to quote when in a file name. 173 "List of characters to quote when in a file name.
180This variable is used to initialize `comint-file-name-quote-list' in the 174This variable is used to initialize `comint-file-name-quote-list' in the
181shell buffer. The value may depend on the operating system or shell. 175shell buffer. The value may depend on the operating system or shell."
182 176 :type '(repeat character)
183This is a fine thing to set in your `.emacs' file.") 177 :group 'shell)
184 178
185(defvar shell-dynamic-complete-functions 179(defcustom shell-dynamic-complete-functions
186 '(comint-c-a-p-replace-by-expanded-history 180 '(comint-c-a-p-replace-by-expanded-history
187 shell-environment-variable-completion 181 shell-environment-variable-completion
188 shell-command-completion 182 shell-command-completion
@@ -192,9 +186,9 @@ This is a fine thing to set in your `.emacs' file.")
192 comint-filename-completion) 186 comint-filename-completion)
193 "List of functions called to perform completion. 187 "List of functions called to perform completion.
194This variable is used to initialize `comint-dynamic-complete-functions' in the 188This variable is used to initialize `comint-dynamic-complete-functions' in the
195shell buffer. 189shell buffer."
196 190 :type '(repeat function)
197This is a fine thing to set in your `.emacs' file.") 191 :group 'shell)
198 192
199(defcustom shell-command-regexp "[^;&|\n]+" 193(defcustom shell-command-regexp "[^;&|\n]+"
200 "Regexp to match a single command within a pipeline. 194 "Regexp to match a single command within a pipeline.
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 90cdea63e85..25a6fbfd998 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -706,7 +706,7 @@ will be stripped by a simplified optimizer when compiled into a
706singular expression. This variable will be turned into 706singular expression. This variable will be turned into
707`speedbar-file-regexp' for use with speedbar. You should use the 707`speedbar-file-regexp' for use with speedbar. You should use the
708function `speedbar-add-supported-extension' to add a new extension at 708function `speedbar-add-supported-extension' to add a new extension at
709runtime, or use the configuration dialog to set it in your .emacs file. 709runtime, or use the configuration dialog to set it in your init file.
710If you add an extension to this list, and it does not appear, you may 710If you add an extension to this list, and it does not appear, you may
711need to also modify `completion-ignored-extension' which will also help 711need to also modify `completion-ignored-extension' which will also help
712file completion." 712file completion."
diff --git a/lisp/startup.el b/lisp/startup.el
index 348e653dd28..243c9621752 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -71,12 +71,13 @@ once you are familiar with the contents of the startup screen."
71 "Non-nil inhibits the initial startup echo area message. 71 "Non-nil inhibits the initial startup echo area message.
72Setting this variable takes effect 72Setting this variable takes effect
73only if you do it with the customization buffer 73only if you do it with the customization buffer
74or if your `.emacs' file contains a line of this form: 74or if your init file contains a line of this form:
75 (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") 75 (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")
76If your `.emacs' file is byte-compiled, use the following form instead: 76If your init file is byte-compiled, use the following form
77instead:
77 (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) 78 (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\"))
78Thus, someone else using a copy of your `.emacs' file will see 79Thus, someone else using a copy of your init file will see the
79the startup message unless he personally acts to inhibit it." 80startup message unless he personally acts to inhibit it."
80 :type '(choice (const :tag "Don't inhibit") 81 :type '(choice (const :tag "Don't inhibit")
81 (string :tag "Enter your user name, to inhibit")) 82 (string :tag "Enter your user name, to inhibit"))
82 :group 'initialization) 83 :group 'initialization)
@@ -215,8 +216,8 @@ and VALUE is the value which is given to that frame parameter
215 ("-fn" 1 x-handle-switch font) 216 ("-fn" 1 x-handle-switch font)
216 ("-font" 1 x-handle-switch font) 217 ("-font" 1 x-handle-switch font)
217 ("-ib" 1 x-handle-numeric-switch internal-border-width) 218 ("-ib" 1 x-handle-numeric-switch internal-border-width)
218 ;;("-g" . x-handle-geometry) 219 ("-g" 1 x-handle-geometry)
219 ;;("-geometry" . x-handle-geometry) 220 ("-geometry" 1 x-handle-geometry)
220 ("-fg" 1 x-handle-switch foreground-color) 221 ("-fg" 1 x-handle-switch foreground-color)
221 ("-foreground" 1 x-handle-switch foreground-color) 222 ("-foreground" 1 x-handle-switch foreground-color)
222 ("-bg" 1 x-handle-switch background-color) 223 ("-bg" 1 x-handle-switch background-color)
@@ -261,10 +262,14 @@ and VALUE is the value which is given to that frame parameter
261 "Normal hook run after handling urgent options but before loading init files.") 262 "Normal hook run after handling urgent options but before loading init files.")
262 263
263(defvar after-init-hook nil 264(defvar after-init-hook nil
264 "Normal hook run after loading the init files, `~/.emacs' and `default.el'. 265 "Normal hook run after initializing the Emacs session.
265There is no `condition-case' around the running of these functions; 266It is run after Emacs loads the init file, `default' library, the
266therefore, if you set `debug-on-error' non-nil in `.emacs', 267abbrevs file, and additional Lisp packages (if any), and setting
267an error in one of these functions will invoke the debugger.") 268the value of `after-init-time'.
269
270There is no `condition-case' around the running of this hook;
271therefore, if `debug-on-error' is non-nil, an error in one of
272these functions will invoke the debugger.")
268 273
269(defvar emacs-startup-hook nil 274(defvar emacs-startup-hook nil
270 "Normal hook run after loading init files and handling the command line.") 275 "Normal hook run after loading init files and handling the command line.")
@@ -296,7 +301,7 @@ the user's init file.")
296 :group 'initialization) 301 :group 'initialization)
297 302
298(defvar init-file-user nil 303(defvar init-file-user nil
299 "Identity of user whose `.emacs' file is or was read. 304 "Identity of user whose init file is or was read.
300The value is nil if `-q' or `--no-init-file' was specified, 305The value is nil if `-q' or `--no-init-file' was specified,
301meaning do not load any init file. 306meaning do not load any init file.
302 307
@@ -306,7 +311,7 @@ or it may be a string containing a user's name meaning
306use that person's init file. 311use that person's init file.
307 312
308In either of the latter cases, `(concat \"~\" init-file-user \"/\")' 313In either of the latter cases, `(concat \"~\" init-file-user \"/\")'
309evaluates to the name of the directory where the `.emacs' file was 314evaluates to the name of the directory where the init file was
310looked for. 315looked for.
311 316
312Setting `init-file-user' does not prevent Emacs from loading 317Setting `init-file-user' does not prevent Emacs from loading
@@ -365,7 +370,7 @@ init file is read, in case it sets `mail-host-address'."
365 (t 370 (t
366 (concat user-emacs-directory "auto-save-list/.saves-"))) 371 (concat user-emacs-directory "auto-save-list/.saves-")))
367 "Prefix for generating `auto-save-list-file-name'. 372 "Prefix for generating `auto-save-list-file-name'.
368This is used after reading your `.emacs' file to initialize 373This is used after reading your init file to initialize
369`auto-save-list-file-name', by appending Emacs's pid and the system name, 374`auto-save-list-file-name', by appending Emacs's pid and the system name,
370if you have not already set `auto-save-list-file-name' yourself. 375if you have not already set `auto-save-list-file-name' yourself.
371Directories in the prefix will be created if necessary. 376Directories in the prefix will be created if necessary.
diff --git a/lisp/strokes.el b/lisp/strokes.el
index dfd0e95f61a..62a8528f25d 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -933,14 +933,7 @@ and then safely save them for later use, send letters to friends
933extracting the strokes for editing use once again, so the editing 933extracting the strokes for editing use once again, so the editing
934cycle can continue. 934cycle can continue.
935 935
936Strokes are easy to program and fun to use. To start strokes going, 936To toggle strokes-mode, invoke the command
937you'll want to put the following line in your .emacs file as mentioned
938in the commentary to strokes.el.
939
940This will load strokes when and only when you start Emacs on a window
941system, with a mouse or other pointer device defined.
942
943To toggle strokes-mode, you just do
944 937
945> M-x strokes-mode 938> M-x strokes-mode
946 939
diff --git a/lisp/subr.el b/lisp/subr.el
index e9b85ff1f38..13516419b6f 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -280,7 +280,9 @@ Treated as a declaration when used at the right place in a
280 280
281(defmacro ignore-errors (&rest body) 281(defmacro ignore-errors (&rest body)
282 "Execute BODY; if an error occurs, return nil. 282 "Execute BODY; if an error occurs, return nil.
283Otherwise, return result of last form in BODY." 283Otherwise, return result of last form in BODY.
284See also `with-demoted-errors' that does something similar
285without silencing all errors."
284 (declare (debug t) (indent 0)) 286 (declare (debug t) (indent 0))
285 `(condition-case nil (progn ,@body) (error nil))) 287 `(condition-case nil (progn ,@body) (error nil)))
286 288
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el
index 9a9a31f4253..aea2e8c1092 100644
--- a/lisp/term/iris-ansi.el
+++ b/lisp/term/iris-ansi.el
@@ -322,7 +322,7 @@
322 "Terminal initialization function for iris-ansi." 322 "Terminal initialization function for iris-ansi."
323 ;; Use inheritance to let the main keymap override these defaults. 323 ;; Use inheritance to let the main keymap override these defaults.
324 ;; This way we don't override terminfo-derived settings or settings 324 ;; This way we don't override terminfo-derived settings or settings
325 ;; made in the .emacs file. 325 ;; made in the init file.
326 (let ((m (copy-keymap iris-function-map))) 326 (let ((m (copy-keymap iris-function-map)))
327 (set-keymap-parent m (keymap-parent input-decode-map)) 327 (set-keymap-parent m (keymap-parent input-decode-map))
328 (set-keymap-parent input-decode-map m))) 328 (set-keymap-parent input-decode-map m)))
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el
index 76a3a31cedc..6b9e1301003 100644
--- a/lisp/term/lk201.el
+++ b/lisp/term/lk201.el
@@ -75,7 +75,7 @@
75(defun terminal-init-lk201 () 75(defun terminal-init-lk201 ()
76 ;; Use inheritance to let the main keymap override these defaults. 76 ;; Use inheritance to let the main keymap override these defaults.
77 ;; This way we don't override terminfo-derived settings or settings 77 ;; This way we don't override terminfo-derived settings or settings
78 ;; made in the .emacs file. 78 ;; made in the init file.
79 (let ((m (copy-keymap lk201-function-map))) 79 (let ((m (copy-keymap lk201-function-map)))
80 (set-keymap-parent m (keymap-parent input-decode-map)) 80 (set-keymap-parent m (keymap-parent input-decode-map))
81 (set-keymap-parent input-decode-map m))) 81 (set-keymap-parent input-decode-map m)))
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index 481d6b498cf..98141563006 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -166,7 +166,7 @@
166 166
167 ;; Use inheritance to let the main keymap override those defaults. 167 ;; Use inheritance to let the main keymap override those defaults.
168 ;; This way we don't override terminfo-derived settings or settings 168 ;; This way we don't override terminfo-derived settings or settings
169 ;; made in the .emacs file. 169 ;; made in the init file.
170 (let ((m (copy-keymap rxvt-function-map))) 170 (let ((m (copy-keymap rxvt-function-map)))
171 (set-keymap-parent m (keymap-parent input-decode-map)) 171 (set-keymap-parent m (keymap-parent input-decode-map))
172 (set-keymap-parent input-decode-map m)) 172 (set-keymap-parent input-decode-map m))
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el
index b02d39c1e0f..f1b6eea8875 100644
--- a/lisp/term/tvi970.el
+++ b/lisp/term/tvi970.el
@@ -93,7 +93,7 @@
93 "Terminal initialization function for tvi970." 93 "Terminal initialization function for tvi970."
94 ;; Use inheritance to let the main keymap override these defaults. 94 ;; Use inheritance to let the main keymap override these defaults.
95 ;; This way we don't override terminfo-derived settings or settings 95 ;; This way we don't override terminfo-derived settings or settings
96 ;; made in the .emacs file. 96 ;; made in the init file.
97 (let ((m (copy-keymap tvi970-terminal-map))) 97 (let ((m (copy-keymap tvi970-terminal-map)))
98 (set-keymap-parent m (keymap-parent input-decode-map)) 98 (set-keymap-parent m (keymap-parent input-decode-map))
99 (set-keymap-parent input-decode-map m)) 99 (set-keymap-parent input-decode-map m))
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el
index d037962af19..ce148b62dba 100644
--- a/lisp/term/wyse50.el
+++ b/lisp/term/wyse50.el
@@ -109,7 +109,7 @@
109 "Terminal initialization function for wyse50." 109 "Terminal initialization function for wyse50."
110 ;; Use inheritance to let the main keymap override these defaults. 110 ;; Use inheritance to let the main keymap override these defaults.
111 ;; This way we don't override terminfo-derived settings or settings 111 ;; This way we don't override terminfo-derived settings or settings
112 ;; made in the .emacs file. 112 ;; made in the init file.
113 (let ((m (copy-keymap wyse50-terminal-map))) 113 (let ((m (copy-keymap wyse50-terminal-map)))
114 (set-keymap-parent m (keymap-parent input-decode-map)) 114 (set-keymap-parent m (keymap-parent input-decode-map))
115 (set-keymap-parent input-decode-map m)) 115 (set-keymap-parent input-decode-map m))
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 28fb9da0b9d..e4871658b98 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -480,7 +480,7 @@ The relevant features are:
480 480
481 ;; Use inheritance to let the main keymap override those defaults. 481 ;; Use inheritance to let the main keymap override those defaults.
482 ;; This way we don't override terminfo-derived settings or settings 482 ;; This way we don't override terminfo-derived settings or settings
483 ;; made in the .emacs file. 483 ;; made in the init file.
484 (set-keymap-parent map (keymap-parent input-decode-map)) 484 (set-keymap-parent map (keymap-parent input-decode-map))
485 (set-keymap-parent input-decode-map map))) 485 (set-keymap-parent input-decode-map map)))
486 486
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index a9320d945ef..42f0418b690 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -290,9 +290,9 @@ If this variable is nil, all regions are treated as small."
290;;* Mode specific options enable users to disable flyspell on */ 290;;* Mode specific options enable users to disable flyspell on */
291;;* certain word depending of the emacs mode. For instance, when */ 291;;* certain word depending of the emacs mode. For instance, when */
292;;* using flyspell with mail-mode add the following expression */ 292;;* using flyspell with mail-mode add the following expression */
293;;* in your .emacs file: */ 293;;* in your init file: */
294;;* (add-hook 'mail-mode */ 294;;* (add-hook 'mail-mode */
295;;* (lambda () (setq flyspell-generic-check-word-predicate */ 295;;* (lambda () (setq flyspell-generic-check-word-predicate */
296;;* 'mail-mode-flyspell-verify))) */ 296;;* 'mail-mode-flyspell-verify))) */
297;;*---------------------------------------------------------------------*/ 297;;*---------------------------------------------------------------------*/
298(defvar flyspell-generic-check-word-predicate nil 298(defvar flyspell-generic-check-word-predicate nil
@@ -488,7 +488,7 @@ invoking `ispell-change-dictionary'.
488Consider using the `ispell-parser' to check your text. For instance 488Consider using the `ispell-parser' to check your text. For instance
489consider adding: 489consider adding:
490\(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) 490\(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex))))
491in your .emacs file. 491in your init file.
492 492
493\\[flyspell-region] checks all words inside a region. 493\\[flyspell-region] checks all words inside a region.
494\\[flyspell-buffer] checks the whole buffer." 494\\[flyspell-buffer] checks the whole buffer."
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 0c7966f22d3..51a4800de52 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1127,7 +1127,8 @@ aspell is used along with Emacs).")
1127 1127
1128 ;; If Emacs flavor supports [:alpha:] use it for global dicts. If 1128 ;; If Emacs flavor supports [:alpha:] use it for global dicts. If
1129 ;; spellchecker also supports UTF-8 via command-line option use it 1129 ;; spellchecker also supports UTF-8 via command-line option use it
1130 ;; in communication. This does not affect definitions in ~/.emacs. 1130 ;; in communication. This does not affect definitions in your
1131 ;; init file.
1131 (if ispell-emacs-alpha-regexp 1132 (if ispell-emacs-alpha-regexp
1132 (let (tmp-dicts-alist) 1133 (let (tmp-dicts-alist)
1133 (dolist (adict ispell-dictionary-alist) 1134 (dolist (adict ispell-dictionary-alist)
@@ -3680,7 +3681,7 @@ use the `x' command. (Any subsequent regions will be checked.)
3680The `X' command aborts sending the message so that you can edit the buffer. 3681The `X' command aborts sending the message so that you can edit the buffer.
3681 3682
3682To spell-check whenever a message is sent, include the appropriate lines 3683To spell-check whenever a message is sent, include the appropriate lines
3683in your .emacs file: 3684in your init file:
3684 (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5 3685 (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5
3685 (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4 3686 (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4
3686 (add-hook 'mail-send-hook 'ispell-message) 3687 (add-hook 'mail-send-hook 'ispell-message)
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index d8afb3e5544..8584c496a97 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -47,7 +47,7 @@
47;; To turn RefTeX Mode on and off in a buffer, use `M-x reftex-mode'. 47;; To turn RefTeX Mode on and off in a buffer, use `M-x reftex-mode'.
48;; 48;;
49;; To turn on RefTeX Mode for all LaTeX files, add the following lines 49;; To turn on RefTeX Mode for all LaTeX files, add the following lines
50;; to your .emacs file: 50;; to your init file:
51;; 51;;
52;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode 52;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode
53;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode 53;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode
@@ -99,7 +99,7 @@
99;; 99;;
100;; To turn RefTeX Mode on and off in a particular buffer, use `M-x 100;; To turn RefTeX Mode on and off in a particular buffer, use `M-x
101;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the 101;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the
102;; following lines to your `.emacs' file: 102;; following lines to your init file:
103;; 103;;
104;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode 104;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
105;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode 105;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 767f8f360bb..56b0ee47e4a 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -81,7 +81,7 @@
81 81
82;;; INSTALLATION 82;;; INSTALLATION
83 83
84;; Add the following lines to your `.emacs' file: 84;; Add the following lines to your init file:
85;; 85;;
86;; (require 'rst) 86;; (require 'rst)
87;; 87;;
@@ -103,11 +103,54 @@
103 103
104;;; Code: 104;;; Code:
105 105
106;; FIXME: Check through major mode conventions again.
107
106;; FIXME: Add proper ";;;###autoload" comments. 108;; FIXME: Add proper ";;;###autoload" comments.
107 109
108;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*- 110;; FIXME: When 24.1 is common place remove use of `lexical-let' and put "-*-
109;; lexical-binding: t -*-" in the first line. 111;; lexical-binding: t -*-" in the first line.
110 112
113;; FIXME: Use `testcover'.
114
115;; FIXME: The adornment classification often called `ado' should be a
116;; `defstruct'.
117
118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
119;; Support for `testcover'
120
121(when (boundp 'testcover-1value-functions)
122 ;; Below `lambda' is used in a loop with varying parameters and is thus not
123 ;; 1valued.
124 (setq testcover-1value-functions
125 (delq 'lambda testcover-1value-functions))
126 (add-to-list 'testcover-compose-functions 'lambda))
127
128(defun rst-testcover-defcustom ()
129 "Remove all customized variables from `testcover-module-constants'.
130This seems to be a bug in `testcover': `defcustom' variables are
131considered constants. Revert it with this function after each `defcustom'."
132 (when (boundp 'testcover-module-constants)
133 (setq testcover-module-constants
134 (delq nil
135 (mapcar
136 (lambda (sym)
137 (if (not (plist-member (symbol-plist sym) 'standard-value))
138 sym))
139 testcover-module-constants)))))
140
141(defun rst-testcover-add-compose (fun)
142 "Add FUN to `testcover-compose-functions'."
143 (when (boundp 'testcover-compose-functions)
144 (add-to-list 'testcover-compose-functions fun)))
145
146(defun rst-testcover-add-1value (fun)
147 "Add FUN to `testcover-1value-functions'."
148 (when (boundp 'testcover-1value-functions)
149 (add-to-list 'testcover-1value-functions fun)))
150
151;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
152;; Common Lisp stuff
153
111;; Only use of macros is allowed - may be replaced by `cl-lib' some time. 154;; Only use of macros is allowed - may be replaced by `cl-lib' some time.
112(eval-when-compile 155(eval-when-compile
113 (require 'cl)) 156 (require 'cl))
@@ -160,6 +203,7 @@ Comparison done with `equal'."
160;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 203;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
161;; Versions 204;; Versions
162 205
206;; testcover: ok.
163(defun rst-extract-version (delim-re head-re re tail-re var &optional default) 207(defun rst-extract-version (delim-re head-re re tail-re var &optional default)
164 "Extract the version from a variable according to the given regexes. 208 "Extract the version from a variable according to the given regexes.
165Return the version after regex DELIM-RE and HEAD-RE matching RE 209Return the version after regex DELIM-RE and HEAD-RE matching RE
@@ -173,7 +217,7 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match."
173;; Use CVSHeader to really get information from CVS and not other version 217;; Use CVSHeader to really get information from CVS and not other version
174;; control systems. 218;; control systems.
175(defconst rst-cvs-header 219(defconst rst-cvs-header
176 "$CVSHeader: sm/rst_el/rst.el,v 1.301 2012-07-30 19:29:46 stefan Exp $") 220 "$CVSHeader: sm/rst_el/rst.el,v 1.324 2012-09-20 18:52:46 stefan Exp $")
177(defconst rst-cvs-rev 221(defconst rst-cvs-rev
178 (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" 222 (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+"
179 " .*" rst-cvs-header "0.0") 223 " .*" rst-cvs-header "0.0")
@@ -483,6 +527,8 @@ argument list for `rst-re'.")
483(defvar rst-re-alist) ; Forward declare to use it in `rst-re'. 527(defvar rst-re-alist) ; Forward declare to use it in `rst-re'.
484 528
485;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel. 529;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel.
530(rst-testcover-add-compose 'rst-re)
531;; testcover: ok.
486(defun rst-re (&rest args) 532(defun rst-re (&rest args)
487 "Interpret ARGS as regular expressions and return a regex string. 533 "Interpret ARGS as regular expressions and return a regex string.
488Each element of ARGS may be one of the following: 534Each element of ARGS may be one of the following:
@@ -556,6 +602,7 @@ After interpretation of ARGS the results are concatenated as for
556;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 602;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
557;; Mode definition 603;; Mode definition
558 604
605;; testcover: ok.
559(defun rst-define-key (keymap key def &rest deprecated) 606(defun rst-define-key (keymap key def &rest deprecated)
560 "Bind like `define-key' but add deprecated key definitions. 607 "Bind like `define-key' but add deprecated key definitions.
561KEYMAP, KEY, and DEF are as in `define-key'. DEPRECATED key 608KEYMAP, KEY, and DEF are as in `define-key'. DEPRECATED key
@@ -734,6 +781,7 @@ This inherits from Text mode.")
734The hook for `text-mode' is run before this one." 781The hook for `text-mode' is run before this one."
735 :group 'rst 782 :group 'rst
736 :type '(hook)) 783 :type '(hook))
784(rst-testcover-defcustom)
737 785
738;; Pull in variable definitions silencing byte-compiler. 786;; Pull in variable definitions silencing byte-compiler.
739(require 'newcomment) 787(require 'newcomment)
@@ -799,6 +847,12 @@ highlighting.
799 (set (make-local-variable 'uncomment-region-function) 847 (set (make-local-variable 'uncomment-region-function)
800 'rst-uncomment-region) 848 'rst-uncomment-region)
801 849
850 ;; Imenu and which function.
851 ;; FIXME: Check documentation of `which-function' for alternative ways to
852 ;; determine the current function name.
853 (set (make-local-variable 'imenu-create-index-function)
854 'rst-imenu-create-index)
855
802 ;; Font lock. 856 ;; Font lock.
803 (set (make-local-variable 'font-lock-defaults) 857 (set (make-local-variable 'font-lock-defaults)
804 '(rst-font-lock-keywords 858 '(rst-font-lock-keywords
@@ -949,6 +1003,7 @@ file."
949 (const :tag "Underline only" simple)) 1003 (const :tag "Underline only" simple))
950 (integer :tag "Indentation for overline and underline type" 1004 (integer :tag "Indentation for overline and underline type"
951 :value 0)))) 1005 :value 0))))
1006(rst-testcover-defcustom)
952 1007
953(defcustom rst-default-indent 1 1008(defcustom rst-default-indent 1
954 "Number of characters to indent the section title. 1009 "Number of characters to indent the section title.
@@ -958,7 +1013,7 @@ from a simple adornment style to a over-and-under adornment
958style." 1013style."
959 :group 'rst-adjust 1014 :group 'rst-adjust
960 :type '(integer)) 1015 :type '(integer))
961 1016(rst-testcover-defcustom)
962 1017
963(defun rst-compare-adornments (ado1 ado2) 1018(defun rst-compare-adornments (ado1 ado2)
964 "Compare adornments. 1019 "Compare adornments.
@@ -979,7 +1034,8 @@ not found."
979 (setq cur (cdr cur))) 1034 (setq cur (cdr cur)))
980 cur)) 1035 cur))
981 1036
982 1037;; testcover: FIXME: Test with `rst-preferred-adornments' == nil. Add test
1038;; `rst-adjust-no-preference'.
983(defun rst-suggest-new-adornment (allados &optional prev) 1039(defun rst-suggest-new-adornment (allados &optional prev)
984 "Suggest a new, different adornment from all that have been seen. 1040 "Suggest a new, different adornment from all that have been seen.
985 1041
@@ -1032,7 +1088,7 @@ requested adornment."
1032 len) 1088 len)
1033 1089
1034 ;; Fixup whitespace at the beginning and end of the line. 1090 ;; Fixup whitespace at the beginning and end of the line.
1035 (if (or (null indent) (eq style 'simple)) 1091 (if (or (null indent) (eq style 'simple)) ;; testcover: ok.
1036 (setq indent 0)) 1092 (setq indent 0))
1037 (beginning-of-line) 1093 (beginning-of-line)
1038 (delete-horizontal-space) 1094 (delete-horizontal-space)
@@ -1046,7 +1102,8 @@ requested adornment."
1046 1102
1047 ;; Remove previous line if it is an adornment. 1103 ;; Remove previous line if it is an adornment.
1048 (save-excursion 1104 (save-excursion
1049 (forward-line -1) 1105 (forward-line -1) ;; testcover: FIXME: Doesn't work when in first line
1106 ;; of buffer.
1050 (if (and (looking-at (rst-re 'ado-beg-2-1)) 1107 (if (and (looking-at (rst-re 'ado-beg-2-1))
1051 ;; Avoid removing the underline of a title right above us. 1108 ;; Avoid removing the underline of a title right above us.
1052 (save-excursion (forward-line -1) 1109 (save-excursion (forward-line -1)
@@ -1055,7 +1112,8 @@ requested adornment."
1055 1112
1056 ;; Remove following line if it is an adornment. 1113 ;; Remove following line if it is an adornment.
1057 (save-excursion 1114 (save-excursion
1058 (forward-line +1) 1115 (forward-line +1) ;; testcover: FIXME: Doesn't work when in last line
1116 ;; of buffer.
1059 (if (looking-at (rst-re 'ado-beg-2-1)) 1117 (if (looking-at (rst-re 'ado-beg-2-1))
1060 (rst-delete-entire-line)) 1118 (rst-delete-entire-line))
1061 ;; Add a newline if we're at the end of the buffer, for the subsequence 1119 ;; Add a newline if we're at the end of the buffer, for the subsequence
@@ -1071,13 +1129,14 @@ requested adornment."
1071 (insert (make-string len char)))) 1129 (insert (make-string len char))))
1072 1130
1073 ;; Insert underline. 1131 ;; Insert underline.
1074 (forward-line +1) 1132 (1value ;; Line has been inserted above.
1133 (forward-line +1))
1075 (open-line 1) 1134 (open-line 1)
1076 (insert (make-string len char)) 1135 (insert (make-string len char))
1077 1136
1078 (forward-line +1) 1137 (1value ;; Line has been inserted above.
1079 (goto-char marker) 1138 (forward-line +1))
1080 )) 1139 (goto-char marker)))
1081 1140
1082(defun rst-classify-adornment (adornment end) 1141(defun rst-classify-adornment (adornment end)
1083 "Classify adornment for section titles and transitions. 1142 "Classify adornment for section titles and transitions.
@@ -1104,11 +1163,14 @@ Return nil if no syntactically valid adornment is found."
1104 (ado-re (rst-re ado-ch 'adorep3-hlp)) 1163 (ado-re (rst-re ado-ch 'adorep3-hlp))
1105 (end-pnt (point)) 1164 (end-pnt (point))
1106 (beg-pnt (progn 1165 (beg-pnt (progn
1107 (forward-line 0) 1166 (1value ;; No lines may be left to move.
1167 (forward-line 0))
1108 (point))) 1168 (point)))
1109 (nxt-emp ; Next line nonexistent or empty 1169 (nxt-emp ; Next line nonexistent or empty
1110 (save-excursion 1170 (save-excursion
1111 (or (not (zerop (forward-line 1))) 1171 (or (not (zerop (forward-line 1)))
1172 ;; testcover: FIXME: Add test classifying at the end of
1173 ;; buffer.
1112 (looking-at (rst-re 'lin-end))))) 1174 (looking-at (rst-re 'lin-end)))))
1113 (prv-emp ; Previous line nonexistent or empty 1175 (prv-emp ; Previous line nonexistent or empty
1114 (save-excursion 1176 (save-excursion
@@ -1117,7 +1179,9 @@ Return nil if no syntactically valid adornment is found."
1117 (ttl-blw ; Title found below starting here. 1179 (ttl-blw ; Title found below starting here.
1118 (save-excursion 1180 (save-excursion
1119 (and 1181 (and
1120 (zerop (forward-line 1)) 1182 (zerop (forward-line 1)) ;; testcover: FIXME: Add test
1183 ;; classifying at the end of
1184 ;; buffer.
1121 (looking-at (rst-re 'ttl-beg)) 1185 (looking-at (rst-re 'ttl-beg))
1122 (point)))) 1186 (point))))
1123 (ttl-abv ; Title found above starting here. 1187 (ttl-abv ; Title found above starting here.
@@ -1129,7 +1193,9 @@ Return nil if no syntactically valid adornment is found."
1129 (und-fnd ; Matching underline found starting here. 1193 (und-fnd ; Matching underline found starting here.
1130 (save-excursion 1194 (save-excursion
1131 (and ttl-blw 1195 (and ttl-blw
1132 (zerop (forward-line 2)) 1196 (zerop (forward-line 2)) ;; testcover: FIXME: Add test
1197 ;; classifying at the end of
1198 ;; buffer.
1133 (looking-at (rst-re ado-re 'lin-end)) 1199 (looking-at (rst-re ado-re 'lin-end))
1134 (point)))) 1200 (point))))
1135 (ovr-fnd ; Matching overline found starting here. 1201 (ovr-fnd ; Matching overline found starting here.
@@ -1174,8 +1240,8 @@ Return nil if no syntactically valid adornment is found."
1174 (setq key nil))) 1240 (setq key nil)))
1175 (if key 1241 (if key
1176 (list key 1242 (list key
1177 (or beg-ovr beg-txt beg-und) 1243 (or beg-ovr beg-txt)
1178 (or end-und end-txt end-ovr) 1244 (or end-und end-txt)
1179 beg-ovr end-ovr beg-txt end-txt beg-und end-und))))))) 1245 beg-ovr end-ovr beg-txt end-txt beg-und end-und)))))))
1180 1246
1181(defun rst-find-title-line () 1247(defun rst-find-title-line ()
@@ -1193,7 +1259,8 @@ in the first element. If there is no adornment around the title
1193CHARACTER is also nil and match groups for overline and underline 1259CHARACTER is also nil and match groups for overline and underline
1194are nil." 1260are nil."
1195 (save-excursion 1261 (save-excursion
1196 (forward-line 0) 1262 (1value ;; No lines may be left to move.
1263 (forward-line 0))
1197 (let ((orig-pnt (point)) 1264 (let ((orig-pnt (point))
1198 (orig-end (line-end-position))) 1265 (orig-end (line-end-position)))
1199 (cond 1266 (cond
@@ -1253,6 +1320,7 @@ t when no section adornments were found. Value depends on
1253`rst-all-sections'.") 1320`rst-all-sections'.")
1254(make-variable-buffer-local 'rst-section-hierarchy) 1321(make-variable-buffer-local 'rst-section-hierarchy)
1255 1322
1323(rst-testcover-add-1value 'rst-reset-section-caches)
1256(defun rst-reset-section-caches () 1324(defun rst-reset-section-caches ()
1257 "Reset all section cache variables. 1325 "Reset all section cache variables.
1258Should be called by interactive functions which deal with sections." 1326Should be called by interactive functions which deal with sections."
@@ -1354,9 +1422,7 @@ Return a list of the previous and next adornments."
1354 (if (and cur (caar cur)) 1422 (if (and cur (caar cur))
1355 (setq next (if (= curline (caar cur)) (cdr cur) cur))) 1423 (setq next (if (= curline (caar cur)) (cdr cur) cur)))
1356 1424
1357 (mapcar 'cdar (list prev next)) 1425 (mapcar 'cdar (list prev next))))
1358 ))
1359
1360 1426
1361(defun rst-adornment-complete-p (ado) 1427(defun rst-adornment-complete-p (ado)
1362 "Return true if the adornment ADO around point is complete." 1428 "Return true if the adornment ADO around point is complete."
@@ -1369,8 +1435,7 @@ Return a list of the previous and next adornments."
1369 (let* ((char (car ado)) 1435 (let* ((char (car ado))
1370 (style (cadr ado)) 1436 (style (cadr ado))
1371 (indent (caddr ado)) 1437 (indent (caddr ado))
1372 (endcol (save-excursion (end-of-line) (current-column))) 1438 (endcol (save-excursion (end-of-line) (current-column))))
1373 )
1374 (if char 1439 (if char
1375 (let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$"))) 1440 (let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$")))
1376 (and 1441 (and
@@ -1380,9 +1445,7 @@ Return a list of the previous and next adornments."
1380 (or (not (eq style 'over-and-under)) 1445 (or (not (eq style 'over-and-under))
1381 (save-excursion (forward-line -1) 1446 (save-excursion (forward-line -1)
1382 (beginning-of-line) 1447 (beginning-of-line)
1383 (looking-at exps)))) 1448 (looking-at exps))))))))
1384 ))
1385 ))
1386 1449
1387 1450
1388(defun rst-get-next-adornment 1451(defun rst-get-next-adornment
@@ -1414,8 +1477,7 @@ REVERSE-DIRECTION is used to reverse the cycling order."
1414 cur)) 1477 cur))
1415 1478
1416 ;; If not found, take the first of all adornments. 1479 ;; If not found, take the first of all adornments.
1417 suggestion 1480 suggestion)))
1418 )))
1419 1481
1420 1482
1421;; FIXME: A line "``/`` full" is not accepted as a section title. 1483;; FIXME: A line "``/`` full" is not accepted as a section title.
@@ -1456,7 +1518,7 @@ b. a negative numerical argument, which generally inverts the
1456 (reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0))) 1518 (reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0)))
1457 (toggle-style (and pfxarg (not reverse-direction)))) 1519 (toggle-style (and pfxarg (not reverse-direction))))
1458 1520
1459 (if (rst-portable-mark-active-p) 1521 (if (use-region-p)
1460 ;; Adjust adornments within region. 1522 ;; Adjust adornments within region.
1461 (rst-promote-region (and pfxarg t)) 1523 (rst-promote-region (and pfxarg t))
1462 ;; Adjust adornment around point. 1524 ;; Adjust adornment around point.
@@ -1466,15 +1528,14 @@ b. a negative numerical argument, which generally inverts the
1466 (run-hooks 'rst-adjust-hook) 1528 (run-hooks 'rst-adjust-hook)
1467 1529
1468 ;; Make sure to reset the cursor position properly after we're done. 1530 ;; Make sure to reset the cursor position properly after we're done.
1469 (goto-char origpt) 1531 (goto-char origpt)))
1470
1471 ))
1472 1532
1473(defcustom rst-adjust-hook nil 1533(defcustom rst-adjust-hook nil
1474 "Hooks to be run after running `rst-adjust'." 1534 "Hooks to be run after running `rst-adjust'."
1475 :group 'rst-adjust 1535 :group 'rst-adjust
1476 :type '(hook) 1536 :type '(hook)
1477 :package-version '(rst . "1.1.0")) 1537 :package-version '(rst . "1.1.0"))
1538(rst-testcover-defcustom)
1478 1539
1479(defcustom rst-new-adornment-down nil 1540(defcustom rst-new-adornment-down nil
1480 "Controls level of new adornment for section headers." 1541 "Controls level of new adornment for section headers."
@@ -1483,6 +1544,7 @@ b. a negative numerical argument, which generally inverts the
1483 (const :tag "Same level as previous one" nil) 1544 (const :tag "Same level as previous one" nil)
1484 (const :tag "One level down relative to the previous one" t)) 1545 (const :tag "One level down relative to the previous one" t))
1485 :package-version '(rst . "1.1.0")) 1546 :package-version '(rst . "1.1.0"))
1547(rst-testcover-defcustom)
1486 1548
1487(defun rst-adjust-adornment (pfxarg) 1549(defun rst-adjust-adornment (pfxarg)
1488 "Call `rst-adjust-adornment-work' interactively. 1550 "Call `rst-adjust-adornment-work' interactively.
@@ -1741,8 +1803,7 @@ hierarchy is similar to that used by `rst-adjust-adornment-work'."
1741 (region-begin-line (line-number-at-pos (region-beginning))) 1803 (region-begin-line (line-number-at-pos (region-beginning)))
1742 (region-end-line (line-number-at-pos (region-end))) 1804 (region-end-line (line-number-at-pos (region-end)))
1743 1805
1744 marker-list 1806 marker-list)
1745 )
1746 1807
1747 ;; Skip the markers that come before the region beginning. 1808 ;; Skip the markers that come before the region beginning.
1748 (while (and cur (< (caar cur) region-begin-line)) 1809 (while (and cur (< (caar cur) region-begin-line))
@@ -1771,8 +1832,7 @@ hierarchy is similar to that used by `rst-adjust-adornment-work'."
1771 1832
1772 ;; Clear marker to avoid slowing down the editing after we're done. 1833 ;; Clear marker to avoid slowing down the editing after we're done.
1773 (set-marker (car p) nil)) 1834 (set-marker (car p) nil))
1774 (setq deactivate-mark nil) 1835 (setq deactivate-mark nil))))
1775 )))
1776 1836
1777 1837
1778 1838
@@ -1792,9 +1852,7 @@ in ADORNMENTS."
1792 (apply 'rst-update-section x) 1852 (apply 'rst-update-section x)
1793 (goto-char (point-max)) 1853 (goto-char (point-max))
1794 (insert "\n") 1854 (insert "\n")
1795 (incf level) 1855 (incf level))))))
1796 ))
1797 )))
1798 1856
1799(defun rst-straighten-adornments () 1857(defun rst-straighten-adornments ()
1800 "Redo all the adornments in the current buffer. 1858 "Redo all the adornments in the current buffer.
@@ -1822,10 +1880,7 @@ in order to adapt it to our preferred style."
1822 (apply 'rst-update-section (nth (car lm) rst-preferred-adornments)) 1880 (apply 'rst-update-section (nth (car lm) rst-preferred-adornments))
1823 1881
1824 ;; Reset the marker to avoid slowing down editing until it gets GC'ed. 1882 ;; Reset the marker to avoid slowing down editing until it gets GC'ed.
1825 (set-marker (cdr lm) nil) 1883 (set-marker (cdr lm) nil)))))
1826 )
1827 )))
1828
1829 1884
1830 1885
1831;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1886;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1906,7 +1961,7 @@ and the column of the point."
1906 (looking-at pfx-re)))))) ; ...pfx at same level. 1961 (looking-at pfx-re)))))) ; ...pfx at same level.
1907 (push (cons (point) (current-column)) 1962 (push (cons (point) (current-column))
1908 pfx)) 1963 pfx))
1909 (forward-line 1)) ) 1964 (forward-line 1)))
1910 (nreverse pfx))) 1965 (nreverse pfx)))
1911 1966
1912(defun rst-insert-list-pos (newitem) 1967(defun rst-insert-list-pos (newitem)
@@ -2005,6 +2060,7 @@ starting item, for example 'e' for 'A)' style. The position is also arranged by
2005 :tag (char-to-string char) char)) 2060 :tag (char-to-string char) char))
2006 rst-bullets))) 2061 rst-bullets)))
2007 :package-version '(rst . "1.1.0")) 2062 :package-version '(rst . "1.1.0"))
2063(rst-testcover-defcustom)
2008 2064
2009(defun rst-insert-list-continue (curitem prefer-roman) 2065(defun rst-insert-list-continue (curitem prefer-roman)
2010 "Insert a list item with list start CURITEM including its indentation level. 2066 "Insert a list item with list start CURITEM including its indentation level.
@@ -2123,130 +2179,112 @@ adjust. If bullets are found on levels beyond the
2123;; Table of contents 2179;; Table of contents
2124;; ================= 2180;; =================
2125 2181
2126(defun rst-get-stripped-line () 2182;; FIXME: Return value should be a `defstruct'.
2127 "Return the line at cursor, stripped from whitespace."
2128 (re-search-forward (rst-re "\\S .*\\S ") (line-end-position))
2129 (buffer-substring-no-properties (match-beginning 0)
2130 (match-end 0)) )
2131
2132(defun rst-section-tree () 2183(defun rst-section-tree ()
2133 "Get the hierarchical tree of section titles. 2184 "Return the hierarchical tree of section titles.
2134 2185A tree entry looks like ((TITLE MARKER) CHILD...). TITLE is the
2135Returns a hierarchical tree of the sections titles in the 2186stripped text of the section title. MARKER is a marker for the
2136document. This can be used to generate a table of contents for 2187beginning of the title text. For the top node or a missing
2137the document. The top node will always be a nil node, with the 2188section level node TITLE is nil and MARKER points to the title
2138top level titles as children (there may potentially be more than 2189text of the first child. Each CHILD is another tree entry. The
2139one). 2190CHILD list may be empty."
2140
2141Each section title consists in a cons of the stripped title
2142string and a marker to the section in the original text document.
2143
2144If there are missing section levels, the section titles are
2145inserted automatically, and the title string is set to nil, and
2146the marker set to the first non-nil child of itself.
2147Conceptually, the nil nodes--i.e.\ those which have no title--are
2148to be considered as being the same line as their first non-nil
2149child. This has advantages later in processing the graph."
2150
2151 (let ((hier (rst-get-hierarchy)) 2191 (let ((hier (rst-get-hierarchy))
2152 (levels (make-hash-table :test 'equal :size 10)) 2192 (ch-sty2level (make-hash-table :test 'equal :size 10))
2153 lines) 2193 lev-ttl-mrk-l)
2154 2194
2155 (let ((lev 0)) 2195 (let ((lev 0))
2156 (dolist (ado hier) 2196 (dolist (ado hier)
2157 ;; Compare just the character and indent in the hash table. 2197 ;; Compare just the character and indent in the hash table.
2158 (puthash (cons (car ado) (cadr ado)) lev levels) 2198 (puthash (cons (car ado) (cadr ado)) lev ch-sty2level)
2159 (incf lev))) 2199 (incf lev)))
2160 2200
2161 ;; Create a list of lines that contains (text, level, marker) for each 2201 ;; Create a list that contains (LEVEL TITLE MARKER) for each adornment.
2162 ;; adornment.
2163 (save-excursion 2202 (save-excursion
2164 (setq lines 2203 (setq lev-ttl-mrk-l
2165 (mapcar (lambda (ado) 2204 (mapcar (lambda (ado)
2166 (goto-char (point-min)) 2205 (goto-char (point-min))
2167 (forward-line (1- (car ado))) 2206 (1value ;; This should really succeed.
2168 (list (gethash (cons (cadr ado) (caddr ado)) levels) 2207 (forward-line (1- (car ado))))
2169 (rst-get-stripped-line) 2208 (list (gethash (cons (cadr ado) (caddr ado)) ch-sty2level)
2170 (progn 2209 ;; Get title.
2171 (beginning-of-line 1) 2210 (save-excursion
2172 (point-marker)))) 2211 (if (re-search-forward
2212 (rst-re "\\S .*\\S ") (line-end-position) t)
2213 (buffer-substring-no-properties
2214 (match-beginning 0) (match-end 0))
2215 ""))
2216 (point-marker)))
2173 (rst-find-all-adornments)))) 2217 (rst-find-all-adornments))))
2174 (let ((lcontnr (cons nil lines))) 2218 (cdr (rst-section-tree-rec lev-ttl-mrk-l -1))))
2175 (rst-section-tree-rec lcontnr -1)))) 2219
2176 2220;; FIXME: Return value should be a `defstruct'.
2177 2221(defun rst-section-tree-rec (remaining lev)
2178(defun rst-section-tree-rec (ados lev) 2222 "Process the first entry of REMAINING expected to be on level LEV.
2179 "Recursive guts of the section tree construction. 2223REMAINING is the remaining list of adornments consisting
2180ADOS is a cons cell whose cdr is the remaining list of 2224of (LEVEL TITLE MARKER) entries.
2181adornments, and we change it as we consume them. LEV is 2225
2182the current level of that node. This function returns a 2226Return (UNPROCESSED (TITLE MARKER) CHILD...) for the first entry
2183pair of the subtree that was built. This treats the ADOS 2227of REMAINING where TITLE is nil if the expected level is not
2184list destructively." 2228matched. UNPROCESSED is the list of still unprocessed entries.
2185 2229Each CHILD is a child of this entry in the same format but
2186 (let ((nado (cadr ados)) 2230without UNPROCESSED."
2187 node 2231 (let ((cur (car remaining))
2188 children) 2232 (unprocessed remaining)
2189 2233 ttl-mrk children)
2190 ;; If the next adornment matches our level. 2234 ;; If the current adornment matches expected level.
2191 (when (and nado (= (car nado) lev)) 2235 (when (and cur (= (car cur) lev))
2192 ;; Pop the next adornment and create the current node with it. 2236 ;; Consume the current entry and create the current node with it.
2193 (setcdr ados (cddr ados)) 2237 (setq unprocessed (cdr remaining))
2194 (setq node (cdr nado)) ) 2238 (setq ttl-mrk (cdr cur)))
2195 ;; Else we let the node title/marker be unset. 2239
2196 2240 ;; Build the child nodes as long as they have deeper level.
2197 ;; Build the child nodes. 2241 (while (and unprocessed (> (caar unprocessed) lev))
2198 (while (and (cdr ados) (> (caadr ados) lev)) 2242 (let ((rem-children (rst-section-tree-rec unprocessed (1+ lev))))
2199 (setq children 2243 (setq children (cons (cdr rem-children) children))
2200 (cons (rst-section-tree-rec ados (1+ lev)) 2244 (setq unprocessed (car rem-children))))
2201 children)))
2202 (setq children (reverse children)) 2245 (setq children (reverse children))
2203 2246
2204 ;; If node is still unset, we use the marker of the first child. 2247 (cons unprocessed
2205 (when (eq node nil) 2248 (cons (or ttl-mrk
2206 (setq node (cons nil (cdaar children)))) 2249 ;; Node on this level missing - use nil as text and the
2207 2250 ;; marker of the first child.
2208 ;; Return this node with its children. 2251 (cons nil (cdaar children)))
2209 (cons node children) 2252 children))))
2210 )) 2253
2211 2254(defun rst-section-tree-point (tree &optional point)
2212 2255 "Return section containing POINT by returning the closest node in TREE.
2213(defun rst-section-tree-point (node &optional point) 2256TREE is a section tree as returned by `rst-section-tree'
2214 "Find tree node at point. 2257consisting of (NODE CHILD...) entries. POINT defaults to the
2215Given a computed and valid section tree in NODE and a point 2258current point. A NODE must have the structure (IGNORED MARKER
2216POINT (default being the current point in the current buffer), 2259...).
2217find and return the node within the section tree where the cursor 2260
2218lives. 2261Return (PATH NODE CHILD...). NODE is the node where POINT is in
2219 2262if any. PATH is a list of nodes from the top of the tree down to
2220Return values: a pair of (parent path, container subtree). 2263and including NODE. List of CHILD are the children of NODE if
2221The parent path is simply a list of the nodes above the 2264any."
2222container subtree node that we're returning." 2265 (setq point (or point (point)))
2223 2266 (let ((cur (car tree))
2224 (let (path outtree) 2267 (children (cdr tree)))
2225 2268 ;; Point behind current node?
2226 (let* ((curpoint (or point (point)))) 2269 (if (and (cadr cur) (>= point (cadr cur)))
2227 2270 ;; Iterate all the children, looking for one that might contain the
2228 ;; Check if we are before the current node. 2271 ;; current section.
2229 (if (and (cadar node) (>= curpoint (cadar node))) 2272 (let (found)
2230 2273 (while (and children (>= point (cadaar children)))
2231 ;; Iterate all the children, looking for one that might contain the 2274 (setq found children
2232 ;; current section. 2275 children (cdr children)))
2233 (let ((curnode (cdr node)) 2276 (if found
2234 last) 2277 ;; Found section containing point in children.
2235 2278 (let ((sub (rst-section-tree-point (car found) point)))
2236 (while (and curnode (>= curpoint (cadaar curnode))) 2279 ;; Extend path with current node and return NODE CHILD... from
2237 (setq last curnode 2280 ;; sub.
2238 curnode (cdr curnode))) 2281 (cons (cons cur (car sub)) (cdr sub)))
2239 2282 ;; Point in this section: Start a new path with current node and
2240 (if last 2283 ;; return current NODE CHILD...
2241 (let ((sub (rst-section-tree-point (car last) curpoint))) 2284 (cons (list cur) tree)))
2242 (setq path (car sub) 2285 ;; Current node behind point: start a new path with current node and
2243 outtree (cdr sub))) 2286 ;; no NODE CHILD...
2244 (setq outtree node)) 2287 (list (list cur)))))
2245
2246 )))
2247 (cons (cons (car node) path) outtree)
2248 ))
2249
2250 2288
2251(defgroup rst-toc nil 2289(defgroup rst-toc nil
2252 "Settings for reStructuredText table of contents." 2290 "Settings for reStructuredText table of contents."
@@ -2257,6 +2295,7 @@ container subtree node that we're returning."
2257 "Indentation for table-of-contents display. 2295 "Indentation for table-of-contents display.
2258Also used for formatting insertion, when numbering is disabled." 2296Also used for formatting insertion, when numbering is disabled."
2259 :group 'rst-toc) 2297 :group 'rst-toc)
2298(rst-testcover-defcustom)
2260 2299
2261(defcustom rst-toc-insert-style 'fixed 2300(defcustom rst-toc-insert-style 'fixed
2262 "Insertion style for table-of-contents. 2301 "Insertion style for table-of-contents.
@@ -2267,10 +2306,12 @@ indentation style:
2267- aligned: numbering, titles aligned under each other 2306- aligned: numbering, titles aligned under each other
2268- listed: numbering, with dashes like list items (EXPERIMENTAL)" 2307- listed: numbering, with dashes like list items (EXPERIMENTAL)"
2269 :group 'rst-toc) 2308 :group 'rst-toc)
2309(rst-testcover-defcustom)
2270 2310
2271(defcustom rst-toc-insert-number-separator " " 2311(defcustom rst-toc-insert-number-separator " "
2272 "Separator that goes between the TOC number and the title." 2312 "Separator that goes between the TOC number and the title."
2273 :group 'rst-toc) 2313 :group 'rst-toc)
2314(rst-testcover-defcustom)
2274 2315
2275;; This is used to avoid having to change the user's mode. 2316;; This is used to avoid having to change the user's mode.
2276(defvar rst-toc-insert-click-keymap 2317(defvar rst-toc-insert-click-keymap
@@ -2282,7 +2323,7 @@ indentation style:
2282(defcustom rst-toc-insert-max-level nil 2323(defcustom rst-toc-insert-max-level nil
2283 "If non-nil, maximum depth of the inserted TOC." 2324 "If non-nil, maximum depth of the inserted TOC."
2284 :group 'rst-toc) 2325 :group 'rst-toc)
2285 2326(rst-testcover-defcustom)
2286 2327
2287(defun rst-toc-insert (&optional pfxarg) 2328(defun rst-toc-insert (&optional pfxarg)
2288 "Insert a simple text rendering of the table of contents. 2329 "Insert a simple text rendering of the table of contents.
@@ -2316,8 +2357,7 @@ The TOC is inserted indented at the current column."
2316 (delete-region init-point (+ init-point (length initial-indent))) 2357 (delete-region init-point (+ init-point (length initial-indent)))
2317 2358
2318 ;; Delete the last newline added. 2359 ;; Delete the last newline added.
2319 (delete-char -1) 2360 (delete-char -1))))
2320 )))
2321 2361
2322(defun rst-toc-insert-node (node level indent pfx) 2362(defun rst-toc-insert-node (node level indent pfx)
2323 "Insert tree node NODE in table-of-contents. 2363 "Insert tree node NODE in table-of-contents.
@@ -2343,9 +2383,7 @@ level to align."
2343 ;; is generated automatically. 2383 ;; is generated automatically.
2344 (put-text-property b (point) 'mouse-face 'highlight) 2384 (put-text-property b (point) 'mouse-face 'highlight)
2345 (put-text-property b (point) 'rst-toc-target (cadar node)) 2385 (put-text-property b (point) 'rst-toc-target (cadar node))
2346 (put-text-property b (point) 'keymap rst-toc-insert-click-keymap) 2386 (put-text-property b (point) 'keymap rst-toc-insert-click-keymap))
2347
2348 )
2349 (insert "\n") 2387 (insert "\n")
2350 2388
2351 ;; Prepare indent for children. 2389 ;; Prepare indent for children.
@@ -2362,9 +2400,7 @@ level to align."
2362 2400
2363 ((eq rst-toc-insert-style 'listed) 2401 ((eq rst-toc-insert-style 'listed)
2364 (concat (substring indent 0 -3) 2402 (concat (substring indent 0 -3)
2365 (concat (make-string (+ (length pfx) 2) ? ) " - "))) 2403 (concat (make-string (+ (length pfx) 2) ? ) " - "))))))
2366 ))
2367 )
2368 2404
2369 (if (or (eq rst-toc-insert-max-level nil) 2405 (if (or (eq rst-toc-insert-max-level nil)
2370 (< level rst-toc-insert-max-level)) 2406 (< level rst-toc-insert-max-level))
@@ -2382,8 +2418,7 @@ level to align."
2382 (if (cdr node) 2418 (if (cdr node)
2383 (setq fmt (format "%%-%dd" 2419 (setq fmt (format "%%-%dd"
2384 (1+ (floor (log10 (length 2420 (1+ (floor (log10 (length
2385 (cdr node)))))))) 2421 (cdr node))))))))))
2386 ))
2387 2422
2388 (dolist (child (cdr node)) 2423 (dolist (child (cdr node))
2389 (rst-toc-insert-node child 2424 (rst-toc-insert-node child
@@ -2391,9 +2426,7 @@ level to align."
2391 indent 2426 indent
2392 (if do-child-numbering 2427 (if do-child-numbering
2393 (concat pfx (format fmt count)) pfx)) 2428 (concat pfx (format fmt count)) pfx))
2394 (incf count))) 2429 (incf count))))))
2395
2396 )))
2397 2430
2398 2431
2399(defun rst-toc-update () 2432(defun rst-toc-update ()
@@ -2468,8 +2501,7 @@ file-write hook to always make it up-to-date automatically."
2468 ;; Add link on lines. 2501 ;; Add link on lines.
2469 (put-text-property b (point) 'rst-toc-target (cadar node)) 2502 (put-text-property b (point) 'rst-toc-target (cadar node))
2470 2503
2471 (insert "\n") 2504 (insert "\n")))
2472 ))
2473 2505
2474 (dolist (child (cdr node)) 2506 (dolist (child (cdr node))
2475 (rst-toc-node child (1+ level)))) 2507 (rst-toc-node child (1+ level))))
@@ -2517,8 +2549,7 @@ brings the cursor in that section."
2517 line 2549 line
2518 2550
2519 ;; Create a temporary buffer. 2551 ;; Create a temporary buffer.
2520 (buf (get-buffer-create rst-toc-buffer-name)) 2552 (buf (get-buffer-create rst-toc-buffer-name)))
2521 )
2522 2553
2523 (with-current-buffer buf 2554 (with-current-buffer buf
2524 (let ((inhibit-read-only t)) 2555 (let ((inhibit-read-only t))
@@ -2531,8 +2562,7 @@ brings the cursor in that section."
2531 2562
2532 ;; Count the lines to our found node. 2563 ;; Count the lines to our found node.
2533 (let ((linefound (rst-toc-count-lines sectree our-node))) 2564 (let ((linefound (rst-toc-count-lines sectree our-node)))
2534 (setq line (if (cdr linefound) (car linefound) 0))) 2565 (setq line (if (cdr linefound) (car linefound) 0)))))
2535 ))
2536 (display-buffer buf) 2566 (display-buffer buf)
2537 (pop-to-buffer buf) 2567 (pop-to-buffer buf)
2538 2568
@@ -2541,8 +2571,7 @@ brings the cursor in that section."
2541 2571
2542 ;; Move the cursor near the right section in the TOC. 2572 ;; Move the cursor near the right section in the TOC.
2543 (goto-char (point-min)) 2573 (goto-char (point-min))
2544 (forward-line (1- line)) 2574 (forward-line (1- line))))
2545 ))
2546 2575
2547 2576
2548(defun rst-toc-mode-find-section () 2577(defun rst-toc-mode-find-section ()
@@ -2644,8 +2673,7 @@ backwards in the file (default is to use 1)."
2644 (curline (line-number-at-pos)) 2673 (curline (line-number-at-pos))
2645 2674
2646 (cur allados) 2675 (cur allados)
2647 (idx 0) 2676 (idx 0))
2648 )
2649 2677
2650 ;; Find the index of the "next" adornment w.r.t. to the current line. 2678 ;; Find the index of the "next" adornment w.r.t. to the current line.
2651 (while (and cur (< (caar cur) curline)) 2679 (while (and cur (< (caar cur) curline))
@@ -2666,8 +2694,7 @@ backwards in the file (default is to use 1)."
2666 (progn 2694 (progn
2667 (goto-char (point-min)) 2695 (goto-char (point-min))
2668 (forward-line (1- (car cur)))) 2696 (forward-line (1- (car cur))))
2669 (if (> offset 0) (goto-char (point-max)) (goto-char (point-min)))) 2697 (if (> offset 0) (goto-char (point-max)) (goto-char (point-min))))))
2670 ))
2671 2698
2672(defun rst-backward-section () 2699(defun rst-backward-section ()
2673 "Like `rst-forward-section', except move back one title." 2700 "Like `rst-forward-section', except move back one title."
@@ -2686,7 +2713,7 @@ for negative COUNT."
2686 (error "Cannot mark zero sections")) 2713 (error "Cannot mark zero sections"))
2687 (cond ((and allow-extend 2714 (cond ((and allow-extend
2688 (or (and (eq last-command this-command) (mark t)) 2715 (or (and (eq last-command this-command) (mark t))
2689 (rst-portable-mark-active-p))) 2716 (use-region-p)))
2690 (set-mark 2717 (set-mark
2691 (save-excursion 2718 (save-excursion
2692 (goto-char (mark)) 2719 (goto-char (mark))
@@ -2742,17 +2769,14 @@ of each paragraph only."
2742 (valid (and (= curcol leftcol) 2769 (valid (and (= curcol leftcol)
2743 (not (looking-at (rst-re 'lin-end)))) 2770 (not (looking-at (rst-re 'lin-end))))
2744 (and (= curcol leftcol) 2771 (and (= curcol leftcol)
2745 (not (looking-at (rst-re 'lin-end))))) 2772 (not (looking-at (rst-re 'lin-end))))))
2746 )
2747 ((>= (point) endm)) 2773 ((>= (point) endm))
2748 2774
2749 (if (if ,first-only 2775 (if (if ,first-only
2750 (and valid (not previous)) 2776 (and valid (not previous))
2751 valid) 2777 valid)
2752 ,body-consequent 2778 ,body-consequent
2753 ,body-alternative) 2779 ,body-alternative)))))
2754
2755 ))))
2756 2780
2757;; FIXME: This needs to be refactored. Probably this is simply a function 2781;; FIXME: This needs to be refactored. Probably this is simply a function
2758;; applying BODY rather than a macro. 2782;; applying BODY rather than a macro.
@@ -2785,13 +2809,10 @@ first of a paragraph."
2785 (,isleftmost (and (not ,isempty) 2809 (,isleftmost (and (not ,isempty)
2786 (= (current-column) ,leftmost)) 2810 (= (current-column) ,leftmost))
2787 (and (not ,isempty) 2811 (and (not ,isempty)
2788 (= (current-column) ,leftmost))) 2812 (= (current-column) ,leftmost))))
2789 )
2790 ((>= (point) endm)) 2813 ((>= (point) endm))
2791 2814
2792 (progn ,@body) 2815 (progn ,@body))))))
2793
2794 )))))
2795 2816
2796;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2817;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2797;; Indentation 2818;; Indentation
@@ -2817,26 +2838,31 @@ here."
2817 "Indentation when there is no more indentation point given." 2838 "Indentation when there is no more indentation point given."
2818 :group 'rst-indent 2839 :group 'rst-indent
2819 :type '(integer)) 2840 :type '(integer))
2841(rst-testcover-defcustom)
2820 2842
2821(defcustom rst-indent-field 3 2843(defcustom rst-indent-field 3
2822 "Indentation for first line after a field or 0 to always indent for content." 2844 "Indentation for first line after a field or 0 to always indent for content."
2823 :group 'rst-indent 2845 :group 'rst-indent
2824 :type '(integer)) 2846 :type '(integer))
2847(rst-testcover-defcustom)
2825 2848
2826(defcustom rst-indent-literal-normal 3 2849(defcustom rst-indent-literal-normal 3
2827 "Default indentation for literal block after a markup on an own line." 2850 "Default indentation for literal block after a markup on an own line."
2828 :group 'rst-indent 2851 :group 'rst-indent
2829 :type '(integer)) 2852 :type '(integer))
2853(rst-testcover-defcustom)
2830 2854
2831(defcustom rst-indent-literal-minimized 2 2855(defcustom rst-indent-literal-minimized 2
2832 "Default indentation for literal block after a minimized markup." 2856 "Default indentation for literal block after a minimized markup."
2833 :group 'rst-indent 2857 :group 'rst-indent
2834 :type '(integer)) 2858 :type '(integer))
2859(rst-testcover-defcustom)
2835 2860
2836(defcustom rst-indent-comment 3 2861(defcustom rst-indent-comment 3
2837 "Default indentation for first line of a comment." 2862 "Default indentation for first line of a comment."
2838 :group 'rst-indent 2863 :group 'rst-indent
2839 :type '(integer)) 2864 :type '(integer))
2865(rst-testcover-defcustom)
2840 2866
2841;; FIXME: Must consider other tabs: 2867;; FIXME: Must consider other tabs:
2842;; * Line blocks 2868;; * Line blocks
@@ -3116,8 +3142,7 @@ do all lines instead of just paragraphs."
3116 (let ((ins-string (format "%d. " (incf count)))) 3142 (let ((ins-string (format "%d. " (incf count))))
3117 (setq last-insert-len (length ins-string)) 3143 (setq last-insert-len (length ins-string))
3118 (insert ins-string)) 3144 (insert ins-string))
3119 (insert (make-string last-insert-len ?\ )) 3145 (insert (make-string last-insert-len ?\ )))))
3120 )))
3121 3146
3122(defun rst-bullet-list-region (beg end all) 3147(defun rst-bullet-list-region (beg end all)
3123 "Add bullets to all the leftmost paragraphs in the given region. 3148 "Add bullets to all the leftmost paragraphs in the given region.
@@ -3127,8 +3152,7 @@ do all lines instead of just paragraphs."
3127 (rst-iterate-leftmost-paragraphs 3152 (rst-iterate-leftmost-paragraphs
3128 beg end (not all) 3153 beg end (not all)
3129 (insert (car rst-preferred-bullets) " ") 3154 (insert (car rst-preferred-bullets) " ")
3130 (insert " ") 3155 (insert " ")))
3131 ))
3132 3156
3133;; FIXME: Does not deal with a varying number of digits appropriately. 3157;; FIXME: Does not deal with a varying number of digits appropriately.
3134;; FIXME: Does not deal with multiple levels independently. 3158;; FIXME: Does not deal with multiple levels independently.
@@ -3143,18 +3167,13 @@ Renumber as necessary. Region is from BEG to END."
3143 (cons (copy-marker (car x)) 3167 (cons (copy-marker (car x))
3144 (cdr x))) 3168 (cdr x)))
3145 (rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1)))) 3169 (rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1))))
3146 (count 1) 3170 (count 1))
3147 )
3148 (save-excursion 3171 (save-excursion
3149 (dolist (x items) 3172 (dolist (x items)
3150 (goto-char (car x)) 3173 (goto-char (car x))
3151 (looking-at (rst-re 'itmany-beg-1)) 3174 (looking-at (rst-re 'itmany-beg-1))
3152 (replace-match (format "%d." count) nil nil nil 1) 3175 (replace-match (format "%d." count) nil nil nil 1)
3153 (incf count) 3176 (incf count)))))
3154 ))
3155 ))
3156
3157
3158 3177
3159;;------------------------------------------------------------------------------ 3178;;------------------------------------------------------------------------------
3160 3179
@@ -3202,6 +3221,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3202 :version "24.1" 3221 :version "24.1"
3203 :group 'rst-faces 3222 :group 'rst-faces
3204 :type '(face)) 3223 :type '(face))
3224(rst-testcover-defcustom)
3205(make-obsolete-variable 'rst-block-face 3225(make-obsolete-variable 'rst-block-face
3206 "customize the face `rst-block' instead." 3226 "customize the face `rst-block' instead."
3207 "24.1") 3227 "24.1")
@@ -3216,6 +3236,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3216 :version "24.1" 3236 :version "24.1"
3217 :group 'rst-faces 3237 :group 'rst-faces
3218 :type '(face)) 3238 :type '(face))
3239(rst-testcover-defcustom)
3219(make-obsolete-variable 'rst-external-face 3240(make-obsolete-variable 'rst-external-face
3220 "customize the face `rst-external' instead." 3241 "customize the face `rst-external' instead."
3221 "24.1") 3242 "24.1")
@@ -3230,6 +3251,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3230 :version "24.1" 3251 :version "24.1"
3231 :group 'rst-faces 3252 :group 'rst-faces
3232 :type '(face)) 3253 :type '(face))
3254(rst-testcover-defcustom)
3233(make-obsolete-variable 'rst-definition-face 3255(make-obsolete-variable 'rst-definition-face
3234 "customize the face `rst-definition' instead." 3256 "customize the face `rst-definition' instead."
3235 "24.1") 3257 "24.1")
@@ -3246,6 +3268,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3246 "Directives and roles." 3268 "Directives and roles."
3247 :group 'rst-faces 3269 :group 'rst-faces
3248 :type '(face)) 3270 :type '(face))
3271(rst-testcover-defcustom)
3249(make-obsolete-variable 'rst-directive-face 3272(make-obsolete-variable 'rst-directive-face
3250 "customize the face `rst-directive' instead." 3273 "customize the face `rst-directive' instead."
3251 "24.1") 3274 "24.1")
@@ -3260,6 +3283,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3260 :version "24.1" 3283 :version "24.1"
3261 :group 'rst-faces 3284 :group 'rst-faces
3262 :type '(face)) 3285 :type '(face))
3286(rst-testcover-defcustom)
3263(make-obsolete-variable 'rst-comment-face 3287(make-obsolete-variable 'rst-comment-face
3264 "customize the face `rst-comment' instead." 3288 "customize the face `rst-comment' instead."
3265 "24.1") 3289 "24.1")
@@ -3274,6 +3298,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3274 :version "24.1" 3298 :version "24.1"
3275 :group 'rst-faces 3299 :group 'rst-faces
3276 :type '(face)) 3300 :type '(face))
3301(rst-testcover-defcustom)
3277(make-obsolete-variable 'rst-emphasis1-face 3302(make-obsolete-variable 'rst-emphasis1-face
3278 "customize the face `rst-emphasis1' instead." 3303 "customize the face `rst-emphasis1' instead."
3279 "24.1") 3304 "24.1")
@@ -3287,6 +3312,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3287 "Double emphasis." 3312 "Double emphasis."
3288 :group 'rst-faces 3313 :group 'rst-faces
3289 :type '(face)) 3314 :type '(face))
3315(rst-testcover-defcustom)
3290(make-obsolete-variable 'rst-emphasis2-face 3316(make-obsolete-variable 'rst-emphasis2-face
3291 "customize the face `rst-emphasis2' instead." 3317 "customize the face `rst-emphasis2' instead."
3292 "24.1") 3318 "24.1")
@@ -3301,6 +3327,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3301 :version "24.1" 3327 :version "24.1"
3302 :group 'rst-faces 3328 :group 'rst-faces
3303 :type '(face)) 3329 :type '(face))
3330(rst-testcover-defcustom)
3304(make-obsolete-variable 'rst-literal-face 3331(make-obsolete-variable 'rst-literal-face
3305 "customize the face `rst-literal' instead." 3332 "customize the face `rst-literal' instead."
3306 "24.1") 3333 "24.1")
@@ -3315,6 +3342,7 @@ Region is from RBEG to REND. With PFXARG set the empty lines too."
3315 :version "24.1" 3342 :version "24.1"
3316 :group 'rst-faces 3343 :group 'rst-faces
3317 :type '(face)) 3344 :type '(face))
3345(rst-testcover-defcustom)
3318(make-obsolete-variable 'rst-reference-face 3346(make-obsolete-variable 'rst-reference-face
3319 "customize the face `rst-reference' instead." 3347 "customize the face `rst-reference' instead."
3320 "24.1") 3348 "24.1")
@@ -3368,6 +3396,7 @@ Recompute the faces. VAL is the value to set."
3368 :group 'rst-faces-defaults 3396 :group 'rst-faces-defaults
3369 :type '(integer) 3397 :type '(integer)
3370 :set 'rst-set-level-default) 3398 :set 'rst-set-level-default)
3399(rst-testcover-defcustom)
3371;; FIXME: It should be possible to give "#RRGGBB" type of color values. 3400;; FIXME: It should be possible to give "#RRGGBB" type of color values.
3372;; Together with a `rst-level-face-end-light' this could be used for 3401;; Together with a `rst-level-face-end-light' this could be used for
3373;; computing steps. 3402;; computing steps.
@@ -3378,6 +3407,7 @@ Recompute the faces. VAL is the value to set."
3378 :group 'rst-faces-defaults 3407 :group 'rst-faces-defaults
3379 :type '(string) 3408 :type '(string)
3380 :set 'rst-set-level-default) 3409 :set 'rst-set-level-default)
3410(rst-testcover-defcustom)
3381;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify 3411;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify
3382;; how they behave for dark and light background using the 3412;; how they behave for dark and light background using the
3383;; relevant options explained in `defface'. 3413;; relevant options explained in `defface'.
@@ -3391,12 +3421,14 @@ The default depends on whether the value of `frame-background-mode' is
3391 :group 'rst-faces-defaults 3421 :group 'rst-faces-defaults
3392 :type '(integer) 3422 :type '(integer)
3393 :set 'rst-set-level-default) 3423 :set 'rst-set-level-default)
3424(rst-testcover-defcustom)
3394(defcustom rst-level-face-format-light "%2d" 3425(defcustom rst-level-face-format-light "%2d"
3395 "The format for the lightness factor appended to the base name of the color. 3426 "The format for the lightness factor appended to the base name of the color.
3396This value is expanded by `format' with an integer." 3427This value is expanded by `format' with an integer."
3397 :group 'rst-faces-defaults 3428 :group 'rst-faces-defaults
3398 :type '(string) 3429 :type '(string)
3399 :set 'rst-set-level-default) 3430 :set 'rst-set-level-default)
3431(rst-testcover-defcustom)
3400;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify 3432;; FIXME LEVEL-FACE: This needs to be done differently: The faces must specify
3401;; how they behave for dark and light background using the 3433;; how they behave for dark and light background using the
3402;; relevant options explained in `defface'. 3434;; relevant options explained in `defface'.
@@ -3420,6 +3452,7 @@ This color is used as background for section title text on level
3420 :group 'rst-faces-defaults 3452 :group 'rst-faces-defaults
3421 :type '(integer) 3453 :type '(integer)
3422 :set 'rst-set-level-default) 3454 :set 'rst-set-level-default)
3455(rst-testcover-defcustom)
3423 3456
3424(defcustom rst-adornment-faces-alist 3457(defcustom rst-adornment-faces-alist
3425 ;; FIXME LEVEL-FACE: Must be redone if `rst-level-face-max' is changed 3458 ;; FIXME LEVEL-FACE: Must be redone if `rst-level-face-max' is changed
@@ -3447,6 +3480,7 @@ group."
3447 (const :tag "section title adornment" nil)) 3480 (const :tag "section title adornment" nil))
3448 :value-type (face)) 3481 :value-type (face))
3449 :set-after '(rst-level-face-max)) 3482 :set-after '(rst-level-face-max))
3483(rst-testcover-defcustom)
3450 3484
3451(defun rst-define-level-faces () 3485(defun rst-define-level-faces ()
3452 "Define the faces for the section title text faces from the values." 3486 "Define the faces for the section title text faces from the values."
@@ -3663,8 +3697,7 @@ variable of the `rst-faces-defaults' group is customized. Use
3663 ;; Indentation is not required for doctest blocks. 3697 ;; Indentation is not required for doctest blocks.
3664 (,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+")) 3698 (,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+"))
3665 (1 rst-block-face) 3699 (1 rst-block-face)
3666 (2 rst-literal-face)) 3700 (2 rst-literal-face)))
3667 )
3668 "Keywords to highlight in rst mode.") 3701 "Keywords to highlight in rst mode.")
3669 3702
3670(defvar font-lock-beg) 3703(defvar font-lock-beg)
@@ -3974,6 +4007,7 @@ string)) to be used for converting the document."
3974 (string :tag "Options")))) 4007 (string :tag "Options"))))
3975 :group 'rst 4008 :group 'rst
3976 :package-version "1.2.0") 4009 :package-version "1.2.0")
4010(rst-testcover-defcustom)
3977 4011
3978;; FIXME: Must be `defcustom`. 4012;; FIXME: Must be `defcustom`.
3979(defvar rst-compile-primary-toolset 'html 4013(defvar rst-compile-primary-toolset 'html
@@ -3999,11 +4033,8 @@ string)) to be used for converting the document."
3999 (setq prevdir dir) 4033 (setq prevdir dir)
4000 (setq dir (expand-file-name (file-name-directory 4034 (setq dir (expand-file-name (file-name-directory
4001 (directory-file-name 4035 (directory-file-name
4002 (file-name-directory dir))))) 4036 (file-name-directory dir))))))
4003 ) 4037 (or (and dir (concat dir file-name)) nil))))
4004 (or (and dir (concat dir file-name)) nil)
4005 )))
4006
4007 4038
4008(require 'compile) 4039(require 'compile)
4009 4040
@@ -4041,8 +4072,7 @@ select the alternative tool-set."
4041 ;; Invoke the compile command. 4072 ;; Invoke the compile command.
4042 (if (or compilation-read-command use-alt) 4073 (if (or compilation-read-command use-alt)
4043 (call-interactively 'compile) 4074 (call-interactively 'compile)
4044 (compile compile-command)) 4075 (compile compile-command))))
4045 ))
4046 4076
4047(defun rst-compile-alt-toolset () 4077(defun rst-compile-alt-toolset ()
4048 "Compile command with the alternative tool-set." 4078 "Compile command with the alternative tool-set."
@@ -4097,6 +4127,79 @@ buffer, if the region is not selected."
4097 )) 4127 ))
4098 4128
4099 4129
4130;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4131;; Imenu support.
4132
4133;; FIXME: Integrate this properly. Consider a key binding.
4134
4135;; Based on code from Masatake YAMATO <yamato@redhat.com>.
4136
4137(defun rst-imenu-find-adornments-for-position (adornments pos)
4138 "Find adornments cell in ADORNMENTS for position POS."
4139 (let ((a nil))
4140 (while adornments
4141 (if (and (car adornments)
4142 (eq (car (car adornments)) pos))
4143 (setq a adornments
4144 adornments nil)
4145 (setq adornments (cdr adornments))))
4146 a))
4147
4148(defun rst-imenu-convert-cell (elt adornments)
4149 "Convert a cell ELT in a tree returned from `rst-section-tree' to imenu index.
4150ADORNMENTS is used as hint information for conversion."
4151 (let* ((kar (car elt))
4152 (kdr (cdr elt))
4153 (title (car kar)))
4154 (if kar
4155 (let* ((p (marker-position (cadr kar)))
4156 (adornments
4157 (rst-imenu-find-adornments-for-position adornments p))
4158 (a (car adornments))
4159 (adornments (cdr adornments))
4160 ;; FIXME: Overline adornment characters need to be in front so
4161 ;; they become visible even for long title lines. May be
4162 ;; an additional level number is also useful.
4163 (title (format "%s%s%s"
4164 (make-string (1+ (nth 3 a)) (nth 1 a))
4165 title
4166 (if (eq (nth 2 a) 'simple)
4167 ""
4168 (char-to-string (nth 1 a))))))
4169 (cons title
4170 (if (null kdr)
4171 p
4172 (cons
4173 ;; A bit ugly but this make which-func happy.
4174 (cons title p)
4175 (mapcar (lambda (elt0)
4176 (rst-imenu-convert-cell elt0 adornments))
4177 kdr)))))
4178 nil)))
4179
4180;; FIXME: Document title and subtitle need to be handled properly. They should
4181;; get an own "Document" top level entry.
4182(defun rst-imenu-create-index ()
4183 "Create index for imenu.
4184Return as described for `imenu--index-alist'."
4185 (rst-reset-section-caches)
4186 (let ((tree (rst-section-tree))
4187 ;; Translate line notation to point notation.
4188 (adornments (save-excursion
4189 (mapcar (lambda (ln-ado)
4190 (cons (progn
4191 (goto-char (point-min))
4192 (forward-line (1- (car ln-ado)))
4193 ;; FIXME: Need to consider
4194 ;; `imenu-use-markers' here?
4195 (point))
4196 (cdr ln-ado)))
4197 (rst-find-all-adornments)))))
4198 (delete nil (mapcar (lambda (elt)
4199 (rst-imenu-convert-cell elt adornments))
4200 tree))))
4201
4202
4100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4203;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4101;; Generic text functions that are more convenient than the defaults. 4204;; Generic text functions that are more convenient than the defaults.
4102 4205
@@ -4166,8 +4269,7 @@ column is used (fill-column vs. end of previous/next line)."
4166 (cond ((equal last-command 'rst-repeat-last-character) 4269 (cond ((equal last-command 'rst-repeat-last-character)
4167 (if (= curcol fill-column) prevcol fill-column)) 4270 (if (= curcol fill-column) prevcol fill-column))
4168 (t (save-excursion 4271 (t (save-excursion
4169 (if (zerop prevcol) fill-column prevcol))) 4272 (if (zerop prevcol) fill-column prevcol))))))
4170 )) )
4171 (end-of-line) 4273 (end-of-line)
4172 (if (> (current-column) rightmost-column) 4274 (if (> (current-column) rightmost-column)
4173 ;; Shave characters off the end. 4275 ;; Shave characters off the end.
@@ -4176,17 +4278,7 @@ column is used (fill-column vs. end of previous/next line)."
4176 (point)) 4278 (point))
4177 ;; Fill with last characters. 4279 ;; Fill with last characters.
4178 (insert-char (preceding-char) 4280 (insert-char (preceding-char)
4179 (- rightmost-column (current-column)))) 4281 (- rightmost-column (current-column))))))
4180 ))
4181
4182
4183(defun rst-portable-mark-active-p ()
4184 "Return non-nil if the mark is active.
4185This is a portable function."
4186 (cond
4187 ((fboundp 'region-active-p) (region-active-p))
4188 ((boundp 'transient-mark-mode) (and transient-mark-mode mark-active))
4189 (t mark-active)))
4190 4282
4191 4283
4192 4284
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 5bcd87ede68..67d7f8c01f9 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -451,7 +451,7 @@ the next N words. In Transient Mark mode, when the mark is active,
451N defaults to -1, which means to wrap it around the current region. 451N defaults to -1, which means to wrap it around the current region.
452 452
453If you like upcased tags, put (setq sgml-transformation-function 'upcase) 453If you like upcased tags, put (setq sgml-transformation-function 'upcase)
454in your `.emacs' file. 454in your init file.
455 455
456Use \\[sgml-validate] to validate your document with an SGML parser. 456Use \\[sgml-validate] to validate your document with an SGML parser.
457 457
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 2664a89855f..459e884d45d 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -126,7 +126,7 @@
126;; again. 126;; again.
127;; 127;;
128;; To use the package regularly place this file in the site library 128;; To use the package regularly place this file in the site library
129;; directory and add the next expression in your .emacs file. Make 129;; directory and add the next expression in your init file. Make
130;; sure that directory is included in the `load-path'. 130;; sure that directory is included in the `load-path'.
131;; 131;;
132;; (require 'table) 132;; (require 'table)
@@ -342,10 +342,10 @@
342;; (function (lambda () 342;; (function (lambda ()
343;; (local-set-key [<key sequence>] '<function>)))) 343;; (local-set-key [<key sequence>] '<function>))))
344;; 344;;
345;; Above code is well known ~/.emacs idiom for customizing a mode 345;; Adding the above to your init file is a common way to customize a
346;; specific keymap however it does not work for this package. This is 346;; mode specific keymap. However it does not work for this package.
347;; because there is no table mode in effect. This package does not 347;; This is because there is no table mode in effect. This package
348;; use a local map therefore you must modify `table-cell-map' 348;; does not use a local map therefore you must modify `table-cell-map'
349;; explicitly. The correct way of achieving above task is: 349;; explicitly. The correct way of achieving above task is:
350;; 350;;
351;; (add-hook 'table-cell-map-hook 351;; (add-hook 'table-cell-map-hook
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 8a4fe4f87fd..b21e72639fd 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -276,8 +276,9 @@ You have the following commands at your disposal:
276\\[2C-merge] Merge both buffers 276\\[2C-merge] Merge both buffers
277\\[2C-dissociate] Dissociate the two buffers 277\\[2C-dissociate] Dissociate the two buffers
278 278
279These keybindings can be customized in your ~/.emacs by `2C-mode-map', 279These keybindings can be customized in your init file by
280`2C-minor-mode-map' and by binding `2C-command' to some prefix. 280`2C-mode-map', `2C-minor-mode-map' and by binding `2C-command' to
281some prefix.
281 282
282The appearance of the screen can be customized by the variables 283The appearance of the screen can be customized by the variables
283`2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and 284`2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 13963121e2b..c2ac1035dfe 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -29,7 +29,7 @@
29;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; 29;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>";
30;; See the top of `time-stamp.el' for another example. 30;; See the top of `time-stamp.el' for another example.
31 31
32;; To use time-stamping, add this line to your .emacs file: 32;; To use time-stamping, add this line to your init file:
33;; (add-hook 'before-save-hook 'time-stamp) 33;; (add-hook 'before-save-hook 'time-stamp)
34;; Now any time-stamp templates in your files will be updated automatically. 34;; Now any time-stamp templates in your files will be updated automatically.
35 35
@@ -254,7 +254,7 @@ time-stamped file itself.")
254(defun time-stamp () 254(defun time-stamp ()
255 "Update the time stamp string(s) in the buffer. 255 "Update the time stamp string(s) in the buffer.
256A template in a file can be automatically updated with a new time stamp 256A template in a file can be automatically updated with a new time stamp
257every time you save the file. Add this line to your .emacs file: 257every time you save the file. Add this line to your init file:
258 (add-hook 'before-save-hook 'time-stamp) 258 (add-hook 'before-save-hook 'time-stamp)
259or customize `before-save-hook' through Custom. 259or customize `before-save-hook' through Custom.
260Normally the template must appear in the first 8 lines of a file and 260Normally the template must appear in the first 8 lines of a file and
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el
index bd7d8e33922..26fe72014f7 100644
--- a/lisp/url/url-methods.el
+++ b/lisp/url/url-methods.el
@@ -79,7 +79,7 @@
79 79
80 ;; Store any proxying information - this will not overwrite an old 80 ;; Store any proxying information - this will not overwrite an old
81 ;; entry, so that people can still set this information in their 81 ;; entry, so that people can still set this information in their
82 ;; .emacs file 82 ;; init file
83 (cond 83 (cond
84 (cur-proxy nil) ; Keep their old settings 84 (cur-proxy nil) ; Keep their old settings
85 ((null env-proxy) nil) ; No proxy setup 85 ((null env-proxy) nil) ; No proxy setup
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index b70b6cd919c..b1c334ddcfc 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -197,7 +197,8 @@ With prefix arg, prompt for diff switches."
197 ori file)) 197 ori file))
198 (diff bak ori switches))) 198 (diff bak ori switches)))
199 199
200(defun diff-latest-backup-file (fn) ; actually belongs into files.el 200;;;###autoload
201(defun diff-latest-backup-file (fn)
201 "Return the latest existing backup of FILE, or nil." 202 "Return the latest existing backup of FILE, or nil."
202 (let ((handler (find-file-name-handler fn 'diff-latest-backup-file))) 203 (let ((handler (find-file-name-handler fn 'diff-latest-backup-file)))
203 (if handler 204 (if handler
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el
index 0f71b7b82e7..fc65d62c67d 100644
--- a/lisp/vc/pcvs-defs.el
+++ b/lisp/vc/pcvs-defs.el
@@ -57,11 +57,7 @@ versions, such as the one in SunOS-4.")
57;;;; END OF THINGS TO CHECK WHEN INSTALLING 57;;;; END OF THINGS TO CHECK WHEN INSTALLING
58;;;; -------------------------------------------------------- 58;;;; --------------------------------------------------------
59 59
60;;;;
61;;;; User configuration variables: 60;;;; User configuration variables:
62;;;;
63;;;; NOTE: these should be set in your ~/.emacs (or site-lisp/default.el) file.
64;;;;
65 61
66(defgroup pcl-cvs nil 62(defgroup pcl-cvs nil
67 "Special support for the CVS versioning system." 63 "Special support for the CVS versioning system."
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index b48ea1afd95..ea9ce949ccb 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -31,7 +31,7 @@
31 31
32;; To install: put this file on the load-path and add Git to the list 32;; To install: put this file on the load-path and add Git to the list
33;; of supported backends in `vc-handled-backends'; the following line, 33;; of supported backends in `vc-handled-backends'; the following line,
34;; placed in your ~/.emacs, will accomplish this: 34;; placed in your init file, will accomplish this:
35;; 35;;
36;; (add-to-list 'vc-handled-backends 'Git) 36;; (add-to-list 'vc-handled-backends 'Git)
37 37
diff --git a/lisp/windmove.el b/lisp/windmove.el
index 3a1afec38ee..1181e409dff 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -94,7 +94,7 @@
94 94
95;; Installation: 95;; Installation:
96;; 96;;
97;; Put the following line in your `.emacs' file: 97;; Put the following line in your init file:
98;; 98;;
99;; (windmove-default-keybindings) ; shifted arrow keys 99;; (windmove-default-keybindings) ; shifted arrow keys
100;; 100;;