aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKenichi Handa2010-01-15 14:13:05 +0900
committerKenichi Handa2010-01-15 14:13:05 +0900
commitfa0cff43e861a49d9f992ffccbe4f71e29d71e1a (patch)
tree2a2bf41b76f624200d873bd604176cc6b7237f69 /lisp/progmodes
parentcc320f07d4d1c0033c1728d22421462ab1fcc04e (diff)
parent56a03f46b825f2c22c7a982e8d4bcb5545908a09 (diff)
downloademacs-fa0cff43e861a49d9f992ffccbe4f71e29d71e1a.tar.gz
emacs-fa0cff43e861a49d9f992ffccbe4f71e29d71e1a.zip
from trunk
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ada-mode.el39
-rw-r--r--lisp/progmodes/ada-stmt.el2
-rw-r--r--lisp/progmodes/ada-xref.el2
-rw-r--r--lisp/progmodes/cc-defs.el4
-rw-r--r--lisp/progmodes/cc-engine.el8
-rw-r--r--lisp/progmodes/cc-fonts.el4
-rw-r--r--lisp/progmodes/delphi.el2
-rw-r--r--lisp/progmodes/flymake.el2
-rw-r--r--lisp/progmodes/gdb-ui.el2
-rw-r--r--lisp/progmodes/idlwave.el2
10 files changed, 33 insertions, 34 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index d0affdc0726..2b94fdb25ff 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -229,11 +229,13 @@ It may be `downcase-word', `upcase-word', `ada-loose-case-word' or
229 (const ada-no-auto-case)) 229 (const ada-no-auto-case))
230 :group 'ada) 230 :group 'ada)
231 231
232;; FIXME If this is not something required by the ada language, this
233;; should be removed.
234(defcustom ada-clean-buffer-before-saving t 232(defcustom ada-clean-buffer-before-saving t
235 "*Non-nil means remove trailing spaces and untabify the buffer before saving." 233 "*Non-nil means remove trailing spaces and untabify the buffer before saving."
236 :type 'boolean :group 'ada) 234 :type 'boolean :group 'ada)
235(make-obsolete-variable 'ada-clean-buffer-before-saving
236 "use the `write-file-functions' hook."
237 "23.2")
238
237 239
238(defcustom ada-indent 3 240(defcustom ada-indent 3
239 "*Size of Ada indentation. 241 "*Size of Ada indentation.
@@ -672,7 +674,7 @@ A new statement starts after these.")
672 674
673(defvar ada-subprog-start-re 675(defvar ada-subprog-start-re
674 (eval-when-compile 676 (eval-when-compile
675 (concat "\\<" (regexp-opt '("accept" "entry" "function" "package" "procedure" 677 (concat "\\<" (regexp-opt '("accept" "entry" "function" "overriding" "package" "procedure"
676 "protected" "task") t) "\\>")) 678 "protected" "task") t) "\\>"))
677 "Regexp for the start of a subprogram.") 679 "Regexp for the start of a subprogram.")
678 680
@@ -719,7 +721,7 @@ displaying the menu if point was on an identifier."
719(defconst ada-imenu-comment-re "\\([ \t]*--.*\\)?") 721(defconst ada-imenu-comment-re "\\([ \t]*--.*\\)?")
720 722
721(defconst ada-imenu-subprogram-menu-re 723(defconst ada-imenu-subprogram-menu-re
722 (concat "^[ \t]*\\(procedure\\|function\\)[ \t\n]+" 724 (concat "^[ \t]*\\(overriding[ \t]*\\)?\\(procedure\\|function\\)[ \t\n]+"
723 "\\(\\(\\sw\\|_\\)+\\)[ \t\n]*\\([ \t\n]\\|([^)]+)" 725 "\\(\\(\\sw\\|_\\)+\\)[ \t\n]*\\([ \t\n]\\|([^)]+)"
724 ada-imenu-comment-re 726 ada-imenu-comment-re
725 "\\)[ \t\n]*" 727 "\\)[ \t\n]*"
@@ -727,7 +729,7 @@ displaying the menu if point was on an identifier."
727 729
728(defvar ada-imenu-generic-expression 730(defvar ada-imenu-generic-expression
729 (list 731 (list
730 (list nil ada-imenu-subprogram-menu-re 2) 732 (list nil ada-imenu-subprogram-menu-re 3)
731 (list "*Specs*" 733 (list "*Specs*"
732 (concat 734 (concat
733 "^[ \t]*\\(procedure\\|function\\)[ \t\n]+\\(\\(\\sw\\|_\\)+\\)" 735 "^[ \t]*\\(procedure\\|function\\)[ \t\n]+\\(\\(\\sw\\|_\\)+\\)"
@@ -1303,14 +1305,6 @@ the file name."
1303 1305
1304 (set-syntax-table ada-mode-syntax-table) 1306 (set-syntax-table ada-mode-syntax-table)
1305 1307
1306 (if ada-clean-buffer-before-saving
1307 (progn
1308 ;; remove all spaces at the end of lines in the whole buffer.
1309 (add-hook 'local-write-file-hooks 'delete-trailing-whitespace)
1310 ;; convert all tabs to the correct number of spaces.
1311 (add-hook 'local-write-file-hooks
1312 (lambda () (untabify (point-min) (point-max))))))
1313
1314 (set (make-local-variable 'skeleton-further-elements) 1308 (set (make-local-variable 'skeleton-further-elements)
1315 '((< '(backward-delete-char-untabify 1309 '((< '(backward-delete-char-untabify
1316 (min ada-indent (current-column)))))) 1310 (min ada-indent (current-column))))))
@@ -2483,7 +2477,7 @@ and the offset."
2483 (list (progn (back-to-indentation) (point)) 'ada-indent)) 2477 (list (progn (back-to-indentation) (point)) 'ada-indent))
2484 (save-excursion 2478 (save-excursion
2485 (ada-goto-stmt-start) 2479 (ada-goto-stmt-start)
2486 (if (looking-at "\\<package\\|procedure\\|function\\>") 2480 (if (looking-at "\\<overriding\\|package\\|procedure\\|function\\>")
2487 (list (progn (back-to-indentation) (point)) 0) 2481 (list (progn (back-to-indentation) (point)) 0)
2488 (list (progn (back-to-indentation) (point)) 'ada-indent))))) 2482 (list (progn (back-to-indentation) (point)) 'ada-indent)))))
2489 2483
@@ -2632,20 +2626,23 @@ and the offset."
2632 (looking-at "\\<\\(package\\|function\\|procedure\\)\\>")) 2626 (looking-at "\\<\\(package\\|function\\|procedure\\)\\>"))
2633 (save-excursion 2627 (save-excursion
2634 ;; Go up until we find either a generic section, or the end of the 2628 ;; Go up until we find either a generic section, or the end of the
2635 ;; previous subprogram/package 2629 ;; previous subprogram/package, or 'overriding' for this function/procedure
2636 (let (found) 2630 (let (found)
2637 (while (and (not found) 2631 (while (and (not found)
2638 (ada-search-ignore-string-comment 2632 (ada-search-ignore-string-comment
2639 "\\<\\(generic\\|end\\|begin\\|package\\|procedure\\|function\\)\\>" t)) 2633 "\\<\\(generic\\|end\\|begin\\|overriding\\|package\\|procedure\\|function\\)\\>" t))
2640 2634
2641 ;; avoid "with procedure"... in generic parts 2635 ;; avoid "with procedure"... in generic parts
2642 (save-excursion 2636 (save-excursion
2643 (forward-word -1) 2637 (forward-word -1)
2644 (setq found (not (looking-at "with")))))) 2638 (setq found (not (looking-at "with"))))))
2645 2639
2646 (if (looking-at "generic") 2640 (cond
2647 (list (progn (back-to-indentation) (point)) 0) 2641 ((looking-at "\\<generic\\|overriding\\>")
2648 (ada-indent-on-previous-lines nil orgpoint orgpoint)))) 2642 (list (progn (back-to-indentation) (point)) 0))
2643
2644 (t
2645 (ada-indent-on-previous-lines nil orgpoint orgpoint)))))
2649 2646
2650 ;;--------------------------------- 2647 ;;---------------------------------
2651 ;; label 2648 ;; label
@@ -4571,6 +4568,8 @@ Moves to 'begin' if in a declarative part."
4571 4568
4572 (define-key ada-mode-extra-map "u" 'ada-prj-edit) 4569 (define-key ada-mode-extra-map "u" 'ada-prj-edit)
4573 4570
4571 (define-key ada-mode-map "\C-xnd" 'ada-narrow-to-defun); override narrow-to-defun
4572
4574 ;; The templates, defined in ada-stmt.el 4573 ;; The templates, defined in ada-stmt.el
4575 4574
4576 (let ((map (make-sparse-keymap))) 4575 (let ((map (make-sparse-keymap)))
@@ -5063,7 +5062,7 @@ Since the search can be long, the results are cached."
5063 5062
5064 ;; Get the function name, but not the properties, or this changes 5063 ;; Get the function name, but not the properties, or this changes
5065 ;; the face in the modeline on Emacs 21 5064 ;; the face in the modeline on Emacs 21
5066 (setq func-name (match-string-no-properties 2)) 5065 (setq func-name (match-string-no-properties 3))
5067 (if (and (not (ada-in-comment-p)) 5066 (if (and (not (ada-in-comment-p))
5068 (not (save-excursion 5067 (not (save-excursion
5069 (goto-char (match-end 0)) 5068 (goto-char (match-end 0))
diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el
index 91058890d46..103bc093bdb 100644
--- a/lisp/progmodes/ada-stmt.el
+++ b/lisp/progmodes/ada-stmt.el
@@ -187,7 +187,7 @@ Indent for the first line of code."
187 187
188 188
189(define-skeleton ada-if 189(define-skeleton ada-if
190 "Insert skeleton if statment, prompting for a boolean-expression." 190 "Insert skeleton if statement, prompting for a boolean-expression."
191 "[condition]: " 191 "[condition]: "
192 "if " str " then" \n 192 "if " str " then" \n
193 > _ \n 193 > _ \n
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index dd54736ef0b..bf836b20eee 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -755,7 +755,7 @@ is non-nil, prompt the user to select one. If none are found, return
755 (let ((file (buffer-file-name nil))) 755 (let ((file (buffer-file-name nil)))
756 (list 756 (list
757 ;; variable name alphabetical order 757 ;; variable name alphabetical order
758 'ada_project_path "" 758 'ada_project_path (or (getenv "ADA_PROJECT_PATH") "")
759 'ada_project_path_sep ada-prj-ada-project-path-sep 759 'ada_project_path_sep ada-prj-ada-project-path-sep
760 'bind_opt ada-prj-default-bind-opt 760 'bind_opt ada-prj-default-bind-opt
761 'build_dir default-directory 761 'build_dir default-directory
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index e642cf360a1..de0cd896b8e 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1010,7 +1010,7 @@ MODE is either a mode symbol or a list of mode symbols."
1010 `(c-clear-char-property-fun ,pos ',property)))) 1010 `(c-clear-char-property-fun ,pos ',property))))
1011 1011
1012(defmacro c-clear-char-properties (from to property) 1012(defmacro c-clear-char-properties (from to property)
1013 ;; Remove all the occurences of the given property in the given 1013 ;; Remove all the occurrences of the given property in the given
1014 ;; region that has been put with `c-put-char-property'. PROPERTY is 1014 ;; region that has been put with `c-put-char-property'. PROPERTY is
1015 ;; assumed to be constant. 1015 ;; assumed to be constant.
1016 ;; 1016 ;;
@@ -1035,7 +1035,7 @@ which have the value VALUE, as tested by `equal'. These
1035properties are assumed to be over individual characters, having 1035properties are assumed to be over individual characters, having
1036been put there by c-put-char-property. POINT remains unchanged." 1036been put there by c-put-char-property. POINT remains unchanged."
1037 (let ((place from) end-place) 1037 (let ((place from) end-place)
1038 (while ; loop round occurrances of (PROPERTY VALUE) 1038 (while ; loop round occurrences of (PROPERTY VALUE)
1039 (progn 1039 (progn
1040 (while ; loop round changes in PROPERTY till we find VALUE 1040 (while ; loop round changes in PROPERTY till we find VALUE
1041 (and 1041 (and
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index f1e6bf98ece..0e6358aeee1 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -447,7 +447,7 @@ comment at the start of cc-engine.el for more info."
447 (c-put-char-property pos 'c-type value)) 447 (c-put-char-property pos 'c-type value))
448 448
449(defun c-clear-c-type-property (from to value) 449(defun c-clear-c-type-property (from to value)
450 ;; Remove all occurences of the c-type property that has the given 450 ;; Remove all occurrences of the c-type property that has the given
451 ;; value in the region between FROM and TO. VALUE is assumed to not 451 ;; value in the region between FROM and TO. VALUE is assumed to not
452 ;; be nil. 452 ;; be nil.
453 ;; 453 ;;
@@ -555,7 +555,7 @@ the previous one if already at the beginning of one. Only
555statements/declarations on the same level are considered, i.e. don't 555statements/declarations on the same level are considered, i.e. don't
556move into or out of sexps (not even normal expression parentheses). 556move into or out of sexps (not even normal expression parentheses).
557 557
558If point is already at the earliest statment within braces or parens, 558If point is already at the earliest statement within braces or parens,
559this function doesn't move back into any whitespace preceding it; it 559this function doesn't move back into any whitespace preceding it; it
560returns 'same in this case. 560returns 'same in this case.
561 561
@@ -605,7 +605,7 @@ comment at the start of cc-engine.el for more info."
605 ;; The bulk of this function is a pushdown automaton that looks at statement 605 ;; The bulk of this function is a pushdown automaton that looks at statement
606 ;; boundaries and the tokens (such as "while") in c-opt-block-stmt-key. Its 606 ;; boundaries and the tokens (such as "while") in c-opt-block-stmt-key. Its
607 ;; purpose is to keep track of nested statements, ensuring that such 607 ;; purpose is to keep track of nested statements, ensuring that such
608 ;; statments are skipped over in their entirety (somewhat akin to what C-M-p 608 ;; statements are skipped over in their entirety (somewhat akin to what C-M-p
609 ;; does with nested braces/brackets/parentheses). 609 ;; does with nested braces/brackets/parentheses).
610 ;; 610 ;;
611 ;; Note: The position of a boundary is the following token. 611 ;; Note: The position of a boundary is the following token.
@@ -4394,7 +4394,7 @@ comment at the start of cc-engine.el for more info."
4394 ;; `c-decl-prefix-or-start-re' when that submatch matches. 4394 ;; `c-decl-prefix-or-start-re' when that submatch matches.
4395 ;; o The start of each `c-decl-prefix-or-start-re' match when 4395 ;; o The start of each `c-decl-prefix-or-start-re' match when
4396 ;; submatch 1 doesn't match. 4396 ;; submatch 1 doesn't match.
4397 ;; o The first token after the end of each occurence of the 4397 ;; o The first token after the end of each occurrence of the
4398 ;; `c-type' text property with the value `c-decl-end', provided 4398 ;; `c-type' text property with the value `c-decl-end', provided
4399 ;; `c-type-decl-end-used' is set. 4399 ;; `c-type-decl-end-used' is set.
4400 ;; 4400 ;;
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 7763a5d9283..907c308daca 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1327,7 +1327,7 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
1327 ,@(when (c-lang-const c-recognize-<>-arglists) 1327 ,@(when (c-lang-const c-recognize-<>-arglists)
1328 `(c-font-lock-<>-arglists)) 1328 `(c-font-lock-<>-arglists))
1329 1329
1330 ;; The first two rules here mostly find occurences that 1330 ;; The first two rules here mostly find occurrences that
1331 ;; `c-font-lock-declarations' has found already, but not 1331 ;; `c-font-lock-declarations' has found already, but not
1332 ;; declarations containing blocks in the type (see note below). 1332 ;; declarations containing blocks in the type (see note below).
1333 ;; It's also useful to fontify these everywhere to show e.g. when 1333 ;; It's also useful to fontify these everywhere to show e.g. when
@@ -2117,7 +2117,7 @@ need for `pike-font-lock-extra-types'.")
2117 2117
2118(defun c-find-invalid-doc-markup (regexp limit) 2118(defun c-find-invalid-doc-markup (regexp limit)
2119 ;; Used to fontify invalid markup in doc comments after the correct 2119 ;; Used to fontify invalid markup in doc comments after the correct
2120 ;; ones have been fontified: Find the first occurence of REGEXP 2120 ;; ones have been fontified: Find the first occurrence of REGEXP
2121 ;; between the point and LIMIT that only is fontified with 2121 ;; between the point and LIMIT that only is fontified with
2122 ;; `c-doc-face-name'. If a match is found then submatch 0 surrounds 2122 ;; `c-doc-face-name'. If a match is found then submatch 0 surrounds
2123 ;; the first char and t is returned, otherwise nil is returned. 2123 ;; the first char and t is returned, otherwise nil is returned.
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index ff92329f8be..1e5f1f506b3 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -1370,7 +1370,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do:
1370 ;; Indent in from the expression. 1370 ;; Indent in from the expression.
1371 (delphi-indent-of last-token delphi-indent-level)) 1371 (delphi-indent-of last-token delphi-indent-level))
1372 1372
1373 ;; No enclosing expression; use the previous statment's 1373 ;; No enclosing expression; use the previous statement's
1374 ;; indent. 1374 ;; indent.
1375 ((delphi-previous-indent-of token))))) 1375 ((delphi-previous-indent-of token)))))
1376 1376
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 865cd153be1..4af331c5c29 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -643,7 +643,7 @@ It's flymake process filter."
643 (flymake-report-status "" "") ; PASSED 643 (flymake-report-status "" "") ; PASSED
644 (if (not flymake-check-was-interrupted) 644 (if (not flymake-check-was-interrupted)
645 (flymake-report-fatal-status "CFGERR" 645 (flymake-report-fatal-status "CFGERR"
646 (format "Configuration error has occured while running %s" command)) 646 (format "Configuration error has occurred while running %s" command))
647 (flymake-report-status nil ""))) ; "STOPPED" 647 (flymake-report-status nil ""))) ; "STOPPED"
648 (flymake-report-status (format "%d/%d" err-count warn-count) "")))) 648 (flymake-report-status (format "%d/%d" err-count warn-count) ""))))
649 649
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 9b1f1066d28..4be5cc4511e 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1814,7 +1814,7 @@ happens to be appropriate."
1814Field names are wrapped in double quotes and equal signs are 1814Field names are wrapped in double quotes and equal signs are
1815replaced with semicolons. 1815replaced with semicolons.
1816 1816
1817If FIX-KEY is non-nil, strip all \"FIX-KEY=\" occurences from 1817If FIX-KEY is non-nil, strip all \"FIX-KEY=\" occurrences from
1818partial output. This is used to get rid of useless keys in lists 1818partial output. This is used to get rid of useless keys in lists
1819in MI messages, e.g.: [key=.., key=..]. -stack-list-frames and 1819in MI messages, e.g.: [key=.., key=..]. -stack-list-frames and
1820-break-info are examples of MI commands which issue such 1820-break-info are examples of MI commands which issue such
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 6cdd0503757..e6228286a19 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -4607,7 +4607,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.")
4607 4607
4608 4608
4609(defun idlwave-shorten-syntax (syntax name &optional class) 4609(defun idlwave-shorten-syntax (syntax name &optional class)
4610 ;; From a list of syntax statments, shorten with %s and group with "or" 4610 ;; From a list of syntax statements, shorten with %s and group with "or"
4611 (let ((case-fold-search t)) 4611 (let ((case-fold-search t))
4612 (mapconcat 4612 (mapconcat
4613 (lambda (x) 4613 (lambda (x)