aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2005-03-16 16:06:15 +0000
committerKaroly Lorentey2005-03-16 16:06:15 +0000
commit14c0ac78c48e6bdf832e370ef15ecbef6573dd06 (patch)
treeae0aa5371351ec1a2d0bdf7c55e60b8df4b0063c /lisp
parent38d2de214077b4e600d9f9d20d7ec81e1f1c8908 (diff)
parenta7679889e8213289331577d1d9e6d1187a20d035 (diff)
downloademacs-14c0ac78c48e6bdf832e370ef15ecbef6573dd06.tar.gz
emacs-14c0ac78c48e6bdf832e370ef15ecbef6573dd06.zip
Merged from miles@gnu.org--gnu-2005 (patch 37-38, 162-182)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-162 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-163 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-164 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-165 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-166 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-167 Tweak obsolete function/variable warning message * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-168 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-169 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-170 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-171 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-172 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-173 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-174 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-175 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-176 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-177 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-178 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-179 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-180 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-181 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-182 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-37 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-38 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-309
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog270
-rw-r--r--lisp/align.el31
-rw-r--r--lisp/bindings.el3
-rw-r--r--lisp/calc/calc-embed.el20
-rw-r--r--lisp/calc/calc.el14
-rw-r--r--lisp/calendar/calendar.el99
-rw-r--r--lisp/calendar/diary-lib.el9
-rw-r--r--lisp/emacs-lisp/byte-run.el42
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
-rw-r--r--lisp/emacs-lisp/debug.el77
-rw-r--r--lisp/facemenu.el24
-rw-r--r--lisp/faces.el3
-rw-r--r--lisp/generic.el5
-rw-r--r--lisp/gnus/ChangeLog24
-rw-r--r--lisp/gnus/nnimap.el2
-rw-r--r--lisp/help.el42
-rw-r--r--lisp/image-file.el1
-rw-r--r--lisp/info.el53
-rw-r--r--lisp/international/ccl.el4
-rw-r--r--lisp/international/latin-1.el5
-rw-r--r--lisp/international/mule-cmds.el213
-rw-r--r--lisp/international/mule.el2
-rw-r--r--lisp/international/utf-16.el4
-rw-r--r--lisp/isearch.el100
-rw-r--r--lisp/net/browse-url.el5
-rw-r--r--lisp/pcvs-util.el6
-rw-r--r--lisp/pcvs.el2
-rw-r--r--lisp/play/animate.el6
-rw-r--r--lisp/progmodes/dcl-mode.el4
-rw-r--r--lisp/progmodes/gdb-ui.el11
-rw-r--r--lisp/simple.el26
-rw-r--r--lisp/subr.el21
-rw-r--r--lisp/term/mac-win.el23
-rw-r--r--lisp/textmodes/fill.el8
-rw-r--r--lisp/textmodes/ispell.el14
-rw-r--r--lisp/textmodes/sgml-mode.el41
-rw-r--r--lisp/tooltip.el71
37 files changed, 847 insertions, 444 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index df930a970d7..3ce47461c4c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,270 @@
12005-03-15 Juri Linkov <juri@jurta.org>
2
3 * isearch.el (isearch-error): New variable.
4 (isearch-invalid-regexp, isearch-within-brackets): Remove.
5 (isearch-error-state): Renamed from `isearch-invalid-regexp-state'.
6 (isearch-within-brackets-state): Remove.
7 (isearch-case-fold-search-state, isearch-pop-fun-state):
8 Decrease frame index.
9 (isearch-mode, isearch-top-state, isearch-push-state)
10 (isearch-edit-string, isearch-abort, isearch-search-and-update)
11 (isearch-fallback, isearch-message-prefix, isearch-message-suffix)
12 (isearch-search, isearch-lazy-highlight-new-loop):
13 Replace `isearch-invalid-regexp' with `isearch-error'.
14 Remove `isearch-within-brackets'.
15 (isearch-search): Add `search-failed' handler to `condition-case'.
16 (isearch-lazy-highlight-search): Add `condition-case' to catch
17 errors and allow `isearch-lazy-highlight-update' to try
18 highlighting from the beginning of the window.
19 (isearch-repeat): Move up code to set isearch-wrapped to t
20 before calling isearch-wrap-function.
21
22 * info.el (Info-isearch-initial-node): New internal variable.
23 (Info-search): Signal an error in isearch mode when search leaves
24 the initial node. Signal an error when `bound' is non-nil and
25 nothing was found in the current subfile.
26 (Info-isearch-search): Remove `condition-case'.
27 (Info-isearch-wrap): Don't wrap when search failed during leaving
28 the initial node. If `Info-isearch-search' is nil, wrap around
29 the current node.
30 (Info-isearch-start): New fun.
31 (Info-mode): Add buffer-local hook `Info-isearch-start' to
32 `isearch-mode-hook'.
33
342005-03-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
35
36 * simple.el (normal-erase-is-backspace): Set default to t if
37 running on Mac.
38
39 * term/mac-win.el (function-key-map): Sync with x-win.el.
40
412005-03-15 Kenichi Handa <handa@m17n.org>
42
43 * international/mule-cmds.el (locale-language-names): Modify the
44 format of elements and add more entries.
45 (locale-preferred-coding-systems): Add more entries.
46 (set-locale-environment): Adjusted for the change of
47 locale-language-names.
48
492005-03-14 Stefan Monnier <monnier@iro.umontreal.ca>
50
51 * pcvs.el (smerge-ediff): Remove bogus autoload.
52
532005-03-14 Lute Kamstra <lute@gnu.org>
54
55 * emacs-lisp/debug.el (debugger-make-xrefs): Docstring fix.
56 Ignore a `*' at the beginning of a line.
57
58 * subr.el (macro-declaration-function): Move to emacs-lisp/byte-run.el.
59 * emacs-lisp/byte-run.el (macro-declaration-function): Move from
60 subr.el.
61 (dont-compile, eval-when-compile, eval-and-compile): Use declare
62 to specify indentation.
63
64 * generic.el (define-generic-mode): Let generic-mode-list be a
65 list of strings; test membership with equal.
66
672005-03-14 Kim F. Storm <storm@cua.dk>
68
69 * simple.el (next-line, previous-line): Add optional try-vscroll
70 arg to recognize interactive use. Pass it on to line-move.
71 (line-move): Don't perform auto-window-vscroll when defining or
72 executing keyboard macro to ensure consistent behaviour.
73
742005-03-13 Stefan Monnier <monnier@iro.umontreal.ca>
75
76 * pcvs-util.el (cvs-string->strings): Strip trailing whitespace.
77
782005-03-13 Lute Kamstra <lute@gnu.org>
79
80 * emacs-lisp/debug.el (debug): Set debug-on-exit before calling
81 debugger-setup-buffer so that backtrace marks the frames set to
82 debug-on-exit and we don't have to do it manually. Set an extra
83 debug-on-exit for macro's.
84 (debugger-setup-buffer): Don't mark the top frame manually.
85
862005-03-12 Lute Kamstra <lute@gnu.org>
87
88 * emacs-lisp/byte-run.el: Replace lisp-indent-hook with
89 lisp-indent-function throughout.
90 (with-no-warnings): Set lisp-indent-function property.
91
922005-03-12 Thien-Thi Nguyen <ttn@gnu.org>
93
94 * progmodes/dcl-mode.el (dcl-mode-syntax-table):
95 Add entry for backslash.
96
972005-03-12 Juri Linkov <juri@jurta.org>
98
99 * info.el (Info-search): Four fixes for backward search.
100
1012005-03-11 Jay Belanger <belanger@truman.edu>
102
103 * calc/calc.el (calc-language-alist): New variable.
104 * calc/calc-embed.el (calc-embedded-language-alist): Remove.
105 (calc-embedded-find-modes): Use calc-language-alist instead of
106 calc-embedded-language-alist.
107
1082005-03-11 Glenn Morris <gmorris@ast.cam.ac.uk>
109
110 * calendar/calendar.el (calendar-redrawing): New internal
111 variable.
112 (redraw-calendar): Remove bogus save-excursion from previous
113 change. Bind calendar-redrawing to t for mark-diary-entries.
114 * calendar/diary-lib.el (mark-diary-entries): No need to redraw
115 calendar if that is why we were called.
116
1172005-03-11 Kenichi Handa <handa@m17n.org>
118
119 * international/mule.el (make-coding-system): Set property
120 'coding-system-define-form to nil.
121 (define-coding-system-alias): Likewise.
122
1232005-03-11 Kenichi Handa <handa@m17n.org>
124
125 These changes are suggested by Dave Love <fx@gnu.org>.
126
127 * textmodes/fill.el: Change encoding to iso-2022-7bit and add
128 coding: tag.
129 (adaptive-fill-regexp): Add more bullets.
130 (fill-french-nobreak-p): Add Latin-1 and Latin-9 guillemets in
131 regexps.
132
1332005-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
134
135 * help.el (describe-mode): Properly handle non-trivial lighters.
136 Don't ignore minor modes that are not listed in minor-mode-list.
137
138 * tooltip.el (tooltip-mode): Don't complain that you can't turn the
139 feature ON when the user requests to turn it OFF.
140
1412005-03-10 Lute Kamstra <lute@gnu.org>
142
143 * emacs-lisp/debug.el (debug-entry-code): Delete it.
144 (implement-debug-on-entry): New function to replace debug-entry-code.
145 (debug-on-entry-1): Use implement-debug-on-entry. Delete the
146 second argument as the 2005-03-07 change makes it obsolete.
147 (debug-on-entry, cancel-debug-on-entry): Update call to
148 debug-on-entry-1.
149 (debug, debugger-setup-buffer): Comment update.
150 (debugger-frame-number): Update to work with implement-debug-on-entry.
151
1522005-03-10 Jay Belanger <belanger@truman.edu>
153
154 * calc/calc-embed.el (math-ms-args): Declare it.
155 (calc-embedded-eval-expr, calc-embedded-eval-get-var): Use variable
156 math-ms-args.
157 (calc-embedded-subst): Use math-multi-subst-rec to substitute
158 variables.
159
1602005-03-10 Nick Roberts <nickrob@snap.net.nz>
161
162 * progmodes/gdb-ui.el (gdb-var-create-handler, gdb-get-location):
163 Use message-box.
164
165 * tooltip.el (tooltip-mode): Use define-minor-mode and simplify.
166 (tooltip-activate-mouse-motions-if-enabled): Use dolist.
167 (tooltip-gud-tips): Simplify.
168 (tooltip-gud-tips-p): Remove superflouous :set.
169 (tooltip-gud-modes): Add fortran-mode.
170 (gdb-tooltip-print): Remove newline for tooltip-use-echo-area.
171
172 * bindings.el (mode-line-mode-menu): Add tooltip-mode to mode-line.
173
1742005-03-09 Kim F. Storm <storm@cua.dk>
175
176 * play/animate.el (animate-place-char): Use forward-line instead
177 of next-line to improve performance.
178
1792005-03-09 Simon Josefsson <jas@extundo.com>
180
181 * net/browse-url.el (browse-url-default-browser): Doc fix.
182
1832005-03-09 Miles Bader <miles@gnu.org>
184
185 * emacs-lisp/bytecomp.el (byte-compile-variable-ref)
186 (byte-compile-obsolete): Change " since VER" to " (as of Emacs VER)".
187
1882005-03-09 Kenichi Handa <handa@m17n.org>
189
190 * international/latin-1.el: Set case and syntax for 255 only if
191 set-case-syntax-set-multibyte is nil.
192
193 * textmodes/ispell.el (ispell-insert-word): New function.
194 (ispell-word): Use ispell-insert-word to insert a new word.
195 (ispell-process-line): Likewise.
196 (ispell-complete-word): Likewise.
197
1982005-03-09 Glenn Morris <gmorris@ast.cam.ac.uk>
199
200 * calendar/calendar.el (redraw-calendar): Preserve point.
201 Reported by Matt Hodges <MPHodges@member.fsf.org>.
202 (calendar-week-start-day): Move after definition of
203 redraw-calendar. Delete buffer test, since redraw-calendar has
204 that now.
205
206 * calendar/diary-lib.el (mark-diary-entries): Only call
207 redraw-calendar in the first of any recursive calls.
208 Reported by Alan Shutko <ats@acm.org>.
209
2102005-03-08 Juri Linkov <juri@jurta.org>
211
212 * textmodes/sgml-mode.el (sgml-tag, html-tag-alist)
213 (html-horizontal-rule, html-line, html-image, html-checkboxes)
214 (html-radio-buttons): Add a space before the trailing `/>' where
215 sgml-xml-mode is non-nil.
216 (sgml-delete-tag): Check if the tag ends with `/>' to not delete
217 the subsequent tag of the empty XML tag.
218 (html-href-anchor): Don't set initial input to "http:".
219 (html-image): Ask for the image URL and set point inside alt="".
220 (html-name-anchor): Duplicate the name in the `id' attribute when
221 sgml-xml-mode is non-nil.
222 (html-paragraph): Remove \n before <p>.
223 (html-checkboxes, html-radio-buttons): Insert `checked="checked"'
224 instead of `checked' when sgml-xml-mode is non-nil.
225
226 * facemenu.el (list-colors-print): Print #RRGGBB in default face.
227 Remove 1 space before #RRGGBB to not truncate it on terminal
228 windows w/o fringes. Remove 1 space between bg and fg examples
229 to get more space.
230 (list-colors-duplicates): Replace `and' with `if' for `boundp' to
231 avoid byte-compile warnings.
232
233 * image-file.el (image-file-handler): Put `safe-magic' property to
234 `image-file-handler'.
235
236 * info.el (Info-isearch-search): Emulate word search in
237 isearching through multiple Info nodes with Info-search.
238 (Info-isearch-wrap): Allow isearch-word.
239
2402005-03-08 Lute Kamstra <lute@gnu.org>
241
242 * emacs-lisp/debug.el (debugger-step-through): Make sure that
243 stepping into the debugger's code is not possible.
244 (debugger-jumping-flag): Docstring update.
245
2462005-03-08 Jay Belanger <belanger@truman.edu>
247
248 * calc/calc-embed.el (calc-do-embedded): Reset mode line when
249 embedded mode begins.
250 (calc-embedded-language-alist): New variable.
251 (calc-embedded-find-modes): Use calc-embedded-language-alist to
252 set default language mode.
253
2542005-03-08 Kenichi Handa <handa@m17n.org>
255
256 * international/ccl.el (define-ccl-program): Fix docstring about
257 extra 256 bytes assured for the output buffer.
258
259 * international/utf-16.el (ccl-encode-mule-utf-16le-with-signature):
260 Fix BUFFER_MAGNIFICATION to 2.
261 (ccl-encode-mule-utf-16be-with-signature): Likewise.
262
2632005-03-07 Karl Chen <quarl@cs.berkeley.edu>
264
265 * align.el (align-rules-list): Added an alignment rule for CSS
266 declarations (applies to css-mode and html-mode buffers).
267
12005-03-07 Stefan Monnier <monnier@iro.umontreal.ca> 2682005-03-07 Stefan Monnier <monnier@iro.umontreal.ca>
2 269
3 * emacs-lisp/debug.el (debug-on-entry-1): Fix handling of macros. 270 * emacs-lisp/debug.el (debug-on-entry-1): Fix handling of macros.
@@ -191,8 +458,7 @@
191 that debug-entry-code can be safely removed from a function while 458 that debug-entry-code can be safely removed from a function while
192 this code is being evaluated. Revert the 2005-02-27 change as the 459 this code is being evaluated. Revert the 2005-02-27 change as the
193 new implementation no longer requires it. Make sure that a 460 new implementation no longer requires it. Make sure that a
194 function body containing just a string is not mistaken for a 461 function body containing just a string is not mistaken for a docstring.
195 docstring.
196 (debug): Skip one more frame in case of debug on entry. 462 (debug): Skip one more frame in case of debug on entry.
197 (debugger-setup-buffer): Delete one more frame line in case of 463 (debugger-setup-buffer): Delete one more frame line in case of
198 debug on entry. 464 debug on entry.
diff --git a/lisp/align.el b/lisp/align.el
index 5e739c8f7c0..5238a75807d 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -466,13 +466,13 @@ The possible settings for `align-region-separate' are:
466 (repeat . t) 466 (repeat . t)
467 (modes . align-c++-modes) 467 (modes . align-c++-modes)
468 (run-if . ,(function (lambda () current-prefix-arg)))) 468 (run-if . ,(function (lambda () current-prefix-arg))))
469; (valid 469 ; (valid
470; . ,(function 470 ; . ,(function
471; (lambda () 471 ; (lambda ()
472; (memq (caar (c-guess-basic-syntax)) 472 ; (memq (caar (c-guess-basic-syntax))
473; '(brace-list-intro 473 ; '(brace-list-intro
474; brace-list-entry 474 ; brace-list-entry
475; brace-entry-open)))))) 475 ; brace-entry-open))))))
476 476
477 ;; With a prefix argument, comma delimiter will be aligned. Since 477 ;; With a prefix argument, comma delimiter will be aligned. Since
478 ;; perl-mode doesn't give us enough syntactic information (and we 478 ;; perl-mode doesn't give us enough syntactic information (and we
@@ -525,11 +525,11 @@ The possible settings for `align-region-separate' are:
525 (regexp . "\\(\\s-*\\)\\\\$") 525 (regexp . "\\(\\s-*\\)\\\\$")
526 (modes . align-c++-modes) 526 (modes . align-c++-modes)
527 (column . c-backslash-column)) 527 (column . c-backslash-column))
528; (valid 528 ; (valid
529; . ,(function 529 ; . ,(function
530; (lambda () 530 ; (lambda ()
531; (memq (caar (c-guess-basic-syntax)) 531 ; (memq (caar (c-guess-basic-syntax))
532; '(cpp-macro cpp-macro-cont)))))) 532 ; '(cpp-macro cpp-macro-cont))))))
533 533
534 (basic-line-continuation 534 (basic-line-continuation
535 (regexp . "\\(\\s-*\\)\\\\$") 535 (regexp . "\\(\\s-*\\)\\\\$")
@@ -578,7 +578,12 @@ The possible settings for `align-region-separate' are:
578 (justify . t) 578 (justify . t)
579 (run-if . ,(function 579 (run-if . ,(function
580 (lambda () 580 (lambda ()
581 (eq '- current-prefix-arg)))))) 581 (eq '- current-prefix-arg)))))
582
583 (css-declaration
584 (regexp . "^\\s-*\\w+:\\(\\s-*\\).*;")
585 (group . (1))
586 (modes . '(css-mode html-mode))))
582 "*A list describing all of the available alignment rules. 587 "*A list describing all of the available alignment rules.
583The format is: 588The format is:
584 589
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 98b10f20ce2..44e4510c5f5 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -392,6 +392,9 @@ Menu of mode operations in the mode line.")
392 "Return the value of symbol VAR if it is bound, else nil." 392 "Return the value of symbol VAR if it is bound, else nil."
393 `(and (boundp (quote ,var)) ,var)) 393 `(and (boundp (quote ,var)) ,var))
394 394
395(define-key mode-line-mode-menu [tooltip-mode]
396 `(menu-item ,(purecopy "Tooltip") tooltip-mode
397 :button (:toggle . tooltip-mode)))
395(define-key mode-line-mode-menu [overwrite-mode] 398(define-key mode-line-mode-menu [overwrite-mode]
396 `(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode 399 `(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode
397 :button (:toggle . overwrite-mode))) 400 :button (:toggle . overwrite-mode)))
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index e3b3b6b5b19..f1a273f7cf3 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -244,6 +244,13 @@ This is not required to be present for user-written mode annotations.")
244 (use-local-map calc-mode-map) 244 (use-local-map calc-mode-map)
245 (setq calc-no-refresh-evaltos nil) 245 (setq calc-no-refresh-evaltos nil)
246 (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) 246 (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos)))
247 (let (str)
248 (save-excursion
249 (calc-select-buffer)
250 (setq str mode-line-buffer-identification))
251 (unless (equal str mode-line-buffer-identification)
252 (setq mode-line-buffer-identification str)
253 (set-buffer-modified-p (buffer-modified-p))))
247 (or (eq calc-embedded-quiet t) 254 (or (eq calc-embedded-quiet t)
248 (message "Embedded Calc mode enabled; %s to return to normal" 255 (message "Embedded Calc mode enabled; %s to return to normal"
249 (if calc-embedded-quiet 256 (if calc-embedded-quiet
@@ -717,6 +724,11 @@ The command \\[yank] can retrieve it from there."
717 (setq no-defaults nil))) 724 (setq no-defaults nil)))
718 (backward-char 6)) 725 (backward-char 6))
719 (goto-char save-pt) 726 (goto-char save-pt)
727 (unless (assq 'the-language modes)
728 (let ((lang (assoc major-mode calc-language-alist)))
729 (if lang
730 (setq modes (cons (cons 'the-language (cdr lang))
731 modes)))))
720 (list modes emodes pmodes))) 732 (list modes emodes pmodes)))
721 733
722;; The variable calc-embed-vars-used is local to calc-embedded-make-info, 734;; The variable calc-embed-vars-used is local to calc-embedded-make-info,
@@ -857,13 +869,13 @@ The command \\[yank] can retrieve it from there."
857 (while (setq x (cdr x)) 869 (while (setq x (cdr x))
858 (calc-embedded-find-vars (car x)))))) 870 (calc-embedded-find-vars (car x))))))
859 871
860 872(defvar math-ms-args)
861(defun calc-embedded-evaluate-expr (x) 873(defun calc-embedded-evaluate-expr (x)
862 (let ((calc-embed-vars-used (aref calc-embedded-info 10))) 874 (let ((calc-embed-vars-used (aref calc-embedded-info 10)))
863 (or calc-embed-vars-used (calc-embedded-find-vars x)) 875 (or calc-embed-vars-used (calc-embedded-find-vars x))
864 (if calc-embed-vars-used 876 (if calc-embed-vars-used
865 (let ((active (assq (aref calc-embedded-info 0) calc-embedded-active)) 877 (let ((active (assq (aref calc-embedded-info 0) calc-embedded-active))
866 (args nil)) 878 (math-ms-args nil))
867 (save-excursion 879 (save-excursion
868 (calc-embedded-original-buffer t) 880 (calc-embedded-original-buffer t)
869 (or active 881 (or active
@@ -887,7 +899,7 @@ The command \\[yank] can retrieve it from there."
887 (list 'calcFunc-assign 899 (list 'calcFunc-assign
888 (nth 1 x) 900 (nth 1 x)
889 (calc-embedded-subst (nth 2 x))) 901 (calc-embedded-subst (nth 2 x)))
890 (calc-normalize (math-evaluate-expr-rec (math-multi-subst x nil nil)))))) 902 (calc-normalize (math-evaluate-expr-rec (math-multi-subst-rec x))))))
891 903
892(defun calc-embedded-eval-get-var (var base) 904(defun calc-embedded-eval-get-var (var base)
893 (let ((entry base) 905 (let ((entry base)
@@ -914,7 +926,7 @@ The command \\[yank] can retrieve it from there."
914 (setq val (nth 2 val))) 926 (setq val (nth 2 val)))
915 (if (eq (car-safe val) 'calcFunc-assign) 927 (if (eq (car-safe val) 'calcFunc-assign)
916 (setq val (nth 2 val))) 928 (setq val (nth 2 val)))
917 (setq args (cons (cons var val) args))) 929 (setq math-ms-args (cons (cons var val) math-ms-args)))
918 (calc-embedded-activate) 930 (calc-embedded-activate)
919 (calc-embedded-eval-get-var var base)))))) 931 (calc-embedded-eval-get-var var base))))))
920 932
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 99857ce05a0..24336ad9333 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -717,6 +717,20 @@ If nil, selections displayed but ignored.")
717(defvar var-gamma '(special-const (math-gamma-const))) 717(defvar var-gamma '(special-const (math-gamma-const)))
718(defvar var-Modes '(special-const (math-get-modes-vec))) 718(defvar var-Modes '(special-const (math-get-modes-vec)))
719 719
720(defvar calc-language-alist
721 '((latex-mode . latex)
722 (tex-mode . tex)
723 (plain-tex-mode . tex)
724 (context-mode . tex)
725 (nroff-mode . eqn)
726 (pascal-mode . pascal)
727 (c-mode . c)
728 (c++-mode . c)
729 (fortran-mode . fortran)
730 (f90-mode . fortran))
731 "Alist of major modes with appropriate Calc languages.")
732
733
720(mapcar (lambda (v) (or (boundp v) (set v nil))) 734(mapcar (lambda (v) (or (boundp v) (set v nil)))
721 calc-local-var-list) 735 calc-local-var-list)
722 736
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 66ee1875a23..8c78d9540bf 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -145,24 +145,6 @@
145 "Name of the buffer used for the calendar.") 145 "Name of the buffer used for the calendar.")
146 146
147;;;###autoload 147;;;###autoload
148(defcustom calendar-week-start-day 0
149 "*The day of the week on which a week in the calendar begins.
1500 means Sunday (default), 1 means Monday, and so on.
151
152If you change this variable directly (without using customize)
153after starting `calendar', you should call `redraw-calendar' to
154update the calendar display to reflect the change, otherwise
155movement commands will not work correctly."
156 :type 'integer
157 :set (lambda (sym val)
158 (set sym val)
159 (let ((buffer (get-buffer calendar-buffer)))
160 (when (buffer-live-p buffer)
161 (with-current-buffer buffer
162 (redraw-calendar)))))
163 :group 'calendar)
164
165;;;###autoload
166(defcustom calendar-offset 0 148(defcustom calendar-offset 0
167 "*The offset of the principal month from the center of the calendar window. 149 "*The offset of the principal month from the center of the calendar window.
1680 means the principal month is in the center (default), -1 means on the left, 1500 means the principal month is in the center (default), -1 means on the left,
@@ -2168,15 +2150,34 @@ the inserted text. Value is always t."
2168 (forward-line 1)))) 2150 (forward-line 1))))
2169 t) 2151 t)
2170 2152
2153(defvar calendar-redrawing nil
2154 "Internal calendar variable, non-nil if inside redraw-calendar.")
2155
2171(defun redraw-calendar () 2156(defun redraw-calendar ()
2172 "Redraw the calendar display, if `calendar-buffer' is live." 2157 "Redraw the calendar display, if `calendar-buffer' is live."
2173 (interactive) 2158 (interactive)
2174 (if (get-buffer calendar-buffer) 2159 (if (get-buffer calendar-buffer)
2175 (with-current-buffer calendar-buffer 2160 (with-current-buffer calendar-buffer
2176 (let ((cursor-date (calendar-cursor-to-nearest-date))) 2161 (let ((cursor-date (calendar-cursor-to-nearest-date))
2162 (calendar-redrawing t))
2177 (generate-calendar-window displayed-month displayed-year) 2163 (generate-calendar-window displayed-month displayed-year)
2178 (calendar-cursor-to-visible-date cursor-date))))) 2164 (calendar-cursor-to-visible-date cursor-date)))))
2179 2165
2166;;;###autoload
2167(defcustom calendar-week-start-day 0
2168 "*The day of the week on which a week in the calendar begins.
21690 means Sunday (default), 1 means Monday, and so on.
2170
2171If you change this variable directly (without using customize)
2172after starting `calendar', you should call `redraw-calendar' to
2173update the calendar display to reflect the change, otherwise
2174movement commands will not work correctly."
2175 :type 'integer
2176 :set (lambda (sym val)
2177 (set sym val)
2178 (redraw-calendar))
2179 :group 'calendar)
2180
2180(defcustom calendar-debug-sexp nil 2181(defcustom calendar-debug-sexp nil
2181 "*Turn debugging on when evaluating a sexp in the diary or holiday list." 2182 "*Turn debugging on when evaluating a sexp in the diary or holiday list."
2182 :type 'boolean 2183 :type 'boolean
@@ -2920,40 +2921,40 @@ MARK defaults to `diary-entry-marker'."
2920 (save-excursion 2921 (save-excursion
2921 (set-buffer calendar-buffer) 2922 (set-buffer calendar-buffer)
2922 (calendar-cursor-to-visible-date date) 2923 (calendar-cursor-to-visible-date date)
2923 (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; single-char 2924 (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; single-char
2924 (and (listp mark) (> (length mark) 0) mark) ; attr list 2925 (and (listp mark) (> (length mark) 0) mark) ; attr list
2925 (and (facep mark) mark) ; face-name 2926 (and (facep mark) mark) ; face-name
2926 diary-entry-marker))) 2927 diary-entry-marker)))
2927 (if (facep mark) 2928 (if (facep mark)
2928 (progn ; face or an attr-list that contained a face 2929 (progn ; face or an attr-list that contained a face
2929 (overlay-put 2930 (overlay-put
2930 (make-overlay (1- (point)) (1+ (point))) 'face mark)) 2931 (make-overlay (1- (point)) (1+ (point))) 'face mark))
2931 (if (and (stringp mark) 2932 (if (and (stringp mark)
2932 (= (length mark) 1)) ; single-char 2933 (= (length mark) 1)) ; single-char
2933 (let ((buffer-read-only nil)) 2934 (let ((buffer-read-only nil))
2934 (forward-char 1) 2935 (forward-char 1)
2935 (delete-char 1) 2936 (delete-char 1)
2936 (insert mark) 2937 (insert mark)
2937 (forward-char -2)) 2938 (forward-char -2))
2938 (let ; attr list 2939 (let ; attr list
2939 ((temp-face 2940 ((temp-face
2940 (make-symbol (apply 'concat "temp-face-" 2941 (make-symbol (apply 'concat "temp-face-"
2941 (mapcar '(lambda (sym) 2942 (mapcar '(lambda (sym)
2942 (cond ((symbolp sym) (symbol-name sym)) 2943 (cond ((symbolp sym) (symbol-name sym))
2943 ((numberp sym) (int-to-string sym)) 2944 ((numberp sym) (int-to-string sym))
2944 (t sym))) mark)))) 2945 (t sym))) mark))))
2945 (faceinfo mark)) 2946 (faceinfo mark))
2946 (make-face temp-face) 2947 (make-face temp-face)
2947 ;; Remove :face info from the mark, copy the face info into temp-face 2948 ;; Remove :face info from the mark, copy the face info into temp-face
2948 (while (setq faceinfo (memq :face faceinfo)) 2949 (while (setq faceinfo (memq :face faceinfo))
2949 (copy-face (read (nth 1 faceinfo)) temp-face) 2950 (copy-face (read (nth 1 faceinfo)) temp-face)
2950 (setcar faceinfo nil) 2951 (setcar faceinfo nil)
2951 (setcar (cdr faceinfo) nil)) 2952 (setcar (cdr faceinfo) nil))
2952 (setq mark (delq nil mark)) 2953 (setq mark (delq nil mark))
2953 ;; Apply the font aspects 2954 ;; Apply the font aspects
2954 (apply 'set-face-attribute temp-face nil mark) 2955 (apply 'set-face-attribute temp-face nil mark)
2955 (overlay-put 2956 (overlay-put
2956 (make-overlay (1- (point)) (1+ (point))) 'face temp-face)))))))) 2957 (make-overlay (1- (point)) (1+ (point))) 'face temp-face))))))))
2957 2958
2958(defun calendar-star-date () 2959(defun calendar-star-date ()
2959 "Replace the date under the cursor in the calendar window with asterisks. 2960 "Replace the date under the cursor in the calendar window with asterisks.
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 97dc1dd0a71..124b29c3fe7 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -842,7 +842,14 @@ After the entries are marked, the hooks `nongregorian-diary-marking-hook' and
842`mark-diary-entries-hook' are run." 842`mark-diary-entries-hook' are run."
843 (interactive) 843 (interactive)
844 ;; To remove any deleted diary entries. 844 ;; To remove any deleted diary entries.
845 (when mark-diary-entries-in-calendar 845 (when (and mark-diary-entries-in-calendar
846 ;; Avoid redrawing when called recursively, eg through
847 ;; mark-diary-entries-hook for #include's, else only get
848 ;; the last set of diary marks.
849 (not marking-diary-entries)
850 ;; If called from redraw-calendar, the calendar has been
851 ;; erased, so no need to unmark the diary entries.
852 (not calendar-redrawing))
846 (setq mark-diary-entries-in-calendar nil) 853 (setq mark-diary-entries-in-calendar nil)
847 (redraw-calendar)) 854 (redraw-calendar))
848 (let ((marking-diary-entries t) 855 (let ((marking-diary-entries t)
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 2cd0896c835..60fc862676d 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -1,6 +1,6 @@
1;;; byte-run.el --- byte-compiler support for inlining 1;;; byte-run.el --- byte-compiler support for inlining
2 2
3;; Copyright (C) 1992, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Jamie Zawinski <jwz@lucid.com> 5;; Author: Jamie Zawinski <jwz@lucid.com>
6;; Hallvard Furuseth <hbf@ulrik.uio.no> 6;; Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -31,11 +31,35 @@
31 31
32;;; Code: 32;;; Code:
33 33
34;; We define macro-declaration-function here because it is needed to
35;; handle declarations in macro definitions and this is the first file
36;; loaded by loadup.el that uses declarations in macros.
37
38(defun macro-declaration-function (macro decl)
39 "Process a declaration found in a macro definition.
40This is set as the value of the variable `macro-declaration-function'.
41MACRO is the name of the macro being defined.
42DECL is a list `(declare ...)' containing the declarations.
43The return value of this function is not used."
44 ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons.
45 (let (d)
46 ;; Ignore the first element of `decl' (it's always `declare').
47 (while (setq decl (cdr decl))
48 (setq d (car decl))
49 (cond ((and (consp d) (eq (car d) 'indent))
50 (put macro 'lisp-indent-function (car (cdr d))))
51 ((and (consp d) (eq (car d) 'debug))
52 (put macro 'edebug-form-spec (car (cdr d))))
53 (t
54 (message "Unknown declaration %s" d))))))
55
56(setq macro-declaration-function 'macro-declaration-function)
57
58
34;; Redefined in byte-optimize.el. 59;; Redefined in byte-optimize.el.
35;; This is not documented--it's not clear that we should promote it. 60;; This is not documented--it's not clear that we should promote it.
36(fset 'inline 'progn) 61(fset 'inline 'progn)
37(put 'inline 'lisp-indent-hook 0) 62(put 'inline 'lisp-indent-function 0)
38
39 63
40;;; Interface to inline functions. 64;;; Interface to inline functions.
41 65
@@ -105,11 +129,10 @@ was first made obsolete, for example a date or a release number."
105 (put variable 'byte-obsolete-variable (cons new when)) 129 (put variable 'byte-obsolete-variable (cons new when))
106 variable) 130 variable)
107 131
108(put 'dont-compile 'lisp-indent-hook 0)
109(defmacro dont-compile (&rest body) 132(defmacro dont-compile (&rest body)
110 "Like `progn', but the body always runs interpreted (not compiled). 133 "Like `progn', but the body always runs interpreted (not compiled).
111If you think you need this, you're probably making a mistake somewhere." 134If you think you need this, you're probably making a mistake somewhere."
112 (declare (debug t)) 135 (declare (debug t) (indent 0))
113 (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body))))) 136 (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body)))))
114 137
115 138
@@ -118,22 +141,21 @@ If you think you need this, you're probably making a mistake somewhere."
118;;; definition in the file overrides the magic definitions on the 141;;; definition in the file overrides the magic definitions on the
119;;; byte-compile-macro-environment. 142;;; byte-compile-macro-environment.
120 143
121(put 'eval-when-compile 'lisp-indent-hook 0)
122(defmacro eval-when-compile (&rest body) 144(defmacro eval-when-compile (&rest body)
123 "Like `progn', but evaluates the body at compile time. 145 "Like `progn', but evaluates the body at compile time.
124The result of the body appears to the compiler as a quoted constant." 146The result of the body appears to the compiler as a quoted constant."
125 (declare (debug t)) 147 (declare (debug t) (indent 0))
126 ;; Not necessary because we have it in b-c-initial-macro-environment 148 ;; Not necessary because we have it in b-c-initial-macro-environment
127 ;; (list 'quote (eval (cons 'progn body))) 149 ;; (list 'quote (eval (cons 'progn body)))
128 (cons 'progn body)) 150 (cons 'progn body))
129 151
130(put 'eval-and-compile 'lisp-indent-hook 0)
131(defmacro eval-and-compile (&rest body) 152(defmacro eval-and-compile (&rest body)
132 "Like `progn', but evaluates the body at compile time and at load time." 153 "Like `progn', but evaluates the body at compile time and at load time."
133 (declare (debug t)) 154 (declare (debug t) (indent 0))
134 ;; Remember, it's magic. 155 ;; Remember, it's magic.
135 (cons 'progn body)) 156 (cons 'progn body))
136 157
158(put 'with-no-warnings 'lisp-indent-function 0)
137(defun with-no-warnings (&rest body) 159(defun with-no-warnings (&rest body)
138 "Like `progn', but prevents compiler warnings in the body." 160 "Like `progn', but prevents compiler warnings in the body."
139 ;; The implementation for the interpreter is basically trivial. 161 ;; The implementation for the interpreter is basically trivial.
@@ -147,7 +169,7 @@ The result of the body appears to the compiler as a quoted constant."
147;;; There is hardly any reason to change these parameters, anyway. 169;;; There is hardly any reason to change these parameters, anyway.
148;;; --rms. 170;;; --rms.
149 171
150;; (put 'byte-compiler-options 'lisp-indent-hook 0) 172;; (put 'byte-compiler-options 'lisp-indent-function 0)
151;; (defmacro byte-compiler-options (&rest args) 173;; (defmacro byte-compiler-options (&rest args)
152;; "Set some compilation-parameters for this file. This will affect only the 174;; "Set some compilation-parameters for this file. This will affect only the
153;; file in which it appears; this does nothing when evaluated, and when loaded 175;; file in which it appears; this does nothing when evaluated, and when loaded
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 25a1ba080d1..08d5515524d 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1,7 +1,7 @@
1;;; bytecomp.el --- compilation of Lisp code into byte code 1;;; bytecomp.el --- compilation of Lisp code into byte code
2 2
3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, 3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002,
4;; 2003, 2004 Free Software Foundation, Inc. 4;; 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Jamie Zawinski <jwz@lucid.com> 6;; Author: Jamie Zawinski <jwz@lucid.com>
7;; Hallvard Furuseth <hbf@ulrik.uio.no> 7;; Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -1039,7 +1039,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
1039 (byte-compile-set-symbol-position (car form)) 1039 (byte-compile-set-symbol-position (car form))
1040 (if (memq 'obsolete byte-compile-warnings) 1040 (if (memq 'obsolete byte-compile-warnings)
1041 (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form) 1041 (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form)
1042 (if when (concat " since " when) "") 1042 (if when (concat " (as of Emacs " when ")") "")
1043 (if (stringp (car new)) 1043 (if (stringp (car new))
1044 (car new) 1044 (car new)
1045 (format "use `%s' instead." (car new))))) 1045 (format "use `%s' instead." (car new)))))
@@ -2779,7 +2779,7 @@ That command is designed for interactive use only" fn))
2779 (let* ((ob (get var 'byte-obsolete-variable)) 2779 (let* ((ob (get var 'byte-obsolete-variable))
2780 (when (cdr ob))) 2780 (when (cdr ob)))
2781 (byte-compile-warn "`%s' is an obsolete variable%s; %s" var 2781 (byte-compile-warn "`%s' is an obsolete variable%s; %s" var
2782 (if when (concat " since " when) "") 2782 (if when (concat " (as of Emacs " when ")") "")
2783 (if (stringp (car ob)) 2783 (if (stringp (car ob))
2784 (car ob) 2784 (car ob)
2785 (format "use `%s' instead." (car ob)))))) 2785 (format "use `%s' instead." (car ob))))))
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 67836215da3..e97e9012fc1 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -94,15 +94,8 @@ This is to optimize `debugger-make-xrefs'.")
94 94
95(defvar debugger-jumping-flag nil 95(defvar debugger-jumping-flag nil
96 "Non-nil means that debug-on-entry is disabled. 96 "Non-nil means that debug-on-entry is disabled.
97This variable is used by `debugger-jump' and `debugger-reenable'.") 97This variable is used by `debugger-jump', `debugger-step-through',
98 98and `debugger-reenable' to temporarily disable debug-on-entry.")
99;; When you change this, you may also need to change the number of
100;; frames that the debugger skips.
101(defconst debug-entry-code
102 '(if (or inhibit-debug-on-entry debugger-jumping-flag)
103 nil
104 (debug 'debug))
105 "Code added to a function to cause it to call the debugger upon entry.")
106 99
107;;;###autoload 100;;;###autoload
108(setq debugger 'debug) 101(setq debugger 'debug)
@@ -177,7 +170,14 @@ first will be printed into the backtrace buffer."
177 (save-excursion 170 (save-excursion
178 (save-window-excursion 171 (save-window-excursion
179 (with-no-warnings 172 (with-no-warnings
180 (setq unread-command-char -1)) 173 (setq unread-command-char -1))
174 (when (eq (car debugger-args) 'debug)
175 ;; Skip the frames for backtrace-debug, byte-code,
176 ;; and implement-debug-on-entry.
177 (backtrace-debug 4 t)
178 ;; Place an extra debug-on-exit for macro's.
179 (when (eq 'lambda (car-safe (cadr (backtrace-frame 4))))
180 (backtrace-debug 5 t)))
181 (pop-to-buffer debugger-buffer) 181 (pop-to-buffer debugger-buffer)
182 (debugger-mode) 182 (debugger-mode)
183 (debugger-setup-buffer debugger-args) 183 (debugger-setup-buffer debugger-args)
@@ -197,10 +197,6 @@ first will be printed into the backtrace buffer."
197 (goto-char (point-min)) 197 (goto-char (point-min))
198 (message "%s" (buffer-string)) 198 (message "%s" (buffer-string))
199 (kill-emacs)) 199 (kill-emacs))
200 (if (eq (car debugger-args) 'debug)
201 ;; Skip the frames for backtrace-debug, byte-code,
202 ;; and debug-entry-code.
203 (backtrace-debug 4 t))
204 (message "") 200 (message "")
205 (let ((standard-output nil) 201 (let ((standard-output nil)
206 (buffer-read-only t)) 202 (buffer-read-only t))
@@ -232,7 +228,7 @@ first will be printed into the backtrace buffer."
232 (setq last-command debugger-outer-last-command) 228 (setq last-command debugger-outer-last-command)
233 (setq this-command debugger-outer-this-command) 229 (setq this-command debugger-outer-this-command)
234 (with-no-warnings 230 (with-no-warnings
235 (setq unread-command-char debugger-outer-unread-command-char)) 231 (setq unread-command-char debugger-outer-unread-command-char))
236 (setq unread-command-events debugger-outer-unread-command-events) 232 (setq unread-command-events debugger-outer-unread-command-events)
237 (setq unread-post-input-method-events 233 (setq unread-post-input-method-events
238 debugger-outer-unread-post-input-method-events) 234 debugger-outer-unread-post-input-method-events)
@@ -263,19 +259,14 @@ That buffer should be current already."
263 (progn 259 (progn
264 (search-forward "\n debug(") 260 (search-forward "\n debug(")
265 (forward-line (if (eq (car debugger-args) 'debug) 261 (forward-line (if (eq (car debugger-args) 'debug)
266 2 ; Remove debug-entry-code frame. 262 2 ; Remove implement-debug-on-entry frame.
267 1)) 263 1))
268 (point))) 264 (point)))
269 (insert "Debugger entered") 265 (insert "Debugger entered")
270 ;; lambda is for debug-on-call when a function call is next. 266 ;; lambda is for debug-on-call when a function call is next.
271 ;; debug is for debug-on-entry function called. 267 ;; debug is for debug-on-entry function called.
272 (cond ((memq (car debugger-args) '(lambda debug)) 268 (cond ((memq (car debugger-args) '(lambda debug))
273 (insert "--entering a function:\n") 269 (insert "--entering a function:\n"))
274 (if (eq (car debugger-args) 'debug)
275 (progn
276 (delete-char 1)
277 (insert ?*)
278 (beginning-of-line))))
279 ;; Exiting a function. 270 ;; Exiting a function.
280 ((eq (car debugger-args) 'exit) 271 ((eq (car debugger-args) 'exit)
281 (insert "--returning value: ") 272 (insert "--returning value: ")
@@ -311,7 +302,7 @@ That buffer should be current already."
311 (debugger-make-xrefs)) 302 (debugger-make-xrefs))
312 303
313(defun debugger-make-xrefs (&optional buffer) 304(defun debugger-make-xrefs (&optional buffer)
314 "Attach cross-references to symbol names in the `*Backtrace*' buffer." 305 "Attach cross-references to function names in the `*Backtrace*' buffer."
315 (interactive "b") 306 (interactive "b")
316 (save-excursion 307 (save-excursion
317 (set-buffer (or buffer (current-buffer))) 308 (set-buffer (or buffer (current-buffer)))
@@ -362,6 +353,7 @@ That buffer should be current already."
362 ;; Scan the new part of the backtrace, inserting xrefs. 353 ;; Scan the new part of the backtrace, inserting xrefs.
363 (goto-char (point-min)) 354 (goto-char (point-min))
364 (while (progn 355 (while (progn
356 (goto-char (+ (point) 2))
365 (skip-syntax-forward "^w_") 357 (skip-syntax-forward "^w_")
366 (not (eobp))) 358 (not (eobp)))
367 (let* ((beg (point)) 359 (let* ((beg (point))
@@ -373,8 +365,8 @@ That buffer should be current already."
373 (goto-char beg) 365 (goto-char beg)
374 ;; help-xref-button needs to operate on something matched 366 ;; help-xref-button needs to operate on something matched
375 ;; by a regexp, so set that up for it. 367 ;; by a regexp, so set that up for it.
376 (re-search-forward "\\(\\(\\sw\\|\\s_\\)+\\)") 368 (re-search-forward "\\(\\sw\\|\\s_\\)+")
377 (help-xref-button 1 'help-function-def sym file))) 369 (help-xref-button 0 'help-function-def sym file)))
378 (forward-line 1)) 370 (forward-line 1))
379 (widen)) 371 (widen))
380 (setq debugger-previous-backtrace (buffer-string)))) 372 (setq debugger-previous-backtrace (buffer-string))))
@@ -384,6 +376,8 @@ That buffer should be current already."
384Enter another debugger on next entry to eval, apply or funcall." 376Enter another debugger on next entry to eval, apply or funcall."
385 (interactive) 377 (interactive)
386 (setq debugger-step-after-exit t) 378 (setq debugger-step-after-exit t)
379 (setq debugger-jumping-flag t)
380 (add-hook 'post-command-hook 'debugger-reenable)
387 (message "Proceeding, will debug on next eval or call.") 381 (message "Proceeding, will debug on next eval or call.")
388 (exit-recursive-edit)) 382 (exit-recursive-edit))
389 383
@@ -429,8 +423,8 @@ removes itself from that hook."
429 (count 0)) 423 (count 0))
430 (while (not (eq (cadr (backtrace-frame count)) 'debug)) 424 (while (not (eq (cadr (backtrace-frame count)) 'debug))
431 (setq count (1+ count))) 425 (setq count (1+ count)))
432 ;; Skip debug-entry-code frame. 426 ;; Skip implement-debug-on-entry frame.
433 (when (member '(debug (quote debug)) (cdr (backtrace-frame (1+ count)))) 427 (when (eq 'implement-debug-on-entry (cadr (backtrace-frame (1+ count))))
434 (setq count (1+ count))) 428 (setq count (1+ count)))
435 (goto-char (point-min)) 429 (goto-char (point-min))
436 (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):") 430 (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):")
@@ -513,12 +507,12 @@ Applies to the frame whose line point is on in the backtrace."
513 (unwind-protect 507 (unwind-protect
514 (progn 508 (progn
515 (with-no-warnings 509 (with-no-warnings
516 (setq unread-command-char debugger-outer-unread-command-char)) 510 (setq unread-command-char debugger-outer-unread-command-char))
517 (prog1 (progn ,@body) 511 (prog1 (progn ,@body)
518 (with-no-warnings 512 (with-no-warnings
519 (setq debugger-outer-unread-command-char unread-command-char)))) 513 (setq debugger-outer-unread-command-char unread-command-char))))
520 (with-no-warnings 514 (with-no-warnings
521 (setq unread-command-char save-ucc)))) 515 (setq unread-command-char save-ucc))))
522 (setq debugger-outer-match-data (match-data)) 516 (setq debugger-outer-match-data (match-data))
523 (setq debugger-outer-load-read-function load-read-function) 517 (setq debugger-outer-load-read-function load-read-function)
524 (setq debugger-outer-overriding-terminal-local-map 518 (setq debugger-outer-overriding-terminal-local-map
@@ -620,6 +614,16 @@ Complete list of commands:
620 (use-local-map debugger-mode-map) 614 (use-local-map debugger-mode-map)
621 (run-mode-hooks 'debugger-mode-hook)) 615 (run-mode-hooks 'debugger-mode-hook))
622 616
617;; When you change this, you may also need to change the number of
618;; frames that the debugger skips.
619(defun implement-debug-on-entry ()
620 "Conditionally call the debugger.
621A call to this function is inserted by `debug-on-entry' to cause
622functions to break on entry."
623 (if (or inhibit-debug-on-entry debugger-jumping-flag)
624 nil
625 (funcall debugger 'debug)))
626
623;;;###autoload 627;;;###autoload
624(defun debug-on-entry (function) 628(defun debug-on-entry (function)
625 "Request FUNCTION to invoke debugger each time it is called. 629 "Request FUNCTION to invoke debugger each time it is called.
@@ -644,7 +648,7 @@ Redefining FUNCTION also cancels it."
644 (debug-convert-byte-code function)) 648 (debug-convert-byte-code function))
645 (or (consp (symbol-function function)) 649 (or (consp (symbol-function function))
646 (error "Definition of %s is not a list" function)) 650 (error "Definition of %s is not a list" function))
647 (fset function (debug-on-entry-1 function (symbol-function function) t)) 651 (fset function (debug-on-entry-1 function t))
648 (or (memq function debug-function-list) 652 (or (memq function debug-function-list)
649 (push function debug-function-list)) 653 (push function debug-function-list))
650 function) 654 function)
@@ -661,7 +665,7 @@ If argument is nil or an empty string, cancel for all functions."
661 (if name (intern name))))) 665 (if name (intern name)))))
662 (if (and function (not (string= function ""))) 666 (if (and function (not (string= function "")))
663 (progn 667 (progn
664 (let ((f (debug-on-entry-1 function (symbol-function function) nil))) 668 (let ((f (debug-on-entry-1 function nil)))
665 (condition-case nil 669 (condition-case nil
666 (if (and (equal (nth 1 f) '(&rest debug-on-entry-args)) 670 (if (and (equal (nth 1 f) '(&rest debug-on-entry-args))
667 (eq (car (nth 3 f)) 'apply)) 671 (eq (car (nth 3 f)) 'apply))
@@ -692,8 +696,9 @@ If argument is nil or an empty string, cancel for all functions."
692 (setq body (cons (documentation function) body))) 696 (setq body (cons (documentation function) body)))
693 (fset function (cons 'lambda (cons (car contents) body))))))) 697 (fset function (cons 'lambda (cons (car contents) body)))))))
694 698
695(defun debug-on-entry-1 (function defn flag) 699(defun debug-on-entry-1 (function flag)
696 (let ((tail defn)) 700 (let* ((defn (symbol-function function))
701 (tail defn))
697 (if (subrp tail) 702 (if (subrp tail)
698 (error "%s is a built-in function" function) 703 (error "%s is a built-in function" function)
699 (if (eq (car tail) 'macro) (setq tail (cdr tail))) 704 (if (eq (car tail) 'macro) (setq tail (cdr tail)))
@@ -705,10 +710,10 @@ If argument is nil or an empty string, cancel for all functions."
705 ;; Skip the interactive form. 710 ;; Skip the interactive form.
706 (when (eq 'interactive (car-safe (cadr tail))) 711 (when (eq 'interactive (car-safe (cadr tail)))
707 (setq tail (cdr tail))) 712 (setq tail (cdr tail)))
708 (unless (eq flag (equal (cadr tail) debug-entry-code)) 713 (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry)))
709 ;; Add/remove debug statement as needed. 714 ;; Add/remove debug statement as needed.
710 (if flag 715 (if flag
711 (setcdr tail (cons debug-entry-code (cdr tail))) 716 (setcdr tail (cons '(implement-debug-on-entry) (cdr tail)))
712 (setcdr tail (cddr tail)))) 717 (setcdr tail (cddr tail))))
713 defn))) 718 defn)))
714 719
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index a996d4c15e7..cd3998520a1 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -513,17 +513,17 @@ argument BUFFER-NAME is nil, it defaults to *Colors*."
513 'face (cons 'background-color (car color))) 513 'face (cons 'background-color (car color)))
514 (put-text-property 514 (put-text-property
515 (prog1 (point) 515 (prog1 (point)
516 (insert " " (if (cdr color) 516 (insert " " (if (cdr color)
517 (mapconcat 'identity (cdr color) ", ") 517 (mapconcat 'identity (cdr color) ", ")
518 (car color))) 518 (car color))))
519 (indent-to (max (- (window-width) 8) 44))
520 (insert (apply 'format " #%02x%02x%02x"
521 (mapcar (lambda (c) (lsh c -8))
522 (color-values (car color)))))
523
524 (insert "\n"))
525 (point) 519 (point)
526 'face (cons 'foreground-color (car color)))) 520 'face (cons 'foreground-color (car color)))
521 (indent-to (max (- (window-width) 8) 44))
522 (insert (apply 'format "#%02x%02x%02x"
523 (mapcar (lambda (c) (lsh c -8))
524 (color-values (car color)))))
525
526 (insert "\n"))
527 (goto-char (point-min))) 527 (goto-char (point-min)))
528 528
529(defun list-colors-duplicates (&optional list) 529(defun list-colors-duplicates (&optional list)
@@ -539,8 +539,8 @@ a list of colors that the current display can handle."
539 (l list)) 539 (l list))
540 (while (cdr l) 540 (while (cdr l)
541 (if (and (facemenu-color-equal (car (car l)) (car (car (cdr l)))) 541 (if (and (facemenu-color-equal (car (car l)) (car (car (cdr l))))
542 (not (and (boundp 'w32-default-color-map) 542 (not (if (boundp 'w32-default-color-map)
543 (not (assoc (car (car l)) w32-default-color-map))))) 543 (not (assoc (car (car l)) w32-default-color-map)))))
544 (progn 544 (progn
545 (setcdr (car l) (cons (car (car (cdr l))) (cdr (car l)))) 545 (setcdr (car l) (cons (car (car (cdr l))) (cdr (car l))))
546 (setcdr l (cdr (cdr l)))) 546 (setcdr l (cdr (cdr l))))
diff --git a/lisp/faces.el b/lisp/faces.el
index 936e0a132a4..2d94c28c9f4 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -225,7 +225,8 @@ Value is FACE."
225 225
226(defun face-id (face &optional frame) 226(defun face-id (face &optional frame)
227 "Return the internal ID of face with name FACE. 227 "Return the internal ID of face with name FACE.
228If optional argument FRAME is nil or omitted, use the selected frame." 228The optional argument FRAME is ignored, since the internal face ID
229of a face name is the same for all frames."
229 (check-face face) 230 (check-face face)
230 (get face 'face)) 231 (get face 'face))
231 232
diff --git a/lisp/generic.el b/lisp/generic.el
index fe3c2c274af..9545b0970ac 100644
--- a/lisp/generic.el
+++ b/lisp/generic.el
@@ -1,6 +1,6 @@
1;;; generic.el --- defining simple major modes with comment and font-lock 1;;; generic.el --- defining simple major modes with comment and font-lock
2;; 2;;
3;; Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999, 2004, 2005 Free Software Foundation, Inc.
4;; 4;;
5;; Author: Peter Breton <pbreton@cs.umb.edu> 5;; Author: Peter Breton <pbreton@cs.umb.edu>
6;; Created: Fri Sep 27 1996 6;; Created: Fri Sep 27 1996
@@ -215,8 +215,7 @@ FUNCTION-LIST is a list of functions to call to do some additional setup.
215See the file generic-x.el for some examples of `define-generic-mode'." 215See the file generic-x.el for some examples of `define-generic-mode'."
216 216
217 ;; Add a new entry 217 ;; Add a new entry
218 (unless (assq name generic-mode-list) 218 (add-to-list 'generic-mode-list (symbol-name name))
219 (push (list (symbol-name name)) generic-mode-list))
220 219
221 ;; Add it to auto-mode-alist 220 ;; Add it to auto-mode-alist
222 (dolist (re auto-mode-list) 221 (dolist (re auto-mode-list)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 76d4cb419cb..9213b44170c 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,14 +1,28 @@
12005-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * nnimap.el (nnimap-retrieve-headers-from-server): Fix last change.
4
52005-03-10 Arne J,Ax(Brgensen <arne@arnested.dk> (tiny change)
6
7 * nnimap.el (nnimap-retrieve-headers-from-server): Fix off-by-one
8 flaw.
9
102005-03-08 Bjorn Solberg <bjorn_ding@hekneby.org> (tiny change)
11
12 * nnimap.el (nnimap-retrieve-headers-from-server): Sort NOV
13 buffer (since IMAP server might return FETCH response out of
14 order, and the nntp buffer must be sorted).
15
12005-03-04 Reiner Steib <Reiner.Steib@gmx.de> 162005-03-04 Reiner Steib <Reiner.Steib@gmx.de>
2 17
3 * message.el: Don't autoload former message-utils variables. 18 * message.el: Don't autoload former message-utils variables.
4 (message-strip-subject-trailing-was): Changed doc string. 19 (message-strip-subject-trailing-was): Change doc string.
5 20
6 * nnweb.el: Fixes for `gnus-group-make-web-group'. 21 * nnweb.el: Fixes for `gnus-group-make-web-group'.
7 (nnweb-type-definition): Don't add "hl=en" in `address'. Added 22 (nnweb-type-definition): Don't add "hl=en" in `address'. Add `base'.
8 `base'.
9 (nnweb-google-search): Add "hl=en" here. 23 (nnweb-google-search): Add "hl=en" here.
10 (nnweb-google-parse-1, nnweb-google-create-mapping): Don't 24 (nnweb-google-parse-1, nnweb-google-create-mapping):
11 hardcode URL. 25 Don't hardcode URL.
12 26
132005-03-03 Reiner Steib <Reiner.Steib@gmx.de> 272005-03-03 Reiner Steib <Reiner.Steib@gmx.de>
14 28
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 59b0178de42..09d9aef6f31 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -665,6 +665,8 @@ If EXAMINE is non-nil the group is selected read-only."
665 (if (imap-capability 'IMAP4rev1) 665 (if (imap-capability 'IMAP4rev1)
666 (format "BODY.PEEK[HEADER.FIELDS %s])" headers) 666 (format "BODY.PEEK[HEADER.FIELDS %s])" headers)
667 (format "RFC822.HEADER.LINES %s)" headers))))) 667 (format "RFC822.HEADER.LINES %s)" headers)))))
668 (with-current-buffer nntp-server-buffer
669 (sort-numeric-fields 1 (point-min) (point-max)))
668 (and (numberp nnmail-large-newsgroup) 670 (and (numberp nnmail-large-newsgroup)
669 (> nnimap-length nnmail-large-newsgroup) 671 (> nnimap-length nnmail-large-newsgroup)
670 (nnheader-message 6 "nnimap: Retrieving headers...done"))))) 672 (nnheader-message 6 "nnimap: Retrieving headers...done")))))
diff --git a/lisp/help.el b/lisp/help.el
index de5ac093dd5..22d383559a1 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1,7 +1,7 @@
1;;; help.el --- help commands for Emacs 1;;; help.el --- help commands for Emacs
2 2
3;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2004 3;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2004,
4;; Free Software Foundation, Inc. 4;; 2005 Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
7;; Keywords: help, internal 7;; Keywords: help, internal
@@ -685,34 +685,35 @@ For this to work correctly for a minor mode, the mode's indicator
685variable \(listed in `minor-mode-alist') must also be a function 685variable \(listed in `minor-mode-alist') must also be a function
686whose documentation describes the minor mode." 686whose documentation describes the minor mode."
687 (interactive) 687 (interactive)
688 (help-setup-xref (list #'describe-mode (or buffer (current-buffer))) 688 (unless buffer (setq buffer (current-buffer)))
689 (help-setup-xref (list #'describe-mode buffer)
689 (interactive-p)) 690 (interactive-p))
690 ;; For the sake of help-do-xref and help-xref-go-back, 691 ;; For the sake of help-do-xref and help-xref-go-back,
691 ;; don't switch buffers before calling `help-buffer'. 692 ;; don't switch buffers before calling `help-buffer'.
692 (with-output-to-temp-buffer (help-buffer) 693 (with-output-to-temp-buffer (help-buffer)
693 (save-excursion 694 (with-current-buffer buffer
694 (when buffer (set-buffer buffer))
695 (let (minor-modes) 695 (let (minor-modes)
696 ;; Older packages do not register in minor-mode-list but only in
697 ;; minor-mode-alist.
698 (dolist (x minor-mode-alist)
699 (setq x (car x))
700 (unless (memq x minor-mode-list)
701 (push x minor-mode-list)))
696 ;; Find enabled minor mode we will want to mention. 702 ;; Find enabled minor mode we will want to mention.
697 (dolist (mode minor-mode-list) 703 (dolist (mode minor-mode-list)
698 ;; Document a minor mode if it is listed in minor-mode-alist, 704 ;; Document a minor mode if it is listed in minor-mode-alist,
699 ;; non-nil, and has a function definition. 705 ;; non-nil, and has a function definition.
700 (and (boundp mode) (symbol-value mode) 706 (and (boundp mode) (symbol-value mode)
701 (fboundp mode) 707 (fboundp mode)
702 (let ((pretty-minor-mode mode) 708 (let ((pretty-minor-mode mode))
703 indicator)
704 (if (string-match "\\(-minor\\)?-mode\\'" 709 (if (string-match "\\(-minor\\)?-mode\\'"
705 (symbol-name mode)) 710 (symbol-name mode))
706 (setq pretty-minor-mode 711 (setq pretty-minor-mode
707 (capitalize 712 (capitalize
708 (substring (symbol-name mode) 713 (substring (symbol-name mode)
709 0 (match-beginning 0))))) 714 0 (match-beginning 0)))))
710 (setq indicator (cadr (assq mode minor-mode-alist))) 715 (push (list pretty-minor-mode mode
711 (while (and indicator (symbolp indicator) 716 (format-mode-line (assq mode minor-mode-alist)))
712 (boundp indicator)
713 (not (eq indicator (symbol-value indicator))))
714 (setq indicator (symbol-value indicator)))
715 (push (list pretty-minor-mode mode indicator)
716 minor-modes)))) 717 minor-modes))))
717 (if auto-fill-function 718 (if auto-fill-function
718 ;; copy pure string so we can add face property to it below. 719 ;; copy pure string so we can add face property to it below.
@@ -729,6 +730,9 @@ whose documentation describes the minor mode."
729 (let ((pretty-minor-mode (nth 0 mode)) 730 (let ((pretty-minor-mode (nth 0 mode))
730 (mode-function (nth 1 mode)) 731 (mode-function (nth 1 mode))
731 (indicator (nth 2 mode))) 732 (indicator (nth 2 mode)))
733 (setq indicator (if (zerop (length indicator))
734 "no indicator"
735 (format "indicator%s" indicator)))
732 (add-text-properties 0 (length pretty-minor-mode) 736 (add-text-properties 0 (length pretty-minor-mode)
733 '(face bold) pretty-minor-mode) 737 '(face bold) pretty-minor-mode)
734 (save-excursion 738 (save-excursion
@@ -737,20 +741,14 @@ whose documentation describes the minor mode."
737 (push (point-marker) help-button-cache) 741 (push (point-marker) help-button-cache)
738 ;; Document the minor modes fully. 742 ;; Document the minor modes fully.
739 (insert pretty-minor-mode) 743 (insert pretty-minor-mode)
740 (princ (format " minor mode (%s):\n" 744 (princ (format " minor mode (%s):\n" indicator))
741 (if indicator
742 (format "indicator%s" indicator)
743 "no indicator")))
744 (princ (documentation mode-function))) 745 (princ (documentation mode-function)))
745 (princ " ") 746 (princ " ")
746 (insert-button pretty-minor-mode 747 (insert-button pretty-minor-mode
747 'action (car help-button-cache) 748 'action (car help-button-cache)
748 'follow-link t 749 'follow-link t
749 'help-echo "mouse-2, RET: show full information") 750 'help-echo "mouse-2, RET: show full information")
750 (princ (format " minor mode (%s):\n" 751 (princ (format " minor mode (%s):\n" indicator)))))
751 (if indicator
752 (format "indicator%s" indicator)
753 "no indicator"))))))
754 (princ "\n(Full information about these minor modes 752 (princ "\n(Full information about these minor modes
755follows the description of the major mode.)\n\n")) 753follows the description of the major mode.)\n\n"))
756 ;; Document the major mode. 754 ;; Document the major mode.
@@ -896,5 +894,5 @@ out of view."
896;; defcustoms which require 'help'. 894;; defcustoms which require 'help'.
897(provide 'help) 895(provide 'help)
898 896
899;;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423 897;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423
900;;; help.el ends here 898;;; help.el ends here
diff --git a/lisp/image-file.el b/lisp/image-file.el
index 4a13019a090..11676021afd 100644
--- a/lisp/image-file.el
+++ b/lisp/image-file.el
@@ -135,6 +135,7 @@ the command `insert-file-contents'."
135 (setq truncate-lines t)))) 135 (setq truncate-lines t))))
136 rval)) 136 rval))
137 137
138(put 'image-file-handler 'safe-magic t)
138(defun image-file-handler (operation &rest args) 139(defun image-file-handler (operation &rest args)
139 "Filename handler for inserting image files. 140 "Filename handler for inserting image files.
140OPERATION is the operation to perform, on ARGS. 141OPERATION is the operation to perform, on ARGS.
diff --git a/lisp/info.el b/lisp/info.el
index 4905bf0844e..b2920bd6ecb 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -210,6 +210,8 @@ top/final node depending on search direction."
210 :type 'boolean 210 :type 'boolean
211 :group 'info) 211 :group 'info)
212 212
213(defvar Info-isearch-initial-node nil)
214
213(defcustom Info-mode-hook 215(defcustom Info-mode-hook
214 ;; Try to obey obsolete Info-fontify settings. 216 ;; Try to obey obsolete Info-fontify settings.
215 (unless (and (boundp 'Info-fontify) (null Info-fontify)) 217 (unless (and (boundp 'Info-fontify) (null Info-fontify))
@@ -1502,7 +1504,7 @@ If DIRECTION is `backward', search in the reverse direction."
1502 ;; Skip node header line 1504 ;; Skip node header line
1503 (and (save-excursion (forward-line -1) 1505 (and (save-excursion (forward-line -1)
1504 (looking-at "\^_")) 1506 (looking-at "\^_"))
1505 (forward-line 1)) 1507 (forward-line (if backward -1 1)))
1506 ;; Skip Tag Table node 1508 ;; Skip Tag Table node
1507 (save-excursion 1509 (save-excursion
1508 (and (search-backward "\^_" nil t) 1510 (and (search-backward "\^_" nil t)
@@ -1514,6 +1516,14 @@ If DIRECTION is `backward', search in the reverse direction."
1514 (setq found (point) beg-found (if backward (match-end 0) 1516 (setq found (point) beg-found (if backward (match-end 0)
1515 (match-beginning 0))) 1517 (match-beginning 0)))
1516 (setq give-up t)))))) 1518 (setq give-up t))))))
1519
1520 (when (and isearch-mode Info-isearch-search
1521 (not Info-isearch-initial-node)
1522 (not bound)
1523 (or give-up (and found (not (and (> found opoint-min)
1524 (< found opoint-max))))))
1525 (signal 'search-failed (list regexp "initial node")))
1526
1517 ;; If no subfiles, give error now. 1527 ;; If no subfiles, give error now.
1518 (if give-up 1528 (if give-up
1519 (if (null Info-current-subfile) 1529 (if (null Info-current-subfile)
@@ -1523,6 +1533,9 @@ If DIRECTION is `backward', search in the reverse direction."
1523 (re-search-forward regexp))) 1533 (re-search-forward regexp)))
1524 (setq found nil))) 1534 (setq found nil)))
1525 1535
1536 (if (and bound (not found))
1537 (signal 'search-failed (list regexp)))
1538
1526 (unless (or found bound) 1539 (unless (or found bound)
1527 (unwind-protect 1540 (unwind-protect
1528 ;; Try other subfiles. 1541 ;; Try other subfiles.
@@ -1540,6 +1553,7 @@ If DIRECTION is `backward', search in the reverse direction."
1540 (search-forward (concat "\n" osubfile ": ")) 1553 (search-forward (concat "\n" osubfile ": "))
1541 ;; Skip that one. 1554 ;; Skip that one.
1542 (forward-line (if backward 0 1)) 1555 (forward-line (if backward 0 1))
1556 (if backward (forward-char -1))
1543 ;; Make a list of all following subfiles. 1557 ;; Make a list of all following subfiles.
1544 ;; Each elt has the form (VIRT-POSITION . SUBFILENAME). 1558 ;; Each elt has the form (VIRT-POSITION . SUBFILENAME).
1545 (while (not (if backward (bobp) (eobp))) 1559 (while (not (if backward (bobp) (eobp)))
@@ -1578,7 +1592,7 @@ If DIRECTION is `backward', search in the reverse direction."
1578 ;; Skip node header line 1592 ;; Skip node header line
1579 (and (save-excursion (forward-line -1) 1593 (and (save-excursion (forward-line -1)
1580 (looking-at "\^_")) 1594 (looking-at "\^_"))
1581 (forward-line 1)) 1595 (forward-line (if backward -1 1)))
1582 ;; Skip Tag Table node 1596 ;; Skip Tag Table node
1583 (save-excursion 1597 (save-excursion
1584 (and (search-backward "\^_" nil t) 1598 (and (search-backward "\^_" nil t)
@@ -1615,7 +1629,8 @@ If DIRECTION is `backward', search in the reverse direction."
1615 ;; Use string-equal, not equal, to ignore text props. 1629 ;; Use string-equal, not equal, to ignore text props.
1616 (or (and (string-equal onode Info-current-node) 1630 (or (and (string-equal onode Info-current-node)
1617 (equal ofile Info-current-file)) 1631 (equal ofile Info-current-file))
1618 (and isearch-mode isearch-wrapped (eq opoint opoint-min)) 1632 (and isearch-mode isearch-wrapped
1633 (eq opoint (if isearch-forward opoint-min opoint-max)))
1619 (setq Info-history (cons (list ofile onode opoint) 1634 (setq Info-history (cons (list ofile onode opoint)
1620 Info-history)))))) 1635 Info-history))))))
1621 1636
@@ -1646,21 +1661,30 @@ If DIRECTION is `backward', search in the reverse direction."
1646 (Info-search regexp bound noerror count 'backward)) 1661 (Info-search regexp bound noerror count 'backward))
1647 1662
1648(defun Info-isearch-search () 1663(defun Info-isearch-search ()
1649 (if (and Info-isearch-search (not isearch-word)) 1664 (if Info-isearch-search
1650 (lambda (string &optional bound noerror count) 1665 (lambda (string &optional bound noerror count)
1651 (condition-case nil 1666 (if isearch-word
1652 (progn 1667 (Info-search (concat "\\b" (replace-regexp-in-string
1653 (Info-search (if isearch-regexp string (regexp-quote string)) 1668 "\\W+" "\\\\W+"
1654 bound noerror count 1669 (replace-regexp-in-string
1655 (unless isearch-forward 'backward)) 1670 "^\\W+\\|\\W+$" "" string)) "\\b")
1656 (point)) 1671 bound noerror count
1657 (error nil))) 1672 (unless isearch-forward 'backward))
1673 (Info-search (if isearch-regexp string (regexp-quote string))
1674 bound noerror count
1675 (unless isearch-forward 'backward))
1676 (point)))
1658 (let ((isearch-search-fun-function nil)) 1677 (let ((isearch-search-fun-function nil))
1659 (isearch-search-fun)))) 1678 (isearch-search-fun))))
1660 1679
1661(defun Info-isearch-wrap () 1680(defun Info-isearch-wrap ()
1662 (when (and Info-isearch-search (not isearch-word)) 1681 (if Info-isearch-search
1663 (if isearch-forward (Info-top-node) (Info-final-node)) 1682 (if Info-isearch-initial-node
1683 (progn
1684 (if isearch-forward (Info-top-node) (Info-final-node))
1685 (goto-char (if isearch-forward (point-min) (point-max))))
1686 (setq Info-isearch-initial-node Info-current-node)
1687 (setq isearch-wrapped nil))
1664 (goto-char (if isearch-forward (point-min) (point-max))))) 1688 (goto-char (if isearch-forward (point-min) (point-max)))))
1665 1689
1666(defun Info-isearch-push-state () 1690(defun Info-isearch-push-state ()
@@ -1672,6 +1696,8 @@ If DIRECTION is `backward', search in the reverse direction."
1672 (string= Info-current-node node)) 1696 (string= Info-current-node node))
1673 (progn (Info-find-node file node) (sit-for 0)))) 1697 (progn (Info-find-node file node) (sit-for 0))))
1674 1698
1699(defun Info-isearch-start ()
1700 (setq Info-isearch-initial-node nil))
1675 1701
1676(defun Info-extract-pointer (name &optional errorname) 1702(defun Info-extract-pointer (name &optional errorname)
1677 "Extract the value of the node-pointer named NAME. 1703 "Extract the value of the node-pointer named NAME.
@@ -3209,6 +3235,7 @@ Advanced commands:
3209 (setq desktop-save-buffer 'Info-desktop-buffer-misc-data) 3235 (setq desktop-save-buffer 'Info-desktop-buffer-misc-data)
3210 (add-hook 'clone-buffer-hook 'Info-clone-buffer-hook nil t) 3236 (add-hook 'clone-buffer-hook 'Info-clone-buffer-hook nil t)
3211 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) 3237 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
3238 (add-hook 'isearch-mode-hook 'Info-isearch-start nil t)
3212 (set (make-local-variable 'isearch-search-fun-function) 3239 (set (make-local-variable 'isearch-search-fun-function)
3213 'Info-isearch-search) 3240 'Info-isearch-search)
3214 (set (make-local-variable 'isearch-wrap-function) 3241 (set (make-local-variable 'isearch-wrap-function)
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el
index e55f1fbcf36..93ad9358721 100644
--- a/lisp/international/ccl.el
+++ b/lisp/international/ccl.el
@@ -1305,7 +1305,9 @@ CCL-PROGRAM has this form:
1305 1305
1306BUFFER_MAGNIFICATION is an integer value specifying the approximate 1306BUFFER_MAGNIFICATION is an integer value specifying the approximate
1307output buffer magnification size compared with the bytes of input data 1307output buffer magnification size compared with the bytes of input data
1308text. If the value is zero, the CCL program can't execute `read' and 1308text. It is assured that the actual output buffer has 256 bytes
1309more than the size calculated by BUFFER_MAGNIFICATION.
1310If the value is zero, the CCL program can't execute `read' and
1309`write' commands. 1311`write' commands.
1310 1312
1311CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE 1313CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE
diff --git a/lisp/international/latin-1.el b/lisp/international/latin-1.el
index 3c30ba0721b..610ed1cb9f1 100644
--- a/lisp/international/latin-1.el
+++ b/lisp/international/latin-1.el
@@ -104,7 +104,10 @@
104 (set-case-syntax-pair 222 254 tbl) ;latin letter thorn (Icelandic) 104 (set-case-syntax-pair 222 254 tbl) ;latin letter thorn (Icelandic)
105 (set-case-syntax 223 "w" tbl) ;latin small letter sharp s (German) 105 (set-case-syntax 223 "w" tbl) ;latin small letter sharp s (German)
106 (set-case-syntax 247 "_" tbl) ;division sign 106 (set-case-syntax 247 "_" tbl) ;division sign
107 (set-case-syntax 255 "w" tbl)) ;latin small letter y with diaeresis 107 ;; The following setting should be suppressed when we are loading
108 ;; this file for setting syntax of multibyte characters.
109 (or set-case-syntax-set-multibyte
110 (set-case-syntax 255 "w" tbl))) ;latin small letter y with diaeresis
108 111
109;; When preloading this file, don't provide the feature. 112;; When preloading this file, don't provide the feature.
110;; Explicit `require' is used to load this for 8-bit characters. 113;; Explicit `require' is used to load this for 8-bit characters.
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 24992b3c10b..3fac3ab6dd9 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2043,55 +2043,60 @@ of `buffer-file-coding-system' set by this function."
2043 ;; and Chinese are exceptions, which are listed in the 2043 ;; and Chinese are exceptions, which are listed in the
2044 ;; non-standard section at the bottom of locale-language-names. 2044 ;; non-standard section at the bottom of locale-language-names.
2045 2045
2046 ; aa Afar 2046 ("aa_DJ" . "Latin-1") ; Afar
2047 ; ab Abkhazian 2047 ("aa" . "UTF-8")
2048 ;; ab Abkhazian
2048 ("af" . "Latin-1") ; Afrikaans 2049 ("af" . "Latin-1") ; Afrikaans
2049 ("am" . "Ethiopic") ; Amharic 2050 ("am" "Ethiopic" utf-8) ; Amharic
2051 ("an" . "Latin-9") ; Aragonese
2050 ; ar Arabic glibc uses 8859-6 2052 ; ar Arabic glibc uses 8859-6
2051 ; as Assamese 2053 ; as Assamese
2052 ; ay Aymara 2054 ; ay Aymara
2053 ; az Azerbaijani 2055 ("az" . "UTF-8") ; Azerbaijani
2054 ; ba Bashkir 2056 ; ba Bashkir
2055 ("be" . "Belarusian") ; Belarusian [Byelorussian until early 1990s] 2057 ("be" "Belarusian" cp1251) ; Belarusian [Byelorussian until early 1990s]
2056 ("bg" . "Bulgarian") ; Bulgarian 2058 ("bg" "Bulgarian" cp1251) ; Bulgarian
2057 ; bh Bihari 2059 ; bh Bihari
2058 ; bi Bislama 2060 ; bi Bislama
2059 ; bn Bengali, Bangla 2061 ("bn" . "UTF-8") ; Bengali, Bangla
2060 ("bo" . "Tibetan") 2062 ("bo" . "Tibetan")
2061 ("br" . "Latin-1") ; Breton 2063 ("br" . "Latin-1") ; Breton
2062 ("bs" . "Latin-2") ; Bosnian 2064 ("bs" . "Latin-2") ; Bosnian
2065 ("byn" . "UTF-8") ; Bilin; Blin
2063 ("ca" . "Latin-1") ; Catalan 2066 ("ca" . "Latin-1") ; Catalan
2064 ; co Corsican 2067 ; co Corsican
2065 ("cs" . "Czech") 2068 ("cs" "Czech" iso-8859-2)
2066 ("cy" . "Welsh") ; Welsh [glibc uses Latin-8. Did this change?] 2069 ("cy" "Welsh" iso-8859-14)
2067 ("da" . "Latin-1") ; Danish 2070 ("da" . "Latin-1") ; Danish
2068 ("de" . "German") 2071 ("de" "German" iso-8859-1)
2069 ; dz Bhutani 2072 ; dz Bhutani
2070 ("el" . "Greek") 2073 ("el" "Greek" iso-8859-7)
2071 ;; Users who specify "en" explicitly typically want Latin-1, not ASCII. 2074 ;; Users who specify "en" explicitly typically want Latin-1, not ASCII.
2072 ;; That's actually what the GNU locales define, modulo things like 2075 ;; That's actually what the GNU locales define, modulo things like
2073 ;; en_IN -- fx. 2076 ;; en_IN -- fx.
2077 ("en_IN" "English" utf-8) ; glibc uses utf-8 for English in India
2074 ("en" . "Latin-1") ; English 2078 ("en" . "Latin-1") ; English
2075 ("eo" . "Latin-3") ; Esperanto 2079 ("eo" . "Latin-3") ; Esperanto
2076 ("es" . "Spanish") 2080 ("es" "Spanish" iso-8859-1)
2077 ("et" . "Latin-4") ; Estonian 2081 ("et" . "Latin-1") ; Estonian
2078 ("eu" . "Latin-1") ; Basque 2082 ("eu" . "Latin-1") ; Basque
2079 ; fa Persian glibc uses utf-8 2083 ("fa" . "UTF-8") ; Persian
2080 ("fi" . "Latin-1") ; Finnish 2084 ("fi" . "Latin-1") ; Finnish
2081 ; fj Fiji 2085 ("fj" . "Latin-1") ; Fiji
2082 ("fo" . "Latin-1") ; Faroese 2086 ("fo" . "Latin-1") ; Faroese
2083 ("fr" . "French") ; French 2087 ("fr" "French" iso-8859-1) ; French
2084 ("fy" . "Latin-1") ; Frisian 2088 ("fy" . "Latin-1") ; Frisian
2085 ("ga" . "Latin-1") ; Irish Gaelic (new orthography) 2089 ("ga" . "Latin-1") ; Irish Gaelic (new orthography)
2086 ("gd" . "Latin-1") ; Scots Gaelic 2090 ("gd" . "Latin-9") ; Scots Gaelic
2087 ("gl" . "Latin-1") ; Galician 2091 ("gez" "Ethiopic" utf-8) ; Geez
2092 ("gl" . "Latin-1") ; Gallegan; Galician
2088 ; gn Guarani 2093 ; gn Guarani
2089 ; gu Gujarati 2094 ("gu" . "UTF-8") ; Gujarati
2090 ("gv" . "Latin-8") ; Manx Gaelic glibc uses 8859-1 2095 ("gv" . "Latin-1") ; Manx Gaelic
2091 ; ha Hausa 2096 ; ha Hausa
2092 ("he" . "Hebrew") 2097 ("he" "Hebrew" iso-8859-8)
2093 ("hi" . "Devanagari") ; Hindi glibc uses utf-8 2098 ("hi" "Devanagari" utf-8) ; Hindi
2094 ("hr" . "Croatian") ; Croatian 2099 ("hr" "Croatian" iso-8859-2) ; Croatian
2095 ("hu" . "Latin-2") ; Hungarian 2100 ("hu" . "Latin-2") ; Hungarian
2096 ; hy Armenian 2101 ; hy Armenian
2097 ; ia Interlingua 2102 ; ia Interlingua
@@ -2099,110 +2104,114 @@ of `buffer-file-coding-system' set by this function."
2099 ; ie Interlingue 2104 ; ie Interlingue
2100 ; ik Inupiak 2105 ; ik Inupiak
2101 ("is" . "Latin-1") ; Icelandic 2106 ("is" . "Latin-1") ; Icelandic
2102 ("it" . "Italian") ; Italian 2107 ("it" "Italian" iso-8859-1) ; Italian
2103 ; iu Inuktitut 2108 ; iu Inuktitut
2104 ("ja" . "Japanese") 2109 ("iw" "Hebrew" iso-8859-8)
2110 ("ja" "Japanese" euc-jp)
2105 ; jw Javanese 2111 ; jw Javanese
2106 ("ka" . "Georgian") ; Georgian 2112 ("ka" "Georgian" georgian-ps) ; Georgian
2107 ; kk Kazakh 2113 ; kk Kazakh
2108 ("kl" . "Latin-1") ; Greenlandic 2114 ("kl" . "Latin-1") ; Greenlandic
2109 ; km Cambodian 2115 ; km Cambodian
2110 ; kn Kannada 2116 ("kn" "Kannada" utf-8)
2111 ("ko" . "Korean") 2117 ("ko" "Korean" euc-kr)
2112 ; ks Kashmiri 2118 ; ks Kashmiri
2113 ; ku Kurdish 2119 ; ku Kurdish
2114 ("kw" . "Latin-1") ; Cornish 2120 ("kw" . "Latin-1") ; Cornish
2115 ; ky Kirghiz 2121 ; ky Kirghiz
2116 ("la" . "Latin-1") ; Latin 2122 ("la" . "Latin-1") ; Latin
2117 ("lb" . "Latin-1") ; Luxemburgish 2123 ("lb" . "Latin-1") ; Luxemburgish
2124 ("lg" . "Laint-6") ; Ganda
2118 ; ln Lingala 2125 ; ln Lingala
2119 ("lo" . "Lao") ; Laothian 2126 ("lo" "Lao" utf-8) ; Laothian
2120 ("lt" . "Lithuanian") 2127 ("lt" "Lithuanian" iso-8859-13)
2121 ("lv" . "Latvian") ; Latvian, Lettish 2128 ("lv" . "Latvian") ; Latvian, Lettish
2122 ; mg Malagasy 2129 ; mg Malagasy
2123 ("mi" . "Latin-7") ; Maori 2130 ("mi" . "Latin-7") ; Maori
2124 ("mk" . "Cyrillic-ISO") ; Macedonian 2131 ("mk" "Cyrillic-ISO" iso-8859-5) ; Macedonian
2125 ; ml Malayalam 2132 ("ml" "Malayalam" utf-8)
2126 ; mn Mongolian 2133 ("mn" . "UTF-8") ; Mongolian
2127 ; mo Moldavian 2134 ; mo Moldavian
2128 ("mr" . "Devanagari") ; Marathi glibc uses utf-8 2135 ("mr" "Devanagari" utf-8) ; Marathi
2129 ("ms" . "Latin-1") ; Malay 2136 ("ms" . "Latin-1") ; Malay
2130 ("mt" . "Latin-3") ; Maltese 2137 ("mt" . "Latin-3") ; Maltese
2131 ; my Burmese 2138 ; my Burmese
2132 ; na Nauru 2139 ; na Nauru
2133 ("ne" . "Devanagari") ; Nepali 2140 ("nb" . "Latin-1") ; Norwegian
2134 ("nl" . "Dutch") 2141 ("ne" "Devanagari" utf-8) ; Nepali
2142 ("nl" "Dutch" iso-8859-1)
2135 ("no" . "Latin-1") ; Norwegian 2143 ("no" . "Latin-1") ; Norwegian
2136 ("oc" . "Latin-1") ; Occitan 2144 ("oc" . "Latin-1") ; Occitan
2137 ; om (Afan) Oromo 2145 ("om_ET" . "UTF-8") ; (Afan) Oromo
2146 ("om" . "Latin-1") ; (Afan) Oromo
2138 ; or Oriya 2147 ; or Oriya
2139 ; pa Punjabi 2148 ("pa" . "UTF-8") ; Punjabi
2140 ("pl" . "Latin-2") ; Polish 2149 ("pl" . "Latin-2") ; Polish
2141 ; ps Pashto, Pushto 2150 ; ps Pashto, Pushto
2142 ("pt" . "Latin-1") ; Portuguese 2151 ("pt" . "Latin-1") ; Portuguese
2143 ; qu Quechua 2152 ; qu Quechua
2144 ("rm" . "Latin-1") ; Rhaeto-Romanic 2153 ("rm" . "Latin-1") ; Rhaeto-Romanic
2145 ; rn Kirundi 2154 ; rn Kirundi
2146 ("ro" . "Romanian") 2155 ("ro" "Romanian" iso-8859-2)
2147 ("ru.*[_.]koi8" . "Russian") 2156 ("ru_RU" "Russian" iso-8859-5)
2148 ("ru" . "Cyrillic-ISO") ; Russian 2157 ("ru_UA" "Russian" koi8-u)
2149 ; rw Kinyarwanda 2158 ; rw Kinyarwanda
2150 ("sa" . "Devanagari") ; Sanskrit 2159 ("sa" . "Devanagari") ; Sanskrit
2151 ; sd Sindhi 2160 ; sd Sindhi
2152 ; se Northern Sami 2161 ("se" . "UTF-8") ; Northern Sami
2153 ; sg Sangho 2162 ; sg Sangho
2154 ("sh" . "Latin-2") ; Serbo-Croatian 2163 ("sh" . "Latin-2") ; Serbo-Croatian
2155 ; si Sinhalese 2164 ; si Sinhalese
2156 ("sk" . "Slovak") 2165 ("sid" . "UTF-8") ; Sidamo
2157 ("sl" . "Slovenian") 2166 ("sk" "Slovak" iso-8859-2)
2167 ("sl" "Slovenian" iso-8859-2)
2158 ; sm Samoan 2168 ; sm Samoan
2159 ; sn Shona 2169 ; sn Shona
2160 ; so Somali 2170 ("so_ET" "UTF-8") ; Somali
2171 ("so" "Latin-1") ; Somali
2161 ("sq" . "Latin-1") ; Albanian 2172 ("sq" . "Latin-1") ; Albanian
2173 ("sr_YU@cyrillic" . "Cyrillic-ISO") ; Serbian (Cyrillic alphabet)
2162 ("sr" . "Latin-2") ; Serbian (Latin alphabet) 2174 ("sr" . "Latin-2") ; Serbian (Latin alphabet)
2163 ("sr_YU@cyrillic" . "Cyrillic-ISO") ; per glibc
2164 ; ss Siswati 2175 ; ss Siswati
2165 ; st Sesotho 2176 ("st" . "Latin-1") ; Sesotho
2166 ; su Sundanese 2177 ; su Sundanese
2167 ("sv" . "Swedish") ; Swedish 2178 ("sv" "Swedish" iso-8859-1) ; Swedish
2168 ("sw" . "Latin-1") ; Swahili 2179 ("sw" . "Latin-1") ; Swahili
2169 ; ta Tamil glibc uses utf-8 2180 ("ta" "Tamil" utf-8)
2170 ; te Telugu glibc uses utf-8 2181 ("te" . "UTF-8") ; Telugu
2171 ("tg" . "Tajik") 2182 ("tg" "Tajik" koi8-t)
2172 ("th" . "Thai") 2183 ("th" "Thai" tis-620)
2173 ; ti Tigrinya 2184 ("ti" "Ethiopic" utf-8) ; Tigrinya
2185 ("tig_ER" . "UTF-8") ; Tigre
2174 ; tk Turkmen 2186 ; tk Turkmen
2175 ("tl" . "Latin-1") ; Tagalog 2187 ("tl" . "Latin-1") ; Tagalog
2176 ; tn Setswana 2188 ; tn Setswana
2177 ; to Tonga 2189 ; to Tonga
2178 ("tr" . "Turkish") 2190 ("tr" "Turkish" iso-8859-9)
2179 ; ts Tsonga 2191 ; ts Tsonga
2180 ; tt Tatar 2192 ("tt" . "UTF-8") ; Tatar
2181 ; tw Twi 2193 ; tw Twi
2182 ; ug Uighur 2194 ; ug Uighur
2183 ("uk" . "Ukrainian") ; Ukrainian 2195 ("uk" "Ukrainian" koi8-u)
2184 ; ur Urdu glibc uses utf-8 2196 ("ur" . "UTF-8") ; Urdu
2197 ("uz_UZ@cyrillic" . "UTF-8"); Uzbek
2185 ("uz" . "Latin-1") ; Uzbek 2198 ("uz" . "Latin-1") ; Uzbek
2186 ("vi" . "Vietnamese") ; glibc uses utf-8 2199 ("vi" "Vietnamese" utf-8)
2187 ; vo Volapuk 2200 ; vo Volapuk
2188 ("wa" . "Latin-1") ; Walloon 2201 ("wa" . "Latin-1") ; Walloon
2189 ; wo Wolof 2202 ; wo Wolof
2190 ; xh Xhosa 2203 ("xh" . "Latin-1") ; Xhosa
2191 ("yi" . "Windows-1255") ; Yiddish 2204 ("yi" . "Windows-1255") ; Yiddish
2192 ; yo Yoruba 2205 ; yo Yoruba
2193 ; za Zhuang 2206 ; za Zhuang
2194 2207 ("zh_HK" . "Chinese-Big5")
2195 ; glibc: 2208 ("zh_TW" . "Chinese-Big5")
2209 ("zh_CN" . "Chinese-GB")
2210 ("zh" . "Chinese-GB")
2196 ; zh_CN.GB18030/GB18030 \ 2211 ; zh_CN.GB18030/GB18030 \
2197 ; zh_CN.GBK/GBK \ 2212 ; zh_CN.GBK/GBK \
2198 ; zh_HK/BIG5-HKSCS \ 2213 ; zh_HK/BIG5-HKSCS \
2199 2214 ("zu" . "Latin-1") ; Zulu
2200 ("zh.*[._]big5" . "Chinese-BIG5")
2201 ("zh.*[._]gbk" . nil) ; Solaris 2.7; has gbk-0 as well as GB 2312.1980-0
2202 ("zh_tw" . "Chinese-CNS") ; glibc uses big5
2203 ("zh_tw[._]euc-tw" . "Chinese-EUC-TW")
2204 ("zh" . "Chinese-GB")
2205 ; zu Zulu
2206 2215
2207 ;; ISO standard locales 2216 ;; ISO standard locales
2208 ("c$" . "ASCII") 2217 ("c$" . "ASCII")
@@ -2222,10 +2231,16 @@ of `buffer-file-coding-system' set by this function."
2222 ("chs" . "Chinese-GB") ; MS Windows Chinese Simplified 2231 ("chs" . "Chinese-GB") ; MS Windows Chinese Simplified
2223 ("cht" . "Chinese-BIG5") ; MS Windows Chinese Traditional 2232 ("cht" . "Chinese-BIG5") ; MS Windows Chinese Traditional
2224 )) 2233 ))
2225 "List of pairs of locale regexps and language names. 2234 "Alist of locale regexps vs the corresponding languages and coding systems.
2226The first element whose locale regexp matches the start of a downcased locale 2235Each element has these form:
2227specifies the language name corresponding to that locale. 2236 \(LOCALE-REGEXP LANG-ENV CODING-SYSTEM)
2228If the language name is nil, there is no corresponding language environment.") 2237The first element whose LOCALE-REGEXP matches the start of a
2238downcased locale specifies the LANG-ENV \(language environtment)
2239and CODING-SYSTEM corresponding to that locale. If there is no
2240appropriate language environment, the element may have this form:
2241 \(LOCALE-REGEXP . LANG-ENV)
2242In this case, LANG-ENV is one of generic language environments for an
2243specific encoding such as \"Latin-1\" and \"UTF-8\".")
2229 2244
2230(defconst locale-charset-language-names 2245(defconst locale-charset-language-names
2231 (purecopy 2246 (purecopy
@@ -2243,20 +2258,43 @@ If the language name is nil, there is no corresponding language environment.")
2243 "List of pairs of locale regexps and charset language names. 2258 "List of pairs of locale regexps and charset language names.
2244The first element whose locale regexp matches the start of a downcased locale 2259The first element whose locale regexp matches the start of a downcased locale
2245specifies the language name whose charset corresponds to that locale. 2260specifies the language name whose charset corresponds to that locale.
2246This language name is used if its charsets disagree with the charsets of 2261This language name is used if the locale is not listed in
2247the language name that would otherwise be used for this locale.") 2262`locale-language-names'")
2248 2263
2249(defconst locale-preferred-coding-systems 2264(defconst locale-preferred-coding-systems
2250 (purecopy 2265 (purecopy
2251 '(("ja.*[._]euc" . japanese-iso-8bit) 2266 '((".*8859[-_]?1\\>" . iso-8859-1)
2267 (".*8859[-_]?2\\>" . iso-8859-2)
2268 (".*8859[-_]?3\\>" . iso-8859-3)
2269 (".*8859[-_]?4\\>" . iso-8859-4)
2270 (".*8859[-_]?9\\>" . iso-8859-9)
2271 (".*8859[-_]?14\\>" . iso-8859-14)
2272 (".*8859[-_]?15\\>" . iso-8859-15)
2273 (".*utf\\(?:-?8\\)?" . utf-8)
2274 ;; utf-8@euro exists, so put this after utf-8. (@euro really
2275 ;; specifies the currency, rather than the charset.)
2276 (".*@euro" . iso-8859-15)
2277 ("koi8-?r" . koi8-r)
2278 ("koi8-?u" . koi8-u)
2279 ("tcvn" . tcvn)
2280 ("big5" . big5)
2281 ("euc-?tw" . euc-tw)
2282 ;; We don't support GBK, but as it is upper compatible with
2283 ;; GB-2312, we setup the default coding system to gb2312.
2284 ("gbk" . gb2312)
2285 ;; We don't support BIG5-HKSCS, but as it is upper compatible with
2286 ;; BIG5, we setup the default coding system to big5.
2287 ("big5hkscs" . big5)
2288 ("ja.*[._]euc" . japanese-iso-8bit)
2252 ("ja.*[._]jis7" . iso-2022-jp) 2289 ("ja.*[._]jis7" . iso-2022-jp)
2253 ("ja.*[._]pck" . japanese-shift-jis) 2290 ("ja.*[._]pck" . japanese-shift-jis)
2254 ("ja.*[._]sjis" . japanese-shift-jis) 2291 ("ja.*[._]sjis" . japanese-shift-jis)
2255 ("jpn" . japanese-shift-jis) ; MS-Windows uses this. 2292 ("jpn" . japanese-shift-jis) ; MS-Windows uses this.
2256 (".*[._]utf" . utf-8))) 2293 ))
2257 "List of pairs of locale regexps and preferred coding systems. 2294 "List of pairs of locale regexps and preferred coding systems.
2258The first element whose locale regexp matches the start of a downcased locale 2295The first element whose locale regexp matches the start of a downcased locale
2259specifies the coding system to prefer when using that locale.") 2296specifies the coding system to prefer when using that locale.
2297This coding system is used if the locale specifies a specific charset.")
2260 2298
2261(defun locale-name-match (key alist) 2299(defun locale-name-match (key alist)
2262 "Search for KEY in ALIST, which should be a list of regexp-value pairs. 2300 "Search for KEY in ALIST, which should be a list of regexp-value pairs.
@@ -2462,12 +2500,17 @@ See also `locale-charset-language-names', `locale-language-names',
2462 (coding-system 2500 (coding-system
2463 (get-locale-coding-system locale))) 2501 (get-locale-coding-system locale)))
2464 2502
2465 ;; Give preference to charset-language-name over language-name. 2503 (if (consp language-name)
2466 (if (and charset-language-name 2504 ;; locale-language-names specify both lang-env and coding.
2467 (not 2505 ;; But, what specified in locale-preferred-coding-systems
2468 (equal (get-language-info language-name 'charset) 2506 ;; has higher priority.
2469 (get-language-info charset-language-name 'charset)))) 2507 (setq coding-system (or coding-system
2470 (setq language-name charset-language-name)) 2508 (nth 1 language-name))
2509 language-name (car language-name))
2510 ;; Otherwise, if locale is not listed in locale-language-names,
2511 ;; use what listed in locale-charset-language-names.
2512 (if (not language-name)
2513 (setq language-name charset-language-name)))
2471 2514
2472 (when language-name 2515 (when language-name
2473 2516
@@ -2478,7 +2521,9 @@ See also `locale-charset-language-names', `locale-language-names',
2478 (setq locale-coding-system 2521 (setq locale-coding-system
2479 (car (get-language-info language-name 'coding-priority)))) 2522 (car (get-language-info language-name 'coding-priority))))
2480 2523
2481 (when coding-system 2524 (when (and coding-system
2525 (not (coding-system-equal coding-system
2526 locale-coding-system)))
2482 (prefer-coding-system coding-system) 2527 (prefer-coding-system coding-system)
2483 (setq locale-coding-system coding-system)))) 2528 (setq locale-coding-system coding-system))))
2484 2529
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 9a5646217ec..1b1d77ff461 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1041,6 +1041,7 @@ a value of `safe-charsets' in PLIST."
1041 (setq coding-category (plist-get plist 'coding-category)) 1041 (setq coding-category (plist-get plist 'coding-category))
1042 (aset coding-spec coding-spec-plist-idx plist)) 1042 (aset coding-spec coding-spec-plist-idx plist))
1043 (put coding-system 'coding-system coding-spec) 1043 (put coding-system 'coding-system coding-spec)
1044 (put coding-system 'coding-system-define-form nil)
1044 (put coding-category 'coding-systems 1045 (put coding-category 'coding-systems
1045 (cons coding-system (get coding-category 'coding-systems)))) 1046 (cons coding-system (get coding-category 'coding-systems))))
1046 1047
@@ -1102,6 +1103,7 @@ a value of `safe-charsets' in PLIST."
1102(defun define-coding-system-alias (alias coding-system) 1103(defun define-coding-system-alias (alias coding-system)
1103 "Define ALIAS as an alias for coding system CODING-SYSTEM." 1104 "Define ALIAS as an alias for coding system CODING-SYSTEM."
1104 (put alias 'coding-system (coding-system-spec coding-system)) 1105 (put alias 'coding-system (coding-system-spec coding-system))
1106 (put alias 'coding-system-define-form nil)
1105 (add-to-coding-system-list alias) 1107 (add-to-coding-system-list alias)
1106 (setq coding-system-alist (cons (list (symbol-name alias)) 1108 (setq coding-system-alist (cons (list (symbol-name alias))
1107 coding-system-alist)) 1109 coding-system-alist))
diff --git a/lisp/international/utf-16.el b/lisp/international/utf-16.el
index 04c9f682139..0c3d3724ea4 100644
--- a/lisp/international/utf-16.el
+++ b/lisp/international/utf-16.el
@@ -411,7 +411,7 @@ after translation through the translation-table named
411Others are encoded as U+FFFD.") 411Others are encoded as U+FFFD.")
412 412
413(define-ccl-program ccl-encode-mule-utf-16le-with-signature 413(define-ccl-program ccl-encode-mule-utf-16le-with-signature
414 `(4 414 `(2
415 ((write #xFF) 415 ((write #xFF)
416 (write #xFE) 416 (write #xFE)
417 ,@utf-16le-encode-loop)) 417 ,@utf-16le-encode-loop))
@@ -423,7 +423,7 @@ after translation through the translation-table of name
423Others are encoded as U+FFFD.") 423Others are encoded as U+FFFD.")
424 424
425(define-ccl-program ccl-encode-mule-utf-16be-with-signature 425(define-ccl-program ccl-encode-mule-utf-16be-with-signature
426 `(4 426 `(2
427 ((write #xFE) 427 ((write #xFE)
428 (write #xFF) 428 (write #xFF)
429 ,@utf-16be-encode-loop)) 429 ,@utf-16be-encode-loop))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 77208c42ee4..66bf0dc5c20 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -437,9 +437,8 @@ Each set is a vector of the form:
437(defvar isearch-string "") ; The current search string. 437(defvar isearch-string "") ; The current search string.
438(defvar isearch-message "") ; text-char-description version of isearch-string 438(defvar isearch-message "") ; text-char-description version of isearch-string
439 439
440(defvar isearch-success t) ; Searching is currently successful. 440(defvar isearch-success t) ; Searching is currently successful.
441(defvar isearch-invalid-regexp nil) ; Regexp not well formed. 441(defvar isearch-error nil) ; Error message for failed search.
442(defvar isearch-within-brackets nil) ; Regexp has unclosed [.
443(defvar isearch-other-end nil) ; Start (end) of match if forward (backward). 442(defvar isearch-other-end nil) ; Start (end) of match if forward (backward).
444(defvar isearch-wrapped nil) ; Searching restarted from the top (bottom). 443(defvar isearch-wrapped nil) ; Searching restarted from the top (bottom).
445(defvar isearch-barrier 0) 444(defvar isearch-barrier 0)
@@ -640,8 +639,7 @@ is treated as a regexp. See \\[isearch-forward] for more info."
640 isearch-barrier (point) 639 isearch-barrier (point)
641 isearch-adjusted nil 640 isearch-adjusted nil
642 isearch-yank-flag nil 641 isearch-yank-flag nil
643 isearch-invalid-regexp nil 642 isearch-error nil
644 isearch-within-brackets nil
645 isearch-slow-terminal-mode (and (<= baud-rate search-slow-speed) 643 isearch-slow-terminal-mode (and (<= baud-rate search-slow-speed)
646 (> (window-height) 644 (> (window-height)
647 (* 4 645 (* 4
@@ -867,7 +865,7 @@ REGEXP says which ring to use."
867(defsubst isearch-word-state (frame) 865(defsubst isearch-word-state (frame)
868 "Return the search-by-word flag in FRAME." 866 "Return the search-by-word flag in FRAME."
869 (aref frame 6)) 867 (aref frame 6))
870(defsubst isearch-invalid-regexp-state (frame) 868(defsubst isearch-error-state (frame)
871 "Return the regexp error message in FRAME, or nil if its regexp is valid." 869 "Return the regexp error message in FRAME, or nil if its regexp is valid."
872 (aref frame 7)) 870 (aref frame 7))
873(defsubst isearch-wrapped-state (frame) 871(defsubst isearch-wrapped-state (frame)
@@ -876,15 +874,12 @@ REGEXP says which ring to use."
876(defsubst isearch-barrier-state (frame) 874(defsubst isearch-barrier-state (frame)
877 "Return the barrier value in FRAME." 875 "Return the barrier value in FRAME."
878 (aref frame 9)) 876 (aref frame 9))
879(defsubst isearch-within-brackets-state (frame)
880 "Return the in-character-class flag in FRAME."
881 (aref frame 10))
882(defsubst isearch-case-fold-search-state (frame) 877(defsubst isearch-case-fold-search-state (frame)
883 "Return the case-folding flag in FRAME." 878 "Return the case-folding flag in FRAME."
884 (aref frame 11)) 879 (aref frame 10))
885(defsubst isearch-pop-fun-state (frame) 880(defsubst isearch-pop-fun-state (frame)
886 "Return the function restoring the mode-specific isearch state in FRAME." 881 "Return the function restoring the mode-specific isearch state in FRAME."
887 (aref frame 12)) 882 (aref frame 11))
888 883
889(defun isearch-top-state () 884(defun isearch-top-state ()
890 (let ((cmd (car isearch-cmds))) 885 (let ((cmd (car isearch-cmds)))
@@ -894,10 +889,9 @@ REGEXP says which ring to use."
894 isearch-forward (isearch-forward-state cmd) 889 isearch-forward (isearch-forward-state cmd)
895 isearch-other-end (isearch-other-end-state cmd) 890 isearch-other-end (isearch-other-end-state cmd)
896 isearch-word (isearch-word-state cmd) 891 isearch-word (isearch-word-state cmd)
897 isearch-invalid-regexp (isearch-invalid-regexp-state cmd) 892 isearch-error (isearch-error-state cmd)
898 isearch-wrapped (isearch-wrapped-state cmd) 893 isearch-wrapped (isearch-wrapped-state cmd)
899 isearch-barrier (isearch-barrier-state cmd) 894 isearch-barrier (isearch-barrier-state cmd)
900 isearch-within-brackets (isearch-within-brackets-state cmd)
901 isearch-case-fold-search (isearch-case-fold-search-state cmd)) 895 isearch-case-fold-search (isearch-case-fold-search-state cmd))
902 (if (functionp (isearch-pop-fun-state cmd)) 896 (if (functionp (isearch-pop-fun-state cmd))
903 (funcall (isearch-pop-fun-state cmd) cmd)) 897 (funcall (isearch-pop-fun-state cmd) cmd))
@@ -912,8 +906,8 @@ REGEXP says which ring to use."
912 (cons (vector isearch-string isearch-message (point) 906 (cons (vector isearch-string isearch-message (point)
913 isearch-success isearch-forward isearch-other-end 907 isearch-success isearch-forward isearch-other-end
914 isearch-word 908 isearch-word
915 isearch-invalid-regexp isearch-wrapped isearch-barrier 909 isearch-error isearch-wrapped isearch-barrier
916 isearch-within-brackets isearch-case-fold-search 910 isearch-case-fold-search
917 (if isearch-push-state-function 911 (if isearch-push-state-function
918 (funcall isearch-push-state-function))) 912 (funcall isearch-push-state-function)))
919 isearch-cmds))) 913 isearch-cmds)))
@@ -976,8 +970,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
976 (isearch-barrier isearch-barrier) 970 (isearch-barrier isearch-barrier)
977 (isearch-adjusted isearch-adjusted) 971 (isearch-adjusted isearch-adjusted)
978 (isearch-yank-flag isearch-yank-flag) 972 (isearch-yank-flag isearch-yank-flag)
979 (isearch-invalid-regexp isearch-invalid-regexp) 973 (isearch-error isearch-error)
980 (isearch-within-brackets isearch-within-brackets)
981 ;;; Don't bind this. We want isearch-search, below, to set it. 974 ;;; Don't bind this. We want isearch-search, below, to set it.
982 ;;; And the old value won't matter after that. 975 ;;; And the old value won't matter after that.
983 ;;; (isearch-other-end isearch-other-end) 976 ;;; (isearch-other-end isearch-other-end)
@@ -1124,7 +1117,7 @@ Use `isearch-exit' to quit without signaling."
1124 (isearch-cancel)) 1117 (isearch-cancel))
1125 ;; If search is failing, or has an incomplete regexp, 1118 ;; If search is failing, or has an incomplete regexp,
1126 ;; rub out until it is once more successful. 1119 ;; rub out until it is once more successful.
1127 (while (or (not isearch-success) isearch-invalid-regexp) 1120 (while (or (not isearch-success) isearch-error)
1128 (isearch-pop-state)) 1121 (isearch-pop-state))
1129 (isearch-update))) 1122 (isearch-update)))
1130 1123
@@ -1146,10 +1139,11 @@ Use `isearch-exit' to quit without signaling."
1146 ;; If already have what to search for, repeat it. 1139 ;; If already have what to search for, repeat it.
1147 (or isearch-success 1140 (or isearch-success
1148 (progn 1141 (progn
1142 ;; Set isearch-wrapped before calling isearch-wrap-function
1143 (setq isearch-wrapped t)
1149 (if isearch-wrap-function 1144 (if isearch-wrap-function
1150 (funcall isearch-wrap-function) 1145 (funcall isearch-wrap-function)
1151 (goto-char (if isearch-forward (point-min) (point-max)))) 1146 (goto-char (if isearch-forward (point-min) (point-max)))))))
1152 (setq isearch-wrapped t))))
1153 ;; C-s in reverse or C-r in forward, change direction. 1147 ;; C-s in reverse or C-r in forward, change direction.
1154 (setq isearch-forward (not isearch-forward))) 1148 (setq isearch-forward (not isearch-forward)))
1155 1149
@@ -1384,8 +1378,7 @@ might return the position of the end of the line."
1384 (min isearch-opoint isearch-barrier)))) 1378 (min isearch-opoint isearch-barrier))))
1385 (progn 1379 (progn
1386 (setq isearch-success t 1380 (setq isearch-success t
1387 isearch-invalid-regexp nil 1381 isearch-error nil
1388 isearch-within-brackets nil
1389 isearch-other-end (match-end 0)) 1382 isearch-other-end (match-end 0))
1390 (if (and (eq isearch-case-fold-search t) search-upper-case) 1383 (if (and (eq isearch-case-fold-search t) search-upper-case)
1391 (setq isearch-case-fold-search 1384 (setq isearch-case-fold-search
@@ -1432,8 +1425,8 @@ barrier."
1432 (not want-backslash)) 1425 (not want-backslash))
1433 ;; We have to check 2 stack frames because the last might be 1426 ;; We have to check 2 stack frames because the last might be
1434 ;; invalid just because of a backslash. 1427 ;; invalid just because of a backslash.
1435 (or (not isearch-invalid-regexp) 1428 (or (not isearch-error)
1436 (not (isearch-invalid-regexp-state (cadr isearch-cmds))) 1429 (not (isearch-error-state (cadr isearch-cmds)))
1437 allow-invalid)) 1430 allow-invalid))
1438 (if to-barrier 1431 (if to-barrier
1439 (progn (goto-char isearch-barrier) 1432 (progn (goto-char isearch-barrier)
@@ -1448,7 +1441,7 @@ barrier."
1448 ;; Also skip over postfix operators -- though horrid, 1441 ;; Also skip over postfix operators -- though horrid,
1449 ;; 'ab?\{5,6\}+\{1,2\}*' is perfectly legal. 1442 ;; 'ab?\{5,6\}+\{1,2\}*' is perfectly legal.
1450 (while (and previous 1443 (while (and previous
1451 (or (isearch-invalid-regexp-state frame) 1444 (or (isearch-error-state frame)
1452 (let* ((string (isearch-string-state frame)) 1445 (let* ((string (isearch-string-state frame))
1453 (lchar (aref string (1- (length string))))) 1446 (lchar (aref string (1- (length string)))))
1454 ;; The operators aren't always operators; check 1447 ;; The operators aren't always operators; check
@@ -1981,11 +1974,10 @@ If there is no completion possible, say so and continue searching."
1981 ;; If about to search, and previous search regexp was invalid, 1974 ;; If about to search, and previous search regexp was invalid,
1982 ;; check that it still is. If it is valid now, 1975 ;; check that it still is. If it is valid now,
1983 ;; let the message we display while searching say that it is valid. 1976 ;; let the message we display while searching say that it is valid.
1984 (and isearch-invalid-regexp ellipsis 1977 (and isearch-error ellipsis
1985 (condition-case () 1978 (condition-case ()
1986 (progn (re-search-forward isearch-string (point) t) 1979 (progn (re-search-forward isearch-string (point) t)
1987 (setq isearch-invalid-regexp nil 1980 (setq isearch-error nil))
1988 isearch-within-brackets nil))
1989 (error nil))) 1981 (error nil)))
1990 ;; If currently failing, display no ellipsis. 1982 ;; If currently failing, display no ellipsis.
1991 (or isearch-success (setq ellipsis nil)) 1983 (or isearch-success (setq ellipsis nil))
@@ -2011,8 +2003,8 @@ If there is no completion possible, say so and continue searching."
2011 2003
2012(defun isearch-message-suffix (&optional c-q-hack ellipsis) 2004(defun isearch-message-suffix (&optional c-q-hack ellipsis)
2013 (concat (if c-q-hack "^Q" "") 2005 (concat (if c-q-hack "^Q" "")
2014 (if isearch-invalid-regexp 2006 (if isearch-error
2015 (concat " [" isearch-invalid-regexp "]") 2007 (concat " [" isearch-error "]")
2016 ""))) 2008 "")))
2017 2009
2018 2010
@@ -2049,8 +2041,7 @@ Can be changed via `isearch-search-fun-function' for special needs."
2049 (case-fold-search isearch-case-fold-search) 2041 (case-fold-search isearch-case-fold-search)
2050 (search-spaces-regexp search-whitespace-regexp) 2042 (search-spaces-regexp search-whitespace-regexp)
2051 (retry t)) 2043 (retry t))
2052 (if isearch-regexp (setq isearch-invalid-regexp nil)) 2044 (setq isearch-error nil)
2053 (setq isearch-within-brackets nil)
2054 (while retry 2045 (while retry
2055 (setq isearch-success 2046 (setq isearch-success
2056 (funcall 2047 (funcall
@@ -2074,16 +2065,19 @@ Can be changed via `isearch-search-fun-function' for special needs."
2074 (setq isearch-success nil)) 2065 (setq isearch-success nil))
2075 2066
2076 (invalid-regexp 2067 (invalid-regexp
2077 (setq isearch-invalid-regexp (car (cdr lossage))) 2068 (setq isearch-error (car (cdr lossage)))
2078 (setq isearch-within-brackets (string-match "\\`Unmatched \\["
2079 isearch-invalid-regexp))
2080 (if (string-match 2069 (if (string-match
2081 "\\`Premature \\|\\`Unmatched \\|\\`Invalid " 2070 "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
2082 isearch-invalid-regexp) 2071 isearch-error)
2083 (setq isearch-invalid-regexp "incomplete input"))) 2072 (setq isearch-error "incomplete input")))
2073
2074 (search-failed
2075 (setq isearch-success nil)
2076 (setq isearch-error (nth 2 lossage)))
2077
2084 (error 2078 (error
2085 ;; stack overflow in regexp search. 2079 ;; stack overflow in regexp search.
2086 (setq isearch-invalid-regexp (format "%s" lossage)))) 2080 (setq isearch-error (format "%s" lossage))))
2087 2081
2088 (if isearch-success 2082 (if isearch-success
2089 nil 2083 nil
@@ -2315,7 +2309,7 @@ since they have special meaning in a regexp."
2315;; `isearch-word' and `isearch-regexp'; 2309;; `isearch-word' and `isearch-regexp';
2316;; - the direction of the current search is expected to be given by 2310;; - the direction of the current search is expected to be given by
2317;; `isearch-forward'; 2311;; `isearch-forward';
2318;; - the variable `isearch-invalid-regexp' is expected to be true 2312;; - the variable `isearch-error' is expected to be true
2319;; iff `isearch-string' is an invalid regexp. 2313;; iff `isearch-string' is an invalid regexp.
2320 2314
2321(defvar isearch-lazy-highlight-overlays nil) 2315(defvar isearch-lazy-highlight-overlays nil)
@@ -2369,7 +2363,7 @@ by other Emacs features."
2369 isearch-lazy-highlight-window-end)))) 2363 isearch-lazy-highlight-window-end))))
2370 ;; something important did indeed change 2364 ;; something important did indeed change
2371 (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays 2365 (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays
2372 (when (not isearch-invalid-regexp) 2366 (when (not isearch-error)
2373 (setq isearch-lazy-highlight-start-limit beg 2367 (setq isearch-lazy-highlight-start-limit beg
2374 isearch-lazy-highlight-end-limit end) 2368 isearch-lazy-highlight-end-limit end)
2375 (setq isearch-lazy-highlight-window (selected-window) 2369 (setq isearch-lazy-highlight-window (selected-window)
@@ -2391,18 +2385,20 @@ by other Emacs features."
2391Attempt to do the search exactly the way the pending isearch would." 2385Attempt to do the search exactly the way the pending isearch would."
2392 (let ((case-fold-search isearch-case-fold-search) 2386 (let ((case-fold-search isearch-case-fold-search)
2393 (search-spaces-regexp search-whitespace-regexp)) 2387 (search-spaces-regexp search-whitespace-regexp))
2394 (funcall (isearch-search-fun) 2388 (condition-case nil
2395 isearch-string 2389 (funcall (isearch-search-fun)
2396 (if isearch-forward 2390 isearch-string
2397 (min (or isearch-lazy-highlight-end-limit (point-max)) 2391 (if isearch-forward
2398 (if isearch-lazy-highlight-wrapped 2392 (min (or isearch-lazy-highlight-end-limit (point-max))
2399 isearch-lazy-highlight-start 2393 (if isearch-lazy-highlight-wrapped
2400 (window-end))) 2394 isearch-lazy-highlight-start
2401 (max (or isearch-lazy-highlight-start-limit (point-min)) 2395 (window-end)))
2402 (if isearch-lazy-highlight-wrapped 2396 (max (or isearch-lazy-highlight-start-limit (point-min))
2403 isearch-lazy-highlight-end 2397 (if isearch-lazy-highlight-wrapped
2404 (window-start)))) 2398 isearch-lazy-highlight-end
2405 t))) 2399 (window-start))))
2400 t)
2401 (error nil))))
2406 2402
2407(defun isearch-lazy-highlight-update () 2403(defun isearch-lazy-highlight-update ()
2408 "Update highlighting of other matches for current search." 2404 "Update highlighting of other matches for current search."
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 78c8e976269..9b5708d6503 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -815,8 +815,9 @@ the effect of `browse-url-new-window-flag'.
815When called non-interactively, optional second argument NEW-WINDOW is 815When called non-interactively, optional second argument NEW-WINDOW is
816used instead of `browse-url-new-window-flag'. 816used instead of `browse-url-new-window-flag'.
817 817
818The order attempted is gnome-moz-remote, Mozilla, Galeon, Netscape, 818The order attempted is gnome-moz-remote, Mozilla, Galeon,
819Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3." 819Konqueror, Netscape, Mosaic, IXI Mosaic, Lynx in an xterm, MMM,
820and then W3."
820 (apply 821 (apply
821 (cond 822 (cond
822 ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) 823 ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el
index a4eda95e23e..2cbb00b324c 100644
--- a/lisp/pcvs-util.el
+++ b/lisp/pcvs-util.el
@@ -1,7 +1,7 @@
1;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- 1;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*-
2 2
3;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4;; 2000, 2001, 2004 Free Software Foundation, Inc. 4;; 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Stefan Monnier <monnier@cs.yale.edu> 6;; Author: Stefan Monnier <monnier@cs.yale.edu>
7;; Keywords: pcl-cvs 7;; Keywords: pcl-cvs
@@ -205,8 +205,8 @@ It understands elisp style quoting within STRING such that
205The SEPARATOR regexp defaults to \"\\s-+\"." 205The SEPARATOR regexp defaults to \"\\s-+\"."
206 (let ((sep (or separator "\\s-+")) 206 (let ((sep (or separator "\\s-+"))
207 (i (string-match "[\"]" string))) 207 (i (string-match "[\"]" string)))
208 (if (null i) (split-string string sep) ; no quoting: easy 208 (if (null i) (split-string string sep t) ; no quoting: easy
209 (append (unless (eq i 0) (split-string (substring string 0 i) sep)) 209 (append (unless (eq i 0) (split-string (substring string 0 i) sep t))
210 (let ((rfs (read-from-string string i))) 210 (let ((rfs (read-from-string string i)))
211 (cons (car rfs) 211 (cons (car rfs)
212 (cvs-string->strings (substring string (cdr rfs)) 212 (cvs-string->strings (substring string (cdr rfs))
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index 2c0016dcc47..b00de07e50f 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -1704,8 +1704,6 @@ Signal an error if there is no backup file."
1704 (message "Retrieving revision %s... Done" rev) 1704 (message "Retrieving revision %s... Done" rev)
1705 (current-buffer)))))) 1705 (current-buffer))))))
1706 1706
1707(eval-and-compile (autoload 'smerge-ediff "smerge-mode"))
1708
1709;; FIXME: The user should be able to specify ancestor/head/backup and we should 1707;; FIXME: The user should be able to specify ancestor/head/backup and we should
1710;; provide sensible defaults when merge info is unavailable (rather than rely 1708;; provide sensible defaults when merge info is unavailable (rather than rely
1711;; on smerge-ediff). Also provide sane defaults for need-merge files. 1709;; on smerge-ediff). Also provide sane defaults for need-merge files.
diff --git a/lisp/play/animate.el b/lisp/play/animate.el
index 23e7939f47a..dcbf3bc2610 100644
--- a/lisp/play/animate.el
+++ b/lisp/play/animate.el
@@ -80,9 +80,11 @@
80;;; Place the character CHAR at position VPOS, HPOS in the current buffer. 80;;; Place the character CHAR at position VPOS, HPOS in the current buffer.
81(defun animate-place-char (char vpos hpos) 81(defun animate-place-char (char vpos hpos)
82 (goto-char (window-start)) 82 (goto-char (window-start))
83 (let ((next-line-add-newlines t)) 83 (let (abbrev-mode)
84 (dotimes (i vpos) 84 (dotimes (i vpos)
85 (next-line 1))) 85 (end-of-line)
86 (if (= (forward-line 1) 1)
87 (insert "\n"))))
86 (beginning-of-line) 88 (beginning-of-line)
87 (move-to-column (floor hpos) t) 89 (move-to-column (floor hpos) t)
88 (unless (eolp) (delete-char 1)) 90 (unless (eolp) (delete-char 1))
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index 861c3bbb8c6..81ed7780a64 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -284,13 +284,13 @@ See `imenu-generic-expression' for details."
284 284
285(defvar dcl-mode-syntax-table nil 285(defvar dcl-mode-syntax-table nil
286 "Syntax table used in DCL-buffers.") 286 "Syntax table used in DCL-buffers.")
287(if dcl-mode-syntax-table 287(unless dcl-mode-syntax-table
288 ()
289 (setq dcl-mode-syntax-table (make-syntax-table)) 288 (setq dcl-mode-syntax-table (make-syntax-table))
290 (modify-syntax-entry ?! "<" dcl-mode-syntax-table) ; comment start 289 (modify-syntax-entry ?! "<" dcl-mode-syntax-table) ; comment start
291 (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end 290 (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end
292 (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ... 291 (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ...
293 (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair 292 (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair
293 (modify-syntax-entry ?\\ "_" dcl-mode-syntax-table) ; not an escape
294) 294)
295 295
296 296
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 4fc259cae51..86d0bfaaf4b 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -351,7 +351,7 @@ detailed description of this mode.
351 ,(nth 1 var) nil)))) 351 ,(nth 1 var) nil))))
352 (setq gdb-var-changed t))) 352 (setq gdb-var-changed t)))
353 (if (re-search-forward "Undefined command" nil t) 353 (if (re-search-forward "Undefined command" nil t)
354 (message "Watching expressions requires gdb 6.0 onwards") 354 (message-box "Watching expressions requires gdb 6.0 onwards")
355 (message "No symbol %s in current context." expr))))) 355 (message "No symbol %s in current context." expr)))))
356 356
357(defun gdb-var-evaluate-expression-handler (varnum changed) 357(defun gdb-var-evaluate-expression-handler (varnum changed)
@@ -2119,13 +2119,8 @@ Put in buffer and place breakpoint icon."
2119 (push (cons bptno (match-string 0)) gdb-location-list)) 2119 (push (cons bptno (match-string 0)) gdb-location-list))
2120 (gdb-resync) 2120 (gdb-resync)
2121 (push (cons bptno "File not found") gdb-location-list) 2121 (push (cons bptno "File not found") gdb-location-list)
2122 (if (eq window-system 'x) 2122 (message-box "Cannot find source file for breakpoint location.\n\
2123 (x-popup-dialog 2123Add directory to search path for source files using the GDB command, dir.")
2124 t '("Cannot find source file for breakpoint location.\n\
2125Add directory to search path for source files using the GDB command, dir."
2126 ("Ok" . nil)))
2127 (message "Cannot find source file for breakpoint location.\n\
2128Add directory to search path for source files using the GDB command, dir."))
2129 (throw 'file-not-found nil)) 2124 (throw 'file-not-found nil))
2130 (with-current-buffer 2125 (with-current-buffer
2131 (find-file-noselect (match-string 0)) 2126 (find-file-noselect (match-string 0))
diff --git a/lisp/simple.el b/lisp/simple.el
index d0d5f9f0170..99e826a6d18 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3181,8 +3181,9 @@ commands which are sensitive to the Transient Mark mode."
3181 :version "21.1" 3181 :version "21.1"
3182 :group 'editing-basics) 3182 :group 'editing-basics)
3183 3183
3184(defun next-line (&optional arg) 3184(defun next-line (&optional arg try-vscroll)
3185 "Move cursor vertically down ARG lines. 3185 "Move cursor vertically down ARG lines.
3186Interactively, vscroll tall lines if `auto-window-vscroll' is enabled.
3186If there is no character in the target line exactly under the current column, 3187If there is no character in the target line exactly under the current column,
3187the cursor is positioned after the character in that line which spans this 3188the cursor is positioned after the character in that line which spans this
3188column, or at the end of the line if it is not long enough. 3189column, or at the end of the line if it is not long enough.
@@ -3201,7 +3202,7 @@ when there is no goal column.
3201If you are thinking of using this in a Lisp program, consider 3202If you are thinking of using this in a Lisp program, consider
3202using `forward-line' instead. It is usually easier to use 3203using `forward-line' instead. It is usually easier to use
3203and more reliable (no dependence on goal column, etc.)." 3204and more reliable (no dependence on goal column, etc.)."
3204 (interactive "p") 3205 (interactive "p\np")
3205 (or arg (setq arg 1)) 3206 (or arg (setq arg 1))
3206 (if (and next-line-add-newlines (= arg 1)) 3207 (if (and next-line-add-newlines (= arg 1))
3207 (if (save-excursion (end-of-line) (eobp)) 3208 (if (save-excursion (end-of-line) (eobp))
@@ -3209,16 +3210,17 @@ and more reliable (no dependence on goal column, etc.)."
3209 (let ((abbrev-mode nil)) 3210 (let ((abbrev-mode nil))
3210 (end-of-line) 3211 (end-of-line)
3211 (insert "\n")) 3212 (insert "\n"))
3212 (line-move arg nil nil t)) 3213 (line-move arg nil nil try-vscroll))
3213 (if (interactive-p) 3214 (if (interactive-p)
3214 (condition-case nil 3215 (condition-case nil
3215 (line-move arg nil nil t) 3216 (line-move arg nil nil try-vscroll)
3216 ((beginning-of-buffer end-of-buffer) (ding))) 3217 ((beginning-of-buffer end-of-buffer) (ding)))
3217 (line-move arg nil nil t))) 3218 (line-move arg nil nil try-vscroll)))
3218 nil) 3219 nil)
3219 3220
3220(defun previous-line (&optional arg) 3221(defun previous-line (&optional arg try-vscroll)
3221 "Move cursor vertically up ARG lines. 3222 "Move cursor vertically up ARG lines.
3223Interactively, vscroll tall lines if `auto-window-vscroll' is enabled.
3222If there is no character in the target line exactly over the current column, 3224If there is no character in the target line exactly over the current column,
3223the cursor is positioned after the character in that line which spans this 3225the cursor is positioned after the character in that line which spans this
3224column, or at the end of the line if it is not long enough. 3226column, or at the end of the line if it is not long enough.
@@ -3233,13 +3235,13 @@ when there is no goal column.
3233If you are thinking of using this in a Lisp program, consider using 3235If you are thinking of using this in a Lisp program, consider using
3234`forward-line' with a negative argument instead. It is usually easier 3236`forward-line' with a negative argument instead. It is usually easier
3235to use and more reliable (no dependence on goal column, etc.)." 3237to use and more reliable (no dependence on goal column, etc.)."
3236 (interactive "p") 3238 (interactive "p\np")
3237 (or arg (setq arg 1)) 3239 (or arg (setq arg 1))
3238 (if (interactive-p) 3240 (if (interactive-p)
3239 (condition-case nil 3241 (condition-case nil
3240 (line-move (- arg) nil nil t) 3242 (line-move (- arg) nil nil try-vscroll)
3241 ((beginning-of-buffer end-of-buffer) (ding))) 3243 ((beginning-of-buffer end-of-buffer) (ding)))
3242 (line-move (- arg) nil nil t)) 3244 (line-move (- arg) nil nil try-vscroll))
3243 nil) 3245 nil)
3244 3246
3245(defcustom track-eol nil 3247(defcustom track-eol nil
@@ -3278,8 +3280,11 @@ Outline mode sets this."
3278 (assq prop buffer-invisibility-spec))))) 3280 (assq prop buffer-invisibility-spec)))))
3279 3281
3280;; Perform vertical scrolling of tall images if necessary. 3282;; Perform vertical scrolling of tall images if necessary.
3283;; Don't vscroll in a keyboard macro.
3281(defun line-move (arg &optional noerror to-end try-vscroll) 3284(defun line-move (arg &optional noerror to-end try-vscroll)
3282 (if (and auto-window-vscroll try-vscroll) 3285 (if (and auto-window-vscroll try-vscroll
3286 (not defining-kbd-macro)
3287 (not executing-kbd-macro))
3283 (let ((forward (> arg 0)) 3288 (let ((forward (> arg 0))
3284 (part (nth 2 (pos-visible-in-window-p (point) nil t)))) 3289 (part (nth 2 (pos-visible-in-window-p (point) nil t))))
3285 (if (and (consp part) 3290 (if (and (consp part)
@@ -5068,6 +5073,7 @@ the front of the list of recently selected ones."
5068(defcustom normal-erase-is-backspace 5073(defcustom normal-erase-is-backspace
5069 (and (not noninteractive) 5074 (and (not noninteractive)
5070 (or (memq system-type '(ms-dos windows-nt)) 5075 (or (memq system-type '(ms-dos windows-nt))
5076 (eq initial-window-system 'mac)
5071 (and (memq initial-window-system '(x)) 5077 (and (memq initial-window-system '(x))
5072 (fboundp 'x-backspace-delete-keys-p) 5078 (fboundp 'x-backspace-delete-keys-p)
5073 (x-backspace-delete-keys-p)) 5079 (x-backspace-delete-keys-p))
diff --git a/lisp/subr.el b/lisp/subr.el
index b318f224918..27abec6781a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -37,27 +37,6 @@ Each element of this list holds the arguments to one call to `defcustom'.")
37 (cons arguments custom-declare-variable-list))) 37 (cons arguments custom-declare-variable-list)))
38 38
39 39
40(defun macro-declaration-function (macro decl)
41 "Process a declaration found in a macro definition.
42This is set as the value of the variable `macro-declaration-function'.
43MACRO is the name of the macro being defined.
44DECL is a list `(declare ...)' containing the declarations.
45The return value of this function is not used."
46 ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons.
47 (let (d)
48 ;; Ignore the first element of `decl' (it's always `declare').
49 (while (setq decl (cdr decl))
50 (setq d (car decl))
51 (cond ((and (consp d) (eq (car d) 'indent))
52 (put macro 'lisp-indent-function (car (cdr d))))
53 ((and (consp d) (eq (car d) 'debug))
54 (put macro 'edebug-form-spec (car (cdr d))))
55 (t
56 (message "Unknown declaration %s" d))))))
57
58(setq macro-declaration-function 'macro-declaration-function)
59
60
61;;;; Lisp language features. 40;;;; Lisp language features.
62 41
63(defalias 'not 'null) 42(defalias 'not 'null)
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index d43264f275e..69438c349a4 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1010,20 +1010,29 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
1010 1010
1011;; Map certain keypad keys into ASCII characters 1011;; Map certain keypad keys into ASCII characters
1012;; that people usually expect. 1012;; that people usually expect.
1013(define-key function-key-map [return] [?\C-m])
1014(define-key function-key-map [M-return] [?\M-\C-m])
1015(define-key function-key-map [tab] [?\t])
1016(define-key function-key-map [M-tab] [?\M-\t])
1017(define-key function-key-map [backspace] [?\d]) 1013(define-key function-key-map [backspace] [?\d])
1018(define-key function-key-map [M-backspace] [?\M-\d]) 1014(define-key function-key-map [delete] [?\d])
1015(define-key function-key-map [tab] [?\t])
1016(define-key function-key-map [linefeed] [?\n])
1017(define-key function-key-map [clear] [?\C-l])
1018(define-key function-key-map [return] [?\C-m])
1019(define-key function-key-map [escape] [?\e]) 1019(define-key function-key-map [escape] [?\e])
1020(define-key function-key-map [M-backspace] [?\M-\d])
1021(define-key function-key-map [M-delete] [?\M-\d])
1022(define-key function-key-map [M-tab] [?\M-\t])
1023(define-key function-key-map [M-linefeed] [?\M-\n])
1024(define-key function-key-map [M-clear] [?\M-\C-l])
1025(define-key function-key-map [M-return] [?\M-\C-m])
1020(define-key function-key-map [M-escape] [?\M-\e]) 1026(define-key function-key-map [M-escape] [?\M-\e])
1021 1027
1022;; These tell read-char how to convert 1028;; These tell read-char how to convert
1023;; these special chars to ASCII. 1029;; these special chars to ASCII.
1024(put 'return 'ascii-character ?\C-m)
1025(put 'tab 'ascii-character ?\t)
1026(put 'backspace 'ascii-character ?\d) 1030(put 'backspace 'ascii-character ?\d)
1031(put 'delete 'ascii-character ?\d)
1032(put 'tab 'ascii-character ?\t)
1033(put 'linefeed 'ascii-character ?\n)
1034(put 'clear 'ascii-character ?\C-l)
1035(put 'return 'ascii-character ?\C-m)
1027(put 'escape 'ascii-character ?\e) 1036(put 'escape 'ascii-character ?\e)
1028 1037
1029 1038
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index dfd471a87c4..ccd7f21f502 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -1,4 +1,4 @@
1;;; fill.el --- fill commands for Emacs 1;;; fill.el --- fill commands for Emacs -*- coding: iso-2022-7bit -*-
2 2
3;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 3;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
@@ -87,7 +87,7 @@ reinserts the fill prefix in each resulting line."
87(defcustom adaptive-fill-regexp 87(defcustom adaptive-fill-regexp
88 ;; Added `!' for doxygen comments starting with `//!' or `/*!'. 88 ;; Added `!' for doxygen comments starting with `//!' or `/*!'.
89 ;; Added `%' for TeX comments. 89 ;; Added `%' for TeX comments.
90 (purecopy "[ \t]*\\([-!|#%;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*") 90 (purecopy "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*")
91 "*Regexp to match text at start of line that constitutes indentation. 91 "*Regexp to match text at start of line that constitutes indentation.
92If Adaptive Fill mode is enabled, a prefix matching this pattern 92If Adaptive Fill mode is enabled, a prefix matching this pattern
93on the first and second lines of a paragraph is used as the 93on the first and second lines of a paragraph is used as the
@@ -304,12 +304,12 @@ after an opening paren or just before a closing paren or a punctuation
304mark such as `?' or `:'. It is common in French writing to put a space 304mark such as `?' or `:'. It is common in French writing to put a space
305at such places, which would normally allow breaking the line at those 305at such places, which would normally allow breaking the line at those
306places." 306places."
307 (or (looking-at "[ \t]*[])}»?!;:-]") 307 (or (looking-at "[ \t]*[])},A;,b;(B?!;:-]")
308 (save-excursion 308 (save-excursion
309 (skip-chars-backward " \t") 309 (skip-chars-backward " \t")
310 (unless (bolp) 310 (unless (bolp)
311 (backward-char 1) 311 (backward-char 1)
312 (or (looking-at "[([{«]") 312 (or (looking-at "[([{,A+,b+(B]")
313 ;; Don't cut right after a single-letter word. 313 ;; Don't cut right after a single-letter word.
314 (and (memq (preceding-char) '(?\t ?\ )) 314 (and (memq (preceding-char) '(?\t ?\ ))
315 (eq (char-syntax (following-char)) ?w))))))) 315 (eq (char-syntax (following-char)) ?w)))))))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 2a84d584634..38f69bd2250 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1406,6 +1406,14 @@ This allows it to improve the suggestion list based on actual mispellings."
1406 (setq more-lines (= 0 (forward-line)))))))))))))) 1406 (setq more-lines (= 0 (forward-line))))))))))))))
1407 1407
1408 1408
1409;; Insert WORD while translating Latin characters to the equivalent
1410;; characters that is supported by buffer-file-coding-system.
1411
1412(defun ispell-insert-word (word)
1413 (let ((pos (point)))
1414 (insert word)
1415 (if (char-table-p translation-table-for-input)
1416 (translate-region pos (point) translation-table-for-input))))
1409 1417
1410;;;###autoload 1418;;;###autoload
1411(defun ispell-word (&optional following quietly continue) 1419(defun ispell-word (&optional following quietly continue)
@@ -1504,7 +1512,7 @@ quit spell session exited."
1504 (progn 1512 (progn
1505 (delete-region start end) 1513 (delete-region start end)
1506 (setq start (point)) 1514 (setq start (point))
1507 (insert new-word) 1515 (ispell-insert-word new-word)
1508 (setq end (point)))) 1516 (setq end (point))))
1509 (if (not (atom replace)) ;recheck spelling of replacement 1517 (if (not (atom replace)) ;recheck spelling of replacement
1510 (progn 1518 (progn
@@ -2883,7 +2891,7 @@ Returns the sum shift due to changes in word replacements."
2883 (delete-region (point) (+ word-len (point))) 2891 (delete-region (point) (+ word-len (point)))
2884 (if (not (listp replace)) 2892 (if (not (listp replace))
2885 (progn 2893 (progn
2886 (insert replace) ; insert dictionary word 2894 (ispell-insert-word replace) ; insert dictionary word
2887 (ispell-send-replacement (car poss) replace) 2895 (ispell-send-replacement (car poss) replace)
2888 (setq accept-list (cons replace accept-list))) 2896 (setq accept-list (cons replace accept-list)))
2889 (let ((replace-word (car replace))) 2897 (let ((replace-word (car replace)))
@@ -3052,7 +3060,7 @@ Standard ispell choices are then available."
3052 (setq word (if (atom replacement) replacement (car replacement)) 3060 (setq word (if (atom replacement) replacement (car replacement))
3053 cursor-location (+ (- (length word) (- end start)) 3061 cursor-location (+ (- (length word) (- end start))
3054 cursor-location)) 3062 cursor-location))
3055 (insert word) 3063 (ispell-insert-word word)
3056 (if (not (atom replacement)) ; recheck spelling of replacement. 3064 (if (not (atom replacement)) ; recheck spelling of replacement.
3057 (progn 3065 (progn
3058 (goto-char cursor-location) 3066 (goto-char cursor-location)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 694903b1fb6..6fcf5869143 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -350,7 +350,7 @@ an optional alist of possible values."
350 "*When non-nil, tag insertion functions will be XML-compliant. 350 "*When non-nil, tag insertion functions will be XML-compliant.
351If this variable is customized, the custom value is used always. 351If this variable is customized, the custom value is used always.
352Otherwise, it is set to be buffer-local when the file has 352Otherwise, it is set to be buffer-local when the file has
353 a DOCTYPE or an XML declaration." 353a DOCTYPE or an XML declaration."
354 :type 'boolean 354 :type 'boolean
355 :version "22.1" 355 :version "22.1"
356 :group 'sgml) 356 :group 'sgml)
@@ -629,7 +629,7 @@ skeleton-transformation RET upcase RET, or put this in your `.emacs':
629 (backward-char) 629 (backward-char)
630 '(("") " [ " _ " ]]")) 630 '(("") " [ " _ " ]]"))
631 ((and (eq v2 t) sgml-xml-mode (member ,str sgml-empty-tags)) 631 ((and (eq v2 t) sgml-xml-mode (member ,str sgml-empty-tags))
632 '(("") -1 "/>")) 632 '(("") -1 " />"))
633 ((or (and (eq v2 t) (not sgml-xml-mode)) (string-match "^[/!?]" ,str)) 633 ((or (and (eq v2 t) (not sgml-xml-mode)) (string-match "^[/!?]" ,str))
634 nil) 634 nil)
635 ((symbolp v2) 635 ((symbolp v2)
@@ -818,7 +818,8 @@ With prefix argument ARG, repeat this ARG times."
818 (goto-char close) 818 (goto-char close)
819 (kill-sexp 1)) 819 (kill-sexp 1))
820 (setq open (point)) 820 (setq open (point))
821 (when (sgml-skip-tag-forward 1) 821 (when (and (sgml-skip-tag-forward 1)
822 (not (looking-back "/>")))
822 (kill-sexp -1))) 823 (kill-sexp -1)))
823 ;; Delete any resulting empty line. If we didn't kill-sexp, 824 ;; Delete any resulting empty line. If we didn't kill-sexp,
824 ;; this *should* do nothing, because we're right after the tag. 825 ;; this *should* do nothing, because we're right after the tag.
@@ -1572,7 +1573,7 @@ This takes effect when first loading the library.")
1572 ("dir" ,@list) 1573 ("dir" ,@list)
1573 ("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7) 1574 ("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7)
1574 ("form" (\n _ \n "<input type=\"submit\" value=\"\"" 1575 ("form" (\n _ \n "<input type=\"submit\" value=\"\""
1575 (if sgml-xml-mode "/>" ">")) 1576 (if sgml-xml-mode " />" ">"))
1576 ("action" ,@(cdr href)) ("method" ("get") ("post"))) 1577 ("action" ,@(cdr href)) ("method" ("get") ("post")))
1577 ("h1" ,@align) 1578 ("h1" ,@align)
1578 ("h2" ,@align) 1579 ("h2" ,@align)
@@ -1891,13 +1892,15 @@ Can be used as a value for `html-mode-hook'."
1891(define-skeleton html-href-anchor 1892(define-skeleton html-href-anchor
1892 "HTML anchor tag with href attribute." 1893 "HTML anchor tag with href attribute."
1893 "URL: " 1894 "URL: "
1894 '(setq input "http:") 1895 ;; '(setq input "http:")
1895 "<a href=\"" str "\">" _ "</a>") 1896 "<a href=\"" str "\">" _ "</a>")
1896 1897
1897(define-skeleton html-name-anchor 1898(define-skeleton html-name-anchor
1898 "HTML anchor tag with name attribute." 1899 "HTML anchor tag with name attribute."
1899 "Name: " 1900 "Name: "
1900 "<a name=\"" str "\">" _ "</a>") 1901 "<a name=\"" str "\""
1902 (if sgml-xml-mode (concat " id=\"" str "\""))
1903 ">" _ "</a>")
1901 1904
1902(define-skeleton html-headline-1 1905(define-skeleton html-headline-1
1903 "HTML level 1 headline tags." 1906 "HTML level 1 headline tags."
@@ -1932,18 +1935,18 @@ Can be used as a value for `html-mode-hook'."
1932(define-skeleton html-horizontal-rule 1935(define-skeleton html-horizontal-rule
1933 "HTML horizontal rule tag." 1936 "HTML horizontal rule tag."
1934 nil 1937 nil
1935 (if sgml-xml-mode "<hr/>" "<hr>") \n) 1938 (if sgml-xml-mode "<hr />" "<hr>") \n)
1936 1939
1937(define-skeleton html-image 1940(define-skeleton html-image
1938 "HTML image tag." 1941 "HTML image tag."
1939 nil 1942 "Image URL: "
1940 "<img src=\"" _ "\"" 1943 "<img src=\"" str "\" alt=\"" _ "\""
1941 (if sgml-xml-mode "/>" ">")) 1944 (if sgml-xml-mode " />" ">"))
1942 1945
1943(define-skeleton html-line 1946(define-skeleton html-line
1944 "HTML line break tag." 1947 "HTML line break tag."
1945 nil 1948 nil
1946 (if sgml-xml-mode "<br/>" "<br>") \n) 1949 (if sgml-xml-mode "<br />" "<br>") \n)
1947 1950
1948(define-skeleton html-ordered-list 1951(define-skeleton html-ordered-list
1949 "HTML ordered list tags." 1952 "HTML ordered list tags."
@@ -1969,7 +1972,7 @@ Can be used as a value for `html-mode-hook'."
1969 "HTML paragraph tag." 1972 "HTML paragraph tag."
1970 nil 1973 nil
1971 (if (bolp) nil ?\n) 1974 (if (bolp) nil ?\n)
1972 \n "<p>" _ (if sgml-xml-mode "</p>")) 1975 "<p>" _ (if sgml-xml-mode "</p>"))
1973 1976
1974(define-skeleton html-checkboxes 1977(define-skeleton html-checkboxes
1975 "Group of connected checkbox inputs." 1978 "Group of connected checkbox inputs."
@@ -1981,12 +1984,13 @@ Can be used as a value for `html-mode-hook'."
1981 "\" name=\"" (or v1 (setq v1 (skeleton-read "Name: "))) 1984 "\" name=\"" (or v1 (setq v1 (skeleton-read "Name: ")))
1982 "\" value=\"" str ?\" 1985 "\" value=\"" str ?\"
1983 (when (y-or-n-p "Set \"checked\" attribute? ") 1986 (when (y-or-n-p "Set \"checked\" attribute? ")
1984 (funcall skeleton-transformation " checked")) 1987 (funcall skeleton-transformation
1985 (if sgml-xml-mode "/>" ">") 1988 (if sgml-xml-mode " checked=\"checked\"" " checked")))
1989 (if sgml-xml-mode " />" ">")
1986 (skeleton-read "Text: " (capitalize str)) 1990 (skeleton-read "Text: " (capitalize str))
1987 (or v2 (setq v2 (if (y-or-n-p "Newline after text? ") 1991 (or v2 (setq v2 (if (y-or-n-p "Newline after text? ")
1988 (funcall skeleton-transformation 1992 (funcall skeleton-transformation
1989 (if sgml-xml-mode "<br/>" "<br>")) 1993 (if sgml-xml-mode "<br />" "<br>"))
1990 ""))) 1994 "")))
1991 \n)) 1995 \n))
1992 1996
@@ -2000,12 +2004,13 @@ Can be used as a value for `html-mode-hook'."
2000 "\" name=\"" (or (car v2) (setcar v2 (skeleton-read "Name: "))) 2004 "\" name=\"" (or (car v2) (setcar v2 (skeleton-read "Name: ")))
2001 "\" value=\"" str ?\" 2005 "\" value=\"" str ?\"
2002 (when (and (not v1) (setq v1 (y-or-n-p "Set \"checked\" attribute? "))) 2006 (when (and (not v1) (setq v1 (y-or-n-p "Set \"checked\" attribute? ")))
2003 (funcall skeleton-transformation " checked")) 2007 (funcall skeleton-transformation
2004 (if sgml-xml-mode "/>" ">") 2008 (if sgml-xml-mode " checked=\"checked\"" " checked")))
2009 (if sgml-xml-mode " />" ">")
2005 (skeleton-read "Text: " (capitalize str)) 2010 (skeleton-read "Text: " (capitalize str))
2006 (or (cdr v2) (setcdr v2 (if (y-or-n-p "Newline after text? ") 2011 (or (cdr v2) (setcdr v2 (if (y-or-n-p "Newline after text? ")
2007 (funcall skeleton-transformation 2012 (funcall skeleton-transformation
2008 (if sgml-xml-mode "<br/>" "<br>")) 2013 (if sgml-xml-mode "<br />" "<br>"))
2009 ""))) 2014 "")))
2010 \n)) 2015 \n))
2011 2016
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index c4ac57eac95..e4cab1beba1 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -1,6 +1,6 @@
1;;; tooltip.el --- show tooltip windows 1;;; tooltip.el --- show tooltip windows
2 2
3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Gerd Moellmann <gerd@acm.org> 6;; Author: Gerd Moellmann <gerd@acm.org>
@@ -41,8 +41,6 @@
41 :version "21.1" 41 :version "21.1"
42 :tag "Tool Tips") 42 :tag "Tool Tips")
43 43
44(defvar tooltip-mode)
45
46(defcustom tooltip-delay 0.7 44(defcustom tooltip-delay 0.7
47 "Seconds to wait before displaying a tooltip the first time." 45 "Seconds to wait before displaying a tooltip the first time."
48 :tag "Delay" 46 :tag "Delay"
@@ -122,11 +120,9 @@ position to pop up the tooltip."
122 "*Non-nil means show tooltips in GUD sessions." 120 "*Non-nil means show tooltips in GUD sessions."
123 :type 'boolean 121 :type 'boolean
124 :tag "GUD" 122 :tag "GUD"
125 :set #'(lambda (symbol on)
126 (setq tooltip-gud-tips-p on))
127 :group 'tooltip) 123 :group 'tooltip)
128 124
129(defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode) 125(defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode fortran-mode)
130 "List of modes for which to enable GUD tips." 126 "List of modes for which to enable GUD tips."
131 :type 'sexp 127 :type 'sexp
132 :tag "GUD modes" 128 :tag "GUD modes"
@@ -187,26 +183,23 @@ This might return nil if the event did not occur over a buffer."
187;; would be accompanied by a full redisplay. 183;; would be accompanied by a full redisplay.
188 184
189;;;###autoload 185;;;###autoload
190(defun tooltip-mode (&optional arg) 186(define-minor-mode tooltip-mode
191 "Mode for tooltip display. 187 "Toggle Tooltip display.
192With ARG, turn tooltip mode on if and only if ARG is positive." 188With ARG, turn tooltip mode on if and only if ARG is positive."
193 (interactive "P") 189 :global t
194 (unless (fboundp 'x-show-tip) 190 :group 'tooltip
191 (unless (or (null tooltip-mode) (fboundp 'x-show-tip))
195 (error "Sorry, tooltips are not yet available on this system")) 192 (error "Sorry, tooltips are not yet available on this system"))
196 (let* ((on (if arg 193 (let ((hook-fn (if tooltip-mode 'add-hook 'remove-hook)))
197 (> (prefix-numeric-value arg) 0)
198 (not tooltip-mode)))
199 (hook-fn (if on 'add-hook 'remove-hook)))
200 (setq tooltip-mode on)
201 (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode) 194 (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode)
202 (tooltip-activate-mouse-motions-if-enabled) 195 (tooltip-activate-mouse-motions-if-enabled)
203 (funcall hook-fn 'pre-command-hook 'tooltip-hide) 196 (funcall hook-fn 'pre-command-hook 'tooltip-hide)
204 (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips) 197 (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips)
205 (funcall hook-fn 'tooltip-hook 'tooltip-help-tips) 198 (funcall hook-fn 'tooltip-hook 'tooltip-help-tips)
206 (setq show-help-function (if on 'tooltip-show-help-function nil)) 199 (setq show-help-function (if tooltip-mode 'tooltip-show-help-function nil))
207 ;; `ignore' is the default binding for mouse movements. 200 ;; `ignore' is the default binding for mouse movements.
208 (define-key global-map [mouse-movement] 201 (define-key global-map [mouse-movement]
209 (if on 'tooltip-mouse-motion 'ignore)))) 202 (if tooltip-mode 'tooltip-mouse-motion 'ignore))))
210 203
211 204
212;;; Timeout for tooltip display 205;;; Timeout for tooltip display
@@ -246,16 +239,14 @@ With ARG, turn tooltip mode on if and only if ARG is positive."
246(defun tooltip-activate-mouse-motions-if-enabled () 239(defun tooltip-activate-mouse-motions-if-enabled ()
247 "Reconsider for all buffers whether mouse motion events are desired." 240 "Reconsider for all buffers whether mouse motion events are desired."
248 (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled) 241 (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled)
249 (let ((buffers (buffer-list))) 242 (dolist (buffer (buffer-list))
250 (save-excursion 243 (save-excursion
251 (while buffers 244 (set-buffer buffer)
252 (set-buffer (car buffers)) 245 (if (and tooltip-mode
253 (if (and tooltip-mode 246 tooltip-gud-tips-p
254 tooltip-gud-tips-p 247 (memq major-mode tooltip-gud-modes))
255 (memq major-mode tooltip-gud-modes)) 248 (tooltip-activate-mouse-motions t)
256 (tooltip-activate-mouse-motions t) 249 (tooltip-activate-mouse-motions nil)))))
257 (tooltip-activate-mouse-motions nil))
258 (setq buffers (cdr buffers))))))
259 250
260(defvar tooltip-mouse-motions-active nil 251(defvar tooltip-mouse-motions-active nil
261 "Locally t in a buffer if tooltip processing of mouse motion is enabled.") 252 "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
@@ -441,12 +432,11 @@ region for the tip window to be shown. If tooltip-gud-dereference is t,
441add a `*' in front of the printed expression. 432add a `*' in front of the printed expression.
442 433
443This function must return nil if it doesn't handle EVENT." 434This function must return nil if it doesn't handle EVENT."
444 (let (gud-buffer process) 435 (let (process)
445 (when (and (eventp event) 436 (when (and (eventp event)
446 tooltip-gud-tips-p 437 tooltip-gud-tips-p
447 (boundp 'gud-comint-buffer) 438 (boundp 'gud-comint-buffer)
448 (setq gud-buffer gud-comint-buffer) 439 (setq process (get-buffer-process gud-comint-buffer))
449 (setq process (get-buffer-process gud-buffer))
450 (posn-point (event-end event)) 440 (posn-point (event-end event))
451 (progn (setq tooltip-gud-event event) 441 (progn (setq tooltip-gud-event event)
452 (eval (cons 'and tooltip-gud-display)))) 442 (eval (cons 'and tooltip-gud-display))))
@@ -464,9 +454,11 @@ This function must return nil if it doesn't handle EVENT."
464 expr))))))) 454 expr)))))))
465 455
466(defun gdb-tooltip-print () 456(defun gdb-tooltip-print ()
467 (tooltip-show 457 (tooltip-show
468 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) 458 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
469 (buffer-string)))) 459 (let ((string (buffer-string)))
460 ;; remove newline for tooltip-use-echo-area
461 (substring string 0 (- (length string) 1))))))
470 462
471 463
472;;; Tooltip help. 464;;; Tooltip help.
@@ -520,23 +512,6 @@ Value is non-nil if this function handled the tip."
520 (tooltip-show tooltip-help-message) 512 (tooltip-show tooltip-help-message)
521 t)) 513 t))
522 514
523
524;;; Do this after all functions have been defined that are called from
525;;; `tooltip-mode'. The actual default value of `tooltip-mode' is set
526;;; in startup.el.
527
528;;;###autoload
529(defcustom tooltip-mode nil
530 "Non-nil if Tooltip mode is enabled.
531Setting this variable directly does not take effect;
532use either \\[customize] or the function `tooltip-mode'."
533 :set (lambda (symbol value)
534 (tooltip-mode (or value 0)))
535 :initialize 'custom-initialize-default
536 :type 'boolean
537 :require 'tooltip
538 :group 'tooltip)
539
540(provide 'tooltip) 515(provide 'tooltip)
541 516
542;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f 517;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f