* Symbol's value as a variable is void: marker
@ 2009-05-28 13:56 Lennart Borgman
2009-05-28 15:16 ` martin rudalics
0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2009-05-28 13:56 UTC (permalink / raw)
To: Emacs-Devel devel
Why do I get the error from byte compiling
mumamo-fun.el:2011:52:Error: Symbol's value as variable is void: marker
for this line
(defun mumamo-whole-line-chunk (pos min max marker mode)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 13:56 Symbol's value as a variable is void: marker Lennart Borgman
@ 2009-05-28 15:16 ` martin rudalics
2009-05-28 15:51 ` Lennart Borgman
0 siblings, 1 reply; 13+ messages in thread
From: martin rudalics @ 2009-05-28 15:16 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Emacs-Devel devel
> Why do I get the error from byte compiling
>
> mumamo-fun.el:2011:52:Error: Symbol's value as variable is void: marker
>
> for this line
>
> (defun mumamo-whole-line-chunk (pos min max marker mode)
I suppose because somewhere in your code `marker' _is_ void but the byte-compiler
finds this occurrence first when it builds the line-numbers.
martin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 15:16 ` martin rudalics
@ 2009-05-28 15:51 ` Lennart Borgman
2009-05-28 17:10 ` martin rudalics
2009-05-28 18:20 ` Stefan Monnier
0 siblings, 2 replies; 13+ messages in thread
From: Lennart Borgman @ 2009-05-28 15:51 UTC (permalink / raw)
To: martin rudalics; +Cc: Emacs-Devel devel
On Thu, May 28, 2009 at 5:16 PM, martin rudalics <rudalics@gmx.at> wrote:
>> Why do I get the error from byte compiling
>>
>> mumamo-fun.el:2011:52:Error: Symbol's value as variable is void: marker
>>
>> for this line
>>
>> (defun mumamo-whole-line-chunk (pos min max marker mode)
>
> I suppose because somewhere in your code `marker' _is_ void but the
> byte-compiler
> finds this occurrence first when it builds the line-numbers.
Good guess, it comes from this
let ( (pattern (rx bol (0+ blank) (eval marker) blank)))
rx is a macro and I maybe should do something else on the line above, but what?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 15:51 ` Lennart Borgman
@ 2009-05-28 17:10 ` martin rudalics
2009-05-28 17:11 ` Lennart Borgman
2009-05-28 18:20 ` Stefan Monnier
1 sibling, 1 reply; 13+ messages in thread
From: martin rudalics @ 2009-05-28 17:10 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Emacs-Devel devel
> Good guess, it comes from this
>
> let ( (pattern (rx bol (0+ blank) (eval marker) blank)))
>
> rx is a macro and I maybe should do something else on the line above, but what?
What is "marker"? A buffer position?
martin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 15:51 ` Lennart Borgman
2009-05-28 17:10 ` martin rudalics
@ 2009-05-28 18:20 ` Stefan Monnier
2009-05-28 19:02 ` Lennart Borgman
1 sibling, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2009-05-28 18:20 UTC (permalink / raw)
To: Lennart Borgman; +Cc: martin rudalics, Emacs-Devel devel
> rx is a macro and I maybe should do something else on the line above,
> but what?
C-h f rx RET says:
[...]
Note that `rx' is a Lisp macro; when used in a Lisp program being
compiled, the translation is performed by the compiler.
See `rx-to-string' for how to do such a translation at run-time.
[...]
-- Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 18:20 ` Stefan Monnier
@ 2009-05-28 19:02 ` Lennart Borgman
2009-05-28 22:30 ` Andreas Schwab
0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2009-05-28 19:02 UTC (permalink / raw)
To: Stefan Monnier; +Cc: martin rudalics, Emacs-Devel devel
On Thu, May 28, 2009 at 8:20 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> rx is a macro and I maybe should do something else on the line above,
>> but what?
>
> C-h f rx RET says:
>
> [...]
> Note that `rx' is a Lisp macro; when used in a Lisp program being
> compiled, the translation is performed by the compiler.
> See `rx-to-string' for how to do such a translation at run-time.
> [...]
Thanks, I see - or I hope I do. Is this what I should do:
;;(pattern (rx bol (0+ blank) (eval marker) blank))
(pattern (rx-to-string (list 'and 'bol (list '0+ 'blank)
marker 'blank) t))
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 19:02 ` Lennart Borgman
@ 2009-05-28 22:30 ` Andreas Schwab
2009-05-28 22:32 ` Lennart Borgman
0 siblings, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2009-05-28 22:30 UTC (permalink / raw)
To: Lennart Borgman; +Cc: martin rudalics, Stefan Monnier, Emacs-Devel devel
Lennart Borgman <lennart.borgman@gmail.com> writes:
> Thanks, I see - or I hope I do. Is this what I should do:
>
> ;;(pattern (rx bol (0+ blank) (eval marker) blank))
> (pattern (rx-to-string (list 'and 'bol (list '0+ 'blank)
> marker 'blank) t))
Or even:
(pattern (rx-to-string `(and bol (0+ blank) ,marker blank) t))
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 22:30 ` Andreas Schwab
@ 2009-05-28 22:32 ` Lennart Borgman
2009-05-29 0:54 ` Stephen J. Turnbull
0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2009-05-28 22:32 UTC (permalink / raw)
To: Andreas Schwab; +Cc: martin rudalics, Stefan Monnier, Emacs-Devel devel
On Fri, May 29, 2009 at 12:30 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> Thanks, I see - or I hope I do. Is this what I should do:
>>
>> ;;(pattern (rx bol (0+ blank) (eval marker) blank))
>> (pattern (rx-to-string (list 'and 'bol (list '0+ 'blank)
>> marker 'blank) t))
>
> Or even:
>
> (pattern (rx-to-string `(and bol (0+ blank) ,marker blank) t))
Thanks Andreas, that is much easier to read and write.
BTW is that syntax really documented and explained in the manual? I do
not mean for rx-to-string, but more generally. I thnk I found out
about it when reading some code, but I never saw it in the manual.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-28 22:32 ` Lennart Borgman
@ 2009-05-29 0:54 ` Stephen J. Turnbull
2009-05-29 0:52 ` Lennart Borgman
0 siblings, 1 reply; 13+ messages in thread
From: Stephen J. Turnbull @ 2009-05-29 0:54 UTC (permalink / raw)
To: Lennart Borgman
Cc: martin rudalics, Andreas Schwab, Stefan Monnier,
Emacs-Devel devel
Lennart Borgman writes:
> BTW is that syntax really documented and explained in the manual? I do
> not mean for rx-to-string, but more generally. I thnk I found out
> about it when reading some code, but I never saw it in the manual.
Try searching for "backquote".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-29 0:54 ` Stephen J. Turnbull
@ 2009-05-29 0:52 ` Lennart Borgman
2009-05-29 5:03 ` Stephen J. Turnbull
0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2009-05-29 0:52 UTC (permalink / raw)
To: Stephen J. Turnbull
Cc: martin rudalics, Andreas Schwab, Stefan Monnier,
Emacs-Devel devel
On Fri, May 29, 2009 at 2:54 AM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
> Lennart Borgman writes:
>
> > BTW is that syntax really documented and explained in the manual? I do
> > not mean for rx-to-string, but more generally. I thnk I found out
> > about it when reading some code, but I never saw it in the manual.
>
> Try searching for "backquote".
Thanks, yes, but the node
(info "(elisp) Backquote")
gives me the impression that this only works in macros, because the
node is located under macros.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-29 0:52 ` Lennart Borgman
@ 2009-05-29 5:03 ` Stephen J. Turnbull
2009-05-29 10:50 ` Lennart Borgman
0 siblings, 1 reply; 13+ messages in thread
From: Stephen J. Turnbull @ 2009-05-29 5:03 UTC (permalink / raw)
To: Lennart Borgman
Cc: martin rudalics, Andreas Schwab, Stefan Monnier,
Emacs-Devel devel
Lennart Borgman writes:
> Thanks, yes, but the node
>
> (info "(elisp) Backquote")
>
> gives me the impression that this only works in macros, because the
> node is located under macros.
I guess you would be more likely to find it under cons cells and list
structure?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Symbol's value as a variable is void: marker
2009-05-29 5:03 ` Stephen J. Turnbull
@ 2009-05-29 10:50 ` Lennart Borgman
0 siblings, 0 replies; 13+ messages in thread
From: Lennart Borgman @ 2009-05-29 10:50 UTC (permalink / raw)
To: Stephen J. Turnbull
Cc: martin rudalics, Andreas Schwab, Stefan Monnier,
Emacs-Devel devel
On Fri, May 29, 2009 at 7:03 AM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
> Lennart Borgman writes:
>
> > Thanks, yes, but the node
> >
> > (info "(elisp) Backquote")
> >
> > gives me the impression that this only works in macros, because the
> > node is located under macros.
>
> I guess you would be more likely to find it under cons cells and list
> structure?
I think it would fit better under "(elisp) Quoting" and I see now that
there is a reference now to "(elisp) Backquotes" from that node.
Maybe the only thing that is needed is that "(elisp) Backquotes"
mentions that it is not only for macros and that the "(elisp) Quoting"
got a small example of the use of backquote. I think that would help
those new to lisp/elisp very much.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-05-29 10:50 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 13:56 Symbol's value as a variable is void: marker Lennart Borgman
2009-05-28 15:16 ` martin rudalics
2009-05-28 15:51 ` Lennart Borgman
2009-05-28 17:10 ` martin rudalics
2009-05-28 17:11 ` Lennart Borgman
2009-05-28 18:20 ` Stefan Monnier
2009-05-28 19:02 ` Lennart Borgman
2009-05-28 22:30 ` Andreas Schwab
2009-05-28 22:32 ` Lennart Borgman
2009-05-29 0:54 ` Stephen J. Turnbull
2009-05-29 0:52 ` Lennart Borgman
2009-05-29 5:03 ` Stephen J. Turnbull
2009-05-29 10:50 ` Lennart Borgman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).