aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tromey1994-05-22 20:02:03 +0000
committerTom Tromey1994-05-22 20:02:03 +0000
commit6be8057e0880d4a7a9fab16c40774606bde1b514 (patch)
treeb1ad8623e8da959d9a81448d2dbafa5e9fb94ba4
parenteaa91904fb5aa9935ee98aeaa5e90da1536ebd06 (diff)
downloademacs-6be8057e0880d4a7a9fab16c40774606bde1b514.tar.gz
emacs-6be8057e0880d4a7a9fab16c40774606bde1b514.zip
Fixed bug with M-;.
Wrote bug-reporting code.
-rw-r--r--lisp/progmodes/tcl.el76
1 files changed, 61 insertions, 15 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index f6128a53b4a..5b42eee19c6 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -6,7 +6,7 @@
6;; Author: Tom Tromey <tromey@busco.lanl.gov> 6;; Author: Tom Tromey <tromey@busco.lanl.gov>
7;; Chris Lindblad <cjl@lcs.mit.edu> 7;; Chris Lindblad <cjl@lcs.mit.edu>
8;; Keywords: languages tcl modes 8;; Keywords: languages tcl modes
9;; Version: $Revision: 1.8 $ 9;; Version: $Revision: 1.9 $
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
@@ -51,7 +51,7 @@
51;; LCD Archive Entry: 51;; LCD Archive Entry:
52;; tcl|Tom Tromey|tromey@busco.lanl.gov| 52;; tcl|Tom Tromey|tromey@busco.lanl.gov|
53;; Major mode for editing Tcl| 53;; Major mode for editing Tcl|
54;; $Date: 1994/05/22 03:38:07 $|$Revision: 1.8 $|~/modes/tcl.el.Z| 54;; $Date: 1994/05/22 05:26:51 $|$Revision: 1.9 $|~/modes/tcl.el.Z|
55 55
56;; CUSTOMIZATION NOTES: 56;; CUSTOMIZATION NOTES:
57;; * tcl-proc-list can be used to customize a list of things that 57;; * tcl-proc-list can be used to customize a list of things that
@@ -65,6 +65,9 @@
65 65
66;; Change log: 66;; Change log:
67;; $Log: tcl.el,v $ 67;; $Log: tcl.el,v $
68; Revision 1.9 1994/05/22 05:26:51 tromey
69; Fixes for imenu.
70;
68; Revision 1.8 1994/05/22 03:38:07 tromey 71; Revision 1.8 1994/05/22 03:38:07 tromey
69; Fixed menu support. 72; Fixed menu support.
70; 73;
@@ -191,9 +194,7 @@
191;; * Indentation should deal with "switch". 194;; * Indentation should deal with "switch".
192;; * Consider writing code to find help files automatically (for 195;; * Consider writing code to find help files automatically (for
193;; common cases). 196;; common cases).
194;; * M-; sometimes fails (try on "if [blah] then {") 197;; * `#' shouldn't insert `\#' when point is in string.
195;; * `#' shouldn't insert `\#' in string.
196;; * Add bug-reporting code.
197 198
198 199
199 200
@@ -201,6 +202,9 @@
201 202
202(require 'comint) 203(require 'comint)
203 204
205(defconst tcl-version "$Revision$")
206(defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>")
207
204;; 208;;
205;; User variables. 209;; User variables.
206;; 210;;
@@ -1210,11 +1214,12 @@ Returns nil if line starts inside a string, t if in a comment."
1210 1214
1211;; When compiling under GNU Emacs, load imenu during compilation. If 1215;; When compiling under GNU Emacs, load imenu during compilation. If
1212;; you have 19.22 or earlier, comment this out, or get imenu. 1216;; you have 19.22 or earlier, comment this out, or get imenu.
1213(eval-when-compile 1217(and (fboundp 'eval-when-compile)
1214 (if (and tcl-using-emacs 1218 (eval-when-compile
1215 (not tcl-using-lemacs-19)) 1219 (if (and tcl-using-emacs-19
1216 (require 'imenu)) 1220 (not tcl-using-lemacs-19))
1217 ()) 1221 (require 'imenu))
1222 ()))
1218 1223
1219(defun tcl-imenu-create-index-function () 1224(defun tcl-imenu-create-index-function ()
1220 "Generate alist of indices for imenu." 1225 "Generate alist of indices for imenu."
@@ -1482,7 +1487,7 @@ of comment."
1482 (let ((save (point))) 1487 (let ((save (point)))
1483 (tcl-beginning-of-defun) 1488 (tcl-beginning-of-defun)
1484 (car (tcl-hairy-scan-for-comment nil save nil)))) 1489 (car (tcl-hairy-scan-for-comment nil save nil))))
1485 1490
1486(defun tcl-simple-in-comment () 1491(defun tcl-simple-in-comment ()
1487 "Return t if point is in comment, and leave point at beginning 1492 "Return t if point is in comment, and leave point at beginning
1488of comment. This is faster that `tcl-hairy-in-comment', but is 1493of comment. This is faster that `tcl-hairy-in-comment', but is
@@ -1793,10 +1798,10 @@ Parts of this were taken from indent-for-comment (simple.el)."
1793 (if (/= (point) eolpoint) 1798 (if (/= (point) eolpoint)
1794 (progn 1799 (progn
1795 (goto-char eolpoint) 1800 (goto-char eolpoint)
1796 (or (tcl-real-command-p) 1801 (insert
1797 (progn 1802 (if (tcl-real-command-p) "" ";")
1798 (insert ";# ") 1803 "# ")
1799 (backward-char)))))))) 1804 (backward-char))))))
1800 ;; Point is just after the "#" starting a comment. Move it as 1805 ;; Point is just after the "#" starting a comment. Move it as
1801 ;; appropriate. 1806 ;; appropriate.
1802 (let* ((indent (if comment-indent-hook 1807 (let* ((indent (if comment-indent-hook
@@ -1890,6 +1895,47 @@ The first line is assumed to look like \"#!.../program ...\"."
1890 1895
1891 1896
1892 1897
1898;;
1899;; Bug reporting.
1900;;
1901
1902(and (fboundp 'eval-when-compile)
1903 (eval-when-compile
1904 (require 'reporter)))
1905
1906(defun tcl-submit-bug-report ()
1907 "Submit via mail a bug report on Tcl mode."
1908 (interactive)
1909 (require 'reporter)
1910 (and
1911 (y-or-n-p "Do you really want to submit a bug report on Tcl mode? ")
1912 (reporter-submit-bug-report
1913 tcl-maintainer
1914 (concat "Tcl mode " tcl-version)
1915 '(tcl-indent-level
1916 tcl-continued-indent-level
1917 tcl-auto-newline
1918 tcl-tab-always-indent
1919 tcl-use-hairy-comment-detector
1920 tcl-electric-has-style
1921 tcl-help-directory-list
1922 tcl-use-smart-word-finder
1923 tcl-application
1924 tcl-command-switches
1925 tcl-prompt-regexp
1926 inferior-tcl-source-command
1927 tcl-using-emacs-19
1928 tcl-using-emacs-19.23
1929 tcl-using-lemacs-19
1930 tcl-proc-list
1931 tcl-proc-regexp
1932 tcl-typeword-list
1933 tcl-keyword-list
1934 tcl-font-lock-keywords
1935 tcl-pps-has-arg-6))))
1936
1937
1938
1893(provide 'tcl) 1939(provide 'tcl)
1894 1940
1895;;; tcl.el ends here 1941;;; tcl.el ends here