unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* inserting a cons cell returned by a function
@ 2024-08-13 19:09 Heime
  2024-08-14  0:46 ` Joel Reicher
  0 siblings, 1 reply; 5+ messages in thread
From: Heime @ 2024-08-13 19:09 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Have made a function navcons that returns a cons cell.

Whilst this works

      (insert (format " /* %s\n" (navcons "/*")))

why does this fail ?

      (insert (format " %s %s\n" comment-start (navcons comment-start)))




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: inserting a cons cell returned by a function
  2024-08-13 19:09 inserting a cons cell returned by a function Heime
@ 2024-08-14  0:46 ` Joel Reicher
  2024-08-14 10:46   ` Heime
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Reicher @ 2024-08-14  0:46 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

Heime <heimeborgia@protonmail.com> writes:

> Have made a function navcons that returns a cons cell.
>
> Whilst this works
>
>       (insert (format " /* %s\n" (navcons "/*")))
>
> why does this fail ?
>
>       (insert (format " %s %s\n" comment-start (navcons 
>       comment-start)))

The error you get might explain it.

Regards,

        - Joel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: inserting a cons cell returned by a function
  2024-08-14  0:46 ` Joel Reicher
@ 2024-08-14 10:46   ` Heime
  2024-08-14 10:56     ` Joel Reicher
  0 siblings, 1 reply; 5+ messages in thread
From: Heime @ 2024-08-14 10:46 UTC (permalink / raw)
  To: Joel Reicher; +Cc: Heime via Users list for the GNU Emacs text editor

Sent with Proton Mail secure email.

On Wednesday, August 14th, 2024 at 12:46 PM, Joel Reicher <joel.reicher@gmail.com> wrote:

> Heime heimeborgia@protonmail.com writes:
> 
> > Have made a function navcons that returns a cons cell.
> > 
> > Whilst this works
> > 
> > (insert (format " /* %s\n" (navcons "/*")))
> > 
> > why does this fail ?
> > 
> > (insert (format " %s %s\n" comment-start (navcons
> > comment-start)))
> 
> 
> The error you get might explain it. - Joel

The problem happened when using comment-start, a buffer-local
variable when I changed to a new buffer in fundamental-mode.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: inserting a cons cell returned by a function
  2024-08-14 10:46   ` Heime
@ 2024-08-14 10:56     ` Joel Reicher
  2024-08-14 11:19       ` Heime
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Reicher @ 2024-08-14 10:56 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

Heime <heimeborgia@protonmail.com> writes:

> On Wednesday, August 14th, 2024 at 12:46 PM, Joel Reicher 
> <joel.reicher@gmail.com> wrote:
>
>> The error you get might explain it.
>
> The problem happened when using comment-start, a buffer-local 
> variable when I changed to a new buffer in fundamental-mode.

So the error makes sense now?

Regards,

        - Joel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: inserting a cons cell returned by a function
  2024-08-14 10:56     ` Joel Reicher
@ 2024-08-14 11:19       ` Heime
  0 siblings, 0 replies; 5+ messages in thread
From: Heime @ 2024-08-14 11:19 UTC (permalink / raw)
  To: Joel Reicher; +Cc: Heime via Users list for the GNU Emacs text editor

On Wednesday, August 14th, 2024 at 10:56 PM, Joel Reicher <joel.reicher@gmail.com> wrote:

> Heime heimeborgia@protonmail.com writes:
> 
> > On Wednesday, August 14th, 2024 at 12:46 PM, Joel Reicher
> > joel.reicher@gmail.com wrote:
> > 
> > > The error you get might explain it.
> > 
> > The problem happened when using comment-start, a buffer-local
> > variable when I changed to a new buffer in fundamental-mode.
> 
> 
> So the error makes sense now? - Joel

It makes sense and I fixed it.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-14 11:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-13 19:09 inserting a cons cell returned by a function Heime
2024-08-14  0:46 ` Joel Reicher
2024-08-14 10:46   ` Heime
2024-08-14 10:56     ` Joel Reicher
2024-08-14 11:19       ` Heime

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).