;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;; BEFORE USE:
;;
;;
(defgroup tcl nil
- "Major mode for editing Tcl source in Emacs"
+ "Major mode for editing Tcl source in Emacs."
:group 'languages)
(defcustom tcl-indent-level 4
"*Indentation of Tcl statements with respect to containing block."
- :type 'integer)
+ :type 'integer
+ :group 'tcl)
(defcustom tcl-continued-indent-level 4
"*Indentation of continuation line relative to first line of command."
- :type 'integer)
+ :type 'integer
+ :group 'tcl)
(defcustom tcl-auto-newline nil
"*Non-nil means automatically newline before and after braces you insert."
- :type 'boolean)
+ :type 'boolean
+ :group 'tcl)
(defcustom tcl-tab-always-indent tab-always-indent
"*Control effect of TAB key.
6. Move backward to start of comment, indenting if necessary."
:type '(choice (const :tag "Always" t)
(const :tag "Beginning only" nil)
- (const :tag "Maybe move or make or delete comment" 'tcl)))
+ (const :tag "Maybe move or make or delete comment" 'tcl))
+ :group 'tcl)
(defcustom tcl-electric-hash-style nil ;; 'smart
made depending on the number of hashes inserted; or nil, meaning that
no quoting should be done. Any other value for this variable is
taken to mean `smart'. The default is nil."
- :type '(choice (const backslash) (const quote) (const smart) (const nil)))
+ :type '(choice (const backslash) (const quote) (const smart) (const nil))
+ :group 'tcl)
(defcustom tcl-help-directory-list nil
"*List of topmost directories containing TclX help files."
- :type '(repeat directory))
+ :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."
- :type 'boolean)
+ :type 'boolean
+ :group 'tcl)
(defcustom tcl-application "wish"
"*Name of Tcl program to run in inferior Tcl mode."
- :type 'string)
+ :type 'string
+ :group 'tcl)
(defcustom tcl-command-switches nil
"*List of switches to supply to the `tcl-application' program."
- :type '(repeat string))
+ :type '(repeat string)
+ :group 'tcl)
(defcustom tcl-prompt-regexp "^\\(% \\|\\)"
"*If not nil, a regexp that will match the prompt in the inferior process.
The default is \"^\\(% \\|\\)\", which will match the default primary
and secondary prompts for tclsh and wish."
- :type 'regexp)
+ :type 'regexp
+ :group 'tcl)
(defcustom inferior-tcl-source-command "source %s\n"
"*Format-string for building a Tcl command to load a file.
and should result in a Tcl expression that will command the
inferior Tcl to load that file. The filename will be appropriately
quoted for Tcl."
- :type 'string)
+ :type 'string
+ :group 'tcl)
(defface tcl-escaped-newline '((t :inherit font-lock-string-face))
"Face used for (non-escaped) backslash at end of a line in Tcl mode."
(unless (or (bolp) (tcl-real-command-p))
(insert ";")
;; Try and erase a non-significant char to keep charpos identical.
- (if (memq (char-after) '(?\t ?\ )) (delete-char 1))))
+ (if (memq (char-after) '(?\t ?\s)) (delete-char 1))))
(funcall (default-value 'comment-indent-function)))
;; The following was inspired by the Tcl editing mode written by
(defun tcl-quote (string)
"Quote STRING according to Tcl rules."
(mapconcat (lambda (char)
- (if (memq char '(?[ ?] ?{ ?} ?\\ ?\" ?$ ? ?\;))
+ (if (memq char '(?[ ?] ?{ ?} ?\\ ?\" ?$ ?\s ?\;))
(concat "\\" (char-to-string char))
(char-to-string char)))
string ""))