From 17cb69a5ae5be8e51528480a3fc12ff996097de3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 29 Jan 2008 10:41:42 +0000 Subject: [PATCH 01/13] *** empty log message *** --- lisp/ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 02b3cef22bf..4e454acfc8e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -11,12 +11,12 @@ 2008-01-26 Alan Mackenzie - * progmodes/cc-vars.el (c-hanging-braces-alist): new element for + * progmodes/cc-vars.el (c-hanging-braces-alist): New element for arglist-cont-nonempty. * progmodes/cc-cmds.el (c-brace-newlines): Determine the newlines for a brace with syntax arglist-cont-nonempty. - + * progmodes/cc-styles.el (c-style-alist): Add elements for arglist-cont-nonempty into 5 styles (gnu, ellemtel, linux, python, awk). @@ -31,7 +31,7 @@ * progmodes/etags.el (tags-query-replace): Doc fix. -2008-01-26 Phil Sung (tiny change) +2008-01-26 Phil Sung (tiny change) * wdired.el (wdired-get-filename): Change `(1+ beg)' to `beg' so that the filename end is found even when the filename is empty. From 66381027737a926f4309a86b0b1bab24d0dad381 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 29 Jan 2008 14:45:13 +0000 Subject: [PATCH 02/13] (hack-local-variables): Don't query about fake variables. --- lisp/files.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index ea327f48f2c..7c0557cd5ad 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2767,7 +2767,8 @@ is specified, returning t if it is specified." (dolist (elt result) (let ((var (car elt)) (val (cdr elt))) - (or (eq var 'mode) + ;; Don't query about the fake variables. + (or (memq var '(mode unibyte coding)) (and (eq var 'eval) (or (eq enable-local-eval t) (hack-one-local-variable-eval-safep From c575e6587e4bea7e181bc8a2b09e57ee0e4a11a1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 29 Jan 2008 14:49:10 +0000 Subject: [PATCH 03/13] (tags-query-replace): Delete unused optional args. Doc fix. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/etags.el | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4e454acfc8e..591a159d4d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-01-29 Richard Stallman + + * progmodes/etags.el (tags-query-replace): Delete unused optional args. + Doc fix. + + * files.el (hack-local-variables): Don't query about fake variables. + 2008-01-27 Nick Roberts * progmodes/gdb-ui.el (gdb-create-define-alist): Don't call diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index a22853fb404..0a66560f827 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1815,7 +1815,7 @@ See documentation of variable `tags-file-name'." (tags-loop-continue (or file-list-form t)))) ;;;###autoload -(defun tags-query-replace (from to &optional delimited file-list-form start end) +(defun tags-query-replace (from to &optional delimited file-list-form) "Do `query-replace-regexp' of FROM with TO on all files listed in tags table. Third arg DELIMITED (prefix arg) means replace only word-delimited matches. If you exit (\\[keyboard-quit], RET or q), you can resume the query replace @@ -1824,7 +1824,10 @@ Fourth arg FILE-LIST-FORM non-nil means initialize the replacement loop. Fifth and sixth arguments START and END are accepted, for compatibility with `query-replace-regexp', and ignored. -See also documentation of the variable `tags-file-name'." +If FILE-LIST-FORM is non-nil, it is a form to evaluate to +produce the list of files to search. + +See also the documentation of the variable `tags-file-name'." (interactive (query-replace-read-args "Tags query replace (regexp)" t t)) (setq tags-loop-scan `(let ,(unless (equal from (downcase from)) '((case-fold-search nil))) From bf624ae476f3fbd51f7c90f831032a99db260ea1 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:04:32 +0000 Subject: [PATCH 04/13] *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 591a159d4d6..b47bb601af2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-01-29 Alan Mackenzie + + * progmodes/cc-defs.el (c-version): increase to 5.31.5. + 2008-01-29 Richard Stallman * progmodes/etags.el (tags-query-replace): Delete unused optional args. @@ -11,6 +15,11 @@ gdb-cpp-define-alist-program if file is nil (currently only " *partial-output-..."). +2008-01-27 Alan Mackenzie + + * progmodes/cc-awk.el, progmodes/cc-engine.el: Correct typos, + enhance comments. + 2008-01-27 Richard Stallman * allout.el: Many doc fixes. From 4994db5843f5a319ee79da3055cefe7e088225c1 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:05:22 +0000 Subject: [PATCH 05/13] (c-version): increase to 5.31.5. --- lisp/progmodes/cc-defs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 1632d756ffc..d7be903d357 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -96,7 +96,7 @@ ;;; Variables also used at compile time. -(defconst c-version "5.31.4" +(defconst c-version "5.31.5" "CC Mode version number.") (defconst c-version-sym (intern c-version)) From d29cf86d3074248c077e4deaf49c1f4100e0fd25 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:16:18 +0000 Subject: [PATCH 06/13] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b47bb601af2..bf24be08751 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2008-01-29 Alan Mackenzie + * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor + the "{" of a template function correctly on "template", not the + following "<". + * progmodes/cc-defs.el (c-version): increase to 5.31.5. 2008-01-29 Richard Stallman From 820d062bde06707f66828166ebf97bbb123851b8 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:17:44 +0000 Subject: [PATCH 07/13] (c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function correctly on "template", not the following "<". --- lisp/progmodes/cc-engine.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 929b000b83f..77b43657050 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -8030,12 +8030,15 @@ comment at the start of cc-engine.el for more info." ;; CASE 5A.5: ordinary defun open (t - (goto-char placeholder) - (if (or containing-decl-open macro-start) - (c-add-syntax 'defun-open (c-point 'boi)) - ;; Bogus to use bol here, but it's the legacy. - (c-add-syntax 'defun-open (c-point 'bol))) - ))) + (save-excursion + (c-beginning-of-decl-1 lim) + (while (looking-at c-specifier-key) + (goto-char (match-end 1)) + (c-forward-syntactic-ws indent-point)) + (c-add-syntax 'defun-open (c-point 'boi)) + ;; Bogus to use bol here, but it's the legacy. (Resolved, + ;; 2007-11-09) + )))) ;; CASE 5B: After a function header but before the body (or ;; the ending semicolon if there's no body). From d7e889f65513307919255f3f55551c6a71a26b68 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:30:04 +0000 Subject: [PATCH 08/13] *** empty log message *** --- lisp/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bf24be08751..ee1a6ee0adc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-01-29 Alan Mackenzie + * progmodes/cc-engine.el (c-specifier-key): Exclude "template" + from this regexp; part of same fix as next change to cc-engine.el. + * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor the "{" of a template function correctly on "template", not the following "<". From cc1cce145e9f0bd619dd1af3c50f3c862b6779c6 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:30:54 +0000 Subject: [PATCH 09/13] (c-specifier-key): Exclude "template" from this regexp; to allow the "{" of a template function to be correctly anchored on "template", not the following "<". --- lisp/progmodes/cc-langs.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 9e8dd282e11..4c82fb522c0 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1771,11 +1771,13 @@ one of `c-type-list-kwds', `c-ref-list-kwds', (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) (c-lang-defconst c-specifier-key - ;; Adorned regexp of the keywords in `c-prefix-spec-kwds' that - ;; aren't ambiguous with types or type prefixes. + ;; Adorned regexp of the keywords in `c-prefix-spec-kwds' that aren't + ;; ambiguous with types or type prefixes. These are the keywords (like + ;; extern, namespace, but NOT template) that can modify a declaration. t (c-make-keywords-re t (set-difference (c-lang-const c-prefix-spec-kwds) - (c-lang-const c-type-start-kwds) + (append (c-lang-const c-type-start-kwds) + (c-lang-const c-<>-arglist-kwds)) :test 'string-equal))) (c-lang-defvar c-specifier-key (c-lang-const c-specifier-key)) From f4e9b84033c490981e22911ce045c42d7721c300 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:35:05 +0000 Subject: [PATCH 10/13] Correct file name in previous commission. --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ee1a6ee0adc..14067364e54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,6 @@ 2008-01-29 Alan Mackenzie - * progmodes/cc-engine.el (c-specifier-key): Exclude "template" + * progmodes/cc-langs.el (c-specifier-key): Exclude "template" from this regexp; part of same fix as next change to cc-engine.el. * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor From 6c7480fc75820b56a92e729eea60813ab1a5e25d Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:45:51 +0000 Subject: [PATCH 11/13] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14067364e54..f0565096f3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2008-01-29 Alan Mackenzie + * progmodes/cc-langs.el (c-block-stmt-1-kwds, c-block-stmt-2-kwds) + (c-simple-stmt-kwds): New Objective C keywords: @finally, @try, + @catch, @synchronized, @throw. + * progmodes/cc-langs.el (c-specifier-key): Exclude "template" from this regexp; part of same fix as next change to cc-engine.el. From 9555a4cfeb2e5ebf3c0283d7b79586ef22e62c9d Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 29 Jan 2008 20:47:03 +0000 Subject: [PATCH 12/13] (c-block-stmt-1-kwds, c-block-stmt-2-kwds, c-simple-stmt-kwds): New Objective C keywords: @finally, @try, @catch, @synchronized, @throw. --- lisp/progmodes/cc-langs.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 4c82fb522c0..54725c0fd88 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1972,6 +1972,7 @@ identifiers that follows the type in a normal declaration." "Statement keywords followed directly by a substatement." t '("do" "else") c++ '("do" "else" "try") + objc '("do" "else" "@finally" "@try") java '("do" "else" "finally" "try") idl nil) @@ -1985,6 +1986,7 @@ identifiers that follows the type in a normal declaration." "Statement keywords followed by a paren sexp and then by a substatement." t '("for" "if" "switch" "while") c++ '("for" "if" "switch" "while" "catch") + objc '("for" "if" "switch" "while" "@catch" "@synchronized") java '("for" "if" "switch" "while" "catch" "synchronized") idl nil pike '("for" "if" "switch" "while" "foreach") @@ -2016,6 +2018,7 @@ identifiers that follows the type in a normal declaration." (c-lang-defconst c-simple-stmt-kwds "Statement keywords followed by an expression or nothing." t '("break" "continue" "goto" "return") + objc '("break" "continue" "goto" "return" "@throw") ;; Note: `goto' is not valid in Java, but the keyword is still reserved. java '("break" "continue" "goto" "return" "throw") idl nil From 4bd81fde833444fe510c465706aec4134e1ae403 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 30 Jan 2008 03:42:50 +0000 Subject: [PATCH 13/13] *** empty log message *** --- lisp/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0565096f3d..aa5b50b2208 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,7 +3,7 @@ * progmodes/cc-langs.el (c-block-stmt-1-kwds, c-block-stmt-2-kwds) (c-simple-stmt-kwds): New Objective C keywords: @finally, @try, @catch, @synchronized, @throw. - + * progmodes/cc-langs.el (c-specifier-key): Exclude "template" from this regexp; part of same fix as next change to cc-engine.el. @@ -11,7 +11,7 @@ the "{" of a template function correctly on "template", not the following "<". - * progmodes/cc-defs.el (c-version): increase to 5.31.5. + * progmodes/cc-defs.el (c-version): Increase to 5.31.5. 2008-01-29 Richard Stallman