all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Declaring a list as a global variable
@ 2023-06-04  8:04 uzibalqa
  2023-06-04  8:08 ` Basile Starynkevitch
  0 siblings, 1 reply; 3+ messages in thread
From: uzibalqa @ 2023-06-04  8:04 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor


I am adding elements to a list inside a function but how would I declare the list as a global variable
initially ?
 




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

* Re: Declaring a list as a global variable
  2023-06-04  8:04 Declaring a list as a global variable uzibalqa
@ 2023-06-04  8:08 ` Basile Starynkevitch
  2023-06-04  9:26   ` uzibalqa
  0 siblings, 1 reply; 3+ messages in thread
From: Basile Starynkevitch @ 2023-06-04  8:08 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: uzibalqa


On 6/4/23 10:04, uzibalqa wrote:
> I am adding elements to a list inside a function but how would I declare the list as a global variable
> initially ?
>   
>
>

You would probably use the defvar special form.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Variables.html


BTW, my pet open source project is the RefPerSys inference engine on 
http://refpersys.org/ and code on 
https://github.com/RefPerSys/RefPerSys/ and contributors are welcome.


Regards from near Paris in France

-- 
Basile Starynkevitch                  <basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/




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

* Re: Declaring a list as a global variable
  2023-06-04  8:08 ` Basile Starynkevitch
@ 2023-06-04  9:26   ` uzibalqa
  0 siblings, 0 replies; 3+ messages in thread
From: uzibalqa @ 2023-06-04  9:26 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: help-gnu-emacs



------- Original Message -------
On Sunday, June 4th, 2023 at 8:08 PM, Basile Starynkevitch <basile@starynkevitch.net> wrote:


> On 6/4/23 10:04, uzibalqa wrote:
>
> > I am adding elements to a list inside a function but how would I declare the list as a global variable
> > initially ?
>
>
> You would probably use the defvar special form.
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Variables.html

Are there any designations one should use when declaring a global variable within a minor-mode ?


Currently I have included 

(defvar mylist '()
  "Description.")

> BTW, my pet open source project is the RefPerSys inference engine on
> http://refpersys.org/ and code on
> https://github.com/RefPerSys/RefPerSys/ and contributors are welcome.
>
>
> Regards from near Paris in France
>
> --
> Basile Starynkevitch basile@starynkevitch.net
>
> (only mine opinions / les opinions sont miennes uniquement)
> 92340 Bourg-la-Reine, France
> web page: starynkevitch.net/Basile/



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

end of thread, other threads:[~2023-06-04  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-04  8:04 Declaring a list as a global variable uzibalqa
2023-06-04  8:08 ` Basile Starynkevitch
2023-06-04  9:26   ` uzibalqa

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.