From: Nick Roberts <nickrob@snap.net.nz>
Subject: gud-print
Date: Wed, 26 Apr 2006 10:42:27 +1200 [thread overview]
Message-ID: <17486.42451.875697.34118@farnswood.snap.net.nz> (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>,
next reply other threads:[~2006-04-25 22:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 22:42 Nick Roberts [this message]
2006-04-25 22:47 ` gud-print Nick Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17486.42451.875697.34118@farnswood.snap.net.nz \
--to=nickrob@snap.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.