[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gud-print
From: |
Nick Roberts |
Subject: |
gud-print |
Date: |
Wed, 26 Apr 2006 10:42:27 +1200 |
Currently gud-find-expr-function computes the expression at point:
m[4] = 2;
i22 = m[4] + 7;
^
If the cursor is at m it prints m[4]:
$1 = 2
Below is a patch for gud-print which allows the user to select a region.
For example, selecting "m[4] + 7" gives:
$2 = 9
I've tested it with transient-mark-mode on and off and it seems to work in
both cases.
Is it completely general?
--
Nick http://www.inet.net.nz/~nickrob
*** gud.el 18 Apr 2006 07:16:09 +1200 1.102
--- gud.el 26 Apr 2006 10:16:59 +1200
***************
*** 2911,2917 ****
(defvar gud-find-expr-function 'gud-find-c-expr)
(defun gud-find-expr (&rest args)
! (apply gud-find-expr-function args))
;; The next eight functions are hacked from gdbsrc.el by
;; Debby Ayers <address@hidden>,
--- 2911,2919 ----
(defvar gud-find-expr-function 'gud-find-c-expr)
(defun gud-find-expr (&rest args)
! (if mark-active
! (buffer-substring (region-beginning) (region-end))
! (apply gud-find-expr-function args)))
;; The next eight functions are hacked from gdbsrc.el by
;; Debby Ayers <address@hidden>,
- gud-print,
Nick Roberts <=