Mercurial > hg > xemacs-beta
comparison lisp/comint/gdb.el @ 171:929b76928fce r20-3b12
Import from CVS: tag r20-3b12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:47:52 +0200 |
parents | 15872534500d |
children | e45d5e7c476e |
comparison
equal
deleted
inserted
replaced
170:98a42ee61975 | 171:929b76928fce |
---|---|
212 (interactive "P") | 212 (interactive "P") |
213 (setq gdb-display-mode (if (null arg) | 213 (setq gdb-display-mode (if (null arg) |
214 (not gdb-display-mode) | 214 (not gdb-display-mode) |
215 (> (prefix-numeric-value arg) 0)))) | 215 (> (prefix-numeric-value arg) 0)))) |
216 | 216 |
217 ;; Using cc-mode's syntax table is broken. | |
218 (defvar gdb-mode-syntax-table nil | |
219 "Syntax table for GDB mode.") | |
220 | |
221 ;; This is adapted from CC Mode 5.11. | |
222 (unless gdb-mode-syntax-table | |
223 (setq gdb-mode-syntax-table (make-syntax-table)) | |
224 ;; DO NOT TRY TO SET _ (UNDERSCORE) TO WORD CLASS! | |
225 (modify-syntax-entry ?_ "_" gdb-mode-syntax-table) | |
226 (modify-syntax-entry ?\\ "\\" gdb-mode-syntax-table) | |
227 (modify-syntax-entry ?+ "." gdb-mode-syntax-table) | |
228 (modify-syntax-entry ?- "." gdb-mode-syntax-table) | |
229 (modify-syntax-entry ?= "." gdb-mode-syntax-table) | |
230 (modify-syntax-entry ?% "." gdb-mode-syntax-table) | |
231 (modify-syntax-entry ?< "." gdb-mode-syntax-table) | |
232 (modify-syntax-entry ?> "." gdb-mode-syntax-table) | |
233 (modify-syntax-entry ?& "." gdb-mode-syntax-table) | |
234 (modify-syntax-entry ?| "." gdb-mode-syntax-table) | |
235 (modify-syntax-entry ?\' "\"" gdb-mode-syntax-table) | |
236 ;; add extra comment syntax | |
237 (modify-syntax-entry ?/ ". 14" gdb-mode-syntax-table) | |
238 (modify-syntax-entry ?* ". 23" gdb-mode-syntax-table)) | |
239 | |
217 | 240 |
218 (defun gdb-mode () | 241 (defun gdb-mode () |
219 "Major mode for interacting with an inferior Gdb process. | 242 "Major mode for interacting with an inferior Gdb process. |
220 The following commands are available: | 243 The following commands are available: |
221 | 244 |
241 \\[send-gdb-command] used for special printing of an arg at the current point. | 264 \\[send-gdb-command] used for special printing of an arg at the current point. |
242 C-x SPACE sets break point at current line." | 265 C-x SPACE sets break point at current line." |
243 (interactive) | 266 (interactive) |
244 (comint-mode) | 267 (comint-mode) |
245 (use-local-map gdb-mode-map) | 268 (use-local-map gdb-mode-map) |
246 (when (not c-mode-syntax-table) | 269 (set-syntax-table gdb-mode-syntax-table) |
247 (require 'cc-lang)) | |
248 (set-syntax-table c-mode-syntax-table) | |
249 (make-local-variable 'gdb-last-frame-displayed-p) | 270 (make-local-variable 'gdb-last-frame-displayed-p) |
250 (make-local-variable 'gdb-last-frame) | 271 (make-local-variable 'gdb-last-frame) |
251 (make-local-variable 'gdb-delete-prompt-marker) | 272 (make-local-variable 'gdb-delete-prompt-marker) |
252 (make-local-variable 'gdb-display-mode) | 273 (make-local-variable 'gdb-display-mode) |
253 (make-local-variable' gdb-filter-accumulator) | 274 (make-local-variable' gdb-filter-accumulator) |