diff options
| author | Nick Roberts | 2009-09-24 12:30:08 +0000 |
|---|---|---|
| committer | Nick Roberts | 2009-09-24 12:30:08 +0000 |
| commit | 9ccd2bb378b7a1df0d8cd4650a816e12f2fc3050 (patch) | |
| tree | 0813f8de12ad08a1364533f76de2e4784dd40b39 | |
| parent | 107ef54aaf8d5a3480ce3260b14bc81882757e31 (diff) | |
| download | emacs-9ccd2bb378b7a1df0d8cd4650a816e12f2fc3050.tar.gz emacs-9ccd2bb378b7a1df0d8cd4650a816e12f2fc3050.zip | |
Don't require speedbar.
(gdb-jsonify-buffer): Handle case where "=" is part of value string.
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index d9e26eb30f5..f547f9a17c5 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -102,9 +102,7 @@ | |||
| 102 | (require 'gud) | 102 | (require 'gud) |
| 103 | (require 'json) | 103 | (require 'json) |
| 104 | (require 'bindat) | 104 | (require 'bindat) |
| 105 | (require 'speedbar) | 105 | (eval-when-compile (require 'cl)) |
| 106 | (eval-when-compile | ||
| 107 | (require 'cl)) | ||
| 108 | 106 | ||
| 109 | (defvar tool-bar-map) | 107 | (defvar tool-bar-map) |
| 110 | (defvar speedbar-initial-expansion-list-name) | 108 | (defvar speedbar-initial-expansion-list-name) |
| @@ -2066,7 +2064,6 @@ incompatible with GDB/MI output syntax." | |||
| 2066 | (save-excursion | 2064 | (save-excursion |
| 2067 | (while (re-search-forward (concat "[\\[,]\\(" fix-key "=\\)") nil t) | 2065 | (while (re-search-forward (concat "[\\[,]\\(" fix-key "=\\)") nil t) |
| 2068 | (replace-match "" nil nil nil 1)))) | 2066 | (replace-match "" nil nil nil 1)))) |
| 2069 | ;; Emacs bug #3794 | ||
| 2070 | (when fix-list | 2067 | (when fix-list |
| 2071 | (save-excursion | 2068 | (save-excursion |
| 2072 | ;; Find positions of braces which enclose broken list | 2069 | ;; Find positions of braces which enclose broken list |
| @@ -2084,9 +2081,9 @@ incompatible with GDB/MI output syntax." | |||
| 2084 | (insert "]")))))) | 2081 | (insert "]")))))) |
| 2085 | (goto-char (point-min)) | 2082 | (goto-char (point-min)) |
| 2086 | (insert "{") | 2083 | (insert "{") |
| 2087 | ;; TODO: This breaks badly with foo= inside constants | 2084 | (while (re-search-forward |
| 2088 | (while (re-search-forward "\\([[:alpha:]-_]+\\)=" nil t) | 2085 | "\\([[:alnum:]-_]+\\)=\\({\\|\\[\\|\"\"\\|\".*?[^\\]\"\\)" nil t) |
| 2089 | (replace-match "\"\\1\":" nil nil)) | 2086 | (replace-match "\"\\1\":\\2" nil nil)) |
| 2090 | (goto-char (point-max)) | 2087 | (goto-char (point-max)) |
| 2091 | (insert "}"))) | 2088 | (insert "}"))) |
| 2092 | 2089 | ||