diff options
| author | Miles Bader | 2005-06-06 02:39:45 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-06-06 02:39:45 +0000 |
| commit | fdffd346262841cb194225ea0acd8059c57ec2d4 (patch) | |
| tree | d8b3699131f7d1b94bc46c7d8be62af6b8b5ebfe /lisp/progmodes | |
| parent | a5c508fe3a3f456c987283156315d0384d38fe9e (diff) | |
| parent | a9b4333620eb259e974445066a8e64cee0c21d69 (diff) | |
| download | emacs-fdffd346262841cb194225ea0acd8059c57ec2d4.tar.gz emacs-fdffd346262841cb194225ea0acd8059c57ec2d4.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 324-352)
- Merge from gnus--rel--5.10
- Update from CVS
- etc/emacs-buffer.gdb: Remove RCS keywords
* gnus--rel--5.10 (patch 70-79)
- Update from CVS
- Merge from emacs--cvs-trunk--0
Diffstat (limited to 'lisp/progmodes')
28 files changed, 302 insertions, 205 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index d31978b5ec9..bc0edb1f047 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el | |||
| @@ -1369,7 +1369,7 @@ If you use ada-xref.el: | |||
| 1369 | (min ada-indent (current-column)))))) | 1369 | (min ada-indent (current-column)))))) |
| 1370 | (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t) | 1370 | (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t) |
| 1371 | 1371 | ||
| 1372 | (run-hooks 'ada-mode-hook) | 1372 | (run-mode-hooks 'ada-mode-hook) |
| 1373 | 1373 | ||
| 1374 | ;; To be run after the hook, in case the user modified | 1374 | ;; To be run after the hook, in case the user modified |
| 1375 | ;; ada-fill-comment-prefix | 1375 | ;; ada-fill-comment-prefix |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 03587577f59..bdf376bfab7 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -2624,7 +2624,7 @@ the default language." | |||
| 2624 | (imenu-add-to-menubar | 2624 | (imenu-add-to-menubar |
| 2625 | (if (stringp antlr-imenu-name) antlr-imenu-name "Index"))) | 2625 | (if (stringp antlr-imenu-name) antlr-imenu-name "Index"))) |
| 2626 | (antlr-set-tabs) | 2626 | (antlr-set-tabs) |
| 2627 | (run-hooks 'antlr-mode-hook)) | 2627 | (run-mode-hooks 'antlr-mode-hook)) |
| 2628 | 2628 | ||
| 2629 | ;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in | 2629 | ;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in |
| 2630 | ;; XEmacs) could use the following property. The header of the submenu would | 2630 | ;; XEmacs) could use the following property. The header of the submenu would |
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el index ec83e33b10d..908b18b070b 100644 --- a/lisp/progmodes/autoconf.el +++ b/lisp/progmodes/autoconf.el | |||
| @@ -103,7 +103,7 @@ searching backwards at another AC_... command." | |||
| 103 | (set (make-local-variable 'indent-line-function) #'indent-relative) | 103 | (set (make-local-variable 'indent-line-function) #'indent-relative) |
| 104 | (set (make-local-variable 'add-log-current-defun-function) | 104 | (set (make-local-variable 'add-log-current-defun-function) |
| 105 | #'autoconf-current-defun-function) | 105 | #'autoconf-current-defun-function) |
| 106 | (run-hooks 'autoconf-mode-hook)) | 106 | (run-mode-hooks 'autoconf-mode-hook)) |
| 107 | 107 | ||
| 108 | (provide 'autoconf-mode) | 108 | (provide 'autoconf-mode) |
| 109 | 109 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ad43228a100..a27a5282b42 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -231,9 +231,9 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 231 | 231 | ||
| 232 | (makepp | 232 | (makepp |
| 233 | "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ | 233 | "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ |
| 234 | `\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'\\)" | 234 | `\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)" |
| 235 | 4 5 nil (1 . 2) 3 | 235 | 4 5 nil (1 . 2) 3 |
| 236 | ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil | 236 | ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil |
| 237 | (2 compilation-info-face) | 237 | (2 compilation-info-face) |
| 238 | (3 compilation-line-face nil t) | 238 | (3 compilation-line-face nil t) |
| 239 | (1 (compilation-error-properties 2 3 nil nil nil 0 nil) | 239 | (1 (compilation-error-properties 2 3 nil nil nil 0 nil) |
| @@ -935,12 +935,20 @@ Returns the compilation buffer created." | |||
| 935 | (substitute-env-vars (match-string 1 command)) | 935 | (substitute-env-vars (match-string 1 command)) |
| 936 | "~") | 936 | "~") |
| 937 | default-directory)) | 937 | default-directory)) |
| 938 | ;; Select the desired mode. | ||
| 939 | (if (not (eq mode t)) | ||
| 940 | (funcall mode) | ||
| 941 | (setq buffer-read-only nil) | ||
| 942 | (with-no-warnings (comint-mode)) | ||
| 943 | (compilation-shell-minor-mode)) | ||
| 944 | (if highlight-regexp | ||
| 945 | (set (make-local-variable 'compilation-highlight-regexp) | ||
| 946 | highlight-regexp)) | ||
| 938 | (erase-buffer) | 947 | (erase-buffer) |
| 939 | ;; output a mode setter, for saving and later reloading this buffer | 948 | ;; Output a mode setter, for saving and later reloading this buffer. |
| 940 | (insert "-*- mode: " name-of-mode | 949 | (insert "-*- mode: " name-of-mode |
| 941 | "; default-directory: " (prin1-to-string default-directory) | 950 | "; default-directory: " (prin1-to-string default-directory) |
| 942 | " -*-\n" command "\n") | 951 | " -*-\n" command "\n") (setq thisdir default-directory)) |
| 943 | (setq thisdir default-directory)) | ||
| 944 | (set-buffer-modified-p nil)) | 952 | (set-buffer-modified-p nil)) |
| 945 | ;; If we're already in the compilation buffer, go to the end | 953 | ;; If we're already in the compilation buffer, go to the end |
| 946 | ;; of the buffer, so point will track the compilation output. | 954 | ;; of the buffer, so point will track the compilation output. |
| @@ -963,14 +971,6 @@ Returns the compilation buffer created." | |||
| 963 | ;; don't override users' setting of $EMACS. | 971 | ;; don't override users' setting of $EMACS. |
| 964 | (unless (getenv "EMACS") '("EMACS=t")) | 972 | (unless (getenv "EMACS") '("EMACS=t")) |
| 965 | (copy-sequence process-environment)))) | 973 | (copy-sequence process-environment)))) |
| 966 | (if (not (eq mode t)) | ||
| 967 | (funcall mode) | ||
| 968 | (setq buffer-read-only nil) | ||
| 969 | (with-no-warnings (comint-mode)) | ||
| 970 | (compilation-shell-minor-mode)) | ||
| 971 | (if highlight-regexp | ||
| 972 | (set (make-local-variable 'compilation-highlight-regexp) | ||
| 973 | highlight-regexp)) | ||
| 974 | (set (make-local-variable 'compilation-arguments) | 974 | (set (make-local-variable 'compilation-arguments) |
| 975 | (list command mode name-function highlight-regexp)) | 975 | (list command mode name-function highlight-regexp)) |
| 976 | (set (make-local-variable 'revert-buffer-function) | 976 | (set (make-local-variable 'revert-buffer-function) |
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index b52e004e5bb..0a89091165c 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -641,7 +641,7 @@ There is some minimal font-lock support (see vars | |||
| 641 | (setq mode-name "DCL") | 641 | (setq mode-name "DCL") |
| 642 | (use-local-map dcl-mode-map) | 642 | (use-local-map dcl-mode-map) |
| 643 | (tempo-use-tag-list 'dcl-tempo-tags) | 643 | (tempo-use-tag-list 'dcl-tempo-tags) |
| 644 | (run-hooks 'dcl-mode-hook)) | 644 | (run-mode-hooks 'dcl-mode-hook)) |
| 645 | 645 | ||
| 646 | 646 | ||
| 647 | ;;; *** Movement commands *************************************************** | 647 | ;;; *** Movement commands *************************************************** |
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 8d3ee554026..3d86f15c175 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el | |||
| @@ -2002,7 +2002,7 @@ no args, if that value is non-nil." | |||
| 2002 | (delphi-parse-region (point-min) (point-max)) | 2002 | (delphi-parse-region (point-min) (point-max)) |
| 2003 | (delphi-progress-done)))) | 2003 | (delphi-progress-done)))) |
| 2004 | 2004 | ||
| 2005 | (run-hooks 'delphi-mode-hook)) | 2005 | (run-mode-hooks 'delphi-mode-hook)) |
| 2006 | 2006 | ||
| 2007 | ;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41 | 2007 | ;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41 |
| 2008 | ;;; delphi.el ends here | 2008 | ;;; delphi.el ends here |
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 6dd15897e7b..953ecd79f7f 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el | |||
| @@ -1162,7 +1162,7 @@ Tree mode key bindings: | |||
| 1162 | (when tree | 1162 | (when tree |
| 1163 | (ebrowse-redraw-tree) | 1163 | (ebrowse-redraw-tree) |
| 1164 | (set-buffer-modified-p nil)) | 1164 | (set-buffer-modified-p nil)) |
| 1165 | (run-hooks 'ebrowse-tree-mode-hook))) | 1165 | (run-mode-hooks 'ebrowse-tree-mode-hook))) |
| 1166 | 1166 | ||
| 1167 | 1167 | ||
| 1168 | 1168 | ||
| @@ -2026,7 +2026,7 @@ COLLAPSE non-nil means collapse the branch." | |||
| 2026 | truncate-lines t | 2026 | truncate-lines t |
| 2027 | buffer-read-only t | 2027 | buffer-read-only t |
| 2028 | major-mode 'ebrowse-electric-list-mode) | 2028 | major-mode 'ebrowse-electric-list-mode) |
| 2029 | (run-hooks 'ebrowse-electric-list-mode-hook)) | 2029 | (run-mode-hooks 'ebrowse-electric-list-mode-hook)) |
| 2030 | 2030 | ||
| 2031 | 2031 | ||
| 2032 | (defun ebrowse-list-tree-buffers () | 2032 | (defun ebrowse-list-tree-buffers () |
| @@ -2277,7 +2277,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION." | |||
| 2277 | ebrowse--const-display-flag nil | 2277 | ebrowse--const-display-flag nil |
| 2278 | ebrowse--pure-display-flag nil) | 2278 | ebrowse--pure-display-flag nil) |
| 2279 | (modify-syntax-entry ?_ (char-to-string (char-syntax ?a))) | 2279 | (modify-syntax-entry ?_ (char-to-string (char-syntax ?a))) |
| 2280 | (run-hooks 'ebrowse-member-mode-hook)) | 2280 | (run-mode-hooks 'ebrowse-member-mode-hook)) |
| 2281 | 2281 | ||
| 2282 | 2282 | ||
| 2283 | 2283 | ||
| @@ -3987,7 +3987,7 @@ Runs the hook `ebrowse-electric-position-mode-hook'." | |||
| 3987 | truncate-lines t | 3987 | truncate-lines t |
| 3988 | buffer-read-only t | 3988 | buffer-read-only t |
| 3989 | major-mode 'ebrowse-electric-position-mode) | 3989 | major-mode 'ebrowse-electric-position-mode) |
| 3990 | (run-hooks 'ebrowse-electric-position-mode-hook)) | 3990 | (run-mode-hooks 'ebrowse-electric-position-mode-hook)) |
| 3991 | 3991 | ||
| 3992 | 3992 | ||
| 3993 | (defun ebrowse-draw-position-buffer () | 3993 | (defun ebrowse-draw-position-buffer () |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index eb6db05c159..6eb39051984 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -830,7 +830,7 @@ with no args, if that value is non-nil." | |||
| 830 | (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram) | 830 | (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram) |
| 831 | (set (make-local-variable 'add-log-current-defun-function) | 831 | (set (make-local-variable 'add-log-current-defun-function) |
| 832 | #'f90-current-defun) | 832 | #'f90-current-defun) |
| 833 | (run-hooks 'f90-mode-hook)) | 833 | (run-mode-hooks 'f90-mode-hook)) |
| 834 | 834 | ||
| 835 | 835 | ||
| 836 | ;; Inline-functions. | 836 | ;; Inline-functions. |
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 30e1977d28d..458a4c8de2b 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -799,7 +799,7 @@ with no args, if that value is non-nil." | |||
| 799 | #'fortran-current-defun) | 799 | #'fortran-current-defun) |
| 800 | (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search) | 800 | (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search) |
| 801 | (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr) | 801 | (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr) |
| 802 | (run-hooks 'fortran-mode-hook)) | 802 | (run-mode-hooks 'fortran-mode-hook)) |
| 803 | 803 | ||
| 804 | 804 | ||
| 805 | (defun fortran-gud-find-expr () | 805 | (defun fortran-gud-find-expr () |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 1a26b64beca..7e2022cc11c 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -66,15 +66,16 @@ | |||
| 66 | 66 | ||
| 67 | (require 'gud) | 67 | (require 'gud) |
| 68 | 68 | ||
| 69 | (defvar gdb-current-address "main" "Initialisation for Assembler buffer.") | 69 | (defvar gdb-frame-address "main" "Initialisation for Assembler buffer.") |
| 70 | (defvar gdb-previous-address nil) | 70 | (defvar gdb-previous-frame-address nil) |
| 71 | (defvar gdb-memory-address "main") | 71 | (defvar gdb-memory-address "main") |
| 72 | (defvar gdb-previous-frame nil) | 72 | (defvar gdb-previous-frame nil) |
| 73 | (defvar gdb-current-frame nil) | 73 | (defvar gdb-selected-frame nil) |
| 74 | (defvar gdb-current-stack-level nil) | 74 | (defvar gdb-frame-number nil) |
| 75 | (defvar gdb-current-language nil) | 75 | (defvar gdb-current-language nil) |
| 76 | (defvar gdb-var-list nil "List of variables in watch window.") | 76 | (defvar gdb-var-list nil "List of variables in watch window.") |
| 77 | (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") | 77 | (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") |
| 78 | (defvar gdb-main-file nil "Source file from which program execution begins.") | ||
| 78 | (defvar gdb-buffer-type nil) | 79 | (defvar gdb-buffer-type nil) |
| 79 | (defvar gdb-overlay-arrow-position nil) | 80 | (defvar gdb-overlay-arrow-position nil) |
| 80 | (defvar gdb-server-prefix nil) | 81 | (defvar gdb-server-prefix nil) |
| @@ -211,11 +212,18 @@ predefined macros." | |||
| 211 | :version "22.1") | 212 | :version "22.1") |
| 212 | 213 | ||
| 213 | (defcustom gdb-cpp-define-alist-flags "" | 214 | (defcustom gdb-cpp-define-alist-flags "" |
| 214 | "*Preprocessor flags for `gdb-cpp-define-alist-program'." | 215 | "Preprocessor flags for `gdb-cpp-define-alist-program'." |
| 215 | :type 'string | 216 | :type 'string |
| 216 | :group 'gud | 217 | :group 'gud |
| 217 | :version "22.1") | 218 | :version "22.1") |
| 218 | 219 | ||
| 220 | (defcustom gdb-show-main nil | ||
| 221 | "Non-nil means display source file containing the main routine at startup. | ||
| 222 | Also display the main routine in the disassembly buffer if present." | ||
| 223 | :type 'boolean | ||
| 224 | :group 'gud | ||
| 225 | :version "22.1") | ||
| 226 | |||
| 219 | (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") | 227 | (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") |
| 220 | 228 | ||
| 221 | (defun gdb-create-define-alist () | 229 | (defun gdb-create-define-alist () |
| @@ -269,7 +277,7 @@ predefined macros." | |||
| 269 | (defun gdb-set-gud-minor-mode-1 (buffer) | 277 | (defun gdb-set-gud-minor-mode-1 (buffer) |
| 270 | (goto-char (point-min)) | 278 | (goto-char (point-min)) |
| 271 | (when (and (search-forward "Located in " nil t) | 279 | (when (and (search-forward "Located in " nil t) |
| 272 | (looking-at "\\S-*") | 280 | (looking-at "\\S-+") |
| 273 | (string-equal (buffer-file-name buffer) | 281 | (string-equal (buffer-file-name buffer) |
| 274 | (match-string 0))) | 282 | (match-string 0))) |
| 275 | (with-current-buffer buffer | 283 | (with-current-buffer buffer |
| @@ -295,7 +303,7 @@ predefined macros." | |||
| 295 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 303 | (set (make-local-variable 'gud-minor-mode) 'gdba) |
| 296 | (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) | 304 | (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) |
| 297 | ;; | 305 | ;; |
| 298 | (gud-def gud-break (if (not (string-equal mode-name "Machine")) | 306 | (gud-def gud-break (if (not (string-match "Machine" mode-name)) |
| 299 | (gud-call "break %f:%l" arg) | 307 | (gud-call "break %f:%l" arg) |
| 300 | (save-excursion | 308 | (save-excursion |
| 301 | (beginning-of-line) | 309 | (beginning-of-line) |
| @@ -303,7 +311,7 @@ predefined macros." | |||
| 303 | (gud-call "break *%a" arg))) | 311 | (gud-call "break *%a" arg))) |
| 304 | "\C-b" "Set breakpoint at current line or address.") | 312 | "\C-b" "Set breakpoint at current line or address.") |
| 305 | ;; | 313 | ;; |
| 306 | (gud-def gud-remove (if (not (string-equal mode-name "Machine")) | 314 | (gud-def gud-remove (if (not (string-match "Machine" mode-name)) |
| 307 | (gud-call "clear %f:%l" arg) | 315 | (gud-call "clear %f:%l" arg) |
| 308 | (save-excursion | 316 | (save-excursion |
| 309 | (beginning-of-line) | 317 | (beginning-of-line) |
| @@ -311,7 +319,7 @@ predefined macros." | |||
| 311 | (gud-call "clear *%a" arg))) | 319 | (gud-call "clear *%a" arg))) |
| 312 | "\C-d" "Remove breakpoint at current line or address.") | 320 | "\C-d" "Remove breakpoint at current line or address.") |
| 313 | ;; | 321 | ;; |
| 314 | (gud-def gud-until (if (not (string-equal mode-name "Machine")) | 322 | (gud-def gud-until (if (not (string-match "Machine" mode-name)) |
| 315 | (gud-call "until %f:%l" arg) | 323 | (gud-call "until %f:%l" arg) |
| 316 | (save-excursion | 324 | (save-excursion |
| 317 | (beginning-of-line) | 325 | (beginning-of-line) |
| @@ -332,25 +340,26 @@ predefined macros." | |||
| 332 | (setq comint-input-sender 'gdb-send) | 340 | (setq comint-input-sender 'gdb-send) |
| 333 | ;; | 341 | ;; |
| 334 | ;; (re-)initialize | 342 | ;; (re-)initialize |
| 335 | (setq gdb-current-address "main") | 343 | (setq gdb-frame-address (if gdb-show-main "main" nil)) |
| 336 | (setq gdb-previous-address nil) | 344 | (setq gdb-previous-frame-address nil |
| 337 | (setq gdb-memory-address "main") | 345 | gdb-memory-address "main" |
| 338 | (setq gdb-previous-frame nil) | 346 | gdb-previous-frame nil |
| 339 | (setq gdb-current-frame nil) | 347 | gdb-selected-frame nil |
| 340 | (setq gdb-current-stack-level nil) | 348 | gdb-current-language nil |
| 341 | (setq gdb-var-list nil) | 349 | gdb-frame-number nil |
| 342 | (setq gdb-var-changed nil) | 350 | gdb-var-list nil |
| 343 | (setq gdb-first-prompt nil) | 351 | gdb-var-changed nil |
| 344 | (setq gdb-prompting nil) | 352 | gdb-first-prompt nil |
| 345 | (setq gdb-input-queue nil) | 353 | gdb-prompting nil |
| 346 | (setq gdb-current-item nil) | 354 | gdb-input-queue nil |
| 347 | (setq gdb-pending-triggers nil) | 355 | gdb-current-item nil |
| 348 | (setq gdb-output-sink 'user) | 356 | gdb-pending-triggers nil |
| 349 | (setq gdb-server-prefix "server ") | 357 | gdb-output-sink 'user |
| 350 | (setq gdb-flush-pending-output nil) | 358 | gdb-server-prefix "server " |
| 351 | (setq gdb-location-alist nil) | 359 | gdb-flush-pending-output nil |
| 352 | (setq gdb-find-file-unhook nil) | 360 | gdb-location-alist nil |
| 353 | (setq gdb-macro-info nil) | 361 | gdb-find-file-unhook nil |
| 362 | gdb-macro-info nil) | ||
| 354 | ;; | 363 | ;; |
| 355 | (setq gdb-buffer-type 'gdba) | 364 | (setq gdb-buffer-type 'gdba) |
| 356 | ;; | 365 | ;; |
| @@ -380,8 +389,8 @@ predefined macros." | |||
| 380 | (require 'tooltip) | 389 | (require 'tooltip) |
| 381 | (let ((expr (tooltip-identifier-from-point (point)))) | 390 | (let ((expr (tooltip-identifier-from-point (point)))) |
| 382 | (if (and (string-equal gdb-current-language "c") | 391 | (if (and (string-equal gdb-current-language "c") |
| 383 | gdb-use-colon-colon-notation gdb-current-frame) | 392 | gdb-use-colon-colon-notation gdb-selected-frame) |
| 384 | (setq expr (concat gdb-current-frame "::" expr))) | 393 | (setq expr (concat gdb-selected-frame "::" expr))) |
| 385 | (catch 'already-watched | 394 | (catch 'already-watched |
| 386 | (dolist (var gdb-var-list) | 395 | (dolist (var gdb-var-list) |
| 387 | (if (string-equal expr (car var)) (throw 'already-watched nil))) | 396 | (if (string-equal expr (car var)) (throw 'already-watched nil))) |
| @@ -862,7 +871,7 @@ This filter may simply queue input for a later time." | |||
| 862 | (setq gdb-prompting t)) | 871 | (setq gdb-prompting t)) |
| 863 | 872 | ||
| 864 | (defconst gdb-source-spec-regexp | 873 | (defconst gdb-source-spec-regexp |
| 865 | "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)") | 874 | "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:0x0*\\([a-f0-9]*\\)") |
| 866 | 875 | ||
| 867 | ;; Do not use this except as an annotation handler. | 876 | ;; Do not use this except as an annotation handler. |
| 868 | (defun gdb-source (args) | 877 | (defun gdb-source (args) |
| @@ -872,7 +881,7 @@ This filter may simply queue input for a later time." | |||
| 872 | (cons | 881 | (cons |
| 873 | (match-string 1 args) | 882 | (match-string 1 args) |
| 874 | (string-to-number (match-string 2 args)))) | 883 | (string-to-number (match-string 2 args)))) |
| 875 | (setq gdb-current-address (match-string 3 args)) | 884 | (setq gdb-frame-address (match-string 3 args)) |
| 876 | ;; cover for auto-display output which comes *before* | 885 | ;; cover for auto-display output which comes *before* |
| 877 | ;; stopped annotation | 886 | ;; stopped annotation |
| 878 | (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) | 887 | (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) |
| @@ -985,10 +994,12 @@ sink to `user' in `gdb-stopping', that is fine." | |||
| 985 | This begins the collection of output from the current command if that | 994 | This begins the collection of output from the current command if that |
| 986 | happens to be appropriate." | 995 | happens to be appropriate." |
| 987 | (unless gdb-pending-triggers | 996 | (unless gdb-pending-triggers |
| 988 | (gdb-get-current-frame) | 997 | (gdb-get-selected-frame) |
| 989 | (gdb-invalidate-frames) | 998 | (gdb-invalidate-frames) |
| 990 | (gdb-invalidate-breakpoints) | 999 | (gdb-invalidate-breakpoints) |
| 991 | (gdb-invalidate-assembler) | 1000 | ;; Do this through gdb-get-selected-frame -> gdb-frame-handler |
| 1001 | ;; so gdb-frame-address is updated. | ||
| 1002 | ;; (gdb-invalidate-assembler) | ||
| 992 | (gdb-invalidate-registers) | 1003 | (gdb-invalidate-registers) |
| 993 | (gdb-invalidate-memory) | 1004 | (gdb-invalidate-memory) |
| 994 | (gdb-invalidate-locals) | 1005 | (gdb-invalidate-locals) |
| @@ -1150,12 +1161,12 @@ happens to be appropriate." | |||
| 1150 | (let ((buf (gdb-get-buffer ',buf-key))) | 1161 | (let ((buf (gdb-get-buffer ',buf-key))) |
| 1151 | (and buf | 1162 | (and buf |
| 1152 | (with-current-buffer buf | 1163 | (with-current-buffer buf |
| 1153 | (let ((p (point)) | 1164 | (let ((p (window-point (get-buffer-window buf 0))) |
| 1154 | (buffer-read-only nil)) | 1165 | (buffer-read-only nil)) |
| 1155 | (erase-buffer) | 1166 | (erase-buffer) |
| 1156 | (insert-buffer-substring (gdb-get-create-buffer | 1167 | (insert-buffer-substring (gdb-get-create-buffer |
| 1157 | 'gdb-partial-output-buffer)) | 1168 | 'gdb-partial-output-buffer)) |
| 1158 | (goto-char p))))) | 1169 | (set-window-point (get-buffer-window buf 0) p))))) |
| 1159 | ;; put customisation here | 1170 | ;; put customisation here |
| 1160 | (,custom-defun))) | 1171 | (,custom-defun))) |
| 1161 | 1172 | ||
| @@ -1293,7 +1304,7 @@ static char *magick[] = { | |||
| 1293 | (goto-char (point-min)) | 1304 | (goto-char (point-min)) |
| 1294 | (while (< (point) (- (point-max) 1)) | 1305 | (while (< (point) (- (point-max) 1)) |
| 1295 | (forward-line 1) | 1306 | (forward-line 1) |
| 1296 | (if (looking-at "[^\t].*breakpoint") | 1307 | (if (looking-at "[^\t].*?breakpoint") |
| 1297 | (progn | 1308 | (progn |
| 1298 | (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)") | 1309 | (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)") |
| 1299 | (setq bptno (match-string 1)) | 1310 | (setq bptno (match-string 1)) |
| @@ -1435,9 +1446,9 @@ static char *magick[] = { | |||
| 1435 | (save-excursion | 1446 | (save-excursion |
| 1436 | (beginning-of-line 1) | 1447 | (beginning-of-line 1) |
| 1437 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 1448 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 1438 | (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") | 1449 | (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)\\s-+") |
| 1439 | (looking-at | 1450 | (looking-at |
| 1440 | "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+")) | 1451 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+\\S-+\\s-+\\S-+:[0-9]+")) |
| 1441 | (gdb-enqueue-input | 1452 | (gdb-enqueue-input |
| 1442 | (list | 1453 | (list |
| 1443 | (concat gdb-server-prefix | 1454 | (concat gdb-server-prefix |
| @@ -1452,9 +1463,9 @@ static char *magick[] = { | |||
| 1452 | (interactive) | 1463 | (interactive) |
| 1453 | (beginning-of-line 1) | 1464 | (beginning-of-line 1) |
| 1454 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 1465 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 1455 | (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") | 1466 | (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)") |
| 1456 | (looking-at | 1467 | (looking-at |
| 1457 | "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+")) | 1468 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+")) |
| 1458 | (gdb-enqueue-input | 1469 | (gdb-enqueue-input |
| 1459 | (list | 1470 | (list |
| 1460 | (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) | 1471 | (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) |
| @@ -1467,10 +1478,10 @@ static char *magick[] = { | |||
| 1467 | (save-excursion | 1478 | (save-excursion |
| 1468 | (beginning-of-line 1) | 1479 | (beginning-of-line 1) |
| 1469 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 1480 | (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 1470 | (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)") | 1481 | (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)") |
| 1471 | (looking-at | 1482 | (looking-at |
| 1472 | "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\ | 1483 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\ |
| 1473 | \\(\\S-*\\):\\([0-9]+\\)")) | 1484 | \\(\\S-+\\):\\([0-9]+\\)")) |
| 1474 | (let ((bptno (match-string 1)) | 1485 | (let ((bptno (match-string 1)) |
| 1475 | (file (match-string 2)) | 1486 | (file (match-string 2)) |
| 1476 | (line (match-string 3))) | 1487 | (line (match-string 3))) |
| @@ -1511,7 +1522,7 @@ static char *magick[] = { | |||
| 1511 | help-echo "mouse-2, RET: Select frame")) | 1522 | help-echo "mouse-2, RET: Select frame")) |
| 1512 | (beginning-of-line) | 1523 | (beginning-of-line) |
| 1513 | (when (and (looking-at "^#\\([0-9]+\\)") | 1524 | (when (and (looking-at "^#\\([0-9]+\\)") |
| 1514 | (equal (match-string 1) gdb-current-stack-level)) | 1525 | (equal (match-string 1) gdb-frame-number)) |
| 1515 | (put-text-property (line-beginning-position) (line-end-position) | 1526 | (put-text-property (line-beginning-position) (line-end-position) |
| 1516 | 'face '(:inverse-video t))) | 1527 | 'face '(:inverse-video t))) |
| 1517 | (forward-line 1)))))) | 1528 | (forward-line 1)))))) |
| @@ -1648,13 +1659,20 @@ static char *magick[] = { | |||
| 1648 | 1659 | ||
| 1649 | ;; Registers buffer. | 1660 | ;; Registers buffer. |
| 1650 | ;; | 1661 | ;; |
| 1662 | (defcustom gdb-all-registers nil | ||
| 1663 | "Non-nil means include floating-point registers." | ||
| 1664 | :type 'boolean | ||
| 1665 | :group 'gud | ||
| 1666 | :version "22.1") | ||
| 1667 | |||
| 1651 | (gdb-set-buffer-rules 'gdb-registers-buffer | 1668 | (gdb-set-buffer-rules 'gdb-registers-buffer |
| 1652 | 'gdb-registers-buffer-name | 1669 | 'gdb-registers-buffer-name |
| 1653 | 'gdb-registers-mode) | 1670 | 'gdb-registers-mode) |
| 1654 | 1671 | ||
| 1655 | (def-gdb-auto-updated-buffer gdb-registers-buffer | 1672 | (def-gdb-auto-updated-buffer gdb-registers-buffer |
| 1656 | gdb-invalidate-registers | 1673 | gdb-invalidate-registers |
| 1657 | (concat gdb-server-prefix "info registers\n") | 1674 | (concat |
| 1675 | gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n") | ||
| 1658 | gdb-info-registers-handler | 1676 | gdb-info-registers-handler |
| 1659 | gdb-info-registers-custom) | 1677 | gdb-info-registers-custom) |
| 1660 | 1678 | ||
| @@ -1663,6 +1681,7 @@ static char *magick[] = { | |||
| 1663 | (defvar gdb-registers-mode-map | 1681 | (defvar gdb-registers-mode-map |
| 1664 | (let ((map (make-sparse-keymap))) | 1682 | (let ((map (make-sparse-keymap))) |
| 1665 | (suppress-keymap map) | 1683 | (suppress-keymap map) |
| 1684 | (define-key map " " 'toggle-gdb-all-registers) | ||
| 1666 | (define-key map "q" 'kill-this-buffer) | 1685 | (define-key map "q" 'kill-this-buffer) |
| 1667 | map)) | 1686 | map)) |
| 1668 | 1687 | ||
| @@ -1672,7 +1691,7 @@ static char *magick[] = { | |||
| 1672 | \\{gdb-registers-mode-map}" | 1691 | \\{gdb-registers-mode-map}" |
| 1673 | (kill-all-local-variables) | 1692 | (kill-all-local-variables) |
| 1674 | (setq major-mode 'gdb-registers-mode) | 1693 | (setq major-mode 'gdb-registers-mode) |
| 1675 | (setq mode-name "Registers") | 1694 | (setq mode-name "Registers:") |
| 1676 | (setq buffer-read-only t) | 1695 | (setq buffer-read-only t) |
| 1677 | (use-local-map gdb-registers-mode-map) | 1696 | (use-local-map gdb-registers-mode-map) |
| 1678 | (run-mode-hooks 'gdb-registers-mode-hook) | 1697 | (run-mode-hooks 'gdb-registers-mode-hook) |
| @@ -1695,6 +1714,20 @@ static char *magick[] = { | |||
| 1695 | (special-display-frame-alist gdb-frame-parameters)) | 1714 | (special-display-frame-alist gdb-frame-parameters)) |
| 1696 | (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer)))) | 1715 | (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer)))) |
| 1697 | 1716 | ||
| 1717 | (defun toggle-gdb-all-registers () | ||
| 1718 | "Toggle the display of floating-point registers." | ||
| 1719 | (interactive) | ||
| 1720 | (if gdb-all-registers | ||
| 1721 | (progn | ||
| 1722 | (setq gdb-all-registers nil) | ||
| 1723 | (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) | ||
| 1724 | (setq mode-name "Registers:"))) | ||
| 1725 | (setq gdb-all-registers t) | ||
| 1726 | (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) | ||
| 1727 | (setq mode-name "Registers:All"))) | ||
| 1728 | (gdb-invalidate-registers)) | ||
| 1729 | |||
| 1730 | |||
| 1698 | ;; Memory buffer. | 1731 | ;; Memory buffer. |
| 1699 | ;; | 1732 | ;; |
| 1700 | (defcustom gdb-memory-repeat-count 32 | 1733 | (defcustom gdb-memory-repeat-count 32 |
| @@ -1733,7 +1766,11 @@ static char *magick[] = { | |||
| 1733 | gdb-read-memory-handler | 1766 | gdb-read-memory-handler |
| 1734 | gdb-read-memory-custom) | 1767 | gdb-read-memory-custom) |
| 1735 | 1768 | ||
| 1736 | (defun gdb-read-memory-custom ()) | 1769 | (defun gdb-read-memory-custom () |
| 1770 | (save-excursion | ||
| 1771 | (goto-char (point-min)) | ||
| 1772 | (if (looking-at "0x[[:xdigit:]]+") | ||
| 1773 | (setq gdb-memory-address (match-string 0))))) | ||
| 1737 | 1774 | ||
| 1738 | (defvar gdb-memory-mode-map | 1775 | (defvar gdb-memory-mode-map |
| 1739 | (let ((map (make-sparse-keymap))) | 1776 | (let ((map (make-sparse-keymap))) |
| @@ -1757,8 +1794,8 @@ static char *magick[] = { | |||
| 1757 | (select-window (posn-window (event-start event))) | 1794 | (select-window (posn-window (event-start event))) |
| 1758 | (let* ((arg (read-from-minibuffer "Repeat count: ")) | 1795 | (let* ((arg (read-from-minibuffer "Repeat count: ")) |
| 1759 | (count (string-to-number arg))) | 1796 | (count (string-to-number arg))) |
| 1760 | (if (< count 0) | 1797 | (if (<= count 0) |
| 1761 | (error "Non-negative numbers only") | 1798 | (error "Positive numbers only") |
| 1762 | (customize-set-variable 'gdb-memory-repeat-count count) | 1799 | (customize-set-variable 'gdb-memory-repeat-count count) |
| 1763 | (gdb-invalidate-memory))))) | 1800 | (gdb-invalidate-memory))))) |
| 1764 | 1801 | ||
| @@ -1911,10 +1948,42 @@ corresponding to the mode line clicked." | |||
| 1911 | (setq header-line-format | 1948 | (setq header-line-format |
| 1912 | '(:eval | 1949 | '(:eval |
| 1913 | (concat | 1950 | (concat |
| 1914 | "Read address: " | 1951 | "Read address[" |
| 1952 | (propertize | ||
| 1953 | "-" | ||
| 1954 | 'face font-lock-warning-face | ||
| 1955 | 'help-echo "mouse-1: Decrement address" | ||
| 1956 | 'mouse-face 'mode-line-highlight | ||
| 1957 | 'local-map | ||
| 1958 | (gdb-make-header-line-mouse-map | ||
| 1959 | 'mouse-1 | ||
| 1960 | #'(lambda () (interactive) | ||
| 1961 | (let ((gdb-memory-address | ||
| 1962 | ;; let GDB do the arithmetic | ||
| 1963 | (concat | ||
| 1964 | gdb-memory-address " - " | ||
| 1965 | (number-to-string | ||
| 1966 | (* gdb-memory-repeat-count | ||
| 1967 | (cond ((string= gdb-memory-unit "b") 1) | ||
| 1968 | ((string= gdb-memory-unit "h") 2) | ||
| 1969 | ((string= gdb-memory-unit "w") 4) | ||
| 1970 | ((string= gdb-memory-unit "g") 8))))))) | ||
| 1971 | (gdb-invalidate-memory))))) | ||
| 1972 | "|" | ||
| 1973 | (propertize "+" | ||
| 1974 | 'face font-lock-warning-face | ||
| 1975 | 'help-echo "mouse-1: Increment address" | ||
| 1976 | 'mouse-face 'mode-line-highlight | ||
| 1977 | 'local-map (gdb-make-header-line-mouse-map | ||
| 1978 | 'mouse-1 | ||
| 1979 | #'(lambda () (interactive) | ||
| 1980 | (let ((gdb-memory-address nil)) | ||
| 1981 | (gdb-invalidate-memory))))) | ||
| 1982 | "]: " | ||
| 1915 | (propertize gdb-memory-address | 1983 | (propertize gdb-memory-address |
| 1916 | 'face font-lock-warning-face | 1984 | 'face font-lock-warning-face |
| 1917 | 'help-echo "mouse-1: Set memory address" | 1985 | 'help-echo "mouse-1: Set memory address" |
| 1986 | 'mouse-face 'mode-line-highlight | ||
| 1918 | 'local-map (gdb-make-header-line-mouse-map | 1987 | 'local-map (gdb-make-header-line-mouse-map |
| 1919 | 'mouse-1 | 1988 | 'mouse-1 |
| 1920 | #'gdb-memory-set-address)) | 1989 | #'gdb-memory-set-address)) |
| @@ -1922,6 +1991,7 @@ corresponding to the mode line clicked." | |||
| 1922 | (propertize (number-to-string gdb-memory-repeat-count) | 1991 | (propertize (number-to-string gdb-memory-repeat-count) |
| 1923 | 'face font-lock-warning-face | 1992 | 'face font-lock-warning-face |
| 1924 | 'help-echo "mouse-1: Set repeat count" | 1993 | 'help-echo "mouse-1: Set repeat count" |
| 1994 | 'mouse-face 'mode-line-highlight | ||
| 1925 | 'local-map (gdb-make-header-line-mouse-map | 1995 | 'local-map (gdb-make-header-line-mouse-map |
| 1926 | 'mouse-1 | 1996 | 'mouse-1 |
| 1927 | #'gdb-memory-set-repeat-count)) | 1997 | #'gdb-memory-set-repeat-count)) |
| @@ -1929,11 +1999,13 @@ corresponding to the mode line clicked." | |||
| 1929 | (propertize gdb-memory-format | 1999 | (propertize gdb-memory-format |
| 1930 | 'face font-lock-warning-face | 2000 | 'face font-lock-warning-face |
| 1931 | 'help-echo "mouse-3: Select display format" | 2001 | 'help-echo "mouse-3: Select display format" |
| 2002 | 'mouse-face 'mode-line-highlight | ||
| 1932 | 'local-map gdb-memory-format-keymap) | 2003 | 'local-map gdb-memory-format-keymap) |
| 1933 | " Unit Size: " | 2004 | " Unit Size: " |
| 1934 | (propertize gdb-memory-unit | 2005 | (propertize gdb-memory-unit |
| 1935 | 'face font-lock-warning-face | 2006 | 'face font-lock-warning-face |
| 1936 | 'help-echo "mouse-3: Select unit size" | 2007 | 'help-echo "mouse-3: Select unit size" |
| 2008 | 'mouse-face 'mode-line-highlight | ||
| 1937 | 'local-map gdb-memory-unit-keymap)))) | 2009 | 'local-map gdb-memory-unit-keymap)))) |
| 1938 | (run-mode-hooks 'gdb-memory-mode-hook) | 2010 | (run-mode-hooks 'gdb-memory-mode-hook) |
| 1939 | 'gdb-invalidate-memory) | 2011 | 'gdb-invalidate-memory) |
| @@ -1986,12 +2058,12 @@ corresponding to the mode line clicked." | |||
| 1986 | (replace-match " (array);\n" nil nil)))) | 2058 | (replace-match " (array);\n" nil nil)))) |
| 1987 | (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) | 2059 | (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) |
| 1988 | (and buf (with-current-buffer buf | 2060 | (and buf (with-current-buffer buf |
| 1989 | (let ((p (point)) | 2061 | (let ((p (window-point (get-buffer-window buf 0))) |
| 1990 | (buffer-read-only nil)) | 2062 | (buffer-read-only nil)) |
| 1991 | (delete-region (point-min) (point-max)) | 2063 | (erase-buffer) |
| 1992 | (insert-buffer-substring (gdb-get-create-buffer | 2064 | (insert-buffer-substring (gdb-get-create-buffer |
| 1993 | 'gdb-partial-output-buffer)) | 2065 | 'gdb-partial-output-buffer)) |
| 1994 | (goto-char p))))) | 2066 | (set-window-point (get-buffer-window buf 0) p))))) |
| 1995 | (run-hooks 'gdb-info-locals-hook)) | 2067 | (run-hooks 'gdb-info-locals-hook)) |
| 1996 | 2068 | ||
| 1997 | (defun gdb-info-locals-custom () | 2069 | (defun gdb-info-locals-custom () |
| @@ -2009,7 +2081,7 @@ corresponding to the mode line clicked." | |||
| 2009 | \\{gdb-locals-mode-map}" | 2081 | \\{gdb-locals-mode-map}" |
| 2010 | (kill-all-local-variables) | 2082 | (kill-all-local-variables) |
| 2011 | (setq major-mode 'gdb-locals-mode) | 2083 | (setq major-mode 'gdb-locals-mode) |
| 2012 | (setq mode-name (concat "Locals:" gdb-current-frame)) | 2084 | (setq mode-name (concat "Locals:" gdb-selected-frame)) |
| 2013 | (setq buffer-read-only t) | 2085 | (setq buffer-read-only t) |
| 2014 | (use-local-map gdb-locals-mode-map) | 2086 | (use-local-map gdb-locals-mode-map) |
| 2015 | (run-mode-hooks 'gdb-locals-mode-hook) | 2087 | (run-mode-hooks 'gdb-locals-mode-hook) |
| @@ -2069,7 +2141,8 @@ corresponding to the mode line clicked." | |||
| 2069 | (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) | 2141 | (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) |
| 2070 | (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) | 2142 | (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) |
| 2071 | (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) | 2143 | (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) |
| 2072 | (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) | 2144 | (define-key menu [disassembly] |
| 2145 | '("Disassembly" . gdb-display-assembler-buffer)) | ||
| 2073 | (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) | 2146 | (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) |
| 2074 | (define-key menu [inferior] | 2147 | (define-key menu [inferior] |
| 2075 | '(menu-item "Inferior IO" gdb-display-inferior-io-buffer | 2148 | '(menu-item "Inferior IO" gdb-display-inferior-io-buffer |
| @@ -2086,7 +2159,7 @@ corresponding to the mode line clicked." | |||
| 2086 | (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) | 2159 | (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) |
| 2087 | (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) | 2160 | (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) |
| 2088 | (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) | 2161 | (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) |
| 2089 | (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) | 2162 | (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) |
| 2090 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) | 2163 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) |
| 2091 | (define-key menu [inferior] | 2164 | (define-key menu [inferior] |
| 2092 | '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer | 2165 | '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer |
| @@ -2129,14 +2202,6 @@ corresponding to the mode line clicked." | |||
| 2129 | (gdb-display-buffer | 2202 | (gdb-display-buffer |
| 2130 | (gdb-get-create-buffer 'gdba))) | 2203 | (gdb-get-create-buffer 'gdba))) |
| 2131 | 2204 | ||
| 2132 | (defvar gdb-main-file nil "Source file from which program execution begins.") | ||
| 2133 | |||
| 2134 | (defcustom gdb-show-main nil | ||
| 2135 | "Nil means don't display source file containing the main routine." | ||
| 2136 | :type 'boolean | ||
| 2137 | :group 'gud | ||
| 2138 | :version "22.1") | ||
| 2139 | |||
| 2140 | (defun gdb-set-window-buffer (name) | 2205 | (defun gdb-set-window-buffer (name) |
| 2141 | (set-window-buffer (selected-window) (get-buffer name)) | 2206 | (set-window-buffer (selected-window) (get-buffer name)) |
| 2142 | (set-window-dedicated-p (selected-window) t)) | 2207 | (set-window-dedicated-p (selected-window) t)) |
| @@ -2236,7 +2301,7 @@ Kills the gdb buffers and resets the source buffers." | |||
| 2236 | buffers." | 2301 | buffers." |
| 2237 | (goto-char (point-min)) | 2302 | (goto-char (point-min)) |
| 2238 | (if (and (search-forward "Located in " nil t) | 2303 | (if (and (search-forward "Located in " nil t) |
| 2239 | (looking-at "\\S-*")) | 2304 | (looking-at "\\S-+")) |
| 2240 | (setq gdb-main-file (match-string 0))) | 2305 | (setq gdb-main-file (match-string 0))) |
| 2241 | (goto-char (point-min)) | 2306 | (goto-char (point-min)) |
| 2242 | (if (search-forward "Includes preprocessor macro info." nil t) | 2307 | (if (search-forward "Includes preprocessor macro info." nil t) |
| @@ -2254,7 +2319,7 @@ Put in buffer and place breakpoint icon." | |||
| 2254 | (goto-char (point-min)) | 2319 | (goto-char (point-min)) |
| 2255 | (catch 'file-not-found | 2320 | (catch 'file-not-found |
| 2256 | (if (search-forward "Located in " nil t) | 2321 | (if (search-forward "Located in " nil t) |
| 2257 | (when (looking-at "\\S-*") | 2322 | (when (looking-at "\\S-+") |
| 2258 | (delete (cons bptno "File not found") gdb-location-alist) | 2323 | (delete (cons bptno "File not found") gdb-location-alist) |
| 2259 | (push (cons bptno (match-string 0)) gdb-location-alist)) | 2324 | (push (cons bptno (match-string 0)) gdb-location-alist)) |
| 2260 | (gdb-resync) | 2325 | (gdb-resync) |
| @@ -2276,6 +2341,8 @@ Add directory to search path for source files using the GDB command, dir.")) | |||
| 2276 | (add-hook 'find-file-hook 'gdb-find-file-hook) | 2341 | (add-hook 'find-file-hook 'gdb-find-file-hook) |
| 2277 | 2342 | ||
| 2278 | (defun gdb-find-file-hook () | 2343 | (defun gdb-find-file-hook () |
| 2344 | "Set up buffer for debugging if file is part of the source code | ||
| 2345 | of the current session." | ||
| 2279 | (if (and (not gdb-find-file-unhook) | 2346 | (if (and (not gdb-find-file-unhook) |
| 2280 | ;; in case gud or gdb-ui is just loaded | 2347 | ;; in case gud or gdb-ui is just loaded |
| 2281 | gud-comint-buffer | 2348 | gud-comint-buffer |
| @@ -2399,7 +2466,9 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2399 | 2466 | ||
| 2400 | (def-gdb-auto-updated-buffer gdb-assembler-buffer | 2467 | (def-gdb-auto-updated-buffer gdb-assembler-buffer |
| 2401 | gdb-invalidate-assembler | 2468 | gdb-invalidate-assembler |
| 2402 | (concat gdb-server-prefix "disassemble " gdb-current-address "\n") | 2469 | (concat gdb-server-prefix "disassemble " |
| 2470 | (if (member gdb-frame-address '(nil "main")) nil "0x") | ||
| 2471 | gdb-frame-address "\n") | ||
| 2403 | gdb-assembler-handler | 2472 | gdb-assembler-handler |
| 2404 | gdb-assembler-custom) | 2473 | gdb-assembler-custom) |
| 2405 | 2474 | ||
| @@ -2407,38 +2476,38 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2407 | (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) | 2476 | (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) |
| 2408 | (pos 1) (address) (flag) (bptno)) | 2477 | (pos 1) (address) (flag) (bptno)) |
| 2409 | (with-current-buffer buffer | 2478 | (with-current-buffer buffer |
| 2410 | (if (not (equal gdb-current-address "main")) | 2479 | (save-excursion |
| 2411 | (progn | 2480 | (if (not (equal gdb-frame-address "main")) |
| 2412 | (goto-char (point-min)) | 2481 | (progn |
| 2413 | (if (re-search-forward gdb-current-address nil t) | 2482 | (goto-char (point-min)) |
| 2414 | (progn | 2483 | (if (and gdb-frame-address |
| 2415 | (setq pos (point)) | 2484 | (re-search-forward gdb-frame-address nil t)) |
| 2416 | (beginning-of-line) | 2485 | (progn |
| 2417 | (or gdb-overlay-arrow-position | 2486 | (setq pos (point)) |
| 2418 | (setq gdb-overlay-arrow-position (make-marker))) | 2487 | (beginning-of-line) |
| 2419 | (set-marker gdb-overlay-arrow-position | 2488 | (or gdb-overlay-arrow-position |
| 2420 | (point) (current-buffer)))))) | 2489 | (setq gdb-overlay-arrow-position (make-marker))) |
| 2421 | ;; remove all breakpoint-icons in assembler buffer before updating. | 2490 | (set-marker gdb-overlay-arrow-position |
| 2422 | (gdb-remove-breakpoint-icons (point-min) (point-max))) | 2491 | (point) (current-buffer)))))) |
| 2492 | ;; remove all breakpoint-icons in assembler buffer before updating. | ||
| 2493 | (gdb-remove-breakpoint-icons (point-min) (point-max)))) | ||
| 2423 | (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) | 2494 | (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) |
| 2424 | (goto-char (point-min)) | 2495 | (goto-char (point-min)) |
| 2425 | (while (< (point) (- (point-max) 1)) | 2496 | (while (< (point) (- (point-max) 1)) |
| 2426 | (forward-line 1) | 2497 | (forward-line 1) |
| 2427 | (if (looking-at "[^\t].*breakpoint") | 2498 | (if (looking-at "[^\t].*?breakpoint") |
| 2428 | (progn | 2499 | (progn |
| 2429 | (looking-at | 2500 | (looking-at |
| 2430 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x\\(\\S-+\\)") | 2501 | "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)") |
| 2431 | (setq bptno (match-string 1)) | 2502 | (setq bptno (match-string 1)) |
| 2432 | (setq flag (char-after (match-beginning 2))) | 2503 | (setq flag (char-after (match-beginning 2))) |
| 2433 | (setq address (match-string 3)) | 2504 | (setq address (match-string 3)) |
| 2434 | ;; remove leading 0s from output of info break. | ||
| 2435 | (if (string-match "^0+\\(.*\\)" address) | ||
| 2436 | (setq address (match-string 1 address))) | ||
| 2437 | (with-current-buffer buffer | 2505 | (with-current-buffer buffer |
| 2506 | (save-excursion | ||
| 2438 | (goto-char (point-min)) | 2507 | (goto-char (point-min)) |
| 2439 | (if (re-search-forward address nil t) | 2508 | (if (re-search-forward address nil t) |
| 2440 | (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) | 2509 | (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) |
| 2441 | (if (not (equal gdb-current-address "main")) | 2510 | (if (not (equal gdb-frame-address "main")) |
| 2442 | (set-window-point (get-buffer-window buffer 0) pos)))) | 2511 | (set-window-point (get-buffer-window buffer 0) pos)))) |
| 2443 | 2512 | ||
| 2444 | (defvar gdb-assembler-mode-map | 2513 | (defvar gdb-assembler-mode-map |
| @@ -2468,7 +2537,7 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2468 | \\{gdb-assembler-mode-map}" | 2537 | \\{gdb-assembler-mode-map}" |
| 2469 | (kill-all-local-variables) | 2538 | (kill-all-local-variables) |
| 2470 | (setq major-mode 'gdb-assembler-mode) | 2539 | (setq major-mode 'gdb-assembler-mode) |
| 2471 | (setq mode-name "Machine") | 2540 | (setq mode-name (concat "Machine:" gdb-selected-frame)) |
| 2472 | (setq gdb-overlay-arrow-position nil) | 2541 | (setq gdb-overlay-arrow-position nil) |
| 2473 | (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position) | 2542 | (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position) |
| 2474 | (setq fringes-outside-margins t) | 2543 | (setq fringes-outside-margins t) |
| @@ -2482,33 +2551,36 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2482 | 2551 | ||
| 2483 | (defun gdb-assembler-buffer-name () | 2552 | (defun gdb-assembler-buffer-name () |
| 2484 | (with-current-buffer gud-comint-buffer | 2553 | (with-current-buffer gud-comint-buffer |
| 2485 | (concat "*Machine Code " (gdb-get-target-string) "*"))) | 2554 | (concat "*Disassembly of " (gdb-get-target-string) "*"))) |
| 2486 | 2555 | ||
| 2487 | (defun gdb-display-assembler-buffer () | 2556 | (defun gdb-display-assembler-buffer () |
| 2488 | "Display disassembly view." | 2557 | "Display disassembly view." |
| 2489 | (interactive) | 2558 | (interactive) |
| 2559 | (setq gdb-previous-frame nil) | ||
| 2490 | (gdb-display-buffer | 2560 | (gdb-display-buffer |
| 2491 | (gdb-get-create-buffer 'gdb-assembler-buffer))) | 2561 | (gdb-get-create-buffer 'gdb-assembler-buffer))) |
| 2492 | 2562 | ||
| 2493 | (defun gdb-frame-assembler-buffer () | 2563 | (defun gdb-frame-assembler-buffer () |
| 2494 | "Display disassembly view in a new frame." | 2564 | "Display disassembly view in a new frame." |
| 2495 | (interactive) | 2565 | (interactive) |
| 2566 | (setq gdb-previous-frame nil) | ||
| 2496 | (let ((special-display-regexps (append special-display-regexps '(".*"))) | 2567 | (let ((special-display-regexps (append special-display-regexps '(".*"))) |
| 2497 | (special-display-frame-alist gdb-frame-parameters)) | 2568 | (special-display-frame-alist gdb-frame-parameters)) |
| 2498 | (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))) | 2569 | (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))) |
| 2499 | 2570 | ||
| 2500 | ;; modified because if gdb-current-address has changed value a new command | 2571 | ;; modified because if gdb-frame-address has changed value a new command |
| 2501 | ;; must be enqueued to update the buffer with the new output | 2572 | ;; must be enqueued to update the buffer with the new output |
| 2502 | (defun gdb-invalidate-assembler (&optional ignored) | 2573 | (defun gdb-invalidate-assembler (&optional ignored) |
| 2503 | (if (gdb-get-buffer 'gdb-assembler-buffer) | 2574 | (if (gdb-get-buffer 'gdb-assembler-buffer) |
| 2504 | (progn | 2575 | (progn |
| 2505 | (unless (string-equal gdb-current-frame gdb-previous-frame) | 2576 | (unless (and gdb-selected-frame |
| 2577 | (string-equal gdb-selected-frame gdb-previous-frame)) | ||
| 2506 | (if (or (not (member 'gdb-invalidate-assembler | 2578 | (if (or (not (member 'gdb-invalidate-assembler |
| 2507 | gdb-pending-triggers)) | 2579 | gdb-pending-triggers)) |
| 2508 | (not (string-equal gdb-current-address | 2580 | (not (string-equal gdb-frame-address |
| 2509 | gdb-previous-address))) | 2581 | gdb-previous-frame-address))) |
| 2510 | (progn | 2582 | (progn |
| 2511 | ;; take previous disassemble command off the queue | 2583 | ;; take previous disassemble command, if any, off the queue |
| 2512 | (with-current-buffer gud-comint-buffer | 2584 | (with-current-buffer gud-comint-buffer |
| 2513 | (let ((queue gdb-input-queue)) | 2585 | (let ((queue gdb-input-queue)) |
| 2514 | (dolist (item queue) | 2586 | (dolist (item queue) |
| @@ -2516,46 +2588,46 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2516 | (setq gdb-input-queue | 2588 | (setq gdb-input-queue |
| 2517 | (delete item gdb-input-queue)))))) | 2589 | (delete item gdb-input-queue)))))) |
| 2518 | (gdb-enqueue-input | 2590 | (gdb-enqueue-input |
| 2519 | (list (concat gdb-server-prefix "disassemble " | 2591 | (list |
| 2520 | gdb-current-address "\n") | 2592 | (concat gdb-server-prefix "disassemble " |
| 2593 | (if (member gdb-frame-address '(nil "main")) nil "0x") | ||
| 2594 | gdb-frame-address "\n") | ||
| 2521 | 'gdb-assembler-handler)) | 2595 | 'gdb-assembler-handler)) |
| 2522 | (push 'gdb-invalidate-assembler gdb-pending-triggers) | 2596 | (push 'gdb-invalidate-assembler gdb-pending-triggers) |
| 2523 | (setq gdb-previous-address gdb-current-address) | 2597 | (setq gdb-previous-frame-address gdb-frame-address) |
| 2524 | (setq gdb-previous-frame gdb-current-frame))))))) | 2598 | (setq gdb-previous-frame gdb-selected-frame))))))) |
| 2525 | 2599 | ||
| 2526 | (defun gdb-get-current-frame () | 2600 | (defun gdb-get-selected-frame () |
| 2527 | (if (not (member 'gdb-get-current-frame gdb-pending-triggers)) | 2601 | (if (not (member 'gdb-get-selected-frame gdb-pending-triggers)) |
| 2528 | (progn | 2602 | (progn |
| 2529 | (gdb-enqueue-input | 2603 | (gdb-enqueue-input |
| 2530 | (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler)) | 2604 | (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler)) |
| 2531 | (push 'gdb-get-current-frame | 2605 | (push 'gdb-get-selected-frame |
| 2532 | gdb-pending-triggers)))) | 2606 | gdb-pending-triggers)))) |
| 2533 | 2607 | ||
| 2534 | (defun gdb-frame-handler () | 2608 | (defun gdb-frame-handler () |
| 2535 | (setq gdb-pending-triggers | 2609 | (setq gdb-pending-triggers |
| 2536 | (delq 'gdb-get-current-frame gdb-pending-triggers)) | 2610 | (delq 'gdb-get-selected-frame gdb-pending-triggers)) |
| 2537 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 2611 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| 2538 | (goto-char (point-min)) | 2612 | (goto-char (point-min)) |
| 2539 | (if (looking-at "Stack level \\([0-9]+\\)") | 2613 | (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) |
| 2540 | (setq gdb-current-stack-level (match-string 1))) | 2614 | (setq gdb-frame-number (match-string 1))) |
| 2541 | (forward-line) | 2615 | (goto-char (point-min)) |
| 2542 | (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ") | 2616 | (if (re-search-forward |
| 2617 | ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t) | ||
| 2543 | (progn | 2618 | (progn |
| 2544 | (setq gdb-current-frame (match-string 2)) | 2619 | (setq gdb-selected-frame (match-string 2)) |
| 2545 | (if (gdb-get-buffer 'gdb-locals-buffer) | 2620 | (if (gdb-get-buffer 'gdb-locals-buffer) |
| 2546 | (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer) | 2621 | (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer) |
| 2547 | (setq mode-name (concat "Locals:" gdb-current-frame)))) | 2622 | (setq mode-name (concat "Locals:" gdb-selected-frame)))) |
| 2548 | (let ((address (match-string 1))) | 2623 | (if (gdb-get-buffer 'gdb-assembler-buffer) |
| 2549 | ;; remove leading 0s from output of info frame command. | 2624 | (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer) |
| 2550 | (if (string-match "^0+\\(.*\\)" address) | 2625 | (setq mode-name (concat "Machine:" gdb-selected-frame)))) |
| 2551 | (setq gdb-current-address | 2626 | (setq gdb-frame-address (match-string 1)))) |
| 2552 | (concat "0x" (match-string 1 address))) | 2627 | (goto-char (point-min)) |
| 2553 | (setq gdb-current-address (concat "0x" address)))) | ||
| 2554 | (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t)) | ||
| 2555 | ;;update with new frame for machine code if necessary | ||
| 2556 | (gdb-invalidate-assembler))))) | ||
| 2557 | (if (re-search-forward " source language \\(\\S-*\\)\." nil t) | 2628 | (if (re-search-forward " source language \\(\\S-*\\)\." nil t) |
| 2558 | (setq gdb-current-language (match-string 1)))) | 2629 | (setq gdb-current-language (match-string 1)))) |
| 2630 | (gdb-invalidate-assembler)) | ||
| 2559 | 2631 | ||
| 2560 | (provide 'gdb-ui) | 2632 | (provide 'gdb-ui) |
| 2561 | 2633 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 4c95fc65d58..f3a95514c13 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -25,17 +25,17 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | 27 | ||
| 28 | ;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> | 28 | ;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> It was |
| 29 | ;; It was later rewritten by rms. Some ideas were due to Masanobu. | 29 | ;; later rewritten by rms. Some ideas were due to Masanobu. Grand |
| 30 | ;; Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> | 30 | ;; Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> Barry |
| 31 | ;; The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>, | 31 | ;; Warsaw <bwarsaw@cen.com> hacked the mode to use comint.el. Shane Hartman |
| 32 | ;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com> | 32 | ;; <shane@spr.com> added support for xdb (HPUX debugger). Rick Sladkey |
| 33 | ;; added support for xdb (HPUX debugger). Rick Sladkey <jrs@world.std.com> | 33 | ;; <jrs@world.std.com> wrote the GDB command completion code. Dave Love |
| 34 | ;; wrote the GDB command completion code. Dave Love <d.love@dl.ac.uk> | 34 | ;; <d.love@dl.ac.uk> added the IRIX kluge, re-implemented the Mips-ish variant |
| 35 | ;; added the IRIX kluge, re-implemented the Mips-ish variant and added | 35 | ;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX |
| 36 | ;; a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX kluge with | 36 | ;; kluge with the gud-xdb-directories hack producing gud-dbx-directories. |
| 37 | ;; the gud-xdb-directories hack producing gud-dbx-directories. Derek L. Davies | 37 | ;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java |
| 38 | ;; <ddavies@world.std.com> added support for jdb (Java debugger.) | 38 | ;; debugger.) |
| 39 | 39 | ||
| 40 | ;;; Code: | 40 | ;;; Code: |
| 41 | 41 | ||
| @@ -107,11 +107,10 @@ Used to grey out relevant togolbar icons.") | |||
| 107 | (setq same-window-regexps nil) | 107 | (setq same-window-regexps nil) |
| 108 | (throw 'info-found nil)))) | 108 | (throw 'info-found nil)))) |
| 109 | nil 0) | 109 | nil 0) |
| 110 | (require 'info) | ||
| 111 | (select-frame (make-frame))) | 110 | (select-frame (make-frame))) |
| 112 | (if (memq gud-minor-mode '(gdbmi gdba)) | 111 | (if (memq gud-minor-mode '(gdbmi gdba)) |
| 113 | (Info-goto-node "(emacs)GDB Graphical Interface") | 112 | (info "(emacs)GDB Graphical Interface") |
| 114 | (Info-goto-node "(emacs)Debuggers")))) | 113 | (info "(emacs)Debuggers")))) |
| 115 | 114 | ||
| 116 | (easy-mmode-defmap gud-menu-map | 115 | (easy-mmode-defmap gud-menu-map |
| 117 | '(([help] "Info" . gud-goto-info) | 116 | '(([help] "Info" . gud-goto-info) |
| @@ -141,6 +140,9 @@ Used to grey out relevant togolbar icons.") | |||
| 141 | :enable (and (not gud-running) | 140 | :enable (and (not gud-running) |
| 142 | (memq gud-minor-mode | 141 | (memq gud-minor-mode |
| 143 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) | 142 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) |
| 143 | ([print*] menu-item "Print Dereference" gud-pstar | ||
| 144 | :enable (and (not gud-running) | ||
| 145 | (memq gud-minor-mode '(gdbmi gdba gdb)))) | ||
| 144 | ([print] menu-item "Print Expression" gud-print | 146 | ([print] menu-item "Print Expression" gud-print |
| 145 | :enable (not gud-running)) | 147 | :enable (not gud-running)) |
| 146 | ([watch] menu-item "Watch Expression" gud-watch | 148 | ([watch] menu-item "Watch Expression" gud-watch |
| @@ -184,18 +186,19 @@ Used to grey out relevant togolbar icons.") | |||
| 184 | (dolist (x '((gud-break . "gud-break") | 186 | (dolist (x '((gud-break . "gud-break") |
| 185 | (gud-remove . "gud-remove") | 187 | (gud-remove . "gud-remove") |
| 186 | (gud-print . "gud-print") | 188 | (gud-print . "gud-print") |
| 189 | (gud-pstar . "gud-pstar") | ||
| 187 | (gud-watch . "gud-watch") | 190 | (gud-watch . "gud-watch") |
| 188 | (gud-run . "gud-run") | ||
| 189 | (gud-until . "gud-until") | ||
| 190 | (gud-cont . "gud-cont") | 191 | (gud-cont . "gud-cont") |
| 192 | (gud-until . "gud-until") | ||
| 193 | (gud-finish . "gud-finish") | ||
| 194 | (gud-run . "gud-run") | ||
| 191 | ;; gud-s, gud-si etc. instead of gud-step, | 195 | ;; gud-s, gud-si etc. instead of gud-step, |
| 192 | ;; gud-stepi, to avoid file-name clashes on DOS | 196 | ;; gud-stepi, to avoid file-name clashes on DOS |
| 193 | ;; 8+3 filesystems. | 197 | ;; 8+3 filesystems. |
| 194 | (gud-step . "gud-s") | ||
| 195 | (gud-next . "gud-n") | 198 | (gud-next . "gud-n") |
| 196 | (gud-finish . "gud-finish") | 199 | (gud-step . "gud-s") |
| 197 | (gud-stepi . "gud-si") | ||
| 198 | (gud-nexti . "gud-ni") | 200 | (gud-nexti . "gud-ni") |
| 201 | (gud-stepi . "gud-si") | ||
| 199 | (gud-up . "gud-up") | 202 | (gud-up . "gud-up") |
| 200 | (gud-down . "gud-down") | 203 | (gud-down . "gud-down") |
| 201 | (gud-goto-info . "info")) | 204 | (gud-goto-info . "info")) |
| @@ -343,13 +346,13 @@ t means that there is no stack, and we are in display-file mode.") | |||
| 343 | 346 | ||
| 344 | (defvar gud-speedbar-menu-items | 347 | (defvar gud-speedbar-menu-items |
| 345 | ;; Note to self. Add expand, and turn off items when not available. | 348 | ;; Note to self. Add expand, and turn off items when not available. |
| 346 | '(["Jump to stack frame" speedbar-edit-line | 349 | '(["Jump to stack frame" speedbar-edit-line |
| 347 | (with-current-buffer gud-comint-buffer | 350 | (with-current-buffer gud-comint-buffer |
| 348 | (not (memq gud-minor-mode '(gdbmi gdba))))] | 351 | (not (memq gud-minor-mode '(gdbmi gdba))))] |
| 349 | ["Edit value" speedbar-edit-line | 352 | ["Edit value" speedbar-edit-line |
| 350 | (with-current-buffer gud-comint-buffer | 353 | (with-current-buffer gud-comint-buffer |
| 351 | (not (memq gud-minor-mode '(gdbmi gdba))))] | 354 | (not (memq gud-minor-mode '(gdbmi gdba))))] |
| 352 | ["Delete expression" gdb-var-delete | 355 | ["Delete expression" gdb-var-delete |
| 353 | (with-current-buffer gud-comint-buffer | 356 | (with-current-buffer gud-comint-buffer |
| 354 | (not (memq gud-minor-mode '(gdbmi gdba))))]) | 357 | (not (memq gud-minor-mode '(gdbmi gdba))))]) |
| 355 | "Additional menu items to add to the speedbar frame.") | 358 | "Additional menu items to add to the speedbar frame.") |
| @@ -581,6 +584,8 @@ and source-file directory for your debugger." | |||
| 581 | (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") | 584 | (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") |
| 582 | (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") | 585 | (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") |
| 583 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") | 586 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") |
| 587 | (gud-def gud-pstar "print* %e" nil | ||
| 588 | "Evaluate C dereferenced pointer expression at point.") | ||
| 584 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") | 589 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") |
| 585 | (gud-def gud-run "run" nil "Run the program.") | 590 | (gud-def gud-run "run" nil "Run the program.") |
| 586 | 591 | ||
| @@ -3192,7 +3197,7 @@ For C this would dereference a pointer expression.") | |||
| 3192 | "The mouse movement event that led to a tooltip display. | 3197 | "The mouse movement event that led to a tooltip display. |
| 3193 | This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") | 3198 | This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") |
| 3194 | 3199 | ||
| 3195 | (defun gud-tooltip-toggle-dereference () | 3200 | (defun toggle-gud-tooltip-dereference () |
| 3196 | "Toggle whether tooltips should show `* expr' or `expr'." | 3201 | "Toggle whether tooltips should show `* expr' or `expr'." |
| 3197 | (interactive) | 3202 | (interactive) |
| 3198 | (setq gud-tooltip-dereference (not gud-tooltip-dereference)) | 3203 | (setq gud-tooltip-dereference (not gud-tooltip-dereference)) |
| @@ -3201,7 +3206,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") | |||
| 3201 | (if gud-tooltip-dereference "on" "off")))) | 3206 | (if gud-tooltip-dereference "on" "off")))) |
| 3202 | 3207 | ||
| 3203 | (define-obsolete-function-alias 'tooltip-gud-toggle-dereference | 3208 | (define-obsolete-function-alias 'tooltip-gud-toggle-dereference |
| 3204 | 'gud-tooltip-toggle-dereference "22.1") | 3209 | 'toggle-gud-tooltip-dereference "22.1") |
| 3205 | 3210 | ||
| 3206 | (define-minor-mode gud-tooltip-mode | 3211 | (define-minor-mode gud-tooltip-mode |
| 3207 | "Toggle the display of GUD tooltips." | 3212 | "Toggle the display of GUD tooltips." |
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index c61c64532a3..0eb1b8bf3df 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el | |||
| @@ -205,7 +205,7 @@ with no args, if that value is non-nil." | |||
| 205 | (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil | 205 | (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil |
| 206 | icon-forward-sexp-function) | 206 | icon-forward-sexp-function) |
| 207 | hs-special-modes-alist))) | 207 | hs-special-modes-alist))) |
| 208 | (run-hooks 'icon-mode-hook)) | 208 | (run-mode-hooks 'icon-mode-hook)) |
| 209 | 209 | ||
| 210 | ;; This is used by indent-for-comment to decide how much to | 210 | ;; This is used by indent-for-comment to decide how much to |
| 211 | ;; indent a comment in Icon code based on its context. | 211 | ;; indent a comment in Icon code based on its context. |
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 8696e1a7d63..6c2cb00bbde 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el | |||
| @@ -278,7 +278,7 @@ Here are all keybindings. | |||
| 278 | (set (make-local-variable 'idlwave-help-def-pos) nil) | 278 | (set (make-local-variable 'idlwave-help-def-pos) nil) |
| 279 | (set (make-local-variable 'idlwave-help-args) nil) | 279 | (set (make-local-variable 'idlwave-help-args) nil) |
| 280 | (set (make-local-variable 'idlwave-help-in-header) nil) | 280 | (set (make-local-variable 'idlwave-help-in-header) nil) |
| 281 | (run-hooks 'idlwave-help-mode-hook)) | 281 | (run-mode-hooks 'idlwave-help-mode-hook)) |
| 282 | 282 | ||
| 283 | (defun idlwave-html-help-location () | 283 | (defun idlwave-html-help-location () |
| 284 | "Return the help directory where HTML files are, or nil if that is unknown." | 284 | "Return the help directory where HTML files are, or nil if that is unknown." |
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 77244819f1b..e804b9f8d50 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -1055,7 +1055,7 @@ IDL has currently stepped.") | |||
| 1055 | (set (make-local-variable 'tool-bar-map) nil) | 1055 | (set (make-local-variable 'tool-bar-map) nil) |
| 1056 | 1056 | ||
| 1057 | ;; Run the hooks. | 1057 | ;; Run the hooks. |
| 1058 | (run-hooks 'idlwave-shell-mode-hook) | 1058 | (run-mode-hooks 'idlwave-shell-mode-hook) |
| 1059 | (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) | 1059 | (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) |
| 1060 | ;; Turn off IDL's ^d interpreting, and define a system | 1060 | ;; Turn off IDL's ^d interpreting, and define a system |
| 1061 | ;; variable which knows the version of IDLWAVE | 1061 | ;; variable which knows the version of IDLWAVE |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index a118b0055a9..6bd7e0eaced 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -1954,7 +1954,7 @@ The main features of this mode are | |||
| 1954 | (idlwave-new-buffer-update) | 1954 | (idlwave-new-buffer-update) |
| 1955 | 1955 | ||
| 1956 | ;; Run the mode hook | 1956 | ;; Run the mode hook |
| 1957 | (run-hooks 'idlwave-mode-hook)) | 1957 | (run-mode-hooks 'idlwave-mode-hook)) |
| 1958 | 1958 | ||
| 1959 | (defvar idlwave-setup-done nil) | 1959 | (defvar idlwave-setup-done nil) |
| 1960 | (defun idlwave-setup () | 1960 | (defun idlwave-setup () |
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 13bc7f08999..ad7c4cb4cf2 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el | |||
| @@ -260,7 +260,8 @@ Paragraphs are separated only by blank lines. Semicolons start comments. | |||
| 260 | If you accidentally suspend your process, use \\[comint-continue-subjob] | 260 | If you accidentally suspend your process, use \\[comint-continue-subjob] |
| 261 | to continue it." | 261 | to continue it." |
| 262 | (interactive) | 262 | (interactive) |
| 263 | (comint-mode) | 263 | (delay-mode-hooks |
| 264 | (comint-mode)) | ||
| 264 | (setq comint-prompt-regexp inferior-lisp-prompt) | 265 | (setq comint-prompt-regexp inferior-lisp-prompt) |
| 265 | (setq major-mode 'inferior-lisp-mode) | 266 | (setq major-mode 'inferior-lisp-mode) |
| 266 | (setq mode-name "Inferior Lisp") | 267 | (setq mode-name "Inferior Lisp") |
| @@ -269,7 +270,7 @@ to continue it." | |||
| 269 | (use-local-map inferior-lisp-mode-map) ;c-c c-k for "kompile" file | 270 | (use-local-map inferior-lisp-mode-map) ;c-c c-k for "kompile" file |
| 270 | (setq comint-get-old-input (function lisp-get-old-input)) | 271 | (setq comint-get-old-input (function lisp-get-old-input)) |
| 271 | (setq comint-input-filter (function lisp-input-filter)) | 272 | (setq comint-input-filter (function lisp-input-filter)) |
| 272 | (run-hooks 'inferior-lisp-mode-hook)) | 273 | (run-mode-hooks 'inferior-lisp-mode-hook)) |
| 273 | 274 | ||
| 274 | (defun lisp-get-old-input () | 275 | (defun lisp-get-old-input () |
| 275 | "Return a string containing the sexp ending at point." | 276 | "Return a string containing the sexp ending at point." |
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index bd6fac5c639..5becd22f6eb 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el | |||
| @@ -147,7 +147,7 @@ | |||
| 147 | font-lock-defaults '(m4-font-lock-keywords nil) | 147 | font-lock-defaults '(m4-font-lock-keywords nil) |
| 148 | ) | 148 | ) |
| 149 | (set-syntax-table m4-mode-syntax-table) | 149 | (set-syntax-table m4-mode-syntax-table) |
| 150 | (run-hooks 'm4-mode-hook)) | 150 | (run-mode-hooks 'm4-mode-hook)) |
| 151 | 151 | ||
| 152 | (provide 'm4-mode) | 152 | (provide 'm4-mode) |
| 153 | ;;stuff to play with for debugging | 153 | ;;stuff to play with for debugging |
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 05c3ac50787..7356583fb90 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el | |||
| @@ -111,7 +111,8 @@ | |||
| 111 | '((t (:underline t))) | 111 | '((t (:underline t))) |
| 112 | "Face to use for additionally highlighting rule targets in Font-Lock mode." | 112 | "Face to use for additionally highlighting rule targets in Font-Lock mode." |
| 113 | :group 'faces | 113 | :group 'faces |
| 114 | :group 'makefile) | 114 | :group 'makefile |
| 115 | :version "22.1") | ||
| 115 | 116 | ||
| 116 | (defface makefile-shell-face | 117 | (defface makefile-shell-face |
| 117 | '((((class color) (background light)) (:background "seashell1")) | 118 | '((((class color) (background light)) (:background "seashell1")) |
| @@ -119,7 +120,8 @@ | |||
| 119 | (t (:reverse-video t))) | 120 | (t (:reverse-video t))) |
| 120 | "Face to use for additionally highlighting Shell commands in Font-Lock mode." | 121 | "Face to use for additionally highlighting Shell commands in Font-Lock mode." |
| 121 | :group 'faces | 122 | :group 'faces |
| 122 | :group 'makefile) | 123 | :group 'makefile |
| 124 | :version "22.1") | ||
| 123 | 125 | ||
| 124 | (defface makefile-makepp-perl-face | 126 | (defface makefile-makepp-perl-face |
| 125 | '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book | 127 | '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book |
| @@ -127,7 +129,8 @@ | |||
| 127 | (t (:reverse-video t))) | 129 | (t (:reverse-video t))) |
| 128 | "Face to use for additionally highlighting Perl code in Font-Lock mode." | 130 | "Face to use for additionally highlighting Perl code in Font-Lock mode." |
| 129 | :group 'faces | 131 | :group 'faces |
| 130 | :group 'makefile) | 132 | :group 'makefile |
| 133 | :version "22.1") | ||
| 131 | 134 | ||
| 132 | (defcustom makefile-browser-buffer-name "*Macros and Targets*" | 135 | (defcustom makefile-browser-buffer-name "*Macros and Targets*" |
| 133 | "*Name of the macro- and target browser buffer." | 136 | "*Name of the macro- and target browser buffer." |
| @@ -262,18 +265,33 @@ not be enclosed in { } or ( )." | |||
| 262 | "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" | 265 | "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" |
| 263 | "Regex used to find dependency lines in a makefile.") | 266 | "Regex used to find dependency lines in a makefile.") |
| 264 | 267 | ||
| 268 | (defconst makefile-bsdmake-dependency-regex | ||
| 269 | (progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex) | ||
| 270 | (replace-match "\\([:!]\\)" t t makefile-dependency-regex)) | ||
| 271 | "Regex used to find dependency lines in a BSD makefile.") | ||
| 272 | |||
| 265 | (defvar makefile-dependency-skip "^:" | 273 | (defvar makefile-dependency-skip "^:" |
| 266 | "Characters to skip to find a line that might be a dependency.") | 274 | "Characters to skip to find a line that might be a dependency.") |
| 267 | 275 | ||
| 268 | (defvar makefile-rule-action-regex | 276 | (defvar makefile-rule-action-regex |
| 269 | "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)" | 277 | "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)" |
| 270 | "Regex used to highlight rule action lines in font lock mode.") | 278 | "Regex used to highlight rule action lines in font lock mode.") |
| 271 | 279 | ||
| 280 | (defconst makefile-makepp-rule-action-regex | ||
| 281 | ;; Don't care about initial tab, but I don't know how to font-lock correctly without. | ||
| 282 | "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)" | ||
| 283 | "Regex used to highlight makepp rule action lines in font lock mode.") | ||
| 284 | |||
| 285 | (defconst makefile-bsdmake-rule-action-regex | ||
| 286 | (progn (string-match "-@" makefile-rule-action-regex) | ||
| 287 | (replace-match "-+@" t t makefile-rule-action-regex)) | ||
| 288 | "Regex used to highlight BSD rule action lines in font lock mode.") | ||
| 289 | |||
| 272 | ;; Note that the first and second subexpression is used by font lock. Note | 290 | ;; Note that the first and second subexpression is used by font lock. Note |
| 273 | ;; that if you change this regexp you might have to fix the imenu index in | 291 | ;; that if you change this regexp you might have to fix the imenu index in |
| 274 | ;; makefile-imenu-generic-expression. | 292 | ;; makefile-imenu-generic-expression. |
| 275 | (defconst makefile-macroassign-regex | 293 | (defconst makefile-macroassign-regex |
| 276 | "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\)" | 294 | "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)" |
| 277 | "Regex used to find macro assignment lines in a makefile.") | 295 | "Regex used to find macro assignment lines in a makefile.") |
| 278 | 296 | ||
| 279 | (defconst makefile-var-use-regex | 297 | (defconst makefile-var-use-regex |
| @@ -420,7 +438,7 @@ not be enclosed in { } or ( )." | |||
| 420 | nil | 438 | nil |
| 421 | "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" | 439 | "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" |
| 422 | 440 | ||
| 423 | '("[^$]\\(\\$[({]\\(?:target\\|output\\)s?\\_>.*?[})]\\)" | 441 | '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)" |
| 424 | 1 'makefile-targets-face prepend) | 442 | 1 'makefile-targets-face prepend) |
| 425 | 443 | ||
| 426 | ;; Colon modifier keywords. | 444 | ;; Colon modifier keywords. |
| @@ -849,10 +867,8 @@ Makefile mode can be configured by modifying the following variables: | |||
| 849 | ;;;###autoload | 867 | ;;;###autoload |
| 850 | (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" | 868 | (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" |
| 851 | "An adapted `makefile-mode' that knows about makepp." | 869 | "An adapted `makefile-mode' that knows about makepp." |
| 852 | (set (make-local-variable 'makefile-rule-action-regex) | 870 | (set (make-local-variable 'makefile-rule-action-regex) |
| 853 | ;; Don't care about initial tab, but I don't know how to font-lock correctly without. | 871 | makefile-makepp-rule-action-regex) |
| 854 | "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)") | ||
| 855 | |||
| 856 | (setq font-lock-defaults | 872 | (setq font-lock-defaults |
| 857 | `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) | 873 | `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) |
| 858 | imenu-generic-expression | 874 | imenu-generic-expression |
| @@ -863,11 +879,10 @@ Makefile mode can be configured by modifying the following variables: | |||
| 863 | (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" | 879 | (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" |
| 864 | "An adapted `makefile-mode' that knows about BSD make." | 880 | "An adapted `makefile-mode' that knows about BSD make." |
| 865 | (set (make-local-variable 'makefile-dependency-regex) | 881 | (set (make-local-variable 'makefile-dependency-regex) |
| 866 | ;; Identical to default, except allows `!' instead of `:'. | 882 | makefile-bsdmake-dependency-regex) |
| 867 | "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)") | ||
| 868 | (set (make-local-variable 'makefile-dependency-skip) "^:!") | 883 | (set (make-local-variable 'makefile-dependency-skip) "^:!") |
| 869 | (set (make-local-variable 'makefile-rule-action-regex) | 884 | (set (make-local-variable 'makefile-rule-action-regex) |
| 870 | "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)") | 885 | makefile-bsdmake-rule-action-regex) |
| 871 | (setq font-lock-defaults | 886 | (setq font-lock-defaults |
| 872 | `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) | 887 | `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) |
| 873 | 888 | ||
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 7bf9921b2ee..3d77de8f182 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el | |||
| @@ -998,7 +998,7 @@ Turning on Metafont mode calls the value of the variables | |||
| 998 | (setq meta-complete-list | 998 | (setq meta-complete-list |
| 999 | (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) | 999 | (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) |
| 1000 | (list "" 'ispell-complete-word))) | 1000 | (list "" 'ispell-complete-word))) |
| 1001 | (run-hooks 'meta-common-mode-hook 'metafont-mode-hook)) | 1001 | (run-mode-hooks 'meta-common-mode-hook 'metafont-mode-hook)) |
| 1002 | 1002 | ||
| 1003 | ;;;###autoload | 1003 | ;;;###autoload |
| 1004 | (defun metapost-mode () | 1004 | (defun metapost-mode () |
| @@ -1023,7 +1023,7 @@ Turning on MetaPost mode calls the value of the variable | |||
| 1023 | (setq meta-complete-list | 1023 | (setq meta-complete-list |
| 1024 | (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) | 1024 | (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) |
| 1025 | (list "" 'ispell-complete-word))) | 1025 | (list "" 'ispell-complete-word))) |
| 1026 | (run-hooks 'meta-common-mode-hook 'metapost-mode-hook)) | 1026 | (run-mode-hooks 'meta-common-mode-hook 'metapost-mode-hook)) |
| 1027 | 1027 | ||
| 1028 | 1028 | ||
| 1029 | ;;; Just in case ... | 1029 | ;;; Just in case ... |
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 0fa46bee0f9..5fd3dbcb11b 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el | |||
| @@ -172,7 +172,7 @@ followed by the first character of the construct. | |||
| 172 | ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. | 172 | ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. |
| 173 | ;(font-lock-comment-start-regexp . "(\\*") | 173 | ;(font-lock-comment-start-regexp . "(\\*") |
| 174 | )) | 174 | )) |
| 175 | (run-hooks 'm2-mode-hook)) | 175 | (run-mode-hooks 'm2-mode-hook)) |
| 176 | 176 | ||
| 177 | ;; Regexps written with help from Ron Forrester <ron@orcad.com> | 177 | ;; Regexps written with help from Ron Forrester <ron@orcad.com> |
| 178 | ;; and Spencer Allain <sallain@teknowledge.com>. | 178 | ;; and Spencer Allain <sallain@teknowledge.com>. |
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 265cf6c049b..250d00171f2 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el | |||
| @@ -158,7 +158,7 @@ Entry to this mode successively runs the hooks `comint-mode-hook' and | |||
| 158 | inferior-octave-dynamic-complete-functions) | 158 | inferior-octave-dynamic-complete-functions) |
| 159 | (comint-read-input-ring t) | 159 | (comint-read-input-ring t) |
| 160 | 160 | ||
| 161 | (run-hooks 'inferior-octave-mode-hook)) | 161 | (run-mode-hooks 'inferior-octave-mode-hook)) |
| 162 | 162 | ||
| 163 | ;;;###autoload | 163 | ;;;###autoload |
| 164 | (defun inferior-octave (&optional arg) | 164 | (defun inferior-octave (&optional arg) |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 281edfd693e..35d5bd897c9 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -555,7 +555,7 @@ including a reproducible test case and send the message." | |||
| 555 | 555 | ||
| 556 | (octave-add-octave-menu) | 556 | (octave-add-octave-menu) |
| 557 | (octave-initialize-completions) | 557 | (octave-initialize-completions) |
| 558 | (run-hooks 'octave-mode-hook)) | 558 | (run-mode-hooks 'octave-mode-hook)) |
| 559 | 559 | ||
| 560 | ;;; Miscellaneous useful functions | 560 | ;;; Miscellaneous useful functions |
| 561 | (defun octave-describe-major-mode () | 561 | (defun octave-describe-major-mode () |
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 6292fd36a67..e4d36244537 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el | |||
| @@ -383,7 +383,7 @@ no args, if that value is non-nil." | |||
| 383 | (make-local-variable 'imenu-generic-expression) | 383 | (make-local-variable 'imenu-generic-expression) |
| 384 | (setq imenu-generic-expression pascal-imenu-generic-expression) | 384 | (setq imenu-generic-expression pascal-imenu-generic-expression) |
| 385 | (setq imenu-case-fold-search t) | 385 | (setq imenu-case-fold-search t) |
| 386 | (run-hooks 'pascal-mode-hook)) | 386 | (run-mode-hooks 'pascal-mode-hook)) |
| 387 | 387 | ||
| 388 | 388 | ||
| 389 | 389 | ||
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 87915933862..7dc695f24bf 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1392,7 +1392,7 @@ with your script for an edit-interpret-debug cycle." | |||
| 1392 | (string-match "\\.m?spec\\'" buffer-file-name)) | 1392 | (string-match "\\.m?spec\\'" buffer-file-name)) |
| 1393 | "rpm"))))) | 1393 | "rpm"))))) |
| 1394 | (sh-set-shell (or interpreter sh-shell-file) nil nil)) | 1394 | (sh-set-shell (or interpreter sh-shell-file) nil nil)) |
| 1395 | (run-hooks 'sh-mode-hook)) | 1395 | (run-mode-hooks 'sh-mode-hook)) |
| 1396 | 1396 | ||
| 1397 | ;;;###autoload | 1397 | ;;;###autoload |
| 1398 | (defalias 'shell-script-mode 'sh-mode) | 1398 | (defalias 'shell-script-mode 'sh-mode) |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 902cd920ead..add4493e5f8 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -2249,7 +2249,7 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file: | |||
| 2249 | (setq local-abbrev-table sql-mode-abbrev-table) | 2249 | (setq local-abbrev-table sql-mode-abbrev-table) |
| 2250 | (setq abbrev-all-caps 1) | 2250 | (setq abbrev-all-caps 1) |
| 2251 | ;; Run hook | 2251 | ;; Run hook |
| 2252 | (run-hooks 'sql-mode-hook) | 2252 | (run-mode-hooks 'sql-mode-hook) |
| 2253 | ;; Catch changes to sql-product and highlight accordingly | 2253 | ;; Catch changes to sql-product and highlight accordingly |
| 2254 | (sql-highlight-product) | 2254 | (sql-highlight-product) |
| 2255 | (add-hook 'hack-local-variables-hook 'sql-highlight-product t t)) | 2255 | (add-hook 'hack-local-variables-hook 'sql-highlight-product t t)) |
| @@ -2367,7 +2367,7 @@ you entered, right above the output it created. | |||
| 2367 | (make-local-variable 'sql-input-ring-separator) | 2367 | (make-local-variable 'sql-input-ring-separator) |
| 2368 | (make-local-variable 'sql-input-ring-file-name) | 2368 | (make-local-variable 'sql-input-ring-file-name) |
| 2369 | ;; Run hook. | 2369 | ;; Run hook. |
| 2370 | (run-hooks 'sql-interactive-mode-hook) | 2370 | (run-mode-hooks 'sql-interactive-mode-hook) |
| 2371 | ;; Set comint based on user overrides. | 2371 | ;; Set comint based on user overrides. |
| 2372 | (setq comint-prompt-regexp sql-prompt-regexp) | 2372 | (setq comint-prompt-regexp sql-prompt-regexp) |
| 2373 | (setq left-margin sql-prompt-length) | 2373 | (setq left-margin sql-prompt-length) |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index f840ef356d9..ebccb1bf5bf 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -127,7 +127,7 @@ | |||
| 127 | "Non-nil if XEmacs is used.") | 127 | "Non-nil if XEmacs is used.") |
| 128 | ;; Emacs 21 handling | 128 | ;; Emacs 21 handling |
| 129 | (defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs)) | 129 | (defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs)) |
| 130 | "Non-nil if GNU Emacs 21 is used.") | 130 | "Non-nil if Emacs 21 is used.") |
| 131 | 131 | ||
| 132 | 132 | ||
| 133 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 133 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -4568,8 +4568,7 @@ Key bindings: | |||
| 4568 | (set (make-local-variable 'indent-line-function) 'vhdl-indent-line) | 4568 | (set (make-local-variable 'indent-line-function) 'vhdl-indent-line) |
| 4569 | (set (make-local-variable 'comment-start) "--") | 4569 | (set (make-local-variable 'comment-start) "--") |
| 4570 | (set (make-local-variable 'comment-end) "") | 4570 | (set (make-local-variable 'comment-end) "") |
| 4571 | (when vhdl-emacs-21 | 4571 | (set (make-local-variable 'comment-padding) "") |
| 4572 | (set (make-local-variable 'comment-padding) "")) | ||
| 4573 | (set (make-local-variable 'comment-column) vhdl-inline-comment-column) | 4572 | (set (make-local-variable 'comment-column) vhdl-inline-comment-column) |
| 4574 | (set (make-local-variable 'end-comment-column) vhdl-end-comment-column) | 4573 | (set (make-local-variable 'end-comment-column) vhdl-end-comment-column) |
| 4575 | (set (make-local-variable 'comment-start-skip) "--+\\s-*") | 4574 | (set (make-local-variable 'comment-start-skip) "--+\\s-*") |
| @@ -4622,7 +4621,7 @@ Key bindings: | |||
| 4622 | (if noninteractive "" " See menu for documentation and release notes.")) | 4621 | (if noninteractive "" " See menu for documentation and release notes.")) |
| 4623 | 4622 | ||
| 4624 | ;; run hooks | 4623 | ;; run hooks |
| 4625 | (run-hooks 'vhdl-mode-hook)) | 4624 | (run-mode-hooks 'vhdl-mode-hook)) |
| 4626 | 4625 | ||
| 4627 | (defun vhdl-activate-customizations () | 4626 | (defun vhdl-activate-customizations () |
| 4628 | "Activate all customizations on local variables." | 4627 | "Activate all customizations on local variables." |
| @@ -7484,7 +7483,13 @@ end of line, do nothing in comments and strings." | |||
| 7484 | (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t) | 7483 | (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t) |
| 7485 | (if (match-string 1) | 7484 | (if (match-string 1) |
| 7486 | (goto-char (match-end 1)) | 7485 | (goto-char (match-end 1)) |
| 7487 | (replace-match "\\3 \\4 \\5") | 7486 | (save-excursion |
| 7487 | (goto-char (match-beginning 4)) | ||
| 7488 | (unless (eq (preceding-char) ?\ ) | ||
| 7489 | (insert " ")) | ||
| 7490 | (goto-char (match-end 4)) | ||
| 7491 | (unless (eq (following-char) ?\ ) | ||
| 7492 | (insert " "))) | ||
| 7488 | (goto-char (match-end 4)))) | 7493 | (goto-char (match-end 4)))) |
| 7489 | ;; eliminate multiple spaces and spaces at end of line | 7494 | ;; eliminate multiple spaces and spaces at end of line |
| 7490 | (goto-char beg) | 7495 | (goto-char beg) |
| @@ -7540,7 +7545,7 @@ buffer." | |||
| 7540 | (interactive "r\np") | 7545 | (interactive "r\np") |
| 7541 | (save-excursion | 7546 | (save-excursion |
| 7542 | (goto-char beg) | 7547 | (goto-char beg) |
| 7543 | (let ((margin (if interactive (current-indentation) (current-column)))) | 7548 | (let ((margin (if arg (current-indentation) (current-column)))) |
| 7544 | (goto-char end) | 7549 | (goto-char end) |
| 7545 | (setq end (point-marker)) | 7550 | (setq end (point-marker)) |
| 7546 | ;; remove inline comments, newlines and whitespace | 7551 | ;; remove inline comments, newlines and whitespace |
| @@ -12055,8 +12060,7 @@ File statistics: \"%s\"\n\ | |||
| 12055 | # statements : %5d\n\ | 12060 | # statements : %5d\n\ |
| 12056 | # code lines : %5d\n\ | 12061 | # code lines : %5d\n\ |
| 12057 | # total lines : %5d\n\ " | 12062 | # total lines : %5d\n\ " |
| 12058 | (buffer-file-name) no-stats no-code-lines no-lines) | 12063 | (buffer-file-name) no-stats no-code-lines no-lines))) |
| 12059 | (unless vhdl-emacs-21 (vhdl-show-messages)))) | ||
| 12060 | 12064 | ||
| 12061 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 12065 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 12062 | ;; Help functions | 12066 | ;; Help functions |
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index d329e234025..1fa37532ab0 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -196,7 +196,7 @@ It creates the Imenu index for the buffer, if necessary." | |||
| 196 | (puthash window current which-func-table) | 196 | (puthash window current which-func-table) |
| 197 | (force-mode-line-update))) | 197 | (force-mode-line-update))) |
| 198 | (error | 198 | (error |
| 199 | (which-func-mode -1) | 199 | (setq which-func-mode nil) |
| 200 | (error "Error in which-func-update: %s" info)))))) | 200 | (error "Error in which-func-update: %s" info)))))) |
| 201 | 201 | ||
| 202 | ;;;###autoload | 202 | ;;;###autoload |
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index bf1279da8a0..8ee791affe1 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -338,7 +338,7 @@ with no args, if that value is non-nil. | |||
| 338 | (setq xscheme-previous-process-state (cons nil nil))))))) | 338 | (setq xscheme-previous-process-state (cons nil nil))))))) |
| 339 | (scheme-interaction-mode-initialize) | 339 | (scheme-interaction-mode-initialize) |
| 340 | (scheme-mode-variables) | 340 | (scheme-mode-variables) |
| 341 | (run-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook)) | 341 | (run-mode-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook)) |
| 342 | 342 | ||
| 343 | (defun exit-scheme-interaction-mode () | 343 | (defun exit-scheme-interaction-mode () |
| 344 | "Take buffer out of scheme interaction mode" | 344 | "Take buffer out of scheme interaction mode" |