summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ada-mode.el2
-rw-r--r--lisp/progmodes/ada-prj.el2
-rw-r--r--lisp/progmodes/ada-stmt.el4
-rw-r--r--lisp/progmodes/ada-xref.el4
-rw-r--r--lisp/progmodes/antlr-mode.el2
-rw-r--r--lisp/progmodes/asm-mode.el2
-rw-r--r--lisp/progmodes/autoconf.el2
-rw-r--r--lisp/progmodes/bug-reference.el2
-rw-r--r--lisp/progmodes/cap-words.el2
-rw-r--r--lisp/progmodes/cc-align.el2
-rw-r--r--lisp/progmodes/cc-awk.el2
-rw-r--r--lisp/progmodes/cc-bytecomp.el2
-rw-r--r--lisp/progmodes/cc-cmds.el2
-rw-r--r--lisp/progmodes/cc-compat.el2
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/cc-engine.el8
-rw-r--r--lisp/progmodes/cc-fonts.el38
-rw-r--r--lisp/progmodes/cc-guess.el2
-rw-r--r--lisp/progmodes/cc-langs.el68
-rw-r--r--lisp/progmodes/cc-menus.el2
-rw-r--r--lisp/progmodes/cc-mode.el190
-rw-r--r--lisp/progmodes/cc-styles.el2
-rw-r--r--lisp/progmodes/cc-vars.el2
-rw-r--r--lisp/progmodes/cfengine.el144
-rw-r--r--lisp/progmodes/cmacexp.el2
-rw-r--r--lisp/progmodes/compile.el2
-rw-r--r--lisp/progmodes/cperl-mode.el16
-rw-r--r--lisp/progmodes/cpp.el2
-rw-r--r--lisp/progmodes/cwarn.el2
-rw-r--r--lisp/progmodes/dcl-mode.el2
-rw-r--r--lisp/progmodes/delphi.el2
-rw-r--r--lisp/progmodes/ebnf-abn.el2
-rw-r--r--lisp/progmodes/ebnf-bnf.el2
-rw-r--r--lisp/progmodes/ebnf-dtd.el2
-rw-r--r--lisp/progmodes/ebnf-ebx.el2
-rw-r--r--lisp/progmodes/ebnf-iso.el2
-rw-r--r--lisp/progmodes/ebnf-otz.el2
-rw-r--r--lisp/progmodes/ebnf-yac.el2
-rw-r--r--lisp/progmodes/ebnf2ps.el10
-rw-r--r--lisp/progmodes/ebrowse.el2
-rw-r--r--lisp/progmodes/etags.el2
-rw-r--r--lisp/progmodes/executable.el2
-rw-r--r--lisp/progmodes/f90.el2
-rw-r--r--lisp/progmodes/flymake.el2
-rw-r--r--lisp/progmodes/fortran.el2
-rw-r--r--lisp/progmodes/gdb-mi.el226
-rw-r--r--lisp/progmodes/glasses.el2
-rw-r--r--lisp/progmodes/grep.el7
-rw-r--r--lisp/progmodes/gud.el106
-rw-r--r--lisp/progmodes/hideif.el2
-rw-r--r--lisp/progmodes/hideshow.el2
-rw-r--r--lisp/progmodes/icon.el2
-rw-r--r--lisp/progmodes/idlw-complete-structtag.el2
-rw-r--r--lisp/progmodes/idlw-help.el2
-rw-r--r--lisp/progmodes/idlw-shell.el2
-rw-r--r--lisp/progmodes/idlw-toolbar.el2
-rw-r--r--lisp/progmodes/idlwave.el6
-rw-r--r--lisp/progmodes/inf-lisp.el2
-rw-r--r--lisp/progmodes/js.el5
-rw-r--r--lisp/progmodes/ld-script.el2
-rw-r--r--lisp/progmodes/m4-mode.el2
-rw-r--r--lisp/progmodes/make-mode.el2
-rw-r--r--lisp/progmodes/mantemp.el2
-rw-r--r--lisp/progmodes/meta-mode.el4
-rw-r--r--lisp/progmodes/mixal-mode.el2
-rw-r--r--lisp/progmodes/octave-inf.el2
-rw-r--r--lisp/progmodes/octave-mod.el2
-rw-r--r--lisp/progmodes/pascal.el2
-rw-r--r--lisp/progmodes/perl-mode.el2
-rw-r--r--lisp/progmodes/prolog.el12
-rw-r--r--lisp/progmodes/ps-mode.el2
-rw-r--r--lisp/progmodes/python.el4
-rw-r--r--lisp/progmodes/ruby-mode.el2
-rw-r--r--lisp/progmodes/scheme.el2
-rw-r--r--lisp/progmodes/sh-script.el2
-rw-r--r--lisp/progmodes/simula.el2
-rw-r--r--lisp/progmodes/sql.el25
-rw-r--r--lisp/progmodes/subword.el2
-rw-r--r--lisp/progmodes/tcl.el2
-rw-r--r--lisp/progmodes/vera-mode.el6
-rw-r--r--lisp/progmodes/verilog-mode.el30
-rw-r--r--lisp/progmodes/vhdl-mode.el2
-rw-r--r--lisp/progmodes/which-func.el6
-rw-r--r--lisp/progmodes/xscheme.el2
84 files changed, 626 insertions, 419 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 17ff4bd32a6..8ccb8f17d80 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -1,6 +1,6 @@
;;; ada-mode.el --- major-mode for editing Ada sources
-;; Copyright (C) 1994-1995, 1997-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 1997-2012 Free Software Foundation, Inc.
;; Author: Rolf Ebert <ebert@inf.enst.fr>
;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el
index a32e22828fc..10497acbe4b 100644
--- a/lisp/progmodes/ada-prj.el
+++ b/lisp/progmodes/ada-prj.el
@@ -1,6 +1,6 @@
;;; ada-prj.el --- GUI editing of project files for the ada-mode
-;; Copyright (C) 1998-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2012 Free Software Foundation, Inc.
;; Author: Emmanuel Briot <briot@gnat.com>
;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org>
diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el
index e48055c9f50..50c5b695dbc 100644
--- a/lisp/progmodes/ada-stmt.el
+++ b/lisp/progmodes/ada-stmt.el
@@ -1,6 +1,6 @@
;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates
-;; Copyright (C) 1987, 1993-1994, 1996-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 1993-1994, 1996-2012 Free Software Foundation, Inc.
;; Authors: Daniel Pfeiffer
;; Markus Heritsch
@@ -56,7 +56,7 @@
;; BUGS:
;;;> I have the following suggestions for the function template: 1) I
;;;> don't want it automatically assigning it a name for the return variable. I
-;;;> never want it to be called "Result" because that is nondescriptive. If you
+;;;> never want it to be called "Result" because that is nondescript. If you
;;;> must define a variable, give me the ability to specify its name.
;;;>
;;;> 2) You do not provide a type for variable 'Result'. Its type is the same
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index f30457992a3..d72eef27a58 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -1,6 +1,6 @@
;; ada-xref.el --- for lookup and completion in Ada mode
-;; Copyright (C) 1994-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2012 Free Software Foundation, Inc.
;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
;; Rolf Ebert <ebert@inf.enst.fr>
@@ -1533,7 +1533,7 @@ the project file."
;; .ali file for a spec file. If we are, go to step 3.
;; 3- If the file is not found or step 2 failed:
;; find the name of the "other file", ie the body, and look
- ;; for its associated .ali file by subtituing the extension
+ ;; for its associated .ali file by subtituting the extension
;;
;; We must also handle the case of separate packages and subprograms:
;; 4- If no ali file was found, we try to modify the file name by removing
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index d1ff1aead10..634570cf3e4 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -1,6 +1,6 @@
;;; antlr-mode.el --- major mode for ANTLR grammar files
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Christoph.Wedler@sap.com
;; Keywords: languages, ANTLR, code generator
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index 3ac8b119fe1..cfa977d9022 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -1,6 +1,6 @@
;;; asm-mode.el --- mode for editing assembler code
-;; Copyright (C) 1991, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 2001-2012 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Maintainer: FSF
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el
index fce725c3b3c..a7242f6c232 100644
--- a/lisp/progmodes/autoconf.el
+++ b/lisp/progmodes/autoconf.el
@@ -1,6 +1,6 @@
;;; autoconf.el --- mode for editing Autoconf configure.in files
-;; Copyright (C) 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: languages
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 12eddfef1aa..015b9a9ceaf 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -1,6 +1,6 @@
;; bug-reference.el --- buttonize bug references
-;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
;; Created: 21 Mar 2007
diff --git a/lisp/progmodes/cap-words.el b/lisp/progmodes/cap-words.el
index d7b7dfef1ec..6d4d9f0544d 100644
--- a/lisp/progmodes/cap-words.el
+++ b/lisp/progmodes/cap-words.el
@@ -1,6 +1,6 @@
;;; cap-words.el --- minor mode for motion in CapitalizedWordIdentifiers
-;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: languages
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index 81045d63abf..b12020b26be 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -1,6 +1,6 @@
;;; cc-align.el --- custom indentation functions for CC Mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2004- Alan Mackenzie
;; 1998- Martin Stjernholm
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index ef67a18d807..d7829853e3c 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -1,6 +1,6 @@
;;; cc-awk.el --- AWK specific code within cc-mode.
-;; Copyright (C) 1988, 1994, 1996, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1994, 1996, 2000-2012 Free Software Foundation, Inc.
;; Author: Alan Mackenzie <acm@muc.de> (originally based on awk-mode.el)
;; Maintainer: FSF
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el
index 823430f2d38..bd9805673a4 100644
--- a/lisp/progmodes/cc-bytecomp.el
+++ b/lisp/progmodes/cc-bytecomp.el
@@ -1,6 +1,6 @@
;;; cc-bytecomp.el --- compile time setup for proper compilation
-;; Copyright (C) 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
;; Author: Martin Stjernholm
;; Maintainer: bug-cc-mode@gnu.org
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 686695bc838..76b9f304164 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1,6 +1,6 @@
;;; cc-cmds.el --- user level commands for CC Mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 1998- Martin Stjernholm
diff --git a/lisp/progmodes/cc-compat.el b/lisp/progmodes/cc-compat.el
index 01f7379b1b0..bf0ac8c5619 100644
--- a/lisp/progmodes/cc-compat.el
+++ b/lisp/progmodes/cc-compat.el
@@ -1,6 +1,6 @@
;;; cc-compat.el --- cc-mode compatibility with c-mode.el confusion
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 1998- Martin Stjernholm
;; 1994-1999 Barry A. Warsaw
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 2991b511830..93a72796561 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1,6 +1,6 @@
;;; cc-defs.el --- compile time definitions for CC Mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 1998- Martin Stjernholm
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0865ddfed69..392e5d1c37c 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1,6 +1,6 @@
;;; cc-engine.el --- core syntax guessing engine for CC mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2001- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -2153,14 +2153,14 @@ comment at the start of cc-engine.el for more info."
(if (> pos c-state-nonlit-pos-cache-limit)
(setq c-state-nonlit-pos-cache-limit pos))
pos))))
-
+
(defun c-state-literal-at (here)
;; If position HERE is inside a literal, return (START . END), the
;; boundaries of the literal (which may be outside the accessible bit of the
;; buffer). Otherwise, return nil.
;;
;; This function is almost the same as `c-literal-limits'. Previously, it
- ;; differed in that it was a lower level function, and that it rigourously
+ ;; differed in that it was a lower level function, and that it rigorously
;; followed the syntax from BOB. `c-literal-limits' is now (2011-12)
;; virtually identical to this function.
(save-restriction
@@ -2594,7 +2594,7 @@ comment at the start of cc-engine.el for more info."
mstart) ; start of a macro.
(save-excursion
- ;; Each time round the following loop, we enter a succesively deeper
+ ;; Each time round the following loop, we enter a successively deeper
;; level of brace/paren nesting. (Except sometimes we "continue at
;; the existing level".) `pa+1' is a pos inside an opening
;; brace/paren/bracket, usually just after it.
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index c6c8bd107f6..f52864df809 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1,6 +1,6 @@
;;; cc-fonts.el --- font lock support for CC Mode
-;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 2002- Martin Stjernholm
@@ -1428,6 +1428,21 @@ casts and declarations are fontified. Used on level 2 and higher."
(c-fontify-recorded-types-and-refs)
nil)
+ ((and (not c-enums-contain-decls)
+ ;; An optimisation quickly to eliminate scans of long enum
+ ;; declarations in the next cond arm.
+ (let ((paren-state (c-parse-state)))
+ (and
+ (numberp (car paren-state))
+ (save-excursion
+ (goto-char (car paren-state))
+ (c-backward-token-2)
+ (or (looking-at c-brace-list-key)
+ (progn
+ (c-backward-token-2)
+ (looking-at c-brace-list-key)))))))
+ t)
+
(t
;; Are we at a declarator? Try to go back to the declaration
;; to check this. If we get there, check whether a "typedef"
@@ -1538,25 +1553,8 @@ casts and declarations are fontified. Used on level 2 and higher."
;; prevent a repeat invocation. See elisp/lispref page "Search-based
;; Fontification".
(let* ((paren-state (c-parse-state))
- (start (point))
- (bod-lim (max (- (point) 500) (point-min)))
- decl-context bo-decl in-typedef type-type ps-elt)
-
- ;; First, are we actually in a "local" declaration?
- (setq decl-context (c-beginning-of-decl-1 bod-lim)
- bo-decl (point)
- in-typedef (looking-at c-typedef-key))
- (if in-typedef (c-forward-token-2))
- (when (and (eq (car decl-context) 'same)
- (< bo-decl start))
- ;; Are we genuinely at a type?
- (setq type-type (c-forward-type t))
- (if (and type-type
- (or (not (eq type-type 'maybe))
- (looking-at c-symbol-key)))
- (c-font-lock-declarators limit t in-typedef)))
-
- ;; Secondly, are we in any nested struct/union/class/etc. braces?
+ decl-context in-typedef ps-elt)
+ ;; Are we in any nested struct/union/class/etc. braces?
(while paren-state
(setq ps-elt (car paren-state)
paren-state (cdr paren-state))
diff --git a/lisp/progmodes/cc-guess.el b/lisp/progmodes/cc-guess.el
index 6553021e783..fcd6a443b67 100644
--- a/lisp/progmodes/cc-guess.el
+++ b/lisp/progmodes/cc-guess.el
@@ -1,6 +1,6 @@
;;; cc-guess.el --- guess indentation values by scanning existing code
-;; Copyright (C) 1985, 1987, 1992-2006, 2011
+;; Copyright (C) 1985, 1987, 1992-2006, 2011-2012
;; Free Software Foundation, Inc.
;; Author: 1994-1995 Barry A. Warsaw
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 96f0887eec0..fafbfb70552 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1,6 +1,6 @@
;;; cc-langs.el --- language specific settings for CC Mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2002- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -485,28 +485,56 @@ The functions are called even when font locking isn't enabled.
When the mode is initialized, the functions are called with
parameters \(point-min) and \(point-max).")
-(c-lang-defconst c-before-font-lock-function
- "If non-nil, a function called just before font locking.
-Typically it will extend the region about to be fontified \(see
+(c-lang-defconst c-before-font-lock-functions
+ ;; For documentation see the following c-lang-defvar of the same name.
+ ;; The value here may be a list of functions or a single function.
+ t 'c-change-set-fl-decl-start
+ (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP
+ c-change-set-fl-decl-start)
+ awk 'c-awk-extend-and-syntax-tablify-region)
+(c-lang-defvar c-before-font-lock-functions
+ (let ((fs (c-lang-const c-before-font-lock-functions)))
+ (if (listp fs)
+ fs
+ (list fs)))
+ "If non-nil, a list of functions called just before font locking.
+Typically they will extend the region about to be fontified \(see
below) and will set `syntax-table' text properties on the region.
-It takes 3 parameters, the BEG, END, and OLD-LEN supplied to
-every after-change function; point is undefined on both entry and
-exit; on entry, the buffer will have been widened and match-data
-will have been saved; the return value is ignored.
+These functions will be run in the order given. Each of them
+takes 3 parameters, the BEG, END, and OLD-LEN supplied to every
+after-change function; point is undefined on both entry and exit;
+on entry, the buffer will have been widened and match-data will
+have been saved; the return value is ignored.
-The function may extend the region to be fontified by setting the
+The functions may extend the region to be fontified by setting the
buffer local variables c-new-BEG and c-new-END.
-The function is called even when font locking is disabled.
+The functions are called even when font locking is disabled.
-When the mode is initialized, this function is called with
-parameters \(point-min), \(point-max) and <buffer size>."
- t nil
- (c c++ objc) 'c-neutralize-syntax-in-and-mark-CPP
- awk 'c-awk-extend-and-syntax-tablify-region)
-(c-lang-defvar c-before-font-lock-function
- (c-lang-const c-before-font-lock-function))
+When the mode is initialized, these functions are called with
+parameters \(point-min), \(point-max) and <buffer size>.")
+
+(c-lang-defconst c-before-context-fontification-functions
+ awk nil
+ t 'c-context-set-fl-decl-start)
+ ;; For documentation see the following c-lang-defvar of the same name.
+ ;; The value here may be a list of functions or a single function.
+(c-lang-defvar c-before-context-fontification-functions
+ (let ((fs (c-lang-const c-before-context-fontification-functions)))
+ (if (listp fs)
+ fs
+ (list fs)))
+ "If non-nil, a list of functions called just before context (or
+other non-change) fontification is done. Typically they will
+extend the region.
+
+These functions will be run in the order given. Each of them
+takes 2 parameters, the BEG and END of the region to be
+fontified. Point is undefined on both entry and exit. On entry,
+the buffer will have been widened and match-data will have been
+saved; the return value is a cons of the adjusted
+region, (NEW-BEG . NEW-END).")
;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK).
@@ -2910,6 +2938,12 @@ expression is considered to be a type."
(consp (c-lang-const c-<>-arglist-kwds))))
(c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists))
+(c-lang-defconst c-enums-contain-decls
+ "Non-nil means that an enum structure can contain declarations."
+ t nil
+ java t)
+(c-lang-defvar c-enums-contain-decls (c-lang-const c-enums-contain-decls))
+
(c-lang-defconst c-recognize-paren-inits
"Non-nil means that parenthesis style initializers exist,
i.e. constructs like
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el
index 942303b1096..f57fcbff5ca 100644
--- a/lisp/progmodes/cc-menus.el
+++ b/lisp/progmodes/cc-menus.el
@@ -1,6 +1,6 @@
;;; cc-menus.el --- imenu support for CC Mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 1998- Martin Stjernholm
;; 1992-1999 Barry A. Warsaw
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 36b95f4b3f5..b74d878516d 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1,6 +1,6 @@
;;; cc-mode.el --- major mode for editing C and similar languages
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -599,8 +599,8 @@ that requires a literal mode spec at compile time."
;; Buffer local variables defining the region to be fontified by a font lock
;; after-change function. They are set in c-after-change to
-;; after-change-function's BEG and END, and may be modified by a
-;; `c-before-font-lock-function'.
+;; after-change-functions' BEG and END, and may be modified by functions in
+;; `c-before-font-lock-functions'.
(defvar c-new-BEG 0)
(make-variable-buffer-local 'c-new-BEG)
(defvar c-new-END 0)
@@ -633,13 +633,13 @@ compatible with old code; callers should always specify it."
(setq c-new-BEG (point-min))
(setq c-new-END (point-max))
(save-excursion
- (if c-get-state-before-change-functions
- (mapc (lambda (fn)
- (funcall fn (point-min) (point-max)))
- c-get-state-before-change-functions))
- (if c-before-font-lock-function
- (funcall c-before-font-lock-function (point-min) (point-max)
- (- (point-max) (point-min))))))
+ (mapc (lambda (fn)
+ (funcall fn (point-min) (point-max)))
+ c-get-state-before-change-functions)
+ (mapc (lambda (fn)
+ (funcall fn (point-min) (point-max)
+ (- (point-max) (point-min))))
+ c-before-font-lock-functions)))
(set (make-local-variable 'outline-regexp) "[^#\n\^M]")
(set (make-local-variable 'outline-level) 'c-outline-level)
@@ -830,6 +830,35 @@ Note that the style variables are always made local to the buffer."
; with a c-cpp-delimiter category property
(setq c-old-EOM (point)))
+(defun c-extend-font-lock-region-for-macros (begg endd &optional old-len)
+ ;; Extend the region (BEGG ENDD) to cover all (possibly changed)
+ ;; preprocessor macros; return the cons (new-BEG . new-END). OLD-LEN should
+ ;; be either the old length parameter when called from an
+ ;; after-change-function, or nil otherwise. This defun uses the variables
+ ;; c-old-BOM, c-new-BOM.
+ ;;
+ ;; Point is undefined on both entry and exit to this function. The buffer
+ ;; will have been widened on entry.
+ (let (limits new-beg new-end)
+ (goto-char c-old-BOM) ; already set to old start of macro or begg.
+ (setq new-beg
+ (min begg
+ (if (setq limits (c-state-literal-at (point)))
+ (cdr limits) ; go forward out of any string or comment.
+ (point))))
+
+ (goto-char endd)
+ (if (setq limits (c-state-literal-at (point)))
+ (goto-char (car limits))) ; go backward out of any string or comment.
+ (if (c-beginning-of-macro)
+ (c-end-of-macro))
+ (setq new-end (max endd
+ (if old-len
+ (+ (- c-old-EOM old-len) (- endd begg))
+ c-old-EOM)
+ (point)))
+ (cons new-beg new-end)))
+
(defun c-neutralize-CPP-line (beg end)
;; BEG and END bound a region, typically a preprocessor line. Put a
;; "punctuation" syntax-table property on syntactically obtrusive
@@ -881,31 +910,19 @@ Note that the style variables are always made local to the buffer."
;; Point is undefined both before and after this function call, the buffer
;; has been widened, and match-data saved. The return value is ignored.
;;
- ;; This function is the C/C++/ObjC value of `c-before-font-lock-function'.
+ ;; This function is in the C/C++/ObjC value of `c-before-font-lock-functions'.
;;
;; Note: SPEED _MATTERS_ IN THIS FUNCTION!!!
;;
;; This function might make hidden buffer changes.
- (c-save-buffer-state (limits)
+ (c-save-buffer-state (new-bounds)
;; First determine the region, (c-new-BEG c-new-END), which will get font
;; locked. It might need "neutralizing". This region may not start
;; inside a string, comment, or macro.
- (goto-char c-old-BOM) ; already set to old start of macro or begg.
- (setq c-new-BEG
- (min c-new-BEG
- (if (setq limits (c-state-literal-at (point)))
- (cdr limits) ; go forward out of any string or comment.
- (point))))
-
- (goto-char endd)
- (if (setq limits (c-state-literal-at (point)))
- (goto-char (car limits))) ; go backward out of any string or comment.
- (if (c-beginning-of-macro)
- (c-end-of-macro))
- (setq c-new-END (max c-new-END
- (+ (- c-old-EOM old-len) (- endd begg))
- (point)))
-
+ (setq new-bounds (c-extend-font-lock-region-for-macros
+ c-new-BEG c-new-END old-len))
+ (setq c-new-BEG (car new-bounds)
+ c-new-END (cdr new-bounds))
;; Clear all old relevant properties.
(c-clear-char-property-with-value c-new-BEG c-new-END 'syntax-table '(1))
(c-clear-char-property-with-value c-new-BEG c-new-END 'category 'c-cpp-delimiter)
@@ -1015,6 +1032,11 @@ Note that the style variables are always made local to the buffer."
c-get-state-before-change-functions))
))))
+(defvar c-in-after-change-fontification nil)
+(make-variable-buffer-local 'c-in-after-change-fontification)
+;; A flag to prevent region expanding stuff being done twice for after-change
+;; fontification.
+
(defun c-after-change (beg end old-len)
;; Function put on `after-change-functions' to adjust various caches
;; etc. Prefer speed to finesse here, since there will be an order
@@ -1026,7 +1048,7 @@ Note that the style variables are always made local to the buffer."
;; these caches from inside them, and we must thus be sure that this
;; has already been executed.
;;
- ;; This calls the language variable c-before-font-lock-function, if non nil.
+ ;; This calls the language variable c-before-font-lock-functions, if non nil.
;; This typically sets `syntax-table' properties.
(c-save-buffer-state ()
@@ -1066,19 +1088,113 @@ Note that the style variables are always made local to the buffer."
;; larger than (beg end).
(setq c-new-BEG beg
c-new-END end)
- (if c-before-font-lock-function
- (save-excursion
- (funcall c-before-font-lock-function beg end old-len)))))))
+ (setq c-in-after-change-fontification t)
+ (save-excursion
+ (mapc (lambda (fn)
+ (funcall fn beg end old-len))
+ c-before-font-lock-functions))))))
+
+(defun c-set-fl-decl-start (pos)
+ ;; If the beginning of the line containing POS is in the middle of a "local"
+ ;; declaration (i.e. one which does not start outside of braces enclosing
+ ;; POS, such as a struct), return the beginning of that declaration.
+ ;; Otherwise return POS. Note that declarations, in this sense, can be
+ ;; nested.
+ ;;
+ ;; This function is called indirectly from font locking stuff - either from
+ ;; c-after-change (to prepare for after-change font-locking) or from font
+ ;; lock context (etc.) fontification.
+ (let ((lit-limits (c-literal-limits))
+ (new-pos pos)
+ bod-lim bo-decl)
+ (goto-char (c-point 'bol new-pos))
+ (when lit-limits ; Comment or string.
+ (goto-char (car lit-limits)))
+ (setq bod-lim (max (- (point) 500) (point-min)))
+
+ (while
+ ;; Go to a less nested declaration each time round this loop.
+ (and
+ (eq (car (c-beginning-of-decl-1 bod-lim)) 'same)
+ (progn (setq bo-decl (point))
+ ;; Are we looking at a keyword such as "template" or
+ ;; "typedef" which can decorate a type, or the type itself?
+ (when (or (looking-at c-prefix-spec-kwds-re)
+ (c-forward-type t))
+ ;; We've found another candidate position.
+ (setq new-pos (min new-pos bo-decl))
+ (goto-char bo-decl))
+ t)
+ ;; Try and go out a level to search again.
+ (progn
+ (c-backward-syntactic-ws bod-lim)
+ (or (memq (char-before) '(?\( ?\[))
+ (and (eq (char-before) ?\<)
+ (eq (c-get-char-property
+ (1- (point)) 'syntax-table)
+ c-<-as-paren-syntax))))
+ (not (bobp)))
+ (backward-char))
+ new-pos)) ; back over (, [, <.
+
+(defun c-change-set-fl-decl-start (beg end old-len)
+ ;; Set c-new-BEG to the beginning of a "local" declaration if it('s BOL) is
+ ;; inside one. This is called from an after-change-function, but the
+ ;; parameters BEG END and OLD-LEN are ignored. See `c-set-fl-decl-start'
+ ;; for the detailed functionality.
+ (if font-lock-mode
+ (setq c-new-BEG (c-set-fl-decl-start c-new-BEG))))
+
+(defun c-context-set-fl-decl-start (beg end)
+ ;; Return a cons (NEW-BEG . END), where NEW-BEG is the beginning of a
+ ;; "local" declaration (BOL at) NEW is inside or BEG. See
+ ;; `c-set-fl-decl-start' for the detailed functionality.
+ (cons (c-set-fl-decl-start beg) end))
+
+(defvar c-standard-font-lock-fontify-region-function nil
+ "Standard value of `font-lock-fontify-region-function'")
+
+(defun c-font-lock-fontify-region (beg end &optional verbose)
+ ;; Effectively advice around `font-lock-fontify-region' which extends the
+ ;; region (BEG END), for example, to avoid context fontification chopping
+ ;; off the start of the context. Do not do anything if it's already been
+ ;; done (i.e. from an after-change fontification. An example (C++) where
+ ;; this used to happen is this:
+ ;;
+ ;; template <typename T>
+ ;;
+ ;;
+ ;; void myfunc(T* p) {}
+ ;;
+ ;; Type a space in the first blank line, and the fontification of the next
+ ;; line was fouled up by context fontification.
+ (let ((new-beg beg) (new-end end) new-region)
+ (if c-in-after-change-fontification
+ (setq c-in-after-change-fontification nil)
+ (save-restriction
+ (widen)
+ (save-excursion
+ (mapc (lambda (fn)
+ (setq new-region (funcall fn new-beg new-end))
+ (setq new-beg (car new-region) new-end (cdr new-region)))
+ c-before-context-fontification-functions))))
+ (funcall c-standard-font-lock-fontify-region-function
+ new-beg new-end verbose)))
(defun c-after-font-lock-init ()
- ;; Put on `font-lock-mode-hook'.
+ ;; Put on `font-lock-mode-hook'. This function ensures our after-change
+ ;; function will get executed before the font-lock one. Amongst other
+ ;; things.
(remove-hook 'after-change-functions 'c-after-change t)
- (add-hook 'after-change-functions 'c-after-change nil t))
+ (add-hook 'after-change-functions 'c-after-change nil t)
+ (setq c-standard-font-lock-fontify-region-function
+ (default-value 'font-lock-fontify-region-function)))
(defun c-font-lock-init ()
"Set up the font-lock variables for using the font-lock support in CC Mode.
This does not load the font-lock package. Use after
-`c-basic-common-init' and after cc-fonts has been loaded."
+`c-basic-common-init' and after cc-fonts has been loaded.
+This function is called from `c-common-init', once per mode initialization."
(set (make-local-variable 'font-lock-defaults)
`(,(if (c-major-mode-is 'awk-mode)
@@ -1092,6 +1208,10 @@ This does not load the font-lock package. Use after
c-beginning-of-syntax
(font-lock-mark-block-function
. c-mark-function)))
+
+ (make-local-variable 'font-lock-fontify-region-function)
+ (setq font-lock-fontify-region-function 'c-font-lock-fontify-region)
+
(if (featurep 'xemacs)
(make-local-hook 'font-lock-mode-hook))
(add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t))
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index 96cb15f2a72..cf628e44de0 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -1,6 +1,6 @@
;;; cc-styles.el --- support for styles in CC Mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2004- Alan Mackenzie
;; 1998- Martin Stjernholm
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index a4338a3193b..8efe3f27002 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1,6 +1,6 @@
;;; cc-vars.el --- user customization variables for CC Mode
-;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012 Free Software Foundation, Inc.
;; Authors: 2002- Alan Mackenzie
;; 1998- Martin Stjernholm
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index 823304bd250..4e9a10e3ceb 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -1,10 +1,11 @@
;;; cfengine.el --- mode for editing Cfengine files
-;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: languages
+;; Version: 1.1
;; This file is part of GNU Emacs.
@@ -29,18 +30,18 @@
;; The CFEngine 3.x support doesn't have Imenu support but patches are
;; welcome.
-;; You can set it up so either cfengine-mode (2.x and earlier) or
-;; cfengine3-mode (3.x) will be picked, depending on the buffer
+;; You can set it up so either `cfengine2-mode' (2.x and earlier) or
+;; `cfengine3-mode' (3.x) will be picked, depending on the buffer
;; contents:
-;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-auto-mode))
+;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-mode))
;; OR you can choose to always use a specific version, if you prefer
-;; it
+;; it:
;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine3-mode))
-;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine-mode))
-;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine-mode))
+;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine2-mode))
+;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine2-mode))
;; This is not the same as the mode written by Rolf Ebert
;; <ebert@waporo.muc.de>, distributed with cfengine-2.0.5. It does
@@ -49,31 +50,36 @@
;;; Code:
(defgroup cfengine ()
- "Editing Cfengine files."
+ "Editing CFEngine files."
:group 'languages)
(defcustom cfengine-indent 2
- "*Size of a Cfengine indentation step in columns."
+ "*Size of a CFEngine indentation step in columns."
:group 'cfengine
:type 'integer)
+(defvar cfengine-mode-debug nil
+ "Whether `cfengine-mode' should print debugging info.")
+
(defcustom cfengine-mode-abbrevs nil
- "Abbrevs for Cfengine mode."
+ "Abbrevs for CFEngine2 mode."
:group 'cfengine
:type '(repeat (list (string :tag "Name")
(string :tag "Expansion")
(choice :tag "Hook" (const nil) function))))
+(make-obsolete-variable 'cfengine-mode-abbrevs 'edit-abbrevs "24.1")
+
;; Taken from the doc for pre-release 2.1.
(eval-and-compile
- (defconst cfengine-actions
+ (defconst cfengine2-actions
'("acl" "alerts" "binservers" "broadcast" "control" "classes" "copy"
"defaultroute" "disks" "directories" "disable" "editfiles" "files"
"filters" "groups" "homeservers" "ignore" "import" "interfaces"
"links" "mailserver" "methods" "miscmounts" "mountables"
"processes" "packages" "rename" "required" "resolve"
"shellcommands" "tidy" "unmount"
- ;; cfservd
+ ;; Keywords for cfservd.
"admit" "grant" "deny")
"List of the action keywords supported by Cfengine.
This includes those for cfservd as well as cfagent.")
@@ -98,11 +104,11 @@ This includes those for cfservd as well as cfagent.")
'(string int real slist ilist rlist irange rrange counter))
"List of the CFEngine 3.x variable types."))
-(defvar cfengine-font-lock-keywords
+(defvar cfengine2-font-lock-keywords
`(;; Actions.
;; List the allowed actions explicitly, so that errors are more obvious.
(,(concat "^[ \t]*" (eval-when-compile
- (regexp-opt cfengine-actions t))
+ (regexp-opt cfengine2-actions t))
":")
1 font-lock-keyword-face)
;; Classes.
@@ -117,46 +123,54 @@ This includes those for cfservd as well as cfagent.")
(defvar cfengine3-font-lock-keywords
`(
+ ;; Defuns. This happens early so they don't get caught by looser
+ ;; patterns.
+ (,(concat "\\<" cfengine3-defuns-regex "\\>"
+ "[ \t]+\\<\\([[:alnum:]_]+\\)\\>"
+ "[ \t]+\\<\\([[:alnum:]_]+\\)"
+ ;; Optional parentheses with variable names inside.
+ "\\(?:(\\([^)]*\\))\\)?")
+ (1 font-lock-builtin-face)
+ (2 font-lock-constant-face)
+ (3 font-lock-function-name-face)
+ (4 font-lock-variable-name-face nil t))
+
+ ;; Class selectors.
(,(concat "^[ \t]*" cfengine3-class-selector-regex)
1 font-lock-keyword-face)
+
+ ;; Categories.
(,(concat "^[ \t]*" cfengine3-category-regex)
1 font-lock-builtin-face)
+
;; Variables, including scope, e.g. module.var
("[@$](\\([[:alnum:]_.]+\\))" 1 font-lock-variable-name-face)
("[@$]{\\([[:alnum:]_.]+\\)}" 1 font-lock-variable-name-face)
+
;; Variable definitions.
("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face)
- ;; CFEngine 3.x faces
- ;; defuns
- (,(concat "\\<" cfengine3-defuns-regex "\\>"
- "[ \t]+\\<\\([[:alnum:]_]+\\)\\>"
- "[ \t]+\\<\\([[:alnum:]_]+\\)\\((\\([^)]*\\))\\)?")
- (1 font-lock-builtin-face)
- (2 font-lock-constant-name-face)
- (3 font-lock-function-name-face)
- (5 font-lock-variable-name-face))
- ;; variable types
+ ;; Variable types.
(,(concat "\\<" (eval-when-compile (regexp-opt cfengine3-vartypes t)) "\\>")
1 font-lock-type-face)))
-(defvar cfengine-imenu-expression
+(defvar cfengine2-imenu-expression
`((nil ,(concat "^[ \t]*" (eval-when-compile
- (regexp-opt cfengine-actions t))
+ (regexp-opt cfengine2-actions t))
":[^:]")
1)
("Variables/classes" "\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1)
("Variables/classes" "\\<define=\\([[:alnum:]_]+\\)" 1)
("Variables/classes" "\\<DefineClass\\>[ \t]+\\([[:alnum:]_]+\\)" 1))
- "`imenu-generic-expression' for Cfengine mode.")
+ "`imenu-generic-expression' for CFEngine mode.")
-(defun cfengine-outline-level ()
- "`outline-level' function for Cfengine mode."
+(defun cfengine2-outline-level ()
+ "`outline-level' function for CFEngine mode."
(if (looking-at "[^:]+\\(?:[:]+\\)$")
(length (match-string 1))))
-(defun cfengine-beginning-of-defun ()
- "`beginning-of-defun' function for Cfengine mode.
+(defun cfengine2-beginning-of-defun ()
+ "`beginning-of-defun' function for CFEngine mode.
Treats actions as defuns."
(unless (<= (current-column) (current-indentation))
(end-of-line))
@@ -165,8 +179,8 @@ Treats actions as defuns."
(goto-char (point-min)))
t)
-(defun cfengine-end-of-defun ()
- "`end-of-defun' function for Cfengine mode.
+(defun cfengine2-end-of-defun ()
+ "`end-of-defun' function for CFEngine mode.
Treats actions as defuns."
(end-of-line)
(if (re-search-forward "^[[:alpha:]]+: *$" nil t)
@@ -176,7 +190,7 @@ Treats actions as defuns."
;; Fixme: Should get an extra indent step in editfiles BeginGroup...s.
-(defun cfengine-indent-line ()
+(defun cfengine2-indent-line ()
"Indent a line in Cfengine mode.
Intended as the value of `indent-line-function'."
(let ((pos (- (point-max) (point))))
@@ -283,15 +297,17 @@ Intended as the value of `indent-line-function'."
(narrow-to-defun)
(back-to-indentation)
(setq parse (parse-partial-sexp (point-min) (point)))
- (message "%S" parse)
+ (when cfengine-mode-debug
+ (message "%S" parse))
+
(cond
- ;; body/bundle blocks start at 0
+ ;; Body/bundle blocks start at 0.
((looking-at (concat cfengine3-defuns-regex "\\>"))
(indent-line-to 0))
- ;; categories are indented one step
+ ;; Categories are indented one step.
((looking-at (concat cfengine3-category-regex "[ \t]*$"))
(indent-line-to cfengine-indent))
- ;; class selectors are indented two steps
+ ;; Class selectors are indented two steps.
((looking-at (concat cfengine3-class-selector-regex "[ \t]*$"))
(indent-line-to (* 2 cfengine-indent)))
;; Outdent leading close brackets one step.
@@ -303,11 +319,17 @@ Intended as the value of `indent-line-function'."
(backward-sexp)
(current-column)))
(error nil)))
- ;; inside a string and it starts before this line
+ ;; Inside a string and it starts before this line.
((and (nth 3 parse)
(< (nth 8 parse) (save-excursion (beginning-of-line) (point))))
(indent-line-to 0))
- ;; inside a defun, but not a nested list (depth is 1)
+
+ ;; Inside a defun, but not a nested list (depth is 1). This is
+ ;; a promise, usually.
+
+ ;; Indent to cfengine-indent times the nested depth
+ ;; plus 2. That way, promises indent deeper than class
+ ;; selectors, which in turn are one deeper than categories.
((= 1 (nth 0 parse))
(indent-line-to (* (+ 2 (nth 0 parse)) cfengine-indent)))
;; Inside brackets/parens: indent to start column of non-comment
@@ -411,18 +433,18 @@ Intended as the value of `indent-line-function'."
(set (make-local-variable 'parse-sexp-ignore-comments) t))
(defun cfengine-common-syntax (table)
- ;; the syntax defaults seem OK to give reasonable word movement
+ ;; The syntax defaults seem OK to give reasonable word movement.
(modify-syntax-entry ?# "<" table)
(modify-syntax-entry ?\n ">#" table)
(modify-syntax-entry ?\" "\"" table)
- ;; variable substitution:
+ ;; Variable substitution.
(modify-syntax-entry ?$ "." table)
- ;; Doze path separators:
+ ;; Doze path separators.
(modify-syntax-entry ?\\ "." table))
;;;###autoload
-(define-derived-mode cfengine3-mode prog-mode "CFEngine3"
- "Major mode for editing cfengine input.
+(define-derived-mode cfengine3-mode prog-mode "CFE3"
+ "Major mode for editing CFEngine3 input.
There are no special keybindings by default.
Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves
@@ -434,46 +456,46 @@ to the action header."
(setq font-lock-defaults
'(cfengine3-font-lock-keywords nil nil nil beginning-of-defun))
- ;; use defuns as the essential syntax block
+ ;; Use defuns as the essential syntax block.
(set (make-local-variable 'beginning-of-defun-function)
#'cfengine3-beginning-of-defun)
(set (make-local-variable 'end-of-defun-function)
#'cfengine3-end-of-defun))
;;;###autoload
-(define-derived-mode cfengine-mode prog-mode "Cfengine"
- "Major mode for editing cfengine input.
+(define-derived-mode cfengine2-mode prog-mode "CFE2"
+ "Major mode for editing CFEngine2 input.
There are no special keybindings by default.
Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves
to the action header."
(cfengine-common-settings)
- (cfengine-common-syntax cfengine-mode-syntax-table)
+ (cfengine-common-syntax cfengine2-mode-syntax-table)
;; Shell commands can be quoted by single, double or back quotes.
;; It's debatable whether we should define string syntax, but it
;; should avoid potential confusion in some cases.
- (modify-syntax-entry ?\' "\"" cfengine-mode-syntax-table)
- (modify-syntax-entry ?\` "\"" cfengine-mode-syntax-table)
+ (modify-syntax-entry ?\' "\"" cfengine2-mode-syntax-table)
+ (modify-syntax-entry ?\` "\"" cfengine2-mode-syntax-table)
- (set (make-local-variable 'indent-line-function) #'cfengine-indent-line)
+ (set (make-local-variable 'indent-line-function) #'cfengine2-indent-line)
(set (make-local-variable 'outline-regexp) "[ \t]*\\(\\sw\\|\\s_\\)+:+")
- (set (make-local-variable 'outline-level) #'cfengine-outline-level)
+ (set (make-local-variable 'outline-level) #'cfengine2-outline-level)
(set (make-local-variable 'fill-paragraph-function)
#'cfengine-fill-paragraph)
- (define-abbrev-table 'cfengine-mode-abbrev-table cfengine-mode-abbrevs)
+ (define-abbrev-table 'cfengine2-mode-abbrev-table cfengine-mode-abbrevs)
(setq font-lock-defaults
- '(cfengine-font-lock-keywords nil nil nil beginning-of-line))
+ '(cfengine2-font-lock-keywords nil nil nil beginning-of-line))
;; Fixme: set the args of functions in evaluated classes to string
;; syntax, and then obey syntax properties.
- (setq imenu-generic-expression cfengine-imenu-expression)
+ (setq imenu-generic-expression cfengine2-imenu-expression)
(set (make-local-variable 'beginning-of-defun-function)
- #'cfengine-beginning-of-defun)
- (set (make-local-variable 'end-of-defun-function) #'cfengine-end-of-defun))
+ #'cfengine2-beginning-of-defun)
+ (set (make-local-variable 'end-of-defun-function) #'cfengine2-end-of-defun))
;;;###autoload
(defun cfengine-auto-mode ()
- "Choose between `cfengine-mode' and `cfengine3-mode' depending
+ "Choose between `cfengine2-mode' and `cfengine3-mode' depending
on the buffer contents"
(let ((v3 nil))
(save-restriction
@@ -481,7 +503,9 @@ on the buffer contents"
(while (not (or (eobp) v3))
(setq v3 (looking-at (concat cfengine3-defuns-regex "\\>")))
(forward-line)))
- (if v3 (cfengine3-mode) (cfengine-mode))))
+ (if v3 (cfengine3-mode) (cfengine2-mode))))
+
+(defalias 'cfengine-mode 'cfengine-auto-mode)
(provide 'cfengine3)
(provide 'cfengine)
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index 322492c5566..88c36e8c452 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -1,6 +1,6 @@
;;; cmacexp.el --- expand C macros in a region
-;; Copyright (C) 1992, 1994, 1996, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1996, 2000-2012 Free Software Foundation, Inc.
;; Author: Francesco Potorti` <pot@gnu.org>
;; Adapted-By: ESR
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 73e990e2755..f152209956f 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1,6 +1,6 @@
;;; compile.el --- run compiler as inferior of Emacs, parse error messages
-;; Copyright (C) 1985-1987, 1993-1999, 2001-2011
+;; Copyright (C) 1985-1987, 1993-1999, 2001-2012
;; Free Software Foundation, Inc.
;; Authors: Roland McGrath <roland@gnu.org>,
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 13fa310106c..9ea42db2a8c 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1,6 +1,6 @@
;;; cperl-mode.el --- Perl code editing commands for Emacs
-;; Copyright (C) 1985-1987, 1991-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1991-2012 Free Software Foundation, Inc.
;; Author: Ilya Zakharevich
;; Bob Olson
@@ -958,7 +958,7 @@ B) Speed of editing operations.
`cperl-array-face' Array names
`cperl-hash-face' Hash names
`font-lock-comment-face' Comments, PODs and whatever is considered
- syntaxically to be not code
+ syntactically to be not code
`font-lock-constant-face' HERE-doc delimiters, labels, delimiters of
2-arg operators s/y/tr/ or of RExen,
`font-lock-warning-face' Special-cased m// and s//foo/,
@@ -970,7 +970,7 @@ B) Speed of editing operations.
`cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen
`font-lock-string-face' Strings, qw() constructs, RExen, POD sections,
literal parts and the terminator of formats
- and whatever is syntaxically considered
+ and whatever is syntactically considered
as string literals
`font-lock-type-face' Overridable keywords
`font-lock-variable-name-face' Variable declarations, indirect array and
@@ -1537,8 +1537,8 @@ default.) You can always quote (with \\[quoted-insert]) the left
since most the time you mean \"less\". CPerl mode tries to guess
whether you want to type pair <>, and inserts is if it
appropriate. You can set `cperl-electric-parens-string' to the string that
-contains the parenths from the above list you want to be electrical.
-Electricity of parenths is controlled by `cperl-electric-parens'.
+contains the parens from the above list you want to be electrical.
+Electricity of parens is controlled by `cperl-electric-parens'.
You may also set `cperl-electric-parens-mark' to have electric parens
look for active mark and \"embrace\" a region if possible.'
@@ -3517,7 +3517,7 @@ Works before syntax recognition is done."
(defvar font-lock-warning-face)
(defun cperl-find-sub-attrs (&optional st-l b-fname e-fname pos)
- "Syntaxically mark (and fontify) attributes of a subroutine.
+ "Syntactically mark (and fontify) attributes of a subroutine.
Should be called with the point before leading colon of an attribute."
;; Works *before* syntax recognition is done
(or st-l (setq st-l (list nil))) ; Avoid overwriting '()
@@ -4994,7 +4994,7 @@ conditional/loop constructs."
(setq top (point))
;; Plan A: if line has an unfinished paren-group, go to end-of-group
(while (= -1 (nth 0 (parse-partial-sexp (point) tmp-end -1)))
- (setq top (point))) ; Get the outermost parenths in line
+ (setq top (point))) ; Get the outermost parens in line
(goto-char top)
(while (< (point) tmp-end)
(parse-partial-sexp (point) tmp-end nil t) ; To start-sexp or eol
@@ -5906,7 +5906,7 @@ indentation and initial hashes. Behaves usually outside of comment."
3 font-lock-variable-name-face)))
'("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*("
4 font-lock-variable-name-face)
- ;; Avoid $!, and s!!, qq!! etc. when not fontifying syntaxically
+ ;; Avoid $!, and s!!, qq!! etc. when not fontifying syntactically
'("\\(?:^\\|[^smywqrx$]\\)\\(!\\)" 1 font-lock-negation-char-face)
'("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)))
(setq
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index e5bfda54728..8ecfe79de3b 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -1,6 +1,6 @@
;;; cpp.el --- highlight or hide text according to cpp conditionals
-;; Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2012 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: c, faces, tools
diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el
index 0516aca8d2b..90147700d77 100644
--- a/lisp/progmodes/cwarn.el
+++ b/lisp/progmodes/cwarn.el
@@ -1,6 +1,6 @@
;;; cwarn.el --- highlight suspicious C and C++ constructions
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Anders Lindgren <andersl@andersl.com>
;; Keywords: c, languages, faces
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index eeb145e2b1a..166065131b2 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -1,6 +1,6 @@
;;; dcl-mode.el --- major mode for editing DCL command files
-;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Author: Odd Gripenstam <gripenstamol@decus.se>
;; Maintainer: Odd Gripenstam <gripenstamol@decus.se>
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index e513b617022..dd8d267683c 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -1,6 +1,6 @@
;;; delphi.el --- major mode for editing Delphi source (Object Pascal) in Emacs
-;; Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc.
;; Authors: Ray Blaak <blaak@infomatch.com>,
;; Simon South <ssouth@member.fsf.org>
diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el
index b45a47f8a3f..009770eff60 100644
--- a/lisp/progmodes/ebnf-abn.el
+++ b/lisp/progmodes/ebnf-abn.el
@@ -1,6 +1,6 @@
;;; ebnf-abn.el --- parser for ABNF (Augmented BNF)
-;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
diff --git a/lisp/progmodes/ebnf-bnf.el b/lisp/progmodes/ebnf-bnf.el
index cb8ebf8aab0..7d549cb9b47 100644
--- a/lisp/progmodes/ebnf-bnf.el
+++ b/lisp/progmodes/ebnf-bnf.el
@@ -1,6 +1,6 @@
;;; ebnf-bnf.el --- parser for EBNF
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
diff --git a/lisp/progmodes/ebnf-dtd.el b/lisp/progmodes/ebnf-dtd.el
index 7b63575195e..be1de11add6 100644
--- a/lisp/progmodes/ebnf-dtd.el
+++ b/lisp/progmodes/ebnf-dtd.el
@@ -1,6 +1,6 @@
;;; ebnf-dtd.el --- parser for DTD (Data Type Description for XML)
-;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
diff --git a/lisp/progmodes/ebnf-ebx.el b/lisp/progmodes/ebnf-ebx.el
index 7d697e889b7..ae15e09f4ca 100644
--- a/lisp/progmodes/ebnf-ebx.el
+++ b/lisp/progmodes/ebnf-ebx.el
@@ -1,6 +1,6 @@
;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX)
-;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
diff --git a/lisp/progmodes/ebnf-iso.el b/lisp/progmodes/ebnf-iso.el
index d33167093a3..f8e2520c29c 100644
--- a/lisp/progmodes/ebnf-iso.el
+++ b/lisp/progmodes/ebnf-iso.el
@@ -1,6 +1,6 @@
;;; ebnf-iso.el --- parser for ISO EBNF
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
diff --git a/lisp/progmodes/ebnf-otz.el b/lisp/progmodes/ebnf-otz.el
index 0392505972d..0aa2948cf19 100644
--- a/lisp/progmodes/ebnf-otz.el
+++ b/lisp/progmodes/ebnf-otz.el
@@ -1,6 +1,6 @@
;;; ebnf-otz.el --- syntactic chart OpTimiZer
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el
index 5ff239bfa21..56c8dc57e96 100644
--- a/lisp/progmodes/ebnf-yac.el
+++ b/lisp/progmodes/ebnf-yac.el
@@ -1,6 +1,6 @@
;;; ebnf-yac.el --- parser for Yacc/Bison
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index d9adff6c8b8..5d0bfad0366 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -1,6 +1,6 @@
;;; ebnf2ps.el --- translate an EBNF to a syntactic chart on PostScript
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
@@ -3260,7 +3260,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
% --- Corners
-%>corner Right Descendent: height arrow corner_RD
+%>corner Right Descendant: height arrow corner_RD
% _ | arrow
% / height > 0 | 0 - none
% | | 1 - right
@@ -3299,7 +3299,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
Gstroke
}def
-%>corner Right Ascendent: height arrow corner_RA
+%>corner Right Ascendant: height arrow corner_RA
% | arrow
% | height > 0 | 0 - none
% / | 1 - right
@@ -3338,7 +3338,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
Gstroke
}def
-%>corner Left Descendent: height arrow corner_LD
+%>corner Left Descendant: height arrow corner_LD
% _ | arrow
% \\ height > 0 | 0 - none
% | | 1 - right
@@ -3377,7 +3377,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
Gstroke
}def
-%>corner Left Ascendent: height arrow corner_LA
+%>corner Left Ascendant: height arrow corner_LA
% | arrow
% | height > 0 | 0 - none
% \\ | 1 - right
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index dd7a9824af3..4a07392c309 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -1,6 +1,6 @@
;;; ebrowse.el --- Emacs C++ class browser & tags facility
-;; Copyright (C) 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2012 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@gnu.org>
;; Maintainer: FSF
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 2d0b18f3dae..56f04751bda 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1,6 +1,6 @@
;;; etags.el --- etags facility for Emacs
-;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2011
+;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2012
;; Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index 281fa3cef72..c44f1d73501 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -1,6 +1,6 @@
;;; executable.el --- base functionality for executable interpreter scripts -*- byte-compile-dynamic: t -*-
-;; Copyright (C) 1994-1996, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2000-2012 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Keywords: languages, unix
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 95b8d810028..25f8107340a 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1,6 +1,6 @@
;;; f90.el --- Fortran-90 mode (free format)
-;; Copyright (C) 1995-1997, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1997, 2000-2012 Free Software Foundation, Inc.
;; Author: Torbjörn Einarsson <Torbjorn.Einarsson@era.ericsson.se>
;; Maintainer: Glenn Morris <rgm@gnu.org>
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 1c138f053d3..fee45fcb3e8 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1,6 +1,6 @@
;;; flymake.el -- a universal on-the-fly syntax checker
-;; Copyright (C) 2003-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2012 Free Software Foundation, Inc.
;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
;; Maintainer: Pavel Kobyakov <pk_at_work@yahoo.com>
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 2dac46a6d5b..8d488fe9be4 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -1,6 +1,6 @@
;;; fortran.el --- Fortran mode for GNU Emacs
-;; Copyright (C) 1986, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1993-1995, 1997-2012 Free Software Foundation, Inc.
;; Author: Michael D. Prange <prange@erl.mit.edu>
;; Maintainer: Glenn Morris <rgm@gnu.org>
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 86d4a72f408..ff2a5f3f3e7 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1,6 +1,6 @@
;;; gdb-mi.el --- User Interface for running GDB
-;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
;; Author: Nick Roberts <nickrob@gnu.org>
;; Maintainer: FSF
@@ -811,8 +811,8 @@ detailed description of this mode.
(define-key gud-minor-mode-map [left-margin C-mouse-3]
'gdb-mouse-jump)
- (set (make-local-variable 'comint-prompt-regexp)
- "^(.*gdb[+]?) *")
+ (set (make-local-variable 'gud-gdb-completion-function)
+ 'gud-gdbmi-completions)
(add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
nil 'local)
@@ -862,31 +862,28 @@ detailed description of this mode.
(set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter)
(gdb-input
;; Needs GDB 6.4 onwards
- (list (concat "-inferior-tty-set "
- (or
- ;; The process can run on a remote host.
- (process-get (get-process "gdb-inferior") 'remote-tty)
- (process-tty-name (get-process "gdb-inferior"))))
- 'ignore))
+ (concat "-inferior-tty-set "
+ (or
+ ;; The process can run on a remote host.
+ (process-get (get-process "gdb-inferior") 'remote-tty)
+ (process-tty-name (get-process "gdb-inferior"))))
+ 'ignore)
(if (eq window-system 'w32)
- (gdb-input (list "-gdb-set new-console off" 'ignore)))
- (gdb-input (list "-gdb-set height 0" 'ignore))
+ (gdb-input "-gdb-set new-console off" 'ignore))
+ (gdb-input "-gdb-set height 0" 'ignore)
(when gdb-non-stop
- (gdb-input (list "-gdb-set non-stop 1" 'gdb-non-stop-handler)))
+ (gdb-input "-gdb-set non-stop 1" 'gdb-non-stop-handler))
- (gdb-input (list "-enable-pretty-printing" 'ignore))
+ (gdb-input "-enable-pretty-printing" 'ignore)
;; find source file and compilation directory here
(if gdb-create-source-file-list
- (gdb-input
- ; Needs GDB 6.2 onwards.
- (list "-file-list-exec-source-files" 'gdb-get-source-file-list)))
- (gdb-input
- ; Needs GDB 6.0 onwards.
- (list "-file-list-exec-source-file" 'gdb-get-source-file))
- (gdb-input
- (list "-gdb-show prompt" 'gdb-get-prompt)))
+ ;; Needs GDB 6.2 onwards.
+ (gdb-input "-file-list-exec-source-files" 'gdb-get-source-file-list))
+ ;; Needs GDB 6.0 onwards.
+ (gdb-input "-file-list-exec-source-file" 'gdb-get-source-file)
+ (gdb-input "-gdb-show prompt" 'gdb-get-prompt))
(defun gdb-non-stop-handler ()
(goto-char (point-min))
@@ -897,8 +894,8 @@ detailed description of this mode.
(setq gdb-non-stop nil)
(setq gdb-supports-non-stop nil))
(setq gdb-supports-non-stop t)
- (gdb-input (list "-gdb-set target-async 1" 'ignore))
- (gdb-input (list "-list-target-features" 'gdb-check-target-async))))
+ (gdb-input "-gdb-set target-async 1" 'ignore)
+ (gdb-input "-list-target-features" 'gdb-check-target-async)))
(defun gdb-check-target-async ()
(goto-char (point-min))
@@ -906,7 +903,7 @@ detailed description of this mode.
(message
"Target doesn't support non-stop mode. Turning it off.")
(setq gdb-non-stop nil)
- (gdb-input (list "-gdb-set non-stop 0" 'ignore))))
+ (gdb-input "-gdb-set non-stop 0" 'ignore)))
(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
@@ -951,9 +948,8 @@ detailed description of this mode.
(goto-char (point-min))
(if (search-forward "expands to: " nil t)
(unless (looking-at "\\S-+.*(.*).*")
- (gdb-input
- (list (concat "-data-evaluate-expression " expr)
- `(lambda () (gdb-tooltip-print ,expr))))))))
+ (gdb-input (concat "-data-evaluate-expression " expr)
+ `(lambda () (gdb-tooltip-print ,expr)))))))
(defun gdb-init-buffer ()
(set (make-local-variable 'gud-minor-mode) 'gdbmi)
@@ -1083,9 +1079,8 @@ With arg, enter name of variable to be watched in the minibuffer."
(concat (if (derived-mode-p 'gdb-registers-mode) "$")
(tooltip-identifier-from-point (point)))))))
(set-text-properties 0 (length expr) nil expr)
- (gdb-input
- (list (concat "-var-create - * " expr "")
- `(lambda () (gdb-var-create-handler ,expr)))))))
+ (gdb-input (concat "-var-create - * " expr "")
+ `(lambda () (gdb-var-create-handler ,expr))))))
(message "gud-watch is a no-op in this mode."))))
(defun gdb-var-create-handler (expr)
@@ -1114,7 +1109,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)
(not (gdb-pending-p 'gdb-speedbar-timer)))
;; Dummy command to update speedbar even when idle.
- (gdb-input (list "-environment-pwd" 'gdb-speedbar-timer-fn))
+ (gdb-input "-environment-pwd" 'gdb-speedbar-timer-fn)
;; Keep gdb-pending-triggers non-nil till end.
(gdb-add-pending 'gdb-speedbar-timer)))
@@ -1135,12 +1130,9 @@ With arg, enter name of variable to be watched in the minibuffer."
; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards.
(defun gdb-var-list-children (varnum)
- (gdb-input
- (list (concat "-var-update " varnum) 'ignore))
- (gdb-input
- (list (concat "-var-list-children --all-values "
- varnum)
- `(lambda () (gdb-var-list-children-handler ,varnum)))))
+ (gdb-input (concat "-var-update " varnum) 'ignore)
+ (gdb-input (concat "-var-list-children --all-values " varnum)
+ `(lambda () (gdb-var-list-children-handler ,varnum))))
(defun gdb-var-list-children-handler (varnum)
(let* ((var-list nil)
@@ -1172,13 +1164,11 @@ With arg, enter name of variable to be watched in the minibuffer."
"Set the output format for a variable displayed in the speedbar."
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (car var)))
- (gdb-input
- (list (concat "-var-set-format " varnum " " format) 'ignore))
+ (gdb-input (concat "-var-set-format " varnum " " format) 'ignore)
(gdb-var-update)))
(defun gdb-var-delete-1 (var varnum)
- (gdb-input
- (list (concat "-var-delete " varnum) 'ignore))
+ (gdb-input (concat "-var-delete " varnum) 'ignore)
(setq gdb-var-list (delq var gdb-var-list))
(dolist (varchild gdb-var-list)
(if (string-match (concat (car var) "\\.") (car varchild))
@@ -1197,17 +1187,15 @@ With arg, enter name of variable to be watched in the minibuffer."
(defun gdb-var-delete-children (varnum)
"Delete children of variable object at point from the speedbar."
- (gdb-input
- (list (concat "-var-delete -c " varnum) 'ignore)))
+ (gdb-input (concat "-var-delete -c " varnum) 'ignore))
(defun gdb-edit-value (_text _token _indent)
"Assign a value to a variable displayed in the speedbar."
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (car var)) (value))
(setq value (read-string "New value: "))
- (gdb-input
- (list (concat "-var-assign " varnum " " value)
- `(lambda () (gdb-edit-value-handler ,value))))))
+ (gdb-input (concat "-var-assign " varnum " " value)
+ `(lambda () (gdb-edit-value-handler ,value)))))
(defconst gdb-error-regexp "\\^error,msg=\\(\".+\"\\)")
@@ -1219,8 +1207,7 @@ With arg, enter name of variable to be watched in the minibuffer."
; Uses "-var-update --all-values". Needs GDB 6.4 onwards.
(defun gdb-var-update ()
(if (not (gdb-pending-p 'gdb-var-update))
- (gdb-input
- (list "-var-update --all-values *" 'gdb-var-update-handler)))
+ (gdb-input "-var-update --all-values *" 'gdb-var-update-handler))
(gdb-add-pending 'gdb-var-update))
(defun gdb-var-update-handler ()
@@ -1700,13 +1687,17 @@ static char *magick[] = {
gdb-continuation string "\"\n"))
(setq gdb-continuation nil))))
-(defun gdb-input (item)
- (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-log))
+(defun gdb-input (command handler-function)
+ "Send COMMAND to GDB via the MI interface.
+Run the function HANDLER-FUNCTION, with no arguments, once the command is
+complete."
+ (if gdb-enable-debug (push (list 'send-item command handler-function)
+ gdb-debug-log))
(setq gdb-token-number (1+ gdb-token-number))
- (setcar item (concat (number-to-string gdb-token-number) (car item)))
- (push (cons gdb-token-number (car (cdr item))) gdb-handler-alist)
+ (setq command (concat (number-to-string gdb-token-number) command))
+ (push (cons gdb-token-number handler-function) gdb-handler-alist)
(process-send-string (get-buffer-process gud-comint-buffer)
- (concat (car item) "\n")))
+ (concat command "\n")))
;; NOFRAME is used for gud execution control commands
(defun gdb-current-context-command (command)
@@ -1893,15 +1884,16 @@ is running."
(let ((record-type (cadr output-record))
(arg1 (nth 2 output-record))
(arg2 (nth 3 output-record)))
- (if (eq record-type 'gdb-error)
- (gdb-done-or-error arg2 arg1 'error)
- (if (eq record-type 'gdb-done)
- (gdb-done-or-error arg2 arg1 'done)
- ;; Suppress "No registers." since GDB 6.8 and earlier duplicates MI
- ;; error message on internal stream. Don't print to GUD buffer.
- (unless (and (eq record-type 'gdb-internals)
- (string-equal (read arg1) "No registers.\n"))
- (funcall record-type arg1))))))
+ (cond ((eq record-type 'gdb-error)
+ (gdb-done-or-error arg2 arg1 'error))
+ ((eq record-type 'gdb-done)
+ (gdb-done-or-error arg2 arg1 'done))
+ ;; Suppress "No registers." GDB 6.8 and earlier
+ ;; duplicates MI error message on internal stream.
+ ;; Don't print to GUD buffer.
+ ((not (and (eq record-type 'gdb-internals)
+ (string-equal (read arg1) "No registers.\n")))
+ (funcall record-type arg1)))))
(setq gdb-output-sink 'user)
;; Remove padding.
@@ -1994,11 +1986,10 @@ current thread and update GDB buffers."
;; -data-list-register-names needs to be issued for any stopped
;; thread
(when (not gdb-register-names)
- (gdb-input
- (list (concat "-data-list-register-names"
- (if gdb-supports-non-stop
- (concat " --thread " thread-id)))
- 'gdb-register-names-handler)))
+ (gdb-input (concat "-data-list-register-names"
+ (if gdb-supports-non-stop
+ (concat " --thread " thread-id)))
+ 'gdb-register-names-handler))
;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler
;;; because synchronous GDB doesn't give these fields with CLI.
@@ -2065,9 +2056,7 @@ current thread and update GDB buffers."
;; (frontend MI commands should not print to this stream)
(defun gdb-console (output-field)
(setq gdb-filter-output
- (gdb-concat-output
- gdb-filter-output
- (read output-field))))
+ (gdb-concat-output gdb-filter-output (read output-field))))
(defun gdb-done-or-error (output-field token-number type)
(if (string-equal token-number "")
@@ -2105,12 +2094,11 @@ current thread and update GDB buffers."
(assq-delete-all token-number gdb-handler-alist)))))
(defun gdb-concat-output (so-far new)
- (let ((sink gdb-output-sink))
- (cond
- ((eq sink 'user) (concat so-far new))
- ((eq sink 'emacs)
- (gdb-append-to-partial-output new)
- so-far))))
+ (cond
+ ((eq gdb-output-sink 'user) (concat so-far new))
+ ((eq gdb-output-sink 'emacs)
+ (gdb-append-to-partial-output new)
+ so-far)))
(defun gdb-append-to-partial-output (string)
(with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
@@ -2320,9 +2308,8 @@ trigger argument when describing buffer types with
(memq signal ,signal-list))
(when (not (gdb-pending-p
(cons (current-buffer) ',trigger-name)))
- (gdb-input
- (list ,gdb-command
- (gdb-bind-function-to-buffer ',handler-name (current-buffer))))
+ (gdb-input ,gdb-command
+ (gdb-bind-function-to-buffer ',handler-name (current-buffer)))
(gdb-add-pending (cons (current-buffer) ',trigger-name))))))
;; Used by disassembly buffer only, the rest use
@@ -2449,13 +2436,10 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
;; Only want one breakpoint icon at each location.
(gdb-put-breakpoint-icon (string-equal flag "y") bptno
(string-to-number line)))
- (gdb-input
- (list (concat "list " file ":1")
- 'ignore))
- (gdb-input
- (list "-file-list-exec-source-file"
- `(lambda () (gdb-get-location
- ,bptno ,line ,flag))))))))))
+ (gdb-input (concat "list " file ":1") 'ignore)
+ (gdb-input "-file-list-exec-source-file"
+ `(lambda () (gdb-get-location
+ ,bptno ,line ,flag)))))))))
(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
@@ -2785,7 +2769,7 @@ on the current line."
(def-gdb-thread-buffer-command gdb-select-thread
(let ((new-id (bindat-get-field thread 'id)))
(gdb-setq-thread-number new-id)
- (gdb-input (list (concat "-thread-select " new-id) 'ignore))
+ (gdb-input (concat "-thread-select " new-id) 'ignore)
(gdb-update))
"Select the thread at current line of threads buffer.")
@@ -3541,8 +3525,8 @@ member."
(if (gdb-buffer-shows-main-thread-p)
(let ((new-level (bindat-get-field frame 'level)))
(setq gdb-frame-number new-level)
- (gdb-input (list (concat "-stack-select-frame " new-level)
- 'ignore))
+ (gdb-input (concat "-stack-select-frame " new-level)
+ 'ignore)
(gdb-update))
(error "Could not select frame for non-current thread"))
(error "Not recognized as frame line"))))
@@ -3770,14 +3754,11 @@ member."
;; Needs GDB 6.4 onwards (used to fail with no stack).
(defun gdb-get-changed-registers ()
- (if (and (gdb-get-buffer 'gdb-registers-buffer)
- (not (gdb-pending-p 'gdb-get-changed-registers)))
- (progn
- (gdb-input
- (list
- "-data-list-changed-registers"
- 'gdb-changed-registers-handler))
- (gdb-add-pending 'gdb-get-changed-registers))))
+ (when (and (gdb-get-buffer 'gdb-registers-buffer)
+ (not (gdb-pending-p 'gdb-get-changed-registers)))
+ (gdb-input "-data-list-changed-registers"
+ 'gdb-changed-registers-handler)
+ (gdb-add-pending 'gdb-get-changed-registers)))
(defun gdb-changed-registers-handler ()
(gdb-delete-pending 'gdb-get-changed-registers)
@@ -3806,18 +3787,15 @@ is set in them."
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(when (member buffer-file-name gdb-source-file-list)
- (gdb-init-buffer))))
- (gdb-force-mode-line-update
- (propertize "ready" 'face font-lock-variable-name-face)))
+ (gdb-init-buffer)))))
(defun gdb-get-main-selected-frame ()
"Trigger for `gdb-frame-handler' which uses main current
thread. Called from `gdb-update'."
(if (not (gdb-pending-p 'gdb-get-main-selected-frame))
(progn
- (gdb-input
- (list (gdb-current-context-command "-stack-info-frame")
- 'gdb-frame-handler))
+ (gdb-input (gdb-current-context-command "-stack-info-frame")
+ 'gdb-frame-handler)
(gdb-add-pending 'gdb-get-main-selected-frame))))
(defun gdb-frame-handler ()
@@ -3865,7 +3843,7 @@ overlay arrow in source buffer."
If BUF is already displayed in some window, show it, deiconifying
the frame if necessary. Otherwise, find least recently used
window and show BUF there, if the window is not used for GDB
-already, in which case that window is splitted first."
+already, in which case that window is split first."
(let ((answer (get-buffer-window buf (or frame 0))))
(if answer
(display-buffer buf nil (or frame 0)) ;Deiconify frame if necessary.
@@ -4148,7 +4126,9 @@ buffers, if required."
(gdb-get-buffer-create 'gdb-breakpoints-buffer)
(if (and gdb-show-main gdb-main-file)
(let ((pop-up-windows t))
- (display-buffer (gud-find-file gdb-main-file))))))
+ (display-buffer (gud-find-file gdb-main-file)))))
+ (gdb-force-mode-line-update
+ (propertize "ready" 'face font-lock-variable-name-face)))
;;from put-image
(defun gdb-put-string (putstring pos &optional dprop &rest sprops)
@@ -4259,6 +4239,42 @@ BUFFER nil or omitted means use the current buffer."
(set-window-margins
window left-margin-width right-margin-width)))))
+
+;;; Functions for inline completion.
+
+(defvar gud-gdb-fetch-lines-in-progress)
+(defvar gud-gdb-fetch-lines-string)
+(defvar gud-gdb-fetch-lines-break)
+(defvar gud-gdb-fetched-lines)
+
+(defun gud-gdbmi-completions (context command)
+ "Completion table for GDB/MI commands.
+COMMAND is the prefix for which we seek completion.
+CONTEXT is the text before COMMAND on the line."
+ (let ((gud-gdb-fetch-lines-in-progress t)
+ (gud-gdb-fetch-lines-string nil)
+ (gud-gdb-fetch-lines-break (length context))
+ (gud-gdb-fetched-lines nil)
+ ;; This filter dumps output lines to `gud-gdb-fetched-lines'.
+ (gud-marker-filter #'gud-gdbmi-fetch-lines-filter)
+ complete-list)
+ (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
+ (gdb-input (concat "complete " context command)
+ (lambda () (setq gud-gdb-fetch-lines-in-progress nil)))
+ (while gud-gdb-fetch-lines-in-progress
+ (accept-process-output (get-buffer-process gud-comint-buffer))))
+ (gud-gdb-completions-1 gud-gdb-fetched-lines)))
+
+(defun gud-gdbmi-fetch-lines-filter (string)
+ "Custom filter function for `gud-gdbmi-completions'."
+ (setq string (concat gud-gdb-fetch-lines-string
+ (gud-gdbmi-marker-filter string)))
+ (while (string-match "\n" string)
+ (push (substring string gud-gdb-fetch-lines-break (match-beginning 0))
+ gud-gdb-fetched-lines)
+ (setq string (substring string (match-end 0))))
+ "")
+
(provide 'gdb-mi)
;;; gdb-mi.el ends here
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el
index 6792e861888..fb0489f185c 100644
--- a/lisp/progmodes/glasses.el
+++ b/lisp/progmodes/glasses.el
@@ -1,6 +1,6 @@
;;; glasses.el --- make cantReadThis readable
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Maintainer: Milan Zamazal <pdm@zamazal.org>
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index b379ce67fd7..697af76acc9 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -1,6 +1,6 @@
;;; grep.el --- run `grep' and display the results
-;; Copyright (C) 1985-1987, 1993-1999, 2001-2011
+;; Copyright (C) 1985-1987, 1993-1999, 2001-2012
;; Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
@@ -959,7 +959,10 @@ can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-err
in the grep output buffer,
to go to the lines where grep found matches.
-This command shares argument histories with \\[lgrep] and \\[grep-find]."
+This command shares argument histories with \\[lgrep] and \\[grep-find].
+
+When called programmatically and FILES is nil, REGEXP is expected
+to specify a command to run."
(interactive
(progn
(grep-compute-defaults)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index de8da09768d..5fabe5086db 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1,6 +1,6 @@
;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers
-;; Copyright (C) 1992-1996, 1998, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1996, 1998, 2000-2012 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Maintainer: FSF
@@ -756,6 +756,8 @@ directory and source-file directory for your debugger."
(add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
nil 'local)
+ (set (make-local-variable 'gud-gdb-completion-function) 'gud-gdb-completions)
+
(local-set-key "\C-i" 'completion-at-point)
(setq comint-prompt-regexp "^(.*gdb[+]?) *")
(setq paragraph-start comint-prompt-regexp)
@@ -768,6 +770,12 @@ directory and source-file directory for your debugger."
;; context-sensitive command completion. We preserve that feature
;; in the GUD buffer by using a GDB command designed just for Emacs.
+(defvar gud-gdb-completion-function nil
+ "Completion function for GDB commands.
+It receives two arguments: COMMAND, the prefix for which we seek
+completion; and CONTEXT, the text before COMMAND on the line.
+It should return a list of completion strings.")
+
;; The completion process filter indicates when it is finished.
(defvar gud-gdb-fetch-lines-in-progress)
@@ -806,28 +814,32 @@ CONTEXT is the text before COMMAND on the line."
(and complete-list
(string-match "^Undefined command: \"complete\"" (car complete-list))
(error "This version of GDB doesn't support the `complete' command"))
- ;; Sort the list like readline.
- (setq complete-list (sort complete-list (function string-lessp)))
- ;; Remove duplicates.
- (let ((first complete-list)
- (second (cdr complete-list)))
- (while second
- (if (string-equal (car first) (car second))
- (setcdr first (setq second (cdr second)))
- (setq first second
- second (cdr second)))))
- ;; Add a trailing single quote if there is a unique completion
- ;; and it contains an odd number of unquoted single quotes.
- (and (= (length complete-list) 1)
- (let ((str (car complete-list))
- (pos 0)
- (count 0))
- (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos)
- (setq count (1+ count)
- pos (match-end 0)))
- (and (= (mod count 2) 1)
- (setq complete-list (list (concat str "'"))))))
- complete-list))
+ (gud-gdb-completions-1 complete-list)))
+
+;; This function is also used by `gud-gdbmi-completions'.
+(defun gud-gdb-completions-1 (complete-list)
+ ;; Sort the list like readline.
+ (setq complete-list (sort complete-list (function string-lessp)))
+ ;; Remove duplicates.
+ (let ((first complete-list)
+ (second (cdr complete-list)))
+ (while second
+ (if (string-equal (car first) (car second))
+ (setcdr first (setq second (cdr second)))
+ (setq first second
+ second (cdr second)))))
+ ;; Add a trailing single quote if there is a unique completion
+ ;; and it contains an odd number of unquoted single quotes.
+ (and (= (length complete-list) 1)
+ (let ((str (car complete-list))
+ (pos 0)
+ (count 0))
+ (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos)
+ (setq count (1+ count)
+ pos (match-end 0)))
+ (and (= (mod count 2) 1)
+ (setq complete-list (list (concat str "'"))))))
+ complete-list)
(defun gud-gdb-completion-at-point ()
"Return the data to complete the GDB command before point."
@@ -838,7 +850,7 @@ CONTEXT is the text before COMMAND on the line."
(point))))
(list start end
(completion-table-dynamic
- (apply-partially #'gud-gdb-completions
+ (apply-partially gud-gdb-completion-function
(buffer-substring (comint-line-beginning-position)
start))))))
@@ -851,11 +863,11 @@ CONTEXT is the text before COMMAND on the line."
;; The completion process filter is installed temporarily to slurp the
;; output of GDB up to the next prompt and build the completion list.
-(defun gud-gdb-fetch-lines-filter (string filter)
+(defun gud-gdb-fetch-lines-filter (string)
"Filter used to read the list of lines output by a command.
STRING is the output to filter.
-It is passed through FILTER before we look at it."
- (setq string (funcall filter string))
+It is passed through `gud-gdb-marker-filter' before we look at it."
+ (setq string (gud-gdb-marker-filter string))
(setq string (concat gud-gdb-fetch-lines-string string))
(while (string-match "\n" string)
(push (substring string gud-gdb-fetch-lines-break (match-beginning 0))
@@ -880,17 +892,6 @@ It is passed through FILTER before we look at it."
(defvar gud-gdb-fetched-stack-frame nil
"Stack frames we are fetching from GDB.")
-;(defun gud-gdb-get-scope-data (text token indent)
-; ;; checkdoc-params: (indent)
-; "Fetch data associated with a stack frame, and expand/contract it.
-;Data to do this is retrieved from TEXT and TOKEN."
-; (let ((args nil) (scope nil))
-; (gud-gdb-run-command-fetch-lines "info args")
-;
-; (gud-gdb-run-command-fetch-lines "info local")
-;
-; ))
-
(defun gud-gdb-get-stackframe (buffer)
"Extract the current stack frame out of the GUD GDB BUFFER."
(let ((newlst nil)
@@ -934,21 +935,16 @@ It is passed through FILTER before we look at it."
BUFFER is the current buffer which may be the GUD buffer in which to run.
SKIP is the number of chars to skip on each line, it defaults to 0."
(with-current-buffer gud-comint-buffer
- (if (and (eq gud-comint-buffer buffer)
- (save-excursion
- (goto-char (point-max))
- (forward-line 0)
- (not (looking-at comint-prompt-regexp))))
- nil
- ;; Much of this copied from GDB complete, but I'm grabbing the stack
- ;; frame instead.
+ (unless (and (eq gud-comint-buffer buffer)
+ (save-excursion
+ (goto-char (point-max))
+ (forward-line 0)
+ (not (looking-at comint-prompt-regexp))))
(let ((gud-gdb-fetch-lines-in-progress t)
(gud-gdb-fetched-lines nil)
(gud-gdb-fetch-lines-string nil)
(gud-gdb-fetch-lines-break (or skip 0))
- (gud-marker-filter
- `(lambda (string)
- (gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
+ (gud-marker-filter #'gud-gdb-fetch-lines-filter))
;; Issue the command to GDB.
(gud-basic-call command)
;; Slurp the output.
@@ -3422,7 +3418,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference."
((xdb pdb) (concat "p " expr))
(sdb (concat expr "/"))))
-(declare-function gdb-input "gdb-mi" (item))
+(declare-function gdb-input "gdb-mi" (command handler))
(declare-function tooltip-expr-to-print "tooltip" (event))
(declare-function tooltip-event-buffer "tooltip" (event))
@@ -3468,12 +3464,12 @@ so they have been disabled."))
(if (eq gud-minor-mode 'gdbmi)
(if gdb-macro-info
(gdb-input
- (list (concat
- "server macro expand " expr "\n")
- `(lambda () (gdb-tooltip-print-1 ,expr))))
+ (concat
+ "server macro expand " expr "\n")
+ `(lambda () (gdb-tooltip-print-1 ,expr)))
(gdb-input
- (list (concat cmd "\n")
- `(lambda () (gdb-tooltip-print ,expr)))))
+ (concat cmd "\n")
+ `(lambda () (gdb-tooltip-print ,expr))))
(setq gud-tooltip-original-filter (process-filter process))
(set-process-filter process 'gud-tooltip-process-output)
(gud-basic-call cmd))
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 82961376669..3e3d7adc0b6 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1,6 +1,6 @@
;;; hideif.el --- hides selected code within ifdef
-;; Copyright (C) 1988, 1994, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1994, 2001-2012 Free Software Foundation, Inc.
;; Author: Brian Marick
;; Daniel LaLiberte <liberte@holonexus.org>
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 9cbc1dc6d32..c9ba5ef2818 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -1,6 +1,6 @@
;;; hideshow.el --- minor mode cmds to selectively display code/comment blocks
-;; Copyright (C) 1994-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2012 Free Software Foundation, Inc.
;; Author: Thien-Thi Nguyen <ttn@gnu.org>
;; Dan Nicolaescu <dann@ics.uci.edu>
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index 5382ce1386d..35c29e10627 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -1,6 +1,6 @@
;;; icon.el --- mode for editing Icon code
-;; Copyright (C) 1989, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 2001-2012 Free Software Foundation, Inc.
;; Author: Chris Smith <csmith@convex.com>
;; Created: 15 Feb 89
diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el
index a967fc03e40..246ba8f29cd 100644
--- a/lisp/progmodes/idlw-complete-structtag.el
+++ b/lisp/progmodes/idlw-complete-structtag.el
@@ -1,6 +1,6 @@
;;; idlw-complete-structtag.el --- Completion of structure tags.
-;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@astro.uva.nl>
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el
index 0266fc17f9c..f2f9fd30ed4 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/progmodes/idlw-help.el
@@ -1,6 +1,6 @@
;;; idlw-help.el --- HTML Help code for IDLWAVE
-;; Copyright (C) 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
;;
;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
;; Carsten Dominik <dominik@science.uva.nl>
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index aa46b54d848..619b903e902 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -1,6 +1,6 @@
;; idlw-shell.el --- run IDL as an inferior process of Emacs.
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
;; Carsten Dominik <dominik@astro.uva.nl>
diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el
index d4eddee9722..1dad455d37e 100644
--- a/lisp/progmodes/idlw-toolbar.el
+++ b/lisp/progmodes/idlw-toolbar.el
@@ -1,6 +1,6 @@
;;; idlw-toolbar.el --- a debugging toolbar for IDLWAVE
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@astro.uva.nl>
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 24deb569d74..31fe20698b9 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -1,6 +1,6 @@
;; idlwave.el --- IDL editing mode for GNU Emacs
-;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
;; Carsten Dominik <dominik@science.uva.nl>
@@ -2464,7 +2464,7 @@ If prefix ARG < 0 then move forward to enclosing block end."
(defun idlwave-down-block (&optional arg)
"Go down a block.
With ARG: ARG >= 0 go forwards, ARG < 0 go backwards.
-Returns non-nil if successfull."
+Returns non-nil if successful."
(interactive "p")
(let (status)
(if (< arg 0)
@@ -7855,7 +7855,7 @@ Restore the pre-completion window configuration if possible."
If point is on a keyword, help for that keyword will be shown. If
point is on a routine name or in the argument list of a routine, help
for that routine will be displayed. Works for system routines and
-keywords, it pulls up text help. For other routies and keywords,
+keywords, it pulls up text help. For other routines and keywords,
visits the source file, finding help in the header (if
`idlwave-help-source-try-header' is non-nil) or the routine definition
itself."
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index dd24aeea9a3..73e167d1587 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -1,6 +1,6 @@
;;; inf-lisp.el --- an inferior-lisp mode
-;; Copyright (C) 1988, 1993-1994, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1993-1994, 2001-2012 Free Software Foundation, Inc.
;; Author: Olin Shivers <shivers@cs.cmu.edu>
;; Keywords: processes, lisp
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index f0c86265232..69da6737520 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1,6 +1,6 @@
;;; js.el --- Major mode for editing JavaScript
-;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
;; Author: Karl Landstrom <karl.landstrom@brgeight.se>
;; Daniel Colascione <dan.colascione@gmail.com>
@@ -369,7 +369,8 @@ Match group 1 is the name of the macro.")
;; must be h-end.
;;
;; js--pitem instances are never modified (with the exception
-;; of the b-end field). Instead, modified copies are added at subseqnce parse points.
+;; of the b-end field). Instead, modified copies are added at
+;; subsequence parse points.
;; (The exception for b-end and its caveats is described below.)
;;
diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el
index c682bfa0280..9cbed855d5e 100644
--- a/lisp/progmodes/ld-script.el
+++ b/lisp/progmodes/ld-script.el
@@ -1,6 +1,6 @@
;;; ld-script.el --- GNU linker script editing mode for Emacs
-;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Masatake YAMATO<jet@gyve.org>
;; Keywords: languages, faces
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el
index 98df1c69468..b1884bd105b 100644
--- a/lisp/progmodes/m4-mode.el
+++ b/lisp/progmodes/m4-mode.el
@@ -1,6 +1,6 @@
;;; m4-mode.el --- m4 code editing commands for Emacs
-;; Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2001-2012 Free Software Foundation, Inc.
;; Author: Andrew Csillag <drew_csillag@geocities.com>
;; Maintainer: Andrew Csillag <drew_csillag@geocities.com>
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 024744957c6..b4ca1ba665f 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1,6 +1,6 @@
;;; make-mode.el --- makefile editing commands for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1992, 1994, 1999-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1999-2012 Free Software Foundation, Inc.
;; Author: Thomas Neumann <tom@smart.bo.open.de>
;; Eric S. Raymond <esr@snark.thyrsus.com>
diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el
index c8963d2a6dd..a2a976a6d37 100644
--- a/lisp/progmodes/mantemp.el
+++ b/lisp/progmodes/mantemp.el
@@ -1,6 +1,6 @@
;;; mantemp.el --- create manual template instantiations from g++ 2.7.2 output
-;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2012 Free Software Foundation, Inc.
;; Author: Tom Houlder <thoulder@icor.fr>
;; Created: 10 Dec 1996
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index d0a34179cc8..d0432f58d60 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -1,6 +1,6 @@
;;; meta-mode.el --- major mode for editing Metafont or MetaPost sources -*- lexical-binding:t -*-
-;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Author: Ulrik Vieth <vieth@thphy.uni-duesseldorf.de>
;; Version: 1.0
@@ -384,7 +384,7 @@ Each entry is a list with the following elements:
1. Regexp matching the preceding text.
2. A number indicating the subgroup in the regexp containing the text.
3. A function returning an alist of possible completions.
-4. Text to append after a succesful completion (if any).
+4. Text to append after a successful completion (if any).
Or alternatively:
1. Regexp matching the preceding text.
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index 7d1f12595ab..b152f7367eb 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -1,6 +1,6 @@
;;; mixal-mode.el --- Major mode for the mix asm language.
-;; Copyright (C) 2003-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2012 Free Software Foundation, Inc.
;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com>
;; Maintainer: Pieter E.J. Pareit <pieter.pareit@gmail.com>
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index 421f476016e..40469b75b9f 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -1,6 +1,6 @@
;;; octave-inf.el --- running Octave as an inferior Emacs process
-;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
;; Author: John Eaton <jwe@bevo.che.wisc.edu>
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 28e25a35c70..668c3d147c6 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -1,6 +1,6 @@
;;; octave-mod.el --- editing Octave source files under Emacs
-;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
;; Author: John Eaton <jwe@octave.org>
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 2db4309d9e0..db15e3c6f27 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -1,6 +1,6 @@
;;; pascal.el --- major mode for editing pascal source in Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1993-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2012 Free Software Foundation, Inc.
;; Author: Espen Skoglund <esk@gnu.org>
;; Keywords: languages
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index f051b49fe2a..e7afd0e0e67 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1,6 +1,6 @@
;;; perl-mode.el --- Perl code editing commands for GNU Emacs
-;; Copyright (C) 1990, 1994, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc.
;; Author: William F. Mann
;; Maintainer: FSF
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 5b229cc0c24..b531fc0dc9c 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -1,6 +1,6 @@
;;; prolog.el --- major mode for editing and running Prolog (and Mercury) code
-;; Copyright (C) 1986-1987, 1997-1999, 2002-2003, 2011
+;; Copyright (C) 1986-1987, 1997-1999, 2002-2003, 2011-2012
;; Free Software Foundation, Inc.
;; Authors: Emil Åström <emil_astrom(at)hotmail(dot)com>
@@ -147,9 +147,9 @@
;; o Introduced three new customizable variables: electric colon
;; (`prolog-electric-colon-flag', default nil), electric dash
;; (`prolog-electric-dash-flag', default nil), and a possibility
-;; to prevent the predicate template insertion from adding commata
+;; to prevent the predicate template insertion from adding commas
;; (`prolog-electric-dot-full-predicate-template', defaults to t
-;; since it seems quicker to me to just type those commata). A
+;; since it seems quicker to me to just type those commas). A
;; trivial adaptation of a patch by Markus Triska.
;; o Improved the behavior of electric if-then-else to only skip
;; forward if the parenthesis/semicolon is preceded by
@@ -512,7 +512,7 @@ It does not apply in strings and comments."
(defcustom prolog-electric-dot-full-predicate-template nil
"*If nil, electric dot inserts only the current predicate's name and `('
for recursive calls or new clause heads. Non-nil means to also
-insert enough commata to cover the predicate's arity and `)',
+insert enough commas to cover the predicate's arity and `)',
and dot and newline for recursive calls."
:group 'prolog-keyboard
:type 'boolean)
@@ -3262,7 +3262,7 @@ STRING should be given if the last search was by `string-match' on STRING."
(defun prolog-clause-start (&optional not-allow-methods)
"Return the position at the start of the head of the current clause.
If NOTALLOWMETHODS is non-nil then do not match on methods in
-objects (relevent only if 'prolog-system' is set to 'sicstus)."
+objects (relevant only if 'prolog-system' is set to 'sicstus)."
(save-excursion
(let ((notdone t)
(retval (point-min)))
@@ -3328,7 +3328,7 @@ objects (relevent only if 'prolog-system' is set to 'sicstus)."
(defun prolog-clause-end (&optional not-allow-methods)
"Return the position at the end of the current clause.
If NOTALLOWMETHODS is non-nil then do not match on methods in
-objects (relevent only if 'prolog-system' is set to 'sicstus)."
+objects (relevant only if 'prolog-system' is set to 'sicstus)."
(save-excursion
(beginning-of-line) ; Necessary since we use "^...." for the search.
(if (re-search-forward
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index c2adc3b801b..e85fa0476b0 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -1,6 +1,6 @@
;;; ps-mode.el --- PostScript mode for GNU Emacs
-;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc.
;; Author: Peter Kleiweg <p.c.j.kleiweg@rug.nl>
;; Maintainer: Peter Kleiweg <p.c.j.kleiweg@rug.nl>
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index fbf7c3c42f7..0c29891cd92 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1,6 +1,6 @@
;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*-
-;; Copyright (C) 2003-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2012 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: FSF
@@ -2343,7 +2343,7 @@ Interactively, prompt for the name with completion."
;;;; Bicycle Repair Man support
(autoload 'pymacs-load "pymacs" nil t)
-(autoload 'brm-init "bikemacs")
+(autoload 'brm-init "bikeemacs")
(defvar brm-menu)
;; I'm not sure how useful BRM really is, and it's certainly dangerous
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index c8b156c5441..bf264972940 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1,6 +1,6 @@
;;; ruby-mode.el --- Major mode for editing Ruby files
-;; Copyright (C) 1994-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2012 Free Software Foundation, Inc.
;; Authors: Yukihiro Matsumoto
;; Nobuyoshi Nakada
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 66300d97621..82a4985015f 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -1,6 +1,6 @@
;;; scheme.el --- Scheme (and DSSSL) editing mode
-;; Copyright (C) 1986-1988, 1997-1998, 2001-2011
+;; Copyright (C) 1986-1988, 1997-1998, 2001-2012
;; Free Software Foundation, Inc.
;; Author: Bill Rozas <jinx@martigny.ai.mit.edu>
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 62ca2ce085f..48b19524b8c 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1,6 +1,6 @@
;;; sh-script.el --- shell-script editing commands for Emacs
-;; Copyright (C) 1993-1997, 1999, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1997, 1999, 2001-2012 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Version: 2.0f
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index dc2773a9efe..7536126e8f1 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -1,6 +1,6 @@
;;; simula.el --- SIMULA 87 code editing commands for Emacs
-;; Copyright (C) 1992, 1994, 1996, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1996, 2001-2012 Free Software Foundation, Inc.
;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no>
;; Maintainer: simula-mode@ifi.uio.no
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 03e095b6bfc..2e59d8f8517 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -1,6 +1,6 @@
;;; sql.el --- specialized comint.el for SQL interpreters
-;; Copyright (C) 1998-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2012 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Michael Mauger <mmaug@yahoo.com>
@@ -219,6 +219,8 @@
;; Drew Adams <drew.adams@oracle.com> -- Emacs 20 support
;; Harald Maier <maierh@myself.com> -- sql-send-string
;; Stefan Monnier <monnier@iro.umontreal.ca> -- font-lock corrections; code polish
+;; Paul Sleigh <bat@flurf.net> -- MySQL keyword enhancement
+;; Andrew Schein <andrew@andrewschein.com> -- sql-port bug
@@ -811,6 +813,14 @@ is changed."
:type 'hook
:group 'SQL)
+(defcustom sql-login-hook '()
+ "Hook for interacting with a buffer in `sql-interactive-mode'.
+
+This hook is invoked in a buffer once it is ready to accept input
+for the first time."
+ :type 'hook
+ :group 'SQL)
+
;; Customization for ANSI
(defcustom sql-ansi-statement-starters (regexp-opt '(
@@ -1594,6 +1604,7 @@ to add functions and PL/SQL keywords.")
"atan" "atan2" "avg" "bfilename" "bin_to_num" "bitand" "cardinality"
"cast" "ceil" "chartorowid" "chr" "cluster_id" "cluster_probability"
"cluster_set" "coalesce" "collect" "compose" "concat" "convert" "corr"
+"connect_by_root" "connect_by_iscycle" "connect_by_isleaf"
"corr_k" "corr_s" "cos" "cosh" "count" "covar_pop" "covar_samp"
"cube_table" "cume_dist" "current_date" "current_timestamp" "cv"
"dataobj_to_partition" "dbtimezone" "decode" "decompose" "deletexml"
@@ -2279,7 +2290,7 @@ you define your own `sql-mode-solid-font-lock-keywords'.")
"collation" "column" "columns" "comment" "committed" "concurrent"
"constraint" "create" "cross" "data" "database" "default"
"delay_key_write" "delayed" "delete" "desc" "directory" "disable"
-"distinct" "distinctrow" "do" "drop" "dumpfile" "duplicate" "else"
+"distinct" "distinctrow" "do" "drop" "dumpfile" "duplicate" "else" "elseif"
"enable" "enclosed" "end" "escaped" "exists" "fields" "first" "for"
"force" "foreign" "from" "full" "fulltext" "global" "group" "handler"
"having" "heap" "high_priority" "if" "ignore" "in" "index" "infile"
@@ -3423,7 +3434,7 @@ list of SQLi command strings."
:prompt-regexp))
(start nil))
(with-current-buffer buf
- (toggle-read-only -1)
+ (setq view-read-only nil)
(unless save-prior
(erase-buffer))
(goto-char (point-max))
@@ -3532,7 +3543,7 @@ buffer is popped into a view window. "
(get-lru-window))))
(with-current-buffer outbuf
(set-buffer-modified-p nil)
- (toggle-read-only 1))
+ (setq view-read-only t))
(view-buffer-other-window outbuf)
(when one-win
(shrink-window-if-larger-than-buffer)))))
@@ -4097,7 +4108,8 @@ the call to \\[sql-product-interactive] with
(setq new-sqli-buffer (current-buffer))
(when new-name
(sql-rename-buffer new-name))
- (setq sql-buffer (buffer-name new-sqli-buffer))
+ (set (make-local-variable 'sql-buffer)
+ (buffer-name new-sqli-buffer))
;; Set `sql-buffer' in the start buffer
(with-current-buffer start-buffer
@@ -4107,6 +4119,7 @@ the call to \\[sql-product-interactive] with
;; All done.
(message "Login...done")
+ (run-hooks 'sql-login-hook)
(pop-to-buffer new-sqli-buffer)))))
(message "No default SQL product defined. Set `sql-product'.")))
@@ -4224,7 +4237,7 @@ The default comes from `process-coding-system-alist' and
"^\\(.+\\) (hex ..)$"
"SET \\1")
- ;; FEDDBACK ON for 99 or more rows
+ ;; FEEDBACK ON for 99 or more rows
;; feedback OFF
(sql-redirect-value
sqlbuf
diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el
index 9c61da89008..7d8dd4301a2 100644
--- a/lisp/progmodes/subword.el
+++ b/lisp/progmodes/subword.el
@@ -1,6 +1,6 @@
;;; subword.el --- Handling capitalized subwords in a nomenclature
-;; Copyright (C) 2004-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
;; Author: Masatake YAMATO
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index d0e2c5abe7d..0198b32ec9f 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -1,6 +1,6 @@
;;; tcl.el --- Tcl code editing commands for Emacs
-;; Copyright (C) 1994, 1998-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1998-2012 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Author: Tom Tromey <tromey@redhat.com>
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index b02324871ff..7f3f99f5cfb 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -1,6 +1,6 @@
;;; vera-mode.el --- major mode for editing Vera files
-;; Copyright (C) 1997-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2012 Free Software Foundation, Inc.
;; Author: Reto Zimmermann <reto@gnu.org>
;; Maintainer: Reto Zimmermann <reto@gnu.org>
@@ -427,7 +427,7 @@ Key bindings:
"icompare" "insert" "inst_get_at_least" "inst_get_auto_bin_max"
"inst_get_collect" "inst_get_cov_weight" "inst_get_coverage_goal"
"inst_getcross_bin_max" "inst_query" "inst_set_at_least"
- "inst_set_auto_bin_max" "inst_set_bin_activiation" "inst_set_collect"
+ "inst_set_auto_bin_max" "inst_set_bin_activation" "inst_set_collect"
"inst_set_cov_weight" "inst_set_coverage_goal" "inst_set_cross_bin_max"
"itoa"
"last" "last_index" "len" "load"
@@ -438,7 +438,7 @@ Key bindings:
"push_front" "putc"
"query" "query_str"
"rand_mode" "randomize" "reserve" "reverse" "rsort"
- "search" "set_at_least" "set_auto_bin_max" "set_bin_activiation"
+ "search" "set_at_least" "set_auto_bin_max" "set_bin_activation"
"set_cov_weight" "set_coverage_goal" "set_cross_bin_max" "set_name" "size"
"sort" "substr" "sum"
"thismatch" "tolower" "toupper"
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 3ae66a477e8..f3bac41fb32 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -1,6 +1,6 @@
;; verilog-mode.el --- major mode for editing verilog source in Emacs
-;; Copyright (C) 1996-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
;; Author: Michael McNamara (mac@verilog.com),
;; Wilson Snyder (wsnyder@wsnyder.org)
@@ -981,7 +981,7 @@ of each Verilog file that requires it, rather than being set globally."
"*If true, AUTORESET will reset those signals which were
assigned with blocking assignments (=) even in a block with
non-blocking assignments (<=).
-
+
If nil, all blocking assigned signals are ignored when any
non-blocking assignment is in the AUTORESET block. This allows
blocking assignments to be used for temporary values and not have
@@ -1423,7 +1423,7 @@ If set will become buffer local.")
["AUTOSENSE" (describe-function 'verilog-auto-sense)
:help "Help on AUTOSENSE - sensitivity lists for always blocks"]
["AUTOTIEOFF" (describe-function 'verilog-auto-tieoff)
- :help "Help on AUTOTIEOFF - tieing off unused outputs"]
+ :help "Help on AUTOTIEOFF - tying off unused outputs"]
["AUTOUNUSED" (describe-function 'verilog-auto-unused)
:help "Help on AUTOUNUSED - terminating unused inputs"]
["AUTOWIRE" (describe-function 'verilog-auto-wire)
@@ -1667,7 +1667,7 @@ This speeds up complicated regexp matches."
;; Similar to `delete-trailing-whitespace' but that's not present in XEmacs
(save-excursion
(goto-char (point-min))
- (while (re-search-forward "[ \t]+$" nil t) ;; Not syntatic WS as no formfeed
+ (while (re-search-forward "[ \t]+$" nil t) ;; Not syntactic WS as no formfeed
(replace-match "" nil nil))))
(defvar compile-command)
@@ -2011,7 +2011,7 @@ find the errors."
"`uvm_component_utils"
"`uvm_create"
"`uvm_create_on"
- "`uvm_create_seq" ;; Undocumented in 1.1
+ "`uvm_create_seq" ;; Undocumented in 1.1
"`uvm_declare_p_sequencer"
"`uvm_declare_sequence_lib" ;; Deprecated in 1.1
"`uvm_do"
@@ -7505,7 +7505,7 @@ Signals must be in standard (base vector) form."
(nreverse out-list)))
(defun verilog-signals-combine-bus (in-list)
- "Return a list of signals in IN-LIST, with busses combined.
+ "Return a list of signals in IN-LIST, with buses combined.
Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]."
(let (combo buswarn
out-list
@@ -9907,7 +9907,7 @@ If optional WHITESPACE true, ignore whitespace."
(p2 (with-current-buffer b2 (goto-char (point-min))))
(maxp1 (with-current-buffer b1 (point-max)))
(maxp2 (with-current-buffer b2 (point-max)))
- (op1 -1) (op2 -1)
+ (op1 -1) (op2 -1)
progress size)
(while (not (and (eq p1 op1) (eq p2 op2)))
;; If both windows have whitespace optionally skip over it.
@@ -10100,7 +10100,7 @@ instantiating the resulting module. Long lines are split based
on the `fill-column', see \\[set-fill-column].
Limitations:
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Typedefs must match `verilog-typedef-regexp', which is disabled by default.
@@ -10932,7 +10932,7 @@ Typing \\[verilog-auto] will make this into:
(defun verilog-auto-logic ()
"Expand AUTOLOGIC statements, as part of \\[verilog-auto].
Make wire statements using the SystemVerilog logic keyword.
-This is currently equivelent to:
+This is currently equivalent to:
/*AUTOWIRE*/
@@ -10958,7 +10958,7 @@ the datatype of the declarations.
Limitations:
This ONLY detects outputs of AUTOINSTants (see `verilog-read-sub-decls'),
- and all busses must have widths, such as those from AUTOINST, or using []
+ and all buses must have widths, such as those from AUTOINST, or using []
in AUTO_TEMPLATEs.
This does NOT work on memories or SystemVerilog .name connections,
@@ -11315,7 +11315,7 @@ Limitations:
If placed inside the parenthesis of a module declaration, it creates
Verilog 2001 style, else uses Verilog 1995 style.
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Module names must be resolvable to filenames. See `verilog-auto-inst'.
@@ -11439,7 +11439,7 @@ Limitations:
If placed inside the parenthesis of a module declaration, it creates
Verilog 2001 style, else uses Verilog 1995 style.
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Module names must be resolvable to filenames. See `verilog-auto-inst'.
@@ -11490,7 +11490,7 @@ Limitations:
If placed inside the parenthesis of a module declaration, it creates
Verilog 2001 style, else uses Verilog 1995 style.
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Module names must be resolvable to filenames. See `verilog-auto-inst'.
@@ -11725,7 +11725,7 @@ this is a recent change. To control this behavior, see
`verilog-auto-reset-widths'.
AUTORESET ties signals to deasserted, which is presumed to be zero.
-Signals that match `verilog-active-low-regexp' will be deasserted by tieing
+Signals that match `verilog-active-low-regexp' will be deasserted by tying
them to a one.
An example:
@@ -11816,7 +11816,7 @@ finds all outputs in the module, and if that input is not otherwise declared
as a register or wire, creates a tieoff.
AUTORESET ties signals to deasserted, which is presumed to be zero.
-Signals that match `verilog-active-low-regexp' will be deasserted by tieing
+Signals that match `verilog-active-low-regexp' will be deasserted by tying
them to a one.
You can add signals you do not want included in AUTOTIEOFF with
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index deac85581d2..d765a960470 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -1,6 +1,6 @@
;;; vhdl-mode.el --- major mode for editing VHDL code
-;; Copyright (C) 1992-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2012 Free Software Foundation, Inc.
;; Authors: Reto Zimmermann <reto@gnu.org>
;; Rodney J. Whitby <software.vhdl-mode@rwhitby.net>
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index e27d07854c8..721c610517a 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -1,6 +1,6 @@
;;; which-func.el --- print current function in mode line
-;; Copyright (C) 1994, 1997-1998, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc.
;; Author: Alex Rezinsky <alexr@msil.sps.mot.com>
;; (doesn't seem to be responsive any more)
@@ -229,7 +229,9 @@ It creates the Imenu index for the buffer, if necessary."
(error "Error in which-func-update: %S" info))))))
;;;###autoload
-(defalias 'which-func-mode 'which-function-mode)
+(defun which-func-mode (&optional arg)
+ (which-function-mode arg))
+(make-obsolete 'which-func-mode 'which-function-mode "24.1")
(defvar which-func-update-timer nil)
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index dfa91b3fe30..1f50910330c 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -1,6 +1,6 @@
;;; xscheme.el --- run MIT Scheme under Emacs
-;; Copyright (C) 1986-1987, 1989-1990, 2001-2011
+;; Copyright (C) 1986-1987, 1989-1990, 2001-2012
;; Free Software Foundation, Inc.
;; Maintainer: FSF