diff options
| author | Nick Roberts | 2008-06-16 11:26:22 +0000 |
|---|---|---|
| committer | Nick Roberts | 2008-06-16 11:26:22 +0000 |
| commit | d91e2cb64e6d8be6d1138b242cf6b6c04fe1ed91 (patch) | |
| tree | 437548a08e21b54f5b14af35f852436503713d45 | |
| parent | c139bf0bcc0c85e6cee68829ac51ca91988ffa0e (diff) | |
| download | emacs-d91e2cb64e6d8be6d1138b242cf6b6c04fe1ed91.tar.gz emacs-d91e2cb64e6d8be6d1138b242cf6b6c04fe1ed91.zip | |
(gdb-memory-set-address)
(gdb-memory-set-repeat-count): Allow keyboard bindings.
(gdb-memory-mode-map): Bind above functions respectively
to 'S' and 'N'.
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 9d5de2a94bd..86f366d37a0 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -2720,29 +2720,27 @@ another GDB command e.g pwd, to see new frames") | |||
| 2720 | (defvar gdb-memory-mode-map | 2720 | (defvar gdb-memory-mode-map |
| 2721 | (let ((map (make-sparse-keymap))) | 2721 | (let ((map (make-sparse-keymap))) |
| 2722 | (suppress-keymap map) | 2722 | (suppress-keymap map) |
| 2723 | (define-key map "S" 'gdb-memory-set-address) | ||
| 2724 | (define-key map "N" 'gdb-memory-set-repeat-count) | ||
| 2723 | (define-key map "q" 'kill-this-buffer) | 2725 | (define-key map "q" 'kill-this-buffer) |
| 2724 | map)) | 2726 | map)) |
| 2725 | 2727 | ||
| 2726 | (defun gdb-memory-set-address (event) | 2728 | (defun gdb-memory-set-address (&optional event) |
| 2727 | "Set the start memory address." | 2729 | "Set the start memory address." |
| 2728 | (interactive "e") | 2730 | (interactive) |
| 2729 | (save-selected-window | 2731 | (let ((arg (read-from-minibuffer "Start address: "))) |
| 2730 | (select-window (posn-window (event-start event))) | 2732 | (setq gdb-memory-address arg)) |
| 2731 | (let ((arg (read-from-minibuffer "Memory address: "))) | 2733 | (gdb-invalidate-memory)) |
| 2732 | (setq gdb-memory-address arg)) | ||
| 2733 | (gdb-invalidate-memory))) | ||
| 2734 | 2734 | ||
| 2735 | (defun gdb-memory-set-repeat-count (event) | 2735 | (defun gdb-memory-set-repeat-count (&optional event) |
| 2736 | "Set the number of data items in memory window." | 2736 | "Set the number of data items in memory window." |
| 2737 | (interactive "e") | 2737 | (interactive) |
| 2738 | (save-selected-window | 2738 | (let* ((arg (read-from-minibuffer "Repeat count: ")) |
| 2739 | (select-window (posn-window (event-start event))) | 2739 | (count (string-to-number arg))) |
| 2740 | (let* ((arg (read-from-minibuffer "Repeat count: ")) | 2740 | (if (<= count 0) |
| 2741 | (count (string-to-number arg))) | 2741 | (error "Positive numbers only") |
| 2742 | (if (<= count 0) | 2742 | (customize-set-variable 'gdb-memory-repeat-count count) |
| 2743 | (error "Positive numbers only") | 2743 | (gdb-invalidate-memory)))) |
| 2744 | (customize-set-variable 'gdb-memory-repeat-count count) | ||
| 2745 | (gdb-invalidate-memory))))) | ||
| 2746 | 2744 | ||
| 2747 | (defun gdb-memory-format-binary () | 2745 | (defun gdb-memory-format-binary () |
| 2748 | "Set the display format to binary." | 2746 | "Set the display format to binary." |
| @@ -2890,7 +2888,7 @@ another GDB command e.g pwd, to see new frames") | |||
| 2890 | (setq header-line-format | 2888 | (setq header-line-format |
| 2891 | '(:eval | 2889 | '(:eval |
| 2892 | (concat | 2890 | (concat |
| 2893 | "Read address[" | 2891 | "Start address[" |
| 2894 | (propertize | 2892 | (propertize |
| 2895 | "-" | 2893 | "-" |
| 2896 | 'face font-lock-warning-face | 2894 | 'face font-lock-warning-face |
| @@ -2924,7 +2922,7 @@ another GDB command e.g pwd, to see new frames") | |||
| 2924 | "]: " | 2922 | "]: " |
| 2925 | (propertize gdb-memory-address | 2923 | (propertize gdb-memory-address |
| 2926 | 'face font-lock-warning-face | 2924 | 'face font-lock-warning-face |
| 2927 | 'help-echo "mouse-1: set memory address" | 2925 | 'help-echo "mouse-1: set start address" |
| 2928 | 'mouse-face 'mode-line-highlight | 2926 | 'mouse-face 'mode-line-highlight |
| 2929 | 'local-map (gdb-make-header-line-mouse-map | 2927 | 'local-map (gdb-make-header-line-mouse-map |
| 2930 | 'mouse-1 | 2928 | 'mouse-1 |