[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hijack C function, use it transparently with in-between layer
From: |
Barry Margolin |
Subject: |
Re: hijack C function, use it transparently with in-between layer |
Date: |
Mon, 06 Jun 2016 03:32:42 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <868tyjnghn.fsf@student.uu.se>,
Emanuel Berg <embe8573@student.uu.se> wrote:
> The truth is down there!
>
> (defvar old-message)
> (fset 'old-message (symbol-function #'message))
>
> (defun message (format-string &rest args)
> (unless (member format-string
> '(
> "It was just another system of control."
> "Mark set"
> ))
> (apply `(old-message ,format-string ,@args) )))
>
> ;; test:
> ;;
> ;; (message "%s - %s" "1" "2")
> ;; (message "Break on thru to the other side.")
> ;; (message "It was just another system of control.")
> ;; (message "Mark set")
Shouldn't you do this using advice?
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
- hijack C function, use it transparently with in-between layer, Emanuel Berg, 2016/06/05
- Re: hijack C function, use it transparently with in-between layer, Marcin Borkowski, 2016/06/05
- Re: hijack C function, use it transparently with in-between layer,
Barry Margolin <=
- Re: hijack C function, use it transparently with in-between layer, Emanuel Berg, 2016/06/06
- Re: hijack C function, use it transparently with in-between layer, Phillip Lord, 2016/06/06
- Message not available
- Re: hijack C function, use it transparently with in-between layer, Emanuel Berg, 2016/06/06
- Re: hijack C function, use it transparently with in-between layer, Stefan Monnier, 2016/06/06
- Message not available
- Re: hijack C function, use it transparently with in-between layer, Emanuel Berg, 2016/06/06
- Re: hijack C function, use it transparently with in-between layer, Stefan Monnier, 2016/06/06
- Message not available
- Re: hijack C function, use it transparently with in-between layer, Barry Margolin, 2016/06/06
- Re: hijack C function, use it transparently with in-between layer, Stefan Monnier, 2016/06/06
- Re: hijack C function, use it transparently with in-between layer, Emanuel Berg, 2016/06/06
- Re: hijack C function, use it transparently with in-between layer, John Mastro, 2016/06/06