aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2005-06-09 07:13:03 +0000
committerMiles Bader2005-06-09 07:13:03 +0000
commitd113efea8e0a56aedd60615f5dc6669c72aca77f (patch)
treec51aa1cd5076acfc2391217b0d7dea96552011de /lisp
parent2435213ba6b74f7425e15b1f799c9ae18467e43d (diff)
parent47600d8e97925ed8816b099267e24f4ab3311e75 (diff)
downloademacs-d113efea8e0a56aedd60615f5dc6669c72aca77f.tar.gz
emacs-d113efea8e0a56aedd60615f5dc6669c72aca77f.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-61
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 353-357) - Update from CVS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog217
-rw-r--r--lisp/diff-mode.el5
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/debug.el42
-rw-r--r--lisp/emacs-lisp/easy-mmode.el15
-rw-r--r--lisp/emacs-lisp/lisp-mode.el3
-rw-r--r--lisp/emulation/cua-base.el6
-rw-r--r--lisp/emulation/cua-gmrk.el9
-rw-r--r--lisp/emulation/cua-rect.el2
-rw-r--r--lisp/faces.el31
-rw-r--r--lisp/files.el17
-rw-r--r--lisp/font-lock.el27
-rw-r--r--lisp/ido.el24
-rw-r--r--lisp/info.el52
-rw-r--r--lisp/international/iso-cvt.el1
-rw-r--r--lisp/international/latexenc.el11
-rw-r--r--lisp/isearchb.el2
-rw-r--r--lisp/iswitchb.el16
-rw-r--r--lisp/mail/supercite.el1
-rw-r--r--lisp/printing.el3
-rw-r--r--lisp/progmodes/compile.el5
-rw-r--r--lisp/progmodes/make-mode.el22
-rw-r--r--lisp/ps-print.el6
-rw-r--r--lisp/replace.el19
-rw-r--r--lisp/rfn-eshadow.el5
-rw-r--r--lisp/simple.el17
-rw-r--r--lisp/subr.el2
-rw-r--r--lisp/textmodes/flyspell.el229
-rw-r--r--lisp/textmodes/ispell.el25
-rw-r--r--lisp/textmodes/org.el10
-rw-r--r--lisp/textmodes/tex-mode.el17
-rw-r--r--lisp/thumbs.el94
-rw-r--r--lisp/tmm.el7
33 files changed, 596 insertions, 348 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 72e02620a50..1e4298f970e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,203 @@
12005-06-09 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/debug.el (debugger-will-be-back): New var.
4 (debug): Use it.
5 (debugger-step-through, debugger-continue, debugger-jump)
6 (debugger-return-value): Set it when needed.
7 (debugger-make-xrefs, debugger-frame, debugger-frame-clear):
8 Use inhibit-read-only.
9
102005-06-09 Juanma Barranquero <lekktu@gmail.com>
11
12 * thumbs.el: Don't set `auto-image-file-mode'. Do not create the
13 thumbnails directory on loading.
14 (thumbs-conversion-program): Use `eq' to check the system type,
15 not `equal'.
16 (thumbs-temp-dir): Initialize to `temporary-file-directory',
17 not "/tmp". Fix docstring.
18 (thumbs-thumbsdir): New function to return the thumbnails
19 directory, creating it if needed.
20 (thumbs-cleanup-thumbsdir, thumbs-thumbname): Use it.
21 (thumbs-temp-file): Delete variable and make it into a function.
22 (thumbs-resize-image, thumbs-modify-image): Use it.
23 (thumbs-kill-buffer): Simplify.
24 (thumbs-gensym): Defalias or duplicate CL `gensym'.
25 (thumbs-resize-image, thumbs-resize-interactive): Fix typos in
26 docstrings.
27
282005-06-09 Kim F. Storm <storm@cua.dk>
29
30 * subr.el (save-match-data): Add RESEAT arg `evaporate' to
31 set-match-data to free markers in match-data.
32
33 * replace.el (replace-match-data): Pass RESEAT arg `t' to
34 match-data to unchain markers in match-data.
35
362005-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
37
38 * emacs-lisp/debug.el (debug): Don't iconify if we know we'll re-enter
39 the debugger immediately anyway. Undo the 2005-06-06 change, rendered
40 unnecessary now.
41
422005-06-08 Richard M. Stallman <rms@gnu.org>
43
44 * emacs-lisp/easy-mmode.el (define-minor-mode): If BODY is empty,
45 give the variable a doc string that doesn't say don't set it directly.
46
47 * textmodes/ispell.el (ispell-check-version):
48 Use match-string-no-properties.
49 (ispell-region, ispell-buffer-local-parsing, ispell-buffer-local-dict)
50 (ispell-buffer-local-words): Likewise.
51
52 * progmodes/make-mode.el (makefile-shell-face): Make this a no-op
53 except on terminals with enough colors to really display it.
54 (makefile-dependency-regex): Delete spurious `bb'.
55
56 * faces.el (escape-glyph): Use blue once again in last case.
57 (no-break-space): Redefine so that it isn't invisible on a tty.
58
592005-06-08 Kim F. Storm <storm@cua.dk>
60
61 * ido.el (ido-read-file-name): Fallback to read-file-name on C-f
62 also when reading directory name.
63
642005-06-08 Lute Kamstra <lute@gnu.org>
65
66 * textmodes/flyspell.el (flyspell-mode): Use define-minor-mode.
67 (flyspell-mode-line-string): Remove autoload cookie.
68 (flyspell-mode): Remove defvar.
69
702005-06-07 Lute Kamstra <lute@gnu.org>
71
72 * textmodes/org.el (org-run-mode-hooks): New function.
73 (org-agenda-mode): Use it.
74
752005-06-07 David McCabe <davemccabe@gmail.com> (tiny change)
76
77 * emacs-lisp/lisp-mode.el (defstruct): Set `doc-string-elt' property.
78
792005-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
80
81 * international/iso-cvt.el (iso-sgml2iso-trans-tab): Add NBSP.
82
832005-06-06 Luc Teirlinck <teirllm@auburn.edu>
84
85 * font-lock.el (font-lock-add-keywords): Doc fix.
86
872005-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
88
89 * textmodes/tex-mode.el (tex-guess-mode): Add RequirePackage.
90 (tex-compile-default): In the absence of any history, use the order in
91 tex-compile-alist to choose the preferred command.
92 (tex-compile-commands): Reorder a bit.
93
94 * textmodes/flyspell.el (flyspell-auto-correct-binding)
95 (flyspell-incorrect-face, flyspell-duplicate-face):
96 Use (X)Emacs-agnostic code.
97 (flyspell-mode-map): Don't overwrite at each load. Remove code
98 redundant with the subsequent add-minor-mode. Merge Emacs and
99 XEmacs code.
100 (flyspell-word): Minor simplification.
101 (flyspell-math-tex-command-p): Quieten the byte-compiler.
102 (flyspell-external-point-words): Remove unused vars `size' and `start'.
103 (flyspell-do-correct): Rename from flyspell-xemacs-correct.
104 Merge the corresponding Emacs code.
105 (flyspell-correct-word, flyspell-xemacs-popup): Use flyspell-do-correct.
106
107 * emacs-lisp/debug.el (debug): Don't bury the buffer unless it's in
108 a dedicated window.
109
110 * international/latexenc.el (latexenc-find-file-coding-system):
111 Undo part of last patch, to turn off a compiler warning.
112
1132005-06-06 Juri Linkov <juri@jurta.org>
114
115 * tmm.el (tmm-inactive, tmm-remove-inactive-mouse-face):
116 Rename `tmm-inactive-face' to `tmm-inactive'.
117
1182005-06-06 Matt Hodges <MPHodges@member.fsf.org>
119
120 * iswitchb.el: Rename faces.
121
1222005-06-06 Kim F. Storm <storm@cua.dk>
123
124 * emulation/cua-base.el (cua-rectangle, cua-rectangle-noselect)
125 (cua-global-mark): Remove -face suffix from face names.
126
127 * emulation/cua-gmrk.el (cua--init-global-mark):
128 Remove cua-global-mark face setup.
129
1302005-06-06 Richard M. Stallman <rms@gnu.org>
131
132 * progmodes/make-mode.el (makefile-dependency-regex): Handle whitespace
133 just like other allowed characters.
134 (makefile-match-dependency): Exclude leading and training whitespace
135 from the range of regexp subexp 1.
136 (makefile-macroassign-regex): Don't try to match the body,
137 just the name of the macro being defined.
138
139 * info.el (Info-read-node-name-2): New function.
140 (Info-read-node-name-1): Use that.
141 Add a completion-base-size-function property.
142
143 * simple.el (completion-setup-function): Look for
144 completion-base-size-function property of
145 minibuffer-completion-table.
146
147 * files.el (locate-file-completion): Doc fix.
148
149 * printing.el: Don't call pr-update-menus; user must do that.
150
151 * emacs-lisp/debug.el (debugger-window): New variable.
152 (debug): Use debugger-window if it is set and still alive.
153 Record debugger-window for next entry.
154
155 * mail/supercite.el (sc-mail-glom-frame): Mark as risky.
156
1572005-06-06 Matthias F,Av(Brste <slashdevslashnull@gmx.net>
158
159 * files.el (hack-local-variables-confirm): New arg FLAG-TO-CHECK.
160 (hack-one-local-variable, hack-local-variables)
161 (hack-local-variables-prop-line): Pass that arg.
162
1632005-06-06 Kim F. Storm <storm@cua.dk>
164
165 * ido.el (ido-first-match, ido-only-match, ido-subdir)
166 (ido-indicator): Remove -face suffix from face names.
167
1682005-06-06 Juri Linkov <juri@jurta.org>
169
170 * font-lock.el (font-lock-regexp-backslash)
171 (font-lock-regexp-backslash-construct): New faces.
172 (lisp-font-lock-keywords-2): Use new faces. Match `?:' only
173 after `('. Add `while-no-input' to control structures.
174
175 * faces.el (no-break-space, shadow): New faces.
176 (escape-glyph): Use less loud colors pink2 and red4.
177
178 * diff-mode.el (diff-context-face)
179 * dired.el (dired-ignored)
180 * rfn-eshadow.el (file-name-shadow)
181 * tmm.el (tmm-inactive-face): Inherit from `shadow' face.
182
183 * info.el (Info-title-1-face): Use green instead of yellow because
184 bold yellow is not readable on light backgrounds.
185
186 * progmodes/compile.el (compilation-start): Move `erase-buffer' up
187 before selecting the desired mode to not spend time fontifying
188 old contents.
189
1902005-06-06 Juanma Barranquero <lekktu@gmail.com>
191
192 * thumbs.el (thumbs-thumbsdir-max-size, thumbs-image-resizing-step)
193 (thumbs-thumbsdir-auto-clean): Fix typos in docstrings.
194
195 * ps-print.el (ps-default-fg, ps-default-bg):
196 Fix typos in docstrings.
197
198 * isearchb.el (isearchb): Don't pass a spurious second argument to
199 `iswitchb-completions'.
200
12005-06-05 Nick Roberts <nickrob@snap.net.nz> 2012005-06-05 Nick Roberts <nickrob@snap.net.nz>
2 202
3 * progmodes/gdb-ui.el (gdb-info-locals-handler): Use window point 203 * progmodes/gdb-ui.el (gdb-info-locals-handler): Use window point
@@ -5,16 +205,16 @@
5 (gdb-find-file-hook): Add doc string. 205 (gdb-find-file-hook): Add doc string.
6 206
7 * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate 207 * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate
8 C dereferenced pointer expression. 208 C dereferenced pointer expression.
9 (gud-tool-bar-map): Put it on the tool bar. Re-order icons. 209 (gud-tool-bar-map): Put it on the tool bar. Re-order icons.
10 210
11 * toolbar/gud-pstar.xpm, toolbar/gud-pstar.pbm: New files. 211 * toolbar/gud-pstar.xpm, toolbar/gud-pstar.pbm: New files.
12 212
13 * toolbar/gud-break.xpm, toolbar/gud-cont.xpm, toolbar/gud-down.xpm, 213 * toolbar/gud-break.xpm, toolbar/gud-cont.xpm, toolbar/gud-down.xpm
14 toolbar/gud-finish.xpm, toolbar/gud-ni.xpm, toolbar/gud-n.xpm, 214 * toolbar/gud-finish.xpm, toolbar/gud-ni.xpm, toolbar/gud-n.xpm
15 toolbar/gud-print.xpm, toolbar/gud-remove.xpm, toolbar/gud-run.xpm, 215 * toolbar/gud-print.xpm, toolbar/gud-remove.xpm, toolbar/gud-run.xpm
16 toolbar/gud-si.xpm, toolbar/gud-s.xpm, toolbar/gud-until.xpm, 216 * toolbar/gud-si.xpm, toolbar/gud-s.xpm, toolbar/gud-until.xpm
17 toolbar/gud-up.xpm, toolbar/gud-watch.xpm: 217 * toolbar/gud-up.xpm, toolbar/gud-watch.xpm:
18 Make background transparent. 218 Make background transparent.
19 219
202005-06-04 Luc Teirlinck <teirllm@auburn.edu> 2202005-06-04 Luc Teirlinck <teirllm@auburn.edu>
@@ -44,7 +244,7 @@
44 (iswitchb-current-match-face, iswitchb-virtual-matches-face) 244 (iswitchb-current-match-face, iswitchb-virtual-matches-face)
45 (iswitchb-invalid-regexp-face): New faces. 245 (iswitchb-invalid-regexp-face): New faces.
46 (iswitchb-completions): Use them. 246 (iswitchb-completions): Use them.
47 (iswitchb-use-faces): Renamed from iswitchb-use-fonts, which is 247 (iswitchb-use-faces): Rename from iswitchb-use-fonts, which is
48 now marked as an obsolete alias. 248 now marked as an obsolete alias.
49 (iswitchb-read-buffer): Remove check for bound font variables. 249 (iswitchb-read-buffer): Remove check for bound font variables.
50 (iswitchb-invalid-regexp): New free variable. 250 (iswitchb-invalid-regexp): New free variable.
@@ -151,8 +351,7 @@
151 (gdb-info-breakpoints-custom, gdb-delete-breakpoint) 351 (gdb-info-breakpoints-custom, gdb-delete-breakpoint)
152 (gdb-goto-breakpoint, gdb-source-info, gdb-get-location) 352 (gdb-goto-breakpoint, gdb-source-info, gdb-get-location)
153 (gdb-assembler-custom): Improve regexps. 353 (gdb-assembler-custom): Improve regexps.
154 (def-gdb-auto-update-handler): Use window point to preserve 354 (def-gdb-auto-update-handler): Use window point to preserve point.
155 point.
156 355
1572005-05-31 Stefan Monnier <monnier@iro.umontreal.ca> 3562005-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
158 357
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index aabd09e98ee..5deb7880bdf 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -243,10 +243,7 @@ when editing big diffs)."
243(defvar diff-function-face 'diff-function-face) 243(defvar diff-function-face 'diff-function-face)
244 244
245(defface diff-context-face 245(defface diff-context-face
246 '((((class color) (background light)) 246 '((t :inherit shadow))
247 :foreground "grey50")
248 (((class color) (background dark))
249 :foreground "grey70"))
250 "`diff-mode' face used to highlight context and other side-information." 247 "`diff-mode' face used to highlight context and other side-information."
251 :group 'diff-mode) 248 :group 'diff-mode)
252(defvar diff-context-face 'diff-context-face) 249(defvar diff-context-face 'diff-context-face)
diff --git a/lisp/dired.el b/lisp/dired.el
index b0d86297e71..61aca72db5b 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -356,7 +356,7 @@ Subexpression 2 must end right before the \\n or \\r.")
356 "Face name used for symbolic links.") 356 "Face name used for symbolic links.")
357 357
358(defface dired-ignored 358(defface dired-ignored
359 '((t (:inherit font-lock-string-face))) 359 '((t (:inherit shadow)))
360 "Face used for files suffixed with `completion-ignored-extensions'." 360 "Face used for files suffixed with `completion-ignored-extensions'."
361 :group 'dired-faces 361 :group 'dired-faces
362 :version "22.1") 362 :version "22.1")
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 2149cba8720..f1ff37551d7 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -88,6 +88,8 @@ This is to optimize `debugger-make-xrefs'.")
88(defvar debugger-outer-standard-output) 88(defvar debugger-outer-standard-output)
89(defvar debugger-outer-inhibit-redisplay) 89(defvar debugger-outer-inhibit-redisplay)
90(defvar debugger-outer-cursor-in-echo-area) 90(defvar debugger-outer-cursor-in-echo-area)
91(defvar debugger-will-be-back nil
92 "Non-nil if we expect to get back in the debugger soon.")
91 93
92(defvar inhibit-debug-on-entry nil 94(defvar inhibit-debug-on-entry nil
93 "Non-nil means that debug-on-entry is disabled.") 95 "Non-nil means that debug-on-entry is disabled.")
@@ -97,6 +99,8 @@ This is to optimize `debugger-make-xrefs'.")
97This variable is used by `debugger-jump', `debugger-step-through', 99This variable is used by `debugger-jump', `debugger-step-through',
98and `debugger-reenable' to temporarily disable debug-on-entry.") 100and `debugger-reenable' to temporarily disable debug-on-entry.")
99 101
102(defvar inhibit-trace) ;Not yet implemented.
103
100;;;###autoload 104;;;###autoload
101(setq debugger 'debug) 105(setq debugger 'debug)
102;;;###autoload 106;;;###autoload
@@ -121,6 +125,7 @@ first will be printed into the backtrace buffer."
121 (get-buffer-create "*Backtrace*"))) 125 (get-buffer-create "*Backtrace*")))
122 (debugger-old-buffer (current-buffer)) 126 (debugger-old-buffer (current-buffer))
123 (debugger-step-after-exit nil) 127 (debugger-step-after-exit nil)
128 (debugger-will-be-back nil)
124 ;; Don't keep reading from an executing kbd macro! 129 ;; Don't keep reading from an executing kbd macro!
125 (executing-kbd-macro nil) 130 (executing-kbd-macro nil)
126 ;; Save the outer values of these vars for the `e' command 131 ;; Save the outer values of these vars for the `e' command
@@ -178,7 +183,7 @@ first will be printed into the backtrace buffer."
178 ;; Place an extra debug-on-exit for macro's. 183 ;; Place an extra debug-on-exit for macro's.
179 (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) 184 (when (eq 'lambda (car-safe (cadr (backtrace-frame 4))))
180 (backtrace-debug 5 t))) 185 (backtrace-debug 5 t)))
181 (pop-to-buffer debugger-buffer) 186 (pop-to-buffer debugger-buffer)
182 (debugger-mode) 187 (debugger-mode)
183 (debugger-setup-buffer debugger-args) 188 (debugger-setup-buffer debugger-args)
184 (when noninteractive 189 (when noninteractive
@@ -210,12 +215,23 @@ first will be printed into the backtrace buffer."
210 ;; Still visible despite the save-window-excursion? Maybe it 215 ;; Still visible despite the save-window-excursion? Maybe it
211 ;; it's in a pop-up frame. It would be annoying to delete and 216 ;; it's in a pop-up frame. It would be annoying to delete and
212 ;; recreate it every time the debugger stops, so instead we'll 217 ;; recreate it every time the debugger stops, so instead we'll
213 ;; erase it and hide it but keep it alive. 218 ;; erase it (and maybe hide it) but keep it alive.
214 (with-current-buffer debugger-buffer 219 (with-current-buffer debugger-buffer
215 (erase-buffer) 220 (erase-buffer)
216 (fundamental-mode) 221 (fundamental-mode)
217 (with-selected-window (get-buffer-window debugger-buffer 0) 222 (with-selected-window (get-buffer-window debugger-buffer 0)
218 (bury-buffer))) 223 (when (and (window-dedicated-p (selected-window))
224 (not debugger-will-be-back))
225 ;; If the window is not dedicated, burying the buffer
226 ;; will mean that the frame created for it is left
227 ;; around showing some random buffer, and next time we
228 ;; pop to the debugger buffer we'll create yet
229 ;; another frame.
230 ;; If debugger-will-be-back is non-nil, the frame
231 ;; would need to be de-iconified anyway immediately
232 ;; after when we re-enter the debugger, so iconifying it
233 ;; here would cause flashing.
234 (bury-buffer))))
219 (kill-buffer debugger-buffer)) 235 (kill-buffer debugger-buffer))
220 (set-match-data debugger-outer-match-data))) 236 (set-match-data debugger-outer-match-data)))
221 ;; Put into effect the modified values of these variables 237 ;; Put into effect the modified values of these variables
@@ -307,7 +323,7 @@ That buffer should be current already."
307 (save-excursion 323 (save-excursion
308 (set-buffer (or buffer (current-buffer))) 324 (set-buffer (or buffer (current-buffer)))
309 (setq buffer (current-buffer)) 325 (setq buffer (current-buffer))
310 (let ((buffer-read-only nil) 326 (let ((inhibit-read-only t)
311 (old-end (point-min)) (new-end (point-min))) 327 (old-end (point-min)) (new-end (point-min)))
312 ;; If we saved an old backtrace, find the common part 328 ;; If we saved an old backtrace, find the common part
313 ;; between the new and the old. 329 ;; between the new and the old.
@@ -377,6 +393,7 @@ Enter another debugger on next entry to eval, apply or funcall."
377 (interactive) 393 (interactive)
378 (setq debugger-step-after-exit t) 394 (setq debugger-step-after-exit t)
379 (setq debugger-jumping-flag t) 395 (setq debugger-jumping-flag t)
396 (setq debugger-will-be-back t)
380 (add-hook 'post-command-hook 'debugger-reenable) 397 (add-hook 'post-command-hook 'debugger-reenable)
381 (message "Proceeding, will debug on next eval or call.") 398 (message "Proceeding, will debug on next eval or call.")
382 (exit-recursive-edit)) 399 (exit-recursive-edit))
@@ -387,6 +404,12 @@ Enter another debugger on next entry to eval, apply or funcall."
387 (unless debugger-may-continue 404 (unless debugger-may-continue
388 (error "Cannot continue")) 405 (error "Cannot continue"))
389 (message "Continuing.") 406 (message "Continuing.")
407 (save-excursion
408 ;; Check to see if we've flagged some frame for debug-on-exit, in which
409 ;; case we'll probably come back to the debugger soon.
410 (goto-char (point-min))
411 (if (re-search-forward "^\\* " nil t)
412 (setq debugger-will-be-back t)))
390 (exit-recursive-edit)) 413 (exit-recursive-edit))
391 414
392(defun debugger-return-value (val) 415(defun debugger-return-value (val)
@@ -397,6 +420,12 @@ will be used, such as in a debug on exit from a frame."
397 (setq debugger-value val) 420 (setq debugger-value val)
398 (princ "Returning " t) 421 (princ "Returning " t)
399 (prin1 debugger-value) 422 (prin1 debugger-value)
423 (save-excursion
424 ;; Check to see if we've flagged some frame for debug-on-exit, in which
425 ;; case we'll probably come back to the debugger soon.
426 (goto-char (point-min))
427 (if (re-search-forward "^\\* " nil t)
428 (setq debugger-will-be-back t)))
400 (exit-recursive-edit)) 429 (exit-recursive-edit))
401 430
402(defun debugger-jump () 431(defun debugger-jump ()
@@ -406,6 +435,7 @@ will be used, such as in a debug on exit from a frame."
406 (setq debugger-jumping-flag t) 435 (setq debugger-jumping-flag t)
407 (add-hook 'post-command-hook 'debugger-reenable) 436 (add-hook 'post-command-hook 'debugger-reenable)
408 (message "Continuing through this frame") 437 (message "Continuing through this frame")
438 (setq debugger-will-be-back t)
409 (exit-recursive-edit)) 439 (exit-recursive-edit))
410 440
411(defun debugger-reenable () 441(defun debugger-reenable ()
@@ -454,7 +484,7 @@ Applies to the frame whose line point is on in the backtrace."
454 (beginning-of-line) 484 (beginning-of-line)
455 (backtrace-debug (debugger-frame-number) t) 485 (backtrace-debug (debugger-frame-number) t)
456 (if (= (following-char) ? ) 486 (if (= (following-char) ? )
457 (let ((buffer-read-only nil)) 487 (let ((inhibit-read-only t))
458 (delete-char 1) 488 (delete-char 1)
459 (insert ?*))) 489 (insert ?*)))
460 (beginning-of-line)) 490 (beginning-of-line))
@@ -470,7 +500,7 @@ Applies to the frame whose line point is on in the backtrace."
470 (beginning-of-line) 500 (beginning-of-line)
471 (backtrace-debug (debugger-frame-number) nil) 501 (backtrace-debug (debugger-frame-number) nil)
472 (if (= (following-char) ?*) 502 (if (= (following-char) ?*)
473 (let ((buffer-read-only nil)) 503 (let ((inhibit-read-only t))
474 (delete-char 1) 504 (delete-char 1)
475 (insert ? ))) 505 (insert ? )))
476 (beginning-of-line)) 506 (beginning-of-line))
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index bb0fa666217..a342f8a5530 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -183,13 +183,18 @@ Use the command `%s' to change this variable." pretty-name mode))
183 183
184 (let ((curfile (or (and (boundp 'byte-compile-current-file) 184 (let ((curfile (or (and (boundp 'byte-compile-current-file)
185 byte-compile-current-file) 185 byte-compile-current-file)
186 load-file-name))) 186 load-file-name))
187 `(defcustom ,mode ,init-value 187 base-doc-string)
188 ,(format "Non-nil if %s is enabled. 188 (setq base-doc-string "Non-nil if %s is enabled.
189See the command `%s' for a description of this minor-mode. 189See the command `%s' for a description of this minor-mode.
190Setting this variable directly does not take effect; 190Setting this variable directly does not take effect;
191use either \\[customize] or the function `%s'." 191use either \\[customize] or the function `%s'.")
192 pretty-name mode mode) 192 (if (null body)
193 (setq base-doc-string "Non-nil if %s is enabled.
194See the command `%s' for a description of this minor-mode."))
195
196 `(defcustom ,mode ,init-value
197 ,(format base-doc-string pretty-name mode mode)
193 :set 'custom-set-minor-mode 198 :set 'custom-set-minor-mode
194 :initialize 'custom-initialize-default 199 :initialize 'custom-initialize-default
195 ,@group 200 ,@group
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index bb815481bf0..72924417109 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -129,6 +129,7 @@
129(put 'defmacro 'doc-string-elt 3) 129(put 'defmacro 'doc-string-elt 3)
130(put 'defmacro* 'doc-string-elt 3) 130(put 'defmacro* 'doc-string-elt 3)
131(put 'defsubst 'doc-string-elt 3) 131(put 'defsubst 'doc-string-elt 3)
132(put 'defstruct 'doc-string-elt 2)
132(put 'define-skeleton 'doc-string-elt 2) 133(put 'define-skeleton 'doc-string-elt 2)
133(put 'define-derived-mode 'doc-string-elt 4) 134(put 'define-derived-mode 'doc-string-elt 4)
134(put 'define-compilation-mode 'doc-string-elt 3) 135(put 'define-compilation-mode 'doc-string-elt 3)
@@ -194,7 +195,7 @@
194 (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") 195 (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
195 (make-local-variable 'font-lock-comment-start-skip) 196 (make-local-variable 'font-lock-comment-start-skip)
196 ;; Font lock mode uses this only when it KNOWS a comment is starting. 197 ;; Font lock mode uses this only when it KNOWS a comment is starting.
197 (setq font-lock-comment-start-skip ";+ *") 198 (setq font-lock-comment-start-skip ";+ *")
198 (make-local-variable 'comment-add) 199 (make-local-variable 'comment-add)
199 (setq comment-add 1) ;default to `;;' in comment-region 200 (setq comment-add 1) ;default to `;;' in comment-region
200 (make-local-variable 'comment-column) 201 (make-local-variable 'comment-column)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 6ea6bfb7f3d..fe2b0a892a8 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -384,13 +384,13 @@ and after the region marked by the rectangle to search."
384 :type 'boolean 384 :type 'boolean
385 :group 'cua) 385 :group 'cua)
386 386
387(defface cua-rectangle-face 387(defface cua-rectangle
388 '((default :inherit region) 388 '((default :inherit region)
389 (((class color)) :foreground "white" :background "maroon")) 389 (((class color)) :foreground "white" :background "maroon"))
390 "*Font used by CUA for highlighting the rectangle." 390 "*Font used by CUA for highlighting the rectangle."
391 :group 'cua) 391 :group 'cua)
392 392
393(defface cua-rectangle-noselect-face 393(defface cua-rectangle-noselect
394 '((default :inherit region) 394 '((default :inherit region)
395 (((class color)) :foreground "white" :background "dimgray")) 395 (((class color)) :foreground "white" :background "dimgray"))
396 "*Font used by CUA for highlighting the non-selected rectangle lines." 396 "*Font used by CUA for highlighting the non-selected rectangle lines."
@@ -404,7 +404,7 @@ and after the region marked by the rectangle to search."
404 :type 'boolean 404 :type 'boolean
405 :group 'cua) 405 :group 'cua)
406 406
407(defface cua-global-mark-face 407(defface cua-global-mark
408 '((((min-colors 88)(class color)) :foreground "black" :background "yellow1") 408 '((((min-colors 88)(class color)) :foreground "black" :background "yellow1")
409 (((class color)) :foreground "black" :background "yellow") 409 (((class color)) :foreground "black" :background "yellow")
410 (t :bold t)) 410 (t :bold t))
diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el
index 8280691ae18..b8874df0f34 100644
--- a/lisp/emulation/cua-gmrk.el
+++ b/lisp/emulation/cua-gmrk.el
@@ -74,7 +74,7 @@
74 (move-overlay cua--global-mark-overlay (point) (1+ (point))) 74 (move-overlay cua--global-mark-overlay (point) (1+ (point)))
75 (setq cua--global-mark-overlay 75 (setq cua--global-mark-overlay
76 (make-overlay (point) (1+ (point)))) 76 (make-overlay (point) (1+ (point))))
77 (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face)) 77 (overlay-put cua--global-mark-overlay 'face 'cua-global-mark))
78 (if (and cua-global-mark-blink-cursor-interval 78 (if (and cua-global-mark-blink-cursor-interval
79 (not cua--orig-blink-cursor-interval)) 79 (not cua--orig-blink-cursor-interval))
80 (setq cua--orig-blink-cursor-interval blink-cursor-interval 80 (setq cua--orig-blink-cursor-interval blink-cursor-interval
@@ -218,7 +218,7 @@ With prefix argument, don't jump to global mark when cancelling it."
218 (let ((olist (overlays-at (marker-position cua--global-mark-marker))) 218 (let ((olist (overlays-at (marker-position cua--global-mark-marker)))
219 in-rect) 219 in-rect)
220 (while olist 220 (while olist
221 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle-face) 221 (if (eq (overlay-get (car olist) 'face) 'cua-rectangle)
222 (setq in-rect t olist nil) 222 (setq in-rect t olist nil)
223 (setq olist (cdr olist)))) 223 (setq olist (cdr olist))))
224 (if in-rect 224 (if in-rect
@@ -358,11 +358,6 @@ With prefix argument, don't jump to global mark when cancelling it."
358;;; Initialization 358;;; Initialization
359 359
360(defun cua--init-global-mark () 360(defun cua--init-global-mark ()
361 (unless (face-background 'cua-global-mark-face)
362 (copy-face 'region 'cua-global-mark-face)
363 (set-face-foreground 'cua-global-mark-face "black")
364 (set-face-background 'cua-global-mark-face "cyan"))
365
366 (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark) 361 (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark)
367 (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark) 362 (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark)
368 (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark) 363 (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark)
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 932448079dd..72fd9195850 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -755,7 +755,7 @@ If command is repeated at same position, delete the rectangle."
755 (sit-for 0) ; make window top/bottom reliable 755 (sit-for 0) ; make window top/bottom reliable
756 (cua--rectangle-operation nil t nil nil nil ; do not tabify 756 (cua--rectangle-operation nil t nil nil nil ; do not tabify
757 '(lambda (s e l r v) 757 '(lambda (s e l r v)
758 (let ((rface (if v 'cua-rectangle-face 'cua-rectangle-noselect-face)) 758 (let ((rface (if v 'cua-rectangle 'cua-rectangle-noselect))
759 overlay bs ms as) 759 overlay bs ms as)
760 (when (cua--rectangle-virtual-edges) 760 (when (cua--rectangle-virtual-edges)
761 (let ((lb (line-beginning-position)) 761 (let ((lb (line-beginning-position))
diff --git a/lisp/faces.el b/lisp/faces.el
index 6bbf7da3761..8240cceaaef 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2085,13 +2085,32 @@ Note: Other faces cannot inherit from the cursor face."
2085 :group 'whitespace ; like `show-trailing-whitespace' 2085 :group 'whitespace ; like `show-trailing-whitespace'
2086 :group 'basic-faces) 2086 :group 'basic-faces)
2087 2087
2088(defface escape-glyph '((((background dark)) :foreground "cyan") 2088(defface escape-glyph
2089 ;; See the comment in minibuffer-prompt for 2089 '((((background dark)) :foreground "pink2")
2090 ;; the reason not to use blue on MS-DOS. 2090 ;; See the comment in minibuffer-prompt for
2091 (((type pc)) :foreground "magenta") 2091 ;; the reason not to use blue on MS-DOS.
2092 (t :foreground "blue")) 2092 (((type pc)) :foreground "magenta")
2093 ;; red4 is too light -- rms.
2094 (t :foreground "blue"))
2093 "Face for characters displayed as ^-sequences or \-sequences." 2095 "Face for characters displayed as ^-sequences or \-sequences."
2094 :group 'basic-faces) 2096 :group 'basic-faces
2097 :version "22.1")
2098
2099(defface no-break-space
2100 '((((class color) (min-colors 88)) :inherit escape-glyph :underline t)
2101 (((class color) (min-colors 8)) :background "magenta" :foreground )
2102 (t :inverse-video t))
2103 "Face for non-breaking space."
2104 :group 'basic-faces
2105 :version "22.1")
2106
2107(defface shadow
2108 '((((background dark)) :foreground "grey70")
2109 (((background light)) :foreground "grey50"))
2110 "Basic face for shadowed text."
2111 :group 'basic-faces
2112 :version "22.1")
2113
2095 2114
2096;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2097;;; Manipulating font names. 2116;;; Manipulating font names.
diff --git a/lisp/files.el b/lisp/files.el
index a75b6b2fc89..b8ec5bf1cd0 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -658,7 +658,7 @@ one or more of those symbols."
658 658
659(defun locate-file-completion (string path-and-suffixes action) 659(defun locate-file-completion (string path-and-suffixes action)
660 "Do completion for file names passed to `locate-file'. 660 "Do completion for file names passed to `locate-file'.
661PATH-AND-SUFFIXES is a pair of lists (DIRECTORIES . SUFFIXES)." 661PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
662 (if (file-name-absolute-p string) 662 (if (file-name-absolute-p string)
663 (read-file-name-internal string nil action) 663 (read-file-name-internal string nil action)
664 (let ((names nil) 664 (let ((names nil)
@@ -2159,9 +2159,9 @@ Otherwise, return nil; point may be changed."
2159 (goto-char beg) 2159 (goto-char beg)
2160 end)))) 2160 end))))
2161 2161
2162(defun hack-local-variables-confirm (string) 2162(defun hack-local-variables-confirm (string flag-to-check)
2163 (or (eq enable-local-variables t) 2163 (or (eq flag-to-check t)
2164 (and enable-local-variables 2164 (and flag-to-check
2165 (save-window-excursion 2165 (save-window-excursion
2166 (condition-case nil 2166 (condition-case nil
2167 (switch-to-buffer (current-buffer)) 2167 (switch-to-buffer (current-buffer))
@@ -2236,7 +2236,8 @@ is specified, returning t if it is specified."
2236 (if (and result 2236 (if (and result
2237 (or mode-only 2237 (or mode-only
2238 (hack-local-variables-confirm 2238 (hack-local-variables-confirm
2239 "Set local variables as specified in -*- line of %s? "))) 2239 "Set local variables as specified in -*- line of %s? "
2240 enable-local-variables)))
2240 (let ((enable-local-eval enable-local-eval)) 2241 (let ((enable-local-eval enable-local-eval))
2241 (while result 2242 (while result
2242 (hack-one-local-variable (car (car result)) (cdr (car result))) 2243 (hack-one-local-variable (car (car result)) (cdr (car result)))
@@ -2267,7 +2268,8 @@ is specified, returning t if it is specified."
2267 (and (search-forward "Local Variables:" nil t) 2268 (and (search-forward "Local Variables:" nil t)
2268 (or mode-only 2269 (or mode-only
2269 (hack-local-variables-confirm 2270 (hack-local-variables-confirm
2270 "Set local variables as specified at end of %s? ")))) 2271 "Set local variables as specified at end of %s? "
2272 enable-local-variables))))
2271 (skip-chars-forward " \t") 2273 (skip-chars-forward " \t")
2272 (let ((enable-local-eval enable-local-eval) 2274 (let ((enable-local-eval enable-local-eval)
2273 ;; suffix is what comes after "local variables:" in its line. 2275 ;; suffix is what comes after "local variables:" in its line.
@@ -2489,7 +2491,8 @@ is considered risky."
2489 ;; Permit eval if not root and user says ok. 2491 ;; Permit eval if not root and user says ok.
2490 (and (not (zerop (user-uid))) 2492 (and (not (zerop (user-uid)))
2491 (hack-local-variables-confirm 2493 (hack-local-variables-confirm
2492 "Process `eval' or hook local variables in %s? "))) 2494 "Process `eval' or hook local variables in %s? "
2495 enable-local-eval)))
2493 (if (eq var 'eval) 2496 (if (eq var 'eval)
2494 (save-excursion (eval val)) 2497 (save-excursion (eval val))
2495 (make-local-variable var) 2498 (make-local-variable var)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 1d07e5a9283..4457f9cfe03 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -691,7 +691,7 @@ For example:
691 691
692 (add-hook 'c-mode-hook 692 (add-hook 'c-mode-hook
693 (lambda () 693 (lambda ()
694 (font-lock-add-keywords 'c-mode 694 (font-lock-add-keywords nil
695 '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend) 695 '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)
696 (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . 696 (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
697 font-lock-keyword-face))))) 697 font-lock-keyword-face)))))
@@ -905,7 +905,7 @@ The value of this variable is used when Font Lock mode is turned on."
905 'font-lock-after-change-function t) 905 'font-lock-after-change-function t)
906 (set (make-local-variable 'font-lock-fontify-buffer-function) 906 (set (make-local-variable 'font-lock-fontify-buffer-function)
907 'jit-lock-refontify) 907 'jit-lock-refontify)
908 ;; Don't fontify eagerly (and don't abort is the buffer is large). 908 ;; Don't fontify eagerly (and don't abort if the buffer is large).
909 (set (make-local-variable 'font-lock-fontified) t) 909 (set (make-local-variable 'font-lock-fontified) t)
910 ;; Use jit-lock. 910 ;; Use jit-lock.
911 (jit-lock-register 'font-lock-fontify-region 911 (jit-lock-register 'font-lock-fontify-region
@@ -1826,6 +1826,17 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1826 "Font Lock mode face used to highlight preprocessor directives." 1826 "Font Lock mode face used to highlight preprocessor directives."
1827 :group 'font-lock-highlighting-faces) 1827 :group 'font-lock-highlighting-faces)
1828 1828
1829(defface font-lock-regexp-backslash
1830 '((((class color) (min-colors 16)) :inherit escape-glyph)
1831 (t :inherit bold))
1832 "Font Lock mode face used to highlight a backslash in Lisp regexps."
1833 :group 'font-lock-highlighting-faces)
1834
1835(defface font-lock-regexp-backslash-construct
1836 '((t :inherit bold))
1837 "Font Lock mode face used to highlight `\' constructs in Lisp regexps."
1838 :group 'font-lock-highlighting-faces)
1839
1829;;; End of Colour etc. support. 1840;;; End of Colour etc. support.
1830 1841
1831;;; Menu support. 1842;;; Menu support.
@@ -2020,7 +2031,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
2020 `(;; Control structures. Emacs Lisp forms. 2031 `(;; Control structures. Emacs Lisp forms.
2021 (,(concat 2032 (,(concat
2022 "(" (regexp-opt 2033 "(" (regexp-opt
2023 '("cond" "if" "while" "let" "let*" 2034 '("cond" "if" "while" "while-no-input" "let" "let*"
2024 "prog" "progn" "progv" "prog1" "prog2" "prog*" 2035 "prog" "progn" "progv" "prog1" "prog2" "prog*"
2025 "inline" "lambda" "save-restriction" "save-excursion" 2036 "inline" "lambda" "save-restriction" "save-excursion"
2026 "save-window-excursion" "save-selected-window" 2037 "save-window-excursion" "save-selected-window"
@@ -2076,16 +2087,14 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
2076 ;; Make regexp grouping constructs bold, so they stand out, but only 2087 ;; Make regexp grouping constructs bold, so they stand out, but only
2077 ;; in strings. 2088 ;; in strings.
2078 ((lambda (bound) 2089 ((lambda (bound)
2079 (if (re-search-forward "\\(\\\\\\\\\\)\\([(|)]\\)\\(\\?:\\)?" bound t) 2090 (if (re-search-forward "\\(\\\\\\\\\\)\\((\\(?:?:\\)?\\|[|)]\\)" bound t)
2080 (let ((face (get-text-property (1- (point)) 'face))) 2091 (let ((face (get-text-property (1- (point)) 'face)))
2081 (if (listp face) 2092 (if (listp face)
2082 (memq 'font-lock-string-face face) 2093 (memq 'font-lock-string-face face)
2083 (eq 'font-lock-string-face face))))) 2094 (eq 'font-lock-string-face face)))))
2084 ;; Should we introduce a lowlight face for this? 2095 (1 'font-lock-regexp-backslash prepend)
2085 ;; Ideally that would retain the color, dimmed. 2096 (2 'font-lock-regexp-backslash-construct prepend))
2086 (1 font-lock-comment-face prepend) 2097
2087 (2 'bold prepend)
2088 (3 font-lock-type-face prepend t))
2089 ;; Underline innermost grouping, so that you can more easily see what 2098 ;; Underline innermost grouping, so that you can more easily see what
2090 ;; belongs together. 2005-05-12: Font-lock can go into an 2099 ;; belongs together. 2005-05-12: Font-lock can go into an
2091 ;; unbreakable endless loop on this -- something's broken. 2100 ;; unbreakable endless loop on this -- something's broken.
diff --git a/lisp/ido.el b/lisp/ido.el
index b01e9e35c37..4ac9546de64 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -299,8 +299,8 @@
299;; ------------ 299;; ------------
300 300
301;; The highlighting of matching items is controlled via ido-use-faces. 301;; The highlighting of matching items is controlled via ido-use-faces.
302;; The faces used are ido-first-match-face, ido-only-match-face and 302;; The faces used are ido-first-match, ido-only-match and
303;; ido-subdir-face. 303;; ido-subdir.
304;; Colouring of the matching item was suggested by 304;; Colouring of the matching item was suggested by
305;; Carsten Dominik (dominik@strw.leidenuniv.nl). 305;; Carsten Dominik (dominik@strw.leidenuniv.nl).
306 306
@@ -740,17 +740,17 @@ subdirs in the alternatives."
740 :type 'boolean 740 :type 'boolean
741 :group 'ido) 741 :group 'ido)
742 742
743(defface ido-first-match-face '((t (:bold t))) 743(defface ido-first-match '((t (:bold t)))
744 "*Font used by ido for highlighting first match." 744 "*Font used by ido for highlighting first match."
745 :group 'ido) 745 :group 'ido)
746 746
747(defface ido-only-match-face '((((class color)) 747(defface ido-only-match '((((class color))
748 (:foreground "ForestGreen")) 748 (:foreground "ForestGreen"))
749 (t (:italic t))) 749 (t (:italic t)))
750 "*Font used by ido for highlighting only match." 750 "*Font used by ido for highlighting only match."
751 :group 'ido) 751 :group 'ido)
752 752
753(defface ido-subdir-face '((((min-colors 88) (class color)) 753(defface ido-subdir '((((min-colors 88) (class color))
754 (:foreground "red1")) 754 (:foreground "red1"))
755 (((class color)) 755 (((class color))
756 (:foreground "red")) 756 (:foreground "red"))
@@ -758,7 +758,7 @@ subdirs in the alternatives."
758 "*Font used by ido for highlighting subdirs in the alternatives." 758 "*Font used by ido for highlighting subdirs in the alternatives."
759 :group 'ido) 759 :group 'ido)
760 760
761(defface ido-indicator-face '((((min-colors 88) (class color)) 761(defface ido-indicator '((((min-colors 88) (class color))
762 (:foreground "yellow1" 762 (:foreground "yellow1"
763 :background "red1" 763 :background "red1"
764 :width condensed)) 764 :width condensed))
@@ -4039,7 +4039,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
4039 first) 4039 first)
4040 4040
4041 (if (and ind ido-use-faces) 4041 (if (and ind ido-use-faces)
4042 (put-text-property 0 1 'face 'ido-indicator-face ind)) 4042 (put-text-property 0 1 'face 'ido-indicator ind))
4043 4043
4044 (if (and ido-use-faces comps) 4044 (if (and ido-use-faces comps)
4045 (let* ((fn (ido-name (car comps))) 4045 (let* ((fn (ido-name (car comps)))
@@ -4047,8 +4047,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
4047 (setq first (format "%s" fn)) 4047 (setq first (format "%s" fn))
4048 (put-text-property 0 ln 'face 4048 (put-text-property 0 ln 'face
4049 (if (= (length comps) 1) 4049 (if (= (length comps) 1)
4050 'ido-only-match-face 4050 'ido-only-match
4051 'ido-first-match-face) 4051 'ido-first-match)
4052 first) 4052 first)
4053 (if ind (setq first (concat first ind))) 4053 (if ind (setq first (concat first ind)))
4054 (setq comps (cons first (cdr comps))))) 4054 (setq comps (cons first (cdr comps)))))
@@ -4091,7 +4091,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
4091 (if (and ido-use-faces 4091 (if (and ido-use-faces
4092 (not (string= str first)) 4092 (not (string= str first))
4093 (ido-final-slash str)) 4093 (ido-final-slash str))
4094 (put-text-property 0 (length str) 'face 'ido-subdir-face str)) 4094 (put-text-property 0 (length str) 'face 'ido-subdir str))
4095 str))))) 4095 str)))))
4096 comps)))))) 4096 comps))))))
4097 4097
@@ -4193,7 +4193,9 @@ See `read-file-name' for additional parameters."
4193 (eq (get this-command 'ido) 'dir) 4193 (eq (get this-command 'ido) 'dir)
4194 (memq this-command ido-read-file-name-as-directory-commands)) 4194 (memq this-command ido-read-file-name-as-directory-commands))
4195 (setq filename 4195 (setq filename
4196 (ido-read-directory-name prompt dir default-filename mustmatch initial))) 4196 (ido-read-directory-name prompt dir default-filename mustmatch initial))
4197 (if (eq ido-exit 'fallback)
4198 (setq filename 'fallback)))
4197 ((and (not (eq (get this-command 'ido) 'ignore)) 4199 ((and (not (eq (get this-command 'ido) 'ignore))
4198 (not (memq this-command ido-read-file-name-non-ido)) 4200 (not (memq this-command ido-read-file-name-non-ido))
4199 (or (null predicate) (eq predicate 'file-exists-p))) 4201 (or (null predicate) (eq predicate 'file-exists-p)))
diff --git a/lisp/info.el b/lisp/info.el
index c36554e6a7a..4c6a0ea027d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1379,6 +1379,43 @@ If FORK is a string, it is the name to use for the new buffer."
1379 1379
1380(defvar Info-read-node-completion-table) 1380(defvar Info-read-node-completion-table)
1381 1381
1382(defun Info-read-node-name-2 (string path-and-suffixes action)
1383 "Virtual completion table for file names input in Info node names.
1384PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
1385 (let* ((names nil)
1386 (suffixes (remove "" (cdr path-and-suffixes)))
1387 (suffix (concat (regexp-opt suffixes t) "\\'"))
1388 (string-dir (file-name-directory string))
1389 (dirs
1390 (if (file-name-absolute-p string)
1391 (list (file-name-directory string))
1392 (car path-and-suffixes))))
1393 (dolist (dir dirs)
1394 (unless dir
1395 (setq dir default-directory))
1396 (if string-dir (setq dir (expand-file-name string-dir dir)))
1397 (when (file-directory-p dir)
1398 (dolist (file (file-name-all-completions
1399 (file-name-nondirectory string) dir))
1400 ;; If the file name has no suffix or a standard suffix,
1401 ;; include it.
1402 (and (or (null (file-name-extension file))
1403 (string-match suffix file))
1404 ;; But exclude subfiles of split info files.
1405 (not (string-match "-[0-9]+\\'" file))
1406 ;; And exclude backup files.
1407 (not (string-match "~\\'" file))
1408 (push (if string-dir (concat string-dir file) file) names))
1409 ;; If the file name ends in a standard suffix,
1410 ;; add the unsuffixed name as a completion option.
1411 (when (string-match suffix file)
1412 (setq file (substring file 0 (match-beginning 0)))
1413 (push (if string-dir (concat string-dir file) file) names)))))
1414 (cond
1415 ((eq action t) (all-completions string names))
1416 ((null action) (try-completion string names))
1417 (t (test-completion string names)))))
1418
1382;; This function is used as the "completion table" while reading a node name. 1419;; This function is used as the "completion table" while reading a node name.
1383;; It does completion using the alist in Info-read-node-completion-table 1420;; It does completion using the alist in Info-read-node-completion-table
1384;; unless STRING starts with an open-paren. 1421;; unless STRING starts with an open-paren.
@@ -1389,15 +1426,16 @@ If FORK is a string, it is the name to use for the new buffer."
1389 (let ((file (substring string 1))) 1426 (let ((file (substring string 1)))
1390 (cond 1427 (cond
1391 ((eq code nil) 1428 ((eq code nil)
1392 (let ((comp (try-completion file 'locate-file-completion 1429 (let ((comp (try-completion file 'Info-read-node-name-2
1393 (cons Info-directory-list 1430 (cons Info-directory-list
1394 (mapcar 'car Info-suffix-list))))) 1431 (mapcar 'car Info-suffix-list)))))
1395 (cond 1432 (cond
1396 ((eq comp t) (concat string ")")) 1433 ((eq comp t) (concat string ")"))
1397 (comp (concat "(" comp))))) 1434 (comp (concat "(" comp)))))
1398 ((eq code t) (all-completions file 'locate-file-completion 1435 ((eq code t)
1399 (cons Info-directory-list 1436 (all-completions file 'Info-read-node-name-2
1400 (mapcar 'car Info-suffix-list)))) 1437 (cons Info-directory-list
1438 (mapcar 'car Info-suffix-list))))
1401 (t nil)))) 1439 (t nil))))
1402 ;; If a file name was given, then any node is fair game. 1440 ;; If a file name was given, then any node is fair game.
1403 ((string-match "\\`(" string) 1441 ((string-match "\\`(" string)
@@ -1413,6 +1451,10 @@ If FORK is a string, it is the name to use for the new buffer."
1413 (t 1451 (t
1414 (test-completion string Info-read-node-completion-table predicate)))) 1452 (test-completion string Info-read-node-completion-table predicate))))
1415 1453
1454;; Arrange to highlight the proper letters in the completion list buffer.
1455(put 'Info-read-node-name-1 'completion-base-size-function
1456 (lambda () 1))
1457
1416(defun Info-read-node-name (prompt &optional default) 1458(defun Info-read-node-name (prompt &optional default)
1417 (let* ((completion-ignore-case t) 1459 (let* ((completion-ignore-case t)
1418 (Info-read-node-completion-table (Info-build-node-completions)) 1460 (Info-read-node-completion-table (Info-build-node-completions))
@@ -3483,7 +3525,7 @@ the variable `Info-file-list-for-emacs'."
3483 (Info-goto-emacs-command-node command))))) 3525 (Info-goto-emacs-command-node command)))))
3484 3526
3485(defface Info-title-1-face 3527(defface Info-title-1-face
3486 '((((type tty pc) (class color)) :foreground "yellow" :weight bold) 3528 '((((type tty pc) (class color)) :foreground "green" :weight bold)
3487 (t :height 1.2 :inherit Info-title-2-face)) 3529 (t :height 1.2 :inherit Info-title-2-face))
3488 "Face for Info titles at level 1." 3530 "Face for Info titles at level 1."
3489 :group 'info) 3531 :group 'info)
diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el
index f7e325b0ca3..f896773e53c 100644
--- a/lisp/international/iso-cvt.el
+++ b/lisp/international/iso-cvt.el
@@ -791,6 +791,7 @@ Optional arg BUFFER is ignored (for use in `format-alist')."
791 ("&iuml;" "ï") 791 ("&iuml;" "ï")
792 ("&eth;" "ð") 792 ("&eth;" "ð")
793 ("&ntilde;" "ñ") 793 ("&ntilde;" "ñ")
794 ("&nbsp;" " ")
794 ("&ograve;" "ò") 795 ("&ograve;" "ò")
795 ("&oacute;" "ó") 796 ("&oacute;" "ó")
796 ("&ocirc;" "ô") 797 ("&ocirc;" "ô")
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 24f7ebc6000..6ce21a5328a 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -47,7 +47,7 @@
47;; like this 47;; like this
48 48
49;; (add-to-list 'file-coding-system-alist 49;; (add-to-list 'file-coding-system-alist
50;; '("\\.tex\\|\\.ltx\\|\\.dtx\\|\\.drv\\'" . latexenc-find-file-coding-system)) 50;; '("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system))
51 51
52;;; Code: 52;;; Code:
53 53
@@ -159,10 +159,11 @@ coding system names is determined from `latex-inputenc-coding-alist'."
159 (setq latexenc-main-file (concat file ext))))))) 159 (setq latexenc-main-file (concat file ext)))))))
160 ;; try tex-modes tex-guess-main-file 160 ;; try tex-modes tex-guess-main-file
161 (when (and (not latexenc-dont-use-tex-guess-main-file-flag) 161 (when (and (not latexenc-dont-use-tex-guess-main-file-flag)
162 (not latexenc-main-file) 162 (not latexenc-main-file))
163 (fboundp 'tex-guess-main-file)) 163 ;; Use a separate `when' so the byte-compiler sees the fboundp.
164 (let ((tex-start-of-header "\\\\document\\(style\\|class\\)")) 164 (when (fboundp 'tex-guess-main-file)
165 (setq latexenc-main-file (tex-guess-main-file)))) 165 (let ((tex-start-of-header "\\\\document\\(style\\|class\\)"))
166 (setq latexenc-main-file (tex-guess-main-file)))))
166 ;; if we found a master/main file get the coding system from it 167 ;; if we found a master/main file get the coding system from it
167 (if (and latexenc-main-file 168 (if (and latexenc-main-file
168 (file-readable-p latexenc-main-file)) 169 (file-readable-p latexenc-main-file))
diff --git a/lisp/isearchb.el b/lisp/isearchb.el
index 9714701944f..5c70bd8fc00 100644
--- a/lisp/isearchb.el
+++ b/lisp/isearchb.el
@@ -151,7 +151,7 @@ It's purpose is to pass different call arguments to
151 (switch-to-buffer buf) 151 (switch-to-buffer buf)
152 (if isearchb-show-completions 152 (if isearchb-show-completions
153 (message "isearchb: %s%s" iswitchb-text 153 (message "isearchb: %s%s" iswitchb-text
154 (iswitchb-completions iswitchb-text nil)) 154 (iswitchb-completions iswitchb-text))
155 (if (= 1 (length iswitchb-matches)) 155 (if (= 1 (length iswitchb-matches))
156 (message "isearchb: %s (only match)" iswitchb-text) 156 (message "isearchb: %s (only match)" iswitchb-text)
157 (message "isearchb: %s" iswitchb-text)))))) 157 (message "isearchb: %s" iswitchb-text))))))
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 2943be851a0..0cb12d391ff 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -404,21 +404,21 @@ iswitchb is running."
404 :type 'hook 404 :type 'hook
405 :group 'iswitchb) 405 :group 'iswitchb)
406 406
407(defface iswitchb-single-match-face 407(defface iswitchb-single-match
408 '((t 408 '((t
409 (:inherit font-lock-comment-face))) 409 (:inherit font-lock-comment-face)))
410 "Iswitchb face for single matching buffer name." 410 "Iswitchb face for single matching buffer name."
411 :version "22.1" 411 :version "22.1"
412 :group 'iswitchb) 412 :group 'iswitchb)
413 413
414(defface iswitchb-current-match-face 414(defface iswitchb-current-match
415 '((t 415 '((t
416 (:inherit font-lock-function-name-face))) 416 (:inherit font-lock-function-name-face)))
417 "Iswitchb face for current matching buffer name." 417 "Iswitchb face for current matching buffer name."
418 :version "22.1" 418 :version "22.1"
419 :group 'iswitchb) 419 :group 'iswitchb)
420 420
421(defface iswitchb-virtual-matches-face 421(defface iswitchb-virtual-matches
422 '((t 422 '((t
423 (:inherit font-lock-builtin-face))) 423 (:inherit font-lock-builtin-face)))
424 "Iswitchb face for matching virtual buffer names. 424 "Iswitchb face for matching virtual buffer names.
@@ -426,7 +426,7 @@ See also `iswitchb-use-virtual-buffers'."
426 :version "22.1" 426 :version "22.1"
427 :group 'iswitchb) 427 :group 'iswitchb)
428 428
429(defface iswitchb-invalid-regexp-face 429(defface iswitchb-invalid-regexp
430 '((t 430 '((t
431 (:inherit font-lock-warning-face))) 431 (:inherit font-lock-warning-face)))
432 "Iswitchb face for indicating invalid regexp. " 432 "Iswitchb face for indicating invalid regexp. "
@@ -1299,9 +1299,9 @@ Modified from `icomplete-completions'."
1299 (put-text-property 0 (length first) 'face 1299 (put-text-property 0 (length first) 'face
1300 (if (= (length comps) 1) 1300 (if (= (length comps) 1)
1301 (if iswitchb-invalid-regexp 1301 (if iswitchb-invalid-regexp
1302 'iswitchb-invalid-regexp-face 1302 'iswitchb-invalid-regexp
1303 'iswitchb-single-match-face) 1303 'iswitchb-single-match)
1304 'iswitchb-current-match-face) 1304 'iswitchb-current-match)
1305 first) 1305 first)
1306 (setq comps (cons first (cdr comps))))) 1306 (setq comps (cons first (cdr comps)))))
1307 1307
@@ -1330,7 +1330,7 @@ Modified from `icomplete-completions'."
1330 (let ((comp comps)) 1330 (let ((comp comps))
1331 (while comp 1331 (while comp
1332 (put-text-property 0 (length (car comp)) 1332 (put-text-property 0 (length (car comp))
1333 'face 'iswitchb-virtual-matches-face 1333 'face 'iswitchb-virtual-matches
1334 (car comp)) 1334 (car comp))
1335 (setq comp (cdr comp)))))) 1335 (setq comp (cdr comp))))))
1336 1336
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index ba4aca881ef..593f46cad40 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -720,6 +720,7 @@ the list should be unique."
720 (sc-mail-warn-if-non-rfc822-p (sc-mail-error-in-mail-field)) 720 (sc-mail-warn-if-non-rfc822-p (sc-mail-error-in-mail-field))
721 (end (setq sc-mail-headers-end (point)))) 721 (end (setq sc-mail-headers-end (point))))
722 "Regi frame for glomming mail header information.") 722 "Regi frame for glomming mail header information.")
723(put 'sc-mail-glom-frame 'risky-local-variable t)
723 724
724(defvar curline) ; dynamic bondage 725(defvar curline) ; dynamic bondage
725 726
diff --git a/lisp/printing.el b/lisp/printing.el
index ddfe6fd5cc0..41ea0238c6b 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -6434,7 +6434,8 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
6434;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 6434;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6435 6435
6436 6436
6437(pr-update-menus t) 6437;;; Files are not supposed to change Emacs behavior when you merely load them.
6438;;; (pr-update-menus t)
6438 6439
6439 6440
6440(provide 'printing) 6441(provide 'printing)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index a27a5282b42..e0c8ded307a 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -935,6 +935,7 @@ Returns the compilation buffer created."
935 (substitute-env-vars (match-string 1 command)) 935 (substitute-env-vars (match-string 1 command))
936 "~") 936 "~")
937 default-directory)) 937 default-directory))
938 (erase-buffer)
938 ;; Select the desired mode. 939 ;; Select the desired mode.
939 (if (not (eq mode t)) 940 (if (not (eq mode t))
940 (funcall mode) 941 (funcall mode)
@@ -944,11 +945,11 @@ Returns the compilation buffer created."
944 (if highlight-regexp 945 (if highlight-regexp
945 (set (make-local-variable 'compilation-highlight-regexp) 946 (set (make-local-variable 'compilation-highlight-regexp)
946 highlight-regexp)) 947 highlight-regexp))
947 (erase-buffer)
948 ;; Output a mode setter, for saving and later reloading this buffer. 948 ;; Output a mode setter, for saving and later reloading this buffer.
949 (insert "-*- mode: " name-of-mode 949 (insert "-*- mode: " name-of-mode
950 "; default-directory: " (prin1-to-string default-directory) 950 "; default-directory: " (prin1-to-string default-directory)
951 " -*-\n" command "\n") (setq thisdir default-directory)) 951 " -*-\n" command "\n")
952 (setq thisdir default-directory))
952 (set-buffer-modified-p nil)) 953 (set-buffer-modified-p nil))
953 ;; If we're already in the compilation buffer, go to the end 954 ;; If we're already in the compilation buffer, go to the end
954 ;; of the buffer, so point will track the compilation output. 955 ;; of the buffer, so point will track the compilation output.
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 7356583fb90..d2d2dc6263a 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -115,9 +115,8 @@
115 :version "22.1") 115 :version "22.1")
116 116
117(defface makefile-shell-face 117(defface makefile-shell-face
118 '((((class color) (background light)) (:background "seashell1")) 118 '((((class color) (min-colors 88) (background light)) (:background "seashell1"))
119 (((class color) (background dark)) (:background "seashell4")) 119 (((class color) (min-colors 88) (background dark)) (:background "seashell4")))
120 (t (:reverse-video t)))
121 "Face to use for additionally highlighting Shell commands in Font-Lock mode." 120 "Face to use for additionally highlighting Shell commands in Font-Lock mode."
122 :group 'faces 121 :group 'faces
123 :group 'makefile 122 :group 'makefile
@@ -262,7 +261,7 @@ not be enclosed in { } or ( )."
262;; index in makefile-imenu-generic-expression. 261;; index in makefile-imenu-generic-expression.
263(defvar makefile-dependency-regex 262(defvar makefile-dependency-regex
264 ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d) 263 ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)
265 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" 264 "^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)"
266 "Regex used to find dependency lines in a makefile.") 265 "Regex used to find dependency lines in a makefile.")
267 266
268(defconst makefile-bsdmake-dependency-regex 267(defconst makefile-bsdmake-dependency-regex
@@ -291,7 +290,7 @@ not be enclosed in { } or ( )."
291;; that if you change this regexp you might have to fix the imenu index in 290;; that if you change this regexp you might have to fix the imenu index in
292;; makefile-imenu-generic-expression. 291;; makefile-imenu-generic-expression.
293(defconst makefile-macroassign-regex 292(defconst makefile-macroassign-regex
294 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)" 293 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
295 "Regex used to find macro assignment lines in a makefile.") 294 "Regex used to find macro assignment lines in a makefile.")
296 295
297(defconst makefile-var-use-regex 296(defconst makefile-var-use-regex
@@ -1704,6 +1703,19 @@ matched in a rule action."
1704 (when (save-excursion 1703 (when (save-excursion
1705 (beginning-of-line) 1704 (beginning-of-line)
1706 (looking-at makefile-dependency-regex)) 1705 (looking-at makefile-dependency-regex))
1706 (save-excursion
1707 (let ((deps-end (match-end 1))
1708 (match-data (match-data)))
1709 (goto-char deps-end)
1710 (skip-chars-backward " \t")
1711 (setq deps-end (point))
1712 (beginning-of-line)
1713 (skip-chars-forward " \t")
1714 ;; Alter the bounds recorded for subexp 1,
1715 ;; which is what is supposed to match the targets.
1716 (setcar (nthcdr 2 match-data) (point))
1717 (setcar (nthcdr 3 match-data) deps-end)
1718 (store-match-data match-data)))
1707 (end-of-line) 1719 (end-of-line)
1708 (throw 'found (point))))) 1720 (throw 'found (point)))))
1709 (goto-char pt)) 1721 (goto-char pt))
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 0b2a33f27c0..509a74cf6a5 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -3019,7 +3019,7 @@ Valid values are:
3019 NUMBER It's a real value between 0.0 (black) and 1.0 (white) that 3019 NUMBER It's a real value between 0.0 (black) and 1.0 (white) that
3020 indicate the gray color. 3020 indicate the gray color.
3021 3021
3022 COLOR-NAME It's a string wich contains the color name. For example: 3022 COLOR-NAME It's a string which contains the color name. For example:
3023 \"yellow\". 3023 \"yellow\".
3024 3024
3025 LIST It's a list of RGB values, that is a list of three real values 3025 LIST It's a list of RGB values, that is a list of three real values
@@ -3059,7 +3059,7 @@ Valid values are:
3059 NUMBER It's a real value between 0.0 (black) and 1.0 (white) that 3059 NUMBER It's a real value between 0.0 (black) and 1.0 (white) that
3060 indicate the gray color. 3060 indicate the gray color.
3061 3061
3062 COLOR-NAME It's a string wich contains the color name. For example: 3062 COLOR-NAME It's a string which contains the color name. For example:
3063 \"yellow\". 3063 \"yellow\".
3064 3064
3065 LIST It's a list of RGB values, that is a list of three real values 3065 LIST It's a list of RGB values, that is a list of three real values
@@ -6119,7 +6119,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
6119 (if (and (boundp 'ucs-mule-8859-to-mule-unicode) 6119 (if (and (boundp 'ucs-mule-8859-to-mule-unicode)
6120 (char-table-p ucs-mule-8859-to-mule-unicode)) 6120 (char-table-p ucs-mule-8859-to-mule-unicode))
6121 (map-char-table 6121 (map-char-table
6122 #'(lambda (k v) 6122 #'(lambda (k v)
6123 (if (and v (eq (char-charset v) 'latin-iso8859-1) (/= k v)) 6123 (if (and v (eq (char-charset v) 'latin-iso8859-1) (/= k v))
6124 (aset tbl k v))) 6124 (aset tbl k v)))
6125 ucs-mule-8859-to-mule-unicode)) 6125 ucs-mule-8859-to-mule-unicode))
diff --git a/lisp/replace.el b/lisp/replace.el
index ba3d5fcfbf4..d5ccd8723c2 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -217,7 +217,7 @@ Fourth and fifth arg START and END specify the region to operate on.
217 217
218To customize possible responses, change the \"bindings\" in `query-replace-map'." 218To customize possible responses, change the \"bindings\" in `query-replace-map'."
219 (interactive (let ((common 219 (interactive (let ((common
220 (query-replace-read-args 220 (query-replace-read-args
221 (if (and transient-mark-mode mark-active) 221 (if (and transient-mark-mode mark-active)
222 "Query replace in region" 222 "Query replace in region"
223 "Query replace") 223 "Query replace")
@@ -281,7 +281,7 @@ text, TO-STRING is actually made a list instead of a string.
281Use \\[repeat-complex-command] after this command for details." 281Use \\[repeat-complex-command] after this command for details."
282 (interactive 282 (interactive
283 (let ((common 283 (let ((common
284 (query-replace-read-args 284 (query-replace-read-args
285 (if (and transient-mark-mode mark-active) 285 (if (and transient-mark-mode mark-active)
286 "Query replace regexp in region" 286 "Query replace regexp in region"
287 "Query replace regexp") 287 "Query replace regexp")
@@ -431,7 +431,7 @@ which will run faster and will not set the mark or print anything.
431and TO-STRING is also null.)" 431and TO-STRING is also null.)"
432 (interactive 432 (interactive
433 (let ((common 433 (let ((common
434 (query-replace-read-args 434 (query-replace-read-args
435 (if (and transient-mark-mode mark-active) 435 (if (and transient-mark-mode mark-active)
436 "Replace string in region" 436 "Replace string in region"
437 "Replace string") 437 "Replace string")
@@ -489,10 +489,10 @@ What you probably want is a loop like this:
489which will run faster and will not set the mark or print anything." 489which will run faster and will not set the mark or print anything."
490 (interactive 490 (interactive
491 (let ((common 491 (let ((common
492 (query-replace-read-args 492 (query-replace-read-args
493 (if (and transient-mark-mode mark-active) 493 (if (and transient-mark-mode mark-active)
494 "Replace regexp in region" 494 "Replace regexp in region"
495 "Replace regexp") 495 "Replace regexp")
496 t))) 496 t)))
497 (list (nth 0 common) (nth 1 common) (nth 2 common) 497 (list (nth 0 common) (nth 1 common) (nth 2 common)
498 (if (and transient-mark-mode mark-active) 498 (if (and transient-mark-mode mark-active)
@@ -1268,12 +1268,7 @@ but coerced to the correct value of INTEGERS."
1268 (and (eq new reuse) 1268 (and (eq new reuse)
1269 (eq (null integers) (markerp (car reuse))) 1269 (eq (null integers) (markerp (car reuse)))
1270 new))) 1270 new)))
1271 (match-data integers 1271 (match-data integers reuse t)))
1272 (prog1 reuse
1273 (while reuse
1274 (if (markerp (car reuse))
1275 (set-marker (car reuse) nil))
1276 (setq reuse (cdr reuse)))))))
1277 1272
1278(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) 1273(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data)
1279 "Make a replacement with `replace-match', editing `\\?'. 1274 "Make a replacement with `replace-match', editing `\\?'.
diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el
index 5fb31561c41..84731115d1a 100644
--- a/lisp/rfn-eshadow.el
+++ b/lisp/rfn-eshadow.el
@@ -113,10 +113,7 @@ system, `file-name-shadow-properties' is used instead."
113 :group 'minibuffer) 113 :group 'minibuffer)
114 114
115(defface file-name-shadow 115(defface file-name-shadow
116 '((((background dark)) 116 '((t :inherit shadow))
117 :foreground "grey50")
118 (t
119 :foreground "grey70"))
120 "Face used by `file-name-shadow-mode' for the shadow." 117 "Face used by `file-name-shadow-mode' for the shadow."
121 :group 'minibuffer) 118 :group 'minibuffer)
122 119
diff --git a/lisp/simple.el b/lisp/simple.el
index 016c48924e0..0d71efcf3bc 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3342,10 +3342,15 @@ Outline mode sets this."
3342 (or (memq prop buffer-invisibility-spec) 3342 (or (memq prop buffer-invisibility-spec)
3343 (assq prop buffer-invisibility-spec))))) 3343 (assq prop buffer-invisibility-spec)))))
3344 3344
3345;; Perform vertical scrolling of tall images if necessary. 3345;; This is like line-move-1 except that it also performs
3346;; Don't vscroll in a keyboard macro. 3346;; vertical scrolling of tall images if appropriate.
3347;; That is not really a clean thing to do, since it mixes
3348;; scrolling with cursor motion. But so far we don't have
3349;; a cleaner solution to the problem of making C-n do something
3350;; useful given a tall image.
3347(defun line-move (arg &optional noerror to-end try-vscroll) 3351(defun line-move (arg &optional noerror to-end try-vscroll)
3348 (if (and auto-window-vscroll try-vscroll 3352 (if (and auto-window-vscroll try-vscroll
3353 ;; But don't vscroll in a keyboard macro.
3349 (not defining-kbd-macro) 3354 (not defining-kbd-macro)
3350 (not executing-kbd-macro)) 3355 (not executing-kbd-macro))
3351 (let ((forward (> arg 0)) 3356 (let ((forward (> arg 0))
@@ -3368,6 +3373,8 @@ Outline mode sets this."
3368 ;; Update display before calling pos-visible-in-window-p, 3373 ;; Update display before calling pos-visible-in-window-p,
3369 ;; because it depends on window-start being up-to-date. 3374 ;; because it depends on window-start being up-to-date.
3370 (sit-for 0) 3375 (sit-for 0)
3376 ;; If the current line is partly hidden at the bottom,
3377 ;; scroll it partially up so as to unhide the bottom.
3371 (if (and (setq part (nth 2 (pos-visible-in-window-p 3378 (if (and (setq part (nth 2 (pos-visible-in-window-p
3372 (line-beginning-position) nil t))) 3379 (line-beginning-position) nil t)))
3373 (> (cdr part) 0)) 3380 (> (cdr part) 0))
@@ -4833,7 +4840,11 @@ of the differing parts is, by contrast, slightly highlighted."
4833 (- (point) (minibuffer-prompt-end))))) 4840 (- (point) (minibuffer-prompt-end)))))
4834 ;; Otherwise, in minibuffer, the whole input is being completed. 4841 ;; Otherwise, in minibuffer, the whole input is being completed.
4835 (if (minibufferp mainbuf) 4842 (if (minibufferp mainbuf)
4836 (setq completion-base-size 0))) 4843 (if (and (symbolp minibuffer-completion-table)
4844 (get minibuffer-completion-table 'completion-base-size-function))
4845 (setq completion-base-size
4846 (funcall (get minibuffer-completion-table 'completion-base-size-function)))
4847 (setq completion-base-size 0))))
4837 ;; Put faces on first uncommon characters and common parts. 4848 ;; Put faces on first uncommon characters and common parts.
4838 (when completion-base-size 4849 (when completion-base-size
4839 (let* ((common-string-length 4850 (let* ((common-string-length
diff --git a/lisp/subr.el b/lisp/subr.el
index 2fe94e2a3c5..71d20ba350e 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1970,7 +1970,7 @@ The value returned is the value of the last form in BODY."
1970 '((save-match-data-internal (match-data))) 1970 '((save-match-data-internal (match-data)))
1971 (list 'unwind-protect 1971 (list 'unwind-protect
1972 (cons 'progn body) 1972 (cons 'progn body)
1973 '(set-match-data save-match-data-internal)))) 1973 '(set-match-data save-match-data-internal 'evaporate))))
1974 1974
1975(defun match-string (num &optional string) 1975(defun match-string (num &optional string)
1976 "Return string of text matched by last search. 1976 "Return string of text matched by last search.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 500c9c4e113..0326510f75f 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -228,7 +228,6 @@ http://strw.leidenuniv.nl/~dominik/Tools"
228 :version "21.1" 228 :version "21.1"
229 :type 'boolean) 229 :type 'boolean)
230 230
231;;;###autoload
232(defcustom flyspell-mode-line-string " Fly" 231(defcustom flyspell-mode-line-string " Fly"
233 "*String displayed on the modeline when flyspell is active. 232 "*String displayed on the modeline when flyspell is active.
234Set this to nil if you don't want a modeline indicator." 233Set this to nil if you don't want a modeline indicator."
@@ -268,11 +267,7 @@ If `flyspell-large-region' is nil, all regions are treated as small."
268 :type 'boolean) 267 :type 'boolean)
269 268
270(defcustom flyspell-auto-correct-binding 269(defcustom flyspell-auto-correct-binding
271 (cond 270 [(control ?\;)]
272 ((eq flyspell-emacs 'xemacs)
273 [(control \;)])
274 (t
275 [?\C-\;]))
276 "The key binding for flyspell auto correction." 271 "The key binding for flyspell auto correction."
277 :group 'flyspell) 272 :group 'flyspell)
278 273
@@ -410,10 +405,6 @@ property of the major mode name.")
410;*---------------------------------------------------------------------*/ 405;*---------------------------------------------------------------------*/
411(eval-when-compile (defvar flyspell-local-mouse-map)) 406(eval-when-compile (defvar flyspell-local-mouse-map))
412 407
413;;;###autoload
414(defvar flyspell-mode nil)
415(make-variable-buffer-local 'flyspell-mode)
416
417(defvar flyspell-mouse-map 408(defvar flyspell-mouse-map
418 (let ((map (make-sparse-keymap))) 409 (let ((map (make-sparse-keymap)))
419 (if flyspell-use-meta-tab 410 (if flyspell-use-meta-tab
@@ -425,26 +416,18 @@ property of the major mode name.")
425 (define-key map [(control \.)] 'flyspell-auto-correct-word) 416 (define-key map [(control \.)] 'flyspell-auto-correct-word)
426 map)) 417 map))
427 418
428;;;###autoload 419(defvar flyspell-mode-map
429(defvar flyspell-mode-map (make-sparse-keymap)) 420 (let ((map (make-sparse-keymap)))
430 421 ;; mouse, keyboard bindings and misc definition
431;; mouse, keyboard bindings and misc definition 422 (if flyspell-use-meta-tab
432(when (or (assoc 'flyspell-mode minor-mode-map-alist) 423 (define-key map "\M-\t" 'flyspell-auto-correct-word))
433 (setq minor-mode-map-alist 424 (cond
434 (cons (cons 'flyspell-mode flyspell-mode-map) 425 ;; I don't understand this test, so I left it as is. --Stef
435 minor-mode-map-alist))) 426 ((or (featurep 'xemacs) flyspell-use-local-map)
436 (if flyspell-use-meta-tab 427 (define-key map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
437 (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word)) 428 (define-key map [(control ?\,)] 'flyspell-goto-next-error)
438 (cond 429 (define-key map [(control ?\.)] 'flyspell-auto-correct-word)))
439 ((eq flyspell-emacs 'xemacs) 430 map))
440 (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
441 (define-key flyspell-mode-map [(control \,)] 'flyspell-goto-next-error)
442 (define-key flyspell-mode-map [(control \.)] 'flyspell-auto-correct-word))
443 (flyspell-use-local-map
444 (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
445 (define-key flyspell-mode-map [?\C-\,] 'flyspell-goto-next-error)
446 (define-key flyspell-mode-map [?\C-\.] 'flyspell-auto-correct-word))))
447
448 431
449;; the name of the overlay property that defines the keymap 432;; the name of the overlay property that defines the keymap
450(defvar flyspell-overlay-keymap-property-name 'keymap) 433(defvar flyspell-overlay-keymap-property-name 'keymap)
@@ -462,20 +445,14 @@ property of the major mode name.")
462;* Highlighting */ 445;* Highlighting */
463;*---------------------------------------------------------------------*/ 446;*---------------------------------------------------------------------*/
464(defface flyspell-incorrect-face 447(defface flyspell-incorrect-face
465 (if (eq flyspell-emacs 'xemacs) 448 '((((class color)) (:foreground "OrangeRed" :bold t :underline t))
466 '((((class color)) (:foreground "OrangeRed" :bold t :underline t)) 449 (t (:bold t)))
467 (t (:bold t)))
468 '((((class color)) (:foreground "OrangeRed" :weight bold :underline t))
469 (t (:weight bold))))
470 "Face used for marking a misspelled word in Flyspell." 450 "Face used for marking a misspelled word in Flyspell."
471 :group 'flyspell) 451 :group 'flyspell)
472 452
473(defface flyspell-duplicate-face 453(defface flyspell-duplicate-face
474 (if (eq flyspell-emacs 'xemacs) 454 '((((class color)) (:foreground "Gold3" :bold t :underline t))
475 '((((class color)) (:foreground "Gold3" :bold t :underline t)) 455 (t (:bold t)))
476 (t (:bold t)))
477 '((((class color)) (:foreground "Gold3" :weight bold :underline t))
478 (t (:weight bold))))
479 "Face used for marking a misspelled word that appears twice in the buffer. 456 "Face used for marking a misspelled word that appears twice in the buffer.
480See also `flyspell-duplicate-distance'." 457See also `flyspell-duplicate-distance'."
481 :group 'flyspell) 458 :group 'flyspell)
@@ -486,7 +463,7 @@ See also `flyspell-duplicate-distance'."
486;* flyspell-mode ... */ 463;* flyspell-mode ... */
487;*---------------------------------------------------------------------*/ 464;*---------------------------------------------------------------------*/
488;;;###autoload 465;;;###autoload
489(defun flyspell-mode (&optional arg) 466(define-minor-mode flyspell-mode
490 "Minor mode performing on-the-fly spelling checking. 467 "Minor mode performing on-the-fly spelling checking.
491This spawns a single Ispell process and checks each word. 468This spawns a single Ispell process and checks each word.
492The default flyspell behavior is to highlight incorrect words. 469The default flyspell behavior is to highlight incorrect words.
@@ -514,28 +491,12 @@ in your .emacs file.
514 491
515\\[flyspell-region] checks all words inside a region. 492\\[flyspell-region] checks all words inside a region.
516\\[flyspell-buffer] checks the whole buffer." 493\\[flyspell-buffer] checks the whole buffer."
517 (interactive "P") 494 :lighter flyspell-mode-line-string
518 (let ((old-flyspell-mode flyspell-mode)) 495 :keymap flyspell-mode-map
519 ;; Mark the mode as on or off. 496 :group 'flyspell
520 (setq flyspell-mode (not (or (and (null arg) flyspell-mode) 497 (if flyspell-mode
521 (<= (prefix-numeric-value arg) 0)))) 498 (flyspell-mode-on)
522 ;; Do the real work. 499 (flyspell-mode-off)))
523 (unless (eq flyspell-mode old-flyspell-mode)
524 (if flyspell-mode
525 (flyspell-mode-on)
526 (flyspell-mode-off))
527 ;; Force modeline redisplay.
528 (set-buffer-modified-p (buffer-modified-p)))))
529
530;*---------------------------------------------------------------------*/
531;* Autoloading */
532;*---------------------------------------------------------------------*/
533;;;###autoload
534(add-minor-mode 'flyspell-mode
535 'flyspell-mode-line-string
536 flyspell-mode-map
537 nil
538 'flyspell-mode)
539 500
540;*---------------------------------------------------------------------*/ 501;*---------------------------------------------------------------------*/
541;* flyspell-buffers ... */ 502;* flyspell-buffers ... */
@@ -1057,8 +1018,7 @@ Mostly we check word delimiters."
1057 (cond 1018 (cond
1058 ((and (or (not (eq ispell-parser 'tex)) 1019 ((and (or (not (eq ispell-parser 'tex))
1059 (and (> start (point-min)) 1020 (and (> start (point-min))
1060 (not (eq (char-after (1- start)) ?})) 1021 (not (memq (char-after (1- start)) '(?\} ?\\)))))
1061 (not (eq (char-after (1- start)) ?\\))))
1062 flyspell-mark-duplications-flag 1022 flyspell-mark-duplications-flag
1063 (save-excursion 1023 (save-excursion
1064 (goto-char (1- start)) 1024 (goto-char (1- start))
@@ -1181,20 +1141,21 @@ Mostly we check word delimiters."
1181;* time that function is called. */ 1141;* time that function is called. */
1182;*---------------------------------------------------------------------*/ 1142;*---------------------------------------------------------------------*/
1183(defun flyspell-math-tex-command-p () 1143(defun flyspell-math-tex-command-p ()
1184 (cond 1144 (when (fboundp 'texmathp)
1185 (flyspell-check-tex-math-command 1145 (cond
1186 nil) 1146 (flyspell-check-tex-math-command
1187 ((eq flyspell-tex-math-initialized t) 1147 nil)
1188 (texmathp)) 1148 ((eq flyspell-tex-math-initialized t)
1189 ((eq flyspell-tex-math-initialized 'error) 1149 (texmathp))
1190 nil) 1150 ((eq flyspell-tex-math-initialized 'error)
1191 (t 1151 nil)
1192 (setq flyspell-tex-math-initialized t) 1152 (t
1193 (condition-case nil 1153 (setq flyspell-tex-math-initialized t)
1194 (texmathp) 1154 (condition-case nil
1195 (error (progn 1155 (texmathp)
1196 (setq flyspell-tex-math-initialized 'error) 1156 (error (progn
1197 nil)))))) 1157 (setq flyspell-tex-math-initialized 'error)
1158 nil)))))))
1198 1159
1199;*---------------------------------------------------------------------*/ 1160;*---------------------------------------------------------------------*/
1200;* flyspell-tex-command-p ... */ 1161;* flyspell-tex-command-p ... */
@@ -1381,9 +1342,7 @@ Word syntax described by `flyspell-dictionary-alist' (which see)."
1381 (let ((buffer flyspell-external-ispell-buffer)) 1342 (let ((buffer flyspell-external-ispell-buffer))
1382 (set-buffer buffer) 1343 (set-buffer buffer)
1383 (goto-char (point-min)) 1344 (goto-char (point-min))
1384 (let ((size (- flyspell-large-region-end flyspell-large-region-beg)) 1345 (let ((pword "")
1385 (start flyspell-large-region-beg)
1386 (pword "")
1387 (pcount 1)) 1346 (pcount 1))
1388 ;; now we are done with ispell, we have to find the word in 1347 ;; now we are done with ispell, we have to find the word in
1389 ;; the initial buffer 1348 ;; the initial buffer
@@ -1954,7 +1913,7 @@ The word checked is the word at the mouse position."
1954 (let ((start (car (cdr word))) 1913 (let ((start (car (cdr word)))
1955 (end (car (cdr (cdr word)))) 1914 (end (car (cdr (cdr word))))
1956 (word (car word)) 1915 (word (car word))
1957 poss replace) 1916 poss)
1958 ;; now check spelling of word. 1917 ;; now check spelling of word.
1959 (process-send-string ispell-process "%\n") ;put in verbose mode 1918 (process-send-string ispell-process "%\n") ;put in verbose mode
1960 (process-send-string ispell-process (concat "^" word "\n")) 1919 (process-send-string ispell-process (concat "^" word "\n"))
@@ -1972,89 +1931,65 @@ The word checked is the word at the mouse position."
1972 ((null poss) 1931 ((null poss)
1973 ;; ispell error 1932 ;; ispell error
1974 (error "Ispell: error in Ispell process")) 1933 (error "Ispell: error in Ispell process"))
1975 ((string-match "GNU" (emacs-version)) 1934 ((featurep 'xemacs)
1976 ;; the word is incorrect, we have to propose a replacement
1977 (setq replace (flyspell-emacs-popup event poss word))
1978 (cond ((eq replace 'ignore)
1979 (goto-char save)
1980 nil)
1981 ((eq replace 'save)
1982 (goto-char save)
1983 (process-send-string ispell-process
1984 (concat "*" word "\n"))
1985 (flyspell-unhighlight-at cursor-location)
1986 (setq ispell-pdict-modified-p '(t)))
1987 ((or (eq replace 'buffer) (eq replace 'session))
1988 (process-send-string ispell-process
1989 (concat "@" word "\n"))
1990 (if (null ispell-pdict-modified-p)
1991 (setq ispell-pdict-modified-p
1992 (list ispell-pdict-modified-p)))
1993 (flyspell-unhighlight-at cursor-location)
1994 (goto-char save)
1995 (if (eq replace 'buffer)
1996 (ispell-add-per-file-word-list word)))
1997 (replace
1998 (flyspell-unhighlight-at cursor-location)
1999 (let ((new-word (if (atom replace)
2000 replace
2001 (car replace)))
2002 (cursor-location
2003 (+ (- (length word) (- end start))
2004 cursor-location)))
2005 (if (not (equal new-word (car poss)))
2006 (let ((old-max (point-max)))
2007 (delete-region start end)
2008 (funcall flyspell-insert-function new-word)
2009 (if flyspell-abbrev-p
2010 (flyspell-define-abbrev word new-word))
2011 (flyspell-ajust-cursor-point save
2012 cursor-location
2013 old-max)))))
2014 (t
2015 (goto-char save)
2016 nil)))
2017 ((eq flyspell-emacs 'xemacs)
2018 (flyspell-xemacs-popup 1935 (flyspell-xemacs-popup
2019 event poss word cursor-location start end save) 1936 event poss word cursor-location start end save))
2020 (goto-char save))) 1937 (t
1938 ;; The word is incorrect, we have to propose a replacement.
1939 (flyspell-do-correct (flyspell-emacs-popup event poss word)
1940 poss word cursor-location start end save)))
2021 (ispell-pdict-save t)))))) 1941 (ispell-pdict-save t))))))
2022 1942
2023;*---------------------------------------------------------------------*/ 1943;*---------------------------------------------------------------------*/
2024;* flyspell-xemacs-correct ... */ 1944;* flyspell-do-correct ... */
2025;*---------------------------------------------------------------------*/ 1945;*---------------------------------------------------------------------*/
2026(defun flyspell-xemacs-correct (replace poss word cursor-location start end save) 1946(defun flyspell-do-correct (replace poss word cursor-location start end save)
2027 "The xemacs popup menu callback." 1947 "The popup menu callback."
1948 ;; Originally, the XEmacs code didn't do the (goto-char save) here and did
1949 ;; it instead right after calling the function.
2028 (cond ((eq replace 'ignore) 1950 (cond ((eq replace 'ignore)
1951 (goto-char save)
2029 nil) 1952 nil)
2030 ((eq replace 'save) 1953 ((eq replace 'save)
2031 (process-send-string ispell-process (concat "*" word "\n")) 1954 (goto-char save)
2032 (process-send-string ispell-process "#\n") 1955 (ispell-send-string (concat "*" word "\n"))
1956 ;; This was added only to the XEmacs side in revision 1.18 of
1957 ;; flyspell. I assume its absence on the Emacs side was an
1958 ;; oversight. --Stef
1959 (ispell-send-string "#\n")
2033 (flyspell-unhighlight-at cursor-location) 1960 (flyspell-unhighlight-at cursor-location)
2034 (setq ispell-pdict-modified-p '(t))) 1961 (setq ispell-pdict-modified-p '(t)))
2035 ((or (eq replace 'buffer) (eq replace 'session)) 1962 ((or (eq replace 'buffer) (eq replace 'session))
2036 (process-send-string ispell-process (concat "@" word "\n")) 1963 (ispell-send-string (concat "@" word "\n"))
2037 (flyspell-unhighlight-at cursor-location) 1964 (flyspell-unhighlight-at cursor-location)
2038 (if (null ispell-pdict-modified-p) 1965 (if (null ispell-pdict-modified-p)
2039 (setq ispell-pdict-modified-p 1966 (setq ispell-pdict-modified-p
2040 (list ispell-pdict-modified-p))) 1967 (list ispell-pdict-modified-p)))
1968 (goto-char save)
2041 (if (eq replace 'buffer) 1969 (if (eq replace 'buffer)
2042 (ispell-add-per-file-word-list word))) 1970 (ispell-add-per-file-word-list word)))
2043 (replace 1971 (replace
1972 ;; This was added only to the Emacs side. I assume its absence on
1973 ;; the XEmacs side was an oversight. --Stef
1974 (flyspell-unhighlight-at cursor-location)
2044 (let ((old-max (point-max)) 1975 (let ((old-max (point-max))
2045 (new-word (if (atom replace) 1976 (new-word (if (atom replace)
2046 replace 1977 replace
2047 (car replace))) 1978 (car replace)))
2048 (cursor-location (+ (- (length word) (- end start)) 1979 (cursor-location (+ (- (length word) (- end start))
2049 cursor-location))) 1980 cursor-location)))
2050 (if (not (equal new-word (car poss))) 1981 (unless (equal new-word (car poss))
2051 (progn 1982 (delete-region start end)
2052 (delete-region start end) 1983 (goto-char start)
2053 (goto-char start) 1984 (funcall flyspell-insert-function new-word)
2054 (funcall flyspell-insert-function new-word) 1985 (if flyspell-abbrev-p
2055 (if flyspell-abbrev-p 1986 (flyspell-define-abbrev word new-word)))
2056 (flyspell-define-abbrev word new-word)))) 1987 ;; In the original Emacs code, this was only called in the body
2057 (flyspell-ajust-cursor-point save cursor-location old-max))))) 1988 ;; of the if. I arbitrarily kept the XEmacs behavior instead.
1989 (flyspell-ajust-cursor-point save cursor-location old-max)))
1990 (t
1991 (goto-char save)
1992 nil)))
2058 1993
2059;*---------------------------------------------------------------------*/ 1994;*---------------------------------------------------------------------*/
2060;* flyspell-ajust-cursor-point ... */ 1995;* flyspell-ajust-cursor-point ... */
@@ -2123,7 +2058,7 @@ The word checked is the word at the mouse position."
2123 (cor-menu (if (consp corrects) 2058 (cor-menu (if (consp corrects)
2124 (mapcar (lambda (correct) 2059 (mapcar (lambda (correct)
2125 (vector correct 2060 (vector correct
2126 (list 'flyspell-xemacs-correct 2061 (list 'flyspell-do-correct
2127 correct 2062 correct
2128 (list 'quote poss) 2063 (list 'quote poss)
2129 word 2064 word
@@ -2138,7 +2073,7 @@ The word checked is the word at the mouse position."
2138 (menu (let ((save (if (consp affix) 2073 (menu (let ((save (if (consp affix)
2139 (vector 2074 (vector
2140 (concat "Save affix: " (car affix)) 2075 (concat "Save affix: " (car affix))
2141 (list 'flyspell-xemacs-correct 2076 (list 'flyspell-do-correct
2142 ''save 2077 ''save
2143 (list 'quote poss) 2078 (list 'quote poss)
2144 word 2079 word
@@ -2149,7 +2084,7 @@ The word checked is the word at the mouse position."
2149 t) 2084 t)
2150 (vector 2085 (vector
2151 "Save word" 2086 "Save word"
2152 (list 'flyspell-xemacs-correct 2087 (list 'flyspell-do-correct
2153 ''save 2088 ''save
2154 (list 'quote poss) 2089 (list 'quote poss)
2155 word 2090 word
@@ -2159,7 +2094,7 @@ The word checked is the word at the mouse position."
2159 save) 2094 save)
2160 t))) 2095 t)))
2161 (session (vector "Accept (session)" 2096 (session (vector "Accept (session)"
2162 (list 'flyspell-xemacs-correct 2097 (list 'flyspell-do-correct
2163 ''session 2098 ''session
2164 (list 'quote poss) 2099 (list 'quote poss)
2165 word 2100 word
@@ -2169,7 +2104,7 @@ The word checked is the word at the mouse position."
2169 save) 2104 save)
2170 t)) 2105 t))
2171 (buffer (vector "Accept (buffer)" 2106 (buffer (vector "Accept (buffer)"
2172 (list 'flyspell-xemacs-correct 2107 (list 'flyspell-do-correct
2173 ''buffer 2108 ''buffer
2174 (list 'quote poss) 2109 (list 'quote poss)
2175 word 2110 word
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 6aff0a731c7..5b0542edaf2 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -796,19 +796,16 @@ Otherwise returns the library directory name, if that is defined."
796 nil t) 796 nil t)
797 case-fold-search case-fold-search-val) 797 case-fold-search case-fold-search-val)
798 (if (or (not status) ; major version mismatch 798 (if (or (not status) ; major version mismatch
799 (< (car (read-from-string (buffer-substring-no-properties 799 (< (car (read-from-string (match-string-no-properties 2)))
800 (match-beginning 2) (match-end 2))))
801 (car (cdr ispell-required-version)))) ; minor version mismatch 800 (car (cdr ispell-required-version)))) ; minor version mismatch
802 (error "%s version 3 release %d.%d.%d or greater is required" 801 (error "%s version 3 release %d.%d.%d or greater is required"
803 ispell-program-name (car ispell-required-version) 802 ispell-program-name (car ispell-required-version)
804 (car (cdr ispell-required-version)) 803 (car (cdr ispell-required-version))
805 (car (cdr (cdr ispell-required-version)))) 804 (car (cdr (cdr ispell-required-version))))
806 ;; check that it is the correct version. 805 ;; check that it is the correct version.
807 (if (and (= (car (read-from-string (buffer-substring-no-properties 806 (if (and (= (car (read-from-string (match-string-no-properties 2)))
808 (match-beginning 2)(match-end 2))))
809 (car (cdr ispell-required-version))) 807 (car (cdr ispell-required-version)))
810 (< (car (read-from-string (buffer-substring-no-properties 808 (< (car (read-from-string (match-string-no-properties 3)))
811 (match-beginning 3)(match-end 3))))
812 (car (cdr (cdr ispell-required-version))))) 809 (car (cdr (cdr ispell-required-version)))))
813 (setq ispell-offset 0)) 810 (setq ispell-offset 0))
814 ;; Check to see if it's really aspell. 811 ;; Check to see if it's really aspell.
@@ -2537,9 +2534,7 @@ Return nil if spell session is quit,
2537 (ispell-begin-skip-region-regexp) 2534 (ispell-begin-skip-region-regexp)
2538 ispell-region-end t)) 2535 ispell-region-end t))
2539 (progn 2536 (progn
2540 (setq key (buffer-substring-no-properties 2537 (setq key (match-string-no-properties 0))
2541 (car (match-data))
2542 (car (cdr (match-data)))))
2543 (set-marker skip-region-start 2538 (set-marker skip-region-start
2544 (- (point) (length key))) 2539 (- (point) (length key)))
2545 (goto-char rstart)) 2540 (goto-char rstart))
@@ -3480,8 +3475,7 @@ Includes Latex/Nroff modes and extended character mode."
3480 (search-forward ispell-parsing-keyword) 3475 (search-forward ispell-parsing-keyword)
3481 (while (re-search-forward " *\\([^ \"]+\\)" end t) 3476 (while (re-search-forward " *\\([^ \"]+\\)" end t)
3482 ;; space separated definitions. 3477 ;; space separated definitions.
3483 (setq string (downcase (buffer-substring-no-properties 3478 (setq string (downcase (match-string-no-properties 1)))
3484 (match-beginning 1) (match-end 1))))
3485 (cond ((and (string-match "latex-mode" string) 3479 (cond ((and (string-match "latex-mode" string)
3486 (not (eq 'exclusive ispell-check-comments))) 3480 (not (eq 'exclusive ispell-check-comments)))
3487 (ispell-send-string "+\n~tex\n")) 3481 (ispell-send-string "+\n~tex\n"))
@@ -3514,8 +3508,7 @@ Both should not be used to define a buffer-local dictionary."
3514 (setq end (save-excursion (end-of-line) (point))) 3508 (setq end (save-excursion (end-of-line) (point)))
3515 (if (re-search-forward " *\\([^ \"]+\\)" end t) 3509 (if (re-search-forward " *\\([^ \"]+\\)" end t)
3516 (setq ispell-local-dictionary 3510 (setq ispell-local-dictionary
3517 (buffer-substring-no-properties (match-beginning 1) 3511 (match-string-no-properties 1))))))
3518 (match-end 1)))))))
3519 (goto-char (point-max)) 3512 (goto-char (point-max))
3520 (if (search-backward ispell-pdict-keyword nil t) 3513 (if (search-backward ispell-pdict-keyword nil t)
3521 (progn 3514 (progn
@@ -3523,8 +3516,7 @@ Both should not be used to define a buffer-local dictionary."
3523 (setq end (save-excursion (end-of-line) (point))) 3516 (setq end (save-excursion (end-of-line) (point)))
3524 (if (re-search-forward " *\\([^ \"]+\\)" end t) 3517 (if (re-search-forward " *\\([^ \"]+\\)" end t)
3525 (setq ispell-local-pdict 3518 (setq ispell-local-pdict
3526 (buffer-substring-no-properties (match-beginning 1) 3519 (match-string-no-properties 1)))))))
3527 (match-end 1))))))))
3528 ;; Reload if new personal dictionary defined. 3520 ;; Reload if new personal dictionary defined.
3529 (if (and ispell-local-pdict 3521 (if (and ispell-local-pdict
3530 (not (equal ispell-local-pdict ispell-personal-dictionary))) 3522 (not (equal ispell-local-pdict ispell-personal-dictionary)))
@@ -3554,8 +3546,7 @@ Both should not be used to define a buffer-local dictionary."
3554 ;; buffer-local words separated by a space, and can contain 3546 ;; buffer-local words separated by a space, and can contain
3555 ;; any character other than a space. Not rigorous enough. 3547 ;; any character other than a space. Not rigorous enough.
3556 (while (re-search-forward " *\\([^ ]+\\)" end t) 3548 (while (re-search-forward " *\\([^ ]+\\)" end t)
3557 (setq string (buffer-substring-no-properties (match-beginning 1) 3549 (setq string (match-string-no-properties 1))
3558 (match-end 1)))
3559 ;; This can fail when string contains a word with illegal chars. 3550 ;; This can fail when string contains a word with illegal chars.
3560 ;; Error handling needs to be added between ispell and emacs. 3551 ;; Error handling needs to be added between ispell and emacs.
3561 (if (and (< 1 (length string)) 3552 (if (and (< 1 (length string))
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index bbc59768aaf..d13a7514c16 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -154,8 +154,6 @@
154(require 'outline) 154(require 'outline)
155(require 'time-date) 155(require 'time-date)
156(require 'easymenu) 156(require 'easymenu)
157(or (fboundp 'run-mode-hooks)
158 (defalias 'run-mode-hooks 'run-hooks))
159 157
160;;; Customization variables 158;;; Customization variables
161 159
@@ -384,6 +382,12 @@ or contain a special line
384If the file does not specify a category, then file's base name 382If the file does not specify a category, then file's base name
385is used instead.") 383is used instead.")
386 384
385(defun org-run-mode-hooks (&rest hooks)
386 "Call `run-mode-hooks' if it is available; otherwise call `run-hooks'."
387 (if (fboundp 'run-mode-hooks)
388 (apply 'run-mode-hooks hooks)
389 (apply 'run-hooks hooks)))
390
387(defun org-set-regexps-and-options () 391(defun org-set-regexps-and-options ()
388 "Precompute regular expressions for current buffer." 392 "Precompute regular expressions for current buffer."
389 (when (eq major-mode 'org-mode) 393 (when (eq major-mode 'org-mode)
@@ -3118,7 +3122,7 @@ The following commands are available:
3118 "--") 3122 "--")
3119 (mapcar 'org-file-menu-entry org-agenda-files))) 3123 (mapcar 'org-file-menu-entry org-agenda-files)))
3120 (org-agenda-set-mode-name) 3124 (org-agenda-set-mode-name)
3121 (run-mode-hooks 'org-agenda-mode-hook)) 3125 (org-run-mode-hooks 'org-agenda-mode-hook))
3122 3126
3123(define-key org-agenda-mode-map [(tab)] 'org-agenda-goto) 3127(define-key org-agenda-mode-map [(tab)] 'org-agenda-goto)
3124(define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to) 3128(define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to)
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 3b5bab5b4dc..91f714af9d9 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -795,7 +795,7 @@ Inherits `shell-mode-map' with a few additions.")
795 (regexp-opt '("documentstyle" "documentclass" 795 (regexp-opt '("documentstyle" "documentclass"
796 "begin" "subsection" "section" 796 "begin" "subsection" "section"
797 "part" "chapter" "newcommand" 797 "part" "chapter" "newcommand"
798 "renewcommand") 'words) 798 "renewcommand" "RequirePackage") 'words)
799 "\\|NeedsTeXFormat{LaTeX"))) 799 "\\|NeedsTeXFormat{LaTeX")))
800 (if (and (looking-at 800 (if (and (looking-at
801 "document\\(style\\|class\\)\\(\\[.*\\]\\)?{slides}") 801 "document\\(style\\|class\\)\\(\\[.*\\]\\)?{slides}")
@@ -1639,9 +1639,12 @@ If NOT-ALL is non-nil, save the `.dvi' file."
1639 " " (if (< 0 (length tex-start-commands)) 1639 " " (if (< 0 (length tex-start-commands))
1640 (shell-quote-argument tex-start-commands)) " %f") 1640 (shell-quote-argument tex-start-commands)) " %f")
1641 t "%r.dvi") 1641 t "%r.dvi")
1642 ("yap %r &" "%r.dvi")
1643 ("xdvi %r &" "%r.dvi") 1642 ("xdvi %r &" "%r.dvi")
1643 ("xpdf %r.pdf &" "%r.pdf")
1644 ("gv %r.ps &" "%r.ps")
1645 ("yap %r &" "%r.dvi")
1644 ("advi %r &" "%r.dvi") 1646 ("advi %r &" "%r.dvi")
1647 ("gv %r.pdf &" "%r.pdf")
1645 ("bibtex %r" "%r.aux" "%r.bbl") 1648 ("bibtex %r" "%r.aux" "%r.bbl")
1646 ("makeindex %r" "%r.idx" "%r.ind") 1649 ("makeindex %r" "%r.idx" "%r.ind")
1647 ("texindex %r.??") 1650 ("texindex %r.??")
@@ -1649,9 +1652,6 @@ If NOT-ALL is non-nil, save the `.dvi' file."
1649 ("dvipdf %r" "%r.dvi" "%r.pdf") 1652 ("dvipdf %r" "%r.dvi" "%r.pdf")
1650 ("dvips -o %r.ps %r" "%r.dvi" "%r.ps") 1653 ("dvips -o %r.ps %r" "%r.dvi" "%r.ps")
1651 ("ps2pdf %r.ps" "%r.ps" "%r.pdf") 1654 ("ps2pdf %r.ps" "%r.ps" "%r.pdf")
1652 ("gv %r.ps &" "%r.ps")
1653 ("gv %r.pdf &" "%r.pdf")
1654 ("xpdf %r.pdf &" "%r.pdf")
1655 ("lpr %r.ps" "%r.ps")) 1655 ("lpr %r.ps" "%r.ps"))
1656 "List of commands for `tex-compile'. 1656 "List of commands for `tex-compile'.
1657Each element should be of the form (FORMAT IN OUT) where 1657Each element should be of the form (FORMAT IN OUT) where
@@ -1830,8 +1830,7 @@ FILE is typically the output DVI or PDF file."
1830 (push cmd cmds) 1830 (push cmd cmds)
1831 (push (nth 1 cmd) unchanged-in)))) 1831 (push (nth 1 cmd) unchanged-in))))
1832 ;; If no command seems to be applicable, arbitrarily pick the first one. 1832 ;; If no command seems to be applicable, arbitrarily pick the first one.
1833 (unless cmds 1833 (setq cmds (if cmds (nreverse cmds) (list (car tex-compile-commands))))
1834 (setq cmds (list (car tex-compile-commands))))
1835 ;; Remove those commands whose input was considered stable for 1834 ;; Remove those commands whose input was considered stable for
1836 ;; some other command (typically if (t . "%.pdf") is inactive 1835 ;; some other command (typically if (t . "%.pdf") is inactive
1837 ;; then we're using pdflatex and the fact that the dvi file 1836 ;; then we're using pdflatex and the fact that the dvi file
@@ -1841,7 +1840,7 @@ FILE is typically the output DVI or PDF file."
1841 (unless (member (nth 1 cmd) unchanged-in) 1840 (unless (member (nth 1 cmd) unchanged-in)
1842 (push cmd tmp))) 1841 (push cmd tmp)))
1843 ;; Only remove if there's something left. 1842 ;; Only remove if there's something left.
1844 (if tmp (setq cmds tmp))) 1843 (if tmp (setq cmds (nreverse tmp))))
1845 ;; Remove commands whose input is not uptodate either. 1844 ;; Remove commands whose input is not uptodate either.
1846 (let ((outs (delq nil (mapcar (lambda (x) (nth 2 x)) cmds))) 1845 (let ((outs (delq nil (mapcar (lambda (x) (nth 2 x)) cmds)))
1847 (tmp nil)) 1846 (tmp nil))
@@ -1849,7 +1848,7 @@ FILE is typically the output DVI or PDF file."
1849 (unless (member (nth 1 cmd) outs) 1848 (unless (member (nth 1 cmd) outs)
1850 (push cmd tmp))) 1849 (push cmd tmp)))
1851 ;; Only remove if there's something left. 1850 ;; Only remove if there's something left.
1852 (if tmp (setq cmds tmp))) 1851 (if tmp (setq cmds (nreverse tmp))))
1853 ;; Select which file we're going to operate on (the latest). 1852 ;; Select which file we're going to operate on (the latest).
1854 (let ((latest (nth 1 (car cmds)))) 1853 (let ((latest (nth 1 (car cmds))))
1855 (dolist (cmd (prog1 (cdr cmds) (setq cmds (list (car cmds))))) 1854 (dolist (cmd (prog1 (cdr cmds) (setq cmds (list (car cmds)))))
diff --git a/lisp/thumbs.el b/lisp/thumbs.el
index 321fe7266cc..0fa44a3b8ee 100644
--- a/lisp/thumbs.el
+++ b/lisp/thumbs.el
@@ -65,8 +65,7 @@
65 :version "22.1" 65 :version "22.1"
66 :group 'multimedia) 66 :group 'multimedia)
67 67
68(defcustom thumbs-thumbsdir 68(defcustom thumbs-thumbsdir "~/.emacs-thumbs"
69 (expand-file-name "~/.emacs-thumbs")
70 "*Directory to store thumbnails." 69 "*Directory to store thumbnails."
71 :type 'directory 70 :type 'directory
72 :group 'thumbs) 71 :group 'thumbs)
@@ -83,12 +82,12 @@
83 82
84(defcustom thumbs-thumbsdir-max-size 50000000 83(defcustom thumbs-thumbsdir-max-size 50000000
85 "Max size for thumbnails directory. 84 "Max size for thumbnails directory.
86When it reachs that size (in bytes), a warning is sent." 85When it reaches that size (in bytes), a warning is sent."
87 :type 'string 86 :type 'string
88 :group 'thumbs) 87 :group 'thumbs)
89 88
90(defcustom thumbs-conversion-program 89(defcustom thumbs-conversion-program
91 (if (equal 'windows-nt system-type) 90 (if (eq system-type 'windows-nt)
92 "convert.exe" 91 "convert.exe"
93 (or (executable-find "convert") 92 (or (executable-find "convert")
94 "/usr/X11R6/bin/convert")) 93 "/usr/X11R6/bin/convert"))
@@ -117,20 +116,19 @@ This is where you see the cursor."
117(defcustom thumbs-thumbsdir-auto-clean t 116(defcustom thumbs-thumbsdir-auto-clean t
118 "If set, delete older file in the thumbnails directory. 117 "If set, delete older file in the thumbnails directory.
119Deletion is done at load time when the directory size is bigger 118Deletion is done at load time when the directory size is bigger
120than 'thumbs-thumbsdir-max-size'." 119than `thumbs-thumbsdir-max-size'."
121 :type 'boolean 120 :type 'boolean
122 :group 'thumbs) 121 :group 'thumbs)
123 122
124(defcustom thumbs-image-resizing-step 10 123(defcustom thumbs-image-resizing-step 10
125 "Step by wich to resize image." 124 "Step by which to resize image."
126 :type 'string 125 :type 'string
127 :group 'thumbs) 126 :group 'thumbs)
128 127
129(defcustom thumbs-temp-dir 128(defcustom thumbs-temp-dir temporary-file-directory
130 "/tmp/"
131 "Temporary directory to use. 129 "Temporary directory to use.
132Leaving it to default '/tmp/' can let another user 130Defaults to `temporary-file-directory'. Leaving it to
133see some of your images." 131this value can let another user see some of your images."
134 :type 'directory 132 :type 'directory
135 :group 'thumbs) 133 :group 'thumbs)
136 134
@@ -140,10 +138,6 @@ see some of your images."
140 :group 'thumbs) 138 :group 'thumbs)
141 139
142;; Initialize some variable, for later use. 140;; Initialize some variable, for later use.
143(defvar thumbs-temp-file
144 (concat thumbs-temp-dir thumbs-temp-prefix)
145 "Temporary filename for images.")
146
147(defvar thumbs-current-tmp-filename 141(defvar thumbs-current-tmp-filename
148 nil 142 nil
149 "Temporary filename of current image.") 143 "Temporary filename of current image.")
@@ -163,28 +157,36 @@ see some of your images."
163 nil 157 nil
164 "List of marked files.") 158 "List of marked files.")
165 159
166;; Make sure auto-image-file-mode is ON. 160(defalias 'thumbs-gensym
167(auto-image-file-mode t) 161 (if (fboundp 'gensym)
168 162 'gensym
169;; Create the thumbs directory if it does not exists. 163 ;; Copied from cl-macs.el
170(setq thumbs-thumbsdir (expand-file-name thumbs-thumbsdir)) 164 (defvar thumbs-gensym-counter 0)
171 165 (lambda (&optional prefix)
172(when (not (file-directory-p thumbs-thumbsdir)) 166 "Generate a new uninterned symbol.
173 (progn 167The name is made by appending a number to PREFIX, default \"G\"."
174 (make-directory thumbs-thumbsdir) 168 (let ((pfix (if (stringp prefix) prefix "G"))
175 (message "Creating thumbnails directory"))) 169 (num (if (integerp prefix) prefix
176 170 (prog1 thumbs-gensym-counter
177(defvar thumbs-gensym-counter 0) 171 (setq thumbs-gensym-counter
178 172 (1+ thumbs-gensym-counter))))))
179(defun thumbs-gensym (&optional arg) 173 (make-symbol (format "%s%d" pfix num))))))
180 "Generate a new uninterned symbol. 174
181The name is made by appending a number to PREFIX, default \"Thumbs\"." 175(defun thumbs-temp-file ()
182 (let ((prefix (if (stringp arg) arg "Thumbs")) 176 "Return a unique temporary filename for an image."
183 (num (if (integerp arg) arg 177 (format "%s%s-%s.jpg"
184 (prog1 178 (expand-file-name thumbs-temp-dir)
185 thumbs-gensym-counter 179 thumbs-temp-prefix
186 (setq thumbs-gensym-counter (1+ thumbs-gensym-counter)))))) 180 (thumbs-gensym "T")))
187 (make-symbol (format "%s%d" prefix num)))) 181
182(defun thumbs-thumbsdir ()
183 "Return the current thumbnails directory (from `thumbs-thumbsdir').
184Create the thumbnails directory if it does not exist."
185 (let ((thumbs-thumbsdir (expand-file-name thumbs-thumbsdir)))
186 (unless (file-directory-p thumbs-thumbsdir)
187 (make-directory thumbs-thumbsdir)
188 (message "Creating thumbnails directory"))
189 thumbs-thumbsdir))
188 190
189(defun thumbs-cleanup-thumbsdir () 191(defun thumbs-cleanup-thumbsdir ()
190 "Clean the thumbnails directory. 192 "Clean the thumbnails directory.
@@ -197,8 +199,8 @@ reached."
197 (lambda (f) 199 (lambda (f)
198 (let ((fattribsL (file-attributes f))) 200 (let ((fattribsL (file-attributes f)))
199 `(,(nth 4 fattribsL) ,(nth 7 fattribsL) ,f))) 201 `(,(nth 4 fattribsL) ,(nth 7 fattribsL) ,f)))
200 (directory-files thumbs-thumbsdir t (image-file-name-regexp))) 202 (directory-files (thumbs-thumbsdir) t (image-file-name-regexp)))
201 '(lambda (l1 l2) (time-less-p (car l1)(car l2))))) 203 '(lambda (l1 l2) (time-less-p (car l1) (car l2)))))
202 (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) filesL)))) 204 (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) filesL))))
203 (while (> dirsize thumbs-thumbsdir-max-size) 205 (while (> dirsize thumbs-thumbsdir-max-size)
204 (progn 206 (progn
@@ -258,7 +260,7 @@ ACTION-PREFIX is the symbol to place before the ACTION command
258 260
259(defun thumbs-resize-image (&optional increment size) 261(defun thumbs-resize-image (&optional increment size)
260 "Resize image in current buffer. 262 "Resize image in current buffer.
261if INCREMENT is set, make the image bigger, else smaller. 263If INCREMENT is set, make the image bigger, else smaller.
262Or, alternatively, a SIZE may be specified." 264Or, alternatively, a SIZE may be specified."
263 (interactive) 265 (interactive)
264 ;; cleaning of old temp file 266 ;; cleaning of old temp file
@@ -276,7 +278,7 @@ Or, alternatively, a SIZE may be specified."
276 thumbs-current-image-size) 278 thumbs-current-image-size)
277 (thumbs-decrement-image-size 279 (thumbs-decrement-image-size
278 thumbs-current-image-size)))) 280 thumbs-current-image-size))))
279 (tmp (format "%s%s.jpg" thumbs-temp-file (thumbs-gensym)))) 281 (tmp (thumbs-temp-file)))
280 (erase-buffer) 282 (erase-buffer)
281 (thumbs-call-convert thumbs-current-image-filename 283 (thumbs-call-convert thumbs-current-image-filename
282 tmp "sample" 284 tmp "sample"
@@ -286,7 +288,7 @@ Or, alternatively, a SIZE may be specified."
286 (setq thumbs-current-tmp-filename tmp))) 288 (setq thumbs-current-tmp-filename tmp)))
287 289
288(defun thumbs-resize-interactive (width height) 290(defun thumbs-resize-interactive (width height)
289 "Resize Image interactively to specified WIDTH and HEIGHT." 291 "Resize image interactively to specified WIDTH and HEIGHT."
290 (interactive "nWidth: \nnHeight: ") 292 (interactive "nWidth: \nnHeight: ")
291 (thumbs-resize-image nil (cons width height))) 293 (thumbs-resize-image nil (cons width height)))
292 294
@@ -305,7 +307,7 @@ Or, alternatively, a SIZE may be specified."
305 (convert-standard-filename 307 (convert-standard-filename
306 (let ((filename (expand-file-name img))) 308 (let ((filename (expand-file-name img)))
307 (format "%s/%08x-%s.jpg" 309 (format "%s/%08x-%s.jpg"
308 thumbs-thumbsdir 310 (thumbs-thumbsdir)
309 (sxhash filename) 311 (sxhash filename)
310 (subst-char-in-string 312 (subst-char-in-string
311 ?\s ?\_ 313 ?\s ?\_
@@ -562,11 +564,7 @@ Open another window."
562(defun thumbs-kill-buffer () 564(defun thumbs-kill-buffer ()
563 "Kill the current buffer." 565 "Kill the current buffer."
564 (interactive) 566 (interactive)
565 (let ((buffer (current-buffer))) 567 (quit-window t (selected-window)))
566 (condition-case nil
567 (delete-window (selected-window))
568 (error nil))
569 (kill-buffer buffer)))
570 568
571(defun thumbs-show-image-num (num) 569(defun thumbs-show-image-num (num)
572 "Show the image with number NUM." 570 "Show the image with number NUM."
@@ -643,7 +641,7 @@ ACTION and ARG should be a valid convert command."
643 t 641 t
644 thumbs-temp-prefix)) 642 thumbs-temp-prefix))
645 (let ((buffer-read-only nil) 643 (let ((buffer-read-only nil)
646 (tmp (format "%s%s.jpg" thumbs-temp-file (thumbs-gensym)))) 644 (tmp (thumbs-temp-file)))
647 (erase-buffer) 645 (erase-buffer)
648 (thumbs-call-convert thumbs-current-image-filename 646 (thumbs-call-convert thumbs-current-image-filename
649 tmp 647 tmp
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 51e04941730..aa47012c642 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -133,9 +133,8 @@ specify nil for this variable."
133 :type '(choice integer (const nil)) 133 :type '(choice integer (const nil))
134 :group 'tmm) 134 :group 'tmm)
135 135
136(require 'font-lock) 136(defface tmm-inactive
137(defface tmm-inactive-face 137 '((t :inherit shadow))
138 '((t :inherit font-lock-comment-face))
139 "Face used for inactive menu items." 138 "Face used for inactive menu items."
140 :group 'tmm) 139 :group 'tmm)
141 140
@@ -350,7 +349,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
350 (setq next (next-single-char-property-change (point) 'mouse-face)) 349 (setq next (next-single-char-property-change (point) 'mouse-face))
351 (when (looking-at inactive-string) 350 (when (looking-at inactive-string)
352 (remove-text-properties (point) next '(mouse-face)) 351 (remove-text-properties (point) next '(mouse-face))
353 (add-text-properties (point) next '(face tmm-inactive-face))) 352 (add-text-properties (point) next '(face tmm-inactive)))
354 (goto-char next))) 353 (goto-char next)))
355 (set-buffer-modified-p nil))) 354 (set-buffer-modified-p nil)))
356 355