aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2011-08-21 12:37:02 +0200
committerJoakim Verona2011-08-21 12:37:02 +0200
commit37dea37ce545a07a2f9b79139e826c5db05654c4 (patch)
treec915197c006e00dc3ed5fa551f7727cd7eefb08c
parent636890f209ede9cd3e058b0d26127a379e274073 (diff)
parentc21a496aed7c1b0a40312197ca4ccb7376e2d96f (diff)
downloademacs-37dea37ce545a07a2f9b79139e826c5db05654c4.tar.gz
emacs-37dea37ce545a07a2f9b79139e826c5db05654c4.zip
upstream
-rw-r--r--etc/NEWS2
-rw-r--r--leim/ChangeLog5
-rw-r--r--leim/Makefile.in1
-rw-r--r--leim/makefile.w32-in1
-rw-r--r--lisp/ChangeLog52
-rw-r--r--lisp/bindings.el1
-rw-r--r--lisp/files.el3
-rw-r--r--lisp/progmodes/cc-engine.el4
-rw-r--r--lisp/progmodes/cc-fonts.el214
-rw-r--r--lisp/progmodes/cc-langs.el17
-rw-r--r--lisp/startup.el2
-rw-r--r--lisp/tutorial.el11
-rw-r--r--lisp/window.el71
-rw-r--r--src/ChangeLog5
-rw-r--r--src/eval.c12
15 files changed, 275 insertions, 126 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ec863dacef8..cec19d0c0a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -407,7 +407,7 @@ If non-nil, C-d, [delete], and DEL delete the region if it is active
407and no prefix argument is given. If set to `kill', these commands 407and no prefix argument is given. If set to `kill', these commands
408kill instead. 408kill instead.
409 409
410*** New command `delete-forward-char', bound to C-d and [delete]. 410*** New command `delete-forward-char', bound to [delete].
411This is meant for interactive use, and obeys `delete-active-region'. 411This is meant for interactive use, and obeys `delete-active-region'.
412The command `delete-char' does not obey `delete-active-region'. 412The command `delete-char' does not obey `delete-active-region'.
413 413
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 5309671651b..2dbccf9be39 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,8 @@
12011-08-20 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (OTHERS):
4 * makefile.w32-in (MISC): Add ipa-praat.elc.
5
12011-07-23 Yair F <yair.f.lists@gmail.com> 62011-07-23 Yair F <yair.f.lists@gmail.com>
2 7
3 * quail/hebrew.el ("hebrew"): Additional key mappings. 8 * quail/hebrew.el ("hebrew"): Additional key mappings.
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 18eb8b62a96..87020616a57 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -124,6 +124,7 @@ OTHERS= \
124 ${srcdir}/quail/arabic.elc \ 124 ${srcdir}/quail/arabic.elc \
125 ${srcdir}/quail/ethiopic.elc \ 125 ${srcdir}/quail/ethiopic.elc \
126 ${srcdir}/quail/ipa.elc \ 126 ${srcdir}/quail/ipa.elc \
127 ${srcdir}/quail/ipa-praat.elc \
127 ${srcdir}/quail/hebrew.elc \ 128 ${srcdir}/quail/hebrew.elc \
128 ${srcdir}/quail/georgian.elc \ 129 ${srcdir}/quail/georgian.elc \
129 $(srcdir)/quail/persian.elc \ 130 $(srcdir)/quail/persian.elc \
diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in
index 1ab14c72b3d..231384308f2 100644
--- a/leim/makefile.w32-in
+++ b/leim/makefile.w32-in
@@ -118,6 +118,7 @@ MISC= \
118 $(srcdir)/quail/arabic.elc \ 118 $(srcdir)/quail/arabic.elc \
119 $(srcdir)/quail/ethiopic.elc \ 119 $(srcdir)/quail/ethiopic.elc \
120 $(srcdir)/quail/ipa.elc \ 120 $(srcdir)/quail/ipa.elc \
121 $(srcdir)/quail/ipa-praat.elc \
121 $(srcdir)/quail/hebrew.elc \ 122 $(srcdir)/quail/hebrew.elc \
122 $(srcdir)/quail/georgian.elc \ 123 $(srcdir)/quail/georgian.elc \
123 $(srcdir)/quail/persian.elc \ 124 $(srcdir)/quail/persian.elc \
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fcccc802203..c655c4968df 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,55 @@
12011-08-20 Glenn Morris <rgm@gnu.org>
2
3 * tutorial.el (help-with-tutorial): Avoid an error on short screens.
4
5 * tutorial.el (tutorial--default-keys): Update some default bindings.
6
7 * files.el (hack-local-variables): Fully ignore case for "mode:".
8
92011-08-20 Alan Mackenzie <acm@muc.de>
10
11 Resolve invalid use of a regexp in regexp-opt.
12
13 * cc-fonts.el (c-complex-decl-matchers): Add in special detection
14 for a java annotation.
15
16 * cc-engine.el (c-forward-decl-or-cast-1): Add in special
17 detection for a java annotation.
18
19 * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling
20 for java.
21 (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+".
22
232011-08-20 Chong Yidong <cyd@stupidchicken.com>
24
25 * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix
26 (Bug#9274).
27
282011-08-20 Alan Mackenzie <acm@muc.de>
29
30 * Fontify CPP expressions correctly when starting in the middle of
31 such a construct. Mainly for when jit-lock etc. starts a chunk
32 here.
33
34 * progmodes/cc-fonts.el (c-font-lock-context): new buffer local
35 variable.
36 (c-make-font-lock-search-form): new function, extracted from
37 c-make-font-lock-search-function.
38 (c-make-font-lock-search-function): Use the above function.
39 (c-make-font-lock-context-search-function): New function.
40 (c-cpp-matchers): Enhance the preprocessor expression case with
41 the above function
42 (c-font-lock-complex-decl-prepare): Test for being in a CPP form
43 which takes an expression.
44
45 * progmodes/cc-langs.el (c-cpp-expr-intro-re): New lang-variable.
46
472011-08-20 Martin Rudalics <rudalics@gmx.at>
48
49 * window.el (display-buffer-reuse-window)
50 (display-buffer-pop-up-window): Don't reuse or split a side
51 window.
52
12011-08-19 Glenn Morris <rgm@gnu.org> 532011-08-19 Glenn Morris <rgm@gnu.org>
2 54
3 * files.el (hack-local-variables-prop-line, hack-local-variables): 55 * files.el (hack-local-variables-prop-line, hack-local-variables):
diff --git a/lisp/bindings.el b/lisp/bindings.el
index c4f9369219a..57bfeb60f82 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -834,6 +834,7 @@ if `inhibit-field-text-motion' is non-nil."
834 (setq i (1+ i)))) 834 (setq i (1+ i))))
835(define-key global-map [?\C-\M--] 'negative-argument) 835(define-key global-map [?\C-\M--] 'negative-argument)
836 836
837;; Update tutorial--default-keys if you change these.
837(define-key global-map "\177" 'delete-backward-char) 838(define-key global-map "\177" 'delete-backward-char)
838(define-key global-map "\C-d" 'delete-char) 839(define-key global-map "\C-d" 'delete-char)
839 840
diff --git a/lisp/files.el b/lisp/files.el
index 8c7e63dda14..07188e152b3 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3154,7 +3154,8 @@ major-mode."
3154 (var (let ((read-circle nil)) 3154 (var (let ((read-circle nil))
3155 (read str))) 3155 (read str)))
3156 val val2) 3156 val val2)
3157 (and (eq var 'Mode) (setq var 'mode)) 3157 (and (equal (downcase (symbol-name var)) "mode")
3158 (setq var 'mode))
3158 ;; Read the variable value. 3159 ;; Read the variable value.
3159 (skip-chars-forward "^:") 3160 (skip-chars-forward "^:")
3160 (forward-char 1) 3161 (forward-char 1)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0d88f85d263..a1cbdc16560 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -6325,7 +6325,9 @@ comment at the start of cc-engine.el for more info."
6325 (let* ((start (point)) kwd-sym kwd-clause-end found-type) 6325 (let* ((start (point)) kwd-sym kwd-clause-end found-type)
6326 6326
6327 ;; Look for a specifier keyword clause. 6327 ;; Look for a specifier keyword clause.
6328 (when (looking-at c-prefix-spec-kwds-re) 6328 (when (or (looking-at c-prefix-spec-kwds-re)
6329 (and (c-major-mode-is 'java-mode)
6330 (looking-at "@[A-Za-z0-9]+")))
6329 (if (looking-at c-typedef-key) 6331 (if (looking-at c-typedef-key)
6330 (setq at-typedef t)) 6332 (setq at-typedef t))
6331 (setq kwd-sym (c-keyword-sym (match-string 1))) 6333 (setq kwd-sym (c-keyword-sym (match-string 1)))
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 2277ba760ab..3d5dc30d823 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -199,10 +199,16 @@
199(set-face-foreground 'c-annotation-face "blue") 199(set-face-foreground 'c-annotation-face "blue")
200 200
201(eval-and-compile 201(eval-and-compile
202 ;; We need the following functions during compilation since they're 202 ;; We need the following definitions during compilation since they're
203 ;; called when the `c-lang-defconst' initializers are evaluated. 203 ;; used when the `c-lang-defconst' initializers are evaluated. Define
204 ;; Define them at runtime too for the sake of derived modes. 204 ;; them at runtime too for the sake of derived modes.
205 205
206 ;; This indicates the "font locking context", and is set just before
207 ;; fontification is done. If non-nil, it says, e.g., point starts
208 ;; from within a #if preprocessor construct.
209 (defvar c-font-lock-context nil)
210 (make-variable-buffer-local 'c-font-lock-context)
211
206 (defmacro c-put-font-lock-face (from to face) 212 (defmacro c-put-font-lock-face (from to face)
207 ;; Put a face on a region (overriding any existing face) in the way 213 ;; Put a face on a region (overriding any existing face) in the way
208 ;; font-lock would do it. In XEmacs that means putting an 214 ;; font-lock would do it. In XEmacs that means putting an
@@ -283,6 +289,45 @@
283 nil))))) 289 nil)))))
284 res)))) 290 res))))
285 291
292 (defun c-make-font-lock-search-form (regexp highlights)
293 ;; Return a lisp form which will fontify every occurence of REGEXP
294 ;; (a regular expression, NOT a function) between POINT and `limit'
295 ;; with HIGHLIGHTS, a list of highlighters as specified on page
296 ;; "Search-based Fontification" in the elisp manual.
297 `(while (re-search-forward ,regexp limit t)
298 (unless (progn
299 (goto-char (match-beginning 0))
300 (c-skip-comments-and-strings limit))
301 (goto-char (match-end 0))
302 ,@(mapcar
303 (lambda (highlight)
304 (if (integerp (car highlight))
305 ;; e.g. highlight is (1 font-lock-type-face t)
306 (progn
307 (unless (eq (nth 2 highlight) t)
308 (error
309 "The override flag must currently be t in %s"
310 highlight))
311 (when (nth 3 highlight)
312 (error
313 "The laxmatch flag may currently not be set in %s"
314 highlight))
315 `(save-match-data
316 (c-put-font-lock-face
317 (match-beginning ,(car highlight))
318 (match-end ,(car highlight))
319 ,(elt highlight 1))))
320 ;; highlight is an "ANCHORED HIGHLIGHER" of the form
321 ;; (ANCHORED-MATCHER PRE-FORM POST-FORM SUBEXP-HIGHLIGHTERS...)
322 (when (nth 3 highlight)
323 (error "Match highlights currently not supported in %s"
324 highlight))
325 `(progn
326 ,(nth 1 highlight)
327 (save-match-data ,(car highlight))
328 ,(nth 2 highlight))))
329 highlights))))
330
286 (defun c-make-font-lock-search-function (regexp &rest highlights) 331 (defun c-make-font-lock-search-function (regexp &rest highlights)
287 ;; This function makes a byte compiled function that works much like 332 ;; This function makes a byte compiled function that works much like
288 ;; a matcher element in `font-lock-keywords'. It cuts out a little 333 ;; a matcher element in `font-lock-keywords'. It cuts out a little
@@ -313,43 +358,101 @@
313 ;; lambda more easily. 358 ;; lambda more easily.
314 (byte-compile 359 (byte-compile
315 `(lambda (limit) 360 `(lambda (limit)
316 (let (;; The font-lock package in Emacs is known to clobber 361 (let ( ;; The font-lock package in Emacs is known to clobber
317 ;; `parse-sexp-lookup-properties' (when it exists). 362 ;; `parse-sexp-lookup-properties' (when it exists).
318 (parse-sexp-lookup-properties 363 (parse-sexp-lookup-properties
319 (cc-eval-when-compile 364 (cc-eval-when-compile
320 (boundp 'parse-sexp-lookup-properties)))) 365 (boundp 'parse-sexp-lookup-properties))))
321 (while (re-search-forward ,regexp limit t) 366
322 (unless (progn 367 ;; (while (re-search-forward ,regexp limit t)
323 (goto-char (match-beginning 0)) 368 ;; (unless (progn
324 (c-skip-comments-and-strings limit)) 369 ;; (goto-char (match-beginning 0))
325 (goto-char (match-end 0)) 370 ;; (c-skip-comments-and-strings limit))
326 ,@(mapcar 371 ;; (goto-char (match-end 0))
327 (lambda (highlight) 372 ;; ,@(mapcar
328 (if (integerp (car highlight)) 373 ;; (lambda (highlight)
329 (progn 374 ;; (if (integerp (car highlight))
330 (unless (eq (nth 2 highlight) t) 375 ;; (progn
331 (error 376 ;; (unless (eq (nth 2 highlight) t)
332 "The override flag must currently be t in %s" 377 ;; (error
333 highlight)) 378 ;; "The override flag must currently be t in %s"
334 (when (nth 3 highlight) 379 ;; highlight))
335 (error 380 ;; (when (nth 3 highlight)
336 "The laxmatch flag may currently not be set in %s" 381 ;; (error
337 highlight)) 382 ;; "The laxmatch flag may currently not be set in %s"
338 `(save-match-data 383 ;; highlight))
339 (c-put-font-lock-face 384 ;; `(save-match-data
340 (match-beginning ,(car highlight)) 385 ;; (c-put-font-lock-face
341 (match-end ,(car highlight)) 386 ;; (match-beginning ,(car highlight))
342 ,(elt highlight 1)))) 387 ;; (match-end ,(car highlight))
343 (when (nth 3 highlight) 388 ;; ,(elt highlight 1))))
344 (error "Match highlights currently not supported in %s" 389 ;; (when (nth 3 highlight)
345 highlight)) 390 ;; (error "Match highlights currently not supported in %s"
346 `(progn 391 ;; highlight))
347 ,(nth 1 highlight) 392 ;; `(progn
348 (save-match-data ,(car highlight)) 393 ;; ,(nth 1 highlight)
349 ,(nth 2 highlight)))) 394 ;; (save-match-data ,(car highlight))
350 highlights)))) 395 ;; ,(nth 2 highlight))))
396 ;; highlights)))
397 ,(c-make-font-lock-search-form regexp highlights))
398
351 nil))) 399 nil)))
352 400
401 (defun c-make-font-lock-context-search-function (normal &rest state-stanzas)
402 ;; This function makes a byte compiled function that works much like
403 ;; a matcher element in `font-lock-keywords', with the following
404 ;; enhancement: the generated function will test for particular "font
405 ;; lock contexts" at the start of the region, i.e. is this point in
406 ;; the middle of some particular construct? if so the generated
407 ;; function will first fontify the tail of the construct, before
408 ;; going into the main loop and fontify full constructs up to limit.
409 ;;
410 ;; The generated function takes one parameter called `limit', and
411 ;; will fontify the region between POINT and LIMIT.
412 ;;
413 ;; NORMAL is a list of the form (REGEXP HIGHLIGHTS .....), and is
414 ;; used to fontify the "regular" bit of the region.
415 ;; STATE-STANZAS is list of elements of the form (STATE LIM REGEXP
416 ;; HIGHLIGHTS), each element coding one possible font lock context.
417
418 ;; o - REGEXP is a font-lock regular expression (NOT a function),
419 ;; o - HIGHLIGHTS is a list of zero or more highlighters as defined
420 ;; on page "Search-based Fontification" in the elisp manual. As
421 ;; yet (2009-06), they must have OVERRIDE set, and may not have
422 ;; LAXMATCH set.
423 ;;
424 ;; o - STATE is the "font lock context" (e.g. in-cpp-expr) and is
425 ;; not quoted.
426 ;; o - LIM is a lisp form whose evaluation will yield the limit
427 ;; position in the buffer for fontification by this stanza.
428 ;;
429 ;; This function does not do any hidden buffer changes, but the
430 ;; generated functions will. (They are however used in places
431 ;; covered by the font-lock context.)
432 ;;
433 ;; Note: Replace `byte-compile' with `eval' to debug the generated
434 ;; lambda more easily.
435 (byte-compile
436 `(lambda (limit)
437 (let ( ;; The font-lock package in Emacs is known to clobber
438 ;; `parse-sexp-lookup-properties' (when it exists).
439 (parse-sexp-lookup-properties
440 (cc-eval-when-compile
441 (boundp 'parse-sexp-lookup-properties))))
442 ,@(mapcar
443 (lambda (stanza)
444 (let ((state (car stanza))
445 (lim (nth 1 stanza))
446 (regexp (nth 2 stanza))
447 (highlights (cdr (cddr stanza))))
448 `(if (eq c-font-lock-context ',state)
449 (let ((limit ,lim))
450 ,(c-make-font-lock-search-form
451 regexp highlights)))))
452 state-stanzas)
453 ,(c-make-font-lock-search-form (car normal) (cdr normal))
454 nil))))
455
353; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. 456; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el.
354; '(progn 457; '(progn
355 (def-edebug-spec c-fontify-types-and-refs let*) 458 (def-edebug-spec c-fontify-types-and-refs let*)
@@ -494,19 +597,24 @@ stuff. Used on level 1 and higher."
494 (c-lang-const c-cpp-expr-directives))) 597 (c-lang-const c-cpp-expr-directives)))
495 (cef-re (c-make-keywords-re t 598 (cef-re (c-make-keywords-re t
496 (c-lang-const c-cpp-expr-functions)))) 599 (c-lang-const c-cpp-expr-functions))))
497 `((,(c-make-font-lock-search-function 600
498 (concat noncontinued-line-end 601 `((,(c-make-font-lock-context-search-function
499 (c-lang-const c-opt-cpp-prefix) 602 `(,(concat noncontinued-line-end
500 ced-re ; 1 + ncle-depth 603 (c-lang-const c-opt-cpp-prefix)
501 ;; Match the whole logical line to look 604 ced-re ; 1 + ncle-depth
502 ;; for the functions in. 605 ;; Match the whole logical line to look
503 "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") 606 ;; for the functions in.
504 `((let ((limit (match-end 0))) 607 "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*")
505 (while (re-search-forward ,cef-re limit 'move) 608 ((let ((limit (match-end 0)))
506 (c-put-font-lock-face (match-beginning 1) 609 (while (re-search-forward ,cef-re limit 'move)
507 (match-end 1) 610 (c-put-font-lock-face (match-beginning 1)
508 c-preprocessor-face-name))) 611 (match-end 1)
509 (goto-char (match-end ,(1+ ncle-depth))))))))) 612 c-preprocessor-face-name)))
613 (goto-char (match-end ,(1+ ncle-depth)))))
614 `(in-cpp-expr
615 (save-excursion (c-end-of-macro) (point))
616 ,cef-re
617 (1 c-preprocessor-face-name t)))))))
510 618
511 ;; Fontify the directive names. 619 ;; Fontify the directive names.
512 (,(c-make-font-lock-search-function 620 (,(c-make-font-lock-search-function
@@ -759,6 +867,12 @@ casts and declarations are fontified. Used on level 2 and higher."
759 (c-forward-syntactic-ws limit) 867 (c-forward-syntactic-ws limit)
760 (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)))) 868 (c-font-lock-declarators limit t (eq prop 'c-decl-type-start))))
761 869
870 (setq c-font-lock-context ;; (c-guess-font-lock-context)
871 (save-excursion
872 (if (and c-cpp-expr-intro-re
873 (c-beginning-of-macro)
874 (looking-at c-cpp-expr-intro-re))
875 'in-cpp-expr)))
762 nil) 876 nil)
763 877
764(defun c-font-lock-<>-arglists (limit) 878(defun c-font-lock-<>-arglists (limit)
@@ -1552,7 +1666,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
1552 (unless (c-skip-comments-and-strings limit) 1666 (unless (c-skip-comments-and-strings limit)
1553 (c-forward-syntactic-ws) 1667 (c-forward-syntactic-ws)
1554 ;; Handle prefix declaration specifiers. 1668 ;; Handle prefix declaration specifiers.
1555 (when (looking-at c-prefix-spec-kwds-re) 1669 (when (or (looking-at c-prefix-spec-kwds-re)
1670 (and (c-major-mode-is 'java-mode)
1671 (looking-at "@[A-Za-z0-9]+")))
1556 (c-forward-keyword-clause 1)) 1672 (c-forward-keyword-clause 1))
1557 ,(if (c-major-mode-is 'c++-mode) 1673 ,(if (c-major-mode-is 'c++-mode)
1558 `(when (and (c-forward-type) 1674 `(when (and (c-forward-type)
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 35097242cb7..279c5e46c46 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -815,6 +815,16 @@ expression."
815 t (if (c-lang-const c-opt-cpp-prefix) 815 t (if (c-lang-const c-opt-cpp-prefix)
816 '("if" "elif"))) 816 '("if" "elif")))
817 817
818(c-lang-defconst c-cpp-expr-intro-re
819 "Regexp which matches the start of a CPP directive which contains an
820expression, or nil if there aren't any in the language."
821 t (if (c-lang-const c-cpp-expr-directives)
822 (concat
823 (c-lang-const c-opt-cpp-prefix)
824 (c-make-keywords-re t (c-lang-const c-cpp-expr-directives)))))
825(c-lang-defvar c-cpp-expr-intro-re
826 (c-lang-const c-cpp-expr-intro-re))
827
818(c-lang-defconst c-cpp-expr-functions 828(c-lang-defconst c-cpp-expr-functions
819 "List of functions in cpp expressions." 829 "List of functions in cpp expressions."
820 t (if (c-lang-const c-opt-cpp-prefix) 830 t (if (c-lang-const c-opt-cpp-prefix)
@@ -1813,7 +1823,7 @@ will be handled."
1813 "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") 1823 "bindsTo" "delegatesTo" "implements" "proxy" "storedOn")
1814 ;; Note: "const" is not used in Java, but it's still a reserved keyword. 1824 ;; Note: "const" is not used in Java, but it's still a reserved keyword.
1815 java '("abstract" "const" "final" "native" "private" "protected" "public" 1825 java '("abstract" "const" "final" "native" "private" "protected" "public"
1816 "static" "strictfp" "synchronized" "transient" "volatile" "@[A-Za-z0-9]+") 1826 "static" "strictfp" "synchronized" "transient" "volatile")
1817 pike '("final" "inline" "local" "nomask" "optional" "private" "protected" 1827 pike '("final" "inline" "local" "nomask" "optional" "private" "protected"
1818 "public" "static" "variant")) 1828 "public" "static" "variant"))
1819 1829
@@ -1899,10 +1909,7 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
1899 1909
1900(c-lang-defconst c-prefix-spec-kwds-re 1910(c-lang-defconst c-prefix-spec-kwds-re
1901 ;; Adorned regexp of `c-prefix-spec-kwds'. 1911 ;; Adorned regexp of `c-prefix-spec-kwds'.
1902 t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)) 1912 t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)))
1903 java (replace-regexp-in-string
1904 "\\\\\\[" "["
1905 (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)))))
1906 1913
1907(c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) 1914(c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re))
1908 1915
diff --git a/lisp/startup.el b/lisp/startup.el
index 0dee969fb5a..6c3bb397e9a 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -409,7 +409,7 @@ The regexp should not contain a starting \"\\`\" or a trailing
409 \"\\'\"; those are added automatically by callers.") 409 \"\\'\"; those are added automatically by callers.")
410 410
411(defun normal-top-level-add-subdirs-to-load-path () 411(defun normal-top-level-add-subdirs-to-load-path ()
412 "Add all subdirectories of current directory to `load-path'. 412 "Add all subdirectories of `default-directory' to `load-path'.
413More precisely, this uses only the subdirectories whose names 413More precisely, this uses only the subdirectories whose names
414start with letters or digits; it excludes any subdirectory named `RCS' 414start with letters or digits; it excludes any subdirectory named `RCS'
415or `CVS', and any subdirectory that contains a file named `.nosearch'." 415or `CVS', and any subdirectory that contains a file named `.nosearch'."
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 77ef50843d3..c57ec33d2e2 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -253,7 +253,7 @@ LEFT and RIGHT are the elements to compare."
253 ;; * INSERTING AND DELETING 253 ;; * INSERTING AND DELETING
254 ;; C-u 8 * to insert ********. 254 ;; C-u 8 * to insert ********.
255 (delete-backward-char "\d") 255 (delete-backward-char "\d")
256 (delete-forward-char [?\C-d]) 256 (delete-char [?\C-d])
257 (backward-kill-word [?\M-\d]) 257 (backward-kill-word [?\M-\d])
258 (kill-word [?\M-d]) 258 (kill-word [?\M-d])
259 (kill-line [?\C-k]) 259 (kill-line [?\C-k])
@@ -298,7 +298,7 @@ LEFT and RIGHT are the elements to compare."
298 (isearch-backward [?\C-r]) 298 (isearch-backward [?\C-r])
299 299
300 ;; * MULTIPLE WINDOWS 300 ;; * MULTIPLE WINDOWS
301 (split-window-vertically [?\C-x ?2]) 301 (split-window-above-each-other [?\C-x ?2])
302 (scroll-other-window [?\C-\M-v]) 302 (scroll-other-window [?\C-\M-v])
303 (other-window [?\C-x ?o]) 303 (other-window [?\C-x ?o])
304 (find-file-other-window [?\C-x ?4 ?\C-f]) 304 (find-file-other-window [?\C-x ?4 ?\C-f])
@@ -889,6 +889,11 @@ Run the Viper tutorial? "))
889 (search-forward ">>") 889 (search-forward ">>")
890 (replace-match "]"))) 890 (replace-match "]")))
891 (beginning-of-line) 891 (beginning-of-line)
892 ;; FIXME: if the window is not tall, and especially if the
893 ;; big red "NOTICE: The main purpose..." text has been
894 ;; inserted at the start of the buffer, the "type C-v to
895 ;; move to the next screen" might not be visible on the
896 ;; first screen (n < 0). How will the novice know what to do?
892 (let ((n (- (window-height (selected-window)) 897 (let ((n (- (window-height (selected-window))
893 (count-lines (point-min) (point)) 898 (count-lines (point-min) (point))
894 6))) 899 6)))
@@ -897,7 +902,7 @@ Run the Viper tutorial? "))
897 ;; For a short gap, we don't need the [...] line, 902 ;; For a short gap, we don't need the [...] line,
898 ;; so delete it. 903 ;; so delete it.
899 (delete-region (point) (progn (end-of-line) (point))) 904 (delete-region (point) (progn (end-of-line) (point)))
900 (newline n)) 905 (if (> n 0) (newline n)))
901 ;; Some people get confused by the large gap. 906 ;; Some people get confused by the large gap.
902 (newline (/ n 2)) 907 (newline (/ n 2))
903 908
diff --git a/lisp/window.el b/lisp/window.el
index eca3dcb435d..75fa0b46a1c 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4763,8 +4763,10 @@ BUFFER, nil if none was found."
4763 (dolist (window (window-list-1 nil 'nomini method-frame)) 4763 (dolist (window (window-list-1 nil 'nomini method-frame))
4764 (let ((window-buffer (window-buffer window))) 4764 (let ((window-buffer (window-buffer window)))
4765 (when (and (not (window-minibuffer-p window)) 4765 (when (and (not (window-minibuffer-p window))
4766 ;; Don't reuse a side window. 4766 ;; Don't reuse a side window unless it shows the
4767 (or (not (eq (window-parameter window 'window-side) 'side)) 4767 ;; buffer already.
4768 (or (memq (window-parameter window 'window-side)
4769 '(nil none))
4768 (eq window-buffer buffer)) 4770 (eq window-buffer buffer))
4769 (or (not method-window) 4771 (or (not method-window)
4770 (and (eq method-window 'same) 4772 (and (eq method-window 'same)
@@ -5033,7 +5035,8 @@ description."
5033 ;; and must be neither a minibuffer window 5035 ;; and must be neither a minibuffer window
5034 (not (window-minibuffer-p window)) 5036 (not (window-minibuffer-p window))
5035 ;; nor a side window. 5037 ;; nor a side window.
5036 (not (eq (window-parameter window 'window-side) 'side))) 5038 (memq (window-parameter window 'window-side)
5039 '(nil none)))
5037 (setq window 5040 (setq window
5038 (cond 5041 (cond
5039 ((memq side display-buffer-side-specifiers) 5042 ((memq side display-buffer-side-specifiers)
@@ -6079,9 +6082,6 @@ ignored.
6079See also `same-window-regexps'." 6082See also `same-window-regexps'."
6080 :type '(repeat (string :format "%v")) 6083 :type '(repeat (string :format "%v"))
6081 :group 'windows) 6084 :group 'windows)
6082;; (make-obsolete-variable
6083 ;; 'same-window-buffer-names
6084 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6085 6085
6086(defcustom same-window-regexps nil 6086(defcustom same-window-regexps nil
6087 "List of regexps saying which buffers should appear in the \"same\" window. 6087 "List of regexps saying which buffers should appear in the \"same\" window.
@@ -6097,9 +6097,6 @@ the buffer name. This is for compatibility with
6097See also `same-window-buffer-names'." 6097See also `same-window-buffer-names'."
6098 :type '(repeat (regexp :format "%v")) 6098 :type '(repeat (regexp :format "%v"))
6099 :group 'windows) 6099 :group 'windows)
6100;; (make-obsolete-variable
6101 ;; 'same-window-regexps
6102 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6103 6100
6104(defun same-window-p (buffer-name) 6101(defun same-window-p (buffer-name)
6105 "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window. 6102 "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window.
@@ -6124,8 +6121,6 @@ selected rather than \(as usual\) some other window. See
6124 (and (consp regexp) (stringp (car regexp)) 6121 (and (consp regexp) (stringp (car regexp))
6125 (string-match-p (car regexp) buffer-name))) 6122 (string-match-p (car regexp) buffer-name)))
6126 (throw 'found t)))))))) 6123 (throw 'found t))))))))
6127;; (make-obsolete
6128 ;; 'same-window-p "pass argument to buffer display function instead." "24.1")
6129 6124
6130(defcustom special-display-frame-alist 6125(defcustom special-display-frame-alist
6131 '((height . 14) (width . 80) (unsplittable . t)) 6126 '((height . 14) (width . 80) (unsplittable . t))
@@ -6143,9 +6138,6 @@ These supersede the values given in `default-frame-alist'."
6143 (symbol :tag "Parameter") 6138 (symbol :tag "Parameter")
6144 (sexp :tag "Value"))) 6139 (sexp :tag "Value")))
6145 :group 'frames) 6140 :group 'frames)
6146;; (make-obsolete-variable
6147 ;; 'special-display-frame-alist
6148 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6149 6141
6150(defun special-display-popup-frame (buffer &optional args) 6142(defun special-display-popup-frame (buffer &optional args)
6151 "Display BUFFER in a special frame and return the window chosen. 6143 "Display BUFFER in a special frame and return the window chosen.
@@ -6191,9 +6183,6 @@ and (cdr ARGS) as the rest of the arguments."
6191 (set-window-buffer (frame-selected-window frame) buffer) 6183 (set-window-buffer (frame-selected-window frame) buffer)
6192 (set-window-dedicated-p (frame-selected-window frame) t) 6184 (set-window-dedicated-p (frame-selected-window frame) t)
6193 (frame-selected-window frame)))))) 6185 (frame-selected-window frame))))))
6194;; (make-obsolete
6195 ;; 'special-display-popup-frame
6196 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6197 6186
6198(defcustom special-display-function 'special-display-popup-frame 6187(defcustom special-display-function 'special-display-popup-frame
6199 "Function to call for displaying special buffers. 6188 "Function to call for displaying special buffers.
@@ -6210,9 +6199,6 @@ A buffer is special when its name is either listed in
6210 :type 'function 6199 :type 'function
6211 :group 'windows 6200 :group 'windows
6212 :group 'frames) 6201 :group 'frames)
6213;; (make-obsolete-variable
6214 ;; 'special-display-function
6215 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6216 6202
6217(defcustom special-display-buffer-names nil 6203(defcustom special-display-buffer-names nil
6218 "List of names of buffers that should be displayed specially. 6204 "List of names of buffers that should be displayed specially.
@@ -6277,9 +6263,6 @@ See also `special-display-regexps'."
6277 (repeat :tag "Arguments" (sexp))))) 6263 (repeat :tag "Arguments" (sexp)))))
6278 :group 'windows 6264 :group 'windows
6279 :group 'frames) 6265 :group 'frames)
6280;; (make-obsolete-variable
6281 ;; 'special-display-buffer-names
6282 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6283 6266
6284;;;###autoload 6267;;;###autoload
6285(put 'special-display-buffer-names 'risky-local-variable t) 6268(put 'special-display-buffer-names 'risky-local-variable t)
@@ -6348,9 +6331,6 @@ See also `special-display-buffer-names'."
6348 (repeat :tag "Arguments" (sexp))))) 6331 (repeat :tag "Arguments" (sexp)))))
6349 :group 'windows 6332 :group 'windows
6350 :group 'frames) 6333 :group 'frames)
6351;; (make-obsolete-variable
6352 ;; 'special-display-regexps
6353 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6354 6334
6355(defun special-display-p (buffer-name) 6335(defun special-display-p (buffer-name)
6356 "Return non-nil if a buffer named BUFFER-NAME gets a special frame. 6336 "Return non-nil if a buffer named BUFFER-NAME gets a special frame.
@@ -6378,9 +6358,6 @@ entry."
6378 ((and (consp regexp) (stringp (car regexp)) 6358 ((and (consp regexp) (stringp (car regexp))
6379 (string-match-p (car regexp) buffer-name)) 6359 (string-match-p (car regexp) buffer-name))
6380 (throw 'found (cdr regexp)))))))))) 6360 (throw 'found (cdr regexp))))))))))
6381;; (make-obsolete
6382 ;; 'special-display-p
6383 ;; "pass argument to buffer display function instead." "24.1")
6384 6361
6385(defcustom pop-up-frame-alist nil 6362(defcustom pop-up-frame-alist nil
6386 "Alist of parameters for automatically generated new frames. 6363 "Alist of parameters for automatically generated new frames.
@@ -6400,9 +6377,6 @@ affected by this variable."
6400 (symbol :tag "Parameter") 6377 (symbol :tag "Parameter")
6401 (sexp :tag "Value"))) 6378 (sexp :tag "Value")))
6402 :group 'frames) 6379 :group 'frames)
6403;; (make-obsolete-variable
6404 ;; 'pop-up-frame-alist
6405 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6406 6380
6407(defcustom pop-up-frame-function 6381(defcustom pop-up-frame-function
6408 (lambda () (make-frame pop-up-frame-alist)) 6382 (lambda () (make-frame pop-up-frame-alist))
@@ -6412,9 +6386,6 @@ frame. The default value calls `make-frame' with the argument
6412`pop-up-frame-alist'." 6386`pop-up-frame-alist'."
6413 :type 'function 6387 :type 'function
6414 :group 'frames) 6388 :group 'frames)
6415;; (make-obsolete-variable
6416 ;; 'pop-up-frame-function
6417 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6418 6389
6419(defcustom pop-up-frames nil 6390(defcustom pop-up-frames nil
6420 "Whether `display-buffer' should make a separate frame. 6391 "Whether `display-buffer' should make a separate frame.
@@ -6428,9 +6399,6 @@ Any other non-nil value means always make a separate frame."
6428 (const :tag "Always" t)) 6399 (const :tag "Always" t))
6429 :group 'windows 6400 :group 'windows
6430 :group 'frames) 6401 :group 'frames)
6431;; (make-obsolete-variable
6432 ;; 'pop-up-frames
6433 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6434 6402
6435(defcustom display-buffer-reuse-frames nil 6403(defcustom display-buffer-reuse-frames nil
6436 "Set and non-nil means `display-buffer' should reuse frames. 6404 "Set and non-nil means `display-buffer' should reuse frames.
@@ -6440,17 +6408,11 @@ that frame."
6440 :version "21.1" 6408 :version "21.1"
6441 :group 'windows 6409 :group 'windows
6442 :group 'frames) 6410 :group 'frames)
6443;; (make-obsolete-variable
6444 ;; 'display-buffer-reuse-frames
6445 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6446 6411
6447(defcustom pop-up-windows t 6412(defcustom pop-up-windows t
6448 "Non-nil means `display-buffer' should make a new window." 6413 "Non-nil means `display-buffer' should make a new window."
6449 :type 'boolean 6414 :type 'boolean
6450 :group 'windows) 6415 :group 'windows)
6451;; (make-obsolete-variable
6452 ;; 'pop-up-windows
6453 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6454 6416
6455(defcustom split-window-preferred-function 'split-window-sensibly 6417(defcustom split-window-preferred-function 'split-window-sensibly
6456 "Function called by `display-buffer' to split a window. 6418 "Function called by `display-buffer' to split a window.
@@ -6477,9 +6439,6 @@ not want to split the selected window."
6477 :type 'function 6439 :type 'function
6478 :version "23.1" 6440 :version "23.1"
6479 :group 'windows) 6441 :group 'windows)
6480;; (make-obsolete-variable
6481 ;; 'split-window-preferred-function
6482 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6483 6442
6484(defcustom split-height-threshold 80 6443(defcustom split-height-threshold 80
6485 "Minimum height for splitting a window to display a buffer. 6444 "Minimum height for splitting a window to display a buffer.
@@ -6491,9 +6450,6 @@ split it vertically disregarding the value of this variable."
6491 :type '(choice (const nil) (integer :tag "lines")) 6450 :type '(choice (const nil) (integer :tag "lines"))
6492 :version "23.1" 6451 :version "23.1"
6493 :group 'windows) 6452 :group 'windows)
6494;; (make-obsolete-variable
6495 ;; 'split-height-threshold
6496 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6497 6453
6498(defcustom split-width-threshold 160 6454(defcustom split-width-threshold 160
6499 "Minimum width for splitting a window to display a buffer. 6455 "Minimum width for splitting a window to display a buffer.
@@ -6503,9 +6459,6 @@ is nil, `display-buffer' cannot split windows horizontally."
6503 :type '(choice (const nil) (integer :tag "columns")) 6459 :type '(choice (const nil) (integer :tag "columns"))
6504 :version "23.1" 6460 :version "23.1"
6505 :group 'windows) 6461 :group 'windows)
6506;; (make-obsolete-variable
6507 ;; 'split-width-threshold
6508 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6509 6462
6510(defcustom even-window-heights t 6463(defcustom even-window-heights t
6511 "If non-nil `display-buffer' will try to even window heights. 6464 "If non-nil `display-buffer' will try to even window heights.
@@ -6514,17 +6467,11 @@ alone. Heights are evened only when `display-buffer' chooses a
6514window that appears above or below the selected window." 6467window that appears above or below the selected window."
6515 :type 'boolean 6468 :type 'boolean
6516 :group 'windows) 6469 :group 'windows)
6517;; (make-obsolete-variable
6518 ;; 'even-window-heights
6519 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6520 6470
6521(defvar display-buffer-mark-dedicated nil 6471(defvar display-buffer-mark-dedicated nil
6522 "Non-nil means `display-buffer' marks the windows it creates as dedicated. 6472 "Non-nil means `display-buffer' marks the windows it creates as dedicated.
6523The actual non-nil value of this variable will be copied to the 6473The actual non-nil value of this variable will be copied to the
6524`window-dedicated-p' flag.") 6474`window-dedicated-p' flag.")
6525;; (make-obsolete-variable
6526 ;; 'display-buffer-mark-dedicated
6527 ;; "use 2nd arg of `display-buffer' instead." "24.1")
6528 6475
6529(defun window-splittable-p (window &optional horizontal) 6476(defun window-splittable-p (window &optional horizontal)
6530 "Return non-nil if `split-window-sensibly' may split WINDOW. 6477 "Return non-nil if `split-window-sensibly' may split WINDOW.
@@ -6575,8 +6522,6 @@ hold:
6575 (max split-height-threshold 6522 (max split-height-threshold
6576 (* 2 (max window-min-height 6523 (* 2 (max window-min-height
6577 (if mode-line-format 2 1)))))))))) 6524 (if mode-line-format 2 1))))))))))
6578;; (make-obsolete
6579 ;; 'window-splittable-p "use 2nd arg of `display-buffer' instead." "24.1")
6580 6525
6581(defun split-window-sensibly (window) 6526(defun split-window-sensibly (window)
6582 "Split WINDOW in a way suitable for `display-buffer'. 6527 "Split WINDOW in a way suitable for `display-buffer'.
@@ -6626,8 +6571,6 @@ split."
6626 (when (with-no-warnings (window-splittable-p window)) 6571 (when (with-no-warnings (window-splittable-p window))
6627 (with-selected-window window 6572 (with-selected-window window
6628 (split-window-vertically))))))) 6573 (split-window-vertically)))))))
6629;; (make-obsolete
6630 ;; 'split-window-sensibly "use 2nd arg of `display-buffer' instead." "24.1")
6631 6574
6632;; Functions for converting Emacs 23 buffer display options to buffer 6575;; Functions for converting Emacs 23 buffer display options to buffer
6633;; display specifiers. 6576;; display specifiers.
@@ -7531,6 +7474,8 @@ Otherwise, consult the value of `truncate-partial-width-windows'
7531 (< (window-width window) t-p-w-w) 7474 (< (window-width window) t-p-w-w)
7532 t-p-w-w)))) 7475 t-p-w-w))))
7533 7476
7477;; Some of these are in tutorial--default-keys, so update that if you
7478;; change these.
7534(define-key ctl-x-map "0" 'delete-window) 7479(define-key ctl-x-map "0" 'delete-window)
7535(define-key ctl-x-map "1" 'delete-other-windows) 7480(define-key ctl-x-map "1" 'delete-other-windows)
7536(define-key ctl-x-map "2" 'split-window-above-each-other) 7481(define-key ctl-x-map "2" 'split-window-above-each-other)
diff --git a/src/ChangeLog b/src/ChangeLog
index 85a55b2b7c9..82d75d39b40 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-08-20 Chong Yidong <cyd@stupidchicken.com>
2
3 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
4 (Fcondition_case): Document `debug' symbol in error handler.
5
12011-08-19 Eli Zaretskii <eliz@gnu.org> 62011-08-19 Eli Zaretskii <eliz@gnu.org>
2 7
3 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of 8 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
diff --git a/src/eval.c b/src/eval.c
index e37425020c9..372e9954620 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1357,8 +1357,12 @@ A handler is applicable to an error
1357if CONDITION-NAME is one of the error's condition names. 1357if CONDITION-NAME is one of the error's condition names.
1358If an error happens, the first applicable handler is run. 1358If an error happens, the first applicable handler is run.
1359 1359
1360The car of a handler may be a list of condition names 1360The car of a handler may be a list of condition names instead of a
1361instead of a single condition name. Then it handles all of them. 1361single condition name; then it handles all of them. If the special
1362condition name `debug' is present in this list, it allows another
1363condition in the list to run the debugger if `debug-on-error' and the
1364other usual mechanisms says it should (otherwise, `condition-case'
1365suppresses the debugger).
1362 1366
1363When a handler handles an error, control returns to the `condition-case' 1367When a handler handles an error, control returns to the `condition-case'
1364and it executes the handler's BODY... 1368and it executes the handler's BODY...
@@ -1699,6 +1703,10 @@ See also the function `condition-case'. */)
1699 && (!NILP (Vdebug_on_signal) 1703 && (!NILP (Vdebug_on_signal)
1700 /* If no handler is present now, try to run the debugger. */ 1704 /* If no handler is present now, try to run the debugger. */
1701 || NILP (clause) 1705 || NILP (clause)
1706 /* A `debug' symbol in the handler list disables the normal
1707 suppression of the debugger. */
1708 || (CONSP (clause) && CONSP (XCAR (clause))
1709 && !NILP (Fmemq (Qdebug, XCAR (clause))))
1702 /* Special handler that means "print a message and run debugger 1710 /* Special handler that means "print a message and run debugger
1703 if requested". */ 1711 if requested". */
1704 || EQ (h->handler, Qerror))) 1712 || EQ (h->handler, Qerror)))