* gud-print
@ 2006-04-25 22:42 Nick Roberts
2006-04-25 22:47 ` gud-print Nick Roberts
0 siblings, 1 reply; 2+ messages in thread
From: Nick Roberts @ 2006-04-25 22:42 UTC (permalink / raw)
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 <ayers@asc.slb.com>,
--- 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 <ayers@asc.slb.com>,
^ permalink raw reply [flat|nested] 2+ messages in thread
* gud-print
2006-04-25 22:42 gud-print Nick Roberts
@ 2006-04-25 22:47 ` Nick Roberts
0 siblings, 0 replies; 2+ messages in thread
From: Nick Roberts @ 2006-04-25 22:47 UTC (permalink / raw)
> Currently gud-find-expr-function computes the expression at point:
>
> m[4] = 2;
> i22 = m[4] + 7;
> ^
Make that m[4]*7
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-25 22:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-25 22:42 gud-print Nick Roberts
2006-04-25 22:47 ` gud-print Nick Roberts
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.