* problem with elisp compilator
@ 2002-12-04 2:47 Pascal Bourguignon
2002-12-05 16:54 ` Kevin Rodgers
0 siblings, 1 reply; 4+ messages in thread
From: Pascal Bourguignon @ 2002-12-04 2:47 UTC (permalink / raw)
I have the following problem while compiling some common-lisp sources
with emacs:
Compiling pjb-regexp.lisp ...
defining string=
While compiling pjb-re-string-match in file /home/pascal/src/common/lisp/common-lisp/pjb-regexp.lisp:
** string= called with 6 args, but requires 2
While compiling pjb-re-decorate-tree in file /home/pascal/src/common/lisp/common-lisp/pjb-regexp.lisp:
** member called with 4 args, but requires 2
Wrote /home/pascal/src/common/lisp/common-lisp/pjb-regexp.lisp.elc
Done
The compilator invocation is done as follow:
emacs -batch -q -l ../emacs/.emacs -l ../emacs/pjb-cl.el \
-f batch-byte-compile pjb-regexp.lisp
../emacs/.emacs contains (add-to-list 'load-path ... statements)
../emacs/pjb-cl.el requires 'cl and contain additionnal common-lisp definitions.
In particular, it contains:
(eval-when (compile load eval)
(mapc (lambda (sym) (fmakunbound sym))
'(
;; ...
string=
string<
;; ...
)
)
)
(message "defining string=")
(defun string= (string1 string2 &rest cl-keys)
;; &key :start1 :end1 :start2 :end2)
;; ...
)
(defadvice member
(around pjb-cl-member first (item alist &rest cl-keys) activate)
;;...
)
(ad-activate 'member)
The message "defining string=" shows that pjb-cl.el is loaded at the
beginning of the compilation of pjb-regexp.lisp, but then it seems
that the compilator does not take into account definitions in this
file neither of a new string= definition or of an advice to an
existing primitive.
Doesn't it looks like a bug? What can I do about it?
--
__Pascal_Bourguignon__ http://www.informatimago.com/
----------------------------------------------------------------------
There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem with elisp compilator
2002-12-04 2:47 problem with elisp compilator Pascal Bourguignon
@ 2002-12-05 16:54 ` Kevin Rodgers
2002-12-06 22:50 ` Pascal Bourguignon
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2002-12-05 16:54 UTC (permalink / raw)
Pascal Bourguignon wrote:
> The message "defining string=" shows that pjb-cl.el is loaded at the
> beginning of the compilation of pjb-regexp.lisp, but then it seems
> that the compilator does not take into account definitions in this
> file neither of a new string= definition or of an advice to an
> existing primitive.
>
> Doesn't it looks like a bug? What can I do about it?
The same thing that Emacs' CL emulation does: Don't override Emacs Lisp
function definitions; instead, define a new function with "*" appended
to the name.
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem with elisp compilator
2002-12-05 16:54 ` Kevin Rodgers
@ 2002-12-06 22:50 ` Pascal Bourguignon
2002-12-07 14:01 ` Kai Großjohann
0 siblings, 1 reply; 4+ messages in thread
From: Pascal Bourguignon @ 2002-12-06 22:50 UTC (permalink / raw)
Kevin Rodgers <kevinr@ihs.com> writes:
> Pascal Bourguignon wrote:
>
> > The message "defining string=" shows that pjb-cl.el is loaded at the
> > beginning of the compilation of pjb-regexp.lisp, but then it seems
> > that the compilator does not take into account definitions in this
> > file neither of a new string= definition or of an advice to an
> > existing primitive.
> > Doesn't it looks like a bug? What can I do about it?
>
>
> The same thing that Emacs' CL emulation does: Don't override Emacs Lisp
> function definitions; instead, define a new function with "*" appended
> to the name.
I don't want the same features as in Common-Lisp under a different
name. I want to be able to use the same lisp source both in
Common-Lisp and in Emacs Lisp.
Anyway, this is a general problem, and it occurs both when redefining
a function and when advising a function.
--
__Pascal_Bourguignon__ http://www.informatimago.com/
----------------------------------------------------------------------
There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem with elisp compilator
2002-12-06 22:50 ` Pascal Bourguignon
@ 2002-12-07 14:01 ` Kai Großjohann
0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2002-12-07 14:01 UTC (permalink / raw)
Pascal Bourguignon <pjb@informatimago.com> writes:
> I don't want the same features as in Common-Lisp under a different
> name. I want to be able to use the same lisp source both in
> Common-Lisp and in Emacs Lisp.
I think the best approach is to define compatibility functions in
your own namespace. That is, when you want to compare strings, use
pjb-string=, then define that function appropriately. Maybe a simple
defalias (does that exist in CL, too?) is sufficient.
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-12-07 14:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-04 2:47 problem with elisp compilator Pascal Bourguignon
2002-12-05 16:54 ` Kevin Rodgers
2002-12-06 22:50 ` Pascal Bourguignon
2002-12-07 14:01 ` Kai Großjohann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).