From: jrwats <jrwats@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: equivalent of make-local-variable for defun?
Date: Mon, 3 Nov 2008 22:03:26 -0800 (PST) [thread overview]
Message-ID: <bd03dfb1-c9f5-459d-a71e-55f6176af1d3@z6g2000pre.googlegroups.com> (raw)
In-Reply-To: barmar-01579F.20470803112008@mara100-84.onlink.net
On Nov 3, 5:47 pm, Barry Margolin <bar...@alum.mit.edu> wrote:
> In article
> <1d3363bf-4c06-4424-832a-5abe06f56...@z6g2000pre.googlegroups.com>,
>
> jrwats <jrw...@gmail.com> wrote:
> > I'm trying to fix a mode using comint for an inferior lisp that
> > apparently needs to overwrite comint-send-region. I'd rather it not
> > overwrite ALL buffers' (including my shell-mode buffer) comint-send-
> > region function.
>
> > Is there a way to define a function but local to the current buffer as
> > when you define a local variable in make-local-variable?
>
> You could define around-advice on the function that checks the mode, or
> looks at the value of a buffer-local variable. If it's in a buffer that
> needs your fix, it runs the advice, otherwise it falls through to the
> regular function.
Thanks! This will work. It seems hackish, but it will work!
next prev parent reply other threads:[~2008-11-04 6:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 16:18 equivalent of make-local-variable for defun? jrwats
2008-11-03 17:16 ` Paul R
[not found] ` <barmar-01579F.20470803112008@mara100-84.onlink.net>
2008-11-04 6:03 ` jrwats [this message]
2008-11-05 10:01 ` Kevin Rodgers
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=bd03dfb1-c9f5-459d-a71e-55f6176af1d3@z6g2000pre.googlegroups.com \
--to=jrwats@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.