aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKaroly Lorentey2005-10-12 16:14:04 +0000
committerKaroly Lorentey2005-10-12 16:14:04 +0000
commit734b679135207a8623dc460eb8d108befe080d46 (patch)
treedcf30cc27a815776015688ca275b66671c6406dc /lisp/progmodes
parent0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2 (diff)
parentcc9e7d9176843a243ca4217229302c1b396dbb6e (diff)
downloademacs-734b679135207a8623dc460eb8d108befe080d46.tar.gz
emacs-734b679135207a8623dc460eb8d108befe080d46.zip
Merged from miles@gnu.org--gnu-2005 (patch 578-592)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-578 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-579 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-580 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-581 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-582 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-583 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-584 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-585 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-586 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-587 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-588 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-589 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-590 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-591 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-592 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-424
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/etags.el66
-rw-r--r--lisp/progmodes/f90.el12
-rw-r--r--lisp/progmodes/fortran.el2
-rw-r--r--lisp/progmodes/gdb-ui.el116
-rw-r--r--lisp/progmodes/gud.el191
-rw-r--r--lisp/progmodes/mixal-mode.el91
-rw-r--r--lisp/progmodes/pascal.el184
-rw-r--r--lisp/progmodes/sh-script.el10
-rw-r--r--lisp/progmodes/vhdl-mode.el2
9 files changed, 347 insertions, 327 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index ea87dce591f..f6e8697543f 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1887,7 +1887,7 @@ directory specification."
1887;; XXX Kludge interface. 1887;; XXX Kludge interface.
1888 1888
1889(define-button-type 'tags-select-tags-table 1889(define-button-type 'tags-select-tags-table
1890 'action (lambda (button) (select-tags-table-select)) 1890 'action 'select-tags-table-select
1891 'help-echo "RET, t or mouse-2: select tags table") 1891 'help-echo "RET, t or mouse-2: select tags table")
1892 1892
1893;; XXX If a file is in multiple tables, selection may get the wrong one. 1893;; XXX If a file is in multiple tables, selection may get the wrong one.
@@ -1904,30 +1904,27 @@ see the doc of that variable if you want to add names to the list."
1904 (desired-point nil) 1904 (desired-point nil)
1905 b) 1905 b)
1906 (when tags-table-list 1906 (when tags-table-list
1907 (setq desired-point (point-marker)) 1907 (setq desired-point (point-marker))
1908 (setq b (point)) 1908 (setq b (point))
1909 (princ tags-table-list (current-buffer)) 1909 (princ (mapcar 'abbreviate-file-name tags-table-list) (current-buffer))
1910 (make-text-button b (point) 'type 'tags-select-tags-table) 1910 (make-text-button b (point) 'type 'tags-select-tags-table
1911 (insert "\C-m") 1911 'etags-table (car tags-table-list))
1912 (prin1 (car tags-table-list) (current-buffer)) ;invisible
1913 (insert "\n")) 1912 (insert "\n"))
1914 (while set-list 1913 (while set-list
1915 (unless (eq (car set-list) tags-table-list) 1914 (unless (eq (car set-list) tags-table-list)
1916 (setq b (point)) 1915 (setq b (point))
1917 (princ (car set-list) (current-buffer)) 1916 (princ (mapcar 'abbreviate-file-name (car set-list)) (current-buffer))
1918 (make-text-button b (point) 'type 'tags-select-tags-table) 1917 (make-text-button b (point) 'type 'tags-select-tags-table
1919 (insert "\C-m") 1918 'etags-table (car (car set-list)))
1920 (prin1 (car (car set-list)) (current-buffer)) ;invisible
1921 (insert "\n")) 1919 (insert "\n"))
1922 (setq set-list (cdr set-list))) 1920 (setq set-list (cdr set-list)))
1923 (when tags-file-name 1921 (when tags-file-name
1924 (or desired-point 1922 (or desired-point
1925 (setq desired-point (point-marker))) 1923 (setq desired-point (point-marker)))
1926 (setq b (point)) 1924 (setq b (point))
1927 (insert tags-file-name) 1925 (insert (abbreviate-file-name tags-file-name))
1928 (make-text-button b (point) 'type 'tags-select-tags-table) 1926 (make-text-button b (point) 'type 'tags-select-tags-table
1929 (insert "\C-m") 1927 'etags-table tags-file-name)
1930 (prin1 tags-file-name (current-buffer)) ;invisible
1931 (insert "\n")) 1928 (insert "\n"))
1932 (setq set-list (delete tags-file-name 1929 (setq set-list (delete tags-file-name
1933 (apply 'nconc (cons (copy-sequence tags-table-list) 1930 (apply 'nconc (cons (copy-sequence tags-table-list)
@@ -1935,10 +1932,9 @@ see the doc of that variable if you want to add names to the list."
1935 tags-table-set-list))))) 1932 tags-table-set-list)))))
1936 (while set-list 1933 (while set-list
1937 (setq b (point)) 1934 (setq b (point))
1938 (insert (car set-list)) 1935 (insert (abbreviate-file-name (car set-list)))
1939 (make-text-button b (point) 'type 'tags-select-tags-table) 1936 (make-text-button b (point) 'type 'tags-select-tags-table
1940 (insert "\C-m") 1937 'etags-table (car set-list))
1941 (prin1 (car set-list) (current-buffer)) ;invisible
1942 (insert "\n") 1938 (insert "\n")
1943 (setq set-list (delete (car set-list) set-list))) 1939 (setq set-list (delete (car set-list) set-list)))
1944 (goto-char (point-min)) 1940 (goto-char (point-min))
@@ -1951,7 +1947,8 @@ see the doc of that variable if you want to add names to the list."
1951 (select-tags-table-mode)) 1947 (select-tags-table-mode))
1952 1948
1953(defvar select-tags-table-mode-map 1949(defvar select-tags-table-mode-map
1954 (let ((map (copy-keymap button-buffer-map))) 1950 (let ((map (make-sparse-keymap)))
1951 (set-keymap-parent map button-buffer-map)
1955 (define-key map "t" 'push-button) 1952 (define-key map "t" 'push-button)
1956 (define-key map " " 'next-line) 1953 (define-key map " " 'next-line)
1957 (define-key map "\^?" 'previous-line) 1954 (define-key map "\^?" 'previous-line)
@@ -1960,24 +1957,17 @@ see the doc of that variable if you want to add names to the list."
1960 (define-key map "q" 'select-tags-table-quit) 1957 (define-key map "q" 'select-tags-table-quit)
1961 map)) 1958 map))
1962 1959
1963(defun select-tags-table-mode () 1960(define-derived-mode select-tags-table-mode fundamental-mode "Select Tags Table"
1964 "Major mode for choosing a current tags table among those already loaded. 1961 "Major mode for choosing a current tags table among those already loaded.
1965 1962
1966\\{select-tags-table-mode-map}" 1963\\{select-tags-table-mode-map}"
1967 (interactive) 1964 (setq buffer-read-only t))
1968 (kill-all-local-variables) 1965
1969 (setq buffer-read-only t 1966(defun select-tags-table-select (button)
1970 major-mode 'select-tags-table-mode
1971 mode-name "Select Tags Table")
1972 (use-local-map select-tags-table-mode-map)
1973 (setq selective-display t
1974 selective-display-ellipses nil))
1975
1976(defun select-tags-table-select ()
1977 "Select the tags table named on this line." 1967 "Select the tags table named on this line."
1978 (interactive) 1968 (interactive (list (or (button-at (line-beginning-position))
1979 (search-forward "\C-m") 1969 (error "No tags table on current line"))))
1980 (let ((name (read (current-buffer)))) 1970 (let ((name (button-get button 'etags-table)))
1981 (visit-tags-table name) 1971 (visit-tags-table name)
1982 (select-tags-table-quit) 1972 (select-tags-table-quit)
1983 (message "Tags table now %s" name))) 1973 (message "Tags table now %s" name)))
@@ -2043,5 +2033,5 @@ for \\[find-tag] (which see)."
2043 2033
2044(provide 'etags) 2034(provide 'etags)
2045 2035
2046;;; arch-tag: b897c2b5-08f3-4837-b2d3-0e7d6db1b63e 2036;; arch-tag: b897c2b5-08f3-4837-b2d3-0e7d6db1b63e
2047;;; etags.el ends here 2037;;; etags.el ends here
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 5e2a3705ef3..676833cdedc 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -4,7 +4,7 @@
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Torbj\"orn Einarsson <Torbjorn.Einarsson@era.ericsson.se> 6;; Author: Torbj\"orn Einarsson <Torbjorn.Einarsson@era.ericsson.se>
7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> 7;; Maintainer: Glenn Morris <rgm@gnu.org>
8;; Keywords: fortran, f90, languages 8;; Keywords: fortran, f90, languages
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -276,7 +276,7 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
276 "target" "then" "type" "use" "where" "while" "write" 276 "target" "then" "type" "use" "where" "while" "write"
277 ;; F95 keywords. 277 ;; F95 keywords.
278 "elemental" "pure") 'words) 278 "elemental" "pure") 'words)
279 "Regexp for F90 keywords.") 279 "Regexp used by the function `f90-change-keywords'.")
280 280
281(defconst f90-keywords-level-3-re 281(defconst f90-keywords-level-3-re
282 (regexp-opt 282 (regexp-opt
@@ -370,7 +370,8 @@ subroutine\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?"
370 (list 370 (list
371 ;; Variable declarations (avoid the real function call). 371 ;; Variable declarations (avoid the real function call).
372 '("^[ \t0-9]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\ 372 '("^[ \t0-9]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|\
373logical\\|type[ \t]*(\\sw+)\\)\\(.*::\\|[ \t]*(.*)\\)?\\([^&!\n]*\\)" 373logical\\|double[ \t]*precision\\|*type[ \t]*(\\sw+)\\)\
374\\(.*::\\|[ \t]*(.*)\\)?\\([^&!\n]*\\)"
374 (1 font-lock-type-face t) (4 font-lock-variable-name-face t)) 375 (1 font-lock-type-face t) (4 font-lock-variable-name-face t))
375 ;; do, if, select, where, and forall constructs. 376 ;; do, if, select, where, and forall constructs.
376 '("\\<\\(end[ \t]*\\(do\\|if\\|select\\|forall\\|where\\)\\)\\>\ 377 '("\\<\\(end[ \t]*\\(do\\|if\\|select\\|forall\\|where\\)\\)\\>\
@@ -381,7 +382,7 @@ do\\([ \t]*while\\)?\\|select[ \t]*case\\|where\\|forall\\)\\)\\>"
381 (2 font-lock-constant-face nil t) (3 font-lock-keyword-face)) 382 (2 font-lock-constant-face nil t) (3 font-lock-keyword-face))
382 ;; Implicit declaration. 383 ;; Implicit declaration.
383 '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\ 384 '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
384\\|logical\\|type[ \t]*(\\sw+)\\|none\\)[ \t]*" 385\\|logical\\|double[ \t]*precision\\|type[ \t]*(\\sw+)\\|none\\)[ \t]*"
385 (1 font-lock-keyword-face) (2 font-lock-type-face)) 386 (1 font-lock-keyword-face) (2 font-lock-type-face))
386 '("\\<\\(namelist\\|common\\)[ \t]*\/\\(\\sw+\\)?\/" 387 '("\\<\\(namelist\\|common\\)[ \t]*\/\\(\\sw+\\)?\/"
387 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) 388 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
@@ -698,6 +699,7 @@ Used in the F90 entry in `hs-special-modes-alist'.")
698 ("`de" "deallocate" ) 699 ("`de" "deallocate" )
699 ("`df" "define" ) 700 ("`df" "define" )
700 ("`di" "dimension" ) 701 ("`di" "dimension" )
702 ("`dp" "double precision")
701 ("`dw" "do while" ) 703 ("`dw" "do while" )
702 ("`el" "else" ) 704 ("`el" "else" )
703 ("`eli" "else if" ) 705 ("`eli" "else if" )
@@ -796,8 +798,6 @@ Variables controlling indentation style and extra features:
796 The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word. 798 The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word.
797`f90-leave-line-no' 799`f90-leave-line-no'
798 Do not left-justify line numbers (default nil). 800 Do not left-justify line numbers (default nil).
799`f90-keywords-re'
800 List of keywords used for highlighting/upcase-keywords etc.
801 801
802Turning on F90 mode calls the value of the variable `f90-mode-hook' 802Turning on F90 mode calls the value of the variable `f90-mode-hook'
803with no args, if that value is non-nil." 803with no args, if that value is non-nil."
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 3b6c77fef29..0d9921fcd7b 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -4,7 +4,7 @@
4;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Michael D. Prange <prange@erl.mit.edu> 6;; Author: Michael D. Prange <prange@erl.mit.edu>
7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> 7;; Maintainer: Glenn Morris <rgm@gnu.org>
8;; Keywords: fortran, languages 8;; Keywords: fortran, languages
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index c8d99dbe3e2..852cd8deb88 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -103,6 +103,7 @@ and #define directives otherwise.")
103(defvar gdb-error "Non-nil when GDB is reporting an error.") 103(defvar gdb-error "Non-nil when GDB is reporting an error.")
104(defvar gdb-macro-info nil 104(defvar gdb-macro-info nil
105 "Non-nil if GDB knows that the inferior includes preprocessor macro info.") 105 "Non-nil if GDB knows that the inferior includes preprocessor macro info.")
106(defvar gdb-buffer-fringe-width nil)
106 107
107(defvar gdb-buffer-type nil 108(defvar gdb-buffer-type nil
108 "One of the symbols bound in `gdb-buffer-rules'.") 109 "One of the symbols bound in `gdb-buffer-rules'.")
@@ -172,28 +173,28 @@ See Info node `(emacs)GDB Graphical Interface' for a more
172detailed description of this mode. 173detailed description of this mode.
173 174
174 175
175--------------------------------------------------------------------- 176+--------------------------------------------------------------+
176 GDB Toolbar 177| GDB Toolbar |
177--------------------------------------------------------------------- 178+-------------------------------+------------------------------+
178 GUD buffer (I/O of GDB) | Locals buffer 179| GUD buffer (I/O of GDB) | Locals buffer |
179 | 180| | |
180 | 181| | |
181 | 182| | |
182--------------------------------------------------------------------- 183+-------------------------------+------------------------------+
183 Source buffer | Input/Output (of inferior) buffer 184| Source buffer | I/O buffer (of inferior) |
184 | (comint-mode) 185| | (comint-mode) |
185 | 186| | |
186 | 187| | |
187 | 188| | |
188 | 189| | |
189 | 190| | |
190 | 191| | |
191--------------------------------------------------------------------- 192+-------------------------------+------------------------------+
192 Stack buffer | Breakpoints buffer 193| Stack buffer | Breakpoints buffer |
193 RET gdb-frames-select | SPC gdb-toggle-breakpoint 194| RET gdb-frames-select | SPC gdb-toggle-breakpoint |
194 | RET gdb-goto-breakpoint 195| | RET gdb-goto-breakpoint |
195 | d gdb-delete-breakpoint 196| | d gdb-delete-breakpoint |
196---------------------------------------------------------------------" 197+-------------------------------+------------------------------+"
197 ;; 198 ;;
198 (interactive (list (gud-query-cmdline 'gdba))) 199 (interactive (list (gud-query-cmdline 'gdba)))
199 ;; 200 ;;
@@ -377,7 +378,8 @@ Also display the main routine in the disassembly buffer if present."
377 gdb-location-alist nil 378 gdb-location-alist nil
378 gdb-find-file-unhook nil 379 gdb-find-file-unhook nil
379 gdb-error nil 380 gdb-error nil
380 gdb-macro-info nil) 381 gdb-macro-info nil
382 gdb-buffer-fringe-width (car (window-fringes)))
381 ;; 383 ;;
382 (setq gdb-buffer-type 'gdba) 384 (setq gdb-buffer-type 'gdba)
383 ;; 385 ;;
@@ -1190,12 +1192,13 @@ happens to be appropriate."
1190 (let ((buf (gdb-get-buffer ',buf-key))) 1192 (let ((buf (gdb-get-buffer ',buf-key)))
1191 (and buf 1193 (and buf
1192 (with-current-buffer buf 1194 (with-current-buffer buf
1193 (let ((p (window-point (get-buffer-window buf 0))) 1195 (let* ((window (get-buffer-window buf 0))
1196 (p (window-point window))
1194 (buffer-read-only nil)) 1197 (buffer-read-only nil))
1195 (erase-buffer) 1198 (erase-buffer)
1196 (insert-buffer-substring (gdb-get-create-buffer 1199 (insert-buffer-substring (gdb-get-create-buffer
1197 'gdb-partial-output-buffer)) 1200 'gdb-partial-output-buffer))
1198 (set-window-point (get-buffer-window buf 0) p))))) 1201 (set-window-point window p)))))
1199 ;; put customisation here 1202 ;; put customisation here
1200 (,custom-defun))) 1203 (,custom-defun)))
1201 1204
@@ -1545,20 +1548,23 @@ static char *magick[] = {
1545 help-echo "mouse-2, RET: Select frame")) 1548 help-echo "mouse-2, RET: Select frame"))
1546 (goto-char bl) 1549 (goto-char bl)
1547 (when (looking-at "^#\\([0-9]+\\)") 1550 (when (looking-at "^#\\([0-9]+\\)")
1548 (if (equal (match-string 1) gdb-frame-number) 1551 (when (string-equal (match-string 1) gdb-frame-number)
1549 (put-text-property bl el 'face '(:inverse-video t)) 1552 (put-text-property bl (+ bl 4)
1550 (when (re-search-forward " in \\([^ ]+\\) (" el t) 1553 'face '(:inverse-video t)))
1554 (when (re-search-forward
1555 (concat
1556 (if (string-equal (match-string 1) "0") "" " in ")
1557 "\\([^ ]+\\) (") el t)
1558 (put-text-property (match-beginning 1) (match-end 1)
1559 'face font-lock-function-name-face)
1560 (setq bl (match-end 0))
1561 (while (re-search-forward "<\\([^>]+\\)>" el t)
1551 (put-text-property (match-beginning 1) (match-end 1) 1562 (put-text-property (match-beginning 1) (match-end 1)
1552 'face font-lock-function-name-face)
1553 (setq bl (match-end 0))
1554 (while (re-search-forward "<\\([^>]+\\)>" el t)
1555 (put-text-property (match-beginning 1) (match-end 1)
1556 'face font-lock-function-name-face)) 1563 'face font-lock-function-name-face))
1557 (goto-char bl) 1564 (goto-char bl)
1558 (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t) 1565 (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
1559 (put-text-property (match-beginning 1) (match-end 1) 1566 (put-text-property (match-beginning 1) (match-end 1)
1560 'face font-lock-variable-name-face)) 1567 'face font-lock-variable-name-face))))
1561 )))
1562 (forward-line 1)))))) 1568 (forward-line 1))))))
1563 1569
1564(defun gdb-stack-buffer-name () 1570(defun gdb-stack-buffer-name ()
@@ -1604,6 +1610,7 @@ static char *magick[] = {
1604 1610
1605(defun gdb-get-frame-number () 1611(defun gdb-get-frame-number ()
1606 (save-excursion 1612 (save-excursion
1613 (end-of-line)
1607 (let* ((pos (re-search-backward "^#*\\([0-9]*\\)" nil t)) 1614 (let* ((pos (re-search-backward "^#*\\([0-9]*\\)" nil t))
1608 (n (or (and pos (match-string-no-properties 1)) "0"))) 1615 (n (or (and pos (match-string-no-properties 1)) "0")))
1609 n))) 1616 n)))
@@ -2119,13 +2126,15 @@ corresponding to the mode line clicked."
2119 (while (re-search-forward "\\s-*{.*\n" nil t) 2126 (while (re-search-forward "\\s-*{.*\n" nil t)
2120 (replace-match " (array);\n" nil nil)))) 2127 (replace-match " (array);\n" nil nil))))
2121 (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) 2128 (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
2122 (and buf (with-current-buffer buf 2129 (and buf
2123 (let ((p (window-point (get-buffer-window buf 0))) 2130 (with-current-buffer buf
2131 (let* ((window (get-buffer-window buf 0))
2132 (p (window-point window))
2124 (buffer-read-only nil)) 2133 (buffer-read-only nil))
2125 (erase-buffer) 2134 (erase-buffer)
2126 (insert-buffer-substring (gdb-get-create-buffer 2135 (insert-buffer-substring (gdb-get-create-buffer
2127 'gdb-partial-output-buffer)) 2136 'gdb-partial-output-buffer))
2128 (set-window-point (get-buffer-window buf 0) p))))) 2137 (set-window-point window p)))))
2129 (run-hooks 'gdb-info-locals-hook)) 2138 (run-hooks 'gdb-info-locals-hook))
2130 2139
2131(defun gdb-info-locals-custom () 2140(defun gdb-info-locals-custom ()
@@ -2144,7 +2153,7 @@ corresponding to the mode line clicked."
2144 (1 font-lock-variable-name-face) 2153 (1 font-lock-variable-name-face)
2145 (3 font-lock-keyword-face) 2154 (3 font-lock-keyword-face)
2146 (4 font-lock-type-face)) 2155 (4 font-lock-type-face))
2147 ;; var = (type) value 2156 ;; var = (type) value
2148 ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +(\\(\\(\\sw\\|[_.]\\)+\\)" 2157 ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +(\\(\\(\\sw\\|[_.]\\)+\\)"
2149 (1 font-lock-variable-name-face) 2158 (1 font-lock-variable-name-face)
2150 (3 font-lock-type-face)) 2159 (3 font-lock-type-face))
@@ -2470,7 +2479,8 @@ BUFFER nil or omitted means use the current buffer."
2470(defun gdb-put-breakpoint-icon (enabled bptno) 2479(defun gdb-put-breakpoint-icon (enabled bptno)
2471 (let ((start (- (line-beginning-position) 1)) 2480 (let ((start (- (line-beginning-position) 1))
2472 (end (+ (line-end-position) 1)) 2481 (end (+ (line-end-position) 1))
2473 (putstring (if enabled "B" "b"))) 2482 (putstring (if enabled "B" "b"))
2483 (source-window (get-buffer-window (current-buffer) 0)))
2474 (add-text-properties 2484 (add-text-properties
2475 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") 2485 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt")
2476 putstring) 2486 putstring)
@@ -2480,7 +2490,9 @@ BUFFER nil or omitted means use the current buffer."
2480 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring)) 2490 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring))
2481 (gdb-remove-breakpoint-icons start end) 2491 (gdb-remove-breakpoint-icons start end)
2482 (if (display-images-p) 2492 (if (display-images-p)
2483 (if (>= (car (window-fringes)) 8) 2493 (if (>= (or left-fringe-width
2494 (if source-window (car (window-fringes source-window)))
2495 gdb-buffer-fringe-width) 8)
2484 (gdb-put-string 2496 (gdb-put-string
2485 nil (1+ start) 2497 nil (1+ start)
2486 `(left-fringe breakpoint 2498 `(left-fringe breakpoint
@@ -2490,9 +2502,9 @@ BUFFER nil or omitted means use the current buffer."
2490 (when (< left-margin-width 2) 2502 (when (< left-margin-width 2)
2491 (save-current-buffer 2503 (save-current-buffer
2492 (setq left-margin-width 2) 2504 (setq left-margin-width 2)
2493 (if (get-buffer-window (current-buffer) 0) 2505 (if source-window
2494 (set-window-margins 2506 (set-window-margins
2495 (get-buffer-window (current-buffer) 0) 2507 source-window
2496 left-margin-width right-margin-width)))) 2508 left-margin-width right-margin-width))))
2497 (put-image 2509 (put-image
2498 (if enabled 2510 (if enabled
@@ -2519,10 +2531,10 @@ BUFFER nil or omitted means use the current buffer."
2519 (when (< left-margin-width 2) 2531 (when (< left-margin-width 2)
2520 (save-current-buffer 2532 (save-current-buffer
2521 (setq left-margin-width 2) 2533 (setq left-margin-width 2)
2522 (if (get-buffer-window (current-buffer) 0) 2534 (let ((window (get-buffer-window (current-buffer) 0)))
2535 (if window
2523 (set-window-margins 2536 (set-window-margins
2524 (get-buffer-window (current-buffer) 0) 2537 window left-margin-width right-margin-width)))))
2525 left-margin-width right-margin-width))))
2526 (gdb-put-string 2538 (gdb-put-string
2527 (propertize putstring 2539 (propertize putstring
2528 'face (if enabled 'breakpoint-enabled 'breakpoint-disabled)) 2540 'face (if enabled 'breakpoint-enabled 'breakpoint-disabled))
@@ -2534,10 +2546,10 @@ BUFFER nil or omitted means use the current buffer."
2534 (remove-images start end)) 2546 (remove-images start end))
2535 (when remove-margin 2547 (when remove-margin
2536 (setq left-margin-width 0) 2548 (setq left-margin-width 0)
2537 (if (get-buffer-window (current-buffer) 0) 2549 (let ((window (get-buffer-window (current-buffer) 0)))
2538 (set-window-margins 2550 (if window
2539 (get-buffer-window (current-buffer) 0) 2551 (set-window-margins
2540 left-margin-width right-margin-width)))) 2552 window left-margin-width right-margin-width)))))
2541 2553
2542 2554
2543;; 2555;;
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 47d74f00aec..d38697a2152 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -137,11 +137,15 @@ Used to grey out relevant togolbar icons.")
137 :enable (and (not gud-running) 137 :enable (and (not gud-running)
138 (memq gud-minor-mode '(gdbmi gdba gdb perldb)))) 138 (memq gud-minor-mode '(gdbmi gdba gdb perldb))))
139 ([remove] menu-item "Remove Breakpoint" gud-remove 139 ([remove] menu-item "Remove Breakpoint" gud-remove
140 :enable (not gud-running)) 140 :enable (not gud-running)
141 :visible (not (and (memq gud-minor-mode '(gdbmi gdba))
142 (window-fringes))))
141 ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak 143 ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak
142 :enable (memq gud-minor-mode '(gdbmi gdba gdb sdb xdb bashdb))) 144 :enable (memq gud-minor-mode '(gdbmi gdba gdb sdb xdb bashdb)))
143 ([break] menu-item "Set Breakpoint" gud-break 145 ([break] menu-item "Set Breakpoint" gud-break
144 :enable (not gud-running)) 146 :enable (not gud-running)
147 :visible (not (and (memq gud-minor-mode '(gdbmi gdba))
148 (window-fringes))))
145 ([up] menu-item "Up Stack" gud-up 149 ([up] menu-item "Up Stack" gud-up
146 :enable (and (not gud-running) 150 :enable (and (not gud-running)
147 (memq gud-minor-mode 151 (memq gud-minor-mode
@@ -332,9 +336,6 @@ we're in the GUD buffer)."
332;; speedbar support functions and variables. 336;; speedbar support functions and variables.
333(eval-when-compile (require 'speedbar)) ;For speedbar-with-attached-buffer. 337(eval-when-compile (require 'speedbar)) ;For speedbar-with-attached-buffer.
334 338
335(defvar gud-last-speedbar-buffer nil
336 "The last GUD buffer used.")
337
338(defvar gud-last-speedbar-stackframe nil 339(defvar gud-last-speedbar-stackframe nil
339 "Description of the currently displayed GUD stack. 340 "Description of the currently displayed GUD stack.
340t means that there is no stack, and we are in display-file mode.") 341t means that there is no stack, and we are in display-file mode.")
@@ -351,17 +352,22 @@ t means that there is no stack, and we are in display-file mode.")
351 (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) 352 (define-key gud-speedbar-key-map "j" 'speedbar-edit-line)
352 (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) 353 (define-key gud-speedbar-key-map "e" 'speedbar-edit-line)
353 (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) 354 (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line)
354 (define-key gud-speedbar-key-map "D" 'gdb-var-delete))) 355 (define-key gud-speedbar-key-map " " 'speedbar-toggle-line-expansion)
356 (define-key gud-speedbar-key-map "[" 'speedbar-expand-line-descendants)
357 (define-key gud-speedbar-key-map "]" 'speedbar-contract-line-descendants)
358 (define-key gud-speedbar-key-map "D" 'gdb-var-delete))
355 359
360 (speedbar-add-expansion-list '("GUD" gud-speedbar-menu-items
361 gud-speedbar-key-map
362 gud-expansion-speedbar-buttons)))
356 363
357(defvar gud-speedbar-menu-items 364(defvar gud-speedbar-menu-items
358 ;; Note to self. Add expand, and turn off items when not available.
359 '(["Jump to stack frame" speedbar-edit-line 365 '(["Jump to stack frame" speedbar-edit-line
360 (with-current-buffer gud-comint-buffer 366 :visible (with-current-buffer gud-comint-buffer
361 (not (memq gud-minor-mode '(gdbmi gdba))))] 367 (not (memq gud-minor-mode '(gdbmi gdba))))]
362 ["Edit value" speedbar-edit-line 368 ["Edit value" speedbar-edit-line
363 (with-current-buffer gud-comint-buffer 369 :visible (with-current-buffer gud-comint-buffer
364 (memq gud-minor-mode '(gdbmi gdba)))] 370 (memq gud-minor-mode '(gdbmi gdba)))]
365 ["Delete expression" gdb-var-delete 371 ["Delete expression" gdb-var-delete
366 (with-current-buffer gud-comint-buffer 372 (with-current-buffer gud-comint-buffer
367 (memq gud-minor-mode '(gdbmi gdba)))]) 373 (memq gud-minor-mode '(gdbmi gdba)))])
@@ -372,89 +378,89 @@ t means that there is no stack, and we are in display-file mode.")
372 (gud-install-speedbar-variables) 378 (gud-install-speedbar-variables)
373 (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables)) 379 (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables))
374 380
381(defun gud-expansion-speedbar-buttons (directory zero)
382 "Wrapper for call to speedbar-add-expansion-list. DIRECTORY and
383ZERO are not used, but are required by the caller."
384 (gud-speedbar-buttons gud-comint-buffer))
385
375(defun gud-speedbar-buttons (buffer) 386(defun gud-speedbar-buttons (buffer)
376 "Create a speedbar display based on the current state of GUD. 387 "Create a speedbar display based on the current state of GUD.
377If the GUD BUFFER is not running a supported debugger, then turn 388If the GUD BUFFER is not running a supported debugger, then turn
378off the specialized speedbar mode." 389off the specialized speedbar mode. BUFFER is not used, but are
379 (let ((minor-mode (with-current-buffer buffer gud-minor-mode))) 390required by the caller."
380 (cond 391 (when (and (boundp 'gud-comint-buffer)
381 ((memq minor-mode '(gdbmi gdba)) 392 gud-comint-buffer
382 (when (or gdb-var-changed 393 ;; gud-comint-buffer might be killed
383 (not (save-excursion 394 (buffer-name gud-comint-buffer))
384 (goto-char (point-min)) 395 (let* ((minor-mode (with-current-buffer buffer gud-minor-mode))
385 (let ((case-fold-search t)) 396 (window (get-buffer-window (current-buffer) 0))
386 (looking-at "Watch Expressions:"))))) 397 (p (window-point window)))
387 (erase-buffer) 398 (cond
388 (insert "Watch Expressions:\n") 399 ((memq minor-mode '(gdbmi gdba))
389 (let ((var-list gdb-var-list)) 400 (when (or gdb-var-changed
390 (while var-list 401 (not (save-excursion
391 (let* ((depth 0) (start 0) (char ?+) 402 (goto-char (point-min))
392 (var (car var-list)) (varnum (nth 1 var))) 403 (let ((case-fold-search t))
393 (while (string-match "\\." varnum start) 404 (looking-at "Watch Expressions:")))))
394 (setq depth (1+ depth) 405 (erase-buffer)
395 start (1+ (match-beginning 0)))) 406 (insert "Watch Expressions:\n")
396 (if (equal (nth 2 var) "0") 407 (let ((var-list gdb-var-list))
397 (speedbar-make-tag-line 'bracket ?? nil nil 408 (while var-list
398 (concat (car var) "\t" (nth 4 var)) 409 (let* ((depth 0) (start 0) (char ?+)
399 'gdb-edit-value 410 (var (car var-list)) (varnum (nth 1 var)))
400 nil 411 (while (string-match "\\." varnum start)
401 (if (and (nth 5 var) 412 (setq depth (1+ depth)
402 gdb-show-changed-values) 413 start (1+ (match-beginning 0))))
403 'font-lock-warning-face 414 (if (equal (nth 2 var) "0")
404 nil) depth) 415 (speedbar-make-tag-line 'bracket ?? nil nil
405 (if (and (cadr var-list) 416 (concat (car var) "\t" (nth 4 var))
406 (string-match varnum (cadr (cadr var-list)))) 417 'gdb-edit-value
407 (setq char ?-)) 418 nil
408 (speedbar-make-tag-line 'bracket char 419 (if (and (nth 5 var)
409 'gdb-speedbar-expand-node varnum 420 gdb-show-changed-values)
410 (concat (car var) "\t" (nth 3 var)) 421 'font-lock-warning-face
411 nil nil nil depth))) 422 nil) depth)
412 (setq var-list (cdr var-list)))) 423 (if (and (cadr var-list)
413 (setq gdb-var-changed nil))) 424 (string-match varnum (cadr (cadr var-list))))
414 (t (if (and (save-excursion 425 (setq char ?-))
415 (goto-char (point-min)) 426 (speedbar-make-tag-line 'bracket char
416 (looking-at "Current Stack")) 427 'gdb-speedbar-expand-node varnum
417 (equal gud-last-last-frame gud-last-speedbar-stackframe)) 428 (concat (car var) "\t" (nth 3 var))
418 nil 429 nil nil nil depth)))
419 (setq gud-last-speedbar-buffer buffer) 430 (setq var-list (cdr var-list))))
420 (let ((gud-frame-list 431 (setq gdb-var-changed nil)))
421 (cond ((eq minor-mode 'gdb) 432 (t (if (and (save-excursion
422 (gud-gdb-get-stackframe buffer)) 433 (goto-char (point-min))
423 ;; Add more debuggers here! 434 (looking-at "Current Stack:"))
424 (t (speedbar-remove-localized-speedbar-support buffer) 435 (equal gud-last-last-frame gud-last-speedbar-stackframe))
425 nil)))) 436 nil
426 (erase-buffer) 437 (let ((gud-frame-list
427 (if (not gud-frame-list) 438 (cond ((eq minor-mode 'gdb)
428 (insert "No Stack frames\n") 439 (gud-gdb-get-stackframe buffer))
429 (insert "Current Stack:\n")) 440 ;; Add more debuggers here!
430 (dolist (frame gud-frame-list) 441 (t (speedbar-remove-localized-speedbar-support buffer)
431 (insert (nth 1 frame) ":\n") 442 nil))))
432 (if (= (length frame) 2) 443 (erase-buffer)
433 (progn 444 (if (not gud-frame-list)
434; (speedbar-insert-button "[?]" 445 (insert "No Stack frames\n")
435; 'speedbar-button-face 446 (insert "Current Stack:\n"))
436; nil nil nil t) 447 (dolist (frame gud-frame-list)
437 (speedbar-insert-button (car frame) 448 (insert (nth 1 frame) ":\n")
438 'speedbar-directory-face 449 (if (= (length frame) 2)
439 nil nil nil t)) 450 (progn
440; (speedbar-insert-button "[+]" 451 (speedbar-insert-button (car frame)
441; 'speedbar-button-face 452 'speedbar-directory-face
442; 'speedbar-highlight-face 453 nil nil nil t))
443; 'gud-gdb-get-scope-data 454 (speedbar-insert-button
444; frame t) 455 (car frame)
445 (speedbar-insert-button (car frame) 456 'speedbar-file-face
446 'speedbar-file-face 457 'speedbar-highlight-face
447 'speedbar-highlight-face 458 (cond ((memq minor-mode '(gdbmi gdba gdb))
448 (cond ((memq minor-mode '(gdbmi gdba gdb)) 459 'gud-gdb-goto-stackframe)
449 'gud-gdb-goto-stackframe) 460 (t (error "Should never be here")))
450 (t (error "Should never be here"))) 461 frame t))))
451 frame t))) 462 (setq gud-last-speedbar-stackframe gud-last-last-frame))))
452; (let ((selected-frame 463 (set-window-point window p))))
453; (cond ((eq ff 'gud-gdb-find-file)
454; (gud-gdb-selected-frame-info buffer))
455; (t (error "Should never be here"))))))
456 )
457 (setq gud-last-speedbar-stackframe gud-last-last-frame))))))
458 464
459 465
460;; ====================================================================== 466;; ======================================================================
@@ -2569,6 +2575,9 @@ It is saved for when this flag is not set.")
2569 ;; Stop displaying an arrow in a source file. 2575 ;; Stop displaying an arrow in a source file.
2570 (setq gud-overlay-arrow-position nil) 2576 (setq gud-overlay-arrow-position nil)
2571 (set-process-buffer proc nil) 2577 (set-process-buffer proc nil)
2578 (if (featurep 'speedbar)
2579 (speedbar-change-initial-expansion-list
2580 speedbar-previously-used-expansion-list-name))
2572 (if (memq gud-minor-mode-type '(gdbmi gdba)) 2581 (if (memq gud-minor-mode-type '(gdbmi gdba))
2573 (gdb-reset) 2582 (gdb-reset)
2574 (gud-reset))) 2583 (gud-reset)))
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index fd494324303..5134cf8292e 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -17,8 +17,8 @@
17;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18;; MA 02110-1301 USA 18;; MA 02110-1301 USA
19 19
20;; Author: Pieter E.J. Pareit <pieter.pareit@skynet.be> 20;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com>
21;; Maintainer: Pieter E.J. Pareit <pieter.pareit@skynet.be> 21;; Maintainer: Pieter E.J. Pareit <pieter.pareit@gmail.com>
22;; Created: 09 Nov 2002 22;; Created: 09 Nov 2002
23;; Version: 0.1 23;; Version: 0.1
24;; Keywords: Knuth mix mixal asm mixvm "The Art Of Computer Programming" 24;; Keywords: Knuth mix mixal asm mixvm "The Art Of Computer Programming"
@@ -27,17 +27,17 @@
27;; Major mode for the mix asm language. 27;; Major mode for the mix asm language.
28;; The mix asm language is described in "The Art Of Computer Programming". 28;; The mix asm language is described in "The Art Of Computer Programming".
29;; 29;;
30;; For optimal use, also use GNU MDK. Compiling needs mixasm, running 30;; For optimal use, also use GNU MDK. Compiling needs mixasm, running
31;; and debugging needs mixvm and mixvm.el from GNU MDK. You can get 31;; and debugging needs mixvm and mixvm.el from GNU MDK. You can get
32;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and 32;; GNU MDK from `https://savannah.gnu.org/projects/mdk/' and
33;; `ftp://ftp.gnu.org/pub/gnu/mdk'. 33;; `ftp://ftp.gnu.org/pub/gnu/mdk'.
34;; 34;;
35;; To use this mode, place the following in your .emacs file: 35;; To use this mode, place the following in your .emacs file:
36;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. 36;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'.
37;; When you load a file with the extension .mixal the mode will be started 37;; When you load a file with the extension .mixal the mode will be started
38;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. 38;; automatic. If you want to start the mode manual, use `M-x mixal-mode'.
39;; Font locking will work, the behavior of tabs is the same as emacs 39;; Font locking will work, the behavior of tabs is the same as Emacs's
40;; default behavior. You can compile a source file with `C-c c' you can 40;; default behavior. You can compile a source file with `C-c c' you can
41;; run a compiled file with `C-c r' or run it in debug mode with `C-c d'. 41;; run a compiled file with `C-c r' or run it in debug mode with `C-c d'.
42;; You can get more information about a particular operation code by using 42;; You can get more information about a particular operation code by using
43;; mixal-describe-operation-code or `C-h o'. 43;; mixal-describe-operation-code or `C-h o'.
@@ -45,6 +45,15 @@
45;; Have fun. 45;; Have fun.
46 46
47;;; History: 47;;; History:
48;; Version 0.3:
49;; 08/10/05: sync mdk and emacs cvs
50;; from emacs: compile-command and require-final-newline
51;; from mdk: see version 0.2
52;; correct my email address
53;; Version 0.2:
54;; 06/04/05: mixasm no longer needs -g option
55;; fontlocking of comments works in all? cases now
56;; added some more mixal-operation-codes
48;; Version 0.1: 57;; Version 0.1:
49;; Version 0.1.1: 58;; Version 0.1.1:
50;; 22/11/02: bugfix in fontlocking, needed to add a '-' to the regex. 59;; 22/11/02: bugfix in fontlocking, needed to add a '-' to the regex.
@@ -54,7 +63,6 @@
54;; 09/11/02: started mixal-mode. 63;; 09/11/02: started mixal-mode.
55 64
56;;; Code: 65;;; Code:
57
58(defvar compile-command) 66(defvar compile-command)
59 67
60;;; Key map 68;;; Key map
@@ -66,13 +74,13 @@
66 (define-key map "\C-ho" 'mixal-describe-operation-code) 74 (define-key map "\C-ho" 'mixal-describe-operation-code)
67 map) 75 map)
68 "Keymap for `mixal-mode'.") 76 "Keymap for `mixal-mode'.")
69; (makunbound 'mixal-mode-map) 77;; (makunbound 'mixal-mode-map)
70 78
71;;; Syntax table 79;;; Syntax table
72(defvar mixal-mode-syntax-table 80(defvar mixal-mode-syntax-table
73 (let ((st (make-syntax-table))) 81 (let ((st (make-syntax-table)))
74 (modify-syntax-entry ?* "<" st) 82 ;; (modify-syntax-entry ?* "<" st) we need to do a bit more to make
75 (modify-syntax-entry ?\n ">" st) 83 ;; (modify-syntax-entry ?\n ">" st) fontlocking for comments work
76 st) 84 st)
77 "Syntax table for `dot-mode'.") 85 "Syntax table for `dot-mode'.")
78 86
@@ -97,6 +105,7 @@ value.")
97 "LD4" "LD5" "LD6" "LDX" "LDAN" "LD1N" "LD2N" "LD3N" "LD4N" "LD5N" "LD6N" 105 "LD4" "LD5" "LD6" "LDX" "LDAN" "LD1N" "LD2N" "LD3N" "LD4N" "LD5N" "LD6N"
98 "LDXN" "STA" "ST1" "ST2" "ST3" "ST4" "ST5" "ST6" "STX" "STJ" "STZ" "JBUS" 106 "LDXN" "STA" "ST1" "ST2" "ST3" "ST4" "ST5" "ST6" "STX" "STJ" "STZ" "JBUS"
99 "IOC" "IN" "OUT" "JRAD" "JMP" "JSJ" "JOV" "JNOV" 107 "IOC" "IN" "OUT" "JRAD" "JMP" "JSJ" "JOV" "JNOV"
108 "JL" "JE" "JG" "JGE" "JNE" "JLE"
100 "JAN" "J1N" "J2N" "J3N" "J4N" "J5N" "J6N" "JXN" 109 "JAN" "J1N" "J2N" "J3N" "J4N" "J5N" "J6N" "JXN"
101 "JAZ" "J1Z" "J2Z" "J3Z" "J4Z" "J5Z" "J6Z" "JXZ" 110 "JAZ" "J1Z" "J2Z" "J3Z" "J4Z" "J5Z" "J6Z" "JXZ"
102 "JAP" "J1P" "J2P" "J3P" "J4P" "J5P" "J6P" "JXP" 111 "JAP" "J1P" "J2P" "J3P" "J4P" "J5P" "J6P" "JXP"
@@ -109,11 +118,11 @@ value.")
109 "INCX" "DECX" "ENTX" "ENNX" "CMPA" "FCMP" "CMP1" "CMP2" "CMP3" "CMP4" 118 "INCX" "DECX" "ENTX" "ENNX" "CMPA" "FCMP" "CMP1" "CMP2" "CMP3" "CMP4"
110 "CMP5" "CMP6" "CMPX") 119 "CMP5" "CMP6" "CMPX")
111 "List of possible operation codes as strings.") 120 "List of possible operation codes as strings.")
112; (makunbound 'mixal-operation-codes) 121;; (makunbound 'mixal-operation-codes)
113 122
114(defvar mixal-assembly-pseudoinstructions 123(defvar mixal-assembly-pseudoinstructions
115 '("ORIG" "EQU" "CON" "ALF" "END") 124 '("ORIG" "EQU" "CON" "ALF" "END")
116 "List of possible assembly pseudoinstructions") 125 "List of possible assembly pseudoinstructions.")
117 126
118;;; Font-locking: 127;;; Font-locking:
119(defvar mixal-font-lock-keywords 128(defvar mixal-font-lock-keywords
@@ -124,10 +133,13 @@ value.")
124 (,(regexp-opt 133 (,(regexp-opt
125 mixal-assembly-pseudoinstructions 'words) 134 mixal-assembly-pseudoinstructions 'words)
126 . mixal-font-lock-assembly-pseudoinstruction-face) 135 . mixal-font-lock-assembly-pseudoinstruction-face)
127 ("^[A-Z0-9a-z]*[ \t]+[A-Z0-9a-z]+[ \t]+[\\-A-Z0-9a-z,():]*[\t]+\\(.*\\)$" 136 ("^[A-Z0-9a-z]*[ \t]+[A-ZO-9a-z]+[ \t]+\\(=.*=\\).*$"
128 (1 font-lock-comment-face))) 137 (1 font-lock-constant-face))
138 ("^[A-Z0-9a-z]*[ \t]+[A-Z0-9a-z]+[ \t]+[A-Z0-9a-z,():+-\\*=\" ]*\t+\\(.*\\)$"
139 (1 font-lock-comment-face))
140 ("^\\*.*$" . font-lock-comment-face))
129 "Keyword highlighting specification for `mixal-mode'.") 141 "Keyword highlighting specification for `mixal-mode'.")
130; (makunbound 'mixal-font-lock-keywords) 142;; (makunbound 'mixal-font-lock-keywords)
131 143
132;;;; Compilation 144;;;; Compilation
133;; Output from mixasm is compatible with default behavior of emacs, 145;; Output from mixasm is compatible with default behavior of emacs,
@@ -139,19 +151,24 @@ value.")
139;;;; Describe 151;;;; Describe
140(defvar mixal-operation-codes-alist '() 152(defvar mixal-operation-codes-alist '()
141 "Alist that contains all the possible operation codes for mix. 153 "Alist that contains all the possible operation codes for mix.
142Each elt has the form (OP-CODE GROUP FULL-NAME C-BYTE F-BYTE DESCRIPTION EXECUTION-TIME) 154Each elt has the form
143Where OP-CODE is the text of the opcode as an symbol, FULL-NAME is the human readable name 155 (OP-CODE GROUP FULL-NAME C-BYTE F-BYTE DESCRIPTION EXECUTION-TIME)
144as a string, C-BYTE is the operation code telling what operation is to be performed, F-BYTE holds 156Where OP-CODE is the text of the opcode as an symbol,
145an modification of the operation code which can be a symbol or a number, DESCRIPTION contains 157FULL-NAME is the human readable name as a string,
146an string with a description about the operation code and EXECUTION-TIME holds info 158C-BYTE is the operation code telling what operation is to be performed,
147about the time it takes, number or string.") 159F-BYTE holds a modification of the operation code which can be a symbol
148; (makunbound 'mixal-operation-codes-alist) 160 or a number,
149 161DESCRIPTION contains an string with a description about the operation code and
150(defun mixal-add-operation-code (op-code group full-name C-byte F-byte description execution-time) 162EXECUTION-TIME holds info about the time it takes, number or string.")
151 "Add an operation code to the list that contains information about possible op code's." 163;; (makunbound 'mixal-operation-codes-alist)
152 (setq mixal-operation-codes-alist (cons (list op-code group full-name C-byte F-byte 164
153 description execution-time) 165(defun mixal-add-operation-code (op-code group full-name C-byte F-byte
154 mixal-operation-codes-alist ))) 166 description execution-time)
167 "Add an operation code to `mixal-operation-codes-alist'."
168 (setq mixal-operation-codes-alist
169 (cons (list op-code group full-name C-byte F-byte
170 description execution-time)
171 mixal-operation-codes-alist)))
155 172
156;; now add each operation code 173;; now add each operation code
157 174
@@ -1250,7 +1267,8 @@ The converted character representation is stored in rAX."
1250(defun mixal-describe-operation-code (&optional op-code) 1267(defun mixal-describe-operation-code (&optional op-code)
1251 "Display the full documentation of OP-CODE." 1268 "Display the full documentation of OP-CODE."
1252 (interactive) 1269 (interactive)
1253 ;; we like to provide completition and history, so do it ourself (interactive "?bla")? 1270 ;; We like to provide completion and history, so do it ourself
1271 ;; (interactive "?bla")?
1254 (unless op-code 1272 (unless op-code
1255 (let* ((completion-ignore-case t) 1273 (let* ((completion-ignore-case t)
1256 ;; we already have a list, but it is not in the right format 1274 ;; we already have a list, but it is not in the right format
@@ -1282,13 +1300,14 @@ The converted character representation is stored in rAX."
1282 1300
1283;;;; Running 1301;;;; Running
1284(defun mixal-run () 1302(defun mixal-run ()
1285 "Run's mixal file in current buffer, assumes that file has been compiled" 1303 "Run mixal file in current buffer, assumes that file has been compiled."
1286 (interactive) 1304 (interactive)
1287 (mixvm (concat "mixvm -r -t -d " 1305 (mixvm (concat "mixvm -r -t -d "
1288 (file-name-sans-extension (buffer-file-name))))) 1306 (file-name-sans-extension (buffer-file-name)))))
1289 1307
1290(defun mixal-debug () 1308(defun mixal-debug ()
1291 "Starts mixvm for debugging, assumes that file has been compiled with debugging support" 1309 "Start mixvm for debugging.
1310Assumes that file has been compiled with debugging support."
1292 (interactive) 1311 (interactive)
1293 (mixvm (concat "mixvm " 1312 (mixvm (concat "mixvm "
1294 (file-name-sans-extension (buffer-file-name))))) 1313 (file-name-sans-extension (buffer-file-name)))))
@@ -1300,9 +1319,9 @@ The converted character representation is stored in rAX."
1300 (set (make-local-variable 'comment-start) "*") 1319 (set (make-local-variable 'comment-start) "*")
1301 (set (make-local-variable 'comment-start-skip) "*") 1320 (set (make-local-variable 'comment-start-skip) "*")
1302 (set (make-local-variable 'font-lock-defaults) '(mixal-font-lock-keywords)) 1321 (set (make-local-variable 'font-lock-defaults) '(mixal-font-lock-keywords))
1303; might add an indent function in the future 1322 ;; might add an indent function in the future
1304; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) 1323 ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line)
1305 (set (make-local-variable 'compile-command) (concat "mixasm -g " 1324 (set (make-local-variable 'compile-command) (concat "mixasm "
1306 buffer-file-name)) 1325 buffer-file-name))
1307 ;; mixasm will do strange when there is no final newline, 1326 ;; mixasm will do strange when there is no final newline,
1308 ;; so let Emacs ensure that it is always there 1327 ;; so let Emacs ensure that it is always there
@@ -1314,5 +1333,5 @@ The converted character representation is stored in rAX."
1314 1333
1315(provide 'mixal-mode) 1334(provide 'mixal-mode)
1316 1335
1317;;; arch-tag: be7c128a-bf61-4951-a90e-9398267ce3f3 1336;; arch-tag: be7c128a-bf61-4951-a90e-9398267ce3f3
1318;;; mixal-mode.el ends here 1337;;; mixal-mode.el ends here
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index b84fa87a0de..3cd243580e2 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -69,36 +69,34 @@
69 "Abbrev table in use in Pascal-mode buffers.") 69 "Abbrev table in use in Pascal-mode buffers.")
70(define-abbrev-table 'pascal-mode-abbrev-table ()) 70(define-abbrev-table 'pascal-mode-abbrev-table ())
71 71
72(defvar pascal-mode-map () 72(defvar pascal-mode-map
73 (let ((map (make-sparse-keymap)))
74 (define-key map ";" 'electric-pascal-semi-or-dot)
75 (define-key map "." 'electric-pascal-semi-or-dot)
76 (define-key map ":" 'electric-pascal-colon)
77 (define-key map "=" 'electric-pascal-equal)
78 (define-key map "#" 'electric-pascal-hash)
79 (define-key map "\r" 'electric-pascal-terminate-line)
80 (define-key map "\t" 'electric-pascal-tab)
81 (define-key map "\M-\t" 'pascal-complete-word)
82 (define-key map "\M-?" 'pascal-show-completions)
83 (define-key map "\177" 'backward-delete-char-untabify)
84 (define-key map "\M-\C-h" 'pascal-mark-defun)
85 (define-key map "\C-c\C-b" 'pascal-insert-block)
86 (define-key map "\M-*" 'pascal-star-comment)
87 (define-key map "\C-c\C-c" 'pascal-comment-area)
88 (define-key map "\C-c\C-u" 'pascal-uncomment-area)
89 (define-key map "\M-\C-a" 'pascal-beg-of-defun)
90 (define-key map "\M-\C-e" 'pascal-end-of-defun)
91 (define-key map "\C-c\C-d" 'pascal-goto-defun)
92 (define-key map "\C-c\C-o" 'pascal-outline-mode)
93 ;; A command to change the whole buffer won't be used terribly
94 ;; often, so no need for a key binding.
95 ;; (define-key map "\C-cd" 'pascal-downcase-keywords)
96 ;; (define-key map "\C-cu" 'pascal-upcase-keywords)
97 ;; (define-key map "\C-cc" 'pascal-capitalize-keywords)
98 map)
73 "Keymap used in Pascal mode.") 99 "Keymap used in Pascal mode.")
74(if pascal-mode-map
75 ()
76 (setq pascal-mode-map (make-sparse-keymap))
77 (define-key pascal-mode-map ";" 'electric-pascal-semi-or-dot)
78 (define-key pascal-mode-map "." 'electric-pascal-semi-or-dot)
79 (define-key pascal-mode-map ":" 'electric-pascal-colon)
80 (define-key pascal-mode-map "=" 'electric-pascal-equal)
81 (define-key pascal-mode-map "#" 'electric-pascal-hash)
82 (define-key pascal-mode-map "\r" 'electric-pascal-terminate-line)
83 (define-key pascal-mode-map "\t" 'electric-pascal-tab)
84 (define-key pascal-mode-map "\M-\t" 'pascal-complete-word)
85 (define-key pascal-mode-map "\M-?" 'pascal-show-completions)
86 (define-key pascal-mode-map "\177" 'backward-delete-char-untabify)
87 (define-key pascal-mode-map "\M-\C-h" 'pascal-mark-defun)
88 (define-key pascal-mode-map "\C-c\C-b" 'pascal-insert-block)
89 (define-key pascal-mode-map "\M-*" 'pascal-star-comment)
90 (define-key pascal-mode-map "\C-c\C-c" 'pascal-comment-area)
91 (define-key pascal-mode-map "\C-c\C-u" 'pascal-uncomment-area)
92 (define-key pascal-mode-map "\M-\C-a" 'pascal-beg-of-defun)
93 (define-key pascal-mode-map "\M-\C-e" 'pascal-end-of-defun)
94 (define-key pascal-mode-map "\C-c\C-d" 'pascal-goto-defun)
95 (define-key pascal-mode-map "\C-c\C-o" 'pascal-outline)
96;;; A command to change the whole buffer won't be used terribly
97;;; often, so no need for a key binding.
98; (define-key pascal-mode-map "\C-cd" 'pascal-downcase-keywords)
99; (define-key pascal-mode-map "\C-cu" 'pascal-upcase-keywords)
100; (define-key pascal-mode-map "\C-cc" 'pascal-capitalize-keywords)
101 )
102 100
103(defvar pascal-imenu-generic-expression 101(defvar pascal-imenu-generic-expression
104 '((nil "^[ \t]*\\(function\\|procedure\\)[ \t\n]+\\([a-zA-Z0-9_.:]+\\)" 2)) 102 '((nil "^[ \t]*\\(function\\|procedure\\)[ \t\n]+\\([a-zA-Z0-9_.:]+\\)" 2))
@@ -132,28 +130,31 @@
132(defconst pascal-exclude-str-start "{-----\\/----- EXCLUDED -----\\/-----") 130(defconst pascal-exclude-str-start "{-----\\/----- EXCLUDED -----\\/-----")
133(defconst pascal-exclude-str-end " -----/\\----- EXCLUDED -----/\\-----}") 131(defconst pascal-exclude-str-end " -----/\\----- EXCLUDED -----/\\-----}")
134 132
135(defvar pascal-mode-syntax-table nil 133(defvar pascal-mode-syntax-table
134 (let ((st (make-syntax-table)))
135 (modify-syntax-entry ?\\ "." st)
136 (modify-syntax-entry ?\( "()1" st)
137 (modify-syntax-entry ?\) ")(4" st)
138 ;; This used to use comment-syntax `b'. But the only document I could
139 ;; find about the syntax of Pascal's comments said that (* ... } is
140 ;; a valid comment, just as { ... *) or (* ... *) or { ... }.
141 (modify-syntax-entry ?* ". 23" st)
142 (modify-syntax-entry ?{ "<" st)
143 (modify-syntax-entry ?} ">" st)
144 (modify-syntax-entry ?+ "." st)
145 (modify-syntax-entry ?- "." st)
146 (modify-syntax-entry ?= "." st)
147 (modify-syntax-entry ?% "." st)
148 (modify-syntax-entry ?< "." st)
149 (modify-syntax-entry ?> "." st)
150 (modify-syntax-entry ?& "." st)
151 (modify-syntax-entry ?| "." st)
152 (modify-syntax-entry ?_ "_" st)
153 (modify-syntax-entry ?\' "\"" st)
154 st)
136 "Syntax table in use in Pascal-mode buffers.") 155 "Syntax table in use in Pascal-mode buffers.")
137 156
138(if pascal-mode-syntax-table 157
139 ()
140 (setq pascal-mode-syntax-table (make-syntax-table))
141 (modify-syntax-entry ?\\ "." pascal-mode-syntax-table)
142 (modify-syntax-entry ?( "()1" pascal-mode-syntax-table)
143 (modify-syntax-entry ?) ")(4" pascal-mode-syntax-table)
144 (modify-syntax-entry ?* ". 23b" pascal-mode-syntax-table)
145 (modify-syntax-entry ?{ "<" pascal-mode-syntax-table)
146 (modify-syntax-entry ?} ">" pascal-mode-syntax-table)
147 (modify-syntax-entry ?+ "." pascal-mode-syntax-table)
148 (modify-syntax-entry ?- "." pascal-mode-syntax-table)
149 (modify-syntax-entry ?= "." pascal-mode-syntax-table)
150 (modify-syntax-entry ?% "." pascal-mode-syntax-table)
151 (modify-syntax-entry ?< "." pascal-mode-syntax-table)
152 (modify-syntax-entry ?> "." pascal-mode-syntax-table)
153 (modify-syntax-entry ?& "." pascal-mode-syntax-table)
154 (modify-syntax-entry ?| "." pascal-mode-syntax-table)
155 (modify-syntax-entry ?_ "_" pascal-mode-syntax-table)
156 (modify-syntax-entry ?\' "\"" pascal-mode-syntax-table))
157 158
158(defconst pascal-font-lock-keywords (purecopy 159(defconst pascal-font-lock-keywords (purecopy
159 (list 160 (list
@@ -327,7 +328,7 @@ Other useful functions are:
327\\[pascal-beg-of-defun]\t- Move to beginning of current function. 328\\[pascal-beg-of-defun]\t- Move to beginning of current function.
328\\[pascal-end-of-defun]\t- Move to end of current function. 329\\[pascal-end-of-defun]\t- Move to end of current function.
329\\[pascal-goto-defun]\t- Goto function prompted for in the minibuffer. 330\\[pascal-goto-defun]\t- Goto function prompted for in the minibuffer.
330\\[pascal-outline]\t- Enter pascal-outline-mode (see also pascal-outline). 331\\[pascal-outline-mode]\t- Enter `pascal-outline-mode'.
331 332
332Variables controlling indentation/edit style: 333Variables controlling indentation/edit style:
333 334
@@ -792,8 +793,7 @@ on the line which ends a function or procedure named NAME."
792(defun pascal-indent-command () 793(defun pascal-indent-command ()
793 "Indent for special part of code." 794 "Indent for special part of code."
794 (let* ((indent-str (pascal-calculate-indent)) 795 (let* ((indent-str (pascal-calculate-indent))
795 (type (car indent-str)) 796 (type (car indent-str)))
796 (ind (car (cdr indent-str))))
797 (cond ((and (eq type 'paramlist) 797 (cond ((and (eq type 'paramlist)
798 (or (memq 'all pascal-auto-lineup) 798 (or (memq 'all pascal-auto-lineup)
799 (memq 'paramlist pascal-auto-lineup))) 799 (memq 'paramlist pascal-auto-lineup)))
@@ -971,7 +971,7 @@ Do not count labels, case-statements or records."
971 (end-of-line) 971 (end-of-line)
972 (point-marker) 972 (point-marker)
973 (re-search-backward "\\<case\\>" nil t))) 973 (re-search-backward "\\<case\\>" nil t)))
974 (beg (point)) oldpos 974 (beg (point))
975 (ind 0)) 975 (ind 0))
976 ;; Get right indent 976 ;; Get right indent
977 (while (< (point) end) 977 (while (< (point) end)
@@ -986,7 +986,6 @@ Do not count labels, case-statements or records."
986 (setq ind (current-column))) 986 (setq ind (current-column)))
987 (pascal-end-of-statement)))) 987 (pascal-end-of-statement))))
988 (goto-char beg) 988 (goto-char beg)
989 (setq oldpos (marker-position end))
990 ;; Indent all case statements 989 ;; Indent all case statements
991 (while (< (point) end) 990 (while (< (point) end)
992 (if (re-search-forward 991 (if (re-search-forward
@@ -999,7 +998,6 @@ Do not count labels, case-statements or records."
999 (forward-char 1) 998 (forward-char 1)
1000 (delete-horizontal-space) 999 (delete-horizontal-space)
1001 (insert " ")) 1000 (insert " "))
1002 (setq oldpos (point))
1003 (pascal-end-of-statement)) 1001 (pascal-end-of-statement))
1004 (goto-char savepos))) 1002 (goto-char savepos)))
1005 1003
@@ -1490,30 +1488,20 @@ The default is a name found in the buffer around point."
1490;;; 1488;;;
1491;;; Pascal-outline-mode 1489;;; Pascal-outline-mode
1492;;; 1490;;;
1493(defvar pascal-outline-map nil "Keymap used in Pascal Outline mode.") 1491(defvar pascal-outline-map
1494 1492 (let ((map (make-sparse-keymap)))
1495(if pascal-outline-map 1493 (if (fboundp 'set-keymap-name)
1496 nil 1494 (set-keymap-name pascal-outline-map 'pascal-outline-map))
1497 (if (fboundp 'set-keymap-name) 1495 (define-key map "\M-\C-a" 'pascal-outline-prev-defun)
1498 (set-keymap-name pascal-outline-map 'pascal-outline-map)) 1496 (define-key map "\M-\C-e" 'pascal-outline-next-defun)
1499 (if (fboundp 'set-keymap-parent) 1497 (define-key map "\C-c\C-d" 'pascal-outline-goto-defun)
1500 (set-keymap-parent (setq pascal-outline-map (make-sparse-keymap)) 1498 (define-key map "\C-c\C-s" 'pascal-show-all)
1501 pascal-mode-map) 1499 (define-key map "\C-c\C-h" 'pascal-hide-other-defuns)
1502 (setq pascal-outline-map (copy-keymap pascal-mode-map))) 1500 map)
1503 (define-key pascal-outline-map "\M-\C-a" 'pascal-outline-prev-defun) 1501 "Keymap used in Pascal Outline mode.")
1504 (define-key pascal-outline-map "\M-\C-e" 'pascal-outline-next-defun) 1502
1505 (define-key pascal-outline-map "\C-c\C-d" 'pascal-outline-goto-defun) 1503(define-obsolete-function-alias 'pascal-outline 'pascal-outline-mode)
1506 (define-key pascal-outline-map "\C-c\C-s" 'pascal-show-all) 1504(define-minor-mode pascal-outline-mode
1507 (define-key pascal-outline-map "\C-c\C-h" 'pascal-hide-other-defuns))
1508
1509(defvar pascal-outline-mode nil "Non-nil while using Pascal Outline mode.")
1510(make-variable-buffer-local 'pascal-outline-mode)
1511(set-default 'pascal-outline-mode nil)
1512(if (not (assoc 'pascal-outline-mode minor-mode-alist))
1513 (setq minor-mode-alist (append minor-mode-alist
1514 (list '(pascal-outline-mode " Outl")))))
1515
1516(defun pascal-outline (&optional arg)
1517 "Outline-line minor mode for Pascal mode. 1505 "Outline-line minor mode for Pascal mode.
1518When in Pascal Outline mode, portions 1506When in Pascal Outline mode, portions
1519of the text being edited may be made invisible. \\<pascal-outline-map> 1507of the text being edited may be made invisible. \\<pascal-outline-map>
@@ -1531,26 +1519,26 @@ Pascal Outline mode provides some additional commands.
1531\\[pascal-hide-other-defuns]\ 1519\\[pascal-hide-other-defuns]\
1532\t- Hide everything but the current function (function under the cursor). 1520\t- Hide everything but the current function (function under the cursor).
1533\\[pascal-outline]\t- Leave pascal-outline-mode." 1521\\[pascal-outline]\t- Leave pascal-outline-mode."
1534 (interactive "P") 1522 :init-value nil :lighter " Outl" :keymap pascal-outline-map
1535 (setq pascal-outline-mode 1523 (add-to-invisibility-spec '(pascal . t))
1536 (if (null arg) (not pascal-outline-mode) t)) 1524 (unless pascal-outline-mode
1537 (if (fboundp 'redraw-mode-line) 1525 (pascal-show-all)))
1538 (redraw-mode-line))
1539 (if pascal-outline-mode
1540 (progn
1541 (setq selective-display t)
1542 (use-local-map pascal-outline-map))
1543 (progn
1544 (setq selective-display nil)
1545 (pascal-show-all)
1546 (use-local-map pascal-mode-map))))
1547 1526
1548(defun pascal-outline-change (b e pascal-flag) 1527(defun pascal-outline-change (b e pascal-flag)
1549 (let ((modp (buffer-modified-p))) 1528 (save-excursion
1550 (unwind-protect 1529 ;; This used to use selective display so the boundaries used by the
1551 (subst-char-in-region b e (if (= pascal-flag ?\n) 1530 ;; callers didn't have to be precise, since it just looked for \n or \^M
1552 ?\^M ?\n) pascal-flag) 1531 ;; and switched them.
1553 (set-buffer-modified-p modp)))) 1532 (goto-char b) (setq b (line-end-position))
1533 (goto-char e) (setq e (line-end-position)))
1534 (when (> e b)
1535 ;; We could try and optimize this in the case where the region is
1536 ;; already hidden. But I'm not sure it's worth the trouble.
1537 (remove-overlays b e 'invisible 'pascal)
1538 (when (eq pascal-flag ?\^M)
1539 (let ((ol (make-overlay b e nil t nil)))
1540 (overlay-put ol 'invisible 'pascal)
1541 (overlay-put ol 'evaporate t)))))
1554 1542
1555(defun pascal-show-all () 1543(defun pascal-show-all ()
1556 "Show all of the text in the buffer." 1544 "Show all of the text in the buffer."
@@ -1628,5 +1616,5 @@ Pascal Outline mode provides some additional commands.
1628 1616
1629(provide 'pascal) 1617(provide 'pascal)
1630 1618
1631;;; arch-tag: 04535136-fd93-40b4-a505-c9bebdc051f5 1619;; arch-tag: 04535136-fd93-40b4-a505-c9bebdc051f5
1632;;; pascal.el ends here 1620;;; pascal.el ends here
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 8af9b637b0b..b8c425428b5 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -3392,7 +3392,7 @@ t means to return a list of all possible completions of STRING.
3392 "Insert code to setup temporary file handling. See `sh-feature'." 3392 "Insert code to setup temporary file handling. See `sh-feature'."
3393 (bash sh-append ksh88) 3393 (bash sh-append ksh88)
3394 (csh (file-name-nondirectory (buffer-file-name)) 3394 (csh (file-name-nondirectory (buffer-file-name))
3395 "set tmp = /tmp/" str ".$$" \n 3395 "set tmp = `mktemp -t " str ".XXXXXX`" \n
3396 "onintr exit" \n _ 3396 "onintr exit" \n _
3397 (and (goto-char (point-max)) 3397 (and (goto-char (point-max))
3398 (not (bolp)) 3398 (not (bolp))
@@ -3400,8 +3400,8 @@ t means to return a list of all possible completions of STRING.
3400 "exit:\n" 3400 "exit:\n"
3401 "rm $tmp* >&/dev/null" > \n) 3401 "rm $tmp* >&/dev/null" > \n)
3402 (es (file-name-nondirectory (buffer-file-name)) 3402 (es (file-name-nondirectory (buffer-file-name))
3403 > "local( signals = $signals sighup sigint; tmp = /tmp/" str 3403 > "local( signals = $signals sighup sigint;" \n
3404 ".$pid ) {" \n 3404 > "tmp = `{ mktemp -t " str ".XXXXXX } ) {" \n
3405 > "catch @ e {" \n 3405 > "catch @ e {" \n
3406 > "rm $tmp^* >[2]/dev/null" \n 3406 > "rm $tmp^* >[2]/dev/null" \n
3407 "throw $e" \n 3407 "throw $e" \n
@@ -3412,10 +3412,10 @@ t means to return a list of all possible completions of STRING.
3412 (ksh88 sh-modify sh 3412 (ksh88 sh-modify sh
3413 7 "EXIT") 3413 7 "EXIT")
3414 (rc (file-name-nondirectory (buffer-file-name)) 3414 (rc (file-name-nondirectory (buffer-file-name))
3415 > "tmp = /tmp/" str ".$pid" \n 3415 > "tmp = `{ mktemp -t " str ".XXXXXX }" \n
3416 "fn sigexit { rm $tmp^* >[2]/dev/null }" \n) 3416 "fn sigexit { rm $tmp^* >[2]/dev/null }" \n)
3417 (sh (file-name-nondirectory (buffer-file-name)) 3417 (sh (file-name-nondirectory (buffer-file-name))
3418 > "TMP=${TMPDIR:-/tmp}/" str ".$$" \n 3418 > "TMP=`mktemp -t " str ".XXXXXX`" \n
3419 "trap \"rm $TMP* 2>/dev/null\" " ?0 \n)) 3419 "trap \"rm $TMP* 2>/dev/null\" " ?0 \n))
3420 3420
3421 3421
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 8f2dcc7cf1f..ed64de4c89c 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -142,6 +142,8 @@
142(defvar lazy-lock-defer-contextually) 142(defvar lazy-lock-defer-contextually)
143(defvar lazy-lock-defer-on-scrolling) 143(defvar lazy-lock-defer-on-scrolling)
144(defvar lazy-lock-defer-on-the-fly) 144(defvar lazy-lock-defer-on-the-fly)
145(defvar speedbar-attached-frame)
146
145 147
146;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 148;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
147;;; Variables 149;;; Variables