Merge from emacs-24; up to 2012-12-22T19:09:52Z!rgm@gnu.org
[bpt/emacs.git] / lisp / progmodes / tcl.el
index 44ccd13..9169a43 100644 (file)
@@ -1,7 +1,6 @@
 ;;; tcl.el --- Tcl code editing commands for Emacs
 
-;; Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1998-2013 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Author: Tom Tromey <tromey@redhat.com>
 
 (eval-when-compile
   (require 'imenu)
-  (require 'outline)
   (require 'dabbrev)
   (require 'add-log))
 
   :group 'languages)
 
 (defcustom tcl-indent-level 4
-  "*Indentation of Tcl statements with respect to containing block."
+  "Indentation of Tcl statements with respect to containing block."
   :type 'integer
   :group 'tcl)
 (put 'tcl-indent-level 'safe-local-variable 'integerp)
 
 (defcustom tcl-continued-indent-level 4
-  "*Indentation of continuation line relative to first line of command."
+  "Indentation of continuation line relative to first line of command."
   :type 'integer
   :group 'tcl)
 (put 'tcl-continued-indent-level 'safe-local-variable 'integerp)
 
 (defcustom tcl-auto-newline nil
-  "*Non-nil means automatically newline before and after braces you insert."
+  "Non-nil means automatically newline before and after braces you insert."
   :type 'boolean
   :group 'tcl)
 
 (defcustom tcl-tab-always-indent tab-always-indent
-  "*Control effect of TAB key.
+  "Control effect of TAB key.
 If t (the default), always indent current line.
 If nil and point is not in the indentation area at the beginning of
 the line, a TAB is inserted.
@@ -158,7 +156,7 @@ to take place:
 
 
 (defcustom tcl-electric-hash-style nil ;; 'smart
-  "*Style of electric hash insertion to use.
+  "Style of electric hash insertion to use.
 Possible values are `backslash', meaning that `\\' quoting should be
 done; `quote', meaning that `\"' quoting should be done; `smart',
 meaning that the choice between `backslash' and `quote' should be
@@ -169,27 +167,27 @@ taken to mean `smart'.  The default is nil."
   :group 'tcl)
 
 (defcustom tcl-help-directory-list nil
-  "*List of topmost directories containing TclX help files."
+  "List of topmost directories containing TclX help files."
   :type '(repeat directory)
   :group 'tcl)
 
 (defcustom tcl-use-smart-word-finder t
-  "*If not nil, use smart way to find current word, for Tcl help feature."
+  "If not nil, use smart way to find current word, for Tcl help feature."
   :type 'boolean
   :group 'tcl)
 
 (defcustom tcl-application "wish"
-  "*Name of Tcl program to run in inferior Tcl mode."
+  "Name of Tcl program to run in inferior Tcl mode."
   :type 'string
   :group 'tcl)
 
 (defcustom tcl-command-switches nil
-  "*List of switches to supply to the `tcl-application' program."
+  "List of switches to supply to the `tcl-application' program."
   :type '(repeat string)
   :group 'tcl)
 
 (defcustom tcl-prompt-regexp "^\\(% \\|\\)"
-  "*If not nil, a regexp that will match the prompt in the inferior process.
+  "If not nil, a regexp that will match the prompt in the inferior process.
 If nil, the prompt is the name of the application with \">\" appended.
 
 The default is \"^\\(% \\|\\)\", which will match the default primary
@@ -198,7 +196,7 @@ and secondary prompts for tclsh and wish."
   :group 'tcl)
 
 (defcustom inferior-tcl-source-command "source %s\n"
-  "*Format-string for building a Tcl command to load a file.
+  "Format-string for building a Tcl command to load a file.
 This format string should use `%s' to substitute a file name
 and should result in a Tcl expression that will command the
 inferior Tcl to load that file.  The filename will be appropriately
@@ -302,7 +300,7 @@ quoted for Tcl."
     ["Tcl help" tcl-help-on-word tcl-help-directory-list]))
 
 (defvar inferior-tcl-buffer nil
-  "*The current inferior-tcl process buffer.
+  "The current inferior-tcl process buffer.
 
 MULTIPLE PROCESS SUPPORT
 ===========================================================================
@@ -334,8 +332,8 @@ This process selection is performed by function `inferior-tcl-proc'.
 Whenever \\[inferior-tcl] fires up a new process, it resets
 `inferior-tcl-buffer' to be the new process's buffer.  If you only run
 one process, this does the right thing.  If you run multiple
-processes, you can change `inferior-tcl-buffer' to another process
-buffer with \\[set-variable].")
+processes, you might need to set `inferior-tcl-buffer' to
+whichever process buffer you want to use.")
 
 ;;
 ;; Hooks and other customization.
@@ -545,6 +543,9 @@ Uses variables `tcl-proc-regexp' and `tcl-keyword-list'."
 ;; The mode itself.
 ;;
 
+(defvar outline-regexp)
+(defvar outline-level)
+
 ;;;###autoload
 (define-derived-mode tcl-mode prog-mode "Tcl"
   "Major mode for editing Tcl code.
@@ -661,7 +662,7 @@ already exist."
 
 \f
 
-(defun tcl-indent-command (&optional arg)
+(defun tcl-indent-command (&optional _arg)
   "Indent current line as Tcl code, or in some cases insert a tab character.
 If `tcl-tab-always-indent' is t (the default), always indent current line.
 If `tcl-tab-always-indent' is nil and point is not in the indentation
@@ -862,7 +863,7 @@ Returns nil if line starts inside a string, t if in a comment."
                       expr-p)
                   (progn
                     ;; Line is continuation line, or the sexp opener
-                    ;; is not a curly brace, or we are are looking at
+                    ;; is not a curly brace, or we are looking at
                     ;; an `expr' expression (which must be split
                     ;; specially).  So indentation is column of first
                     ;; good spot after sexp opener (with some added
@@ -1507,7 +1508,7 @@ The first line is assumed to look like \"#!.../program ...\"."
 ;; loading the XEmacs menu emulation code.
 ;;
 
-(defun tcl-popup-menu (e)
+(defun tcl-popup-menu (_e)
   (interactive "@e")
   (popup-menu tcl-mode-menu))