aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-02-06 22:23:54 -0800
committerGlenn Morris2013-02-06 22:23:54 -0800
commit8c4b24b2ab14be6d33d4e979f3de6fb85eff6518 (patch)
tree836d8403be35fe8842cdcbd72b0bf7a232257bc6
parent925baaa91d731fba2d3d9bf16c8af29735f1999c (diff)
parente364bc673cfb92194c7d4a034e3c65ea9137d7ff (diff)
downloademacs-8c4b24b2ab14be6d33d4e979f3de6fb85eff6518.tar.gz
emacs-8c4b24b2ab14be6d33d4e979f3de6fb85eff6518.zip
Merge from emacs-24; up to 2012-12-14T15:22:24Z!monnier@iro.umontreal.ca
-rw-r--r--doc/misc/ChangeLog20
-rw-r--r--doc/misc/cl.texi5
-rw-r--r--doc/misc/ede.texi104
-rw-r--r--lisp/ChangeLog19
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/auth-source.el2
-rw-r--r--lisp/progmodes/cc-engine.el317
-rw-r--r--nt/INSTALL12
8 files changed, 263 insertions, 221 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index d4dde056461..05f53257fa8 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,23 @@
12013-02-07 Glenn Morris <rgm@gnu.org>
2
3 * cl.texi (Equality Predicates): Mention memql.
4
52013-02-07 Eric Ludlam <zappo@gnu.org>
6
7 * doc/misc/ede.texi (Creating a project): Make ede-new doc less
8 specific, and only about items it supports, indicating that there
9 might be more. Remove refs to simple project and direct automake
10 from ede new.
11 (Simple projects): Re-write to not talk about ede-simple-project
12 which is deprecated, and instead use the term to mean projects
13 that don't do much management, just project wrapping. Add
14 ede-generic-project link.
15 (ede-generic-project): New node (bug#11441).
16
172013-02-07 Glenn Morris <rgm@gnu.org>
18
19 * cl.texi (Equality Predicates): Fix eq/eql pedantry.
20
12013-02-01 Glenn Morris <rgm@gnu.org> 212013-02-01 Glenn Morris <rgm@gnu.org>
2 22
3 * calc.texi (Help Commands): Update calc-view-news description. 23 * calc.texi (Help Commands): Update calc-view-news description.
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index c3657415078..8da6032d728 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -817,8 +817,9 @@ not compare strings against vectors of integers.
817Also note that the Common Lisp functions @code{member} and @code{assoc} 817Also note that the Common Lisp functions @code{member} and @code{assoc}
818use @code{eql} to compare elements, whereas Emacs Lisp follows the 818use @code{eql} to compare elements, whereas Emacs Lisp follows the
819MacLisp tradition and uses @code{equal} for these two functions. 819MacLisp tradition and uses @code{equal} for these two functions.
820In Emacs, use @code{memq} (or @code{cl-member}) and @code{assq} (or 820The functions @code{cl-member} and @code{cl-assoc} use @code{eql},
821@code{cl-assoc}) to get functions which use @code{eql} for comparisons. 821as in Common Lisp. The standard Emacs Lisp functions @code{memq} and
822@code{assq} use @code{eq}, and the standard @code{memql} uses @code{eql}.
822 823
823@node Control Structure 824@node Control Structure
824@chapter Control Structure 825@chapter Control Structure
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index cadd815025c..ddee7e6b5d5 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -450,9 +450,11 @@ ede-new}, or click on the @samp{Create Project} item in the
450 450
451The @command{ede-new} command prompts for the type of project you 451The @command{ede-new} command prompts for the type of project you
452would like to create. Each project type has its own benefits or 452would like to create. Each project type has its own benefits or
453language specific enhancements. @ede{} supports four different 453language specific enhancements. Not all projects that @ede{} supports
454project types: @samp{Make}, @samp{Automake}, @samp{direct Automake}, 454also allow creating a new project. Projects such as @code{emacs}
455and @samp{Simple}. 455or @code{linux} are designed to recognize existing projects only.
456Project types such as @samp{Make} and @samp{Automake} do support
457creating new project types with @command{ede-new}.
456 458
457@itemize 459@itemize
458@item 460@item
@@ -468,21 +470,6 @@ Unlike a @samp{Make} project, this project autogenerates a
468@file{Makefile.am} file. @ede{} handles the Automake bootstrapping 470@file{Makefile.am} file. @ede{} handles the Automake bootstrapping
469routines, which import and maintain a @file{configure.am} script and 471routines, which import and maintain a @file{configure.am} script and
470other required files. 472other required files.
471
472@item
473For the @samp{direct Automake} project type, @ede{} reads directly
474from the Automake files.
475
476You cannot create direct Automake projects with the @command{ede-new}
477command. Instead, when you visit a project with existing Automake
478files, @ede{} automatically detects them.
479
480@item
481The @samp{Simple} project type provides light-weight constructs for
482identifying a project root and looking up files. If you already have
483a non-@ede{} project infrastructure, you can use a @samp{Simple}
484project to provide other Emacs packages, such as Semantic, with some
485information about the project. @xref{Simple projects}.
486@end itemize 473@end itemize
487 474
488A subproject is merely a project in a subdirectory of another project. 475A subproject is merely a project in a subdirectory of another project.
@@ -795,24 +782,19 @@ able to find your SDK and compile your programs.
795@node Simple projects 782@node Simple projects
796@section Simple Projects 783@section Simple Projects
797 784
798There is a wide array of Simple projects. The root for simple 785There is a wide array of simple projects. In this case a simple
799projects is the class @code{ede-simple-project}. This handles the 786project is one that detects, or is directed to identify a directory as
800infrastructure of storing a .ede file if needed. 787belonging to a project, but doesn't provide many features of a typical
801 788@ede{} project. Having the project however allows tools such as
802The class @code{ede-simple-project} is designed to be subclassed. 789@semantic{} to find sources and perform project level completions.
803Then key @ede{} methods can be overridden to provide a quick wrapper
804over any project.
805 790
806A second project type is @code{ede-cpp-root}. This project type is
807designed to be created for a directory hierarchy full of C/C++ code.
808It can be configured with minimal lisp knowledge to do header file
809lookup for @semantic{}, improving code completion performance.
810 791
811@menu 792@menu
812* ede-cpp-root:: This project marks the root of a C/C++ code project. 793* ede-cpp-root:: This project marks the root of a C/C++ code project.
813* ede-java-root:: This project marks the root of a Java project. 794* ede-java-root:: This project marks the root of a Java project.
814* ede-emacs:: A project for working with Emacs. 795* ede-emacs:: A project for working with Emacs.
815* ede-linux:: A project for working with Linux kernels. 796* ede-linux:: A project for working with Linux kernels.
797* ede-generic-project:: A project type for wrapping build systems with EDE.
816* Custom Locate:: Customizing how to locate files in a simple project 798* Custom Locate:: Customizing how to locate files in a simple project
817@end menu 799@end menu
818 800
@@ -1045,7 +1027,7 @@ tree, and enables EDE project mode for it.
1045It pre-populates the C Preprocessor symbol map for correct parsing, 1027It pre-populates the C Preprocessor symbol map for correct parsing,
1046and has an optimized include file identification function. 1028and has an optimized include file identification function.
1047 1029
1048@node ede-linux, Custom Locate, ede-emacs, Simple projects 1030@node ede-linux, ede-generic-project, ede-emacs, Simple projects
1049@subsection ede-linux 1031@subsection ede-linux
1050 1032
1051The @code{ede-linux} project will automatically identify a Linux 1033The @code{ede-linux} project will automatically identify a Linux
@@ -1054,7 +1036,60 @@ Kernel source tree, and enable EDE project mode for it.
1054It pre-populates the C Preprocessor symbol map for reasonable parsing, 1036It pre-populates the C Preprocessor symbol map for reasonable parsing,
1055and has an optimized include file identification function. 1037and has an optimized include file identification function.
1056 1038
1057@node Custom Locate, , ede-linux, Simple projects 1039@node ede-generic-project, Custom Locate, ede-linux, Simple projects
1040@subsection ede-generic-project
1041
1042The @code{ede-generic-project} is a project system that makes it easy
1043to wrap up different kinds of build systems as an EDE project.
1044Projects such as @ref{ede-emacs} require coding skills to create.
1045Generic projects also require writing Emacs Lisp code, but the
1046requirements are minimal. You can then use
1047@command{customize-project} to configure build commands, includes, and
1048other options for that project. The configuration is saved in
1049@file{EDEConfig.el}.
1050
1051Generic projects are disabled by default because they have the
1052potential to interfere with other projects. To use the generic
1053project sytem to start detecting projects, you need to enable it.
1054
1055@deffn Command ede-enable-generic-projects
1056Enable generic project loaders.
1057
1058This enables generic loaders for projects that are detected using
1059either a @file{Makefile}, @file{SConstruct}, or @file{CMakeLists}.
1060
1061You do not need to use this command if you create your own generic
1062project type.
1063@end deffn
1064
1065If you want to create your own generic project loader, you need to
1066define your own project and target classes, and create an autoloader.
1067The example for Makefiles looks like this:
1068
1069@example
1070;;; MAKEFILE
1071
1072(defclass ede-generic-makefile-project (ede-generic-project)
1073 ((buildfile :initform "Makefile")
1074 )
1075 "Generic Project for makefiles.")
1076
1077(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
1078 "Setup a configuration for Make."
1079 (oset config build-command "make -k")
1080 (oset config debug-command "gdb ")
1081 )
1082
1083(ede-generic-new-autoloader "generic-makefile" "Make"
1084 "Makefile" 'ede-generic-makefile-project)
1085@end example
1086
1087This example project will detect any directory with the file
1088@file{Makefile} in it as belonging to this project type.
1089Customization of the project will allow you to make build and debug
1090commands more precise.
1091
1092@node Custom Locate, , ede-generic-project, Simple projects
1058@subsection Custom Locate 1093@subsection Custom Locate
1059 1094
1060The various simple project styles all have one major drawback, which 1095The various simple project styles all have one major drawback, which
@@ -1062,8 +1097,6 @@ is that the files in the project are not completely known to EDE@.
1062When the EDE API is used to try and file files by some reference name 1097When the EDE API is used to try and file files by some reference name
1063in the project, then that could fail. 1098in the project, then that could fail.
1064 1099
1065@@TODO - Add ID Utils and CScope examples
1066
1067@ede{} can therefore use some external locate commands, such as the unix 1100@ede{} can therefore use some external locate commands, such as the unix
1068``locate'' command, or ``GNU Global''. 1101``locate'' command, or ``GNU Global''.
1069 1102
@@ -1093,6 +1126,11 @@ You can add your own locate tool but subclassing from
1093methods. See the code in @file{ede-locate.el} for GNU Global as a 1126methods. See the code in @file{ede-locate.el} for GNU Global as a
1094simple example. 1127simple example.
1095 1128
1129@@TODO - Add ID Utils and CScope examples
1130
1131More on idutils and cscope is in the CEDET manual, and they each have
1132their own section.
1133
1096@node Extending EDE, GNU Free Documentation License, Miscellaneous commands, Top 1134@node Extending EDE, GNU Free Documentation License, Miscellaneous commands, Top
1097@chapter Extending @ede{} 1135@chapter Extending @ede{}
1098 1136
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f87bdddacda..ef97f6a8816 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,22 @@
12013-02-07 Alan Mackenzie <acm@muc.de>
2
3 Fix bug in state cache mechanism. Remove 'BOD "strategy". Refactor.
4 * progmodes/cc-engine.el (c-get-fallback-scan-pos): Remove.
5 (c-parse-state-get-strategy): Don't return 'BOD any more.
6 (c-append-lower-brace-pair-to-state-cache):
7 Extra parameter HERE instead of narrowing.
8 Widen to top of buffer before searching backwards for a brace pair.
9 (c-state-push-any-brace-pair): Add HERE parameter to function call.
10 (c-append-to-state-cache): Extra parameter HERE in place of narrowing.
11 Narrow to parameter HERE, in place of being called narrowed.
12 (c-remove-stale-state-cache): Extra parameter HERE in place of
13 narrowing. Check there's an open brace in the cache before
14 searching for its match.
15 (c-invalidate-state-cache-1): Add HERE parameter to function call.
16 (c-parse-state-1): Don't narrow here for 'forward strategy,
17 instead passing extra parameter HERE to several functions.
18 Remove 'BOD strategy.
19
12013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change) 202013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change)
2 21
3 * emacs-lisp/package.el (describe-package-1): Tell what archive is 22 * emacs-lisp/package.el (describe-package-1): Tell what archive is
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7cb278f2a6f..56ec2ed50c8 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12013-02-07 Gábor Vida <gabor.v.vida@ericsson.com> (tiny change)
2
3 * auth-source.el (auth-source-format-prompt): Don't get confused by
4 any "\" in replacement text. (Bug#13637)
5
12013-01-30 Christopher Schmidt <christopher@ch.ristopher.com> 62013-01-30 Christopher Schmidt <christopher@ch.ristopher.com>
2 7
3 * gnus-int.el (gnus-backend-trace-elapsed): New variable. 8 * gnus-int.el (gnus-backend-trace-elapsed): New variable.
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index ac16200adb2..e94904bf175 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -913,7 +913,7 @@ while \(:host t) would find all host entries."
913 (when (and c v) 913 (when (and c v)
914 (setq prompt (replace-regexp-in-string (format "%%%c" c) 914 (setq prompt (replace-regexp-in-string (format "%%%c" c)
915 (format "%s" v) 915 (format "%s" v)
916 prompt))))) 916 prompt nil t)))))
917 prompt) 917 prompt)
918 918
919(defun auth-source-ensure-strings (values) 919(defun auth-source-ensure-strings (values)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index d4e4d6de483..977bc755e32 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2477,20 +2477,6 @@ comment at the start of cc-engine.el for more info."
2477 2477
2478;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2478;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2479;; Defuns which analyze the buffer, yet don't change `c-state-cache'. 2479;; Defuns which analyze the buffer, yet don't change `c-state-cache'.
2480(defun c-get-fallback-scan-pos (here)
2481 ;; Return a start position for building `c-state-cache' from
2482 ;; scratch. This will be at the top level, 2 defuns back.
2483 (save-excursion
2484 ;; Go back 2 bods, but ignore any bogus positions returned by
2485 ;; beginning-of-defun (i.e. open paren in column zero).
2486 (goto-char here)
2487 (let ((cnt 2))
2488 (while (not (or (bobp) (zerop cnt)))
2489 (c-beginning-of-defun-1) ; Pure elisp BOD.
2490 (if (eq (char-after) ?\{)
2491 (setq cnt (1- cnt)))))
2492 (point)))
2493
2494(defun c-state-balance-parens-backwards (here- here+ top) 2480(defun c-state-balance-parens-backwards (here- here+ top)
2495 ;; Return the position of the opening paren/brace/bracket before HERE- which 2481 ;; Return the position of the opening paren/brace/bracket before HERE- which
2496 ;; matches the outermost close p/b/b between HERE+ and TOP. Except when 2482 ;; matches the outermost close p/b/b between HERE+ and TOP. Except when
@@ -2548,47 +2534,23 @@ comment at the start of cc-engine.el for more info."
2548 ;; o - ('forward START-POINT) - scan forward from START-POINT, 2534 ;; o - ('forward START-POINT) - scan forward from START-POINT,
2549 ;; which is not less than the highest position in `c-state-cache' below here. 2535 ;; which is not less than the highest position in `c-state-cache' below here.
2550 ;; o - ('backward nil) - scan backwards (from HERE). 2536 ;; o - ('backward nil) - scan backwards (from HERE).
2551 ;; o - ('BOD START-POINT) - scan forwards from START-POINT, which is at the
2552 ;; top level.
2553 ;; o - ('IN-LIT nil) - point is inside the literal containing point-min. 2537 ;; o - ('IN-LIT nil) - point is inside the literal containing point-min.
2554 (let ((cache-pos (c-get-cache-scan-pos here)) ; highest position below HERE in cache (or 1) 2538 (let ((cache-pos (c-get-cache-scan-pos here)) ; highest position below HERE in cache (or 1)
2555 BOD-pos ; position of 2nd BOD before HERE. 2539 strategy ; 'forward, 'backward, or 'IN-LIT.
2556 strategy ; 'forward, 'backward, 'BOD, or 'IN-LIT. 2540 start-point)
2557 start-point
2558 how-far) ; putative scanning distance.
2559 (setq good-pos (or good-pos (c-state-get-min-scan-pos))) 2541 (setq good-pos (or good-pos (c-state-get-min-scan-pos)))
2560 (cond 2542 (cond
2561 ((< here (c-state-get-min-scan-pos)) 2543 ((< here (c-state-get-min-scan-pos))
2562 (setq strategy 'IN-LIT 2544 (setq strategy 'IN-LIT))
2563 start-point nil
2564 cache-pos nil
2565 how-far 0))
2566 ((<= good-pos here) 2545 ((<= good-pos here)
2567 (setq strategy 'forward 2546 (setq strategy 'forward
2568 start-point (max good-pos cache-pos) 2547 start-point (max good-pos cache-pos)))
2569 how-far (- here start-point)))
2570 ((< (- good-pos here) (- here cache-pos)) ; FIXME!!! ; apply some sort of weighting. 2548 ((< (- good-pos here) (- here cache-pos)) ; FIXME!!! ; apply some sort of weighting.
2571 (setq strategy 'backward 2549 (setq strategy 'backward))
2572 how-far (- good-pos here)))
2573 (t 2550 (t
2574 (setq strategy 'forward 2551 (setq strategy 'forward
2575 how-far (- here cache-pos) 2552 start-point cache-pos)))
2576 start-point cache-pos))) 2553 (list strategy (and (eq strategy 'forward) start-point))))
2577
2578 ;; Might we be better off starting from the top level, two defuns back,
2579 ;; instead? This heuristic no longer works well in C++, where
2580 ;; declarations inside namespace brace blocks are frequently placed at
2581 ;; column zero.
2582 (when (and (not (c-major-mode-is 'c++-mode))
2583 (> how-far c-state-cache-too-far))
2584 (setq BOD-pos (c-get-fallback-scan-pos here)) ; somewhat EXPENSIVE!!!
2585 (if (< (- here BOD-pos) how-far)
2586 (setq strategy 'BOD
2587 start-point BOD-pos)))
2588
2589 (list
2590 strategy
2591 (and (memq strategy '(forward BOD)) start-point))))
2592 2554
2593 2555
2594;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2556;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -2630,7 +2592,7 @@ comment at the start of cc-engine.el for more info."
2630 2592
2631 (setq c-state-point-min (point-min))) 2593 (setq c-state-point-min (point-min)))
2632 2594
2633(defun c-append-lower-brace-pair-to-state-cache (from &optional upper-lim) 2595(defun c-append-lower-brace-pair-to-state-cache (from here &optional upper-lim)
2634 ;; If there is a brace pair preceding FROM in the buffer, at the same level 2596 ;; If there is a brace pair preceding FROM in the buffer, at the same level
2635 ;; of nesting (not necessarily immediately preceding), push a cons onto 2597 ;; of nesting (not necessarily immediately preceding), push a cons onto
2636 ;; `c-state-cache' to represent it. FROM must not be inside a literal. If 2598 ;; `c-state-cache' to represent it. FROM must not be inside a literal. If
@@ -2654,8 +2616,7 @@ comment at the start of cc-engine.el for more info."
2654 ;; reduce the time wasted in repeated fruitless searches in brace deserts. 2616 ;; reduce the time wasted in repeated fruitless searches in brace deserts.
2655 (save-excursion 2617 (save-excursion
2656 (save-restriction 2618 (save-restriction
2657 (let* ((here (point-max)) 2619 (let* (new-cons
2658 new-cons
2659 (cache-pos (c-state-cache-top-lparen)) ; might be nil. 2620 (cache-pos (c-state-cache-top-lparen)) ; might be nil.
2660 (macro-start-or-from 2621 (macro-start-or-from
2661 (progn (goto-char from) 2622 (progn (goto-char from)
@@ -2690,7 +2651,6 @@ comment at the start of cc-engine.el for more info."
2690 ;; search bound, even though the algorithm below would skip 2651 ;; search bound, even though the algorithm below would skip
2691 ;; over the new paren pair. 2652 ;; over the new paren pair.
2692 (cache-lim (and cache-pos (< cache-pos from) cache-pos))) 2653 (cache-lim (and cache-pos (< cache-pos from) cache-pos)))
2693 (widen)
2694 (narrow-to-region 2654 (narrow-to-region
2695 (cond 2655 (cond
2696 ((and desert-lim cache-lim) 2656 ((and desert-lim cache-lim)
@@ -2698,7 +2658,9 @@ comment at the start of cc-engine.el for more info."
2698 (desert-lim) 2658 (desert-lim)
2699 (cache-lim) 2659 (cache-lim)
2700 ((point-min))) 2660 ((point-min)))
2701 (point-max))) 2661 ;; The top limit is EOB to ensure that `bra' is inside the
2662 ;; accessible part of the buffer at the next scan operation.
2663 (1+ (buffer-size))))
2702 2664
2703 ;; In the next pair of nested loops, the inner one moves back past a 2665 ;; In the next pair of nested loops, the inner one moves back past a
2704 ;; pair of (mis-)matching parens or brackets; the outer one moves 2666 ;; pair of (mis-)matching parens or brackets; the outer one moves
@@ -2765,25 +2727,24 @@ comment at the start of cc-engine.el for more info."
2765 (if (consp (car c-state-cache)) 2727 (if (consp (car c-state-cache))
2766 (cdr c-state-cache) 2728 (cdr c-state-cache)
2767 c-state-cache))) 2729 c-state-cache)))
2768 ;; N.B. This defsubst codes one method for the simple, normal case, 2730 ;; N.B. This defsubst codes one method for the simple, normal case,
2769 ;; and a more sophisticated, slower way for the general case. Don't 2731 ;; and a more sophisticated, slower way for the general case. Don't
2770 ;; eliminate this defsubst - it's a speed optimization. 2732 ;; eliminate this defsubst - it's a speed optimization.
2771 (c-append-lower-brace-pair-to-state-cache (1- bra+1))))) 2733 (c-append-lower-brace-pair-to-state-cache (1- bra+1) (point-max)))))
2772 2734
2773(defun c-append-to-state-cache (from) 2735(defun c-append-to-state-cache (from here)
2774 ;; Scan the buffer from FROM to (point-max), adding elements into 2736 ;; Scan the buffer from FROM to HERE, adding elements into `c-state-cache'
2775 ;; `c-state-cache' for braces etc. Return a candidate for 2737 ;; for braces etc. Return a candidate for `c-state-cache-good-pos'.
2776 ;; `c-state-cache-good-pos'.
2777 ;; 2738 ;;
2778 ;; FROM must be after the latest brace/paren/bracket in `c-state-cache', if 2739 ;; FROM must be after the latest brace/paren/bracket in `c-state-cache', if
2779 ;; any. Typically, it is immediately after it. It must not be inside a 2740 ;; any. Typically, it is immediately after it. It must not be inside a
2780 ;; literal. 2741 ;; literal.
2781 (let ((here-bol (c-point 'bol (point-max))) 2742 (let ((here-bol (c-point 'bol here))
2782 (macro-start-or-here 2743 (macro-start-or-here
2783 (save-excursion (goto-char (point-max)) 2744 (save-excursion (goto-char here)
2784 (if (c-beginning-of-macro) 2745 (if (c-beginning-of-macro)
2785 (point) 2746 (point)
2786 (point-max)))) 2747 here)))
2787 pa+1 ; pos just after an opening PAren (or brace). 2748 pa+1 ; pos just after an opening PAren (or brace).
2788 (ren+1 from) ; usually a pos just after an closing paREN etc. 2749 (ren+1 from) ; usually a pos just after an closing paREN etc.
2789 ; Is actually the pos. to scan for a (/{/[ from, 2750 ; Is actually the pos. to scan for a (/{/[ from,
@@ -2796,75 +2757,77 @@ comment at the start of cc-engine.el for more info."
2796 mstart) ; start of a macro. 2757 mstart) ; start of a macro.
2797 2758
2798 (save-excursion 2759 (save-excursion
2799 ;; Each time round the following loop, we enter a successively deeper 2760 (save-restriction
2800 ;; level of brace/paren nesting. (Except sometimes we "continue at 2761 (narrow-to-region (point-min) here)
2801 ;; the existing level".) `pa+1' is a pos inside an opening 2762 ;; Each time round the following loop, we enter a successively deeper
2802 ;; brace/paren/bracket, usually just after it. 2763 ;; level of brace/paren nesting. (Except sometimes we "continue at
2803 (while 2764 ;; the existing level".) `pa+1' is a pos inside an opening
2804 (progn 2765 ;; brace/paren/bracket, usually just after it.
2805 ;; Each time round the next loop moves forward over an opening then 2766 (while
2806 ;; a closing brace/bracket/paren. This loop is white hot, so it 2767 (progn
2807 ;; plays ugly tricks to go fast. DON'T PUT ANYTHING INTO THIS 2768 ;; Each time round the next loop moves forward over an opening then
2808 ;; LOOP WHICH ISN'T ABSOLUTELY NECESSARY!!! It terminates when a 2769 ;; a closing brace/bracket/paren. This loop is white hot, so it
2809 ;; call of `scan-lists' signals an error, which happens when there 2770 ;; plays ugly tricks to go fast. DON'T PUT ANYTHING INTO THIS
2810 ;; are no more b/b/p's to scan. 2771 ;; LOOP WHICH ISN'T ABSOLUTELY NECESSARY!!! It terminates when a
2811 (c-safe 2772 ;; call of `scan-lists' signals an error, which happens when there
2812 (while t 2773 ;; are no more b/b/p's to scan.
2813 (setq pa+1 (scan-lists ren+1 1 -1) ; Into (/{/[; might signal 2774 (c-safe
2814 paren+1s (cons pa+1 paren+1s)) 2775 (while t
2815 (setq ren+1 (scan-lists pa+1 1 1)) ; Out of )/}/]; might signal 2776 (setq pa+1 (scan-lists ren+1 1 -1) ; Into (/{/[; might signal
2816 (if (and (eq (char-before pa+1) ?{)) ; Check for a macro later. 2777 paren+1s (cons pa+1 paren+1s))
2817 (setq bra+1 pa+1)) 2778 (setq ren+1 (scan-lists pa+1 1 1)) ; Out of )/}/]; might signal
2818 (setcar paren+1s ren+1))) 2779 (if (and (eq (char-before pa+1) ?{)) ; Check for a macro later.
2819 2780 (setq bra+1 pa+1))
2820 (if (and pa+1 (> pa+1 ren+1)) 2781 (setcar paren+1s ren+1)))
2821 ;; We've just entered a deeper nesting level. 2782
2822 (progn 2783 (if (and pa+1 (> pa+1 ren+1))
2823 ;; Insert the brace pair (if present) and the single open 2784 ;; We've just entered a deeper nesting level.
2824 ;; paren/brace/bracket into `c-state-cache' It cannot be 2785 (progn
2825 ;; inside a macro, except one around point, because of what 2786 ;; Insert the brace pair (if present) and the single open
2826 ;; `c-neutralize-syntax-in-CPP' has done. 2787 ;; paren/brace/bracket into `c-state-cache' It cannot be
2827 (c-state-push-any-brace-pair bra+1 macro-start-or-here) 2788 ;; inside a macro, except one around point, because of what
2828 ;; Insert the opening brace/bracket/paren position. 2789 ;; `c-neutralize-syntax-in-CPP' has done.
2829 (setq c-state-cache (cons (1- pa+1) c-state-cache)) 2790 (c-state-push-any-brace-pair bra+1 macro-start-or-here)
2830 ;; Clear admin stuff for the next more nested part of the scan. 2791 ;; Insert the opening brace/bracket/paren position.
2831 (setq ren+1 pa+1 pa+1 nil bra+1 nil bra+1s nil) 2792 (setq c-state-cache (cons (1- pa+1) c-state-cache))
2832 t) ; Carry on the loop 2793 ;; Clear admin stuff for the next more nested part of the scan.
2833 2794 (setq ren+1 pa+1 pa+1 nil bra+1 nil bra+1s nil)
2834 ;; All open p/b/b's at this nesting level, if any, have probably 2795 t) ; Carry on the loop
2835 ;; been closed by matching/mismatching ones. We're probably 2796
2836 ;; finished - we just need to check for having found an 2797 ;; All open p/b/b's at this nesting level, if any, have probably
2837 ;; unmatched )/}/], which we ignore. Such a )/}/] can't be in a 2798 ;; been closed by matching/mismatching ones. We're probably
2838 ;; macro, due the action of `c-neutralize-syntax-in-CPP'. 2799 ;; finished - we just need to check for having found an
2839 (c-safe (setq ren+1 (scan-lists ren+1 1 1)))))) ; acts as loop control. 2800 ;; unmatched )/}/], which we ignore. Such a )/}/] can't be in a
2840 2801 ;; macro, due the action of `c-neutralize-syntax-in-CPP'.
2841 ;; Record the final, innermost, brace-pair if there is one. 2802 (c-safe (setq ren+1 (scan-lists ren+1 1 1)))))) ; acts as loop control.
2842 (c-state-push-any-brace-pair bra+1 macro-start-or-here) 2803
2843 2804 ;; Record the final, innermost, brace-pair if there is one.
2844 ;; Determine a good pos 2805 (c-state-push-any-brace-pair bra+1 macro-start-or-here)
2845 (while (and (setq paren+1 (car paren+1s)) 2806
2846 (> (if (> paren+1 macro-start-or-here) 2807 ;; Determine a good pos
2847 paren+1 2808 (while (and (setq paren+1 (car paren+1s))
2848 (goto-char paren+1) 2809 (> (if (> paren+1 macro-start-or-here)
2849 (setq mstart (and (c-beginning-of-macro) 2810 paren+1
2850 (point))) 2811 (goto-char paren+1)
2851 (or mstart paren+1)) 2812 (setq mstart (and (c-beginning-of-macro)
2852 here-bol)) 2813 (point)))
2853 (setq paren+1s (cdr paren+1s))) 2814 (or mstart paren+1))
2854 (cond 2815 here-bol))
2855 ((and paren+1 mstart) 2816 (setq paren+1s (cdr paren+1s)))
2856 (min paren+1 mstart)) 2817 (cond
2857 (paren+1) 2818 ((and paren+1 mstart)
2858 (t from))))) 2819 (min paren+1 mstart))
2820 (paren+1)
2821 (t from))))))
2859 2822
2860(defun c-remove-stale-state-cache (start-point pps-point) 2823(defun c-remove-stale-state-cache (start-point here pps-point)
2861 ;; Remove stale entries from the `c-cache-state', i.e. those which will 2824 ;; Remove stale entries from the `c-cache-state', i.e. those which will
2862 ;; not be in it when it is amended for position (point-max). 2825 ;; not be in it when it is amended for position HERE. Additionally, the
2863 ;; Additionally, the "outermost" open-brace entry before (point-max) 2826 ;; "outermost" open-brace entry before HERE will be converted to a cons if
2864 ;; will be converted to a cons if the matching close-brace is scanned. 2827 ;; the matching close-brace is scanned.
2865 ;; 2828 ;;
2866 ;; START-POINT is a "maximal" "safe position" - there must be no open 2829 ;; START-POINT is a "maximal" "safe position" - there must be no open
2867 ;; parens/braces/brackets between START-POINT and (point-max). 2830 ;; parens/braces/brackets between START-POINT and HERE.
2868 ;; 2831 ;;
2869 ;; As a second thing, calculate the result of parse-partial-sexp at 2832 ;; As a second thing, calculate the result of parse-partial-sexp at
2870 ;; PPS-POINT, w.r.t. START-POINT. The motivation here is that 2833 ;; PPS-POINT, w.r.t. START-POINT. The motivation here is that
@@ -2881,23 +2844,23 @@ comment at the start of cc-engine.el for more info."
2881 ;; last element to be removed from `c-state-cache', when that elt is a 2844 ;; last element to be removed from `c-state-cache', when that elt is a
2882 ;; cons, otherwise nil. 2845 ;; cons, otherwise nil.
2883 ;; o - PPS-STATE is the parse-partial-sexp state at PPS-POINT. 2846 ;; o - PPS-STATE is the parse-partial-sexp state at PPS-POINT.
2884 (save-restriction 2847 (save-excursion
2885 (narrow-to-region 1 (point-max)) 2848 (save-restriction
2886 (save-excursion 2849 (narrow-to-region 1 (point-max))
2887 (let* ((in-macro-start ; start of macro containing (point-max) or nil. 2850 (let* ((in-macro-start ; start of macro containing HERE or nil.
2888 (save-excursion 2851 (save-excursion
2889 (goto-char (point-max)) 2852 (goto-char here)
2890 (and (c-beginning-of-macro) 2853 (and (c-beginning-of-macro)
2891 (point)))) 2854 (point))))
2892 (start-point-actual-macro-start ; Start of macro containing 2855 (start-point-actual-macro-start ; Start of macro containing
2893 ; start-point or nil 2856 ; start-point or nil
2894 (and (< start-point (point-max)) 2857 (and (< start-point here)
2895 (save-excursion 2858 (save-excursion
2896 (goto-char start-point) 2859 (goto-char start-point)
2897 (and (c-beginning-of-macro) 2860 (and (c-beginning-of-macro)
2898 (point))))) 2861 (point)))))
2899 (start-point-actual-macro-end ; End of this macro, (maybe 2862 (start-point-actual-macro-end ; End of this macro, (maybe
2900 ; (point-max)), or nil. 2863 ; HERE), or nil.
2901 (and start-point-actual-macro-start 2864 (and start-point-actual-macro-start
2902 (save-excursion 2865 (save-excursion
2903 (goto-char start-point-actual-macro-start) 2866 (goto-char start-point-actual-macro-start)
@@ -2909,14 +2872,14 @@ comment at the start of cc-engine.el for more info."
2909 scan-back-pos 2872 scan-back-pos
2910 pair-beg pps-point-state target-depth) 2873 pair-beg pps-point-state target-depth)
2911 2874
2912 ;; Remove entries beyond (point-max). Also remove any entries inside 2875 ;; Remove entries beyond HERE. Also remove any entries inside
2913 ;; a macro, unless (point-max) is in the same macro. 2876 ;; a macro, unless HERE is in the same macro.
2914 (setq upper-lim 2877 (setq upper-lim
2915 (if (or (null c-state-old-cpp-beg) 2878 (if (or (null c-state-old-cpp-beg)
2916 (and (> (point-max) c-state-old-cpp-beg) 2879 (and (> here c-state-old-cpp-beg)
2917 (< (point-max) c-state-old-cpp-end))) 2880 (< here c-state-old-cpp-end)))
2918 (point-max) 2881 here
2919 (min (point-max) c-state-old-cpp-beg))) 2882 (min here c-state-old-cpp-beg)))
2920 (while (and c-state-cache (>= (c-state-cache-top-lparen) upper-lim)) 2883 (while (and c-state-cache (>= (c-state-cache-top-lparen) upper-lim))
2921 (setq scan-back-pos (car-safe (car c-state-cache))) 2884 (setq scan-back-pos (car-safe (car c-state-cache)))
2922 (setq c-state-cache (cdr c-state-cache))) 2885 (setq c-state-cache (cdr c-state-cache)))
@@ -2934,7 +2897,7 @@ comment at the start of cc-engine.el for more info."
2934 ;; time round; the corresponding elements in `c-state-cache' are 2897 ;; time round; the corresponding elements in `c-state-cache' are
2935 ;; removed. `pos' is just after the brace-pair or the open paren at 2898 ;; removed. `pos' is just after the brace-pair or the open paren at
2936 ;; (car c-state-cache). There can be no open parens/braces/brackets 2899 ;; (car c-state-cache). There can be no open parens/braces/brackets
2937 ;; between `start-point'/`start-point-actual-macro-start' and (point-max), 2900 ;; between `start-point'/`start-point-actual-macro-start' and HERE,
2938 ;; due to the interface spec to this function. 2901 ;; due to the interface spec to this function.
2939 (setq pos (if (and start-point-actual-macro-end 2902 (setq pos (if (and start-point-actual-macro-end
2940 (not (eq start-point-actual-macro-start 2903 (not (eq start-point-actual-macro-start
@@ -2944,7 +2907,9 @@ comment at the start of cc-engine.el for more info."
2944 start-point)) 2907 start-point))
2945 (goto-char pos) 2908 (goto-char pos)
2946 (while (and c-state-cache 2909 (while (and c-state-cache
2947 (< (point) (point-max))) 2910 (or (numberp (car c-state-cache)) ; Have we a { at all?
2911 (cdr c-state-cache))
2912 (< (point) here))
2948 (cond 2913 (cond
2949 ((null pps-state) ; first time through 2914 ((null pps-state) ; first time through
2950 (setq target-depth -1)) 2915 (setq target-depth -1))
@@ -2956,7 +2921,7 @@ comment at the start of cc-engine.el for more info."
2956 ;; Scan! 2921 ;; Scan!
2957 (setq pps-state 2922 (setq pps-state
2958 (parse-partial-sexp 2923 (parse-partial-sexp
2959 (point) (if (< (point) pps-point) pps-point (point-max)) 2924 (point) (if (< (point) pps-point) pps-point here)
2960 target-depth 2925 target-depth
2961 nil pps-state)) 2926 nil pps-state))
2962 2927
@@ -3209,7 +3174,7 @@ comment at the start of cc-engine.el for more info."
3209 ;; Do we need to add in an earlier brace pair, having lopped one off? 3174 ;; Do we need to add in an earlier brace pair, having lopped one off?
3210 (if (and dropped-cons 3175 (if (and dropped-cons
3211 (< too-high-pa (+ here c-state-cache-too-far))) 3176 (< too-high-pa (+ here c-state-cache-too-far)))
3212 (c-append-lower-brace-pair-to-state-cache too-high-pa here-bol)) 3177 (c-append-lower-brace-pair-to-state-cache too-high-pa here here-bol))
3213 (setq c-state-cache-good-pos (or (c-state-cache-after-top-paren) 3178 (setq c-state-cache-good-pos (or (c-state-cache-after-top-paren)
3214 (c-state-get-min-scan-pos))))) 3179 (c-state-get-min-scan-pos)))))
3215 3180
@@ -3285,47 +3250,39 @@ comment at the start of cc-engine.el for more info."
3285 strategy (car res) 3250 strategy (car res)
3286 start-point (cadr res)) 3251 start-point (cadr res))
3287 3252
3288 (when (eq strategy 'BOD)
3289 (setq c-state-cache nil
3290 c-state-cache-good-pos start-point))
3291
3292 ;; SCAN! 3253 ;; SCAN!
3293 (save-restriction 3254 (cond
3294 (cond 3255 ((eq strategy 'forward)
3295 ((memq strategy '(forward BOD)) 3256 (setq res (c-remove-stale-state-cache start-point here here-bopl))
3296 (narrow-to-region (point-min) here) 3257 (setq cache-pos (car res)
3297 (setq res (c-remove-stale-state-cache start-point here-bopl)) 3258 scan-backward-pos (cadr res)
3298 (setq cache-pos (car res) 3259 bopl-state (car (cddr res))) ; will be nil if (< here-bopl
3299 scan-backward-pos (cadr res)
3300 bopl-state (car (cddr res))) ; will be nil if (< here-bopl
3301 ; start-point) 3260 ; start-point)
3302 (if scan-backward-pos 3261 (if scan-backward-pos
3303 (c-append-lower-brace-pair-to-state-cache scan-backward-pos)) 3262 (c-append-lower-brace-pair-to-state-cache scan-backward-pos here))
3304 (setq good-pos 3263 (setq good-pos
3305 (c-append-to-state-cache cache-pos)) 3264 (c-append-to-state-cache cache-pos here))
3306 (setq c-state-cache-good-pos 3265 (setq c-state-cache-good-pos
3307 (if (and bopl-state 3266 (if (and bopl-state
3308 (< good-pos (- here c-state-cache-too-far))) 3267 (< good-pos (- here c-state-cache-too-far)))
3309 (c-state-cache-non-literal-place here-bopl bopl-state) 3268 (c-state-cache-non-literal-place here-bopl bopl-state)
3310 good-pos))) 3269 good-pos)))
3311 3270
3312 ((eq strategy 'backward) 3271 ((eq strategy 'backward)
3313 (setq res (c-remove-stale-state-cache-backwards here) 3272 (setq res (c-remove-stale-state-cache-backwards here)
3314 good-pos (car res) 3273 good-pos (car res)
3315 scan-backward-pos (cadr res) 3274 scan-backward-pos (cadr res)
3316 scan-forward-p (car (cddr res))) 3275 scan-forward-p (car (cddr res)))
3317 (if scan-backward-pos 3276 (if scan-backward-pos
3318 (c-append-lower-brace-pair-to-state-cache 3277 (c-append-lower-brace-pair-to-state-cache scan-backward-pos here))
3319 scan-backward-pos)) 3278 (setq c-state-cache-good-pos
3320 (setq c-state-cache-good-pos 3279 (if scan-forward-p
3321 (if scan-forward-p 3280 (c-append-to-state-cache good-pos here)
3322 (progn (narrow-to-region (point-min) here) 3281 good-pos)))
3323 (c-append-to-state-cache good-pos)) 3282
3324 good-pos))) 3283 (t ; (eq strategy 'IN-LIT)
3325 3284 (setq c-state-cache nil
3326 (t ; (eq strategy 'IN-LIT) 3285 c-state-cache-good-pos nil))))
3327 (setq c-state-cache nil
3328 c-state-cache-good-pos nil)))))
3329 3286
3330 c-state-cache) 3287 c-state-cache)
3331 3288
diff --git a/nt/INSTALL b/nt/INSTALL
index 487e5ec0bf8..0c4b50f0c28 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -110,12 +110,14 @@
110 WinZip is known to create some subtle and hard to debug problems, 110 WinZip is known to create some subtle and hard to debug problems,
111 such as converting files to DOS CR-LF format, not creating empty 111 such as converting files to DOS CR-LF format, not creating empty
112 directories, etc. We suggest to use djtarnt.exe from the GNU FTP 112 directories, etc. We suggest to use djtarnt.exe from the GNU FTP
113 site. 113 site. For modern formats, such as .tar.xz, we suggest bsdtar.exe
114 from the libarchive package; its precompiled Windows binaries are
115 available from this site:
116
117 http://sourceforge.net/projects/ezwinports/files/
114 118
115 In addition to this file, you should also read INSTALL.BZR in the 119 In addition to this file, if you build a development snapshot, you
116 parent directory, and make sure that you have a version of 120 should also read INSTALL.BZR in the parent directory.
117 "touch.exe" in your path, and that it will create files that do not
118 yet exist.
119 121
120* Supported development environments 122* Supported development environments
121 123